@homebound/beam 3.14.0 → 3.15.1
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 +1428 -1182
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -1
- package/dist/index.d.ts +60 -1
- package/dist/index.js +1363 -1120
- package/dist/index.js.map +1 -1
- package/dist/truss.css +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5012,7 +5012,7 @@ function Chips(props) {
|
|
|
5012
5012
|
// src/components/Table/GridTable.tsx
|
|
5013
5013
|
import memoizeOne from "memoize-one";
|
|
5014
5014
|
import { runInAction } from "mobx";
|
|
5015
|
-
import React13, { useEffect as useEffect19, useMemo as useMemo24, useRef as
|
|
5015
|
+
import React13, { useEffect as useEffect19, useMemo as useMemo24, useRef as useRef40, useState as useState30 } from "react";
|
|
5016
5016
|
import { Virtuoso as Virtuoso2 } from "react-virtuoso";
|
|
5017
5017
|
|
|
5018
5018
|
// src/components/Layout/ScrollableContent.tsx
|
|
@@ -5466,7 +5466,7 @@ var activeStylesCircle = {
|
|
|
5466
5466
|
};
|
|
5467
5467
|
|
|
5468
5468
|
// src/components/Table/components/ExpandableHeader.tsx
|
|
5469
|
-
import { useContext as useContext5, useState as
|
|
5469
|
+
import { useContext as useContext5, useState as useState9 } from "react";
|
|
5470
5470
|
import { trussProps as trussProps9, maybeCssVar as maybeCssVar8 } from "@homebound/truss/runtime";
|
|
5471
5471
|
|
|
5472
5472
|
// src/hooks/useBreakpoint.tsx
|
|
@@ -5554,10 +5554,33 @@ function useComputed(fn, deps) {
|
|
|
5554
5554
|
return ref.current.value;
|
|
5555
5555
|
}
|
|
5556
5556
|
|
|
5557
|
+
// src/hooks/useContentOverflow.ts
|
|
5558
|
+
import { useCallback as useCallback2, useLayoutEffect, useRef as useRef6, useState as useState6 } from "react";
|
|
5559
|
+
function useContentOverflow(enabled = true) {
|
|
5560
|
+
const containerRef = useRef6(null);
|
|
5561
|
+
const contentRef = useRef6(null);
|
|
5562
|
+
const [overflows, setOverflows] = useState6(false);
|
|
5563
|
+
const checkContentOverflow = useCallback2(() => {
|
|
5564
|
+
const container = containerRef.current;
|
|
5565
|
+
const content = contentRef.current;
|
|
5566
|
+
if (!enabled || !container || !content) {
|
|
5567
|
+
setOverflows(false);
|
|
5568
|
+
return;
|
|
5569
|
+
}
|
|
5570
|
+
setOverflows(content.offsetWidth > container.clientWidth);
|
|
5571
|
+
}, [enabled]);
|
|
5572
|
+
useLayoutEffect(() => {
|
|
5573
|
+
checkContentOverflow();
|
|
5574
|
+
window.addEventListener("resize", checkContentOverflow);
|
|
5575
|
+
return () => window.removeEventListener("resize", checkContentOverflow);
|
|
5576
|
+
}, [checkContentOverflow]);
|
|
5577
|
+
return { containerRef, contentRef, overflows };
|
|
5578
|
+
}
|
|
5579
|
+
|
|
5557
5580
|
// src/hooks/useFilter.ts
|
|
5558
|
-
import { useState as
|
|
5581
|
+
import { useState as useState7 } from "react";
|
|
5559
5582
|
function useFilter({ filterDefs }) {
|
|
5560
|
-
const [filter, setFilter] =
|
|
5583
|
+
const [filter, setFilter] = useState7(
|
|
5561
5584
|
Object.fromEntries(
|
|
5562
5585
|
safeEntries(filterDefs).filter(([key, def]) => def(key).defaultValue !== void 0).map(([key, def]) => [key, def(key).defaultValue])
|
|
5563
5586
|
)
|
|
@@ -5569,12 +5592,12 @@ function useFilter({ filterDefs }) {
|
|
|
5569
5592
|
import { useMemo as useMemo7 } from "react";
|
|
5570
5593
|
|
|
5571
5594
|
// src/hooks/useQueryState.ts
|
|
5572
|
-
import { useCallback as
|
|
5595
|
+
import { useCallback as useCallback3 } from "react";
|
|
5573
5596
|
import { StringParam, useQueryParams } from "use-query-params";
|
|
5574
5597
|
function useQueryState(name, initialValue) {
|
|
5575
5598
|
const [params, setParams] = useQueryParams({ [name]: StringParam });
|
|
5576
5599
|
const value = params[name] || initialValue;
|
|
5577
|
-
const setValue =
|
|
5600
|
+
const setValue = useCallback3((value2) => setParams({ [name]: value2 }, "pushIn"), [name, setParams]);
|
|
5578
5601
|
return [value, setValue];
|
|
5579
5602
|
}
|
|
5580
5603
|
|
|
@@ -5597,7 +5620,7 @@ function useHover2(props) {
|
|
|
5597
5620
|
}
|
|
5598
5621
|
|
|
5599
5622
|
// src/hooks/usePersistedFilter.ts
|
|
5600
|
-
import { useEffect as useEffect6, useMemo as useMemo8, useRef as
|
|
5623
|
+
import { useEffect as useEffect6, useMemo as useMemo8, useRef as useRef7 } from "react";
|
|
5601
5624
|
import { JsonParam, useQueryParams as useQueryParams2 } from "use-query-params";
|
|
5602
5625
|
function usePersistedFilter({ storageKey, filterDefs }) {
|
|
5603
5626
|
const filterImpls = useMemo8(
|
|
@@ -5684,8 +5707,8 @@ function parseSerializedValue(value) {
|
|
|
5684
5707
|
return value === void 0 ? void 0 : JSON.parse(value);
|
|
5685
5708
|
}
|
|
5686
5709
|
function useStableValue(value) {
|
|
5687
|
-
const stableValue =
|
|
5688
|
-
const stableKey =
|
|
5710
|
+
const stableValue = useRef7(value);
|
|
5711
|
+
const stableKey = useRef7(JSON.stringify(value));
|
|
5689
5712
|
const nextKey = JSON.stringify(value);
|
|
5690
5713
|
if (stableKey.current !== nextKey) {
|
|
5691
5714
|
stableValue.current = value;
|
|
@@ -5695,14 +5718,14 @@ function useStableValue(value) {
|
|
|
5695
5718
|
}
|
|
5696
5719
|
|
|
5697
5720
|
// src/hooks/useSessionStorage.ts
|
|
5698
|
-
import { useCallback as
|
|
5721
|
+
import { useCallback as useCallback4, useState as useState8 } from "react";
|
|
5699
5722
|
function useSessionStorage(key, defaultValue) {
|
|
5700
5723
|
let hasSessionStorage = false;
|
|
5701
5724
|
try {
|
|
5702
5725
|
hasSessionStorage = !!window.sessionStorage;
|
|
5703
5726
|
} catch (e) {
|
|
5704
5727
|
}
|
|
5705
|
-
const [state, setState] =
|
|
5728
|
+
const [state, setState] = useState8(() => {
|
|
5706
5729
|
if (!hasSessionStorage) {
|
|
5707
5730
|
return defaultValue;
|
|
5708
5731
|
}
|
|
@@ -5713,7 +5736,7 @@ function useSessionStorage(key, defaultValue) {
|
|
|
5713
5736
|
sessionStorage.setItem(key, JSON.stringify(defaultValue));
|
|
5714
5737
|
return defaultValue;
|
|
5715
5738
|
});
|
|
5716
|
-
const setAndSave =
|
|
5739
|
+
const setAndSave = useCallback4(
|
|
5717
5740
|
(value) => {
|
|
5718
5741
|
if (hasSessionStorage && value) {
|
|
5719
5742
|
sessionStorage.setItem(key, JSON.stringify(value));
|
|
@@ -5771,7 +5794,7 @@ function ExpandableHeader(props) {
|
|
|
5771
5794
|
} = useContext5(TableStateContext);
|
|
5772
5795
|
const expandedColumnIds = useComputed(() => tableState.expandedColumnIds, [tableState]);
|
|
5773
5796
|
const isExpanded = expandedColumnIds.includes(column2.id);
|
|
5774
|
-
const [isLoading, setIsLoading] =
|
|
5797
|
+
const [isLoading, setIsLoading] = useState9(false);
|
|
5775
5798
|
const applyStickyStyles = isExpanded && as !== "table";
|
|
5776
5799
|
const {
|
|
5777
5800
|
hoverProps,
|
|
@@ -5843,7 +5866,7 @@ function ExpandableHeader(props) {
|
|
|
5843
5866
|
}
|
|
5844
5867
|
|
|
5845
5868
|
// src/components/Table/components/SortHeader.tsx
|
|
5846
|
-
import { useCallback as
|
|
5869
|
+
import { useCallback as useCallback5, useContext as useContext6 } from "react";
|
|
5847
5870
|
import { trussProps as trussProps10 } from "@homebound/truss/runtime";
|
|
5848
5871
|
import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
5849
5872
|
function SortHeader(props) {
|
|
@@ -5863,7 +5886,7 @@ function SortHeader(props) {
|
|
|
5863
5886
|
} = useContext6(TableStateContext);
|
|
5864
5887
|
const current = useComputed(() => tableState.sortState?.current, [tableState]);
|
|
5865
5888
|
const sorted = sortKey === current?.columnId ? current?.direction : void 0;
|
|
5866
|
-
const toggleSort =
|
|
5889
|
+
const toggleSort = useCallback5(() => tableState.setSortKey(sortKey), [sortKey, tableState]);
|
|
5867
5890
|
const tid = useTestIds(props, "sortHeader");
|
|
5868
5891
|
const icon = /* @__PURE__ */ jsx13("span", { className: "fs0", children: /* @__PURE__ */ jsx13(Icon, { icon: sorted === "DESC" ? "sortDown" : "sortUp", color: sorted !== void 0 ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(201, 201, 201, 1)" /* Gray400 */, xss: {
|
|
5869
5892
|
...{
|
|
@@ -6131,7 +6154,7 @@ function CollapseToggle(props) {
|
|
|
6131
6154
|
import { useContext as useContext13 } from "react";
|
|
6132
6155
|
|
|
6133
6156
|
// src/inputs/Autocomplete.tsx
|
|
6134
|
-
import { useCallback as
|
|
6157
|
+
import { useCallback as useCallback11, useRef as useRef25 } from "react";
|
|
6135
6158
|
import { useComboBox as useComboBox3, useOverlayPosition as useOverlayPosition5 } from "react-aria";
|
|
6136
6159
|
import { Item as Item5, useComboBoxState as useComboBoxState3 } from "react-stately";
|
|
6137
6160
|
|
|
@@ -6240,13 +6263,13 @@ function dateMatchersToDayPickerMatchers(matchers) {
|
|
|
6240
6263
|
}
|
|
6241
6264
|
|
|
6242
6265
|
// src/components/internal/DatePicker/Day.tsx
|
|
6243
|
-
import { useRef as
|
|
6266
|
+
import { useRef as useRef8 } from "react";
|
|
6244
6267
|
import { useDayRender } from "react-day-picker";
|
|
6245
6268
|
import { trussProps as trussProps12, mergeProps as mergeProps3 } from "@homebound/truss/runtime";
|
|
6246
6269
|
import { Fragment as Fragment5, jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
6247
6270
|
function Day(props) {
|
|
6248
6271
|
const tid = useTestIds(props, "datePickerDay");
|
|
6249
|
-
const buttonRef =
|
|
6272
|
+
const buttonRef = useRef8(null);
|
|
6250
6273
|
const {
|
|
6251
6274
|
isHidden,
|
|
6252
6275
|
isButton,
|
|
@@ -6501,7 +6524,7 @@ function DateRangePicker(props) {
|
|
|
6501
6524
|
|
|
6502
6525
|
// src/components/internal/Menu.tsx
|
|
6503
6526
|
import { camelCase } from "change-case";
|
|
6504
|
-
import { useEffect as useEffect8, useMemo as useMemo9, useRef as
|
|
6527
|
+
import { useEffect as useEffect8, useMemo as useMemo9, useRef as useRef12, useState as useState12 } from "react";
|
|
6505
6528
|
import { FocusScope, useFilter as useFilter2, useMenu } from "react-aria";
|
|
6506
6529
|
import { Item, Section, useTreeData, useTreeState } from "react-stately";
|
|
6507
6530
|
|
|
@@ -6527,7 +6550,13 @@ function MenuSectionImpl(props) {
|
|
|
6527
6550
|
const isPersistentSection = section.key !== state.collection.getFirstKey();
|
|
6528
6551
|
const tid = useTestIds(props);
|
|
6529
6552
|
return /* @__PURE__ */ jsxs12(Fragment6, { children: [
|
|
6530
|
-
isPersistentSection && /* @__PURE__ */ jsx22("li", { ...separatorProps,
|
|
6553
|
+
isPersistentSection && /* @__PURE__ */ jsx22("li", { ...separatorProps, ...trussProps13({
|
|
6554
|
+
borderTopStyle: "bts_solid",
|
|
6555
|
+
borderTopWidth: "btw_1px",
|
|
6556
|
+
borderColor: ["bc_var", {
|
|
6557
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
6558
|
+
}]
|
|
6559
|
+
}) }),
|
|
6531
6560
|
/* @__PURE__ */ jsx22("li", { ...itemProps, ...trussProps13({
|
|
6532
6561
|
color: ["color_var", {
|
|
6533
6562
|
"--color": "var(--b-on-surface)"
|
|
@@ -6541,10 +6570,10 @@ function MenuSectionImpl(props) {
|
|
|
6541
6570
|
|
|
6542
6571
|
// src/inputs/internal/MenuSearchField.tsx
|
|
6543
6572
|
import { useTextField } from "@react-aria/textfield";
|
|
6544
|
-
import { useRef as
|
|
6573
|
+
import { useRef as useRef11 } from "react";
|
|
6545
6574
|
|
|
6546
6575
|
// src/inputs/TextFieldBase.tsx
|
|
6547
|
-
import { useState as
|
|
6576
|
+
import { useState as useState11 } from "react";
|
|
6548
6577
|
import { chain, mergeProps as mergeProps6, useFocusWithin, useHover as useHover3 } from "react-aria";
|
|
6549
6578
|
|
|
6550
6579
|
// src/components/HelperText.tsx
|
|
@@ -6635,7 +6664,7 @@ function InlineLabel({
|
|
|
6635
6664
|
|
|
6636
6665
|
// src/components/Table/components/Row.tsx
|
|
6637
6666
|
import { observer } from "mobx-react";
|
|
6638
|
-
import React6, { useCallback as
|
|
6667
|
+
import React6, { useCallback as useCallback7, useContext as useContext10, useRef as useRef10 } from "react";
|
|
6639
6668
|
import { mergeProps as mergeProps5 } from "react-aria";
|
|
6640
6669
|
|
|
6641
6670
|
// src/components/Table/components/cell.tsx
|
|
@@ -6693,7 +6722,7 @@ var rowClickRenderFn = (as, api, colSpan) => (key, css2, content, row, rowStyle,
|
|
|
6693
6722
|
};
|
|
6694
6723
|
|
|
6695
6724
|
// src/components/Table/components/ColumnResizeHandle.tsx
|
|
6696
|
-
import { useCallback as
|
|
6725
|
+
import { useCallback as useCallback6, useContext as useContext8, useEffect as useEffect7, useRef as useRef9, useState as useState10 } from "react";
|
|
6697
6726
|
import { trussProps as trussProps16, maybeCssVar as maybeCssVar10 } from "@homebound/truss/runtime";
|
|
6698
6727
|
import { Fragment as Fragment7, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
6699
6728
|
function findScrollableParent(element) {
|
|
@@ -6726,20 +6755,20 @@ function ColumnResizeHandle({
|
|
|
6726
6755
|
const {
|
|
6727
6756
|
scrollableEl
|
|
6728
6757
|
} = useScrollableParent();
|
|
6729
|
-
const [isDragging, setIsDragging] =
|
|
6730
|
-
const [isHovering, setIsHovering] =
|
|
6731
|
-
const [guideLineX, setGuideLineX] =
|
|
6732
|
-
const [guideLineTop, setGuideLineTop] =
|
|
6733
|
-
const [guideLineHeight, setGuideLineHeight] =
|
|
6734
|
-
const startXRef =
|
|
6735
|
-
const startWidthRef =
|
|
6736
|
-
const startHandleRightRef =
|
|
6737
|
-
const handleRef =
|
|
6738
|
-
const rafRef =
|
|
6739
|
-
const pendingMouseXRef =
|
|
6740
|
-
const scrollableParentRef =
|
|
6758
|
+
const [isDragging, setIsDragging] = useState10(false);
|
|
6759
|
+
const [isHovering, setIsHovering] = useState10(false);
|
|
6760
|
+
const [guideLineX, setGuideLineX] = useState10(null);
|
|
6761
|
+
const [guideLineTop, setGuideLineTop] = useState10(0);
|
|
6762
|
+
const [guideLineHeight, setGuideLineHeight] = useState10(0);
|
|
6763
|
+
const startXRef = useRef9(0);
|
|
6764
|
+
const startWidthRef = useRef9(0);
|
|
6765
|
+
const startHandleRightRef = useRef9(0);
|
|
6766
|
+
const handleRef = useRef9(null);
|
|
6767
|
+
const rafRef = useRef9(null);
|
|
6768
|
+
const pendingMouseXRef = useRef9(null);
|
|
6769
|
+
const scrollableParentRef = useRef9(null);
|
|
6741
6770
|
const tid = useTestIds({}, "columnResizeHandle");
|
|
6742
|
-
const handleMouseDown =
|
|
6771
|
+
const handleMouseDown = useCallback6((e) => {
|
|
6743
6772
|
e.preventDefault();
|
|
6744
6773
|
e.stopPropagation();
|
|
6745
6774
|
setIsDragging(true);
|
|
@@ -6775,7 +6804,7 @@ function ColumnResizeHandle({
|
|
|
6775
6804
|
document.body.style.cursor = "col-resize";
|
|
6776
6805
|
document.body.style.userSelect = "none";
|
|
6777
6806
|
}, [currentWidth, tableContainerRef, scrollableEl]);
|
|
6778
|
-
const updateGuideLineBounds =
|
|
6807
|
+
const updateGuideLineBounds = useCallback6(() => {
|
|
6779
6808
|
if (tableContainerRef?.current) {
|
|
6780
6809
|
const tableRect = tableContainerRef.current.getBoundingClientRect();
|
|
6781
6810
|
if (scrollableParentRef.current) {
|
|
@@ -6790,7 +6819,7 @@ function ColumnResizeHandle({
|
|
|
6790
6819
|
}
|
|
6791
6820
|
}
|
|
6792
6821
|
}, [tableContainerRef]);
|
|
6793
|
-
const updateGuideLine =
|
|
6822
|
+
const updateGuideLine = useCallback6(() => {
|
|
6794
6823
|
if (pendingMouseXRef.current === null) {
|
|
6795
6824
|
updateGuideLineBounds();
|
|
6796
6825
|
return;
|
|
@@ -6805,20 +6834,20 @@ function ColumnResizeHandle({
|
|
|
6805
6834
|
pendingMouseXRef.current = null;
|
|
6806
6835
|
rafRef.current = null;
|
|
6807
6836
|
}, [minWidth, calculatePreviewWidth, columnId, columnIndex, updateGuideLineBounds]);
|
|
6808
|
-
const handleMouseMove =
|
|
6837
|
+
const handleMouseMove = useCallback6((e) => {
|
|
6809
6838
|
if (!isDragging) return;
|
|
6810
6839
|
pendingMouseXRef.current = e.clientX;
|
|
6811
6840
|
if (rafRef.current === null) {
|
|
6812
6841
|
rafRef.current = requestAnimationFrame(updateGuideLine);
|
|
6813
6842
|
}
|
|
6814
6843
|
}, [isDragging, updateGuideLine]);
|
|
6815
|
-
const handleScroll =
|
|
6844
|
+
const handleScroll = useCallback6(() => {
|
|
6816
6845
|
if (!isDragging) return;
|
|
6817
6846
|
if (rafRef.current === null) {
|
|
6818
6847
|
rafRef.current = requestAnimationFrame(updateGuideLine);
|
|
6819
6848
|
}
|
|
6820
6849
|
}, [isDragging, updateGuideLine]);
|
|
6821
|
-
const handleMouseUp =
|
|
6850
|
+
const handleMouseUp = useCallback6((e) => {
|
|
6822
6851
|
if (!isDragging) return;
|
|
6823
6852
|
const deltaX = e.clientX - startXRef.current;
|
|
6824
6853
|
const newWidth = Math.max(minWidth, startWidthRef.current + deltaX);
|
|
@@ -7900,8 +7929,8 @@ function RowImpl(props) {
|
|
|
7900
7929
|
let foundFirstContentColumn = false;
|
|
7901
7930
|
let minStickyLeftOffset = 0;
|
|
7902
7931
|
let expandColumnHidden = false;
|
|
7903
|
-
const ref =
|
|
7904
|
-
const dragOverCallback =
|
|
7932
|
+
const ref = useRef10(null);
|
|
7933
|
+
const dragOverCallback = useCallback7((row2, evt) => onDragOver?.(row2, evt), [onDragOver]);
|
|
7905
7934
|
const onDragOverDebounced = useDebouncedCallback2(dragOverCallback, 100);
|
|
7906
7935
|
const RowContent = () => /* @__PURE__ */ jsx28(RowTag, { ...mergeProps_12(BorderHoverParent, void 0, rowCss), ...others, "data-gridrow": true, ...getCount(row.id), ref, children: isKeptGroupRow ? /* @__PURE__ */ jsx28(KeptGroupRow, { as, style, columnSizes, row, colSpan: columns.length, isLastBodyRow }) : columns.map((column2, columnIndex) => {
|
|
7907
7936
|
const maybeExpandedColumn = expandColumnHidden ? columns[columnIndex - 1] : column2;
|
|
@@ -8264,7 +8293,7 @@ function TextFieldBase(props) {
|
|
|
8264
8293
|
const errorMessageId = `${inputProps.id}-error`;
|
|
8265
8294
|
const labelSuffix = useLabelSuffix(required, inputProps.readOnly);
|
|
8266
8295
|
const tid = useTestIds(props, defaultTestId(label));
|
|
8267
|
-
const [isFocused, setIsFocused] =
|
|
8296
|
+
const [isFocused, setIsFocused] = useState11(false);
|
|
8268
8297
|
const {
|
|
8269
8298
|
hoverProps,
|
|
8270
8299
|
isHovered
|
|
@@ -8670,7 +8699,7 @@ var textFieldBaseMultilineTopPadding = 11;
|
|
|
8670
8699
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
8671
8700
|
function MenuSearchField(props) {
|
|
8672
8701
|
const tid = useTestIds(props);
|
|
8673
|
-
const inputRef =
|
|
8702
|
+
const inputRef = useRef11(null);
|
|
8674
8703
|
const { labelProps, inputProps } = useTextField({ ...props }, inputRef);
|
|
8675
8704
|
return /* @__PURE__ */ jsx31(
|
|
8676
8705
|
TextFieldBase,
|
|
@@ -8705,7 +8734,7 @@ function Menu(props) {
|
|
|
8705
8734
|
getKey: (item) => camelCase(item.label),
|
|
8706
8735
|
getChildren: (item) => item.items ?? []
|
|
8707
8736
|
});
|
|
8708
|
-
const [search, setSearch] =
|
|
8737
|
+
const [search, setSearch] = useState12(void 0);
|
|
8709
8738
|
const {
|
|
8710
8739
|
contains
|
|
8711
8740
|
} = useFilter2({
|
|
@@ -8754,7 +8783,7 @@ function Menu(props) {
|
|
|
8754
8783
|
keys !== "all" && onChange && onChange([...keys.values()].map((k) => k.toString())[0]);
|
|
8755
8784
|
}
|
|
8756
8785
|
});
|
|
8757
|
-
const menuRef =
|
|
8786
|
+
const menuRef = useRef12(null);
|
|
8758
8787
|
const {
|
|
8759
8788
|
menuProps
|
|
8760
8789
|
} = useMenu({
|
|
@@ -8795,12 +8824,12 @@ function Menu(props) {
|
|
|
8795
8824
|
}
|
|
8796
8825
|
|
|
8797
8826
|
// src/components/internal/MenuItem.tsx
|
|
8798
|
-
import { useRef as
|
|
8827
|
+
import { useRef as useRef15 } from "react";
|
|
8799
8828
|
import { useHover as useHover7, useMenuItem } from "react-aria";
|
|
8800
8829
|
import { Link as Link3, useNavigate } from "react-router-dom";
|
|
8801
8830
|
|
|
8802
8831
|
// src/components/Avatar/Avatar.tsx
|
|
8803
|
-
import { useState as
|
|
8832
|
+
import { useState as useState13 } from "react";
|
|
8804
8833
|
import { trussProps as trussProps22 } from "@homebound/truss/runtime";
|
|
8805
8834
|
import { jsx as jsx33, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
8806
8835
|
var __typography4 = {
|
|
@@ -8870,7 +8899,7 @@ function Avatar({
|
|
|
8870
8899
|
}) {
|
|
8871
8900
|
const tid = useTestIds(others, "avatar");
|
|
8872
8901
|
const px2 = sizeToPixel[size];
|
|
8873
|
-
const [showFallback, setShowFallback] =
|
|
8902
|
+
const [showFallback, setShowFallback] = useState13(src === void 0);
|
|
8874
8903
|
const styles = {
|
|
8875
8904
|
borderRadius: "br100",
|
|
8876
8905
|
width: ["w_var", {
|
|
@@ -9049,16 +9078,16 @@ var pressedOverlayCss = {
|
|
|
9049
9078
|
};
|
|
9050
9079
|
|
|
9051
9080
|
// src/components/ButtonModal.tsx
|
|
9052
|
-
import { useRef as
|
|
9081
|
+
import { useRef as useRef14 } from "react";
|
|
9053
9082
|
import { useMenuTrigger } from "react-aria";
|
|
9054
9083
|
import { useMenuTriggerState } from "react-stately";
|
|
9055
9084
|
|
|
9056
9085
|
// src/components/internal/OverlayTrigger.tsx
|
|
9057
|
-
import { useMemo as useMemo13, useRef as
|
|
9086
|
+
import { useMemo as useMemo13, useRef as useRef13 } from "react";
|
|
9058
9087
|
import { useOverlayPosition } from "react-aria";
|
|
9059
9088
|
|
|
9060
9089
|
// src/components/Button.tsx
|
|
9061
|
-
import { useMemo as useMemo11, useState as
|
|
9090
|
+
import { useMemo as useMemo11, useState as useState14 } from "react";
|
|
9062
9091
|
import { useButton as useButton3, useFocusRing as useFocusRing3, useHover as useHover5 } from "react-aria";
|
|
9063
9092
|
import { mergeProps as mergeProps8, maybeCssVar as maybeCssVar16 } from "@homebound/truss/runtime";
|
|
9064
9093
|
import { Fragment as Fragment12, jsx as jsx35, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
@@ -9078,7 +9107,7 @@ function Button(props) {
|
|
|
9078
9107
|
} = props;
|
|
9079
9108
|
const asLink = typeof onPress === "string";
|
|
9080
9109
|
const showExternalLinkIcon = asLink && isAbsoluteUrl(onPress) || openInNew;
|
|
9081
|
-
const [asyncInProgress, setAsyncInProgress] =
|
|
9110
|
+
const [asyncInProgress, setAsyncInProgress] = useState14(false);
|
|
9082
9111
|
const isDisabled = !!disabled;
|
|
9083
9112
|
const ariaProps = {
|
|
9084
9113
|
onPress,
|
|
@@ -9713,7 +9742,7 @@ function OverlayTrigger(props) {
|
|
|
9713
9742
|
}
|
|
9714
9743
|
}
|
|
9715
9744
|
}), [menuTriggerProps, state]);
|
|
9716
|
-
const popoverRef =
|
|
9745
|
+
const popoverRef = useRef13(null);
|
|
9717
9746
|
const {
|
|
9718
9747
|
overlayProps: positionProps
|
|
9719
9748
|
} = useOverlayPosition({
|
|
@@ -9775,7 +9804,7 @@ import { jsx as jsx39 } from "react/jsx-runtime";
|
|
|
9775
9804
|
function ButtonModal(props) {
|
|
9776
9805
|
const { storybookDefaultOpen, trigger, disabled, content, title } = props;
|
|
9777
9806
|
const state = useMenuTriggerState({ isOpen: storybookDefaultOpen });
|
|
9778
|
-
const buttonRef =
|
|
9807
|
+
const buttonRef = useRef14(null);
|
|
9779
9808
|
const { menuTriggerProps } = useMenuTrigger({ isDisabled: !!disabled }, state, buttonRef);
|
|
9780
9809
|
const tid = useTestIds(
|
|
9781
9810
|
props,
|
|
@@ -9846,7 +9875,7 @@ function MenuItemImpl(props) {
|
|
|
9846
9875
|
onClose
|
|
9847
9876
|
} = props;
|
|
9848
9877
|
const menuItem = item.value;
|
|
9849
|
-
const ref =
|
|
9878
|
+
const ref = useRef15(null);
|
|
9850
9879
|
const navigate = useNavigate();
|
|
9851
9880
|
const {
|
|
9852
9881
|
hoverProps,
|
|
@@ -10040,20 +10069,20 @@ function Popover(props) {
|
|
|
10040
10069
|
}
|
|
10041
10070
|
|
|
10042
10071
|
// src/inputs/internal/ComboBoxBase.tsx
|
|
10043
|
-
import { useCallback as
|
|
10072
|
+
import { useCallback as useCallback10, useEffect as useEffect14, useMemo as useMemo16, useRef as useRef24, useState as useState20 } from "react";
|
|
10044
10073
|
import { useButton as useButton7, useComboBox as useComboBox2, useFilter as useFilter4, useOverlayPosition as useOverlayPosition4 } from "react-aria";
|
|
10045
10074
|
import { Item as Item4, useComboBoxState as useComboBoxState2 } from "react-stately";
|
|
10046
10075
|
import { trussProps as trussProps39, maybeCssVar as maybeCssVar24 } from "@homebound/truss/runtime";
|
|
10047
10076
|
|
|
10048
10077
|
// src/inputs/internal/ComboBoxInput.tsx
|
|
10049
|
-
import { useState as
|
|
10078
|
+
import { useState as useState19 } from "react";
|
|
10050
10079
|
import { mergeProps as mergeProps14 } from "react-aria";
|
|
10051
10080
|
|
|
10052
10081
|
// src/inputs/hooks/useGrowingTextField.tsx
|
|
10053
|
-
import { useLayoutEffect } from "@react-aria/utils";
|
|
10054
|
-
import { useCallback as
|
|
10082
|
+
import { useLayoutEffect as useLayoutEffect2 } from "@react-aria/utils";
|
|
10083
|
+
import { useCallback as useCallback8 } from "react";
|
|
10055
10084
|
function useGrowingTextField({ inputRef, inputWrapRef, value, disabled, maxLines }) {
|
|
10056
|
-
const getLineHeight =
|
|
10085
|
+
const getLineHeight = useCallback8((element) => {
|
|
10057
10086
|
const computedStyle = window.getComputedStyle(element);
|
|
10058
10087
|
const lineHeight = computedStyle.lineHeight;
|
|
10059
10088
|
if (lineHeight === "normal") {
|
|
@@ -10062,7 +10091,7 @@ function useGrowingTextField({ inputRef, inputWrapRef, value, disabled, maxLines
|
|
|
10062
10091
|
}
|
|
10063
10092
|
return parseFloat(lineHeight);
|
|
10064
10093
|
}, []);
|
|
10065
|
-
const onHeightChange =
|
|
10094
|
+
const onHeightChange = useCallback8(() => {
|
|
10066
10095
|
if (disabled) return;
|
|
10067
10096
|
const input = inputRef.current;
|
|
10068
10097
|
const inputWrap = inputWrapRef.current;
|
|
@@ -10091,7 +10120,7 @@ function useGrowingTextField({ inputRef, inputWrapRef, value, disabled, maxLines
|
|
|
10091
10120
|
input.style.alignSelf = prevAlignment;
|
|
10092
10121
|
}
|
|
10093
10122
|
}, [inputRef, disabled, inputWrapRef, maxLines, getLineHeight]);
|
|
10094
|
-
|
|
10123
|
+
useLayoutEffect2(() => {
|
|
10095
10124
|
if (disabled) {
|
|
10096
10125
|
if (inputWrapRef.current) {
|
|
10097
10126
|
inputWrapRef.current.style.removeProperty("height");
|
|
@@ -10110,13 +10139,13 @@ function useGrowingTextField({ inputRef, inputWrapRef, value, disabled, maxLines
|
|
|
10110
10139
|
}
|
|
10111
10140
|
|
|
10112
10141
|
// src/inputs/TreeSelectField/TreeSelectField.tsx
|
|
10113
|
-
import React9, { useCallback as
|
|
10142
|
+
import React9, { useCallback as useCallback9, useContext as useContext12, useEffect as useEffect13, useMemo as useMemo15, useRef as useRef23, useState as useState18 } from "react";
|
|
10114
10143
|
import { useButton as useButton6, useComboBox, useFilter as useFilter3, useOverlayPosition as useOverlayPosition3 } from "react-aria";
|
|
10115
10144
|
import { Item as Item3, useComboBoxState } from "react-stately";
|
|
10116
10145
|
import { trussProps as trussProps37, maybeCssVar as maybeCssVar23 } from "@homebound/truss/runtime";
|
|
10117
10146
|
|
|
10118
10147
|
// src/inputs/internal/ListBox.tsx
|
|
10119
|
-
import { useEffect as useEffect12, useRef as
|
|
10148
|
+
import { useEffect as useEffect12, useRef as useRef22, useState as useState17 } from "react";
|
|
10120
10149
|
import { useListBox } from "react-aria";
|
|
10121
10150
|
|
|
10122
10151
|
// src/inputs/internal/constants.ts
|
|
@@ -10128,17 +10157,17 @@ import { useListBoxSection, useSeparator as useSeparator2 } from "react-aria";
|
|
|
10128
10157
|
import { trussProps as trussProps35 } from "@homebound/truss/runtime";
|
|
10129
10158
|
|
|
10130
10159
|
// src/inputs/internal/Option.tsx
|
|
10131
|
-
import { useRef as
|
|
10160
|
+
import { useRef as useRef18 } from "react";
|
|
10132
10161
|
import { mergeProps as mergeProps12, useHover as useHover8, useOption } from "react-aria";
|
|
10133
10162
|
|
|
10134
10163
|
// src/inputs/ChipSelectField.tsx
|
|
10135
10164
|
import { camelCase as camelCase2 } from "change-case";
|
|
10136
|
-
import { useEffect as useEffect10, useMemo as useMemo14, useRef as
|
|
10165
|
+
import { useEffect as useEffect10, useMemo as useMemo14, useRef as useRef17, useState as useState16 } from "react";
|
|
10137
10166
|
import { mergeProps as mergeProps11, useButton as useButton5, useFocus as useFocus2, useOverlayPosition as useOverlayPosition2, useSelect } from "react-aria";
|
|
10138
10167
|
import { Item as Item2, Section as Section2, useListData, useSelectState } from "react-stately";
|
|
10139
10168
|
|
|
10140
10169
|
// src/inputs/ChipTextField.tsx
|
|
10141
|
-
import { useEffect as useEffect9, useRef as
|
|
10170
|
+
import { useEffect as useEffect9, useRef as useRef16, useState as useState15 } from "react";
|
|
10142
10171
|
import { useFocus } from "react-aria";
|
|
10143
10172
|
import { trussProps as trussProps28 } from "@homebound/truss/runtime";
|
|
10144
10173
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
@@ -10157,9 +10186,9 @@ function ChipTextField(props) {
|
|
|
10157
10186
|
const {
|
|
10158
10187
|
fieldProps
|
|
10159
10188
|
} = usePresentationContext();
|
|
10160
|
-
const valueRef =
|
|
10189
|
+
const valueRef = useRef16(value);
|
|
10161
10190
|
const tid = useTestIds(props, "chipField");
|
|
10162
|
-
const [isFocused, setIsFocused] =
|
|
10191
|
+
const [isFocused, setIsFocused] = useState15(false);
|
|
10163
10192
|
const {
|
|
10164
10193
|
focusProps
|
|
10165
10194
|
} = useFocus({
|
|
@@ -10178,7 +10207,7 @@ function ChipTextField(props) {
|
|
|
10178
10207
|
onBlur: () => maybeCall(onBlur),
|
|
10179
10208
|
onFocusChange: setIsFocused
|
|
10180
10209
|
});
|
|
10181
|
-
const fieldRef =
|
|
10210
|
+
const fieldRef = useRef16(null);
|
|
10182
10211
|
useEffect9(
|
|
10183
10212
|
() => {
|
|
10184
10213
|
autoFocus && fieldRef.current?.focus();
|
|
@@ -10285,7 +10314,7 @@ function defaultOptionLabel(opt) {
|
|
|
10285
10314
|
import { trussProps as trussProps30, maybeCssVar as maybeCssVar19 } from "@homebound/truss/runtime";
|
|
10286
10315
|
import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
10287
10316
|
function ChipSelectField(props) {
|
|
10288
|
-
const firstRender =
|
|
10317
|
+
const firstRender = useRef17(true);
|
|
10289
10318
|
const {
|
|
10290
10319
|
fieldProps
|
|
10291
10320
|
} = usePresentationContext();
|
|
@@ -10318,8 +10347,8 @@ function ChipSelectField(props) {
|
|
|
10318
10347
|
alignItems: "aiStretch"
|
|
10319
10348
|
}
|
|
10320
10349
|
};
|
|
10321
|
-
const [visualFocus, setVisualFocus] =
|
|
10322
|
-
const [isClearFocused, setIsClearFocused] =
|
|
10350
|
+
const [visualFocus, setVisualFocus] = useState16(false);
|
|
10351
|
+
const [isClearFocused, setIsClearFocused] = useState16(false);
|
|
10323
10352
|
const {
|
|
10324
10353
|
focusProps
|
|
10325
10354
|
} = useFocus2({
|
|
@@ -10343,10 +10372,10 @@ function ChipSelectField(props) {
|
|
|
10343
10372
|
} = useFocus2({
|
|
10344
10373
|
onFocusChange: setIsClearFocused
|
|
10345
10374
|
});
|
|
10346
|
-
const buttonRef =
|
|
10347
|
-
const popoverRef =
|
|
10348
|
-
const listBoxRef =
|
|
10349
|
-
const wrapperRef =
|
|
10375
|
+
const buttonRef = useRef17(null);
|
|
10376
|
+
const popoverRef = useRef17(null);
|
|
10377
|
+
const listBoxRef = useRef17(null);
|
|
10378
|
+
const wrapperRef = useRef17(null);
|
|
10350
10379
|
const listData = useListData({
|
|
10351
10380
|
initialItems: !onCreateNew ? options : [{
|
|
10352
10381
|
title: "Options",
|
|
@@ -10451,7 +10480,7 @@ function ChipSelectField(props) {
|
|
|
10451
10480
|
// Ensures the menu never gets too small.
|
|
10452
10481
|
minWidth: 200
|
|
10453
10482
|
};
|
|
10454
|
-
const [showInput, setShowInput] =
|
|
10483
|
+
const [showInput, setShowInput] = useState16(false);
|
|
10455
10484
|
return /* @__PURE__ */ jsxs29(Fragment15, { children: [
|
|
10456
10485
|
showInput && onCreateNew && /* @__PURE__ */ jsx46(CreateNewField, { onBlur: () => setShowInput(false), onEnter: async (value2) => {
|
|
10457
10486
|
await onCreateNew(value2);
|
|
@@ -10534,7 +10563,7 @@ function CreateNewField(props) {
|
|
|
10534
10563
|
onBlur,
|
|
10535
10564
|
onEnter
|
|
10536
10565
|
} = props;
|
|
10537
|
-
const [value, setValue] =
|
|
10566
|
+
const [value, setValue] = useState16("Add new");
|
|
10538
10567
|
const tid = useTestIds(props);
|
|
10539
10568
|
return /* @__PURE__ */ jsx46(ChipTextField, { autoFocus: true, label: "Add new", value, onChange: setValue, onEnter: () => onEnter(value), onBlur, ...tid });
|
|
10540
10569
|
}
|
|
@@ -10549,7 +10578,7 @@ function Option(props) {
|
|
|
10549
10578
|
scrollToIndex,
|
|
10550
10579
|
disabledReason
|
|
10551
10580
|
} = props;
|
|
10552
|
-
const ref =
|
|
10581
|
+
const ref = useRef18(null);
|
|
10553
10582
|
const {
|
|
10554
10583
|
hoverProps,
|
|
10555
10584
|
isHovered
|
|
@@ -10625,7 +10654,7 @@ function Option(props) {
|
|
|
10625
10654
|
|
|
10626
10655
|
// src/inputs/internal/VirtualizedOptions.tsx
|
|
10627
10656
|
import { getInteractionModality } from "@react-aria/interactions";
|
|
10628
|
-
import { useEffect as useEffect11, useRef as
|
|
10657
|
+
import { useEffect as useEffect11, useRef as useRef21 } from "react";
|
|
10629
10658
|
import { Virtuoso } from "react-virtuoso";
|
|
10630
10659
|
|
|
10631
10660
|
// src/inputs/internal/LoadingDots.tsx
|
|
@@ -10669,11 +10698,11 @@ function LoadingDots() {
|
|
|
10669
10698
|
}
|
|
10670
10699
|
|
|
10671
10700
|
// src/inputs/TreeSelectField/TreeOption.tsx
|
|
10672
|
-
import { useRef as
|
|
10701
|
+
import { useRef as useRef20 } from "react";
|
|
10673
10702
|
import { useHover as useHover10, useOption as useOption2 } from "react-aria";
|
|
10674
10703
|
|
|
10675
10704
|
// src/inputs/CheckboxBase.tsx
|
|
10676
|
-
import { useRef as
|
|
10705
|
+
import { useRef as useRef19 } from "react";
|
|
10677
10706
|
import { mergeProps as mergeProps13, useFocusRing as useFocusRing5, useHover as useHover9, VisuallyHidden as VisuallyHidden3 } from "react-aria";
|
|
10678
10707
|
import { trussProps as trussProps33, maybeCssVar as maybeCssVar21 } from "@homebound/truss/runtime";
|
|
10679
10708
|
import { jsx as jsx49, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
@@ -10692,7 +10721,7 @@ function CheckboxBase(props) {
|
|
|
10692
10721
|
tooltip,
|
|
10693
10722
|
fullWidth = false
|
|
10694
10723
|
} = props;
|
|
10695
|
-
const ref =
|
|
10724
|
+
const ref = useRef19(null);
|
|
10696
10725
|
const {
|
|
10697
10726
|
isFocusVisible,
|
|
10698
10727
|
focusProps
|
|
@@ -10836,7 +10865,7 @@ function TreeOption(props) {
|
|
|
10836
10865
|
const leveledOption = item.value;
|
|
10837
10866
|
if (!leveledOption) return null;
|
|
10838
10867
|
const [option, level] = leveledOption;
|
|
10839
|
-
const ref =
|
|
10868
|
+
const ref = useRef20(null);
|
|
10840
10869
|
const {
|
|
10841
10870
|
hoverProps,
|
|
10842
10871
|
isHovered
|
|
@@ -10982,7 +11011,7 @@ function VirtualizedOptions(props) {
|
|
|
10982
11011
|
isTree,
|
|
10983
11012
|
allowCollapsing
|
|
10984
11013
|
} = props;
|
|
10985
|
-
const virtuosoRef =
|
|
11014
|
+
const virtuosoRef = useRef21(null);
|
|
10986
11015
|
const focusedKey = state.selectionManager.focusedKey;
|
|
10987
11016
|
const focusedItem = focusedKey != null ? state.collection.getItem(focusedKey) : null;
|
|
10988
11017
|
const selectedItem = state.selectionManager.selectedKeys.size > 0 ? state.collection.getItem([...state.selectionManager.selectedKeys.values()][0]) : void 0;
|
|
@@ -11131,13 +11160,13 @@ function ListBox(props) {
|
|
|
11131
11160
|
}, state, listBoxRef);
|
|
11132
11161
|
const positionMaxHeight = positionProps.style?.maxHeight;
|
|
11133
11162
|
const popoverMaxHeight = positionMaxHeight && typeof positionMaxHeight === "number" ? Math.min(positionMaxHeight, maxPopoverHeight) : maxPopoverHeight;
|
|
11134
|
-
const [popoverHeight, setPopoverHeight] =
|
|
11163
|
+
const [popoverHeight, setPopoverHeight] = useState17(popoverMaxHeight);
|
|
11135
11164
|
const isMultiSelect = state.selectionManager.selectionMode === "multiple";
|
|
11136
11165
|
const firstItem = state.collection.at(0);
|
|
11137
11166
|
const hasSections = firstItem && firstItem.type === "section";
|
|
11138
|
-
const selectedList =
|
|
11139
|
-
const firstRender =
|
|
11140
|
-
const virtuosoListHeight =
|
|
11167
|
+
const selectedList = useRef22(null);
|
|
11168
|
+
const firstRender = useRef22(true);
|
|
11169
|
+
const virtuosoListHeight = useRef22(0);
|
|
11141
11170
|
const onListHeightChange = (listHeight) => {
|
|
11142
11171
|
virtuosoListHeight.current = listHeight;
|
|
11143
11172
|
const height = (selectedList.current?.offsetHeight || 0) + listHeight;
|
|
@@ -11214,7 +11243,7 @@ function TreeSelectField(props) {
|
|
|
11214
11243
|
defaultCollapsed = false,
|
|
11215
11244
|
...otherProps
|
|
11216
11245
|
} = props;
|
|
11217
|
-
const [collapsedKeys, setCollapsedKeys] =
|
|
11246
|
+
const [collapsedKeys, setCollapsedKeys] = useState18([]);
|
|
11218
11247
|
const groupKeys = useMemo15(() => props.groupOptions?.map((option) => valueToKey(option)) ?? [], [props.groupOptions]);
|
|
11219
11248
|
useEffect13(() => {
|
|
11220
11249
|
setCollapsedKeys(!Array.isArray(options) ? [] : defaultCollapsed ? options.map((o) => getOptionValue(o)) : options.flatMap(flattenOptions).filter((o) => o.defaultCollapsed).map((o) => getOptionValue(o)));
|
|
@@ -11292,7 +11321,7 @@ function TreeSelectFieldBase(props) {
|
|
|
11292
11321
|
const groupKeySet = useMemo15(() => new Set(groupKeys), [groupKeys]);
|
|
11293
11322
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
11294
11323
|
const disabledKeys = [.../* @__PURE__ */ new Set([...Object.keys(disabledOptionsWithReasons), ...groupKeys])];
|
|
11295
|
-
const initTreeFieldState =
|
|
11324
|
+
const initTreeFieldState = useCallback9(() => {
|
|
11296
11325
|
const selectedKeys = new Set(values?.flatMap((v) => {
|
|
11297
11326
|
const foundOptions = findOptions(initialOptions, valueToKey(v), getOptionValue);
|
|
11298
11327
|
return foundOptions.flatMap(({
|
|
@@ -11332,7 +11361,7 @@ function TreeSelectFieldBase(props) {
|
|
|
11332
11361
|
allowCollapsing: true
|
|
11333
11362
|
};
|
|
11334
11363
|
}, [initialOptions, values, chipDisplay, getOptionLabel, isReadOnly, nothingSelectedText, getOptionValue, groupKeySet]);
|
|
11335
|
-
const [fieldState, setFieldState] =
|
|
11364
|
+
const [fieldState, setFieldState] = useState18(() => initTreeFieldState());
|
|
11336
11365
|
useEffect13(() => {
|
|
11337
11366
|
if (Array.isArray(options)) {
|
|
11338
11367
|
setFieldState((prevState) => ({
|
|
@@ -11352,7 +11381,7 @@ function TreeSelectFieldBase(props) {
|
|
|
11352
11381
|
}
|
|
11353
11382
|
}, [getOptionValue, initTreeFieldState, values]);
|
|
11354
11383
|
const filteredOptions = useMemo15(() => getFilteredOptions(fieldState.allOptions, fieldState.searchValue, collapsedKeys, contains, getOptionLabel, getOptionValue), [fieldState.allOptions, fieldState.searchValue, collapsedKeys, contains, getOptionLabel, getOptionValue]);
|
|
11355
|
-
const onInputChange =
|
|
11384
|
+
const onInputChange = useCallback9((inputValue) => {
|
|
11356
11385
|
setFieldState((prevState) => {
|
|
11357
11386
|
return {
|
|
11358
11387
|
...prevState,
|
|
@@ -11362,7 +11391,7 @@ function TreeSelectFieldBase(props) {
|
|
|
11362
11391
|
};
|
|
11363
11392
|
});
|
|
11364
11393
|
}, []);
|
|
11365
|
-
const maybeInitLoad =
|
|
11394
|
+
const maybeInitLoad = useCallback9(async (options2, setFieldState2) => {
|
|
11366
11395
|
if (!Array.isArray(options2)) {
|
|
11367
11396
|
setFieldState2((prevState) => ({
|
|
11368
11397
|
...prevState,
|
|
@@ -11376,7 +11405,7 @@ function TreeSelectFieldBase(props) {
|
|
|
11376
11405
|
}));
|
|
11377
11406
|
}
|
|
11378
11407
|
}, []);
|
|
11379
|
-
const firstOpen =
|
|
11408
|
+
const firstOpen = useRef23(true);
|
|
11380
11409
|
function onOpenChange(isOpen) {
|
|
11381
11410
|
if (firstOpen.current && isOpen) {
|
|
11382
11411
|
maybeInitLoad(options, setFieldState);
|
|
@@ -11391,7 +11420,7 @@ function TreeSelectFieldBase(props) {
|
|
|
11391
11420
|
}));
|
|
11392
11421
|
}
|
|
11393
11422
|
}
|
|
11394
|
-
const comboBoxChildren =
|
|
11423
|
+
const comboBoxChildren = useCallback9(([item]) => /* @__PURE__ */ jsx55(Item3, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item))), [getOptionValue, getOptionLabel, getOptionMenuLabel]);
|
|
11395
11424
|
const comboBoxProps = {
|
|
11396
11425
|
...otherProps,
|
|
11397
11426
|
disabledKeys,
|
|
@@ -11537,12 +11566,12 @@ function TreeSelectFieldBase(props) {
|
|
|
11537
11566
|
}));
|
|
11538
11567
|
}
|
|
11539
11568
|
}
|
|
11540
|
-
const comboBoxRef =
|
|
11541
|
-
const triggerRef =
|
|
11542
|
-
const inputRef =
|
|
11543
|
-
const inputWrapRef =
|
|
11544
|
-
const listBoxRef =
|
|
11545
|
-
const popoverRef =
|
|
11569
|
+
const comboBoxRef = useRef23(null);
|
|
11570
|
+
const triggerRef = useRef23(null);
|
|
11571
|
+
const inputRef = useRef23(null);
|
|
11572
|
+
const inputWrapRef = useRef23(null);
|
|
11573
|
+
const listBoxRef = useRef23(null);
|
|
11574
|
+
const popoverRef = useRef23(null);
|
|
11546
11575
|
const {
|
|
11547
11576
|
buttonProps: triggerProps,
|
|
11548
11577
|
inputProps,
|
|
@@ -11688,7 +11717,7 @@ function ComboBoxInput(props) {
|
|
|
11688
11717
|
collapsedKeys,
|
|
11689
11718
|
setCollapsedKeys
|
|
11690
11719
|
} = useTreeSelectFieldProvider();
|
|
11691
|
-
const [isFocused, setIsFocused] =
|
|
11720
|
+
const [isFocused, setIsFocused] = useState19(false);
|
|
11692
11721
|
const isMultiSelect = state.selectionManager.selectionMode === "multiple";
|
|
11693
11722
|
const showChipSelection = isMultiSelect && state.selectionManager.selectedKeys.size > 0;
|
|
11694
11723
|
const showFieldDecoration = (!isMultiSelect || isMultiSelect && !isFocused) && fieldDecoration && selectedOptions.length === 1;
|
|
@@ -11834,19 +11863,19 @@ function ComboBoxBase(props) {
|
|
|
11834
11863
|
...otherProps
|
|
11835
11864
|
} = props;
|
|
11836
11865
|
const labelStyle = otherProps.labelStyle ?? fieldProps?.labelStyle ?? "above";
|
|
11837
|
-
const getOptionLabel =
|
|
11866
|
+
const getOptionLabel = useCallback10(
|
|
11838
11867
|
(o) => unsetLabel && o === unsetOption ? unsetLabel : onAddNew && o === addNewOption ? addNewOption.name : propOptionLabel(o),
|
|
11839
11868
|
// propOptionLabel is basically always a lambda, so don't dep on it
|
|
11840
11869
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11841
11870
|
[unsetLabel]
|
|
11842
11871
|
);
|
|
11843
|
-
const getOptionValue =
|
|
11872
|
+
const getOptionValue = useCallback10(
|
|
11844
11873
|
(o) => unsetLabel && o === unsetOption ? void 0 : onAddNew && o === addNewOption ? addNewOption.id : propOptionValue(o),
|
|
11845
11874
|
// propOptionValue is basically always a lambda, so don't dep on it
|
|
11846
11875
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
11847
11876
|
[unsetLabel]
|
|
11848
11877
|
);
|
|
11849
|
-
const getOptionMenuLabel =
|
|
11878
|
+
const getOptionMenuLabel = useCallback10(
|
|
11850
11879
|
(o) => propOptionMenuLabel ? propOptionMenuLabel(o, Boolean(unsetLabel) && o === unsetOption, Boolean(onAddNew) && o === addNewOption) : getOptionLabel(o),
|
|
11851
11880
|
// propOptionMenuLabel is basically always a lambda, so don't dep on it
|
|
11852
11881
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -11869,7 +11898,7 @@ function ComboBoxBase(props) {
|
|
|
11869
11898
|
});
|
|
11870
11899
|
const isDisabled = !!disabled;
|
|
11871
11900
|
const isReadOnly = !!readOnly;
|
|
11872
|
-
const [fieldState, setFieldState] =
|
|
11901
|
+
const [fieldState, setFieldState] = useState20(() => {
|
|
11873
11902
|
return {
|
|
11874
11903
|
inputValue: getInputValue(selectedOptions, getOptionLabel, multiselect, nothingSelectedText, isReadOnly),
|
|
11875
11904
|
searchValue: void 0,
|
|
@@ -11910,7 +11939,7 @@ function ComboBoxBase(props) {
|
|
|
11910
11939
|
}));
|
|
11911
11940
|
}
|
|
11912
11941
|
}
|
|
11913
|
-
const firstOpen =
|
|
11942
|
+
const firstOpen = useRef24(true);
|
|
11914
11943
|
function onOpenChange(isOpen) {
|
|
11915
11944
|
if (firstOpen.current && isOpen) {
|
|
11916
11945
|
maybeInitLoad();
|
|
@@ -11923,14 +11952,14 @@ function ComboBoxBase(props) {
|
|
|
11923
11952
|
}));
|
|
11924
11953
|
}
|
|
11925
11954
|
}
|
|
11926
|
-
const comboBoxRef =
|
|
11927
|
-
const triggerRef =
|
|
11928
|
-
const inputRef =
|
|
11929
|
-
const inputWrapRef =
|
|
11930
|
-
const listBoxRef =
|
|
11931
|
-
const popoverRef =
|
|
11955
|
+
const comboBoxRef = useRef24(null);
|
|
11956
|
+
const triggerRef = useRef24(null);
|
|
11957
|
+
const inputRef = useRef24(null);
|
|
11958
|
+
const inputWrapRef = useRef24(null);
|
|
11959
|
+
const listBoxRef = useRef24(null);
|
|
11960
|
+
const popoverRef = useRef24(null);
|
|
11932
11961
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
11933
|
-
const comboBoxChildren =
|
|
11962
|
+
const comboBoxChildren = useCallback10((item) => /* @__PURE__ */ jsx57(Item4, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item))), [getOptionValue, getOptionLabel, getOptionMenuLabel]);
|
|
11934
11963
|
const selectedKeys = useMemo16(() => {
|
|
11935
11964
|
return selectedOptions.map((o) => valueToKey(getOptionValue(o)));
|
|
11936
11965
|
}, [selectedOptions, getOptionValue]);
|
|
@@ -12138,7 +12167,7 @@ function Autocomplete(props) {
|
|
|
12138
12167
|
...others
|
|
12139
12168
|
} = props;
|
|
12140
12169
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
12141
|
-
const comboBoxChildren =
|
|
12170
|
+
const comboBoxChildren = useCallback11(
|
|
12142
12171
|
(item) => /* @__PURE__ */ jsx58(Item5, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
|
|
12143
12172
|
[getOptionValue, getOptionLabel, getOptionMenuLabel]
|
|
12144
12173
|
);
|
|
@@ -12162,10 +12191,10 @@ function Autocomplete(props) {
|
|
|
12162
12191
|
...others
|
|
12163
12192
|
};
|
|
12164
12193
|
const state = useComboBoxState3(comboBoxProps);
|
|
12165
|
-
const inputWrapRef =
|
|
12166
|
-
const inputRef =
|
|
12167
|
-
const listBoxRef =
|
|
12168
|
-
const popoverRef =
|
|
12194
|
+
const inputWrapRef = useRef25(null);
|
|
12195
|
+
const inputRef = useRef25(null);
|
|
12196
|
+
const listBoxRef = useRef25(null);
|
|
12197
|
+
const popoverRef = useRef25(null);
|
|
12169
12198
|
const { inputProps, listBoxProps, labelProps } = useComboBox3(
|
|
12170
12199
|
{
|
|
12171
12200
|
...comboBoxProps,
|
|
@@ -12232,7 +12261,7 @@ function Autocomplete(props) {
|
|
|
12232
12261
|
}
|
|
12233
12262
|
|
|
12234
12263
|
// src/inputs/Checkbox.tsx
|
|
12235
|
-
import { useRef as
|
|
12264
|
+
import { useRef as useRef26 } from "react";
|
|
12236
12265
|
import { useCheckbox } from "react-aria";
|
|
12237
12266
|
import { useToggleState } from "react-stately";
|
|
12238
12267
|
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
@@ -12242,7 +12271,7 @@ function Checkbox(props) {
|
|
|
12242
12271
|
const isIndeterminate = selected === "indeterminate";
|
|
12243
12272
|
const ariaProps = { isSelected, isDisabled: !!disabled, isIndeterminate, ...otherProps };
|
|
12244
12273
|
const checkboxProps = { ...ariaProps, "aria-label": label };
|
|
12245
|
-
const ref =
|
|
12274
|
+
const ref = useRef26(null);
|
|
12246
12275
|
const toggleState = useToggleState(ariaProps);
|
|
12247
12276
|
const { inputProps } = useCheckbox(checkboxProps, toggleState, ref);
|
|
12248
12277
|
return /* @__PURE__ */ jsx59(
|
|
@@ -12261,7 +12290,7 @@ function Checkbox(props) {
|
|
|
12261
12290
|
}
|
|
12262
12291
|
|
|
12263
12292
|
// src/inputs/CheckboxGroup.tsx
|
|
12264
|
-
import { useRef as
|
|
12293
|
+
import { useRef as useRef27 } from "react";
|
|
12265
12294
|
import { useCheckboxGroup, useCheckboxGroupItem } from "react-aria";
|
|
12266
12295
|
import { useCheckboxGroupState } from "react-stately";
|
|
12267
12296
|
import { trussProps as trussProps40, maybeCssVar as maybeCssVar25 } from "@homebound/truss/runtime";
|
|
@@ -12336,7 +12365,7 @@ function CheckboxGroupItem(props) {
|
|
|
12336
12365
|
...ariaProps,
|
|
12337
12366
|
"aria-label": label
|
|
12338
12367
|
};
|
|
12339
|
-
const ref =
|
|
12368
|
+
const ref = useRef27(null);
|
|
12340
12369
|
const {
|
|
12341
12370
|
inputProps
|
|
12342
12371
|
} = useCheckboxGroupItem(checkboxProps, groupState, ref);
|
|
@@ -12344,7 +12373,7 @@ function CheckboxGroupItem(props) {
|
|
|
12344
12373
|
}
|
|
12345
12374
|
|
|
12346
12375
|
// src/inputs/DateFields/DateField.mock.tsx
|
|
12347
|
-
import { useState as
|
|
12376
|
+
import { useState as useState21 } from "react";
|
|
12348
12377
|
|
|
12349
12378
|
// src/inputs/DateFields/utils.ts
|
|
12350
12379
|
import { Temporal as Temporal3 } from "temporal-polyfill";
|
|
@@ -12431,7 +12460,7 @@ import { jsx as jsx61 } from "react/jsx-runtime";
|
|
|
12431
12460
|
function DateFieldMock(props) {
|
|
12432
12461
|
const { onChange = () => {
|
|
12433
12462
|
}, errorMsg, onBlur, onFocus } = props;
|
|
12434
|
-
const [value, setValue] =
|
|
12463
|
+
const [value, setValue] = useState21(formatDate(props.value, dateFormats.short));
|
|
12435
12464
|
const tid = useTestIds(props, "date");
|
|
12436
12465
|
return /* @__PURE__ */ jsx61(
|
|
12437
12466
|
"input",
|
|
@@ -12454,7 +12483,7 @@ function DateFieldMock(props) {
|
|
|
12454
12483
|
}
|
|
12455
12484
|
|
|
12456
12485
|
// src/inputs/DateFields/DateFieldBase.tsx
|
|
12457
|
-
import { useCallback as
|
|
12486
|
+
import { useCallback as useCallback12, useEffect as useEffect15, useRef as useRef28, useState as useState22 } from "react";
|
|
12458
12487
|
import { FocusScope as FocusScope3, useButton as useButton8, useOverlayPosition as useOverlayPosition6, useOverlayTrigger, useTextField as useTextField2 } from "react-aria";
|
|
12459
12488
|
import { useOverlayTriggerState } from "react-stately";
|
|
12460
12489
|
import { trussProps as trussProps41 } from "@homebound/truss/runtime";
|
|
@@ -12484,14 +12513,14 @@ function DateFieldBase(props) {
|
|
|
12484
12513
|
...others
|
|
12485
12514
|
} = props;
|
|
12486
12515
|
const isRangeMode = mode === "range";
|
|
12487
|
-
const inputRef =
|
|
12488
|
-
const inputWrapRef =
|
|
12489
|
-
const buttonRef =
|
|
12490
|
-
const overlayRef =
|
|
12491
|
-
const isFocused =
|
|
12516
|
+
const inputRef = useRef28(null);
|
|
12517
|
+
const inputWrapRef = useRef28(null);
|
|
12518
|
+
const buttonRef = useRef28(null);
|
|
12519
|
+
const overlayRef = useRef28(null);
|
|
12520
|
+
const isFocused = useRef28(false);
|
|
12492
12521
|
const dateFormat = getDateFormat(format);
|
|
12493
|
-
const [wipValue, setWipValue] =
|
|
12494
|
-
const [inputValue, setInputValue] =
|
|
12522
|
+
const [wipValue, setWipValue] = useState22(value);
|
|
12523
|
+
const [inputValue, setInputValue] = useState22((isRangeMode ? formatDateRange(props.value, dateFormat) : formatDate(props.value, dateFormat)) ?? "");
|
|
12495
12524
|
const tid = useTestIds(props, defaultTestId(label));
|
|
12496
12525
|
const isDisabled = !!disabled;
|
|
12497
12526
|
const isReadOnly = !!readOnly;
|
|
@@ -12574,7 +12603,7 @@ function DateFieldBase(props) {
|
|
|
12574
12603
|
setInputValue((isRangeMode ? formatDateRange(props.value, dateFormat) : formatDate(props.value, dateFormat)) ?? "");
|
|
12575
12604
|
}
|
|
12576
12605
|
}, [value, dateFormat]);
|
|
12577
|
-
const onChange =
|
|
12606
|
+
const onChange = useCallback12(
|
|
12578
12607
|
(d) => {
|
|
12579
12608
|
setWipValue(d);
|
|
12580
12609
|
if (d && isParsedDateValid(d)) {
|
|
@@ -12783,7 +12812,7 @@ var iconCardStylesHover = {
|
|
|
12783
12812
|
};
|
|
12784
12813
|
|
|
12785
12814
|
// src/inputs/MultiLineSelectField.tsx
|
|
12786
|
-
import { useState as
|
|
12815
|
+
import { useState as useState23 } from "react";
|
|
12787
12816
|
import { trussProps as trussProps43 } from "@homebound/truss/runtime";
|
|
12788
12817
|
import { jsx as jsx67, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
12789
12818
|
function MultiLineSelectField(props) {
|
|
@@ -12797,7 +12826,7 @@ function MultiLineSelectField(props) {
|
|
|
12797
12826
|
...otherProps
|
|
12798
12827
|
} = props;
|
|
12799
12828
|
const tid = useTestIds(props, "");
|
|
12800
|
-
const [isDisplayed, setIsDisplayed] =
|
|
12829
|
+
const [isDisplayed, setIsDisplayed] = useState23(true);
|
|
12801
12830
|
const currentOptions = options.filter((o) => !values.includes(getOptionValue(o)));
|
|
12802
12831
|
return /* @__PURE__ */ jsxs42("div", { ...trussProps43({
|
|
12803
12832
|
marginTop: "mt1",
|
|
@@ -12851,7 +12880,7 @@ function MultiSelectField(props) {
|
|
|
12851
12880
|
|
|
12852
12881
|
// src/inputs/NumberField.tsx
|
|
12853
12882
|
import { NumberParser } from "@internationalized/number";
|
|
12854
|
-
import { useMemo as useMemo18, useRef as
|
|
12883
|
+
import { useMemo as useMemo18, useRef as useRef29, useState as useState24 } from "react";
|
|
12855
12884
|
import { mergeProps as mergeProps15, useLocale, useNumberField } from "react-aria";
|
|
12856
12885
|
import { useNumberFieldState } from "react-stately";
|
|
12857
12886
|
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
@@ -12938,12 +12967,12 @@ function NumberField(props) {
|
|
|
12938
12967
|
};
|
|
12939
12968
|
}, [type, numberFormatOptions, defaultFormatOptions, numFractionDigits]);
|
|
12940
12969
|
const numberParser = useMemo18(() => new NumberParser(locale, formatOptions), [locale, formatOptions]);
|
|
12941
|
-
const valueRef =
|
|
12970
|
+
const valueRef = useRef29({
|
|
12942
12971
|
wip: false
|
|
12943
12972
|
});
|
|
12944
|
-
const lastSentRef =
|
|
12945
|
-
const focusValueRef =
|
|
12946
|
-
const [, forceRender] =
|
|
12973
|
+
const lastSentRef = useRef29(void 0);
|
|
12974
|
+
const focusValueRef = useRef29(void 0);
|
|
12975
|
+
const [, forceRender] = useState24(0);
|
|
12947
12976
|
const propValue = value === void 0 ? Number.NaN : value / factor;
|
|
12948
12977
|
if (valueRef.current.wip && !Object.is(valueRef.current.value, propValue)) {
|
|
12949
12978
|
const lastSentInternal = lastSentRef.current === void 0 ? Number.NaN : lastSentRef.current / factor;
|
|
@@ -12990,7 +13019,7 @@ function NumberField(props) {
|
|
|
12990
13019
|
...otherProps
|
|
12991
13020
|
};
|
|
12992
13021
|
const state = useNumberFieldState(useProps);
|
|
12993
|
-
const inputRef =
|
|
13022
|
+
const inputRef = useRef29(null);
|
|
12994
13023
|
const {
|
|
12995
13024
|
labelProps,
|
|
12996
13025
|
inputProps,
|
|
@@ -13042,7 +13071,7 @@ function formatValue(value, factor, numFractionDigits, numIntegerDigits, positiv
|
|
|
13042
13071
|
}
|
|
13043
13072
|
|
|
13044
13073
|
// src/inputs/RadioGroupField.tsx
|
|
13045
|
-
import { Fragment as Fragment19, useMemo as useMemo19, useRef as
|
|
13074
|
+
import { Fragment as Fragment19, useMemo as useMemo19, useRef as useRef30 } from "react";
|
|
13046
13075
|
import { useFocusRing as useFocusRing6, useHover as useHover12, useRadio, useRadioGroup } from "react-aria";
|
|
13047
13076
|
import { useRadioGroupState } from "react-stately";
|
|
13048
13077
|
import { trussProps as trussProps44, maybeCssVar as maybeCssVar26 } from "@homebound/truss/runtime";
|
|
@@ -13056,6 +13085,7 @@ function RadioGroupField(props) {
|
|
|
13056
13085
|
onChange,
|
|
13057
13086
|
options,
|
|
13058
13087
|
disabled = false,
|
|
13088
|
+
required,
|
|
13059
13089
|
errorMsg,
|
|
13060
13090
|
helperText,
|
|
13061
13091
|
layout = "vertical",
|
|
@@ -13070,12 +13100,14 @@ function RadioGroupField(props) {
|
|
|
13070
13100
|
isReadOnly: false
|
|
13071
13101
|
});
|
|
13072
13102
|
const tid = useTestIds(props, defaultTestId(label));
|
|
13103
|
+
const labelSuffix = useLabelSuffix(required, false);
|
|
13073
13104
|
const {
|
|
13074
13105
|
labelProps,
|
|
13075
13106
|
radioGroupProps
|
|
13076
13107
|
} = useRadioGroup({
|
|
13077
13108
|
label,
|
|
13078
|
-
isDisabled: disabled
|
|
13109
|
+
isDisabled: disabled,
|
|
13110
|
+
isRequired: required
|
|
13079
13111
|
}, state);
|
|
13080
13112
|
return (
|
|
13081
13113
|
// default styling to position `<Label />` above.
|
|
@@ -13090,7 +13122,7 @@ function RadioGroupField(props) {
|
|
|
13090
13122
|
justifyContent: "jcsb"
|
|
13091
13123
|
} : {}
|
|
13092
13124
|
}), children: [
|
|
13093
|
-
/* @__PURE__ */ jsx70(Label, { label, ...labelProps, ...tid.label, hidden: labelStyle === "hidden" }),
|
|
13125
|
+
/* @__PURE__ */ jsx70(Label, { label, ...labelProps, ...tid.label, suffix: labelSuffix, hidden: labelStyle === "hidden" }),
|
|
13094
13126
|
/* @__PURE__ */ jsxs43("div", { ...radioGroupProps, children: [
|
|
13095
13127
|
/* @__PURE__ */ jsx70("div", { ...trussProps44({
|
|
13096
13128
|
display: "df",
|
|
@@ -13129,7 +13161,7 @@ function Radio(props) {
|
|
|
13129
13161
|
} = props;
|
|
13130
13162
|
const labelId = `${parentId}-${value}-label`;
|
|
13131
13163
|
const descriptionId = `${parentId}-${value}-description`;
|
|
13132
|
-
const ref =
|
|
13164
|
+
const ref = useRef30(null);
|
|
13133
13165
|
const {
|
|
13134
13166
|
inputProps,
|
|
13135
13167
|
isDisabled
|
|
@@ -13298,17 +13330,17 @@ var radioDisabled = {
|
|
|
13298
13330
|
|
|
13299
13331
|
// src/inputs/RichTextField.tsx
|
|
13300
13332
|
import DOMPurify from "dompurify";
|
|
13301
|
-
import { createElement, useEffect as useEffect16, useMemo as useMemo20, useRef as
|
|
13333
|
+
import { createElement, useEffect as useEffect16, useMemo as useMemo20, useRef as useRef31, useState as useState26 } from "react";
|
|
13302
13334
|
|
|
13303
13335
|
// src/inputs/RichTextField.mock.tsx
|
|
13304
13336
|
import { camelCase as camelCase3 } from "change-case";
|
|
13305
|
-
import { useState as
|
|
13337
|
+
import { useState as useState25 } from "react";
|
|
13306
13338
|
import { jsx as jsx71 } from "react/jsx-runtime";
|
|
13307
13339
|
function RichTextFieldMock(props) {
|
|
13308
13340
|
const { onBlur = () => {
|
|
13309
13341
|
}, onFocus = () => {
|
|
13310
13342
|
}, readOnly } = props;
|
|
13311
|
-
const [value, setValue] =
|
|
13343
|
+
const [value, setValue] = useState25(props.value || "");
|
|
13312
13344
|
const tid = useTestIds(props, defaultTestId2(props.label || "richTextField"));
|
|
13313
13345
|
return /* @__PURE__ */ jsx71(
|
|
13314
13346
|
"input",
|
|
@@ -13353,14 +13385,14 @@ function RichTextFieldImpl(props) {
|
|
|
13353
13385
|
readOnly,
|
|
13354
13386
|
fullWidth = fieldProps?.fullWidth ?? false
|
|
13355
13387
|
} = props;
|
|
13356
|
-
const [editor, setEditor] =
|
|
13357
|
-
const editorElement =
|
|
13358
|
-
const currentHtml =
|
|
13359
|
-
const onChangeRef =
|
|
13388
|
+
const [editor, setEditor] = useState26();
|
|
13389
|
+
const editorElement = useRef31();
|
|
13390
|
+
const currentHtml = useRef31(void 0);
|
|
13391
|
+
const onChangeRef = useRef31(onChange);
|
|
13360
13392
|
onChangeRef.current = onChange;
|
|
13361
|
-
const onBlurRef =
|
|
13393
|
+
const onBlurRef = useRef31(onBlur);
|
|
13362
13394
|
onBlurRef.current = onBlur;
|
|
13363
|
-
const onFocusRef =
|
|
13395
|
+
const onFocusRef = useRef31(onFocus);
|
|
13364
13396
|
onFocusRef.current = onFocus;
|
|
13365
13397
|
const id = useMemo20(() => {
|
|
13366
13398
|
if (readOnly) return;
|
|
@@ -13511,7 +13543,7 @@ function SelectField(props) {
|
|
|
13511
13543
|
}
|
|
13512
13544
|
|
|
13513
13545
|
// src/inputs/Switch.tsx
|
|
13514
|
-
import { useRef as
|
|
13546
|
+
import { useRef as useRef32 } from "react";
|
|
13515
13547
|
import { useFocusRing as useFocusRing7, useHover as useHover13, useSwitch, VisuallyHidden as VisuallyHidden5 } from "react-aria";
|
|
13516
13548
|
import { trussProps as trussProps46, maybeCssVar as maybeCssVar27 } from "@homebound/truss/runtime";
|
|
13517
13549
|
import { jsx as jsx74, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
@@ -13544,7 +13576,7 @@ function Switch(props) {
|
|
|
13544
13576
|
...otherProps
|
|
13545
13577
|
};
|
|
13546
13578
|
const state = toToggleState(isSelected, onChange);
|
|
13547
|
-
const ref =
|
|
13579
|
+
const ref = useRef32(null);
|
|
13548
13580
|
const {
|
|
13549
13581
|
inputProps
|
|
13550
13582
|
} = useSwitch({
|
|
@@ -13696,7 +13728,7 @@ function switchCircleSelectedStyles(isCompact) {
|
|
|
13696
13728
|
}
|
|
13697
13729
|
|
|
13698
13730
|
// src/inputs/TextAreaField.tsx
|
|
13699
|
-
import { useRef as
|
|
13731
|
+
import { useRef as useRef33 } from "react";
|
|
13700
13732
|
import { mergeProps as mergeProps16, useTextField as useTextField3 } from "react-aria";
|
|
13701
13733
|
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
13702
13734
|
function TextAreaField(props) {
|
|
@@ -13714,8 +13746,8 @@ function TextAreaField(props) {
|
|
|
13714
13746
|
const isDisabled = !!disabled;
|
|
13715
13747
|
const isReadOnly = !!readOnly;
|
|
13716
13748
|
const textFieldProps = { ...otherProps, value, isDisabled, isReadOnly };
|
|
13717
|
-
const inputRef =
|
|
13718
|
-
const inputWrapRef =
|
|
13749
|
+
const inputRef = useRef33(null);
|
|
13750
|
+
const inputWrapRef = useRef33(null);
|
|
13719
13751
|
useGrowingTextField({ inputRef, inputWrapRef, value, maxLines });
|
|
13720
13752
|
const { labelProps, inputProps } = useTextField3(
|
|
13721
13753
|
{
|
|
@@ -13753,7 +13785,7 @@ function TextAreaField(props) {
|
|
|
13753
13785
|
}
|
|
13754
13786
|
|
|
13755
13787
|
// src/inputs/TextField.tsx
|
|
13756
|
-
import { useRef as
|
|
13788
|
+
import { useRef as useRef34 } from "react";
|
|
13757
13789
|
import { mergeProps as mergeProps17, useTextField as useTextField4 } from "react-aria";
|
|
13758
13790
|
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
13759
13791
|
function TextField(props) {
|
|
@@ -13781,7 +13813,7 @@ function TextField(props) {
|
|
|
13781
13813
|
validationState: errorMsg ? "invalid" : "valid",
|
|
13782
13814
|
value
|
|
13783
13815
|
};
|
|
13784
|
-
const inputRef =
|
|
13816
|
+
const inputRef = useRef34(null);
|
|
13785
13817
|
const { labelProps, inputProps } = useTextField4(
|
|
13786
13818
|
{
|
|
13787
13819
|
...textFieldProps,
|
|
@@ -13817,7 +13849,7 @@ function TextField(props) {
|
|
|
13817
13849
|
}
|
|
13818
13850
|
|
|
13819
13851
|
// src/inputs/ToggleButton.tsx
|
|
13820
|
-
import { useRef as
|
|
13852
|
+
import { useRef as useRef35, useState as useState27 } from "react";
|
|
13821
13853
|
import { useFocusRing as useFocusRing8, useHover as useHover14, usePress, useSwitch as useSwitch2, VisuallyHidden as VisuallyHidden6 } from "react-aria";
|
|
13822
13854
|
import { useToggleState as useToggleState3 } from "react-stately";
|
|
13823
13855
|
import { trussProps as trussProps47 } from "@homebound/truss/runtime";
|
|
@@ -13832,7 +13864,7 @@ function ToggleButton(props) {
|
|
|
13832
13864
|
__storyState,
|
|
13833
13865
|
...otherProps
|
|
13834
13866
|
} = props;
|
|
13835
|
-
const [asyncInProgress, setAsyncInProgress] =
|
|
13867
|
+
const [asyncInProgress, setAsyncInProgress] = useState27(false);
|
|
13836
13868
|
const isDisabled = !!disabled || asyncInProgress;
|
|
13837
13869
|
const ariaProps = {
|
|
13838
13870
|
"aria-label": label,
|
|
@@ -13851,8 +13883,8 @@ function ToggleButton(props) {
|
|
|
13851
13883
|
return result;
|
|
13852
13884
|
}
|
|
13853
13885
|
});
|
|
13854
|
-
const labelRef =
|
|
13855
|
-
const ref =
|
|
13886
|
+
const labelRef = useRef35(null);
|
|
13887
|
+
const ref = useRef35(null);
|
|
13856
13888
|
const tid = useTestIds(otherProps, label);
|
|
13857
13889
|
const {
|
|
13858
13890
|
isPressed: isPressedFromEvents,
|
|
@@ -13938,7 +13970,7 @@ var togglePressStyles = {
|
|
|
13938
13970
|
};
|
|
13939
13971
|
|
|
13940
13972
|
// src/inputs/ToggleChipGroup.tsx
|
|
13941
|
-
import { useRef as
|
|
13973
|
+
import { useRef as useRef36 } from "react";
|
|
13942
13974
|
import { useCheckboxGroup as useCheckboxGroup2, useCheckboxGroupItem as useCheckboxGroupItem2, useFocusRing as useFocusRing9, VisuallyHidden as VisuallyHidden7 } from "react-aria";
|
|
13943
13975
|
import { useCheckboxGroupState as useCheckboxGroupState2 } from "react-stately";
|
|
13944
13976
|
import { trussProps as trussProps48, maybeCssVar as maybeCssVar28 } from "@homebound/truss/runtime";
|
|
@@ -14011,7 +14043,7 @@ function ToggleChip2(props) {
|
|
|
14011
14043
|
} = props;
|
|
14012
14044
|
const isDisabled = !!disabled;
|
|
14013
14045
|
const isReadOnly = !!readonly;
|
|
14014
|
-
const ref =
|
|
14046
|
+
const ref = useRef36(null);
|
|
14015
14047
|
const {
|
|
14016
14048
|
inputProps
|
|
14017
14049
|
} = useCheckboxGroupItem2({
|
|
@@ -14416,17 +14448,26 @@ var ColumnStorage = class {
|
|
|
14416
14448
|
}
|
|
14417
14449
|
expandedIds;
|
|
14418
14450
|
visibleIds;
|
|
14451
|
+
// `loadExpanded`/`loadVisible` can be called multiple times (i.e. when `props.columns`
|
|
14452
|
+
// change, which also changes the auto-derived storage key). Each call wires up a mobx
|
|
14453
|
+
// autorun/reaction that writes to its key, so we must dispose the previous one. Otherwise
|
|
14454
|
+
// a stale writer keeps firing against an old key and clobbers it with the current visible
|
|
14455
|
+
// set, e.g. a conditional column's key gets overwritten while that column isn't rendered.
|
|
14456
|
+
disposeExpanded;
|
|
14457
|
+
disposeVisible;
|
|
14419
14458
|
loadExpanded(persistCollapse) {
|
|
14459
|
+
this.disposeExpanded?.();
|
|
14420
14460
|
const key = `expandedColumn_${persistCollapse}`;
|
|
14421
14461
|
this.expandedIds = loadArrayOrUndefined(key);
|
|
14422
|
-
reaction2(
|
|
14462
|
+
this.disposeExpanded = reaction2(
|
|
14423
14463
|
() => this.states.expandedColumns.map((cs) => cs.column.id),
|
|
14424
14464
|
(columnIds) => sessionStorage.setItem(key, JSON.stringify(columnIds))
|
|
14425
14465
|
);
|
|
14426
14466
|
}
|
|
14427
14467
|
loadVisible(storageKey) {
|
|
14468
|
+
this.disposeVisible?.();
|
|
14428
14469
|
this.visibleIds = loadArrayOrUndefined(storageKey);
|
|
14429
|
-
autorun2(() => {
|
|
14470
|
+
this.disposeVisible = autorun2(() => {
|
|
14430
14471
|
const columnIds = this.states.allVisibleColumns("web").map((cs) => cs.column.id);
|
|
14431
14472
|
sessionStorage.setItem(storageKey, JSON.stringify(columnIds));
|
|
14432
14473
|
});
|
|
@@ -15061,10 +15102,10 @@ function maybeApply(maybeFn) {
|
|
|
15061
15102
|
}
|
|
15062
15103
|
|
|
15063
15104
|
// src/components/Table/hooks/useColumnResizeHandlers.ts
|
|
15064
|
-
import { useCallback as
|
|
15105
|
+
import { useCallback as useCallback13, useRef as useRef37 } from "react";
|
|
15065
15106
|
function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWidth, setResizedWidths) {
|
|
15066
|
-
const hasLockedColumnsRef =
|
|
15067
|
-
const distributeAdjustment =
|
|
15107
|
+
const hasLockedColumnsRef = useRef37(false);
|
|
15108
|
+
const distributeAdjustment = useCallback13(
|
|
15068
15109
|
(rightColumns, totalRightWidth, adjustment) => {
|
|
15069
15110
|
const updates = {};
|
|
15070
15111
|
let remainingAdjustment = adjustment;
|
|
@@ -15079,7 +15120,7 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
15079
15120
|
},
|
|
15080
15121
|
[]
|
|
15081
15122
|
);
|
|
15082
|
-
const calculateResizeUpdates =
|
|
15123
|
+
const calculateResizeUpdates = useCallback13(
|
|
15083
15124
|
(columnId, newWidth, columnIndex) => {
|
|
15084
15125
|
if (!tableWidth || !columnSizes || columnSizes.length === 0) {
|
|
15085
15126
|
return null;
|
|
@@ -15125,7 +15166,7 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
15125
15166
|
},
|
|
15126
15167
|
[tableWidth, columnSizes, columns, distributeAdjustment]
|
|
15127
15168
|
);
|
|
15128
|
-
const calculatePreviewWidth =
|
|
15169
|
+
const calculatePreviewWidth = useCallback13(
|
|
15129
15170
|
(columnId, newWidth, columnIndex) => {
|
|
15130
15171
|
const result = calculateResizeUpdates(columnId, newWidth, columnIndex);
|
|
15131
15172
|
if (!result) {
|
|
@@ -15135,7 +15176,7 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
15135
15176
|
},
|
|
15136
15177
|
[calculateResizeUpdates]
|
|
15137
15178
|
);
|
|
15138
|
-
const handleColumnResize =
|
|
15179
|
+
const handleColumnResize = useCallback13(
|
|
15139
15180
|
(columnId, newWidth, columnIndex) => {
|
|
15140
15181
|
const result = calculateResizeUpdates(columnId, newWidth, columnIndex);
|
|
15141
15182
|
if (!result) {
|
|
@@ -15192,13 +15233,13 @@ function useScrollStorage(tableId, enabled = true) {
|
|
|
15192
15233
|
|
|
15193
15234
|
// src/components/Table/hooks/useSetupColumnSizes.ts
|
|
15194
15235
|
import { useResizeObserver } from "@react-aria/utils";
|
|
15195
|
-
import { useCallback as
|
|
15236
|
+
import { useCallback as useCallback15, useEffect as useEffect18, useRef as useRef38, useState as useState29 } from "react";
|
|
15196
15237
|
|
|
15197
15238
|
// src/components/Table/hooks/useColumnResizing.ts
|
|
15198
|
-
import { useCallback as
|
|
15239
|
+
import { useCallback as useCallback14, useEffect as useEffect17, useState as useState28 } from "react";
|
|
15199
15240
|
import { useDebouncedCallback as useDebouncedCallback3 } from "use-debounce";
|
|
15200
15241
|
function useColumnResizing(storageKey) {
|
|
15201
|
-
const [resizedWidths, setResizedWidths] =
|
|
15242
|
+
const [resizedWidths, setResizedWidths] = useState28(() => {
|
|
15202
15243
|
if (!storageKey) return {};
|
|
15203
15244
|
try {
|
|
15204
15245
|
const stored = sessionStorage.getItem(`columnWidths_${storageKey}`);
|
|
@@ -15218,13 +15259,13 @@ function useColumnResizing(storageKey) {
|
|
|
15218
15259
|
useEffect17(() => {
|
|
15219
15260
|
persistToStorage(resizedWidths);
|
|
15220
15261
|
}, [resizedWidths, persistToStorage]);
|
|
15221
|
-
const setResizedWidth =
|
|
15262
|
+
const setResizedWidth = useCallback14((columnId, width2) => {
|
|
15222
15263
|
setResizedWidths((prev) => ({
|
|
15223
15264
|
...prev,
|
|
15224
15265
|
[columnId]: width2
|
|
15225
15266
|
}));
|
|
15226
15267
|
}, []);
|
|
15227
|
-
const batchSetResizedWidths =
|
|
15268
|
+
const batchSetResizedWidths = useCallback14((widths2) => {
|
|
15228
15269
|
if (typeof widths2 === "function") {
|
|
15229
15270
|
setResizedWidths(widths2);
|
|
15230
15271
|
} else {
|
|
@@ -15234,7 +15275,7 @@ function useColumnResizing(storageKey) {
|
|
|
15234
15275
|
}));
|
|
15235
15276
|
}
|
|
15236
15277
|
}, []);
|
|
15237
|
-
const resetColumnWidths =
|
|
15278
|
+
const resetColumnWidths = useCallback14(() => {
|
|
15238
15279
|
setResizedWidths({});
|
|
15239
15280
|
}, []);
|
|
15240
15281
|
return {
|
|
@@ -15251,13 +15292,13 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
15251
15292
|
const { resizedWidths, setResizedWidth, setResizedWidths, resetColumnWidths } = useColumnResizing(
|
|
15252
15293
|
disableColumnResizing ? void 0 : visibleColumnsStorageKey
|
|
15253
15294
|
);
|
|
15254
|
-
const calculateImmediately =
|
|
15255
|
-
const [tableWidth, setTableWidth] =
|
|
15256
|
-
const prevTableWidthRef =
|
|
15257
|
-
const [columnSizes, setColumnSizes] =
|
|
15295
|
+
const calculateImmediately = useRef38(true);
|
|
15296
|
+
const [tableWidth, setTableWidth] = useState29();
|
|
15297
|
+
const prevTableWidthRef = useRef38(tableWidth);
|
|
15298
|
+
const [columnSizes, setColumnSizes] = useState29(
|
|
15258
15299
|
calcColumnSizes(columns, tableWidth, style.minWidthPx, expandedColumnIds, resizedWidths)
|
|
15259
15300
|
);
|
|
15260
|
-
const setTableAndColumnWidths =
|
|
15301
|
+
const setTableAndColumnWidths = useCallback15(
|
|
15261
15302
|
(width2) => {
|
|
15262
15303
|
setTableWidth(width2);
|
|
15263
15304
|
setColumnSizes(calcColumnSizes(columns, width2, style.minWidthPx, expandedColumnIds, resizedWidths));
|
|
@@ -15299,7 +15340,7 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
15299
15340
|
[columns, resizedWidths, setTableAndColumnWidths]
|
|
15300
15341
|
);
|
|
15301
15342
|
const setTableAndColumnWidthsDebounced = useDebouncedCallback4(setTableAndColumnWidths, 100);
|
|
15302
|
-
const onResize =
|
|
15343
|
+
const onResize = useCallback15(
|
|
15303
15344
|
() => {
|
|
15304
15345
|
const target = resizeRef.current;
|
|
15305
15346
|
if (target && target.clientWidth !== tableWidth) {
|
|
@@ -15320,10 +15361,10 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
15320
15361
|
}
|
|
15321
15362
|
|
|
15322
15363
|
// src/hooks/useRenderCount.ts
|
|
15323
|
-
import { useCallback as
|
|
15364
|
+
import { useCallback as useCallback16, useRef as useRef39 } from "react";
|
|
15324
15365
|
function useRenderCount() {
|
|
15325
|
-
const ref =
|
|
15326
|
-
const getCount =
|
|
15366
|
+
const ref = useRef39(/* @__PURE__ */ new Map());
|
|
15367
|
+
const getCount = useCallback16((id) => {
|
|
15327
15368
|
const count = ref.current.get(id) || 1;
|
|
15328
15369
|
ref.current.set(id, count + 1);
|
|
15329
15370
|
return { "data-render": count };
|
|
@@ -15379,10 +15420,10 @@ function GridTable(props) {
|
|
|
15379
15420
|
disableColumnResizing = false
|
|
15380
15421
|
} = props;
|
|
15381
15422
|
const columnsWithIds = useMemo24(() => assignDefaultColumnIds(_columns), [_columns]);
|
|
15382
|
-
const virtuosoRef =
|
|
15383
|
-
const virtuosoRangeRef =
|
|
15384
|
-
const resizeRef =
|
|
15385
|
-
const tableContainerRef =
|
|
15423
|
+
const virtuosoRef = useRef40(null);
|
|
15424
|
+
const virtuosoRangeRef = useRef40(null);
|
|
15425
|
+
const resizeRef = useRef40(null);
|
|
15426
|
+
const tableContainerRef = useRef40(null);
|
|
15386
15427
|
const api = useMemo24(
|
|
15387
15428
|
() => {
|
|
15388
15429
|
const api2 = props.api ?? new GridTableApiImpl();
|
|
@@ -15396,8 +15437,8 @@ function GridTable(props) {
|
|
|
15396
15437
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
15397
15438
|
[props.api]
|
|
15398
15439
|
);
|
|
15399
|
-
const [draggedRow, _setDraggedRow] =
|
|
15400
|
-
const draggedRowRef =
|
|
15440
|
+
const [draggedRow, _setDraggedRow] = useState30(void 0);
|
|
15441
|
+
const draggedRowRef = useRef40(draggedRow);
|
|
15401
15442
|
const setDraggedRow = (row) => {
|
|
15402
15443
|
draggedRowRef.current = row;
|
|
15403
15444
|
_setDraggedRow(row);
|
|
@@ -15700,7 +15741,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, firs
|
|
|
15700
15741
|
}
|
|
15701
15742
|
function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, _stickyOffset, infiniteScroll, _tableContainerRef, persistScrollPosition = infiniteScroll === void 0) {
|
|
15702
15743
|
const customScrollParent = useVirtualizedScrollParent();
|
|
15703
|
-
const [fetchMoreInProgress, setFetchMoreInProgress] =
|
|
15744
|
+
const [fetchMoreInProgress, setFetchMoreInProgress] = useState30(false);
|
|
15704
15745
|
const {
|
|
15705
15746
|
getScrollIndex,
|
|
15706
15747
|
setScrollIndex
|
|
@@ -15909,7 +15950,7 @@ function ToggleChips(props) {
|
|
|
15909
15950
|
|
|
15910
15951
|
// src/components/Accordion.tsx
|
|
15911
15952
|
import { useId, useResizeObserver as useResizeObserver2 } from "@react-aria/utils";
|
|
15912
|
-
import { useCallback as
|
|
15953
|
+
import { useCallback as useCallback17, useEffect as useEffect20, useMemo as useMemo25, useState as useState31 } from "react";
|
|
15913
15954
|
import { useFocusRing as useFocusRing10 } from "react-aria";
|
|
15914
15955
|
import { trussProps as trussProps52, maybeCssVar as maybeCssVar30 } from "@homebound/truss/runtime";
|
|
15915
15956
|
import { jsx as jsx84, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
@@ -15935,23 +15976,23 @@ function Accordion(props) {
|
|
|
15935
15976
|
} = props;
|
|
15936
15977
|
const tid = useTestIds(props, "accordion");
|
|
15937
15978
|
const id = useId();
|
|
15938
|
-
const [expanded, setExpanded] =
|
|
15979
|
+
const [expanded, setExpanded] = useState31(defaultExpanded && !disabled);
|
|
15939
15980
|
const {
|
|
15940
15981
|
isFocusVisible,
|
|
15941
15982
|
focusProps
|
|
15942
15983
|
} = useFocusRing10();
|
|
15943
|
-
const [contentEl, setContentEl] =
|
|
15984
|
+
const [contentEl, setContentEl] = useState31(null);
|
|
15944
15985
|
const contentRef = useMemo25(() => ({
|
|
15945
15986
|
current: contentEl
|
|
15946
15987
|
}), [contentEl]);
|
|
15947
|
-
const [contentHeight, setContentHeight] =
|
|
15988
|
+
const [contentHeight, setContentHeight] = useState31(expanded ? "auto" : "0");
|
|
15948
15989
|
useEffect20(() => {
|
|
15949
15990
|
setExpanded(defaultExpanded && !disabled);
|
|
15950
15991
|
}, [defaultExpanded, disabled]);
|
|
15951
15992
|
useEffect20(() => {
|
|
15952
15993
|
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
15953
15994
|
}, [expanded, contentEl]);
|
|
15954
|
-
const onResize =
|
|
15995
|
+
const onResize = useCallback17(() => {
|
|
15955
15996
|
if (contentEl && expanded) {
|
|
15956
15997
|
setContentHeight(`${contentEl.scrollHeight}px`);
|
|
15957
15998
|
}
|
|
@@ -15960,7 +16001,7 @@ function Accordion(props) {
|
|
|
15960
16001
|
ref: contentRef,
|
|
15961
16002
|
onResize
|
|
15962
16003
|
});
|
|
15963
|
-
const toggle =
|
|
16004
|
+
const toggle = useCallback17(() => {
|
|
15964
16005
|
setExpanded((prev) => !prev);
|
|
15965
16006
|
if (setExpandedIndex) setExpandedIndex(index);
|
|
15966
16007
|
if (onToggle) onToggle();
|
|
@@ -16094,11 +16135,11 @@ var accordionSizes = {
|
|
|
16094
16135
|
};
|
|
16095
16136
|
|
|
16096
16137
|
// src/components/AccordionList.tsx
|
|
16097
|
-
import { useState as
|
|
16138
|
+
import { useState as useState32 } from "react";
|
|
16098
16139
|
import { Fragment as Fragment20, jsx as jsx85 } from "react/jsx-runtime";
|
|
16099
16140
|
function AccordionList(props) {
|
|
16100
16141
|
const { accordions, size, allowMultipleExpanded = true, compact = false } = props;
|
|
16101
|
-
const [expandedIndex, setExpandedIndex] =
|
|
16142
|
+
const [expandedIndex, setExpandedIndex] = useState32(
|
|
16102
16143
|
accordions.findIndex((a) => a.defaultExpanded)
|
|
16103
16144
|
);
|
|
16104
16145
|
const tid = useTestIds(props, "accordionList");
|
|
@@ -16243,17 +16284,17 @@ var variantStyles2 = {
|
|
|
16243
16284
|
};
|
|
16244
16285
|
|
|
16245
16286
|
// src/components/BeamContext.tsx
|
|
16246
|
-
import { createContext as createContext8, useContext as useContext18, useMemo as useMemo40, useReducer, useRef as
|
|
16287
|
+
import { createContext as createContext8, useContext as useContext18, useMemo as useMemo40, useReducer, useRef as useRef47 } from "react";
|
|
16247
16288
|
import { OverlayProvider } from "react-aria";
|
|
16248
16289
|
|
|
16249
16290
|
// src/components/Modal/Modal.tsx
|
|
16250
16291
|
import { useResizeObserver as useResizeObserver3 } from "@react-aria/utils";
|
|
16251
|
-
import { useCallback as
|
|
16292
|
+
import { useCallback as useCallback18, useEffect as useEffect23, useRef as useRef42, useState as useState33 } from "react";
|
|
16252
16293
|
import { FocusScope as FocusScope4, OverlayContainer as OverlayContainer2, useDialog, useModal as useModal2, useOverlay as useOverlay2, usePreventScroll } from "react-aria";
|
|
16253
16294
|
import { createPortal as createPortal3 } from "react-dom";
|
|
16254
16295
|
|
|
16255
16296
|
// src/components/Modal/useModal.tsx
|
|
16256
|
-
import { useEffect as useEffect22, useMemo as useMemo27, useRef as
|
|
16297
|
+
import { useEffect as useEffect22, useMemo as useMemo27, useRef as useRef41 } from "react";
|
|
16257
16298
|
|
|
16258
16299
|
// src/components/Modal/ModalContext.tsx
|
|
16259
16300
|
import { createContext as createContext5, useContext as useContext14, useMemo as useMemo26 } from "react";
|
|
@@ -16271,8 +16312,8 @@ function useModalContext() {
|
|
|
16271
16312
|
function useModal() {
|
|
16272
16313
|
const { modalState, modalCanCloseChecks } = useBeamContext();
|
|
16273
16314
|
const { inModal } = useModalContext();
|
|
16274
|
-
const lastCanClose =
|
|
16275
|
-
const api =
|
|
16315
|
+
const lastCanClose = useRef41();
|
|
16316
|
+
const api = useRef41();
|
|
16276
16317
|
useEffect22(() => {
|
|
16277
16318
|
return () => {
|
|
16278
16319
|
modalCanCloseChecks.current = modalCanCloseChecks.current.filter((c) => c !== lastCanClose.current);
|
|
@@ -16325,7 +16366,7 @@ function Modal(props) {
|
|
|
16325
16366
|
allowClosing = true
|
|
16326
16367
|
} = props;
|
|
16327
16368
|
const isFixedHeight = typeof size !== "string";
|
|
16328
|
-
const ref =
|
|
16369
|
+
const ref = useRef42(null);
|
|
16329
16370
|
const {
|
|
16330
16371
|
modalBodyDiv,
|
|
16331
16372
|
modalFooterDiv,
|
|
@@ -16355,10 +16396,10 @@ function Modal(props) {
|
|
|
16355
16396
|
} = useDialog({
|
|
16356
16397
|
role: "dialog"
|
|
16357
16398
|
}, ref);
|
|
16358
|
-
const [[width2, height], setSize] =
|
|
16359
|
-
const modalBodyRef =
|
|
16360
|
-
const modalFooterRef =
|
|
16361
|
-
const modalHeaderRef =
|
|
16399
|
+
const [[width2, height], setSize] = useState33(getSize(size));
|
|
16400
|
+
const modalBodyRef = useRef42(null);
|
|
16401
|
+
const modalFooterRef = useRef42(null);
|
|
16402
|
+
const modalHeaderRef = useRef42(null);
|
|
16362
16403
|
const testId = useTestIds({}, testIdPrefix);
|
|
16363
16404
|
usePreventScroll();
|
|
16364
16405
|
const {
|
|
@@ -16369,10 +16410,10 @@ function Modal(props) {
|
|
|
16369
16410
|
setSize: (size2 = "md") => setSize(getSize(size2))
|
|
16370
16411
|
};
|
|
16371
16412
|
}
|
|
16372
|
-
const [hasScroll, setHasScroll] =
|
|
16413
|
+
const [hasScroll, setHasScroll] = useState33(forceScrolling ?? false);
|
|
16373
16414
|
useResizeObserver3({
|
|
16374
16415
|
ref: modalBodyRef,
|
|
16375
|
-
onResize:
|
|
16416
|
+
onResize: useCallback18(
|
|
16376
16417
|
() => {
|
|
16377
16418
|
const target = modalBodyRef.current;
|
|
16378
16419
|
if (forceScrolling === void 0 && !isFixedHeight) {
|
|
@@ -16536,7 +16577,7 @@ function getSize(size) {
|
|
|
16536
16577
|
}
|
|
16537
16578
|
|
|
16538
16579
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
16539
|
-
import { createContext as createContext6, useContext as useContext15, useMemo as useMemo28, useState as
|
|
16580
|
+
import { createContext as createContext6, useContext as useContext15, useMemo as useMemo28, useState as useState34 } from "react";
|
|
16540
16581
|
|
|
16541
16582
|
// src/components/Snackbar/SnackbarNotice.tsx
|
|
16542
16583
|
import { trussProps as trussProps55 } from "@homebound/truss/runtime";
|
|
@@ -16648,8 +16689,8 @@ var SnackbarContext = createContext6({ setNotices: () => {
|
|
|
16648
16689
|
}, setOffset: () => {
|
|
16649
16690
|
} });
|
|
16650
16691
|
function SnackbarProvider(props) {
|
|
16651
|
-
const [notices, setNotices] =
|
|
16652
|
-
const [offset, setOffset] =
|
|
16692
|
+
const [notices, setNotices] = useState34([]);
|
|
16693
|
+
const [offset, setOffset] = useState34({});
|
|
16653
16694
|
const contextValue = useMemo28(() => ({ setNotices, setOffset }), []);
|
|
16654
16695
|
return /* @__PURE__ */ jsxs55(SnackbarContext.Provider, { value: contextValue, children: [
|
|
16655
16696
|
props.children,
|
|
@@ -16662,7 +16703,7 @@ function useSnackbarContext() {
|
|
|
16662
16703
|
|
|
16663
16704
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
16664
16705
|
import { AnimatePresence, motion } from "framer-motion";
|
|
16665
|
-
import { useEffect as useEffect24, useRef as
|
|
16706
|
+
import { useEffect as useEffect24, useRef as useRef43 } from "react";
|
|
16666
16707
|
import { createPortal as createPortal4 } from "react-dom";
|
|
16667
16708
|
|
|
16668
16709
|
// src/components/SuperDrawer/utils.ts
|
|
@@ -16684,7 +16725,7 @@ function SuperDrawer() {
|
|
|
16684
16725
|
const {
|
|
16685
16726
|
closeDrawer
|
|
16686
16727
|
} = useSuperDrawer();
|
|
16687
|
-
const headerRef =
|
|
16728
|
+
const headerRef = useRef43(null);
|
|
16688
16729
|
const testId = useTestIds({}, "superDrawer");
|
|
16689
16730
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
16690
16731
|
const {
|
|
@@ -16791,7 +16832,7 @@ function SuperDrawer() {
|
|
|
16791
16832
|
}
|
|
16792
16833
|
|
|
16793
16834
|
// src/components/Layout/FormPageLayout.tsx
|
|
16794
|
-
import React16, { createRef, useCallback as
|
|
16835
|
+
import React16, { createRef, useCallback as useCallback22, useEffect as useEffect25, useMemo as useMemo33, useRef as useRef44, useState as useState40 } from "react";
|
|
16795
16836
|
import { useButton as useButton9, useFocusRing as useFocusRing11 } from "react-aria";
|
|
16796
16837
|
|
|
16797
16838
|
// src/forms/BoundCheckboxField.tsx
|
|
@@ -17017,7 +17058,7 @@ function BoundDateRangeField(props) {
|
|
|
17017
17058
|
}
|
|
17018
17059
|
|
|
17019
17060
|
// src/forms/BoundForm.tsx
|
|
17020
|
-
import { useCallback as
|
|
17061
|
+
import { useCallback as useCallback20, useMemo as useMemo30 } from "react";
|
|
17021
17062
|
|
|
17022
17063
|
// src/forms/BoundIconCardField.tsx
|
|
17023
17064
|
import { Observer as Observer6 } from "mobx-react";
|
|
@@ -17046,7 +17087,7 @@ function BoundIconCardField(props) {
|
|
|
17046
17087
|
import { Observer as Observer7 } from "mobx-react";
|
|
17047
17088
|
|
|
17048
17089
|
// src/inputs/IconCardGroup.tsx
|
|
17049
|
-
import { useCallback as
|
|
17090
|
+
import { useCallback as useCallback19, useMemo as useMemo29, useState as useState35 } from "react";
|
|
17050
17091
|
import { mergeProps as mergeProps19, useField } from "react-aria";
|
|
17051
17092
|
import { trussProps as trussProps58 } from "@homebound/truss/runtime";
|
|
17052
17093
|
import { jsx as jsx100, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
@@ -17064,9 +17105,9 @@ function IconCardGroup(props) {
|
|
|
17064
17105
|
disabled: isDisabled = false,
|
|
17065
17106
|
onChange
|
|
17066
17107
|
} = props;
|
|
17067
|
-
const [selected, setSelected] =
|
|
17108
|
+
const [selected, setSelected] = useState35(values);
|
|
17068
17109
|
const exclusiveOptions = useMemo29(() => options.filter((o) => o.exclusive), [options]);
|
|
17069
|
-
const toggleValue =
|
|
17110
|
+
const toggleValue = useCallback19((value) => {
|
|
17070
17111
|
if (isDisabled) return;
|
|
17071
17112
|
const option = options.find((o) => o.value === value);
|
|
17072
17113
|
if (!option) return;
|
|
@@ -17357,6 +17398,7 @@ function BoundRadioGroupField(props) {
|
|
|
17357
17398
|
RadioGroupField,
|
|
17358
17399
|
{
|
|
17359
17400
|
label,
|
|
17401
|
+
required: field.required,
|
|
17360
17402
|
value: field.value || void 0,
|
|
17361
17403
|
onChange: (value) => {
|
|
17362
17404
|
onChange(value);
|
|
@@ -17740,7 +17782,7 @@ function BoundForm(props) {
|
|
|
17740
17782
|
formState
|
|
17741
17783
|
} = props;
|
|
17742
17784
|
const tid = useTestIds({}, "boundForm");
|
|
17743
|
-
const getRowKey =
|
|
17785
|
+
const getRowKey = useCallback20((row, rowType) => {
|
|
17744
17786
|
return `${rowType}-${Object.keys(row).join("-")}`;
|
|
17745
17787
|
}, []);
|
|
17746
17788
|
return /* @__PURE__ */ jsx115("div", { ...tid, children: /* @__PURE__ */ jsx115(FormLines, { width: "full", gap: 3.5, children: rows.map((row) => isListFieldRow(row) ? /* @__PURE__ */ jsx115(ListField, { row, formState }, getRowKey(row, "listField")) : /* @__PURE__ */ jsx115(FormRow, { row, formState }, getRowKey(row, "fieldGroup"))) }) });
|
|
@@ -17901,7 +17943,7 @@ function boundTreeSelectField(props) {
|
|
|
17901
17943
|
}
|
|
17902
17944
|
|
|
17903
17945
|
// src/components/internal/CompoundField.tsx
|
|
17904
|
-
import { cloneElement as cloneElement2, useState as
|
|
17946
|
+
import { cloneElement as cloneElement2, useState as useState36 } from "react";
|
|
17905
17947
|
import { trussProps as trussProps61 } from "@homebound/truss/runtime";
|
|
17906
17948
|
import { jsx as jsx116, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17907
17949
|
function CompoundField({
|
|
@@ -17924,7 +17966,7 @@ function CompoundField({
|
|
|
17924
17966
|
const internalProps = {
|
|
17925
17967
|
compound: true
|
|
17926
17968
|
};
|
|
17927
|
-
const [hasFocusWithin, setHasFocusWithin] =
|
|
17969
|
+
const [hasFocusWithin, setHasFocusWithin] = useState36(false);
|
|
17928
17970
|
function onFocusCapture() {
|
|
17929
17971
|
setHasFocusWithin(true);
|
|
17930
17972
|
}
|
|
@@ -18100,7 +18142,7 @@ import { useDebouncedCallback as useDebouncedCallback5 } from "use-debounce";
|
|
|
18100
18142
|
|
|
18101
18143
|
// src/components/RightSidebar.tsx
|
|
18102
18144
|
import { AnimatePresence as AnimatePresence2, motion as motion2 } from "framer-motion";
|
|
18103
|
-
import { useState as
|
|
18145
|
+
import { useState as useState37 } from "react";
|
|
18104
18146
|
import { trussProps as trussProps64, maybeCssVar as maybeCssVar36 } from "@homebound/truss/runtime";
|
|
18105
18147
|
import { Fragment as Fragment24, jsx as jsx121, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
18106
18148
|
var RIGHT_SIDEBAR_MIN_WIDTH = "250px";
|
|
@@ -18108,7 +18150,7 @@ function RightSidebar({
|
|
|
18108
18150
|
content,
|
|
18109
18151
|
headerHeightPx: headerHeightPx2
|
|
18110
18152
|
}) {
|
|
18111
|
-
const [selectedIcon, setSelectedIcon] =
|
|
18153
|
+
const [selectedIcon, setSelectedIcon] = useState37(void 0);
|
|
18112
18154
|
const tid = useTestIds({}, "rightSidebar");
|
|
18113
18155
|
return /* @__PURE__ */ jsxs62(Fragment24, { children: [
|
|
18114
18156
|
/* @__PURE__ */ jsx121("div", { className: "df jcfe absolute right0 pr3", children: /* @__PURE__ */ jsx121(AnimatePresence2, { children: !selectedIcon && /* @__PURE__ */ jsx121(motion2.div, { className: "df fdc gap2 z1", initial: {
|
|
@@ -18195,7 +18237,7 @@ function IconButtonList({
|
|
|
18195
18237
|
}
|
|
18196
18238
|
|
|
18197
18239
|
// src/components/Toast/ToastContext.tsx
|
|
18198
|
-
import { createContext as createContext7, useCallback as
|
|
18240
|
+
import { createContext as createContext7, useCallback as useCallback21, useContext as useContext16, useMemo as useMemo31, useState as useState38 } from "react";
|
|
18199
18241
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
18200
18242
|
var ToastContext = createContext7({
|
|
18201
18243
|
setNotice: () => {
|
|
@@ -18206,8 +18248,8 @@ var ToastContext = createContext7({
|
|
|
18206
18248
|
notice: void 0
|
|
18207
18249
|
});
|
|
18208
18250
|
function ToastProvider(props) {
|
|
18209
|
-
const [notice, setNotice] =
|
|
18210
|
-
const clear =
|
|
18251
|
+
const [notice, setNotice] = useState38();
|
|
18252
|
+
const clear = useCallback21(() => setNotice(void 0), [setNotice]);
|
|
18211
18253
|
const contextValue = useMemo31(() => ({ setNotice, notice, clear }), [notice, clear]);
|
|
18212
18254
|
return /* @__PURE__ */ jsx122(ToastContext.Provider, { value: contextValue, children: props.children });
|
|
18213
18255
|
}
|
|
@@ -18224,7 +18266,7 @@ function Toast() {
|
|
|
18224
18266
|
}
|
|
18225
18267
|
|
|
18226
18268
|
// src/components/Layout/PageHeaderBreadcrumbs.tsx
|
|
18227
|
-
import { Fragment as Fragment26, useMemo as useMemo32, useState as
|
|
18269
|
+
import { Fragment as Fragment26, useMemo as useMemo32, useState as useState39 } from "react";
|
|
18228
18270
|
import { Link as Link4 } from "react-router-dom";
|
|
18229
18271
|
import { mergeProps as mergeProps20 } from "@homebound/truss/runtime";
|
|
18230
18272
|
import { Fragment as Fragment27, jsx as jsx124, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
@@ -18233,7 +18275,7 @@ function PageHeaderBreadcrumbs({
|
|
|
18233
18275
|
}) {
|
|
18234
18276
|
const tids = useTestIds({}, "pageHeaderBreadcrumbs");
|
|
18235
18277
|
const breadcrumbs = useMemo32(() => Array.isArray(breadcrumb) ? breadcrumb : [breadcrumb], [breadcrumb]);
|
|
18236
|
-
const [collapsed, setCollapsed] =
|
|
18278
|
+
const [collapsed, setCollapsed] = useState39(true);
|
|
18237
18279
|
function renderBreadcrumb(bc, index, hideDivisor) {
|
|
18238
18280
|
return (
|
|
18239
18281
|
// Adding index to key to prevent rendering issues when multiple items have the same label
|
|
@@ -18468,14 +18510,14 @@ function SectionNavLink(props) {
|
|
|
18468
18510
|
ref: sectionRef
|
|
18469
18511
|
} = sectionWithRef;
|
|
18470
18512
|
const active = activeSection === sectionWithRef.sectionKey;
|
|
18471
|
-
const handleNavClick =
|
|
18513
|
+
const handleNavClick = useCallback22(() => {
|
|
18472
18514
|
sectionRef.current?.scrollIntoView({
|
|
18473
18515
|
behavior: "smooth",
|
|
18474
18516
|
block: "start"
|
|
18475
18517
|
});
|
|
18476
18518
|
}, [sectionRef]);
|
|
18477
18519
|
const tids = useTestIds(props);
|
|
18478
|
-
const buttonRef =
|
|
18520
|
+
const buttonRef = useRef44(null);
|
|
18479
18521
|
const {
|
|
18480
18522
|
buttonProps,
|
|
18481
18523
|
isPressed
|
|
@@ -18515,7 +18557,7 @@ function SectionNavLink(props) {
|
|
|
18515
18557
|
}), ...tids.sectionNavLink, children: section.title });
|
|
18516
18558
|
}
|
|
18517
18559
|
function useActiveSection(sectionsWithRefs) {
|
|
18518
|
-
const [activeSection, setActiveSection] =
|
|
18560
|
+
const [activeSection, setActiveSection] = useState40(null);
|
|
18519
18561
|
const debouncedIntersectionCallback = useDebouncedCallback5((entries) => {
|
|
18520
18562
|
const sectionsInView = entries.filter((entry) => entry.isIntersecting && entry.intersectionRatio > 0.2).sort((a, b) => {
|
|
18521
18563
|
const ratioDiff = b.intersectionRatio - a.intersectionRatio;
|
|
@@ -18622,10 +18664,10 @@ function invertSpacing(value) {
|
|
|
18622
18664
|
}
|
|
18623
18665
|
|
|
18624
18666
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
18625
|
-
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as
|
|
18667
|
+
import React17, { useEffect as useEffect27, useMemo as useMemo38, useState as useState43 } from "react";
|
|
18626
18668
|
|
|
18627
18669
|
// src/components/ButtonMenu.tsx
|
|
18628
|
-
import { useRef as
|
|
18670
|
+
import { useRef as useRef45 } from "react";
|
|
18629
18671
|
import { useMenuTrigger as useMenuTrigger2 } from "react-aria";
|
|
18630
18672
|
import { useMenuTriggerState as useMenuTriggerState2 } from "react-stately";
|
|
18631
18673
|
import { jsx as jsx126 } from "react/jsx-runtime";
|
|
@@ -18637,7 +18679,7 @@ function ButtonMenu(props) {
|
|
|
18637
18679
|
onChange = props.onChange;
|
|
18638
18680
|
}
|
|
18639
18681
|
const state = useMenuTriggerState2({ isOpen: defaultOpen });
|
|
18640
|
-
const buttonRef =
|
|
18682
|
+
const buttonRef = useRef45(null);
|
|
18641
18683
|
const { menuTriggerProps, menuProps } = useMenuTrigger2({ isDisabled: !!disabled }, state, buttonRef);
|
|
18642
18684
|
const tid = useTestIds(
|
|
18643
18685
|
props,
|
|
@@ -18662,7 +18704,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
18662
18704
|
}
|
|
18663
18705
|
|
|
18664
18706
|
// src/components/Filters/FilterDropdownMenu.tsx
|
|
18665
|
-
import { memo as memo2, useMemo as useMemo35, useState as
|
|
18707
|
+
import { memo as memo2, useMemo as useMemo35, useState as useState42 } from "react";
|
|
18666
18708
|
|
|
18667
18709
|
// src/components/CountBadge.tsx
|
|
18668
18710
|
import { trussProps as trussProps66, maybeCssVar as maybeCssVar39 } from "@homebound/truss/runtime";
|
|
@@ -19103,7 +19145,7 @@ var CheckboxFilter = class extends BaseFilter {
|
|
|
19103
19145
|
};
|
|
19104
19146
|
|
|
19105
19147
|
// src/components/Filters/FilterModal.tsx
|
|
19106
|
-
import { useState as
|
|
19148
|
+
import { useState as useState41 } from "react";
|
|
19107
19149
|
|
|
19108
19150
|
// src/components/Modal/OpenModal.tsx
|
|
19109
19151
|
import { useEffect as useEffect26 } from "react";
|
|
@@ -19136,7 +19178,7 @@ function FilterModal(props) {
|
|
|
19136
19178
|
const {
|
|
19137
19179
|
closeModal
|
|
19138
19180
|
} = useModal();
|
|
19139
|
-
const [modalFilter, setModalFilter] =
|
|
19181
|
+
const [modalFilter, setModalFilter] = useState41(filter);
|
|
19140
19182
|
return /* @__PURE__ */ jsxs68(Fragment31, { children: [
|
|
19141
19183
|
/* @__PURE__ */ jsx137(ModalHeader, { children: "More Filters" }),
|
|
19142
19184
|
/* @__PURE__ */ jsx137(ModalBody, { children: /* @__PURE__ */ jsx137("div", { className: "df fdc", children: safeEntries(filters).map(([key, f]) => /* @__PURE__ */ jsx137(ModalFilterItem, { label: f.hideLabelInModal ? void 0 : f.label, children: f.render(modalFilter[key], (value) => setModalFilter(updateFilter(modalFilter, key, value)), testId, true, false) }, key)) }) }),
|
|
@@ -19277,7 +19319,7 @@ function FilterDropdownMenu(props) {
|
|
|
19277
19319
|
groupBy
|
|
19278
19320
|
} = props;
|
|
19279
19321
|
const testId = useTestIds(props, filterTestIdPrefix);
|
|
19280
|
-
const [isOpen, setIsOpen] =
|
|
19322
|
+
const [isOpen, setIsOpen] = useState42(false);
|
|
19281
19323
|
const activeFilterCount = useMemo35(() => getActiveFilterCount(filter), [filter]);
|
|
19282
19324
|
const filterImpls = useMemo35(() => buildFilterImpls(filterDefs), [filterDefs]);
|
|
19283
19325
|
const renderFilters = () => {
|
|
@@ -19408,7 +19450,7 @@ function toPageNumberSize(page) {
|
|
|
19408
19450
|
}
|
|
19409
19451
|
|
|
19410
19452
|
// src/components/Table/components/EditColumnsButton.tsx
|
|
19411
|
-
import { Fragment as Fragment33, useCallback as
|
|
19453
|
+
import { Fragment as Fragment33, useCallback as useCallback23, useMemo as useMemo36, useRef as useRef46 } from "react";
|
|
19412
19454
|
import { useMenuTrigger as useMenuTrigger3 } from "react-aria";
|
|
19413
19455
|
import { useMenuTriggerState as useMenuTriggerState3 } from "react-stately";
|
|
19414
19456
|
import { jsx as jsx142, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
@@ -19423,7 +19465,7 @@ function EditColumnsButton(props) {
|
|
|
19423
19465
|
const state = useMenuTriggerState3({
|
|
19424
19466
|
isOpen: defaultOpen
|
|
19425
19467
|
});
|
|
19426
|
-
const buttonRef =
|
|
19468
|
+
const buttonRef = useRef46(null);
|
|
19427
19469
|
const {
|
|
19428
19470
|
menuTriggerProps
|
|
19429
19471
|
} = useMenuTrigger3({
|
|
@@ -19441,7 +19483,7 @@ function EditColumnsButton(props) {
|
|
|
19441
19483
|
value: column2.id
|
|
19442
19484
|
})), [columns]);
|
|
19443
19485
|
const selectedValues = useComputed(() => api.getVisibleColumnIds(), [api]);
|
|
19444
|
-
const setSelectedValues =
|
|
19486
|
+
const setSelectedValues = useCallback23((ids) => {
|
|
19445
19487
|
api.resetColumnWidths();
|
|
19446
19488
|
api.setVisibleColumns(columns.filter((column2) => column2.canHide ? ids.includes(column2.id) : true).map((c) => c.id));
|
|
19447
19489
|
}, [columns, api]);
|
|
@@ -19636,7 +19678,7 @@ function useGridTableLayoutState({
|
|
|
19636
19678
|
const groupBy = useGroupBy(maybeGroupBy ?? {
|
|
19637
19679
|
none: "none"
|
|
19638
19680
|
});
|
|
19639
|
-
const [searchString, setSearchString] =
|
|
19681
|
+
const [searchString, setSearchString] = useState43("");
|
|
19640
19682
|
const columnsFallback = "unset-columns";
|
|
19641
19683
|
const [visibleColumnIds, setVisibleColumnIds] = useSessionStorage(persistedColumns?.storageKey ?? columnsFallback, void 0);
|
|
19642
19684
|
const paginationFallbackKey = "unset-pagination";
|
|
@@ -19646,7 +19688,7 @@ function useGridTableLayoutState({
|
|
|
19646
19688
|
100
|
|
19647
19689
|
// default page size
|
|
19648
19690
|
);
|
|
19649
|
-
const [page, setPage] =
|
|
19691
|
+
const [page, setPage] = useState43({
|
|
19650
19692
|
offset: 0,
|
|
19651
19693
|
limit: persistedPageSize
|
|
19652
19694
|
});
|
|
@@ -19723,7 +19765,7 @@ function SearchBox({
|
|
|
19723
19765
|
}, setQueryParams] = useQueryParams3({
|
|
19724
19766
|
search: StringParam2
|
|
19725
19767
|
});
|
|
19726
|
-
const [value, setValue] =
|
|
19768
|
+
const [value, setValue] = useState43(initialValue || "");
|
|
19727
19769
|
const [debouncedSearch] = useDebounce2(value, 300);
|
|
19728
19770
|
useEffect27(() => {
|
|
19729
19771
|
onSearch(debouncedSearch);
|
|
@@ -19748,7 +19790,7 @@ function PreventBrowserScroll({
|
|
|
19748
19790
|
}
|
|
19749
19791
|
|
|
19750
19792
|
// src/components/Layout/RightPaneLayout/RightPaneContext.tsx
|
|
19751
|
-
import React18, { useCallback as
|
|
19793
|
+
import React18, { useCallback as useCallback24, useContext as useContext17, useMemo as useMemo39, useState as useState44 } from "react";
|
|
19752
19794
|
import { jsx as jsx148 } from "react/jsx-runtime";
|
|
19753
19795
|
var RightPaneContext = React18.createContext({
|
|
19754
19796
|
openInPane: () => {
|
|
@@ -19761,17 +19803,17 @@ var RightPaneContext = React18.createContext({
|
|
|
19761
19803
|
rightPaneContent: null
|
|
19762
19804
|
});
|
|
19763
19805
|
function RightPaneProvider({ children }) {
|
|
19764
|
-
const [rightPaneContent, setRightPaneContent] =
|
|
19765
|
-
const [isRightPaneOpen, setIsRightPaneOpen] =
|
|
19766
|
-
const openInPane =
|
|
19806
|
+
const [rightPaneContent, setRightPaneContent] = useState44(void 0);
|
|
19807
|
+
const [isRightPaneOpen, setIsRightPaneOpen] = useState44(false);
|
|
19808
|
+
const openInPane = useCallback24(
|
|
19767
19809
|
(opts) => {
|
|
19768
19810
|
setRightPaneContent(opts?.content);
|
|
19769
19811
|
setIsRightPaneOpen(true);
|
|
19770
19812
|
},
|
|
19771
19813
|
[setRightPaneContent]
|
|
19772
19814
|
);
|
|
19773
|
-
const closePane =
|
|
19774
|
-
const clearPane =
|
|
19815
|
+
const closePane = useCallback24(() => setIsRightPaneOpen(false), []);
|
|
19816
|
+
const clearPane = useCallback24(() => setRightPaneContent(void 0), [setRightPaneContent]);
|
|
19775
19817
|
const context = useMemo39(
|
|
19776
19818
|
() => ({ openInPane, closePane, clearPane, rightPaneContent, isRightPaneOpen }),
|
|
19777
19819
|
[openInPane, closePane, rightPaneContent, clearPane, isRightPaneOpen]
|
|
@@ -19915,7 +19957,7 @@ function ScrollableFooter(props) {
|
|
|
19915
19957
|
|
|
19916
19958
|
// src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
|
|
19917
19959
|
import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
|
|
19918
|
-
import { useEffect as useEffect29, useState as
|
|
19960
|
+
import { useEffect as useEffect29, useState as useState45 } from "react";
|
|
19919
19961
|
|
|
19920
19962
|
// src/components/Layout/TableReviewLayout/SidePanel.tsx
|
|
19921
19963
|
import { jsx as jsx151, jsxs as jsxs77 } from "react/jsx-runtime";
|
|
@@ -19955,7 +19997,7 @@ function TableReviewLayout(props) {
|
|
|
19955
19997
|
rightPaneWidth = defaultRightPaneWidth
|
|
19956
19998
|
} = props;
|
|
19957
19999
|
const tid = useTestIds(props, "tableReviewLayout");
|
|
19958
|
-
const [isPanelVisible, setIsPanelVisible] =
|
|
20000
|
+
const [isPanelVisible, setIsPanelVisible] = useState45(!!panelContent);
|
|
19959
20001
|
useEffect29(() => {
|
|
19960
20002
|
setIsPanelVisible(!!panelContent);
|
|
19961
20003
|
}, [panelContent]);
|
|
@@ -20066,18 +20108,18 @@ var BeamContext = createContext8({
|
|
|
20066
20108
|
});
|
|
20067
20109
|
function BeamProvider({ children, ...presentationProps }) {
|
|
20068
20110
|
const [, tick] = useReducer((prev) => prev + 1, 0);
|
|
20069
|
-
const modalRef =
|
|
20111
|
+
const modalRef = useRef47();
|
|
20070
20112
|
const modalHeaderDiv = useMemo40(() => document.createElement("div"), []);
|
|
20071
20113
|
const modalBodyDiv = useMemo40(() => {
|
|
20072
20114
|
const el = document.createElement("div");
|
|
20073
20115
|
el.style.height = "100%";
|
|
20074
20116
|
return el;
|
|
20075
20117
|
}, []);
|
|
20076
|
-
const modalCanCloseChecksRef =
|
|
20118
|
+
const modalCanCloseChecksRef = useRef47([]);
|
|
20077
20119
|
const modalFooterDiv = useMemo40(() => document.createElement("div"), []);
|
|
20078
|
-
const drawerContentStackRef =
|
|
20079
|
-
const drawerCanCloseChecks =
|
|
20080
|
-
const drawerCanCloseDetailsChecks =
|
|
20120
|
+
const drawerContentStackRef = useRef47([]);
|
|
20121
|
+
const drawerCanCloseChecks = useRef47([]);
|
|
20122
|
+
const drawerCanCloseDetailsChecks = useRef47([]);
|
|
20081
20123
|
const sdHeaderDiv = useMemo40(() => document.createElement("div"), []);
|
|
20082
20124
|
const context = useMemo40(() => {
|
|
20083
20125
|
return {
|
|
@@ -20120,14 +20162,14 @@ function useBeamContext() {
|
|
|
20120
20162
|
}
|
|
20121
20163
|
|
|
20122
20164
|
// src/components/ButtonDatePicker.tsx
|
|
20123
|
-
import { useRef as
|
|
20165
|
+
import { useRef as useRef48 } from "react";
|
|
20124
20166
|
import { useMenuTrigger as useMenuTrigger4 } from "react-aria";
|
|
20125
20167
|
import { useMenuTriggerState as useMenuTriggerState4 } from "react-stately";
|
|
20126
20168
|
import { jsx as jsx154 } from "react/jsx-runtime";
|
|
20127
20169
|
function ButtonDatePicker(props) {
|
|
20128
20170
|
const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
|
|
20129
20171
|
const state = useMenuTriggerState4({ isOpen: defaultOpen });
|
|
20130
|
-
const buttonRef =
|
|
20172
|
+
const buttonRef = useRef48(null);
|
|
20131
20173
|
const {
|
|
20132
20174
|
menuTriggerProps,
|
|
20133
20175
|
menuProps: { autoFocus: _af, ...menuProps }
|
|
@@ -20150,7 +20192,7 @@ function ButtonDatePicker(props) {
|
|
|
20150
20192
|
}
|
|
20151
20193
|
|
|
20152
20194
|
// src/components/ButtonGroup.tsx
|
|
20153
|
-
import { useRef as
|
|
20195
|
+
import { useRef as useRef49 } from "react";
|
|
20154
20196
|
import { useButton as useButton10, useFocusRing as useFocusRing12, useHover as useHover15 } from "react-aria";
|
|
20155
20197
|
import { trussProps as trussProps74 } from "@homebound/truss/runtime";
|
|
20156
20198
|
import { jsx as jsx155, jsxs as jsxs80 } from "react/jsx-runtime";
|
|
@@ -20198,7 +20240,7 @@ function GroupButton(props) {
|
|
|
20198
20240
|
isDisabled: !!disabled,
|
|
20199
20241
|
...otherProps
|
|
20200
20242
|
};
|
|
20201
|
-
const ref =
|
|
20243
|
+
const ref = useRef49(null);
|
|
20202
20244
|
const {
|
|
20203
20245
|
buttonProps,
|
|
20204
20246
|
isPressed
|
|
@@ -20321,7 +20363,7 @@ import { useHover as useHover16 } from "react-aria";
|
|
|
20321
20363
|
|
|
20322
20364
|
// src/components/Tag.tsx
|
|
20323
20365
|
import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
|
|
20324
|
-
import { useRef as
|
|
20366
|
+
import { useRef as useRef50, useState as useState46 } from "react";
|
|
20325
20367
|
import { trussProps as trussProps75 } from "@homebound/truss/runtime";
|
|
20326
20368
|
import { jsx as jsx156, jsxs as jsxs81 } from "react/jsx-runtime";
|
|
20327
20369
|
function Tag(props) {
|
|
@@ -20334,8 +20376,8 @@ function Tag(props) {
|
|
|
20334
20376
|
} = props;
|
|
20335
20377
|
const typeStyles2 = getStyles(type);
|
|
20336
20378
|
const tid = useTestIds(otherProps);
|
|
20337
|
-
const [showTooltip, setShowTooltip] =
|
|
20338
|
-
const ref =
|
|
20379
|
+
const [showTooltip, setShowTooltip] = useState46(false);
|
|
20380
|
+
const ref = useRef50(null);
|
|
20339
20381
|
useResizeObserver4({
|
|
20340
20382
|
ref,
|
|
20341
20383
|
onResize: () => {
|
|
@@ -20544,7 +20586,7 @@ function Copy(props) {
|
|
|
20544
20586
|
|
|
20545
20587
|
// src/components/DnDGrid/DnDGrid.tsx
|
|
20546
20588
|
import equal2 from "fast-deep-equal";
|
|
20547
|
-
import { useCallback as
|
|
20589
|
+
import { useCallback as useCallback25, useRef as useRef51 } from "react";
|
|
20548
20590
|
|
|
20549
20591
|
// src/components/DnDGrid/DnDGridContext.tsx
|
|
20550
20592
|
import { createContext as createContext9, useContext as useContext19 } from "react";
|
|
@@ -20567,12 +20609,12 @@ function DnDGrid(props) {
|
|
|
20567
20609
|
onReorder,
|
|
20568
20610
|
activeItemStyles
|
|
20569
20611
|
} = props;
|
|
20570
|
-
const gridEl =
|
|
20571
|
-
const dragEl =
|
|
20572
|
-
const cloneEl =
|
|
20573
|
-
const initialOrder =
|
|
20574
|
-
const reorderViaKeyboard =
|
|
20575
|
-
const transformFrom =
|
|
20612
|
+
const gridEl = useRef51(null);
|
|
20613
|
+
const dragEl = useRef51();
|
|
20614
|
+
const cloneEl = useRef51();
|
|
20615
|
+
const initialOrder = useRef51();
|
|
20616
|
+
const reorderViaKeyboard = useRef51(false);
|
|
20617
|
+
const transformFrom = useRef51({
|
|
20576
20618
|
x: 0,
|
|
20577
20619
|
y: 0
|
|
20578
20620
|
});
|
|
@@ -20580,19 +20622,19 @@ function DnDGrid(props) {
|
|
|
20580
20622
|
const activeStyles3 = activeItemStyles ?? {
|
|
20581
20623
|
boxShadow: "bshModal"
|
|
20582
20624
|
};
|
|
20583
|
-
const getGridItems =
|
|
20625
|
+
const getGridItems = useCallback25(() => {
|
|
20584
20626
|
return gridEl.current ? Array.from(gridEl.current.querySelectorAll(`[${gridItemIdKey}]`)) : [];
|
|
20585
20627
|
}, []);
|
|
20586
|
-
const getGridItemIdOrder =
|
|
20628
|
+
const getGridItemIdOrder = useCallback25(() => {
|
|
20587
20629
|
return getGridItems().map((child) => child.getAttribute(gridItemIdKey)).filter(isDefined);
|
|
20588
20630
|
}, [getGridItems]);
|
|
20589
|
-
const initReorder =
|
|
20631
|
+
const initReorder = useCallback25(() => {
|
|
20590
20632
|
if (gridEl.current && dragEl.current) {
|
|
20591
20633
|
initialOrder.current = getGridItemIdOrder();
|
|
20592
20634
|
setInlineStyles(dragEl.current, activeStyles3);
|
|
20593
20635
|
}
|
|
20594
20636
|
}, [getGridItemIdOrder, activeStyles3]);
|
|
20595
|
-
const commitReorder =
|
|
20637
|
+
const commitReorder = useCallback25(() => {
|
|
20596
20638
|
if (gridEl.current && dragEl.current) {
|
|
20597
20639
|
const currentOrder = getGridItemIdOrder();
|
|
20598
20640
|
if (!equal2(currentOrder, initialOrder.current)) onReorder(currentOrder);
|
|
@@ -20602,7 +20644,7 @@ function DnDGrid(props) {
|
|
|
20602
20644
|
initialOrder.current = currentOrder;
|
|
20603
20645
|
}
|
|
20604
20646
|
}, [onReorder, getGridItemIdOrder, activeStyles3]);
|
|
20605
|
-
const cancelReorder =
|
|
20647
|
+
const cancelReorder = useCallback25(() => {
|
|
20606
20648
|
if (gridEl.current && dragEl.current && initialOrder.current) {
|
|
20607
20649
|
const currentOrder = getGridItemIdOrder();
|
|
20608
20650
|
if (!equal2(currentOrder, initialOrder.current)) {
|
|
@@ -20624,7 +20666,7 @@ function DnDGrid(props) {
|
|
|
20624
20666
|
reorderViaKeyboard.current = false;
|
|
20625
20667
|
}
|
|
20626
20668
|
}, [getGridItemIdOrder, getGridItems, activeStyles3]);
|
|
20627
|
-
const onMove =
|
|
20669
|
+
const onMove = useCallback25((e) => {
|
|
20628
20670
|
if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
|
|
20629
20671
|
const clientX = "clientX" in e ? e.clientX : e.touches[0].clientX;
|
|
20630
20672
|
const clientY = "clientY" in e ? e.clientY : e.touches[0].clientY;
|
|
@@ -20647,7 +20689,7 @@ function DnDGrid(props) {
|
|
|
20647
20689
|
}
|
|
20648
20690
|
}
|
|
20649
20691
|
}, []);
|
|
20650
|
-
const onDragStart =
|
|
20692
|
+
const onDragStart = useCallback25((e) => {
|
|
20651
20693
|
if (!reorderViaKeyboard.current && dragEl.current && gridEl.current) {
|
|
20652
20694
|
initReorder();
|
|
20653
20695
|
const rect = dragEl.current.getBoundingClientRect();
|
|
@@ -20677,7 +20719,7 @@ function DnDGrid(props) {
|
|
|
20677
20719
|
gridEl.current.addEventListener("touchmove", onMove);
|
|
20678
20720
|
}
|
|
20679
20721
|
}, [initReorder, onMove, activeStyles3]);
|
|
20680
|
-
const onDragEnd =
|
|
20722
|
+
const onDragEnd = useCallback25((e) => {
|
|
20681
20723
|
if (!reorderViaKeyboard.current && dragEl.current && cloneEl.current && gridEl.current) {
|
|
20682
20724
|
e.preventDefault();
|
|
20683
20725
|
cloneEl.current.replaceWith(dragEl.current);
|
|
@@ -20690,7 +20732,7 @@ function DnDGrid(props) {
|
|
|
20690
20732
|
gridEl.current.removeEventListener("touchmove", onMove);
|
|
20691
20733
|
}
|
|
20692
20734
|
}, [commitReorder, onMove]);
|
|
20693
|
-
const onDragHandleKeyDown =
|
|
20735
|
+
const onDragHandleKeyDown = useCallback25((e) => {
|
|
20694
20736
|
const moveHandle = e.target;
|
|
20695
20737
|
if (dragEl.current instanceof HTMLElement && moveHandle instanceof HTMLElement && gridEl.current) {
|
|
20696
20738
|
const isSpaceKey = e.key === " ";
|
|
@@ -21035,26 +21077,51 @@ function HbSpinnerProvider({
|
|
|
21035
21077
|
return /* @__PURE__ */ jsx163(HbLoadingSpinnerContext.Provider, { value: state, children });
|
|
21036
21078
|
}
|
|
21037
21079
|
|
|
21038
|
-
// src/components/
|
|
21039
|
-
import { useLayoutEffect as useLayoutEffect2, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
21040
|
-
import { useCallback as useCallback25, useEffect as useEffect31, useRef as useRef51, useState as useState46 } from "react";
|
|
21080
|
+
// src/components/HomeboundLogo.tsx
|
|
21041
21081
|
import { trussProps as trussProps81, maybeCssVar as maybeCssVar45 } from "@homebound/truss/runtime";
|
|
21042
|
-
import { jsx as jsx164
|
|
21082
|
+
import { jsx as jsx164 } from "react/jsx-runtime";
|
|
21083
|
+
var __maybeInc13 = (inc) => {
|
|
21084
|
+
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
21085
|
+
};
|
|
21086
|
+
function HomeboundLogo(props) {
|
|
21087
|
+
const {
|
|
21088
|
+
fill = "currentColor",
|
|
21089
|
+
width: width2 = "auto",
|
|
21090
|
+
height = "auto"
|
|
21091
|
+
} = props;
|
|
21092
|
+
return /* @__PURE__ */ jsx164("svg", { viewBox: "0 0 158.1 97.6", xmlns: "http://www.w3.org/2000/svg", ...trussProps81({
|
|
21093
|
+
fill: ["fill_var", {
|
|
21094
|
+
"--fill": maybeCssVar45(fill)
|
|
21095
|
+
}],
|
|
21096
|
+
width: ["w_var", {
|
|
21097
|
+
"--width": maybeCssVar45(__maybeInc13(width2))
|
|
21098
|
+
}],
|
|
21099
|
+
height: ["h_var", {
|
|
21100
|
+
"--height": maybeCssVar45(__maybeInc13(height))
|
|
21101
|
+
}]
|
|
21102
|
+
}), children: /* @__PURE__ */ jsx164("path", { d: "M158.1,97.6H0.2L0,39.7L76.8,0l68,38.7l-3.1,5.3l-65-37L6.2,43.4l0.2,48h151.7V97.6z" }) });
|
|
21103
|
+
}
|
|
21104
|
+
|
|
21105
|
+
// src/components/MaxLines.tsx
|
|
21106
|
+
import { useLayoutEffect as useLayoutEffect3, useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
21107
|
+
import { useCallback as useCallback26, useEffect as useEffect31, useRef as useRef52, useState as useState47 } from "react";
|
|
21108
|
+
import { trussProps as trussProps82, maybeCssVar as maybeCssVar46 } from "@homebound/truss/runtime";
|
|
21109
|
+
import { jsx as jsx165, jsxs as jsxs84 } from "react/jsx-runtime";
|
|
21043
21110
|
function MaxLines({
|
|
21044
21111
|
maxLines,
|
|
21045
21112
|
children
|
|
21046
21113
|
}) {
|
|
21047
|
-
const elRef =
|
|
21048
|
-
const [hasMore, setHasMore] =
|
|
21049
|
-
const [expanded, setExpanded] =
|
|
21050
|
-
|
|
21114
|
+
const elRef = useRef52(null);
|
|
21115
|
+
const [hasMore, setHasMore] = useState47(false);
|
|
21116
|
+
const [expanded, setExpanded] = useState47(false);
|
|
21117
|
+
useLayoutEffect3(() => {
|
|
21051
21118
|
if (!elRef.current) return;
|
|
21052
21119
|
setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
21053
21120
|
}, []);
|
|
21054
21121
|
useEffect31(() => {
|
|
21055
21122
|
setExpanded(false);
|
|
21056
21123
|
}, [children]);
|
|
21057
|
-
const onResize =
|
|
21124
|
+
const onResize = useCallback26(() => {
|
|
21058
21125
|
if (!elRef.current) return;
|
|
21059
21126
|
!expanded && setHasMore(elRef.current.scrollHeight > elRef.current.clientHeight);
|
|
21060
21127
|
}, [expanded]);
|
|
@@ -21063,10 +21130,10 @@ function MaxLines({
|
|
|
21063
21130
|
onResize
|
|
21064
21131
|
});
|
|
21065
21132
|
return /* @__PURE__ */ jsxs84("div", { children: [
|
|
21066
|
-
/* @__PURE__ */
|
|
21133
|
+
/* @__PURE__ */ jsx165("div", { ref: elRef, ...trussProps82({
|
|
21067
21134
|
...!expanded ? {
|
|
21068
21135
|
WebkitLineClamp: ["lineClamp_var", {
|
|
21069
|
-
"--WebkitLineClamp":
|
|
21136
|
+
"--WebkitLineClamp": maybeCssVar46(maxLines)
|
|
21070
21137
|
}],
|
|
21071
21138
|
overflow: "oh",
|
|
21072
21139
|
display: "d_negwebkit_box",
|
|
@@ -21074,837 +21141,1010 @@ function MaxLines({
|
|
|
21074
21141
|
textOverflow: "to_ellipsis"
|
|
21075
21142
|
} : {}
|
|
21076
21143
|
}), children }),
|
|
21077
|
-
hasMore && /* @__PURE__ */
|
|
21144
|
+
hasMore && /* @__PURE__ */ jsx165("button", { className: "db fw4 fz_14px lh_20px", onClick: () => setExpanded((prev) => !prev), children: expanded ? "Show Less" : "Show More" })
|
|
21078
21145
|
] });
|
|
21079
21146
|
}
|
|
21080
21147
|
|
|
21081
|
-
// src/components/
|
|
21082
|
-
import { camelCase as
|
|
21083
|
-
|
|
21084
|
-
|
|
21085
|
-
import {
|
|
21086
|
-
import {
|
|
21087
|
-
import {
|
|
21088
|
-
|
|
21089
|
-
|
|
21090
|
-
|
|
21091
|
-
|
|
21092
|
-
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
/* @__PURE__ */ jsx165(TabContent, { ...props, contentXss: {
|
|
21096
|
-
...styles,
|
|
21097
|
-
...props.contentXss
|
|
21098
|
-
} })
|
|
21099
|
-
] });
|
|
21100
|
-
}
|
|
21101
|
-
function TabContent(props) {
|
|
21102
|
-
const tid = useTestIds(props, "tab");
|
|
21148
|
+
// src/components/AppNav/AppNavItems.tsx
|
|
21149
|
+
import { camelCase as camelCase6 } from "change-case";
|
|
21150
|
+
|
|
21151
|
+
// src/components/AppNav/AppNavGroup.tsx
|
|
21152
|
+
import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
21153
|
+
import { camelCase as camelCase5, kebabCase } from "change-case";
|
|
21154
|
+
import { useCallback as useCallback28, useEffect as useEffect32, useMemo as useMemo48, useState as useState49 } from "react";
|
|
21155
|
+
|
|
21156
|
+
// src/components/AppNav/AppNavGroupTrigger.tsx
|
|
21157
|
+
import { useMemo as useMemo47, useRef as useRef53 } from "react";
|
|
21158
|
+
import { mergeProps as mergeProps25, useButton as useButton11, useFocusRing as useFocusRing14, useHover as useHover18 } from "react-aria";
|
|
21159
|
+
import { trussProps as trussProps83, mergeProps as mergeProps_14 } from "@homebound/truss/runtime";
|
|
21160
|
+
import { jsx as jsx166, jsxs as jsxs85 } from "react/jsx-runtime";
|
|
21161
|
+
function AppNavGroupTrigger(props) {
|
|
21103
21162
|
const {
|
|
21104
|
-
|
|
21105
|
-
|
|
21106
|
-
|
|
21163
|
+
label,
|
|
21164
|
+
navGroupId,
|
|
21165
|
+
expanded,
|
|
21166
|
+
onClick
|
|
21107
21167
|
} = props;
|
|
21108
|
-
const
|
|
21109
|
-
const
|
|
21110
|
-
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
21111
|
-
return paths.some((p) => !!matchPath({
|
|
21112
|
-
path: p,
|
|
21113
|
-
end: true
|
|
21114
|
-
}, location.pathname));
|
|
21115
|
-
}) || tabs[0] : props.tabs.find((tab) => tab.value === props.selected) || tabs[0];
|
|
21116
|
-
const uniqueValue = uniqueTabValue(selectedTab);
|
|
21117
|
-
return (
|
|
21118
|
-
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
21119
|
-
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
21120
|
-
/* @__PURE__ */ jsx165(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx165("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps82(contentXss), children: selectedTab.render() }) })
|
|
21121
|
-
);
|
|
21122
|
-
}
|
|
21123
|
-
function Tabs(props) {
|
|
21168
|
+
const tid = useTestIds(props, "trigger");
|
|
21169
|
+
const ref = useRef53(null);
|
|
21124
21170
|
const {
|
|
21125
|
-
|
|
21126
|
-
|
|
21127
|
-
|
|
21128
|
-
|
|
21129
|
-
|
|
21130
|
-
}
|
|
21131
|
-
const
|
|
21132
|
-
|
|
21133
|
-
|
|
21134
|
-
|
|
21135
|
-
path: p,
|
|
21136
|
-
end: true
|
|
21137
|
-
}, location.pathname));
|
|
21138
|
-
}) || props.tabs[0]) : props.selected;
|
|
21171
|
+
buttonProps,
|
|
21172
|
+
isPressed
|
|
21173
|
+
} = useButton11({
|
|
21174
|
+
onPress: onClick,
|
|
21175
|
+
elementType: "button"
|
|
21176
|
+
}, ref);
|
|
21177
|
+
const {
|
|
21178
|
+
hoverProps,
|
|
21179
|
+
isHovered
|
|
21180
|
+
} = useHover18({});
|
|
21139
21181
|
const {
|
|
21140
21182
|
isFocusVisible,
|
|
21141
21183
|
focusProps
|
|
21142
21184
|
} = useFocusRing14();
|
|
21143
|
-
const tid = useTestIds(others, "tabs");
|
|
21144
|
-
const [active, setActive] = useState47(selected);
|
|
21145
|
-
const ref = useRef52(null);
|
|
21146
|
-
useEffect32(() => setActive(selected), [selected]);
|
|
21147
|
-
function onKeyUp(e) {
|
|
21148
|
-
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
21149
|
-
const nextTabValue = getNextTabValue(active, e.key, tabs);
|
|
21150
|
-
setActive(nextTabValue);
|
|
21151
|
-
document.getElementById(`${nextTabValue}-tab`)?.focus();
|
|
21152
|
-
}
|
|
21153
|
-
}
|
|
21154
|
-
function onClick(value) {
|
|
21155
|
-
!isRouteTabs(props) && props.onChange(value);
|
|
21156
|
-
}
|
|
21157
|
-
function onBlur(e) {
|
|
21158
|
-
if (!(ref.current && ref.current.contains(e.relatedTarget))) {
|
|
21159
|
-
setActive(selected);
|
|
21160
|
-
}
|
|
21161
|
-
}
|
|
21162
|
-
return /* @__PURE__ */ jsxs85("div", { ...trussProps82({
|
|
21163
|
-
...{
|
|
21164
|
-
display: "df",
|
|
21165
|
-
alignItems: "aic",
|
|
21166
|
-
overflow: "oa",
|
|
21167
|
-
whiteSpace: "wsnw",
|
|
21168
|
-
gap: "gap1"
|
|
21169
|
-
},
|
|
21170
|
-
...includeBottomBorder ? {
|
|
21171
|
-
...{
|
|
21172
|
-
borderBottomStyle: "bbs_solid",
|
|
21173
|
-
borderBottomWidth: "bbw_1px",
|
|
21174
|
-
borderColor: "bcGray200"
|
|
21175
|
-
}
|
|
21176
|
-
} : {}
|
|
21177
|
-
}), children: [
|
|
21178
|
-
!hideTabs(props) && /* @__PURE__ */ jsx165("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
21179
|
-
const uniqueValue = uniqueTabValue(tab);
|
|
21180
|
-
return /* @__PURE__ */ jsx165(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
21181
|
-
}) }),
|
|
21182
|
-
right && /* @__PURE__ */ jsx165("div", { className: "mla df aic gap1 pb1", children: right })
|
|
21183
|
-
] });
|
|
21184
|
-
}
|
|
21185
|
-
function TabImpl(props) {
|
|
21186
|
-
const {
|
|
21187
|
-
tab,
|
|
21188
|
-
onClick,
|
|
21189
|
-
active,
|
|
21190
|
-
onKeyUp,
|
|
21191
|
-
onBlur,
|
|
21192
|
-
focusProps,
|
|
21193
|
-
isFocusVisible = false,
|
|
21194
|
-
...others
|
|
21195
|
-
} = props;
|
|
21196
|
-
const {
|
|
21197
|
-
disabled = false,
|
|
21198
|
-
name: label,
|
|
21199
|
-
icon,
|
|
21200
|
-
endAdornment
|
|
21201
|
-
} = tab;
|
|
21202
|
-
const isDisabled = !!disabled;
|
|
21203
|
-
const {
|
|
21204
|
-
hoverProps,
|
|
21205
|
-
isHovered
|
|
21206
|
-
} = useHover18({
|
|
21207
|
-
isDisabled
|
|
21208
|
-
});
|
|
21209
21185
|
const {
|
|
21210
21186
|
baseStyles: baseStyles5,
|
|
21211
|
-
activeStyles: activeStyles3,
|
|
21212
21187
|
focusRingStyles: focusRingStyles2,
|
|
21213
21188
|
hoverStyles: hoverStyles4,
|
|
21214
|
-
|
|
21215
|
-
|
|
21216
|
-
|
|
21217
|
-
|
|
21218
|
-
|
|
21219
|
-
"aria-controls":
|
|
21220
|
-
|
|
21221
|
-
"aria-disabled": isDisabled || void 0,
|
|
21222
|
-
id: `${uniqueValue}-tab`,
|
|
21223
|
-
role: "tab",
|
|
21224
|
-
tabIndex: active ? 0 : -1,
|
|
21225
|
-
...others,
|
|
21226
|
-
...trussProps82({
|
|
21189
|
+
pressedStyles: pressedStyles2
|
|
21190
|
+
} = useMemo47(() => getNavLinkStyles("side"), []);
|
|
21191
|
+
return /* @__PURE__ */ jsxs85("button", { type: "button", ...mergeProps25(buttonProps, focusProps, hoverProps, tid.trigger, {
|
|
21192
|
+
ref,
|
|
21193
|
+
"aria-expanded": expanded,
|
|
21194
|
+
"aria-controls": navGroupId,
|
|
21195
|
+
...mergeProps_14(navLink, void 0, {
|
|
21227
21196
|
...baseStyles5,
|
|
21228
|
-
...
|
|
21229
|
-
...isDisabled && disabledStyles4,
|
|
21197
|
+
...isFocusVisible && focusRingStyles2,
|
|
21230
21198
|
...isHovered && hoverStyles4,
|
|
21231
|
-
...
|
|
21232
|
-
...isFocusVisible && active && focusRingStyles2
|
|
21199
|
+
...isPressed && pressedStyles2
|
|
21233
21200
|
})
|
|
21234
|
-
}
|
|
21235
|
-
const interactiveProps = mergeProps25(focusProps, hoverProps, {
|
|
21236
|
-
onKeyUp,
|
|
21237
|
-
onBlur,
|
|
21238
|
-
...isRouteTab(tab) ? {} : {
|
|
21239
|
-
onClick: () => onClick(tab.value)
|
|
21240
|
-
}
|
|
21241
|
-
});
|
|
21242
|
-
const tabLabel = /* @__PURE__ */ jsxs85(Fragment38, { children: [
|
|
21201
|
+
}), children: [
|
|
21243
21202
|
label,
|
|
21244
|
-
|
|
21203
|
+
/* @__PURE__ */ jsx166("span", { ...trussProps83({
|
|
21204
|
+
...{
|
|
21205
|
+
display: "df",
|
|
21206
|
+
alignItems: "aic",
|
|
21207
|
+
marginLeft: "marginLeft_auto",
|
|
21208
|
+
transition: "transitionTransform"
|
|
21209
|
+
},
|
|
21210
|
+
...props.expanded ? {
|
|
21211
|
+
transform: "transform_rotate_180deg"
|
|
21212
|
+
} : {}
|
|
21213
|
+
}), children: /* @__PURE__ */ jsx166(Icon, { icon: "chevronDown" }) })
|
|
21245
21214
|
] });
|
|
21246
|
-
return isDisabled ? maybeTooltip({
|
|
21247
|
-
title: resolveTooltip(disabled),
|
|
21248
|
-
placement: "top",
|
|
21249
|
-
children: /* @__PURE__ */ jsx165("div", { ...tabProps, children: tabLabel })
|
|
21250
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx165(Link5, { ...mergeProps25(tabProps, interactiveProps, {
|
|
21251
|
-
className: "navLink"
|
|
21252
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx165("button", { ...{
|
|
21253
|
-
...tabProps,
|
|
21254
|
-
...interactiveProps
|
|
21255
|
-
}, children: tabLabel });
|
|
21256
21215
|
}
|
|
21257
|
-
|
|
21258
|
-
|
|
21259
|
-
|
|
21260
|
-
|
|
21261
|
-
|
|
21262
|
-
|
|
21263
|
-
|
|
21264
|
-
|
|
21265
|
-
|
|
21266
|
-
|
|
21267
|
-
|
|
21268
|
-
|
|
21269
|
-
return {
|
|
21270
|
-
|
|
21271
|
-
|
|
21272
|
-
|
|
21273
|
-
|
|
21274
|
-
|
|
21275
|
-
|
|
21276
|
-
|
|
21277
|
-
|
|
21278
|
-
|
|
21279
|
-
|
|
21280
|
-
|
|
21281
|
-
|
|
21282
|
-
|
|
21283
|
-
|
|
21284
|
-
|
|
21285
|
-
|
|
21286
|
-
|
|
21287
|
-
|
|
21288
|
-
|
|
21289
|
-
}
|
|
21290
|
-
|
|
21291
|
-
|
|
21292
|
-
|
|
21293
|
-
|
|
21294
|
-
|
|
21295
|
-
|
|
21296
|
-
|
|
21297
|
-
|
|
21298
|
-
|
|
21299
|
-
|
|
21300
|
-
|
|
21301
|
-
|
|
21302
|
-
|
|
21303
|
-
}
|
|
21304
|
-
|
|
21305
|
-
|
|
21306
|
-
|
|
21307
|
-
|
|
21308
|
-
|
|
21309
|
-
|
|
21310
|
-
|
|
21311
|
-
|
|
21312
|
-
|
|
21313
|
-
|
|
21314
|
-
activeHoverStyles: {
|
|
21315
|
-
...{
|
|
21316
|
-
backgroundColor: "bgBlue50",
|
|
21317
|
-
borderColor: "bcBlue700"
|
|
21318
|
-
},
|
|
21319
|
-
...borderBottomStyles
|
|
21216
|
+
|
|
21217
|
+
// src/components/AppNav/appNavUtils.ts
|
|
21218
|
+
function isAppNavLink(item) {
|
|
21219
|
+
return !("items" in item);
|
|
21220
|
+
}
|
|
21221
|
+
function isAppNavSection(item) {
|
|
21222
|
+
return "section" in item && item.section === true;
|
|
21223
|
+
}
|
|
21224
|
+
function isAppNavGroup(item) {
|
|
21225
|
+
return "items" in item && Array.isArray(item.items) && "label" in item && !isAppNavSection(item);
|
|
21226
|
+
}
|
|
21227
|
+
function appNavLinkGroupLinks(linkGroup) {
|
|
21228
|
+
return linkGroup.items.flatMap((item) => {
|
|
21229
|
+
if (isAppNavLink(item)) {
|
|
21230
|
+
return [item];
|
|
21231
|
+
}
|
|
21232
|
+
if (isAppNavSection(item)) {
|
|
21233
|
+
return item.items.flatMap((child) => {
|
|
21234
|
+
if (isAppNavLink(child)) {
|
|
21235
|
+
return [child];
|
|
21236
|
+
}
|
|
21237
|
+
if (isAppNavGroup(child)) {
|
|
21238
|
+
return appNavLinkGroupLinks(child);
|
|
21239
|
+
}
|
|
21240
|
+
if (isAppNavSection(child)) {
|
|
21241
|
+
return appNavSectionLinks(child);
|
|
21242
|
+
}
|
|
21243
|
+
return [];
|
|
21244
|
+
});
|
|
21245
|
+
}
|
|
21246
|
+
if (isAppNavGroup(item)) {
|
|
21247
|
+
return appNavLinkGroupLinks(item);
|
|
21248
|
+
}
|
|
21249
|
+
return [];
|
|
21250
|
+
});
|
|
21251
|
+
}
|
|
21252
|
+
function appNavSectionLinks(section) {
|
|
21253
|
+
return section.items.flatMap((child) => {
|
|
21254
|
+
if (isAppNavLink(child)) {
|
|
21255
|
+
return [child];
|
|
21256
|
+
}
|
|
21257
|
+
if (isAppNavGroup(child)) {
|
|
21258
|
+
return appNavLinkGroupLinks(child);
|
|
21259
|
+
}
|
|
21260
|
+
if (isAppNavSection(child)) {
|
|
21261
|
+
return appNavSectionLinks(child);
|
|
21262
|
+
}
|
|
21263
|
+
return [];
|
|
21264
|
+
});
|
|
21265
|
+
}
|
|
21266
|
+
function appNavLinkGroupMenuSections(linkGroup) {
|
|
21267
|
+
const sections = [];
|
|
21268
|
+
let flatLinks = [];
|
|
21269
|
+
const flushFlatLinks = () => {
|
|
21270
|
+
if (flatLinks.length > 0) {
|
|
21271
|
+
sections.push(flatLinks);
|
|
21272
|
+
flatLinks = [];
|
|
21320
21273
|
}
|
|
21321
21274
|
};
|
|
21275
|
+
for (const item of linkGroup.items) {
|
|
21276
|
+
if (isAppNavSection(item)) {
|
|
21277
|
+
flushFlatLinks();
|
|
21278
|
+
sections.push(appNavSectionLinks(item));
|
|
21279
|
+
} else if (isAppNavLink(item)) {
|
|
21280
|
+
flatLinks.push(item);
|
|
21281
|
+
} else if (isAppNavGroup(item)) {
|
|
21282
|
+
flushFlatLinks();
|
|
21283
|
+
sections.push(appNavLinkGroupLinks(item));
|
|
21284
|
+
}
|
|
21285
|
+
}
|
|
21286
|
+
flushFlatLinks();
|
|
21287
|
+
return sections;
|
|
21322
21288
|
}
|
|
21323
|
-
function
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
|
|
21328
|
-
return uniqueTabValue(tabsToScan[nextIndex]);
|
|
21289
|
+
function appNavItemKey(item) {
|
|
21290
|
+
if (isAppNavLink(item)) return item.label;
|
|
21291
|
+
if (isAppNavGroup(item)) return item.label;
|
|
21292
|
+
if (item.label) return item.label;
|
|
21293
|
+
return `section-${item.items.map((child) => appNavItemKey(child)).join("--")}`;
|
|
21329
21294
|
}
|
|
21330
|
-
function
|
|
21331
|
-
|
|
21332
|
-
|
|
21333
|
-
|
|
21334
|
-
|
|
21295
|
+
function linkGroupToMenuItems(linkGroup) {
|
|
21296
|
+
return appNavLinkGroupMenuSections(linkGroup).flatMap(
|
|
21297
|
+
(sectionLinks, sectionIndex) => sectionLinks.map((link, itemIndex) => {
|
|
21298
|
+
const { onClick } = link;
|
|
21299
|
+
return {
|
|
21300
|
+
label: link.label,
|
|
21301
|
+
// nav-link handlers take a PressEvent; the Menu calls onClick with none, so drop the arg.
|
|
21302
|
+
onClick: typeof onClick === "function" ? () => void onClick() : onClick ?? "",
|
|
21303
|
+
disabled: link.disabled,
|
|
21304
|
+
...sectionIndex > 0 && itemIndex === 0 ? { hasDivider: true } : {}
|
|
21305
|
+
};
|
|
21306
|
+
})
|
|
21307
|
+
);
|
|
21335
21308
|
}
|
|
21336
|
-
function
|
|
21337
|
-
return
|
|
21309
|
+
function linkGroupHasActiveLink(linkGroup) {
|
|
21310
|
+
return appNavLinkGroupLinks(linkGroup).some((link) => link.active);
|
|
21338
21311
|
}
|
|
21339
|
-
function
|
|
21340
|
-
return
|
|
21312
|
+
function allItemsHaveIcons(items) {
|
|
21313
|
+
return items.every((item) => entryHasIcons(item));
|
|
21341
21314
|
}
|
|
21342
|
-
function
|
|
21343
|
-
|
|
21315
|
+
function entryHasIcons(item) {
|
|
21316
|
+
if (isAppNavLink(item)) return !!item.icon;
|
|
21317
|
+
if (isAppNavGroup(item)) return appNavLinkGroupLinks(item).every((link) => !!link.icon);
|
|
21318
|
+
return item.items.every((child) => entryHasIcons(child));
|
|
21344
21319
|
}
|
|
21345
21320
|
|
|
21346
|
-
// src/components/
|
|
21347
|
-
import {
|
|
21348
|
-
|
|
21349
|
-
function
|
|
21350
|
-
|
|
21351
|
-
|
|
21352
|
-
|
|
21353
|
-
|
|
21354
|
-
|
|
21355
|
-
}
|
|
21356
|
-
|
|
21357
|
-
|
|
21358
|
-
|
|
21359
|
-
|
|
21360
|
-
|
|
21361
|
-
|
|
21362
|
-
|
|
21363
|
-
|
|
21364
|
-
|
|
21365
|
-
|
|
21366
|
-
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21370
|
-
|
|
21371
|
-
|
|
21372
|
-
|
|
21373
|
-
|
|
21374
|
-
|
|
21375
|
-
|
|
21376
|
-
|
|
21377
|
-
|
|
21321
|
+
// src/components/AppNav/useAppNavGroupExpanded.ts
|
|
21322
|
+
import { useCallback as useCallback27, useState as useState48 } from "react";
|
|
21323
|
+
var APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY = "beam.appNav.expandedLinkGroups";
|
|
21324
|
+
function loadStored() {
|
|
21325
|
+
try {
|
|
21326
|
+
const raw = typeof window !== "undefined" ? window.localStorage.getItem(APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY) : null;
|
|
21327
|
+
return raw ? JSON.parse(raw) : {};
|
|
21328
|
+
} catch {
|
|
21329
|
+
return {};
|
|
21330
|
+
}
|
|
21331
|
+
}
|
|
21332
|
+
function persistLabel(label, expanded) {
|
|
21333
|
+
const updated = { ...loadStored(), [label]: expanded };
|
|
21334
|
+
try {
|
|
21335
|
+
window.localStorage.setItem(APP_NAV_EXPANDED_LINK_GROUPS_STORAGE_KEY, JSON.stringify(updated));
|
|
21336
|
+
} catch {
|
|
21337
|
+
}
|
|
21338
|
+
}
|
|
21339
|
+
function useAppNavGroupExpanded(linkGroup) {
|
|
21340
|
+
const { label } = linkGroup;
|
|
21341
|
+
const [userExpanded, setUserExpanded] = useState48(() => {
|
|
21342
|
+
const stored = loadStored();
|
|
21343
|
+
return label in stored ? stored[label] : null;
|
|
21344
|
+
});
|
|
21345
|
+
const hasActiveLink = appNavLinkGroupLinks(linkGroup).some((l) => l.active);
|
|
21346
|
+
const expanded = userExpanded !== null ? userExpanded : hasActiveLink ? true : linkGroup.defaultExpanded ?? false;
|
|
21347
|
+
const onToggle = useCallback27(() => {
|
|
21348
|
+
const next = !expanded;
|
|
21349
|
+
setUserExpanded(next);
|
|
21350
|
+
persistLabel(label, next);
|
|
21351
|
+
}, [expanded, label]);
|
|
21352
|
+
return { expanded, onToggle };
|
|
21378
21353
|
}
|
|
21379
21354
|
|
|
21380
|
-
// src/components/
|
|
21381
|
-
import { useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
21382
|
-
import { useCallback as useCallback26, useMemo as useMemo48, useRef as useRef53, useState as useState48 } from "react";
|
|
21355
|
+
// src/components/AppNav/AppNavGroup.tsx
|
|
21383
21356
|
import { trussProps as trussProps84, maybeCssVar as maybeCssVar47 } from "@homebound/truss/runtime";
|
|
21384
|
-
import { jsx as jsx167, jsxs as
|
|
21385
|
-
|
|
21357
|
+
import { Fragment as Fragment38, jsx as jsx167, jsxs as jsxs86 } from "react/jsx-runtime";
|
|
21358
|
+
var __maybeInc14 = (inc) => {
|
|
21359
|
+
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
21360
|
+
};
|
|
21361
|
+
function AppNavGroupView(props) {
|
|
21386
21362
|
const {
|
|
21387
|
-
|
|
21388
|
-
|
|
21389
|
-
horizontal = false,
|
|
21390
|
-
bgColor = "rgba(255, 255, 255, 1)" /* White */
|
|
21363
|
+
linkGroup,
|
|
21364
|
+
panelCollapsed
|
|
21391
21365
|
} = props;
|
|
21392
|
-
const tid = useTestIds(props);
|
|
21393
|
-
|
|
21394
|
-
|
|
21395
|
-
width: width2
|
|
21396
|
-
} = props.xss ?? {};
|
|
21397
|
-
if (!bgColor.includes("rgba")) {
|
|
21398
|
-
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
21366
|
+
const tid = useTestIds(props, "linkGroup");
|
|
21367
|
+
if (panelCollapsed) {
|
|
21368
|
+
return /* @__PURE__ */ jsx167(Fragment38, { children: appNavLinkGroupLinks(linkGroup).map((link) => /* @__PURE__ */ jsx167(NavLink, { variant: "side", ...link, iconOnly: !!link.icon, ...tid[`link_${camelCase5(link.label)}`] }, link.label)) });
|
|
21399
21369
|
}
|
|
21400
|
-
|
|
21401
|
-
|
|
21402
|
-
|
|
21403
|
-
const
|
|
21404
|
-
|
|
21405
|
-
|
|
21406
|
-
|
|
21407
|
-
|
|
21408
|
-
|
|
21409
|
-
|
|
21410
|
-
|
|
21411
|
-
|
|
21412
|
-
|
|
21413
|
-
|
|
21414
|
-
|
|
21415
|
-
|
|
21416
|
-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21420
|
-
|
|
21421
|
-
|
|
21422
|
-
|
|
21423
|
-
|
|
21424
|
-
|
|
21425
|
-
left: "left0",
|
|
21426
|
-
right: "right0",
|
|
21427
|
-
height: "h_40px"
|
|
21428
|
-
} : {
|
|
21429
|
-
right: "right0",
|
|
21430
|
-
top: "top0",
|
|
21431
|
-
bottom: "bottom0",
|
|
21432
|
-
width: "w_25px"
|
|
21433
|
-
};
|
|
21434
|
-
const startGradient = `linear-gradient(${!horizontal ? 180 : 90}deg, ${bgColor} 0%, ${transparentBgColor} 92%);`;
|
|
21435
|
-
const endGradient = `linear-gradient(${!horizontal ? 0 : 270}deg, ${bgColor} 0%, ${transparentBgColor} 92%);`;
|
|
21436
|
-
return [{
|
|
21437
|
-
...commonStyles,
|
|
21438
|
-
...startShadowStyles2,
|
|
21439
|
-
...{
|
|
21440
|
-
background: ["background_var", {
|
|
21441
|
-
"--background": maybeCssVar47(startGradient)
|
|
21442
|
-
}]
|
|
21443
|
-
}
|
|
21444
|
-
}, {
|
|
21445
|
-
...commonStyles,
|
|
21446
|
-
...endShadowStyles2,
|
|
21447
|
-
...{
|
|
21448
|
-
background: ["background_var", {
|
|
21449
|
-
"--background": maybeCssVar47(endGradient)
|
|
21450
|
-
}]
|
|
21451
|
-
}
|
|
21452
|
-
}];
|
|
21453
|
-
}, [horizontal, bgColor]);
|
|
21454
|
-
const updateScrollProps = useCallback26((el) => {
|
|
21455
|
-
const {
|
|
21456
|
-
scrollTop,
|
|
21457
|
-
scrollHeight,
|
|
21458
|
-
clientHeight,
|
|
21459
|
-
scrollWidth,
|
|
21460
|
-
scrollLeft,
|
|
21461
|
-
clientWidth
|
|
21462
|
-
} = el;
|
|
21463
|
-
const start = horizontal ? scrollLeft : scrollTop;
|
|
21464
|
-
const end = horizontal ? scrollWidth : scrollHeight;
|
|
21465
|
-
const boxSize = horizontal ? clientWidth : clientHeight;
|
|
21466
|
-
setShowStartShadow(start > 0);
|
|
21467
|
-
setShowEndShadow(start + boxSize < end);
|
|
21468
|
-
}, [horizontal]);
|
|
21469
|
-
const onResize = useCallback26(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
21370
|
+
return /* @__PURE__ */ jsx167(AppNavGroupDisclosure, { ...props });
|
|
21371
|
+
}
|
|
21372
|
+
function AppNavGroupDisclosure(props) {
|
|
21373
|
+
const {
|
|
21374
|
+
linkGroup
|
|
21375
|
+
} = props;
|
|
21376
|
+
const {
|
|
21377
|
+
expanded,
|
|
21378
|
+
onToggle
|
|
21379
|
+
} = useAppNavGroupExpanded(linkGroup);
|
|
21380
|
+
const tid = useTestIds(props, "linkGroup");
|
|
21381
|
+
const navGroupId = `nav-group-${kebabCase(linkGroup.label)}`;
|
|
21382
|
+
const [contentEl, setContentEl] = useState49(null);
|
|
21383
|
+
const contentRef = useMemo48(() => ({
|
|
21384
|
+
current: contentEl
|
|
21385
|
+
}), [contentEl]);
|
|
21386
|
+
const [contentHeight, setContentHeight] = useState49(expanded ? "auto" : "0");
|
|
21387
|
+
useEffect32(() => {
|
|
21388
|
+
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
21389
|
+
}, [expanded, contentEl]);
|
|
21390
|
+
const onResize = useCallback28(() => {
|
|
21391
|
+
if (contentEl && expanded) {
|
|
21392
|
+
setContentHeight(`${contentEl.scrollHeight}px`);
|
|
21393
|
+
}
|
|
21394
|
+
}, [expanded, contentEl]);
|
|
21470
21395
|
useResizeObserver6({
|
|
21471
|
-
ref:
|
|
21396
|
+
ref: contentRef,
|
|
21472
21397
|
onResize
|
|
21473
21398
|
});
|
|
21474
|
-
return /* @__PURE__ */
|
|
21475
|
-
|
|
21476
|
-
|
|
21477
|
-
|
|
21478
|
-
|
|
21479
|
-
|
|
21480
|
-
|
|
21481
|
-
|
|
21482
|
-
|
|
21483
|
-
...height === void 0 ? {} : {
|
|
21484
|
-
height
|
|
21485
|
-
},
|
|
21486
|
-
...width2 === void 0 ? {} : {
|
|
21487
|
-
width: width2
|
|
21488
|
-
}
|
|
21489
|
-
}), ...tid, children: [
|
|
21490
|
-
/* @__PURE__ */ jsx167("div", { ...trussProps84({
|
|
21491
|
-
...startShadowStyles,
|
|
21492
|
-
...{
|
|
21493
|
-
opacity: ["o_var", {
|
|
21494
|
-
"--opacity": maybeCssVar47(showStartShadow ? 1 : 0)
|
|
21495
|
-
}]
|
|
21496
|
-
}
|
|
21497
|
-
}), "data-chromatic": "ignore" }),
|
|
21498
|
-
/* @__PURE__ */ jsx167("div", { ...trussProps84({
|
|
21499
|
-
...endShadowStyles,
|
|
21500
|
-
...{
|
|
21501
|
-
opacity: ["o_var", {
|
|
21502
|
-
"--opacity": maybeCssVar47(showEndShadow ? 1 : 0)
|
|
21503
|
-
}]
|
|
21504
|
-
}
|
|
21505
|
-
}), "data-chromatic": "ignore" }),
|
|
21506
|
-
/* @__PURE__ */ jsx167("div", { ...trussProps84({
|
|
21507
|
-
...xss,
|
|
21508
|
-
...{
|
|
21509
|
-
overflow: "oa",
|
|
21510
|
-
flexGrow: "fg1",
|
|
21511
|
-
scrollbarWidth: "scrollbarWidth_none"
|
|
21512
|
-
}
|
|
21513
|
-
}), onScroll: (e) => updateScrollProps(e.currentTarget), ref: scrollRef, children })
|
|
21399
|
+
return /* @__PURE__ */ jsxs86("div", { className: "df fdc", ...tid, children: [
|
|
21400
|
+
/* @__PURE__ */ jsx167(AppNavGroupTrigger, { label: linkGroup.label, navGroupId, expanded, onClick: onToggle, ...tid }),
|
|
21401
|
+
/* @__PURE__ */ jsx167("div", { id: navGroupId, role: "region", "aria-hidden": !expanded, ...trussProps84({
|
|
21402
|
+
overflow: "oh",
|
|
21403
|
+
transition: "transitionHeight",
|
|
21404
|
+
height: ["h_var", {
|
|
21405
|
+
"--height": maybeCssVar47(__maybeInc14(contentHeight))
|
|
21406
|
+
}]
|
|
21407
|
+
}), ...tid.panel, children: /* @__PURE__ */ jsx167("div", { ref: setContentEl, className: "df fdc pl2", children: /* @__PURE__ */ jsx167(AppNavItems, { items: linkGroup.items, panelCollapsed: false, ...tid }) }) })
|
|
21514
21408
|
] });
|
|
21515
21409
|
}
|
|
21516
21410
|
|
|
21517
|
-
// src/components/AppNav/
|
|
21518
|
-
import {
|
|
21519
|
-
|
|
21520
|
-
|
|
21521
|
-
|
|
21522
|
-
|
|
21523
|
-
|
|
21411
|
+
// src/components/AppNav/AppNavGroupMenu.tsx
|
|
21412
|
+
import { jsx as jsx168 } from "react/jsx-runtime";
|
|
21413
|
+
function AppNavGroupMenu({
|
|
21414
|
+
linkGroup,
|
|
21415
|
+
...tid
|
|
21416
|
+
}) {
|
|
21417
|
+
return /* @__PURE__ */ jsx168(
|
|
21418
|
+
ButtonMenu,
|
|
21419
|
+
{
|
|
21420
|
+
trigger: {
|
|
21421
|
+
navLabel: linkGroup.label,
|
|
21422
|
+
variant: "global",
|
|
21423
|
+
active: linkGroupHasActiveLink(linkGroup)
|
|
21424
|
+
},
|
|
21425
|
+
items: linkGroupToMenuItems(linkGroup),
|
|
21426
|
+
defaultOpen: linkGroup.defaultExpanded,
|
|
21427
|
+
...tid
|
|
21428
|
+
}
|
|
21429
|
+
);
|
|
21430
|
+
}
|
|
21524
21431
|
|
|
21525
|
-
// src/components/AppNav/
|
|
21526
|
-
import {
|
|
21527
|
-
import {
|
|
21528
|
-
|
|
21529
|
-
import { jsx as jsx168, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
21530
|
-
function AppNavGroupTrigger(props) {
|
|
21432
|
+
// src/components/AppNav/AppNavSectionView.tsx
|
|
21433
|
+
import { trussProps as trussProps85 } from "@homebound/truss/runtime";
|
|
21434
|
+
import { jsx as jsx169, jsxs as jsxs87 } from "react/jsx-runtime";
|
|
21435
|
+
function AppNavSectionView(props) {
|
|
21531
21436
|
const {
|
|
21532
|
-
|
|
21533
|
-
|
|
21534
|
-
|
|
21535
|
-
|
|
21437
|
+
section,
|
|
21438
|
+
variant,
|
|
21439
|
+
panelCollapsed,
|
|
21440
|
+
showDivider,
|
|
21441
|
+
...scopeProps
|
|
21536
21442
|
} = props;
|
|
21537
|
-
const tid = useTestIds(
|
|
21538
|
-
const
|
|
21539
|
-
|
|
21540
|
-
|
|
21541
|
-
|
|
21542
|
-
|
|
21543
|
-
|
|
21544
|
-
|
|
21545
|
-
}
|
|
21546
|
-
|
|
21547
|
-
|
|
21548
|
-
|
|
21549
|
-
|
|
21550
|
-
|
|
21551
|
-
|
|
21552
|
-
|
|
21553
|
-
|
|
21554
|
-
|
|
21555
|
-
|
|
21556
|
-
|
|
21557
|
-
|
|
21558
|
-
|
|
21559
|
-
|
|
21560
|
-
|
|
21561
|
-
|
|
21562
|
-
|
|
21563
|
-
|
|
21564
|
-
|
|
21565
|
-
|
|
21566
|
-
|
|
21567
|
-
|
|
21568
|
-
|
|
21569
|
-
|
|
21570
|
-
|
|
21571
|
-
|
|
21572
|
-
|
|
21573
|
-
|
|
21574
|
-
display: "df",
|
|
21575
|
-
alignItems: "aic",
|
|
21576
|
-
marginLeft: "marginLeft_auto",
|
|
21577
|
-
transition: "transitionTransform"
|
|
21578
|
-
},
|
|
21579
|
-
...props.expanded ? {
|
|
21580
|
-
transform: "transform_rotate_180deg"
|
|
21581
|
-
} : {}
|
|
21582
|
-
}), children: /* @__PURE__ */ jsx168(Icon, { icon: "chevronDown" }) })
|
|
21443
|
+
const tid = useTestIds(scopeProps);
|
|
21444
|
+
const dividerStyles = variant === "global" ? {
|
|
21445
|
+
paddingRight: "pr1",
|
|
21446
|
+
borderRightStyle: "brs_solid",
|
|
21447
|
+
borderRightWidth: "brw_1px",
|
|
21448
|
+
borderColor: ["bc_var", {
|
|
21449
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
21450
|
+
}]
|
|
21451
|
+
} : {
|
|
21452
|
+
paddingBottom: "pb2",
|
|
21453
|
+
borderBottomStyle: "bbs_solid",
|
|
21454
|
+
borderBottomWidth: "bbw_1px",
|
|
21455
|
+
borderColor: ["bc_var", {
|
|
21456
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
21457
|
+
}]
|
|
21458
|
+
};
|
|
21459
|
+
return /* @__PURE__ */ jsxs87("div", { ...trussProps85({
|
|
21460
|
+
...{
|
|
21461
|
+
display: "df",
|
|
21462
|
+
flexDirection: "fdc",
|
|
21463
|
+
paddingTop: "pt2"
|
|
21464
|
+
},
|
|
21465
|
+
...showDivider ? dividerStyles : {}
|
|
21466
|
+
}), ...tid, children: [
|
|
21467
|
+
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */ jsx169("div", { ...trussProps85({
|
|
21468
|
+
fontWeight: "fw6",
|
|
21469
|
+
fontSize: "fz_10px",
|
|
21470
|
+
lineHeight: "lh_14px",
|
|
21471
|
+
color: ["color_var", {
|
|
21472
|
+
"--color": "var(--b-on-surface)"
|
|
21473
|
+
}],
|
|
21474
|
+
paddingLeft: "pl1",
|
|
21475
|
+
paddingRight: "pr1",
|
|
21476
|
+
paddingBottom: "pb1",
|
|
21477
|
+
textTransform: "ttu"
|
|
21478
|
+
}), ...tid.label, children: section.label }),
|
|
21479
|
+
/* @__PURE__ */ jsx169(AppNavItems, { ...scopeProps, items: section.items, variant, panelCollapsed })
|
|
21583
21480
|
] });
|
|
21584
21481
|
}
|
|
21585
21482
|
|
|
21586
|
-
// src/components/AppNav/
|
|
21587
|
-
|
|
21588
|
-
|
|
21589
|
-
}
|
|
21590
|
-
|
|
21591
|
-
return
|
|
21592
|
-
}
|
|
21593
|
-
function isAppNavGroup(item) {
|
|
21594
|
-
return "items" in item && Array.isArray(item.items) && "label" in item && !isAppNavSection(item);
|
|
21595
|
-
}
|
|
21596
|
-
function appNavLinkGroupLinks(linkGroup) {
|
|
21597
|
-
return linkGroup.items.flatMap((item) => {
|
|
21483
|
+
// src/components/AppNav/AppNavItems.tsx
|
|
21484
|
+
import { Fragment as Fragment39, jsx as jsx170 } from "react/jsx-runtime";
|
|
21485
|
+
function AppNavItems(props) {
|
|
21486
|
+
const { items, variant = "side", panelCollapsed = false } = props;
|
|
21487
|
+
const tid = useTestIds(props, "appNav");
|
|
21488
|
+
return /* @__PURE__ */ jsx170(Fragment39, { children: items.map((item, idx) => {
|
|
21598
21489
|
if (isAppNavLink(item)) {
|
|
21599
|
-
return
|
|
21600
|
-
|
|
21601
|
-
|
|
21602
|
-
|
|
21603
|
-
|
|
21604
|
-
|
|
21605
|
-
|
|
21606
|
-
|
|
21607
|
-
|
|
21608
|
-
|
|
21609
|
-
if (isAppNavSection(child)) {
|
|
21610
|
-
return appNavSectionLinks(child);
|
|
21611
|
-
}
|
|
21612
|
-
return [];
|
|
21613
|
-
});
|
|
21490
|
+
return /* @__PURE__ */ jsx170(
|
|
21491
|
+
NavLink,
|
|
21492
|
+
{
|
|
21493
|
+
variant,
|
|
21494
|
+
...item,
|
|
21495
|
+
iconOnly: item.iconOnly ?? (panelCollapsed && !!item.icon),
|
|
21496
|
+
...tid[`link_${camelCase6(item.label)}`]
|
|
21497
|
+
},
|
|
21498
|
+
appNavItemKey(item)
|
|
21499
|
+
);
|
|
21614
21500
|
}
|
|
21615
21501
|
if (isAppNavGroup(item)) {
|
|
21616
|
-
return
|
|
21617
|
-
|
|
21618
|
-
|
|
21619
|
-
|
|
21620
|
-
|
|
21621
|
-
|
|
21622
|
-
|
|
21623
|
-
|
|
21624
|
-
|
|
21625
|
-
}
|
|
21626
|
-
if (isAppNavGroup(child)) {
|
|
21627
|
-
return appNavLinkGroupLinks(child);
|
|
21628
|
-
}
|
|
21629
|
-
if (isAppNavSection(child)) {
|
|
21630
|
-
return appNavSectionLinks(child);
|
|
21631
|
-
}
|
|
21632
|
-
return [];
|
|
21633
|
-
});
|
|
21634
|
-
}
|
|
21635
|
-
function appNavLinkGroupMenuSections(linkGroup) {
|
|
21636
|
-
const sections = [];
|
|
21637
|
-
let flatLinks = [];
|
|
21638
|
-
const flushFlatLinks = () => {
|
|
21639
|
-
if (flatLinks.length > 0) {
|
|
21640
|
-
sections.push(flatLinks);
|
|
21641
|
-
flatLinks = [];
|
|
21502
|
+
return variant === "global" ? /* @__PURE__ */ jsx170(AppNavGroupMenu, { linkGroup: item, ...tid.linkGroup }, appNavItemKey(item)) : /* @__PURE__ */ jsx170(
|
|
21503
|
+
AppNavGroupView,
|
|
21504
|
+
{
|
|
21505
|
+
linkGroup: item,
|
|
21506
|
+
panelCollapsed,
|
|
21507
|
+
...tid.linkGroup
|
|
21508
|
+
},
|
|
21509
|
+
appNavItemKey(item)
|
|
21510
|
+
);
|
|
21642
21511
|
}
|
|
21643
|
-
};
|
|
21644
|
-
for (const item of linkGroup.items) {
|
|
21645
21512
|
if (isAppNavSection(item)) {
|
|
21646
|
-
|
|
21647
|
-
|
|
21648
|
-
|
|
21649
|
-
|
|
21650
|
-
|
|
21651
|
-
|
|
21652
|
-
|
|
21513
|
+
return /* @__PURE__ */ jsx170(
|
|
21514
|
+
AppNavSectionView,
|
|
21515
|
+
{
|
|
21516
|
+
section: item,
|
|
21517
|
+
variant,
|
|
21518
|
+
panelCollapsed,
|
|
21519
|
+
showDivider: idx < items.length - 1,
|
|
21520
|
+
...tid.section
|
|
21521
|
+
},
|
|
21522
|
+
appNavItemKey(item)
|
|
21523
|
+
);
|
|
21653
21524
|
}
|
|
21654
|
-
|
|
21655
|
-
|
|
21656
|
-
return sections;
|
|
21657
|
-
}
|
|
21658
|
-
function appNavItemKey(item) {
|
|
21659
|
-
if (isAppNavLink(item)) return item.label;
|
|
21660
|
-
if (isAppNavGroup(item)) return item.label;
|
|
21661
|
-
if (item.label) return item.label;
|
|
21662
|
-
return `section-${item.items.map((child) => appNavItemKey(child)).join("--")}`;
|
|
21525
|
+
return null;
|
|
21526
|
+
}) });
|
|
21663
21527
|
}
|
|
21664
|
-
|
|
21665
|
-
|
|
21666
|
-
|
|
21667
|
-
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
|
|
21671
|
-
|
|
21672
|
-
|
|
21673
|
-
|
|
21674
|
-
|
|
21675
|
-
|
|
21676
|
-
|
|
21528
|
+
|
|
21529
|
+
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
21530
|
+
import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-motion";
|
|
21531
|
+
import { useEffect as useEffect33, useState as useState50 } from "react";
|
|
21532
|
+
import { FocusScope as FocusScope5, usePreventScroll as usePreventScroll2 } from "react-aria";
|
|
21533
|
+
import { createPortal as createPortal6 } from "react-dom";
|
|
21534
|
+
import { useLocation } from "react-router-dom";
|
|
21535
|
+
import { trussProps as trussProps86, maybeCssVar as maybeCssVar48 } from "@homebound/truss/runtime";
|
|
21536
|
+
import { Fragment as Fragment40, jsx as jsx171, jsxs as jsxs88 } from "react/jsx-runtime";
|
|
21537
|
+
function NavbarMobileMenu(props) {
|
|
21538
|
+
const {
|
|
21539
|
+
items
|
|
21540
|
+
} = props;
|
|
21541
|
+
const tid = useTestIds(props, "navbar");
|
|
21542
|
+
const [isOpen, setIsOpen] = useState50(false);
|
|
21543
|
+
const {
|
|
21544
|
+
pathname,
|
|
21545
|
+
search
|
|
21546
|
+
} = useLocation();
|
|
21547
|
+
usePreventScroll2({
|
|
21548
|
+
isDisabled: !isOpen
|
|
21549
|
+
});
|
|
21550
|
+
useEffect33(() => {
|
|
21551
|
+
setIsOpen(false);
|
|
21552
|
+
}, [pathname, search]);
|
|
21553
|
+
const close = () => setIsOpen(false);
|
|
21554
|
+
return /* @__PURE__ */ jsxs88(Fragment40, { children: [
|
|
21555
|
+
/* @__PURE__ */ jsx171(IconButton, { icon: isOpen ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen ? "Close navigation" : "Open navigation", onClick: () => setIsOpen((open) => !open), ...tid.mobileMenu }),
|
|
21556
|
+
createPortal6(/* @__PURE__ */ jsx171(ContrastScope, { children: /* @__PURE__ */ jsx171(AnimatePresence5, { children: isOpen && /* @__PURE__ */ jsx171(NavbarMobileDrawer, { items, onClose: close, tid }) }) }), document.body)
|
|
21557
|
+
] });
|
|
21677
21558
|
}
|
|
21678
|
-
function
|
|
21679
|
-
|
|
21559
|
+
function NavbarMobileDrawer({
|
|
21560
|
+
items,
|
|
21561
|
+
onClose,
|
|
21562
|
+
tid
|
|
21563
|
+
}) {
|
|
21564
|
+
return /* @__PURE__ */ jsxs88(Fragment40, { children: [
|
|
21565
|
+
/* @__PURE__ */ jsx171(motion5.div, { ...trussProps86({
|
|
21566
|
+
position: "fixed",
|
|
21567
|
+
top: "top0",
|
|
21568
|
+
right: "right0",
|
|
21569
|
+
bottom: "bottom0",
|
|
21570
|
+
left: "left0",
|
|
21571
|
+
zIndex: ["z_var", {
|
|
21572
|
+
"--zIndex": maybeCssVar48(zIndices.modalUnderlay)
|
|
21573
|
+
}],
|
|
21574
|
+
backgroundColor: "backgroundColor_rgba_36_36_36_0_2"
|
|
21575
|
+
}), initial: {
|
|
21576
|
+
opacity: 0
|
|
21577
|
+
}, animate: {
|
|
21578
|
+
opacity: 1
|
|
21579
|
+
}, exit: {
|
|
21580
|
+
opacity: 0
|
|
21581
|
+
}, transition: {
|
|
21582
|
+
ease: "linear",
|
|
21583
|
+
duration: 0.2
|
|
21584
|
+
}, onClick: onClose, ...tid.mobileMenuScrim }, "navbarMobileMenuScrim"),
|
|
21585
|
+
/* @__PURE__ */ jsx171(FocusScope5, { autoFocus: true, contain: true, restoreFocus: true, children: /* @__PURE__ */ jsxs88(motion5.aside, { role: "dialog", "aria-modal": "true", "aria-label": "Navigation", ...trussProps86({
|
|
21586
|
+
position: "fixed",
|
|
21587
|
+
top: "top0",
|
|
21588
|
+
bottom: "bottom0",
|
|
21589
|
+
left: "left0",
|
|
21590
|
+
display: "df",
|
|
21591
|
+
flexDirection: "fdc",
|
|
21592
|
+
flexShrink: "fs0",
|
|
21593
|
+
width: "w100",
|
|
21594
|
+
overflow: "oh",
|
|
21595
|
+
zIndex: ["z_var", {
|
|
21596
|
+
"--zIndex": maybeCssVar48(zIndices.sideNav)
|
|
21597
|
+
}],
|
|
21598
|
+
backgroundColor: ["bgColor_var", {
|
|
21599
|
+
"--backgroundColor": "var(--b-surface)"
|
|
21600
|
+
}]
|
|
21601
|
+
}), initial: {
|
|
21602
|
+
x: "-100%"
|
|
21603
|
+
}, animate: {
|
|
21604
|
+
x: 0
|
|
21605
|
+
}, exit: {
|
|
21606
|
+
x: "-100%"
|
|
21607
|
+
}, transition: {
|
|
21608
|
+
ease: "linear",
|
|
21609
|
+
duration: 0.2
|
|
21610
|
+
}, onClick: (e) => e.stopPropagation(), ...tid.mobileMenuDrawer, children: [
|
|
21611
|
+
/* @__PURE__ */ jsx171("div", { className: "df aic jcfe pt2 pb2 pr2 pl2 fs0", children: /* @__PURE__ */ jsx171(IconButton, { icon: "menuClose", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: "Close navigation", onClick: onClose, ...tid.mobileMenuClose }) }),
|
|
21612
|
+
/* @__PURE__ */ jsx171(
|
|
21613
|
+
"nav",
|
|
21614
|
+
{
|
|
21615
|
+
className: "fg1 oya pl2 pr2 pb3 df fdc gap1",
|
|
21616
|
+
onClickCapture: (e) => {
|
|
21617
|
+
if (e.target.closest("a")) {
|
|
21618
|
+
onClose();
|
|
21619
|
+
}
|
|
21620
|
+
},
|
|
21621
|
+
...tid.mobileMenuPanel,
|
|
21622
|
+
children: /* @__PURE__ */ jsx171(AppNavItems, { items, panelCollapsed: false, ...tid })
|
|
21623
|
+
}
|
|
21624
|
+
)
|
|
21625
|
+
] }, "navbarMobileMenuDrawer") })
|
|
21626
|
+
] });
|
|
21680
21627
|
}
|
|
21681
|
-
|
|
21682
|
-
|
|
21628
|
+
|
|
21629
|
+
// src/components/Navbar/Navbar.tsx
|
|
21630
|
+
import { trussProps as trussProps87 } from "@homebound/truss/runtime";
|
|
21631
|
+
import { jsx as jsx172, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
21632
|
+
function Navbar(props) {
|
|
21633
|
+
const {
|
|
21634
|
+
brand,
|
|
21635
|
+
items,
|
|
21636
|
+
rightSlot,
|
|
21637
|
+
user
|
|
21638
|
+
} = props;
|
|
21639
|
+
const {
|
|
21640
|
+
sm
|
|
21641
|
+
} = useBreakpoint();
|
|
21642
|
+
const tid = useTestIds(props, "navbar");
|
|
21643
|
+
const {
|
|
21644
|
+
containerRef,
|
|
21645
|
+
contentRef,
|
|
21646
|
+
overflows
|
|
21647
|
+
} = useContentOverflow(!sm);
|
|
21648
|
+
const showMobile = sm || overflows;
|
|
21649
|
+
return /* @__PURE__ */ jsx172(ContrastScope, { children: /* @__PURE__ */ jsxs89("nav", { ...trussProps87({
|
|
21650
|
+
backgroundColor: "bgGray800",
|
|
21651
|
+
flexShrink: "fs0",
|
|
21652
|
+
display: "df",
|
|
21653
|
+
alignItems: "aic",
|
|
21654
|
+
justifyContent: "jcsb",
|
|
21655
|
+
whiteSpace: "wsnw",
|
|
21656
|
+
paddingLeft: "pl1",
|
|
21657
|
+
paddingRight: "pr1",
|
|
21658
|
+
paddingTop: "pt1",
|
|
21659
|
+
paddingBottom: "pb1",
|
|
21660
|
+
gap: "gap2",
|
|
21661
|
+
...!showMobile ? {
|
|
21662
|
+
paddingLeft: "pl5",
|
|
21663
|
+
paddingRight: "pr5"
|
|
21664
|
+
} : {}
|
|
21665
|
+
}), ...tid, children: [
|
|
21666
|
+
/* @__PURE__ */ jsxs89("div", { className: "df aic gap3 fg1 mw0", children: [
|
|
21667
|
+
/* @__PURE__ */ jsxs89("div", { className: "df aic fs0 gap2", children: [
|
|
21668
|
+
showMobile && /* @__PURE__ */ jsx172(NavbarMobileMenu, { items, ...tid }),
|
|
21669
|
+
/* @__PURE__ */ jsx172("div", { className: "fs0", ...tid.brand, children: brand })
|
|
21670
|
+
] }),
|
|
21671
|
+
!sm && // Stays mounted while overflowing (hidden) so the items remain measurable and the bar
|
|
21672
|
+
// can expand again as space frees up.
|
|
21673
|
+
/* @__PURE__ */ jsx172("div", { ref: containerRef, ...trussProps87({
|
|
21674
|
+
display: "df",
|
|
21675
|
+
alignItems: "aic",
|
|
21676
|
+
flexGrow: "fg1",
|
|
21677
|
+
minWidth: "mw0",
|
|
21678
|
+
overflow: "oh",
|
|
21679
|
+
...overflows ? {
|
|
21680
|
+
visibility: "visibility_hidden"
|
|
21681
|
+
} : {}
|
|
21682
|
+
}), ...tid.items, children: /* @__PURE__ */ jsx172("div", { ref: contentRef, className: "df aic gap2 width_max_content", children: /* @__PURE__ */ jsx172(AppNavItems, { variant: "global", items, ...tid }) }) })
|
|
21683
|
+
] }),
|
|
21684
|
+
/* @__PURE__ */ jsxs89("div", { className: "df aic gap1", children: [
|
|
21685
|
+
rightSlot && /* @__PURE__ */ jsx172("div", { className: "df aic gap1", ...tid.rightSlot, children: rightSlot }),
|
|
21686
|
+
user && /* @__PURE__ */ jsx172(NavbarUserMenu, { user, ...tid.userMenu })
|
|
21687
|
+
] })
|
|
21688
|
+
] }) });
|
|
21683
21689
|
}
|
|
21684
|
-
function
|
|
21685
|
-
|
|
21686
|
-
|
|
21687
|
-
|
|
21690
|
+
function NavbarUserMenu({
|
|
21691
|
+
user,
|
|
21692
|
+
...tid
|
|
21693
|
+
}) {
|
|
21694
|
+
return /* @__PURE__ */ jsx172("div", { className: "df aic fs0 ml1", children: /* @__PURE__ */ jsx172(ButtonMenu, { items: user.menuItems, persistentItems: user.persistentItems, trigger: {
|
|
21695
|
+
src: user.picture,
|
|
21696
|
+
name: user.name,
|
|
21697
|
+
size: "sm",
|
|
21698
|
+
preventTooltip: true
|
|
21699
|
+
}, placement: "right", ...tid }) });
|
|
21688
21700
|
}
|
|
21689
21701
|
|
|
21690
|
-
// src/components/
|
|
21691
|
-
import {
|
|
21692
|
-
|
|
21693
|
-
|
|
21694
|
-
|
|
21695
|
-
|
|
21696
|
-
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
}
|
|
21700
|
-
|
|
21701
|
-
|
|
21702
|
-
|
|
21703
|
-
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21702
|
+
// src/components/Tabs.tsx
|
|
21703
|
+
import { camelCase as camelCase7 } from "change-case";
|
|
21704
|
+
import { useEffect as useEffect34, useMemo as useMemo49, useRef as useRef54, useState as useState51 } from "react";
|
|
21705
|
+
import { mergeProps as mergeProps26, useFocusRing as useFocusRing15, useHover as useHover19 } from "react-aria";
|
|
21706
|
+
import { matchPath } from "react-router";
|
|
21707
|
+
import { Link as Link5, useLocation as useLocation2 } from "react-router-dom";
|
|
21708
|
+
import { trussProps as trussProps88, maybeCssVar as maybeCssVar49 } from "@homebound/truss/runtime";
|
|
21709
|
+
import { Fragment as Fragment41, jsx as jsx173, jsxs as jsxs90 } from "react/jsx-runtime";
|
|
21710
|
+
function TabsWithContent(props) {
|
|
21711
|
+
const styles = hideTabs(props) ? {} : {
|
|
21712
|
+
paddingTop: "pt3"
|
|
21713
|
+
};
|
|
21714
|
+
return /* @__PURE__ */ jsxs90(Fragment41, { children: [
|
|
21715
|
+
/* @__PURE__ */ jsx173(Tabs, { ...props }),
|
|
21716
|
+
/* @__PURE__ */ jsx173(TabContent, { ...props, contentXss: {
|
|
21717
|
+
...styles,
|
|
21718
|
+
...props.contentXss
|
|
21719
|
+
} })
|
|
21720
|
+
] });
|
|
21707
21721
|
}
|
|
21708
|
-
function
|
|
21709
|
-
const
|
|
21710
|
-
const
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
|
|
21715
|
-
const
|
|
21716
|
-
const
|
|
21717
|
-
const
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
+
function TabContent(props) {
|
|
21723
|
+
const tid = useTestIds(props, "tab");
|
|
21724
|
+
const {
|
|
21725
|
+
tabs,
|
|
21726
|
+
contentXss = {},
|
|
21727
|
+
omitFullBleedPadding = false
|
|
21728
|
+
} = props;
|
|
21729
|
+
const location = useLocation2();
|
|
21730
|
+
const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
|
|
21731
|
+
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
21732
|
+
return paths.some((p) => !!matchPath({
|
|
21733
|
+
path: p,
|
|
21734
|
+
end: true
|
|
21735
|
+
}, location.pathname));
|
|
21736
|
+
}) || tabs[0] : props.tabs.find((tab) => tab.value === props.selected) || tabs[0];
|
|
21737
|
+
const uniqueValue = uniqueTabValue(selectedTab);
|
|
21738
|
+
return (
|
|
21739
|
+
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
21740
|
+
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
21741
|
+
/* @__PURE__ */ jsx173(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx173("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps88(contentXss), children: selectedTab.render() }) })
|
|
21742
|
+
);
|
|
21722
21743
|
}
|
|
21723
|
-
|
|
21724
|
-
// src/components/AppNav/AppNavGroup.tsx
|
|
21725
|
-
import { trussProps as trussProps86, maybeCssVar as maybeCssVar48 } from "@homebound/truss/runtime";
|
|
21726
|
-
import { Fragment as Fragment39, jsx as jsx169, jsxs as jsxs89 } from "react/jsx-runtime";
|
|
21727
|
-
var __maybeInc13 = (inc) => {
|
|
21728
|
-
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
21729
|
-
};
|
|
21730
|
-
function AppNavGroupView(props) {
|
|
21744
|
+
function Tabs(props) {
|
|
21731
21745
|
const {
|
|
21732
|
-
|
|
21733
|
-
|
|
21746
|
+
ariaLabel,
|
|
21747
|
+
tabs,
|
|
21748
|
+
includeBottomBorder,
|
|
21749
|
+
right,
|
|
21750
|
+
...others
|
|
21734
21751
|
} = props;
|
|
21735
|
-
const
|
|
21736
|
-
|
|
21737
|
-
|
|
21752
|
+
const location = useLocation2();
|
|
21753
|
+
const selected = isRouteTabs(props) ? uniqueTabValue(props.tabs.find((t) => {
|
|
21754
|
+
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
21755
|
+
return paths.some((p) => !!matchPath({
|
|
21756
|
+
path: p,
|
|
21757
|
+
end: true
|
|
21758
|
+
}, location.pathname));
|
|
21759
|
+
}) || props.tabs[0]) : props.selected;
|
|
21760
|
+
const {
|
|
21761
|
+
isFocusVisible,
|
|
21762
|
+
focusProps
|
|
21763
|
+
} = useFocusRing15();
|
|
21764
|
+
const tid = useTestIds(others, "tabs");
|
|
21765
|
+
const [active, setActive] = useState51(selected);
|
|
21766
|
+
const ref = useRef54(null);
|
|
21767
|
+
useEffect34(() => setActive(selected), [selected]);
|
|
21768
|
+
function onKeyUp(e) {
|
|
21769
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
21770
|
+
const nextTabValue = getNextTabValue(active, e.key, tabs);
|
|
21771
|
+
setActive(nextTabValue);
|
|
21772
|
+
document.getElementById(`${nextTabValue}-tab`)?.focus();
|
|
21773
|
+
}
|
|
21738
21774
|
}
|
|
21739
|
-
|
|
21775
|
+
function onClick(value) {
|
|
21776
|
+
!isRouteTabs(props) && props.onChange(value);
|
|
21777
|
+
}
|
|
21778
|
+
function onBlur(e) {
|
|
21779
|
+
if (!(ref.current && ref.current.contains(e.relatedTarget))) {
|
|
21780
|
+
setActive(selected);
|
|
21781
|
+
}
|
|
21782
|
+
}
|
|
21783
|
+
return /* @__PURE__ */ jsxs90("div", { ...trussProps88({
|
|
21784
|
+
...{
|
|
21785
|
+
display: "df",
|
|
21786
|
+
alignItems: "aic",
|
|
21787
|
+
overflow: "oa",
|
|
21788
|
+
whiteSpace: "wsnw",
|
|
21789
|
+
gap: "gap1"
|
|
21790
|
+
},
|
|
21791
|
+
...includeBottomBorder ? {
|
|
21792
|
+
...{
|
|
21793
|
+
borderBottomStyle: "bbs_solid",
|
|
21794
|
+
borderBottomWidth: "bbw_1px",
|
|
21795
|
+
borderColor: "bcGray200"
|
|
21796
|
+
}
|
|
21797
|
+
} : {}
|
|
21798
|
+
}), children: [
|
|
21799
|
+
!hideTabs(props) && /* @__PURE__ */ jsx173("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
21800
|
+
const uniqueValue = uniqueTabValue(tab);
|
|
21801
|
+
return /* @__PURE__ */ jsx173(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
21802
|
+
}) }),
|
|
21803
|
+
right && /* @__PURE__ */ jsx173("div", { className: "mla df aic gap1 pb1", children: right })
|
|
21804
|
+
] });
|
|
21740
21805
|
}
|
|
21741
|
-
function
|
|
21806
|
+
function TabImpl(props) {
|
|
21742
21807
|
const {
|
|
21743
|
-
|
|
21808
|
+
tab,
|
|
21809
|
+
onClick,
|
|
21810
|
+
active,
|
|
21811
|
+
onKeyUp,
|
|
21812
|
+
onBlur,
|
|
21813
|
+
focusProps,
|
|
21814
|
+
isFocusVisible = false,
|
|
21815
|
+
...others
|
|
21744
21816
|
} = props;
|
|
21745
21817
|
const {
|
|
21746
|
-
|
|
21747
|
-
|
|
21748
|
-
|
|
21749
|
-
|
|
21750
|
-
|
|
21751
|
-
const
|
|
21752
|
-
const
|
|
21753
|
-
|
|
21754
|
-
|
|
21755
|
-
|
|
21756
|
-
|
|
21757
|
-
|
|
21758
|
-
|
|
21759
|
-
|
|
21760
|
-
|
|
21761
|
-
|
|
21818
|
+
disabled = false,
|
|
21819
|
+
name: label,
|
|
21820
|
+
icon,
|
|
21821
|
+
endAdornment
|
|
21822
|
+
} = tab;
|
|
21823
|
+
const isDisabled = !!disabled;
|
|
21824
|
+
const {
|
|
21825
|
+
hoverProps,
|
|
21826
|
+
isHovered
|
|
21827
|
+
} = useHover19({
|
|
21828
|
+
isDisabled
|
|
21829
|
+
});
|
|
21830
|
+
const {
|
|
21831
|
+
baseStyles: baseStyles5,
|
|
21832
|
+
activeStyles: activeStyles3,
|
|
21833
|
+
focusRingStyles: focusRingStyles2,
|
|
21834
|
+
hoverStyles: hoverStyles4,
|
|
21835
|
+
disabledStyles: disabledStyles4,
|
|
21836
|
+
activeHoverStyles
|
|
21837
|
+
} = useMemo49(() => getTabStyles(), []);
|
|
21838
|
+
const uniqueValue = uniqueTabValue(tab);
|
|
21839
|
+
const tabProps = {
|
|
21840
|
+
"aria-controls": `${uniqueValue}-tabPanel`,
|
|
21841
|
+
"aria-selected": active,
|
|
21842
|
+
"aria-disabled": isDisabled || void 0,
|
|
21843
|
+
id: `${uniqueValue}-tab`,
|
|
21844
|
+
role: "tab",
|
|
21845
|
+
tabIndex: active ? 0 : -1,
|
|
21846
|
+
...others,
|
|
21847
|
+
...trussProps88({
|
|
21848
|
+
...baseStyles5,
|
|
21849
|
+
...active && activeStyles3,
|
|
21850
|
+
...isDisabled && disabledStyles4,
|
|
21851
|
+
...isHovered && hoverStyles4,
|
|
21852
|
+
...isHovered && active && activeHoverStyles,
|
|
21853
|
+
...isFocusVisible && active && focusRingStyles2
|
|
21854
|
+
})
|
|
21855
|
+
};
|
|
21856
|
+
const interactiveProps = mergeProps26(focusProps, hoverProps, {
|
|
21857
|
+
onKeyUp,
|
|
21858
|
+
onBlur,
|
|
21859
|
+
...isRouteTab(tab) ? {} : {
|
|
21860
|
+
onClick: () => onClick(tab.value)
|
|
21762
21861
|
}
|
|
21763
|
-
}, [expanded, contentEl]);
|
|
21764
|
-
useResizeObserver7({
|
|
21765
|
-
ref: contentRef,
|
|
21766
|
-
onResize
|
|
21767
21862
|
});
|
|
21768
|
-
|
|
21769
|
-
|
|
21770
|
-
/* @__PURE__ */
|
|
21771
|
-
overflow: "oh",
|
|
21772
|
-
transition: "transitionHeight",
|
|
21773
|
-
height: ["h_var", {
|
|
21774
|
-
"--height": maybeCssVar48(__maybeInc13(contentHeight))
|
|
21775
|
-
}]
|
|
21776
|
-
}), ...tid.panel, children: /* @__PURE__ */ jsx169("div", { ref: setContentEl, className: "df fdc pl2", children: /* @__PURE__ */ jsx169(AppNavItems, { items: linkGroup.items, panelCollapsed: false, ...tid }) }) })
|
|
21863
|
+
const tabLabel = /* @__PURE__ */ jsxs90(Fragment41, { children: [
|
|
21864
|
+
label,
|
|
21865
|
+
(icon || endAdornment) && /* @__PURE__ */ jsx173("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx173(Icon, { icon }) : endAdornment })
|
|
21777
21866
|
] });
|
|
21867
|
+
return isDisabled ? maybeTooltip({
|
|
21868
|
+
title: resolveTooltip(disabled),
|
|
21869
|
+
placement: "top",
|
|
21870
|
+
children: /* @__PURE__ */ jsx173("div", { ...tabProps, children: tabLabel })
|
|
21871
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx173(Link5, { ...mergeProps26(tabProps, interactiveProps, {
|
|
21872
|
+
className: "navLink"
|
|
21873
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx173("button", { ...{
|
|
21874
|
+
...tabProps,
|
|
21875
|
+
...interactiveProps
|
|
21876
|
+
}, children: tabLabel });
|
|
21778
21877
|
}
|
|
21779
|
-
|
|
21780
|
-
|
|
21781
|
-
|
|
21782
|
-
|
|
21783
|
-
|
|
21784
|
-
|
|
21785
|
-
})
|
|
21786
|
-
|
|
21787
|
-
|
|
21788
|
-
|
|
21789
|
-
|
|
21790
|
-
|
|
21791
|
-
|
|
21792
|
-
|
|
21878
|
+
function getTabStyles() {
|
|
21879
|
+
const borderBottomWidthPx = 4;
|
|
21880
|
+
const verticalPaddingPx = 6;
|
|
21881
|
+
const borderBottomStyles = {
|
|
21882
|
+
borderBottomStyle: "bbs_solid",
|
|
21883
|
+
borderBottomWidth: ["borderBottomWidth_var", {
|
|
21884
|
+
"--borderBottomWidth": maybeCssVar49(`${borderBottomWidthPx}px`)
|
|
21885
|
+
}],
|
|
21886
|
+
paddingBottom: ["pb_var", {
|
|
21887
|
+
"--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
|
|
21888
|
+
}]
|
|
21889
|
+
};
|
|
21890
|
+
return {
|
|
21891
|
+
baseStyles: {
|
|
21892
|
+
display: "df",
|
|
21893
|
+
alignItems: "aic",
|
|
21894
|
+
height: "h_32px",
|
|
21895
|
+
paddingTop: ["py_var", {
|
|
21896
|
+
"--paddingTop": `${verticalPaddingPx}px`
|
|
21897
|
+
}],
|
|
21898
|
+
paddingBottom: ["py_var", {
|
|
21899
|
+
"--paddingBottom": `${verticalPaddingPx}px`
|
|
21900
|
+
}],
|
|
21901
|
+
paddingLeft: "pl1",
|
|
21902
|
+
paddingRight: "pr1",
|
|
21903
|
+
outline: "outline0",
|
|
21904
|
+
color: "gray700",
|
|
21905
|
+
width: "width_fit_content",
|
|
21906
|
+
cursor: "cursorPointer",
|
|
21907
|
+
fontWeight: "fw4",
|
|
21908
|
+
fontSize: "fz_14px",
|
|
21909
|
+
lineHeight: "lh_20px"
|
|
21910
|
+
},
|
|
21911
|
+
activeStyles: {
|
|
21912
|
+
...{
|
|
21913
|
+
borderColor: "bcBlue700",
|
|
21914
|
+
fontWeight: "fw6",
|
|
21915
|
+
fontSize: "fz_14px",
|
|
21916
|
+
lineHeight: "lh_20px",
|
|
21917
|
+
color: "gray900"
|
|
21918
|
+
},
|
|
21919
|
+
...borderBottomStyles
|
|
21920
|
+
},
|
|
21921
|
+
disabledStyles: {
|
|
21922
|
+
color: "gray400",
|
|
21923
|
+
cursor: "cursorNotAllowed"
|
|
21924
|
+
},
|
|
21925
|
+
focusRingStyles: {
|
|
21926
|
+
backgroundColor: "bgBlue50",
|
|
21927
|
+
boxShadow: "bshFocus"
|
|
21928
|
+
},
|
|
21929
|
+
hoverStyles: {
|
|
21930
|
+
...{
|
|
21931
|
+
borderColor: "bcGray400"
|
|
21793
21932
|
},
|
|
21794
|
-
|
|
21795
|
-
|
|
21796
|
-
|
|
21933
|
+
...borderBottomStyles
|
|
21934
|
+
},
|
|
21935
|
+
activeHoverStyles: {
|
|
21936
|
+
...{
|
|
21937
|
+
backgroundColor: "bgBlue50",
|
|
21938
|
+
borderColor: "bcBlue700"
|
|
21939
|
+
},
|
|
21940
|
+
...borderBottomStyles
|
|
21797
21941
|
}
|
|
21798
|
-
|
|
21942
|
+
};
|
|
21943
|
+
}
|
|
21944
|
+
function getNextTabValue(selected, key, tabs) {
|
|
21945
|
+
const enabledTabs = tabs.filter((tab) => tab.disabled !== true);
|
|
21946
|
+
const tabsToScan = key === "ArrowRight" ? enabledTabs : enabledTabs.reverse();
|
|
21947
|
+
const currentIndex = tabsToScan.findIndex((tab) => uniqueTabValue(tab) === selected);
|
|
21948
|
+
const nextIndex = currentIndex === tabsToScan.length - 1 ? 0 : currentIndex + 1;
|
|
21949
|
+
return uniqueTabValue(tabsToScan[nextIndex]);
|
|
21950
|
+
}
|
|
21951
|
+
function isRouteTabs(props) {
|
|
21952
|
+
const {
|
|
21953
|
+
tabs
|
|
21954
|
+
} = props;
|
|
21955
|
+
return tabs.length > 0 && isRouteTab(tabs[0]);
|
|
21956
|
+
}
|
|
21957
|
+
function isRouteTab(tab) {
|
|
21958
|
+
return "path" in tab;
|
|
21959
|
+
}
|
|
21960
|
+
function uniqueTabValue(tab) {
|
|
21961
|
+
return isRouteTab(tab) ? camelCase7(tab.name) : tab.value;
|
|
21962
|
+
}
|
|
21963
|
+
function hideTabs(props) {
|
|
21964
|
+
return props.alwaysShowAllTabs ? false : props.tabs.filter((t) => !t.disabled).length === 1;
|
|
21799
21965
|
}
|
|
21800
21966
|
|
|
21801
|
-
// src/components/
|
|
21802
|
-
import { trussProps as
|
|
21803
|
-
import { jsx as
|
|
21804
|
-
function
|
|
21967
|
+
// src/components/PageHeader.tsx
|
|
21968
|
+
import { trussProps as trussProps89 } from "@homebound/truss/runtime";
|
|
21969
|
+
import { jsx as jsx174, jsxs as jsxs91 } from "react/jsx-runtime";
|
|
21970
|
+
function PageHeader2(props) {
|
|
21805
21971
|
const {
|
|
21806
|
-
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
...scopeProps
|
|
21972
|
+
title,
|
|
21973
|
+
rightSlot,
|
|
21974
|
+
tabs,
|
|
21975
|
+
...otherProps
|
|
21811
21976
|
} = props;
|
|
21812
|
-
const tid = useTestIds(
|
|
21813
|
-
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
}]
|
|
21820
|
-
} : {
|
|
21821
|
-
paddingBottom: "pb2",
|
|
21977
|
+
const tid = useTestIds(otherProps, "pageHeader");
|
|
21978
|
+
return /* @__PURE__ */ jsxs91("header", { ...tid, ...trussProps89({
|
|
21979
|
+
display: "df",
|
|
21980
|
+
flexDirection: "fdc",
|
|
21981
|
+
paddingTop: "pt3",
|
|
21982
|
+
paddingRight: "pr3",
|
|
21983
|
+
paddingLeft: "pl3",
|
|
21822
21984
|
borderBottomStyle: "bbs_solid",
|
|
21823
21985
|
borderBottomWidth: "bbw_1px",
|
|
21824
21986
|
borderColor: ["bc_var", {
|
|
21825
21987
|
"--borderColor": "var(--b-surface-separator)"
|
|
21988
|
+
}],
|
|
21989
|
+
backgroundColor: ["bgColor_var", {
|
|
21990
|
+
"--backgroundColor": "var(--b-surface)"
|
|
21826
21991
|
}]
|
|
21827
|
-
}
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
},
|
|
21834
|
-
...showDivider ? dividerStyles : {}
|
|
21835
|
-
}), ...tid, children: [
|
|
21836
|
-
section.label && !panelCollapsed && variant !== "global" && /* @__PURE__ */ jsx171("div", { ...trussProps87({
|
|
21837
|
-
fontWeight: "fw6",
|
|
21838
|
-
fontSize: "fz_10px",
|
|
21839
|
-
lineHeight: "lh_14px",
|
|
21840
|
-
color: ["color_var", {
|
|
21841
|
-
"--color": "var(--b-on-surface)"
|
|
21842
|
-
}],
|
|
21843
|
-
paddingLeft: "pl1",
|
|
21844
|
-
paddingRight: "pr1",
|
|
21845
|
-
paddingBottom: "pb1",
|
|
21846
|
-
textTransform: "ttu"
|
|
21847
|
-
}), ...tid.label, children: section.label }),
|
|
21848
|
-
/* @__PURE__ */ jsx171(AppNavItems, { ...scopeProps, items: section.items, variant, panelCollapsed })
|
|
21992
|
+
}), children: [
|
|
21993
|
+
/* @__PURE__ */ jsxs91("div", { className: "df jcsb mb2 w100 gap1", children: [
|
|
21994
|
+
/* @__PURE__ */ jsx174("div", { children: /* @__PURE__ */ jsx174("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title }) }),
|
|
21995
|
+
/* @__PURE__ */ jsx174("div", { children: rightSlot })
|
|
21996
|
+
] }),
|
|
21997
|
+
tabs && /* @__PURE__ */ jsx174(Tabs, { ...tabs })
|
|
21849
21998
|
] });
|
|
21850
21999
|
}
|
|
21851
22000
|
|
|
21852
|
-
// src/components/
|
|
21853
|
-
import {
|
|
21854
|
-
|
|
21855
|
-
|
|
21856
|
-
|
|
21857
|
-
|
|
21858
|
-
|
|
21859
|
-
|
|
21860
|
-
|
|
21861
|
-
|
|
21862
|
-
|
|
21863
|
-
|
|
21864
|
-
|
|
21865
|
-
|
|
21866
|
-
|
|
21867
|
-
|
|
21868
|
-
|
|
21869
|
-
|
|
21870
|
-
|
|
21871
|
-
|
|
21872
|
-
|
|
21873
|
-
|
|
21874
|
-
|
|
21875
|
-
|
|
21876
|
-
|
|
21877
|
-
|
|
21878
|
-
|
|
21879
|
-
|
|
21880
|
-
|
|
21881
|
-
|
|
21882
|
-
|
|
21883
|
-
|
|
21884
|
-
|
|
21885
|
-
|
|
21886
|
-
|
|
21887
|
-
|
|
21888
|
-
|
|
21889
|
-
|
|
21890
|
-
|
|
21891
|
-
|
|
21892
|
-
|
|
22001
|
+
// src/components/ScrollShadows.tsx
|
|
22002
|
+
import { useResizeObserver as useResizeObserver7 } from "@react-aria/utils";
|
|
22003
|
+
import { useCallback as useCallback29, useMemo as useMemo50, useRef as useRef55, useState as useState52 } from "react";
|
|
22004
|
+
import { trussProps as trussProps90, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
|
|
22005
|
+
import { jsx as jsx175, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
22006
|
+
function ScrollShadows(props) {
|
|
22007
|
+
const {
|
|
22008
|
+
children,
|
|
22009
|
+
xss,
|
|
22010
|
+
horizontal = false,
|
|
22011
|
+
bgColor = "rgba(255, 255, 255, 1)" /* White */
|
|
22012
|
+
} = props;
|
|
22013
|
+
const tid = useTestIds(props);
|
|
22014
|
+
const {
|
|
22015
|
+
height,
|
|
22016
|
+
width: width2
|
|
22017
|
+
} = props.xss ?? {};
|
|
22018
|
+
if (!bgColor.includes("rgba")) {
|
|
22019
|
+
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
22020
|
+
}
|
|
22021
|
+
const [showStartShadow, setShowStartShadow] = useState52(false);
|
|
22022
|
+
const [showEndShadow, setShowEndShadow] = useState52(false);
|
|
22023
|
+
const scrollRef = useRef55(null);
|
|
22024
|
+
const [startShadowStyles, endShadowStyles] = useMemo50(() => {
|
|
22025
|
+
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
22026
|
+
const commonStyles = {
|
|
22027
|
+
position: "absolute",
|
|
22028
|
+
zIndex: ["z_var", {
|
|
22029
|
+
"--zIndex": maybeCssVar50(zIndices.scrollShadow)
|
|
22030
|
+
}],
|
|
22031
|
+
pointerEvents: "pointerEvents_none"
|
|
22032
|
+
};
|
|
22033
|
+
const startShadowStyles2 = !horizontal ? {
|
|
22034
|
+
top: "top0",
|
|
22035
|
+
left: "left0",
|
|
22036
|
+
right: "right0",
|
|
22037
|
+
height: "h_40px"
|
|
22038
|
+
} : {
|
|
22039
|
+
left: "left0",
|
|
22040
|
+
top: "top0",
|
|
22041
|
+
bottom: "bottom0",
|
|
22042
|
+
width: "w_25px"
|
|
22043
|
+
};
|
|
22044
|
+
const endShadowStyles2 = !horizontal ? {
|
|
22045
|
+
bottom: "bottom0",
|
|
22046
|
+
left: "left0",
|
|
22047
|
+
right: "right0",
|
|
22048
|
+
height: "h_40px"
|
|
22049
|
+
} : {
|
|
22050
|
+
right: "right0",
|
|
22051
|
+
top: "top0",
|
|
22052
|
+
bottom: "bottom0",
|
|
22053
|
+
width: "w_25px"
|
|
22054
|
+
};
|
|
22055
|
+
const startGradient = `linear-gradient(${!horizontal ? 180 : 90}deg, ${bgColor} 0%, ${transparentBgColor} 92%);`;
|
|
22056
|
+
const endGradient = `linear-gradient(${!horizontal ? 0 : 270}deg, ${bgColor} 0%, ${transparentBgColor} 92%);`;
|
|
22057
|
+
return [{
|
|
22058
|
+
...commonStyles,
|
|
22059
|
+
...startShadowStyles2,
|
|
22060
|
+
...{
|
|
22061
|
+
background: ["background_var", {
|
|
22062
|
+
"--background": maybeCssVar50(startGradient)
|
|
22063
|
+
}]
|
|
22064
|
+
}
|
|
22065
|
+
}, {
|
|
22066
|
+
...commonStyles,
|
|
22067
|
+
...endShadowStyles2,
|
|
22068
|
+
...{
|
|
22069
|
+
background: ["background_var", {
|
|
22070
|
+
"--background": maybeCssVar50(endGradient)
|
|
22071
|
+
}]
|
|
22072
|
+
}
|
|
22073
|
+
}];
|
|
22074
|
+
}, [horizontal, bgColor]);
|
|
22075
|
+
const updateScrollProps = useCallback29((el) => {
|
|
22076
|
+
const {
|
|
22077
|
+
scrollTop,
|
|
22078
|
+
scrollHeight,
|
|
22079
|
+
clientHeight,
|
|
22080
|
+
scrollWidth,
|
|
22081
|
+
scrollLeft,
|
|
22082
|
+
clientWidth
|
|
22083
|
+
} = el;
|
|
22084
|
+
const start = horizontal ? scrollLeft : scrollTop;
|
|
22085
|
+
const end = horizontal ? scrollWidth : scrollHeight;
|
|
22086
|
+
const boxSize = horizontal ? clientWidth : clientHeight;
|
|
22087
|
+
setShowStartShadow(start > 0);
|
|
22088
|
+
setShowEndShadow(start + boxSize < end);
|
|
22089
|
+
}, [horizontal]);
|
|
22090
|
+
const onResize = useCallback29(() => scrollRef.current && updateScrollProps(scrollRef.current), [updateScrollProps]);
|
|
22091
|
+
useResizeObserver7({
|
|
22092
|
+
ref: scrollRef,
|
|
22093
|
+
onResize
|
|
22094
|
+
});
|
|
22095
|
+
return /* @__PURE__ */ jsxs92("div", { ...trussProps90({
|
|
22096
|
+
display: "df",
|
|
22097
|
+
flexDirection: ["fd_var", {
|
|
22098
|
+
"--flexDirection": maybeCssVar50(!horizontal ? "column" : "row")
|
|
22099
|
+
}],
|
|
22100
|
+
position: "relative",
|
|
22101
|
+
overflow: "oh",
|
|
22102
|
+
height: "h_auto",
|
|
22103
|
+
width: "w_auto",
|
|
22104
|
+
...height === void 0 ? {} : {
|
|
22105
|
+
height
|
|
22106
|
+
},
|
|
22107
|
+
...width2 === void 0 ? {} : {
|
|
22108
|
+
width: width2
|
|
21893
22109
|
}
|
|
21894
|
-
|
|
21895
|
-
|
|
22110
|
+
}), ...tid, children: [
|
|
22111
|
+
/* @__PURE__ */ jsx175("div", { ...trussProps90({
|
|
22112
|
+
...startShadowStyles,
|
|
22113
|
+
...{
|
|
22114
|
+
opacity: ["o_var", {
|
|
22115
|
+
"--opacity": maybeCssVar50(showStartShadow ? 1 : 0)
|
|
22116
|
+
}]
|
|
22117
|
+
}
|
|
22118
|
+
}), "data-chromatic": "ignore" }),
|
|
22119
|
+
/* @__PURE__ */ jsx175("div", { ...trussProps90({
|
|
22120
|
+
...endShadowStyles,
|
|
22121
|
+
...{
|
|
22122
|
+
opacity: ["o_var", {
|
|
22123
|
+
"--opacity": maybeCssVar50(showEndShadow ? 1 : 0)
|
|
22124
|
+
}]
|
|
22125
|
+
}
|
|
22126
|
+
}), "data-chromatic": "ignore" }),
|
|
22127
|
+
/* @__PURE__ */ jsx175("div", { ...trussProps90({
|
|
22128
|
+
...xss,
|
|
22129
|
+
...{
|
|
22130
|
+
overflow: "oa",
|
|
22131
|
+
flexGrow: "fg1",
|
|
22132
|
+
scrollbarWidth: "scrollbarWidth_none"
|
|
22133
|
+
}
|
|
22134
|
+
}), onScroll: (e) => updateScrollProps(e.currentTarget), ref: scrollRef, children })
|
|
22135
|
+
] });
|
|
21896
22136
|
}
|
|
21897
22137
|
|
|
21898
22138
|
// src/layouts/SideNavLayout/SideNavLayoutContext.tsx
|
|
21899
22139
|
import {
|
|
21900
22140
|
createContext as createContext11,
|
|
21901
|
-
useCallback as
|
|
22141
|
+
useCallback as useCallback30,
|
|
21902
22142
|
useContext as useContext22,
|
|
21903
|
-
useEffect as
|
|
21904
|
-
useRef as
|
|
21905
|
-
useState as
|
|
22143
|
+
useEffect as useEffect35,
|
|
22144
|
+
useRef as useRef56,
|
|
22145
|
+
useState as useState53
|
|
21906
22146
|
} from "react";
|
|
21907
|
-
import { jsx as
|
|
22147
|
+
import { jsx as jsx176 } from "react/jsx-runtime";
|
|
21908
22148
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
21909
22149
|
function loadStoredNavState() {
|
|
21910
22150
|
try {
|
|
@@ -21928,18 +22168,18 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
21928
22168
|
}
|
|
21929
22169
|
var SideNavLayoutContext = createContext11(void 0);
|
|
21930
22170
|
function SideNavLayoutProvider(props) {
|
|
21931
|
-
const [navState, setNavStateInternal] =
|
|
22171
|
+
const [navState, setNavStateInternal] = useState53(
|
|
21932
22172
|
() => resolveInitialNavState(props.defaultNavState)
|
|
21933
22173
|
);
|
|
21934
22174
|
const bp = useBreakpoint();
|
|
21935
|
-
const prevMdAndUp =
|
|
21936
|
-
|
|
22175
|
+
const prevMdAndUp = useRef56(bp.mdAndUp);
|
|
22176
|
+
useEffect35(() => {
|
|
21937
22177
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
21938
22178
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
21939
22179
|
}
|
|
21940
22180
|
prevMdAndUp.current = bp.mdAndUp;
|
|
21941
22181
|
}, [bp.mdAndUp]);
|
|
21942
|
-
const setNavState =
|
|
22182
|
+
const setNavState = useCallback30((value) => {
|
|
21943
22183
|
setNavStateInternal((prev) => {
|
|
21944
22184
|
const next = typeof value === "function" ? value(prev) : value;
|
|
21945
22185
|
if (next === "expanded" || next === "collapse") {
|
|
@@ -21951,7 +22191,7 @@ function SideNavLayoutProvider(props) {
|
|
|
21951
22191
|
return next;
|
|
21952
22192
|
});
|
|
21953
22193
|
}, []);
|
|
21954
|
-
return /* @__PURE__ */
|
|
22194
|
+
return /* @__PURE__ */ jsx176(SideNavLayoutContext.Provider, { value: { navState, setNavState }, children: props.children });
|
|
21955
22195
|
}
|
|
21956
22196
|
function useSideNavLayoutContext() {
|
|
21957
22197
|
return useContext22(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
@@ -21962,8 +22202,8 @@ function useHasSideNavLayoutProvider() {
|
|
|
21962
22202
|
}
|
|
21963
22203
|
|
|
21964
22204
|
// src/components/SideNav/SideNav.tsx
|
|
21965
|
-
import { trussProps as
|
|
21966
|
-
import { jsx as
|
|
22205
|
+
import { trussProps as trussProps91 } from "@homebound/truss/runtime";
|
|
22206
|
+
import { jsx as jsx177, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
21967
22207
|
function SideNav(props) {
|
|
21968
22208
|
const {
|
|
21969
22209
|
top,
|
|
@@ -21976,8 +22216,8 @@ function SideNav(props) {
|
|
|
21976
22216
|
const tid = useTestIds(props, "sideNav");
|
|
21977
22217
|
const panelCollapsed = navState === "collapse";
|
|
21978
22218
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
21979
|
-
return /* @__PURE__ */
|
|
21980
|
-
top !== void 0 && /* @__PURE__ */
|
|
22219
|
+
return /* @__PURE__ */ jsxs93("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
22220
|
+
top !== void 0 && /* @__PURE__ */ jsx177("div", { ...trussProps91({
|
|
21981
22221
|
flexShrink: "fs0",
|
|
21982
22222
|
paddingLeft: "pl2",
|
|
21983
22223
|
paddingRight: "pr2",
|
|
@@ -21988,7 +22228,7 @@ function SideNav(props) {
|
|
|
21988
22228
|
paddingBottom: "pb4"
|
|
21989
22229
|
} : {}
|
|
21990
22230
|
}), ...tid.top, children: top }),
|
|
21991
|
-
/* @__PURE__ */
|
|
22231
|
+
/* @__PURE__ */ jsx177("div", { ...trussProps91({
|
|
21992
22232
|
flexGrow: "fg1",
|
|
21993
22233
|
overflowY: "oya",
|
|
21994
22234
|
display: "df",
|
|
@@ -22000,8 +22240,8 @@ function SideNav(props) {
|
|
|
22000
22240
|
...top === void 0 ? {
|
|
22001
22241
|
paddingTop: "pt5"
|
|
22002
22242
|
} : {}
|
|
22003
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */
|
|
22004
|
-
footer !== void 0 && /* @__PURE__ */
|
|
22243
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx177(AppNavItems, { items, panelCollapsed }) }),
|
|
22244
|
+
footer !== void 0 && /* @__PURE__ */ jsx177("div", { ...trussProps91({
|
|
22005
22245
|
flexShrink: "fs0",
|
|
22006
22246
|
paddingLeft: "pl2",
|
|
22007
22247
|
paddingRight: "pr2",
|
|
@@ -22017,10 +22257,10 @@ function SideNav(props) {
|
|
|
22017
22257
|
}
|
|
22018
22258
|
|
|
22019
22259
|
// src/components/Snackbar/useSnackbar.tsx
|
|
22020
|
-
import { useCallback as
|
|
22260
|
+
import { useCallback as useCallback31, useEffect as useEffect36 } from "react";
|
|
22021
22261
|
function useSnackbar() {
|
|
22022
22262
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
22023
|
-
const onClose =
|
|
22263
|
+
const onClose = useCallback31(
|
|
22024
22264
|
(noticeId) => {
|
|
22025
22265
|
setNotices((prev) => {
|
|
22026
22266
|
let returnValue = prev;
|
|
@@ -22037,7 +22277,7 @@ function useSnackbar() {
|
|
|
22037
22277
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
22038
22278
|
[]
|
|
22039
22279
|
);
|
|
22040
|
-
const triggerNotice =
|
|
22280
|
+
const triggerNotice = useCallback31(
|
|
22041
22281
|
(props) => {
|
|
22042
22282
|
const noticeId = props.id ?? `beamSnackbar:${snackbarId++}`;
|
|
22043
22283
|
let maybeTimeout;
|
|
@@ -22066,8 +22306,8 @@ function useSnackbar() {
|
|
|
22066
22306
|
},
|
|
22067
22307
|
[onClose, setNotices]
|
|
22068
22308
|
);
|
|
22069
|
-
const closeNotice =
|
|
22070
|
-
const useSnackbarOffset = ({ bottom }) =>
|
|
22309
|
+
const closeNotice = useCallback31((id) => onClose(id), [onClose]);
|
|
22310
|
+
const useSnackbarOffset = ({ bottom }) => useEffect36(() => {
|
|
22071
22311
|
setOffset({ bottom });
|
|
22072
22312
|
return () => setOffset({});
|
|
22073
22313
|
}, [bottom]);
|
|
@@ -22076,12 +22316,12 @@ function useSnackbar() {
|
|
|
22076
22316
|
var snackbarId = 1;
|
|
22077
22317
|
|
|
22078
22318
|
// src/components/Stepper.tsx
|
|
22079
|
-
import { useRef as
|
|
22319
|
+
import { useRef as useRef57 } from "react";
|
|
22080
22320
|
import { useButton as useButton12, useFocusRing as useFocusRing16, useHover as useHover20 } from "react-aria";
|
|
22081
|
-
import { trussProps as
|
|
22082
|
-
import { jsx as
|
|
22321
|
+
import { trussProps as trussProps92, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
|
|
22322
|
+
import { jsx as jsx178, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
22083
22323
|
import { createElement as createElement4 } from "react";
|
|
22084
|
-
var
|
|
22324
|
+
var __maybeInc15 = (inc) => {
|
|
22085
22325
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
22086
22326
|
};
|
|
22087
22327
|
function Stepper(props) {
|
|
@@ -22098,8 +22338,8 @@ function Stepper(props) {
|
|
|
22098
22338
|
const maxStepWidth = 200;
|
|
22099
22339
|
const minStepWidth = 100;
|
|
22100
22340
|
const gap = 8;
|
|
22101
|
-
return /* @__PURE__ */
|
|
22102
|
-
/* @__PURE__ */
|
|
22341
|
+
return /* @__PURE__ */ jsxs94("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
22342
|
+
/* @__PURE__ */ jsx178("ol", { ...trussProps92({
|
|
22103
22343
|
padding: "p_0",
|
|
22104
22344
|
margin: "m_0",
|
|
22105
22345
|
listStyle: "lis_none",
|
|
@@ -22109,7 +22349,7 @@ function Stepper(props) {
|
|
|
22109
22349
|
}]
|
|
22110
22350
|
}), children: steps.map((step) => {
|
|
22111
22351
|
const isCurrent = currentStep === step.value;
|
|
22112
|
-
return /* @__PURE__ */ createElement4("li", { ...
|
|
22352
|
+
return /* @__PURE__ */ createElement4("li", { ...trussProps92({
|
|
22113
22353
|
display: "df",
|
|
22114
22354
|
flexGrow: "fg1",
|
|
22115
22355
|
flexDirection: "fdc",
|
|
@@ -22119,9 +22359,9 @@ function Stepper(props) {
|
|
|
22119
22359
|
minWidth: ["mw_var", {
|
|
22120
22360
|
"--minWidth": `${minStepWidth}px`
|
|
22121
22361
|
}]
|
|
22122
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
22362
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx178(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
22123
22363
|
}) }),
|
|
22124
|
-
/* @__PURE__ */
|
|
22364
|
+
/* @__PURE__ */ jsx178("div", { ...trussProps92({
|
|
22125
22365
|
marginTop: "mt1",
|
|
22126
22366
|
backgroundColor: "bgGray300",
|
|
22127
22367
|
height: "h_4px",
|
|
@@ -22132,12 +22372,12 @@ function Stepper(props) {
|
|
|
22132
22372
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
22133
22373
|
}],
|
|
22134
22374
|
width: "w100"
|
|
22135
|
-
}), children: /* @__PURE__ */
|
|
22375
|
+
}), children: /* @__PURE__ */ jsx178("div", { ...trussProps92({
|
|
22136
22376
|
backgroundColor: "bgBlue600",
|
|
22137
22377
|
transition: "transition_width_200ms",
|
|
22138
22378
|
height: "h100",
|
|
22139
22379
|
width: ["w_var", {
|
|
22140
|
-
"--width":
|
|
22380
|
+
"--width": maybeCssVar51(__maybeInc15(`${(lastCompletedStep + 1) / steps.length * 100}%`))
|
|
22141
22381
|
}]
|
|
22142
22382
|
}) }) })
|
|
22143
22383
|
] });
|
|
@@ -22154,7 +22394,7 @@ function StepButton(props) {
|
|
|
22154
22394
|
onPress: onClick,
|
|
22155
22395
|
isDisabled: disabled
|
|
22156
22396
|
};
|
|
22157
|
-
const ref =
|
|
22397
|
+
const ref = useRef57(null);
|
|
22158
22398
|
const {
|
|
22159
22399
|
buttonProps,
|
|
22160
22400
|
isPressed
|
|
@@ -22173,7 +22413,7 @@ function StepButton(props) {
|
|
|
22173
22413
|
boxShadow: "bshFocus"
|
|
22174
22414
|
};
|
|
22175
22415
|
const tid = useTestIds(props, "stepButton");
|
|
22176
|
-
return /* @__PURE__ */
|
|
22416
|
+
return /* @__PURE__ */ jsxs94("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps92({
|
|
22177
22417
|
...{
|
|
22178
22418
|
fontWeight: "fw6",
|
|
22179
22419
|
fontSize: "fz_14px",
|
|
@@ -22225,7 +22465,7 @@ function StepButton(props) {
|
|
|
22225
22465
|
} : {},
|
|
22226
22466
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
22227
22467
|
}), ...tid[defaultTestId(label)], children: [
|
|
22228
|
-
/* @__PURE__ */
|
|
22468
|
+
/* @__PURE__ */ jsx178("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx178(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
22229
22469
|
label
|
|
22230
22470
|
] });
|
|
22231
22471
|
}
|
|
@@ -22236,12 +22476,12 @@ function StepIcon({
|
|
|
22236
22476
|
isCurrent = false
|
|
22237
22477
|
}) {
|
|
22238
22478
|
if (state === "error") {
|
|
22239
|
-
return /* @__PURE__ */
|
|
22479
|
+
return /* @__PURE__ */ jsx178(Icon, { icon: "errorCircle" });
|
|
22240
22480
|
}
|
|
22241
22481
|
if (state === "complete") {
|
|
22242
|
-
return /* @__PURE__ */
|
|
22482
|
+
return /* @__PURE__ */ jsx178(Icon, { icon: "check" });
|
|
22243
22483
|
}
|
|
22244
|
-
return /* @__PURE__ */
|
|
22484
|
+
return /* @__PURE__ */ jsx178("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx178("div", { ...trussProps92({
|
|
22245
22485
|
width: "w_10px",
|
|
22246
22486
|
height: "h_10px",
|
|
22247
22487
|
borderStyle: "bss",
|
|
@@ -22255,9 +22495,9 @@ function StepIcon({
|
|
|
22255
22495
|
}
|
|
22256
22496
|
|
|
22257
22497
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
22258
|
-
import { createPortal as
|
|
22259
|
-
import { trussProps as
|
|
22260
|
-
import { jsx as
|
|
22498
|
+
import { createPortal as createPortal7 } from "react-dom";
|
|
22499
|
+
import { trussProps as trussProps93 } from "@homebound/truss/runtime";
|
|
22500
|
+
import { jsx as jsx179, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
22261
22501
|
function SuperDrawerHeader(props) {
|
|
22262
22502
|
const {
|
|
22263
22503
|
hideControls
|
|
@@ -22274,20 +22514,20 @@ function SuperDrawerHeader(props) {
|
|
|
22274
22514
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
22275
22515
|
const isDetail = currentContent !== firstContent;
|
|
22276
22516
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
22277
|
-
return
|
|
22278
|
-
isStructuredProps(props) ? /* @__PURE__ */
|
|
22279
|
-
/* @__PURE__ */
|
|
22280
|
-
/* @__PURE__ */
|
|
22517
|
+
return createPortal7(/* @__PURE__ */ jsxs95("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
22518
|
+
isStructuredProps(props) ? /* @__PURE__ */ jsxs95("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
22519
|
+
/* @__PURE__ */ jsxs95("div", { className: "fg1 df aic gap2", children: [
|
|
22520
|
+
/* @__PURE__ */ jsx179("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
22281
22521
|
props.left
|
|
22282
22522
|
] }),
|
|
22283
|
-
props.right && /* @__PURE__ */
|
|
22284
|
-
] }) : /* @__PURE__ */
|
|
22285
|
-
!hideControls && /* @__PURE__ */
|
|
22523
|
+
props.right && /* @__PURE__ */ jsx179("div", { className: "fs0", children: props.right })
|
|
22524
|
+
] }) : /* @__PURE__ */ jsx179("div", { className: "fg1", children: props.children }),
|
|
22525
|
+
!hideControls && /* @__PURE__ */ jsx179("div", { ...trussProps93({
|
|
22286
22526
|
flexShrink: "fs0",
|
|
22287
22527
|
...isDetail ? {
|
|
22288
22528
|
visibility: "vh"
|
|
22289
22529
|
} : {}
|
|
22290
|
-
}), children: /* @__PURE__ */
|
|
22530
|
+
}), children: /* @__PURE__ */ jsx179(ButtonGroup, { buttons: [{
|
|
22291
22531
|
icon: "chevronLeft",
|
|
22292
22532
|
onClick: () => onPrevClick && onPrevClick(),
|
|
22293
22533
|
disabled: !onPrevClick
|
|
@@ -22303,18 +22543,18 @@ function isStructuredProps(props) {
|
|
|
22303
22543
|
}
|
|
22304
22544
|
|
|
22305
22545
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
22306
|
-
import { Fragment as
|
|
22546
|
+
import { Fragment as Fragment42, jsx as jsx180, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
22307
22547
|
function ConfirmCloseModal(props) {
|
|
22308
22548
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
22309
22549
|
const { modalState } = useBeamContext();
|
|
22310
22550
|
function closeModal() {
|
|
22311
22551
|
modalState.current = void 0;
|
|
22312
22552
|
}
|
|
22313
|
-
return /* @__PURE__ */
|
|
22314
|
-
/* @__PURE__ */
|
|
22315
|
-
/* @__PURE__ */
|
|
22316
|
-
/* @__PURE__ */
|
|
22317
|
-
/* @__PURE__ */
|
|
22553
|
+
return /* @__PURE__ */ jsxs96(Fragment42, { children: [
|
|
22554
|
+
/* @__PURE__ */ jsx180(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
22555
|
+
/* @__PURE__ */ jsx180(ModalBody, { children: /* @__PURE__ */ jsx180("p", { children: "Any changes you've made so far will be lost." }) }),
|
|
22556
|
+
/* @__PURE__ */ jsxs96(ModalFooter, { children: [
|
|
22557
|
+
/* @__PURE__ */ jsx180(
|
|
22318
22558
|
Button,
|
|
22319
22559
|
{
|
|
22320
22560
|
variant: "quaternary",
|
|
@@ -22325,17 +22565,17 @@ function ConfirmCloseModal(props) {
|
|
|
22325
22565
|
}
|
|
22326
22566
|
}
|
|
22327
22567
|
),
|
|
22328
|
-
/* @__PURE__ */
|
|
22568
|
+
/* @__PURE__ */ jsx180(Button, { label: continueText, onClick: closeModal })
|
|
22329
22569
|
] })
|
|
22330
22570
|
] });
|
|
22331
22571
|
}
|
|
22332
22572
|
|
|
22333
22573
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
22334
|
-
import { motion as
|
|
22574
|
+
import { motion as motion6 } from "framer-motion";
|
|
22335
22575
|
|
|
22336
22576
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
22337
22577
|
import { useMemo as useMemo51 } from "react";
|
|
22338
|
-
import { jsx as
|
|
22578
|
+
import { jsx as jsx181 } from "react/jsx-runtime";
|
|
22339
22579
|
function useSuperDrawer() {
|
|
22340
22580
|
const {
|
|
22341
22581
|
drawerContentStack: contentStack,
|
|
@@ -22347,7 +22587,7 @@ function useSuperDrawer() {
|
|
|
22347
22587
|
function canCloseDrawerDetails(i, doChange) {
|
|
22348
22588
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
22349
22589
|
if (!canClose(canCloseDrawerDetail)) {
|
|
22350
|
-
openModal({ content: /* @__PURE__ */
|
|
22590
|
+
openModal({ content: /* @__PURE__ */ jsx181(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
22351
22591
|
return false;
|
|
22352
22592
|
}
|
|
22353
22593
|
}
|
|
@@ -22367,7 +22607,7 @@ function useSuperDrawer() {
|
|
|
22367
22607
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
22368
22608
|
if (!canClose(canCloseDrawer)) {
|
|
22369
22609
|
openModal({
|
|
22370
|
-
content: /* @__PURE__ */
|
|
22610
|
+
content: /* @__PURE__ */ jsx181(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
22371
22611
|
});
|
|
22372
22612
|
return;
|
|
22373
22613
|
}
|
|
@@ -22463,7 +22703,7 @@ function canClose(canCloseCheck) {
|
|
|
22463
22703
|
|
|
22464
22704
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
22465
22705
|
import { mergeProps as mergeProps27 } from "@homebound/truss/runtime";
|
|
22466
|
-
import { Fragment as
|
|
22706
|
+
import { Fragment as Fragment43, jsx as jsx182, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
22467
22707
|
var SuperDrawerContent = ({
|
|
22468
22708
|
children,
|
|
22469
22709
|
actions
|
|
@@ -22483,17 +22723,17 @@ var SuperDrawerContent = ({
|
|
|
22483
22723
|
} = firstContent ?? {};
|
|
22484
22724
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
22485
22725
|
if (kind === "open") {
|
|
22486
|
-
return /* @__PURE__ */
|
|
22726
|
+
return /* @__PURE__ */ jsx182(motion6.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
22487
22727
|
} else if (kind === "detail") {
|
|
22488
|
-
return /* @__PURE__ */
|
|
22728
|
+
return /* @__PURE__ */ jsxs97(motion6.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
22489
22729
|
overflow: "auto"
|
|
22490
22730
|
}, transition: {
|
|
22491
22731
|
overflow: {
|
|
22492
22732
|
delay: 0.3
|
|
22493
22733
|
}
|
|
22494
22734
|
}, children: [
|
|
22495
|
-
/* @__PURE__ */
|
|
22496
|
-
/* @__PURE__ */
|
|
22735
|
+
/* @__PURE__ */ jsx182(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
22736
|
+
/* @__PURE__ */ jsx182(motion6.div, { initial: {
|
|
22497
22737
|
x: width2,
|
|
22498
22738
|
opacity: 0
|
|
22499
22739
|
}, animate: {
|
|
@@ -22511,7 +22751,7 @@ var SuperDrawerContent = ({
|
|
|
22511
22751
|
}, className: "pt2", children: children2 })
|
|
22512
22752
|
] }, "content");
|
|
22513
22753
|
} else {
|
|
22514
|
-
return /* @__PURE__ */
|
|
22754
|
+
return /* @__PURE__ */ jsx182(motion6.div, { ...mergeProps27(void 0, {
|
|
22515
22755
|
overflow: "auto"
|
|
22516
22756
|
}, {
|
|
22517
22757
|
paddingTop: "pt3",
|
|
@@ -22522,9 +22762,9 @@ var SuperDrawerContent = ({
|
|
|
22522
22762
|
}) }, "content");
|
|
22523
22763
|
}
|
|
22524
22764
|
}
|
|
22525
|
-
return /* @__PURE__ */
|
|
22765
|
+
return /* @__PURE__ */ jsxs97(Fragment43, { children: [
|
|
22526
22766
|
wrapWithMotionAndMaybeBack(children),
|
|
22527
|
-
actions && /* @__PURE__ */
|
|
22767
|
+
actions && /* @__PURE__ */ jsx182("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ jsx182("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx182(Button, { ...buttonProps }, i)) }) })
|
|
22528
22768
|
] });
|
|
22529
22769
|
};
|
|
22530
22770
|
|
|
@@ -22547,20 +22787,20 @@ function visit(rows, fn) {
|
|
|
22547
22787
|
}
|
|
22548
22788
|
|
|
22549
22789
|
// src/components/Toast/useToast.tsx
|
|
22550
|
-
import { useCallback as
|
|
22790
|
+
import { useCallback as useCallback32 } from "react";
|
|
22551
22791
|
function useToast() {
|
|
22552
22792
|
const { setNotice, clear } = useToastContext();
|
|
22553
|
-
const showToast =
|
|
22793
|
+
const showToast = useCallback32((props) => setNotice(props), [setNotice]);
|
|
22554
22794
|
return { showToast, clear };
|
|
22555
22795
|
}
|
|
22556
22796
|
|
|
22557
22797
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
22558
|
-
import { trussProps as
|
|
22559
|
-
import { jsx as
|
|
22798
|
+
import { trussProps as trussProps94, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
|
|
22799
|
+
import { jsx as jsx183, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
22560
22800
|
function SideNavLayout(props) {
|
|
22561
22801
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
22562
|
-
if (hasProvider) return /* @__PURE__ */
|
|
22563
|
-
return /* @__PURE__ */
|
|
22802
|
+
if (hasProvider) return /* @__PURE__ */ jsx183(SideNavLayoutContent, { ...props });
|
|
22803
|
+
return /* @__PURE__ */ jsx183(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx183(SideNavLayoutContent, { ...props }) });
|
|
22564
22804
|
}
|
|
22565
22805
|
function SideNavLayoutContent(props) {
|
|
22566
22806
|
const {
|
|
@@ -22580,7 +22820,7 @@ function SideNavLayoutContent(props) {
|
|
|
22580
22820
|
const railCollapsedWidthPx = 56;
|
|
22581
22821
|
const collapsed = navState === "collapse";
|
|
22582
22822
|
const showRail = sideNav !== void 0 && navState !== "hidden";
|
|
22583
|
-
const rail = showRail && /* @__PURE__ */
|
|
22823
|
+
const rail = showRail && /* @__PURE__ */ jsxs98("div", { ...trussProps94({
|
|
22584
22824
|
...{
|
|
22585
22825
|
position: "absolute",
|
|
22586
22826
|
top: "top0",
|
|
@@ -22604,7 +22844,7 @@ function SideNavLayoutContent(props) {
|
|
|
22604
22844
|
overflow: "oh",
|
|
22605
22845
|
transition: "transitionWidth",
|
|
22606
22846
|
zIndex: ["zIndex_var", {
|
|
22607
|
-
"--zIndex":
|
|
22847
|
+
"--zIndex": maybeCssVar52(zIndices.sideNav)
|
|
22608
22848
|
}]
|
|
22609
22849
|
},
|
|
22610
22850
|
...collapsed ? {
|
|
@@ -22626,12 +22866,12 @@ function SideNavLayoutContent(props) {
|
|
|
22626
22866
|
}
|
|
22627
22867
|
} : {}
|
|
22628
22868
|
}), ...tid.sideNav, children: [
|
|
22629
|
-
showCollapseToggle && /* @__PURE__ */
|
|
22630
|
-
/* @__PURE__ */
|
|
22869
|
+
showCollapseToggle && /* @__PURE__ */ jsx183("div", { className: "absolute right2 top2", children: /* @__PURE__ */ jsx183(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
22870
|
+
/* @__PURE__ */ jsx183("div", { className: "fg1 oya", ...tid.sideNavContent, children: sideNav })
|
|
22631
22871
|
] });
|
|
22632
|
-
return /* @__PURE__ */
|
|
22633
|
-
contrastRail ? /* @__PURE__ */
|
|
22634
|
-
/* @__PURE__ */
|
|
22872
|
+
return /* @__PURE__ */ jsxs98("div", { className: "relative df oh fg1", ...tid, children: [
|
|
22873
|
+
contrastRail ? /* @__PURE__ */ jsx183(ContrastScope, { children: rail }) : rail,
|
|
22874
|
+
/* @__PURE__ */ jsx183(ScrollableParent, { px: contentPx, xss: {
|
|
22635
22875
|
marginLeft: ["ml_var", {
|
|
22636
22876
|
"--marginLeft": `${railCollapsedWidthPx}px`
|
|
22637
22877
|
}],
|
|
@@ -22723,6 +22963,7 @@ export {
|
|
|
22723
22963
|
HbLoadingSpinner,
|
|
22724
22964
|
HbSpinnerProvider,
|
|
22725
22965
|
HelperText,
|
|
22966
|
+
HomeboundLogo,
|
|
22726
22967
|
Icon,
|
|
22727
22968
|
IconButton,
|
|
22728
22969
|
IconCard,
|
|
@@ -22738,6 +22979,7 @@ export {
|
|
|
22738
22979
|
MultiLineSelectField,
|
|
22739
22980
|
MultiSelectField,
|
|
22740
22981
|
NavLink,
|
|
22982
|
+
Navbar,
|
|
22741
22983
|
NumberField,
|
|
22742
22984
|
OpenModal,
|
|
22743
22985
|
PageHeader2 as PageHeader,
|
|
@@ -22918,6 +23160,7 @@ export {
|
|
|
22918
23160
|
useAutoSaveStatus,
|
|
22919
23161
|
useBreakpoint,
|
|
22920
23162
|
useComputed,
|
|
23163
|
+
useContentOverflow,
|
|
22921
23164
|
useContrastScope,
|
|
22922
23165
|
useDnDGridItem,
|
|
22923
23166
|
useFilter,
|