@homebound/beam 3.52.0 → 3.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +666 -695
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +69 -70
- package/dist/index.d.ts +69 -70
- package/dist/index.js +580 -608
- package/dist/index.js.map +1 -1
- package/dist/truss.css +0 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19948,6 +19948,27 @@ function invertSpacing(value) {
|
|
|
19948
19948
|
import { useResizeObserver as useResizeObserver5 } from "@react-aria/utils";
|
|
19949
19949
|
import React17, { useCallback as useCallback28, useEffect as useEffect28, useLayoutEffect as useLayoutEffect6, useMemo as useMemo41, useRef as useRef50, useState as useState45 } from "react";
|
|
19950
19950
|
|
|
19951
|
+
// src/components/Filters/utils.tsx
|
|
19952
|
+
function getActiveFilterCount(filter) {
|
|
19953
|
+
return safeKeys(filter).filter((key) => isDefined(filter[key])).length;
|
|
19954
|
+
}
|
|
19955
|
+
function updateFilter(currentFilter, key, value) {
|
|
19956
|
+
if (value === void 0) {
|
|
19957
|
+
return omitKey(key, currentFilter);
|
|
19958
|
+
} else {
|
|
19959
|
+
return { ...currentFilter, [key]: value };
|
|
19960
|
+
}
|
|
19961
|
+
}
|
|
19962
|
+
var filterTestIdPrefix = "filter";
|
|
19963
|
+
|
|
19964
|
+
// src/components/Layout/layoutTypes.ts
|
|
19965
|
+
function isGridTableProps(props) {
|
|
19966
|
+
return "rows" in props;
|
|
19967
|
+
}
|
|
19968
|
+
|
|
19969
|
+
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
19970
|
+
import { memo as memo2, useMemo as useMemo39, useState as useState43 } from "react";
|
|
19971
|
+
|
|
19951
19972
|
// src/components/ButtonMenu.tsx
|
|
19952
19973
|
import { useRef as useRef48 } from "react";
|
|
19953
19974
|
import { useMenuTrigger as useMenuTrigger2 } from "react-aria";
|
|
@@ -19985,27 +20006,6 @@ function isSelectionButtonMenuProps(props) {
|
|
|
19985
20006
|
return typeof props === "object" && "selectedItem" in props && "onChange" in props;
|
|
19986
20007
|
}
|
|
19987
20008
|
|
|
19988
|
-
// src/components/Filters/utils.tsx
|
|
19989
|
-
function getActiveFilterCount(filter) {
|
|
19990
|
-
return safeKeys(filter).filter((key) => isDefined(filter[key])).length;
|
|
19991
|
-
}
|
|
19992
|
-
function updateFilter(currentFilter, key, value) {
|
|
19993
|
-
if (value === void 0) {
|
|
19994
|
-
return omitKey(key, currentFilter);
|
|
19995
|
-
} else {
|
|
19996
|
-
return { ...currentFilter, [key]: value };
|
|
19997
|
-
}
|
|
19998
|
-
}
|
|
19999
|
-
var filterTestIdPrefix = "filter";
|
|
20000
|
-
|
|
20001
|
-
// src/components/Layout/layoutTypes.ts
|
|
20002
|
-
function isGridTableProps(props) {
|
|
20003
|
-
return "rows" in props;
|
|
20004
|
-
}
|
|
20005
|
-
|
|
20006
|
-
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
20007
|
-
import { memo as memo2, useMemo as useMemo39, useState as useState43 } from "react";
|
|
20008
|
-
|
|
20009
20009
|
// src/components/CountBadge.tsx
|
|
20010
20010
|
import { trussProps as trussProps73, maybeCssVar as maybeCssVar42 } from "@homebound/truss/runtime";
|
|
20011
20011
|
import { jsx as jsx140 } from "react/jsx-runtime";
|
|
@@ -20875,7 +20875,8 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
20875
20875
|
view,
|
|
20876
20876
|
setView,
|
|
20877
20877
|
clearFilters,
|
|
20878
|
-
searchApi
|
|
20878
|
+
searchApi,
|
|
20879
|
+
actionMenu
|
|
20879
20880
|
} = props;
|
|
20880
20881
|
const testId = useTestIds(props, "gridTableLayoutActions");
|
|
20881
20882
|
const {
|
|
@@ -20945,9 +20946,12 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
20945
20946
|
/* @__PURE__ */ jsx156(Icon, { icon: showFilters ? "chevronUp" : "chevronDown" })
|
|
20946
20947
|
] }), variant: "secondaryBlack", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterButton })
|
|
20947
20948
|
] }),
|
|
20948
|
-
(hasHideableColumns || withCardView) && /* @__PURE__ */ jsxs75("div", { className: "df gap_12px", children: [
|
|
20949
|
+
(hasHideableColumns || withCardView || actionMenu) && /* @__PURE__ */ jsxs75("div", { className: "df aic gap_12px", children: [
|
|
20949
20950
|
hasHideableColumns && view === "list" && columns && api && /* @__PURE__ */ jsx156(EditColumnsButton, { columns, api, tooltip: "Display columns" }),
|
|
20950
|
-
withCardView && view !== void 0 && setView && /* @__PURE__ */ jsx156(ViewToggleButton, { view, onChange: setView })
|
|
20951
|
+
withCardView && view !== void 0 && setView && /* @__PURE__ */ jsx156(ViewToggleButton, { view, onChange: setView }),
|
|
20952
|
+
actionMenu && /* @__PURE__ */ jsx156(ButtonMenu, { ...actionMenu, trigger: {
|
|
20953
|
+
icon: "verticalDots"
|
|
20954
|
+
} })
|
|
20951
20955
|
] })
|
|
20952
20956
|
] }),
|
|
20953
20957
|
sm && showSearch && /* @__PURE__ */ jsx156("div", { className: "pl3 pr3", children: searchTextField }),
|
|
@@ -21076,13 +21080,8 @@ var __maybeInc15 = (inc) => {
|
|
|
21076
21080
|
};
|
|
21077
21081
|
function GridTableLayoutComponent(props) {
|
|
21078
21082
|
const {
|
|
21079
|
-
pageTitle,
|
|
21080
|
-
breadCrumb,
|
|
21081
21083
|
tableProps,
|
|
21082
21084
|
layoutState,
|
|
21083
|
-
primaryAction,
|
|
21084
|
-
secondaryAction,
|
|
21085
|
-
tertiaryAction,
|
|
21086
21085
|
actionMenu,
|
|
21087
21086
|
hideEditColumns = false,
|
|
21088
21087
|
withCardView,
|
|
@@ -21099,7 +21098,7 @@ function GridTableLayoutComponent(props) {
|
|
|
21099
21098
|
const api = useMemo41(() => tableProps.api ?? new GridTableApiImpl(), [tableProps.api]);
|
|
21100
21099
|
const [view, setView] = usePersistedTableView(defaultView, !!withCardView);
|
|
21101
21100
|
const clientSearch = layoutState?.search === "client" ? layoutState.searchString : void 0;
|
|
21102
|
-
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView);
|
|
21101
|
+
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView || actionMenu);
|
|
21103
21102
|
const isVirtualized = tableProps.as === "virtual" || !!withCardView && view === "card";
|
|
21104
21103
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
21105
21104
|
const tableActionsRef = useRef50(null);
|
|
@@ -21121,7 +21120,7 @@ function GridTableLayoutComponent(props) {
|
|
|
21121
21120
|
searchApiRef.current?.clear();
|
|
21122
21121
|
}, [layoutState]);
|
|
21123
21122
|
const emptyState = useMemo41(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
|
|
21124
|
-
const tableActionsEl = /* @__PURE__ */ jsx159(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef });
|
|
21123
|
+
const tableActionsEl = /* @__PURE__ */ jsx159(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef, actionMenu });
|
|
21125
21124
|
const cardAs = withCardView && view === "card" ? "card" : void 0;
|
|
21126
21125
|
const tableStyle = resolveGridTableLayoutStyle(tableProps.style, inDocumentScrollLayout);
|
|
21127
21126
|
const tableBody = /* @__PURE__ */ jsx159(Fragment36, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx159(GridTable, { ...tableProps, ...cardAs ? {
|
|
@@ -21153,10 +21152,10 @@ function GridTableLayoutComponent(props) {
|
|
|
21153
21152
|
}), ...tid.stickyContent, children: tableActionsEl }),
|
|
21154
21153
|
inDocumentScrollLayout ? tableBody : /* @__PURE__ */ jsx159(ScrollableContent, { virtualized: isVirtualized, children: tableBody })
|
|
21155
21154
|
] });
|
|
21156
|
-
return
|
|
21157
|
-
|
|
21155
|
+
return (
|
|
21156
|
+
/* Wrapper sets --beam-table-actions-height so GridTable's sticky header can read it. */
|
|
21158
21157
|
/* @__PURE__ */ jsx159("div", { ref: tableWrapperRef, className: "display_contents", ...tid.tableWrapper, children: tableScrollContent })
|
|
21159
|
-
|
|
21158
|
+
);
|
|
21160
21159
|
}
|
|
21161
21160
|
var GridTableLayout = React17.memo(GridTableLayoutComponent);
|
|
21162
21161
|
function validateColumns(columns) {
|
|
@@ -21244,43 +21243,6 @@ function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|
|
|
21244
21243
|
};
|
|
21245
21244
|
}, [tableWrapperRef, syncHeightVar]);
|
|
21246
21245
|
}
|
|
21247
|
-
function Header2(props) {
|
|
21248
|
-
const {
|
|
21249
|
-
pageTitle,
|
|
21250
|
-
breadCrumb,
|
|
21251
|
-
primaryAction,
|
|
21252
|
-
secondaryAction,
|
|
21253
|
-
tertiaryAction,
|
|
21254
|
-
actionMenu
|
|
21255
|
-
} = props;
|
|
21256
|
-
const tids = useTestIds(props);
|
|
21257
|
-
return /* @__PURE__ */ jsx159(FullBleed, { children: /* @__PURE__ */ jsxs77("header", { ...trussProps80({
|
|
21258
|
-
...{
|
|
21259
|
-
paddingTop: "pt3",
|
|
21260
|
-
paddingBottom: "pb3",
|
|
21261
|
-
paddingRight: "pr3",
|
|
21262
|
-
paddingLeft: "pl3",
|
|
21263
|
-
minHeight: "mh_50px",
|
|
21264
|
-
backgroundColor: "bgWhite",
|
|
21265
|
-
display: "df",
|
|
21266
|
-
justifyContent: "jcsb",
|
|
21267
|
-
alignItems: "aic"
|
|
21268
|
-
}
|
|
21269
|
-
}), ...tids.header, children: [
|
|
21270
|
-
/* @__PURE__ */ jsxs77("div", { children: [
|
|
21271
|
-
breadCrumb && /* @__PURE__ */ jsx159(PageHeaderBreadcrumbs, { breadcrumb: breadCrumb }),
|
|
21272
|
-
/* @__PURE__ */ jsx159("h1", { className: "fw6 fz_30px lh_36px mt1", ...tids.pageTitle, children: pageTitle })
|
|
21273
|
-
] }),
|
|
21274
|
-
/* @__PURE__ */ jsxs77("div", { className: "df fwr jcfe gap1 aic", children: [
|
|
21275
|
-
tertiaryAction && /* @__PURE__ */ jsx159(Button, { ...tertiaryAction, variant: "tertiary" }),
|
|
21276
|
-
secondaryAction && /* @__PURE__ */ jsx159(Button, { ...secondaryAction, variant: "secondary" }),
|
|
21277
|
-
primaryAction && /* @__PURE__ */ jsx159(Button, { ...primaryAction }),
|
|
21278
|
-
actionMenu && /* @__PURE__ */ jsx159(ButtonMenu, { ...actionMenu, trigger: {
|
|
21279
|
-
icon: "verticalDots"
|
|
21280
|
-
} })
|
|
21281
|
-
] })
|
|
21282
|
-
] }) });
|
|
21283
|
-
}
|
|
21284
21246
|
function resolveGridTableLayoutStyle(userStyle, inDocumentScrollLayout) {
|
|
21285
21247
|
const layoutDefaults = {
|
|
21286
21248
|
allWhite: true,
|
|
@@ -23663,409 +23625,91 @@ function NavbarUserMenu({
|
|
|
23663
23625
|
}, placement: "right", ...tid }) });
|
|
23664
23626
|
}
|
|
23665
23627
|
|
|
23666
|
-
// src/components/
|
|
23667
|
-
import {
|
|
23668
|
-
|
|
23669
|
-
|
|
23670
|
-
|
|
23671
|
-
|
|
23672
|
-
|
|
23673
|
-
import { Fragment as Fragment44, jsx as jsx190, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
23674
|
-
function TabsWithContent(props) {
|
|
23675
|
-
const styles = hideTabs(props) ? {} : {
|
|
23676
|
-
paddingTop: "pt3"
|
|
23677
|
-
};
|
|
23678
|
-
return /* @__PURE__ */ jsxs94(Fragment44, { children: [
|
|
23679
|
-
/* @__PURE__ */ jsx190(Tabs, { ...props }),
|
|
23680
|
-
/* @__PURE__ */ jsx190(TabContent, { ...props, contentXss: {
|
|
23681
|
-
...styles,
|
|
23682
|
-
...props.contentXss
|
|
23683
|
-
} })
|
|
23684
|
-
] });
|
|
23685
|
-
}
|
|
23686
|
-
function TabContent(props) {
|
|
23687
|
-
const tid = useTestIds(props, "tab");
|
|
23688
|
-
const {
|
|
23689
|
-
tabs,
|
|
23690
|
-
contentXss = {},
|
|
23691
|
-
omitFullBleedPadding = false
|
|
23692
|
-
} = props;
|
|
23693
|
-
const location = useLocation2();
|
|
23694
|
-
const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
|
|
23695
|
-
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
23696
|
-
return paths.some((p) => !!matchPath({
|
|
23697
|
-
path: p,
|
|
23698
|
-
end: true
|
|
23699
|
-
}, location.pathname));
|
|
23700
|
-
}) || tabs[0] : props.tabs.find((tab) => tab.value === props.selected) || tabs[0];
|
|
23701
|
-
const uniqueValue = uniqueTabValue(selectedTab);
|
|
23702
|
-
return (
|
|
23703
|
-
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
23704
|
-
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
23705
|
-
/* @__PURE__ */ jsx190(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx190("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps100(contentXss), children: selectedTab.render() }) })
|
|
23706
|
-
);
|
|
23707
|
-
}
|
|
23708
|
-
function Tabs(props) {
|
|
23628
|
+
// src/components/Pagination.tsx
|
|
23629
|
+
import { jsx as jsx190, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
23630
|
+
var defaultPage = {
|
|
23631
|
+
offset: 0,
|
|
23632
|
+
limit: 100
|
|
23633
|
+
};
|
|
23634
|
+
function Pagination(props) {
|
|
23709
23635
|
const {
|
|
23710
|
-
|
|
23711
|
-
|
|
23712
|
-
includeBottomBorder,
|
|
23713
|
-
right,
|
|
23714
|
-
...others
|
|
23636
|
+
totalCount,
|
|
23637
|
+
pageSizes = [100, 500, 1e3]
|
|
23715
23638
|
} = props;
|
|
23716
|
-
const
|
|
23717
|
-
const selected = isRouteTabs(props) ? uniqueTabValue(props.tabs.find((t) => {
|
|
23718
|
-
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
23719
|
-
return paths.some((p) => !!matchPath({
|
|
23720
|
-
path: p,
|
|
23721
|
-
end: true
|
|
23722
|
-
}, location.pathname));
|
|
23723
|
-
}) || props.tabs[0]) : props.selected;
|
|
23639
|
+
const [page, setPage] = props.page;
|
|
23724
23640
|
const {
|
|
23725
|
-
|
|
23726
|
-
|
|
23727
|
-
} =
|
|
23728
|
-
const
|
|
23729
|
-
|
|
23730
|
-
|
|
23731
|
-
|
|
23732
|
-
|
|
23733
|
-
|
|
23734
|
-
|
|
23735
|
-
|
|
23736
|
-
|
|
23737
|
-
|
|
23738
|
-
|
|
23739
|
-
|
|
23740
|
-
|
|
23741
|
-
|
|
23742
|
-
function onBlur(e) {
|
|
23743
|
-
if (!(ref.current && ref.current.contains(e.relatedTarget))) {
|
|
23744
|
-
setActive(selected);
|
|
23641
|
+
pageSize,
|
|
23642
|
+
pageNumber
|
|
23643
|
+
} = toPageNumberSize(page);
|
|
23644
|
+
const pageOptions = pageSizes.map((size) => ({
|
|
23645
|
+
id: size,
|
|
23646
|
+
name: String(size)
|
|
23647
|
+
}));
|
|
23648
|
+
const hasPrevPage = pageNumber > 1;
|
|
23649
|
+
const hasNextPage = pageNumber < totalCount / pageSize;
|
|
23650
|
+
const first = pageSize * (pageNumber - 1) + (totalCount ? 1 : 0);
|
|
23651
|
+
const last = Math.min(pageSize * pageNumber, totalCount);
|
|
23652
|
+
const showLast = totalCount > 0;
|
|
23653
|
+
function set(newPage) {
|
|
23654
|
+
if ("pageNumber" in props.page[0]) {
|
|
23655
|
+
setPage(newPage);
|
|
23656
|
+
} else {
|
|
23657
|
+
setPage(toLimitAndOffset(newPage));
|
|
23745
23658
|
}
|
|
23746
23659
|
}
|
|
23747
|
-
|
|
23748
|
-
|
|
23749
|
-
|
|
23750
|
-
|
|
23751
|
-
|
|
23752
|
-
|
|
23753
|
-
|
|
23754
|
-
|
|
23755
|
-
|
|
23756
|
-
|
|
23757
|
-
|
|
23758
|
-
|
|
23759
|
-
|
|
23760
|
-
|
|
23761
|
-
|
|
23762
|
-
|
|
23763
|
-
|
|
23764
|
-
|
|
23765
|
-
|
|
23766
|
-
|
|
23767
|
-
|
|
23660
|
+
const tid = useTestIds(props, "pagination");
|
|
23661
|
+
return /* @__PURE__ */ jsxs94("div", { className: "df bcGray200 bts_solid btw_1px fw4 fz_12px lh_16px gray500 pl2 pr2 pt2", ...tid, children: [
|
|
23662
|
+
/* @__PURE__ */ jsx190("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
23663
|
+
/* @__PURE__ */ jsx190("div", { className: "w_78px", children: /* @__PURE__ */ jsx190(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
23664
|
+
pageNumber: 1,
|
|
23665
|
+
pageSize: val
|
|
23666
|
+
}), autoSort: false, ...tid.pageSize }) }),
|
|
23667
|
+
/* @__PURE__ */ jsxs94("div", { className: "mla mta mba df", children: [
|
|
23668
|
+
/* @__PURE__ */ jsxs94("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
|
|
23669
|
+
first,
|
|
23670
|
+
" ",
|
|
23671
|
+
showLast ? `- ${last}` : "",
|
|
23672
|
+
" of ",
|
|
23673
|
+
totalCount
|
|
23674
|
+
] }),
|
|
23675
|
+
/* @__PURE__ */ jsx190(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
23676
|
+
pageNumber: pageNumber - 1,
|
|
23677
|
+
pageSize
|
|
23678
|
+
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
23679
|
+
/* @__PURE__ */ jsx190(IconButton, { icon: "chevronRight", color: hasNextPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
23680
|
+
pageNumber: pageNumber + 1,
|
|
23681
|
+
pageSize
|
|
23682
|
+
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
23683
|
+
] })
|
|
23768
23684
|
] });
|
|
23769
23685
|
}
|
|
23770
|
-
function
|
|
23686
|
+
function toLimitAndOffset(page) {
|
|
23687
|
+
return "limit" in page ? page : {
|
|
23688
|
+
// E.g. on first page the offset is 0, second page the offset is 100, then 200, etc.
|
|
23689
|
+
offset: (page.pageNumber - 1) * page.pageSize,
|
|
23690
|
+
limit: page.pageSize
|
|
23691
|
+
};
|
|
23692
|
+
}
|
|
23693
|
+
function toPageNumberSize(page) {
|
|
23694
|
+
return "pageNumber" in page ? page : {
|
|
23695
|
+
pageNumber: Math.floor(page.offset / page.limit) + 1,
|
|
23696
|
+
pageSize: page.limit
|
|
23697
|
+
};
|
|
23698
|
+
}
|
|
23699
|
+
|
|
23700
|
+
// src/components/ScrollShadows.tsx
|
|
23701
|
+
import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
23702
|
+
import { useCallback as useCallback34, useMemo as useMemo52, useRef as useRef59, useState as useState54 } from "react";
|
|
23703
|
+
import { trussProps as trussProps100, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
|
|
23704
|
+
import { jsx as jsx191, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
23705
|
+
function ScrollShadows(props) {
|
|
23771
23706
|
const {
|
|
23772
|
-
|
|
23773
|
-
|
|
23774
|
-
|
|
23775
|
-
|
|
23776
|
-
onBlur,
|
|
23777
|
-
focusProps,
|
|
23778
|
-
isFocusVisible = false,
|
|
23779
|
-
...others
|
|
23707
|
+
children,
|
|
23708
|
+
xss,
|
|
23709
|
+
horizontal = false,
|
|
23710
|
+
bgColor = "rgba(255, 255, 255, 1)" /* White */
|
|
23780
23711
|
} = props;
|
|
23781
|
-
const
|
|
23782
|
-
disabled = false,
|
|
23783
|
-
name: label,
|
|
23784
|
-
icon,
|
|
23785
|
-
endAdornment
|
|
23786
|
-
} = tab;
|
|
23787
|
-
const isDisabled = !!disabled;
|
|
23788
|
-
const {
|
|
23789
|
-
hoverProps,
|
|
23790
|
-
isHovered
|
|
23791
|
-
} = useHover21({
|
|
23792
|
-
isDisabled
|
|
23793
|
-
});
|
|
23794
|
-
const {
|
|
23795
|
-
baseStyles: baseStyles4,
|
|
23796
|
-
activeStyles: activeStyles3,
|
|
23797
|
-
focusRingStyles: focusRingStyles2,
|
|
23798
|
-
hoverStyles: hoverStyles4,
|
|
23799
|
-
disabledStyles: disabledStyles3,
|
|
23800
|
-
activeHoverStyles
|
|
23801
|
-
} = useMemo52(() => getTabStyles(), []);
|
|
23802
|
-
const uniqueValue = uniqueTabValue(tab);
|
|
23803
|
-
const tabProps = {
|
|
23804
|
-
"aria-controls": `${uniqueValue}-tabPanel`,
|
|
23805
|
-
"aria-selected": active,
|
|
23806
|
-
"aria-disabled": isDisabled || void 0,
|
|
23807
|
-
id: `${uniqueValue}-tab`,
|
|
23808
|
-
role: "tab",
|
|
23809
|
-
tabIndex: active ? 0 : -1,
|
|
23810
|
-
...others,
|
|
23811
|
-
...trussProps100({
|
|
23812
|
-
...baseStyles4,
|
|
23813
|
-
...active && activeStyles3,
|
|
23814
|
-
...isDisabled && disabledStyles3,
|
|
23815
|
-
...isHovered && hoverStyles4,
|
|
23816
|
-
...isHovered && active && activeHoverStyles,
|
|
23817
|
-
...isFocusVisible && active && focusRingStyles2
|
|
23818
|
-
})
|
|
23819
|
-
};
|
|
23820
|
-
const interactiveProps = mergeProps30(focusProps, hoverProps, {
|
|
23821
|
-
onKeyUp,
|
|
23822
|
-
onBlur,
|
|
23823
|
-
...isRouteTab(tab) ? {} : {
|
|
23824
|
-
onClick: () => onClick(tab.value)
|
|
23825
|
-
}
|
|
23826
|
-
});
|
|
23827
|
-
const tabLabel = /* @__PURE__ */ jsxs94(Fragment44, { children: [
|
|
23828
|
-
label,
|
|
23829
|
-
(icon || endAdornment) && /* @__PURE__ */ jsx190("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx190(Icon, { icon }) : endAdornment })
|
|
23830
|
-
] });
|
|
23831
|
-
return isDisabled ? maybeTooltip({
|
|
23832
|
-
title: resolveTooltip(disabled),
|
|
23833
|
-
placement: "top",
|
|
23834
|
-
children: /* @__PURE__ */ jsx190("div", { ...tabProps, children: tabLabel })
|
|
23835
|
-
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx190(Link7, { ...mergeProps30(tabProps, interactiveProps, {
|
|
23836
|
-
className: "navLink"
|
|
23837
|
-
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx190("button", { ...{
|
|
23838
|
-
...tabProps,
|
|
23839
|
-
...interactiveProps
|
|
23840
|
-
}, children: tabLabel });
|
|
23841
|
-
}
|
|
23842
|
-
function getTabStyles() {
|
|
23843
|
-
const borderBottomWidthPx = 4;
|
|
23844
|
-
const verticalPaddingPx = 6;
|
|
23845
|
-
const borderBottomStyles = {
|
|
23846
|
-
borderBottomStyle: "bbs_solid",
|
|
23847
|
-
borderBottomWidth: ["borderBottomWidth_var", {
|
|
23848
|
-
"--borderBottomWidth": maybeCssVar53(`${borderBottomWidthPx}px`)
|
|
23849
|
-
}],
|
|
23850
|
-
paddingBottom: ["pb_var", {
|
|
23851
|
-
"--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
|
|
23852
|
-
}]
|
|
23853
|
-
};
|
|
23854
|
-
return {
|
|
23855
|
-
baseStyles: {
|
|
23856
|
-
display: "df",
|
|
23857
|
-
alignItems: "aic",
|
|
23858
|
-
height: "h_32px",
|
|
23859
|
-
paddingTop: ["py_var", {
|
|
23860
|
-
"--paddingTop": `${verticalPaddingPx}px`
|
|
23861
|
-
}],
|
|
23862
|
-
paddingBottom: ["py_var", {
|
|
23863
|
-
"--paddingBottom": `${verticalPaddingPx}px`
|
|
23864
|
-
}],
|
|
23865
|
-
paddingLeft: "pl1",
|
|
23866
|
-
paddingRight: "pr1",
|
|
23867
|
-
outline: "outline0",
|
|
23868
|
-
color: "gray700",
|
|
23869
|
-
width: "width_fit_content",
|
|
23870
|
-
cursor: "cursorPointer",
|
|
23871
|
-
fontWeight: "fw4",
|
|
23872
|
-
fontSize: "fz_14px",
|
|
23873
|
-
lineHeight: "lh_20px"
|
|
23874
|
-
},
|
|
23875
|
-
activeStyles: {
|
|
23876
|
-
...{
|
|
23877
|
-
borderColor: "bcBlue700",
|
|
23878
|
-
fontWeight: "fw6",
|
|
23879
|
-
fontSize: "fz_14px",
|
|
23880
|
-
lineHeight: "lh_20px",
|
|
23881
|
-
color: "gray900"
|
|
23882
|
-
},
|
|
23883
|
-
...borderBottomStyles
|
|
23884
|
-
},
|
|
23885
|
-
disabledStyles: {
|
|
23886
|
-
color: "gray400",
|
|
23887
|
-
cursor: "cursorNotAllowed"
|
|
23888
|
-
},
|
|
23889
|
-
focusRingStyles: {
|
|
23890
|
-
backgroundColor: "bgBlue50",
|
|
23891
|
-
boxShadow: "bshFocus"
|
|
23892
|
-
},
|
|
23893
|
-
hoverStyles: {
|
|
23894
|
-
...{
|
|
23895
|
-
borderColor: "bcGray400"
|
|
23896
|
-
},
|
|
23897
|
-
...borderBottomStyles
|
|
23898
|
-
},
|
|
23899
|
-
activeHoverStyles: {
|
|
23900
|
-
...{
|
|
23901
|
-
backgroundColor: "bgBlue50",
|
|
23902
|
-
borderColor: "bcBlue700"
|
|
23903
|
-
},
|
|
23904
|
-
...borderBottomStyles
|
|
23905
|
-
}
|
|
23906
|
-
};
|
|
23907
|
-
}
|
|
23908
|
-
function getNextTabValue(selected, key, tabs) {
|
|
23909
|
-
const enabledTabs = tabs.filter((tab) => tab.disabled !== true);
|
|
23910
|
-
const tabsToScan = key === "ArrowRight" ? enabledTabs : enabledTabs.reverse();
|
|
23911
|
-
const currentIndex = tabsToScan.findIndex((tab) => uniqueTabValue(tab) === selected);
|
|
23912
|
-
const nextIndex = currentIndex === tabsToScan.length - 1 ? 0 : currentIndex + 1;
|
|
23913
|
-
return uniqueTabValue(tabsToScan[nextIndex]);
|
|
23914
|
-
}
|
|
23915
|
-
function isRouteTabs(props) {
|
|
23916
|
-
const {
|
|
23917
|
-
tabs
|
|
23918
|
-
} = props;
|
|
23919
|
-
return tabs.length > 0 && isRouteTab(tabs[0]);
|
|
23920
|
-
}
|
|
23921
|
-
function isRouteTab(tab) {
|
|
23922
|
-
return "path" in tab;
|
|
23923
|
-
}
|
|
23924
|
-
function uniqueTabValue(tab) {
|
|
23925
|
-
return isRouteTab(tab) ? camelCase7(tab.name) : tab.value;
|
|
23926
|
-
}
|
|
23927
|
-
function hideTabs(props) {
|
|
23928
|
-
return props.alwaysShowAllTabs ? false : props.tabs.filter((t) => !t.disabled).length === 1;
|
|
23929
|
-
}
|
|
23930
|
-
|
|
23931
|
-
// src/components/PageHeader.tsx
|
|
23932
|
-
import { trussProps as trussProps101 } from "@homebound/truss/runtime";
|
|
23933
|
-
import { jsx as jsx191, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
23934
|
-
function PageHeader2(props) {
|
|
23935
|
-
const {
|
|
23936
|
-
title,
|
|
23937
|
-
documentTitleSuffix,
|
|
23938
|
-
rightSlot,
|
|
23939
|
-
tabs,
|
|
23940
|
-
breadcrumbs,
|
|
23941
|
-
...otherProps
|
|
23942
|
-
} = props;
|
|
23943
|
-
const tid = useTestIds(otherProps, "pageHeader");
|
|
23944
|
-
useDocumentTitle(title, documentTitleSuffix);
|
|
23945
|
-
return /* @__PURE__ */ jsxs95("header", { ...tid, ...trussProps101({
|
|
23946
|
-
display: "df",
|
|
23947
|
-
flexDirection: "fdc",
|
|
23948
|
-
paddingTop: "pt3",
|
|
23949
|
-
paddingLeft: "pl3",
|
|
23950
|
-
paddingRight: "pr3",
|
|
23951
|
-
borderBottomStyle: "bbs_solid",
|
|
23952
|
-
borderBottomWidth: "bbw_1px",
|
|
23953
|
-
gap: "gap2",
|
|
23954
|
-
borderColor: ["bc_var", {
|
|
23955
|
-
"--borderColor": "var(--b-surface-separator)"
|
|
23956
|
-
}],
|
|
23957
|
-
backgroundColor: ["bgColor_var", {
|
|
23958
|
-
"--backgroundColor": "var(--b-surface)"
|
|
23959
|
-
}]
|
|
23960
|
-
}), children: [
|
|
23961
|
-
/* @__PURE__ */ jsxs95("div", { ...trussProps101({
|
|
23962
|
-
...{
|
|
23963
|
-
display: "df",
|
|
23964
|
-
justifyContent: "jcsb",
|
|
23965
|
-
width: "w100",
|
|
23966
|
-
gap: "gap1"
|
|
23967
|
-
},
|
|
23968
|
-
...{
|
|
23969
|
-
...!tabs ? {
|
|
23970
|
-
marginBottom: "mb2"
|
|
23971
|
-
} : {}
|
|
23972
|
-
}
|
|
23973
|
-
}), children: [
|
|
23974
|
-
/* @__PURE__ */ jsxs95("div", { className: "mw0", children: [
|
|
23975
|
-
breadcrumbs && /* @__PURE__ */ jsx191(Breadcrumbs, { ...breadcrumbs }),
|
|
23976
|
-
/* @__PURE__ */ jsx191("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title })
|
|
23977
|
-
] }),
|
|
23978
|
-
/* @__PURE__ */ jsx191("div", { className: "fs0", children: rightSlot })
|
|
23979
|
-
] }),
|
|
23980
|
-
tabs && /* @__PURE__ */ jsx191(Tabs, { ...tabs })
|
|
23981
|
-
] });
|
|
23982
|
-
}
|
|
23983
|
-
|
|
23984
|
-
// src/components/Pagination.tsx
|
|
23985
|
-
import { jsx as jsx192, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
23986
|
-
var defaultPage = {
|
|
23987
|
-
offset: 0,
|
|
23988
|
-
limit: 100
|
|
23989
|
-
};
|
|
23990
|
-
function Pagination(props) {
|
|
23991
|
-
const {
|
|
23992
|
-
totalCount,
|
|
23993
|
-
pageSizes = [100, 500, 1e3]
|
|
23994
|
-
} = props;
|
|
23995
|
-
const [page, setPage] = props.page;
|
|
23996
|
-
const {
|
|
23997
|
-
pageSize,
|
|
23998
|
-
pageNumber
|
|
23999
|
-
} = toPageNumberSize(page);
|
|
24000
|
-
const pageOptions = pageSizes.map((size) => ({
|
|
24001
|
-
id: size,
|
|
24002
|
-
name: String(size)
|
|
24003
|
-
}));
|
|
24004
|
-
const hasPrevPage = pageNumber > 1;
|
|
24005
|
-
const hasNextPage = pageNumber < totalCount / pageSize;
|
|
24006
|
-
const first = pageSize * (pageNumber - 1) + (totalCount ? 1 : 0);
|
|
24007
|
-
const last = Math.min(pageSize * pageNumber, totalCount);
|
|
24008
|
-
const showLast = totalCount > 0;
|
|
24009
|
-
function set(newPage) {
|
|
24010
|
-
if ("pageNumber" in props.page[0]) {
|
|
24011
|
-
setPage(newPage);
|
|
24012
|
-
} else {
|
|
24013
|
-
setPage(toLimitAndOffset(newPage));
|
|
24014
|
-
}
|
|
24015
|
-
}
|
|
24016
|
-
const tid = useTestIds(props, "pagination");
|
|
24017
|
-
return /* @__PURE__ */ jsxs96("div", { className: "df bcGray200 bts_solid btw_1px fw4 fz_12px lh_16px gray500 pl2 pr2 pt2", ...tid, children: [
|
|
24018
|
-
/* @__PURE__ */ jsx192("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
24019
|
-
/* @__PURE__ */ jsx192("div", { className: "w_78px", children: /* @__PURE__ */ jsx192(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
24020
|
-
pageNumber: 1,
|
|
24021
|
-
pageSize: val
|
|
24022
|
-
}), autoSort: false, ...tid.pageSize }) }),
|
|
24023
|
-
/* @__PURE__ */ jsxs96("div", { className: "mla mta mba df", children: [
|
|
24024
|
-
/* @__PURE__ */ jsxs96("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
|
|
24025
|
-
first,
|
|
24026
|
-
" ",
|
|
24027
|
-
showLast ? `- ${last}` : "",
|
|
24028
|
-
" of ",
|
|
24029
|
-
totalCount
|
|
24030
|
-
] }),
|
|
24031
|
-
/* @__PURE__ */ jsx192(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
24032
|
-
pageNumber: pageNumber - 1,
|
|
24033
|
-
pageSize
|
|
24034
|
-
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
24035
|
-
/* @__PURE__ */ jsx192(IconButton, { icon: "chevronRight", color: hasNextPage ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(236, 235, 235, 1)" /* Gray200 */, onClick: () => set({
|
|
24036
|
-
pageNumber: pageNumber + 1,
|
|
24037
|
-
pageSize
|
|
24038
|
-
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
24039
|
-
] })
|
|
24040
|
-
] });
|
|
24041
|
-
}
|
|
24042
|
-
function toLimitAndOffset(page) {
|
|
24043
|
-
return "limit" in page ? page : {
|
|
24044
|
-
// E.g. on first page the offset is 0, second page the offset is 100, then 200, etc.
|
|
24045
|
-
offset: (page.pageNumber - 1) * page.pageSize,
|
|
24046
|
-
limit: page.pageSize
|
|
24047
|
-
};
|
|
24048
|
-
}
|
|
24049
|
-
function toPageNumberSize(page) {
|
|
24050
|
-
return "pageNumber" in page ? page : {
|
|
24051
|
-
pageNumber: Math.floor(page.offset / page.limit) + 1,
|
|
24052
|
-
pageSize: page.limit
|
|
24053
|
-
};
|
|
24054
|
-
}
|
|
24055
|
-
|
|
24056
|
-
// src/components/ScrollShadows.tsx
|
|
24057
|
-
import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
24058
|
-
import { useCallback as useCallback34, useMemo as useMemo53, useRef as useRef60, useState as useState55 } from "react";
|
|
24059
|
-
import { trussProps as trussProps102, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
24060
|
-
import { jsx as jsx193, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
24061
|
-
function ScrollShadows(props) {
|
|
24062
|
-
const {
|
|
24063
|
-
children,
|
|
24064
|
-
xss,
|
|
24065
|
-
horizontal = false,
|
|
24066
|
-
bgColor = "rgba(255, 255, 255, 1)" /* White */
|
|
24067
|
-
} = props;
|
|
24068
|
-
const tid = useTestIds(props);
|
|
23712
|
+
const tid = useTestIds(props);
|
|
24069
23713
|
const {
|
|
24070
23714
|
height,
|
|
24071
23715
|
width: width2
|
|
@@ -24073,15 +23717,15 @@ function ScrollShadows(props) {
|
|
|
24073
23717
|
if (!bgColor.includes("rgba")) {
|
|
24074
23718
|
throw new Error("ScrollShadows: bgColor prop must be in the format 'rgba(255, 255, 255, 1)'");
|
|
24075
23719
|
}
|
|
24076
|
-
const [showStartShadow, setShowStartShadow] =
|
|
24077
|
-
const [showEndShadow, setShowEndShadow] =
|
|
24078
|
-
const scrollRef =
|
|
24079
|
-
const [startShadowStyles, endShadowStyles] =
|
|
23720
|
+
const [showStartShadow, setShowStartShadow] = useState54(false);
|
|
23721
|
+
const [showEndShadow, setShowEndShadow] = useState54(false);
|
|
23722
|
+
const scrollRef = useRef59(null);
|
|
23723
|
+
const [startShadowStyles, endShadowStyles] = useMemo52(() => {
|
|
24080
23724
|
const transparentBgColor = bgColor.replace(/,1\)$/, ",0)");
|
|
24081
23725
|
const commonStyles = {
|
|
24082
23726
|
position: "absolute",
|
|
24083
23727
|
zIndex: ["z_var", {
|
|
24084
|
-
"--zIndex":
|
|
23728
|
+
"--zIndex": maybeCssVar53(zIndices.scrollShadow)
|
|
24085
23729
|
}],
|
|
24086
23730
|
pointerEvents: "pointerEvents_none"
|
|
24087
23731
|
};
|
|
@@ -24114,7 +23758,7 @@ function ScrollShadows(props) {
|
|
|
24114
23758
|
...startShadowStyles2,
|
|
24115
23759
|
...{
|
|
24116
23760
|
background: ["background_var", {
|
|
24117
|
-
"--background":
|
|
23761
|
+
"--background": maybeCssVar53(startGradient)
|
|
24118
23762
|
}]
|
|
24119
23763
|
}
|
|
24120
23764
|
}, {
|
|
@@ -24122,7 +23766,7 @@ function ScrollShadows(props) {
|
|
|
24122
23766
|
...endShadowStyles2,
|
|
24123
23767
|
...{
|
|
24124
23768
|
background: ["background_var", {
|
|
24125
|
-
"--background":
|
|
23769
|
+
"--background": maybeCssVar53(endGradient)
|
|
24126
23770
|
}]
|
|
24127
23771
|
}
|
|
24128
23772
|
}];
|
|
@@ -24147,10 +23791,10 @@ function ScrollShadows(props) {
|
|
|
24147
23791
|
ref: scrollRef,
|
|
24148
23792
|
onResize
|
|
24149
23793
|
});
|
|
24150
|
-
return /* @__PURE__ */
|
|
23794
|
+
return /* @__PURE__ */ jsxs95("div", { ...trussProps100({
|
|
24151
23795
|
display: "df",
|
|
24152
23796
|
flexDirection: ["fd_var", {
|
|
24153
|
-
"--flexDirection":
|
|
23797
|
+
"--flexDirection": maybeCssVar53(!horizontal ? "column" : "row")
|
|
24154
23798
|
}],
|
|
24155
23799
|
position: "relative",
|
|
24156
23800
|
overflow: "oh",
|
|
@@ -24163,23 +23807,23 @@ function ScrollShadows(props) {
|
|
|
24163
23807
|
width: width2
|
|
24164
23808
|
}
|
|
24165
23809
|
}), ...tid, children: [
|
|
24166
|
-
/* @__PURE__ */
|
|
23810
|
+
/* @__PURE__ */ jsx191("div", { ...trussProps100({
|
|
24167
23811
|
...startShadowStyles,
|
|
24168
23812
|
...{
|
|
24169
23813
|
opacity: ["o_var", {
|
|
24170
|
-
"--opacity":
|
|
23814
|
+
"--opacity": maybeCssVar53(showStartShadow ? 1 : 0)
|
|
24171
23815
|
}]
|
|
24172
23816
|
}
|
|
24173
23817
|
}), "data-chromatic": "ignore" }),
|
|
24174
|
-
/* @__PURE__ */
|
|
23818
|
+
/* @__PURE__ */ jsx191("div", { ...trussProps100({
|
|
24175
23819
|
...endShadowStyles,
|
|
24176
23820
|
...{
|
|
24177
23821
|
opacity: ["o_var", {
|
|
24178
|
-
"--opacity":
|
|
23822
|
+
"--opacity": maybeCssVar53(showEndShadow ? 1 : 0)
|
|
24179
23823
|
}]
|
|
24180
23824
|
}
|
|
24181
23825
|
}), "data-chromatic": "ignore" }),
|
|
24182
|
-
/* @__PURE__ */
|
|
23826
|
+
/* @__PURE__ */ jsx191("div", { ...trussProps100({
|
|
24183
23827
|
...xss,
|
|
24184
23828
|
...{
|
|
24185
23829
|
overflow: "oa",
|
|
@@ -24195,12 +23839,12 @@ import {
|
|
|
24195
23839
|
createContext as createContext14,
|
|
24196
23840
|
useCallback as useCallback35,
|
|
24197
23841
|
useContext as useContext26,
|
|
24198
|
-
useEffect as
|
|
24199
|
-
useMemo as
|
|
24200
|
-
useRef as
|
|
24201
|
-
useState as
|
|
23842
|
+
useEffect as useEffect35,
|
|
23843
|
+
useMemo as useMemo53,
|
|
23844
|
+
useRef as useRef60,
|
|
23845
|
+
useState as useState55
|
|
24202
23846
|
} from "react";
|
|
24203
|
-
import { jsx as
|
|
23847
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
24204
23848
|
var SIDE_NAV_LAYOUT_STATE_STORAGE_KEY = "beam.sideNavLayout.navState";
|
|
24205
23849
|
function loadStoredNavState() {
|
|
24206
23850
|
try {
|
|
@@ -24224,12 +23868,12 @@ function resolveInitialNavState(defaultNavState) {
|
|
|
24224
23868
|
}
|
|
24225
23869
|
var SideNavLayoutContext = createContext14(void 0);
|
|
24226
23870
|
function SideNavLayoutProvider(props) {
|
|
24227
|
-
const [navState, setNavStateInternal] =
|
|
23871
|
+
const [navState, setNavStateInternal] = useState55(
|
|
24228
23872
|
() => resolveInitialNavState(props.defaultNavState)
|
|
24229
23873
|
);
|
|
24230
23874
|
const bp = useBreakpoint();
|
|
24231
|
-
const prevMdAndUp =
|
|
24232
|
-
|
|
23875
|
+
const prevMdAndUp = useRef60(bp.mdAndUp);
|
|
23876
|
+
useEffect35(() => {
|
|
24233
23877
|
if (prevMdAndUp.current && !bp.mdAndUp) {
|
|
24234
23878
|
setNavStateInternal((prev) => prev === "expanded" ? "collapse" : prev);
|
|
24235
23879
|
}
|
|
@@ -24247,8 +23891,8 @@ function SideNavLayoutProvider(props) {
|
|
|
24247
23891
|
return next;
|
|
24248
23892
|
});
|
|
24249
23893
|
}, []);
|
|
24250
|
-
const value =
|
|
24251
|
-
return /* @__PURE__ */
|
|
23894
|
+
const value = useMemo53(() => ({ navState, setNavState }), [navState, setNavState]);
|
|
23895
|
+
return /* @__PURE__ */ jsx192(SideNavLayoutContext.Provider, { value, children: props.children });
|
|
24252
23896
|
}
|
|
24253
23897
|
function useSideNavLayoutContext() {
|
|
24254
23898
|
return useContext26(SideNavLayoutContext) ?? { navState: "expanded", setNavState: () => {
|
|
@@ -24259,8 +23903,8 @@ function useHasSideNavLayoutProvider() {
|
|
|
24259
23903
|
}
|
|
24260
23904
|
|
|
24261
23905
|
// src/components/SideNav/SideNav.tsx
|
|
24262
|
-
import { trussProps as
|
|
24263
|
-
import { jsx as
|
|
23906
|
+
import { trussProps as trussProps101 } from "@homebound/truss/runtime";
|
|
23907
|
+
import { jsx as jsx193, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
24264
23908
|
function SideNav(props) {
|
|
24265
23909
|
const {
|
|
24266
23910
|
top,
|
|
@@ -24273,8 +23917,8 @@ function SideNav(props) {
|
|
|
24273
23917
|
const tid = useTestIds(props, "sideNav");
|
|
24274
23918
|
const panelCollapsed = navState === "collapse";
|
|
24275
23919
|
const hideOnCollapse = panelCollapsed && !allItemsHaveIcons(items);
|
|
24276
|
-
return /* @__PURE__ */
|
|
24277
|
-
top !== void 0 && /* @__PURE__ */
|
|
23920
|
+
return /* @__PURE__ */ jsxs96("nav", { className: "df fdc h100 fs0", ...tid, children: [
|
|
23921
|
+
top !== void 0 && /* @__PURE__ */ jsx193("div", { ...trussProps101({
|
|
24278
23922
|
flexShrink: "fs0",
|
|
24279
23923
|
paddingLeft: "pl2",
|
|
24280
23924
|
paddingRight: "pr2",
|
|
@@ -24285,7 +23929,7 @@ function SideNav(props) {
|
|
|
24285
23929
|
paddingBottom: "pb4"
|
|
24286
23930
|
} : {}
|
|
24287
23931
|
}), ...tid.top, children: top }),
|
|
24288
|
-
/* @__PURE__ */
|
|
23932
|
+
/* @__PURE__ */ jsx193("div", { ...trussProps101({
|
|
24289
23933
|
flexGrow: "fg1",
|
|
24290
23934
|
overflowY: "oya",
|
|
24291
23935
|
display: "df",
|
|
@@ -24297,8 +23941,8 @@ function SideNav(props) {
|
|
|
24297
23941
|
...top === void 0 ? {
|
|
24298
23942
|
paddingTop: "pt5"
|
|
24299
23943
|
} : {}
|
|
24300
|
-
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */
|
|
24301
|
-
footer !== void 0 && /* @__PURE__ */
|
|
23944
|
+
}), ...tid.items, children: !hideOnCollapse && /* @__PURE__ */ jsx193(AppNavItems, { items, panelCollapsed }) }),
|
|
23945
|
+
footer !== void 0 && /* @__PURE__ */ jsx193("div", { ...trussProps101({
|
|
24302
23946
|
flexShrink: "fs0",
|
|
24303
23947
|
paddingLeft: "pl2",
|
|
24304
23948
|
paddingRight: "pr2",
|
|
@@ -24314,7 +23958,7 @@ function SideNav(props) {
|
|
|
24314
23958
|
}
|
|
24315
23959
|
|
|
24316
23960
|
// src/components/Snackbar/useSnackbar.tsx
|
|
24317
|
-
import { useCallback as useCallback36, useEffect as
|
|
23961
|
+
import { useCallback as useCallback36, useEffect as useEffect36 } from "react";
|
|
24318
23962
|
function useSnackbar() {
|
|
24319
23963
|
const { setNotices, setOffset } = useSnackbarContext();
|
|
24320
23964
|
const onClose = useCallback36(
|
|
@@ -24364,7 +24008,7 @@ function useSnackbar() {
|
|
|
24364
24008
|
[onClose, setNotices]
|
|
24365
24009
|
);
|
|
24366
24010
|
const closeNotice = useCallback36((id) => onClose(id), [onClose]);
|
|
24367
|
-
const useSnackbarOffset = ({ bottom }) =>
|
|
24011
|
+
const useSnackbarOffset = ({ bottom }) => useEffect36(() => {
|
|
24368
24012
|
setOffset({ bottom });
|
|
24369
24013
|
return () => setOffset({});
|
|
24370
24014
|
}, [bottom]);
|
|
@@ -24373,10 +24017,10 @@ function useSnackbar() {
|
|
|
24373
24017
|
var snackbarId = 1;
|
|
24374
24018
|
|
|
24375
24019
|
// src/components/Stepper.tsx
|
|
24376
|
-
import { useRef as
|
|
24377
|
-
import { useButton as useButton12, useFocusRing as
|
|
24378
|
-
import { trussProps as
|
|
24379
|
-
import { jsx as
|
|
24020
|
+
import { useRef as useRef61 } from "react";
|
|
24021
|
+
import { useButton as useButton12, useFocusRing as useFocusRing17, useHover as useHover21 } from "react-aria";
|
|
24022
|
+
import { trussProps as trussProps102, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
24023
|
+
import { jsx as jsx194, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
24380
24024
|
import { createElement as createElement5 } from "react";
|
|
24381
24025
|
var __maybeInc20 = (inc) => {
|
|
24382
24026
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -24395,8 +24039,8 @@ function Stepper(props) {
|
|
|
24395
24039
|
const maxStepWidth = 200;
|
|
24396
24040
|
const minStepWidth = 100;
|
|
24397
24041
|
const gap = 8;
|
|
24398
|
-
return /* @__PURE__ */
|
|
24399
|
-
/* @__PURE__ */
|
|
24042
|
+
return /* @__PURE__ */ jsxs97("nav", { "aria-label": "steps", className: "df fdc w100", ...tid, children: [
|
|
24043
|
+
/* @__PURE__ */ jsx194("ol", { ...trussProps102({
|
|
24400
24044
|
padding: "p_0",
|
|
24401
24045
|
margin: "m_0",
|
|
24402
24046
|
listStyle: "lis_none",
|
|
@@ -24406,7 +24050,7 @@ function Stepper(props) {
|
|
|
24406
24050
|
}]
|
|
24407
24051
|
}), children: steps.map((step) => {
|
|
24408
24052
|
const isCurrent = currentStep === step.value;
|
|
24409
|
-
return /* @__PURE__ */ createElement5("li", { ...
|
|
24053
|
+
return /* @__PURE__ */ createElement5("li", { ...trussProps102({
|
|
24410
24054
|
display: "df",
|
|
24411
24055
|
flexGrow: "fg1",
|
|
24412
24056
|
flexDirection: "fdc",
|
|
@@ -24416,9 +24060,9 @@ function Stepper(props) {
|
|
|
24416
24060
|
minWidth: ["mw_var", {
|
|
24417
24061
|
"--minWidth": `${minStepWidth}px`
|
|
24418
24062
|
}]
|
|
24419
|
-
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
24063
|
+
}), key: step.label, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx194(StepButton, { ...step, onClick: () => onChange(step.value), isCurrent, ...tid.stepButton }));
|
|
24420
24064
|
}) }),
|
|
24421
|
-
/* @__PURE__ */
|
|
24065
|
+
/* @__PURE__ */ jsx194("div", { ...trussProps102({
|
|
24422
24066
|
marginTop: "mt1",
|
|
24423
24067
|
backgroundColor: "bgGray300",
|
|
24424
24068
|
height: "h_4px",
|
|
@@ -24429,12 +24073,12 @@ function Stepper(props) {
|
|
|
24429
24073
|
"--minWidth": `${steps.length * minStepWidth + (steps.length - 1) * gap}px`
|
|
24430
24074
|
}],
|
|
24431
24075
|
width: "w100"
|
|
24432
|
-
}), children: /* @__PURE__ */
|
|
24076
|
+
}), children: /* @__PURE__ */ jsx194("div", { ...trussProps102({
|
|
24433
24077
|
backgroundColor: "bgBlue600",
|
|
24434
24078
|
transition: "transition_width_200ms",
|
|
24435
24079
|
height: "h100",
|
|
24436
24080
|
width: ["w_var", {
|
|
24437
|
-
"--width":
|
|
24081
|
+
"--width": maybeCssVar54(__maybeInc20(`${(lastCompletedStep + 1) / steps.length * 100}%`))
|
|
24438
24082
|
}]
|
|
24439
24083
|
}) }) })
|
|
24440
24084
|
] });
|
|
@@ -24451,7 +24095,7 @@ function StepButton(props) {
|
|
|
24451
24095
|
onPress: onClick,
|
|
24452
24096
|
isDisabled: disabled
|
|
24453
24097
|
};
|
|
24454
|
-
const ref =
|
|
24098
|
+
const ref = useRef61(null);
|
|
24455
24099
|
const {
|
|
24456
24100
|
buttonProps,
|
|
24457
24101
|
isPressed
|
|
@@ -24459,18 +24103,18 @@ function StepButton(props) {
|
|
|
24459
24103
|
const {
|
|
24460
24104
|
isFocusVisible,
|
|
24461
24105
|
focusProps
|
|
24462
|
-
} =
|
|
24106
|
+
} = useFocusRing17();
|
|
24463
24107
|
const {
|
|
24464
24108
|
hoverProps,
|
|
24465
24109
|
isHovered
|
|
24466
|
-
} =
|
|
24110
|
+
} = useHover21(ariaProps);
|
|
24467
24111
|
const focusRingStyles2 = state === "error" ? {
|
|
24468
24112
|
boxShadow: "bshDanger"
|
|
24469
24113
|
} : {
|
|
24470
24114
|
boxShadow: "bshFocus"
|
|
24471
24115
|
};
|
|
24472
24116
|
const tid = useTestIds(props, "stepButton");
|
|
24473
|
-
return /* @__PURE__ */
|
|
24117
|
+
return /* @__PURE__ */ jsxs97("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps102({
|
|
24474
24118
|
...{
|
|
24475
24119
|
fontWeight: "fw6",
|
|
24476
24120
|
fontSize: "fz_14px",
|
|
@@ -24522,7 +24166,7 @@ function StepButton(props) {
|
|
|
24522
24166
|
} : {},
|
|
24523
24167
|
...isFocusVisible ? focusRingStyles2 : {}
|
|
24524
24168
|
}), ...tid[defaultTestId(label)], children: [
|
|
24525
|
-
/* @__PURE__ */
|
|
24169
|
+
/* @__PURE__ */ jsx194("span", { className: "fs0 mr_4px", children: /* @__PURE__ */ jsx194(StepIcon, { state, isHovered, isPressed, isCurrent }) }),
|
|
24526
24170
|
label
|
|
24527
24171
|
] });
|
|
24528
24172
|
}
|
|
@@ -24533,12 +24177,12 @@ function StepIcon({
|
|
|
24533
24177
|
isCurrent = false
|
|
24534
24178
|
}) {
|
|
24535
24179
|
if (state === "error") {
|
|
24536
|
-
return /* @__PURE__ */
|
|
24180
|
+
return /* @__PURE__ */ jsx194(Icon, { icon: "errorCircle" });
|
|
24537
24181
|
}
|
|
24538
24182
|
if (state === "complete") {
|
|
24539
|
-
return /* @__PURE__ */
|
|
24183
|
+
return /* @__PURE__ */ jsx194(Icon, { icon: "check" });
|
|
24540
24184
|
}
|
|
24541
|
-
return /* @__PURE__ */
|
|
24185
|
+
return /* @__PURE__ */ jsx194("div", { className: "w_24px h_24px df aic jcc", children: /* @__PURE__ */ jsx194("div", { ...trussProps102({
|
|
24542
24186
|
width: "w_10px",
|
|
24543
24187
|
height: "h_10px",
|
|
24544
24188
|
borderStyle: "bss",
|
|
@@ -24552,10 +24196,10 @@ function StepIcon({
|
|
|
24552
24196
|
}
|
|
24553
24197
|
|
|
24554
24198
|
// src/components/StepperTabs/StepperTab.tsx
|
|
24555
|
-
import { useRef as
|
|
24556
|
-
import { mergeProps as
|
|
24557
|
-
import { trussProps as
|
|
24558
|
-
import { jsx as
|
|
24199
|
+
import { useRef as useRef62 } from "react";
|
|
24200
|
+
import { mergeProps as mergeProps30, useButton as useButton13, useFocusRing as useFocusRing18, useHover as useHover22, VisuallyHidden as VisuallyHidden10 } from "react-aria";
|
|
24201
|
+
import { trussProps as trussProps103, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
24202
|
+
import { jsx as jsx195, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
24559
24203
|
function StepperTab(props) {
|
|
24560
24204
|
const {
|
|
24561
24205
|
label,
|
|
@@ -24570,20 +24214,20 @@ function StepperTab(props) {
|
|
|
24570
24214
|
onPress: () => onClick(value),
|
|
24571
24215
|
isDisabled: disabled || collapsed
|
|
24572
24216
|
};
|
|
24573
|
-
const ref =
|
|
24217
|
+
const ref = useRef62(null);
|
|
24574
24218
|
const {
|
|
24575
24219
|
buttonProps
|
|
24576
24220
|
} = useButton13(ariaProps, ref);
|
|
24577
24221
|
const {
|
|
24578
24222
|
isFocusVisible,
|
|
24579
24223
|
focusProps
|
|
24580
|
-
} =
|
|
24224
|
+
} = useFocusRing18();
|
|
24581
24225
|
const {
|
|
24582
24226
|
hoverProps,
|
|
24583
24227
|
isHovered
|
|
24584
|
-
} =
|
|
24228
|
+
} = useHover22(ariaProps);
|
|
24585
24229
|
const tid = useTestIds(props, "stepperTab");
|
|
24586
|
-
return /* @__PURE__ */
|
|
24230
|
+
return /* @__PURE__ */ jsxs98("button", { ref, ...mergeProps30(buttonProps, focusProps, hoverProps), "aria-label": label, ...trussProps103({
|
|
24587
24231
|
...stepperTabStyles.baseStyles,
|
|
24588
24232
|
...getStateStyles(active, completed),
|
|
24589
24233
|
...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
|
|
@@ -24591,9 +24235,9 @@ function StepperTab(props) {
|
|
|
24591
24235
|
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
24592
24236
|
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
24593
24237
|
}), ...tid[defaultTestId(value)], children: [
|
|
24594
|
-
/* @__PURE__ */
|
|
24595
|
-
completed && /* @__PURE__ */
|
|
24596
|
-
/* @__PURE__ */
|
|
24238
|
+
/* @__PURE__ */ jsx195("span", { className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1", children: label }),
|
|
24239
|
+
completed && /* @__PURE__ */ jsx195("span", { className: "fs0 ml1", children: /* @__PURE__ */ jsx195(Icon, { icon: "check", inc: 2.5, ...tid.check }) }),
|
|
24240
|
+
/* @__PURE__ */ jsx195(VisuallyHidden10, { children: completed ? "Complete" : "Not Complete" })
|
|
24597
24241
|
] });
|
|
24598
24242
|
}
|
|
24599
24243
|
function withBorderBottom(color) {
|
|
@@ -24601,7 +24245,7 @@ function withBorderBottom(color) {
|
|
|
24601
24245
|
...{
|
|
24602
24246
|
borderBottomStyle: "bbs_solid",
|
|
24603
24247
|
borderBottomWidth: ["borderBottomWidth_var", {
|
|
24604
|
-
"--borderBottomWidth":
|
|
24248
|
+
"--borderBottomWidth": maybeCssVar55(`3px`)
|
|
24605
24249
|
}]
|
|
24606
24250
|
},
|
|
24607
24251
|
...color
|
|
@@ -24673,8 +24317,8 @@ var stepperTabStyles = {
|
|
|
24673
24317
|
};
|
|
24674
24318
|
|
|
24675
24319
|
// src/components/StepperTabs/StepperTabs.tsx
|
|
24676
|
-
import { trussProps as
|
|
24677
|
-
import { jsx as
|
|
24320
|
+
import { trussProps as trussProps104 } from "@homebound/truss/runtime";
|
|
24321
|
+
import { jsx as jsx196 } from "react/jsx-runtime";
|
|
24678
24322
|
import { createElement as createElement6 } from "react";
|
|
24679
24323
|
function StepperTabs(props) {
|
|
24680
24324
|
const {
|
|
@@ -24687,7 +24331,7 @@ function StepperTabs(props) {
|
|
|
24687
24331
|
sm: collapsed
|
|
24688
24332
|
} = useBreakpoint();
|
|
24689
24333
|
const capWidth = steps.length <= 3;
|
|
24690
|
-
return /* @__PURE__ */
|
|
24334
|
+
return /* @__PURE__ */ jsx196("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ jsx196("ol", { ...trussProps104({
|
|
24691
24335
|
padding: "p_0",
|
|
24692
24336
|
margin: "m_0",
|
|
24693
24337
|
listStyle: "lis_none",
|
|
@@ -24701,7 +24345,7 @@ function StepperTabs(props) {
|
|
|
24701
24345
|
borderColor: "bcGray400"
|
|
24702
24346
|
}), children: steps.map((step) => {
|
|
24703
24347
|
const isCurrent = step.value === currentStep;
|
|
24704
|
-
return /* @__PURE__ */ createElement6("li", { ...
|
|
24348
|
+
return /* @__PURE__ */ createElement6("li", { ...trussProps104({
|
|
24705
24349
|
display: "df",
|
|
24706
24350
|
flexGrow: "fg1",
|
|
24707
24351
|
flexBasis: "fb_0",
|
|
@@ -24713,7 +24357,7 @@ function StepperTabs(props) {
|
|
|
24713
24357
|
"--maxWidth": `${maxStepWidthPx}px`
|
|
24714
24358
|
}]
|
|
24715
24359
|
} : {}
|
|
24716
|
-
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */
|
|
24360
|
+
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ jsx196(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: step.completed, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
|
|
24717
24361
|
}) }) });
|
|
24718
24362
|
}
|
|
24719
24363
|
var maxStepWidthPx = 280;
|
|
@@ -24721,8 +24365,8 @@ var gapPx = 6;
|
|
|
24721
24365
|
|
|
24722
24366
|
// src/components/SuperDrawer/components/SuperDrawerHeader.tsx
|
|
24723
24367
|
import { createPortal as createPortal7 } from "react-dom";
|
|
24724
|
-
import { trussProps as
|
|
24725
|
-
import { jsx as
|
|
24368
|
+
import { trussProps as trussProps105 } from "@homebound/truss/runtime";
|
|
24369
|
+
import { jsx as jsx197, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
24726
24370
|
function SuperDrawerHeader(props) {
|
|
24727
24371
|
const {
|
|
24728
24372
|
hideControls
|
|
@@ -24739,20 +24383,20 @@ function SuperDrawerHeader(props) {
|
|
|
24739
24383
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
24740
24384
|
const isDetail = currentContent !== firstContent;
|
|
24741
24385
|
const tid = useTestIds({}, "superDrawerHeader");
|
|
24742
|
-
return createPortal7(/* @__PURE__ */
|
|
24743
|
-
isStructuredProps(props) ? /* @__PURE__ */
|
|
24744
|
-
/* @__PURE__ */
|
|
24745
|
-
/* @__PURE__ */
|
|
24386
|
+
return createPortal7(/* @__PURE__ */ jsxs99("div", { className: "df aic jcsb gap3", ...tid, children: [
|
|
24387
|
+
isStructuredProps(props) ? /* @__PURE__ */ jsxs99("div", { className: "df jcsb aic gap2 fg1", children: [
|
|
24388
|
+
/* @__PURE__ */ jsxs99("div", { className: "fg1 df aic gap2", children: [
|
|
24389
|
+
/* @__PURE__ */ jsx197("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
|
|
24746
24390
|
props.left
|
|
24747
24391
|
] }),
|
|
24748
|
-
props.right && /* @__PURE__ */
|
|
24749
|
-
] }) : /* @__PURE__ */
|
|
24750
|
-
!hideControls && /* @__PURE__ */
|
|
24392
|
+
props.right && /* @__PURE__ */ jsx197("div", { className: "fs0", children: props.right })
|
|
24393
|
+
] }) : /* @__PURE__ */ jsx197("div", { className: "fg1", children: props.children }),
|
|
24394
|
+
!hideControls && /* @__PURE__ */ jsx197("div", { ...trussProps105({
|
|
24751
24395
|
flexShrink: "fs0",
|
|
24752
24396
|
...isDetail ? {
|
|
24753
24397
|
visibility: "vh"
|
|
24754
24398
|
} : {}
|
|
24755
|
-
}), children: /* @__PURE__ */
|
|
24399
|
+
}), children: /* @__PURE__ */ jsx197(ButtonGroup, { buttons: [{
|
|
24756
24400
|
icon: "chevronLeft",
|
|
24757
24401
|
onClick: () => onPrevClick && onPrevClick(),
|
|
24758
24402
|
disabled: !onPrevClick
|
|
@@ -24768,18 +24412,18 @@ function isStructuredProps(props) {
|
|
|
24768
24412
|
}
|
|
24769
24413
|
|
|
24770
24414
|
// src/components/SuperDrawer/ConfirmCloseModal.tsx
|
|
24771
|
-
import { Fragment as
|
|
24415
|
+
import { Fragment as Fragment44, jsx as jsx198, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
24772
24416
|
function ConfirmCloseModal(props) {
|
|
24773
24417
|
const { onClose, discardText = "Discard Changes", continueText = "Continue Editing" } = props;
|
|
24774
24418
|
const { modalState } = useBeamContext();
|
|
24775
24419
|
function closeModal() {
|
|
24776
24420
|
modalState.current = void 0;
|
|
24777
24421
|
}
|
|
24778
|
-
return /* @__PURE__ */
|
|
24779
|
-
/* @__PURE__ */
|
|
24780
|
-
/* @__PURE__ */
|
|
24781
|
-
/* @__PURE__ */
|
|
24782
|
-
/* @__PURE__ */
|
|
24422
|
+
return /* @__PURE__ */ jsxs100(Fragment44, { children: [
|
|
24423
|
+
/* @__PURE__ */ jsx198(ModalHeader, { children: "Are you sure you want to cancel?" }),
|
|
24424
|
+
/* @__PURE__ */ jsx198(ModalBody, { children: /* @__PURE__ */ jsx198("p", { children: "Any changes you've made so far will be lost." }) }),
|
|
24425
|
+
/* @__PURE__ */ jsxs100(ModalFooter, { children: [
|
|
24426
|
+
/* @__PURE__ */ jsx198(
|
|
24783
24427
|
Button,
|
|
24784
24428
|
{
|
|
24785
24429
|
variant: "quaternary",
|
|
@@ -24790,7 +24434,7 @@ function ConfirmCloseModal(props) {
|
|
|
24790
24434
|
}
|
|
24791
24435
|
}
|
|
24792
24436
|
),
|
|
24793
|
-
/* @__PURE__ */
|
|
24437
|
+
/* @__PURE__ */ jsx198(Button, { label: continueText, onClick: closeModal })
|
|
24794
24438
|
] })
|
|
24795
24439
|
] });
|
|
24796
24440
|
}
|
|
@@ -24799,8 +24443,8 @@ function ConfirmCloseModal(props) {
|
|
|
24799
24443
|
import { motion as motion6 } from "framer-motion";
|
|
24800
24444
|
|
|
24801
24445
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
24802
|
-
import { useMemo as
|
|
24803
|
-
import { jsx as
|
|
24446
|
+
import { useMemo as useMemo54 } from "react";
|
|
24447
|
+
import { jsx as jsx199 } from "react/jsx-runtime";
|
|
24804
24448
|
function useSuperDrawer() {
|
|
24805
24449
|
const {
|
|
24806
24450
|
drawerContentStack: contentStack,
|
|
@@ -24812,7 +24456,7 @@ function useSuperDrawer() {
|
|
|
24812
24456
|
function canCloseDrawerDetails(i, doChange) {
|
|
24813
24457
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
24814
24458
|
if (!canClose(canCloseDrawerDetail)) {
|
|
24815
|
-
openModal({ content: /* @__PURE__ */
|
|
24459
|
+
openModal({ content: /* @__PURE__ */ jsx199(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
24816
24460
|
return false;
|
|
24817
24461
|
}
|
|
24818
24462
|
}
|
|
@@ -24832,14 +24476,14 @@ function useSuperDrawer() {
|
|
|
24832
24476
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
24833
24477
|
if (!canClose(canCloseDrawer)) {
|
|
24834
24478
|
openModal({
|
|
24835
|
-
content: /* @__PURE__ */
|
|
24479
|
+
content: /* @__PURE__ */ jsx199(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
24836
24480
|
});
|
|
24837
24481
|
return;
|
|
24838
24482
|
}
|
|
24839
24483
|
}
|
|
24840
24484
|
doChange();
|
|
24841
24485
|
}
|
|
24842
|
-
const closeActions =
|
|
24486
|
+
const closeActions = useMemo54(
|
|
24843
24487
|
() => {
|
|
24844
24488
|
return {
|
|
24845
24489
|
/** Attempts to close the drawer. If any checks fail, a confirmation modal will appear */
|
|
@@ -24874,7 +24518,7 @@ function useSuperDrawer() {
|
|
|
24874
24518
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24875
24519
|
[canCloseChecks, canCloseDetailsChecks, contentStack, modalState, openModal]
|
|
24876
24520
|
);
|
|
24877
|
-
const actions =
|
|
24521
|
+
const actions = useMemo54(
|
|
24878
24522
|
() => {
|
|
24879
24523
|
return {
|
|
24880
24524
|
// TODO: Maybe we should rename to openDrawer as a breaking change (to match openDrawerDetail)
|
|
@@ -24927,8 +24571,8 @@ function canClose(canCloseCheck) {
|
|
|
24927
24571
|
}
|
|
24928
24572
|
|
|
24929
24573
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
24930
|
-
import { mergeProps as
|
|
24931
|
-
import { Fragment as
|
|
24574
|
+
import { mergeProps as mergeProps31 } from "@homebound/truss/runtime";
|
|
24575
|
+
import { Fragment as Fragment45, jsx as jsx200, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
24932
24576
|
var SuperDrawerContent = ({
|
|
24933
24577
|
children,
|
|
24934
24578
|
actions
|
|
@@ -24948,17 +24592,17 @@ var SuperDrawerContent = ({
|
|
|
24948
24592
|
} = firstContent ?? {};
|
|
24949
24593
|
function wrapWithMotionAndMaybeBack(children2) {
|
|
24950
24594
|
if (kind === "open") {
|
|
24951
|
-
return /* @__PURE__ */
|
|
24595
|
+
return /* @__PURE__ */ jsx200(motion6.div, { className: "pt3 pb3 pr3 pl3 fg1 oa", children: children2 }, "content");
|
|
24952
24596
|
} else if (kind === "detail") {
|
|
24953
|
-
return /* @__PURE__ */
|
|
24597
|
+
return /* @__PURE__ */ jsxs101(motion6.div, { className: "pl3 pr3 pt2 pb3 fg1", animate: {
|
|
24954
24598
|
overflow: "auto"
|
|
24955
24599
|
}, transition: {
|
|
24956
24600
|
overflow: {
|
|
24957
24601
|
delay: 0.3
|
|
24958
24602
|
}
|
|
24959
24603
|
}, children: [
|
|
24960
|
-
/* @__PURE__ */
|
|
24961
|
-
/* @__PURE__ */
|
|
24604
|
+
/* @__PURE__ */ jsx200(Button, { label: "Back", icon: "chevronLeft", variant: "tertiary", onClick: closeDrawerDetail }),
|
|
24605
|
+
/* @__PURE__ */ jsx200(motion6.div, { initial: {
|
|
24962
24606
|
x: width2,
|
|
24963
24607
|
opacity: 0
|
|
24964
24608
|
}, animate: {
|
|
@@ -24976,7 +24620,7 @@ var SuperDrawerContent = ({
|
|
|
24976
24620
|
}, className: "pt2", children: children2 })
|
|
24977
24621
|
] }, "content");
|
|
24978
24622
|
} else {
|
|
24979
|
-
return /* @__PURE__ */
|
|
24623
|
+
return /* @__PURE__ */ jsx200(motion6.div, { ...mergeProps31(void 0, {
|
|
24980
24624
|
overflow: "auto"
|
|
24981
24625
|
}, {
|
|
24982
24626
|
paddingTop: "pt3",
|
|
@@ -24987,9 +24631,9 @@ var SuperDrawerContent = ({
|
|
|
24987
24631
|
}) }, "content");
|
|
24988
24632
|
}
|
|
24989
24633
|
}
|
|
24990
|
-
return /* @__PURE__ */
|
|
24634
|
+
return /* @__PURE__ */ jsxs101(Fragment45, { children: [
|
|
24991
24635
|
wrapWithMotionAndMaybeBack(children),
|
|
24992
|
-
actions && /* @__PURE__ */
|
|
24636
|
+
actions && /* @__PURE__ */ jsx200("footer", { className: "bts_solid btw_1px bcGray200 pt3 pb3 pr3 pl3 df aic jcfe", children: /* @__PURE__ */ jsx200("div", { className: "df gap1", children: actions.map((buttonProps, i) => /* @__PURE__ */ jsx200(Button, { ...buttonProps }, i)) }) })
|
|
24993
24637
|
] });
|
|
24994
24638
|
};
|
|
24995
24639
|
|
|
@@ -25031,18 +24675,283 @@ function visit(rows, fn) {
|
|
|
25031
24675
|
}
|
|
25032
24676
|
}
|
|
25033
24677
|
|
|
25034
|
-
// src/components/
|
|
25035
|
-
import {
|
|
25036
|
-
|
|
25037
|
-
|
|
25038
|
-
|
|
25039
|
-
|
|
25040
|
-
|
|
25041
|
-
|
|
24678
|
+
// src/components/Tabs.tsx
|
|
24679
|
+
import { camelCase as camelCase7 } from "change-case";
|
|
24680
|
+
import { useEffect as useEffect37, useMemo as useMemo55, useRef as useRef63, useState as useState56 } from "react";
|
|
24681
|
+
import { mergeProps as mergeProps32, useFocusRing as useFocusRing19, useHover as useHover23 } from "react-aria";
|
|
24682
|
+
import { matchPath } from "react-router";
|
|
24683
|
+
import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
|
|
24684
|
+
import { trussProps as trussProps106, maybeCssVar as maybeCssVar56 } from "@homebound/truss/runtime";
|
|
24685
|
+
import { Fragment as Fragment46, jsx as jsx201, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
24686
|
+
function TabsWithContent(props) {
|
|
24687
|
+
const styles = hideTabs(props) ? {} : {
|
|
24688
|
+
paddingTop: "pt3"
|
|
24689
|
+
};
|
|
24690
|
+
return /* @__PURE__ */ jsxs102(Fragment46, { children: [
|
|
24691
|
+
/* @__PURE__ */ jsx201(Tabs, { ...props }),
|
|
24692
|
+
/* @__PURE__ */ jsx201(TabContent, { ...props, contentXss: {
|
|
24693
|
+
...styles,
|
|
24694
|
+
...props.contentXss
|
|
24695
|
+
} })
|
|
24696
|
+
] });
|
|
24697
|
+
}
|
|
24698
|
+
function TabContent(props) {
|
|
24699
|
+
const tid = useTestIds(props, "tab");
|
|
24700
|
+
const {
|
|
24701
|
+
tabs,
|
|
24702
|
+
contentXss = {},
|
|
24703
|
+
omitFullBleedPadding = false
|
|
24704
|
+
} = props;
|
|
24705
|
+
const location = useLocation2();
|
|
24706
|
+
const selectedTab = isRouteTabs(props) ? props.tabs.find((t) => {
|
|
24707
|
+
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
24708
|
+
return paths.some((p) => !!matchPath({
|
|
24709
|
+
path: p,
|
|
24710
|
+
end: true
|
|
24711
|
+
}, location.pathname));
|
|
24712
|
+
}) || tabs[0] : props.tabs.find((tab) => tab.value === props.selected) || tabs[0];
|
|
24713
|
+
const uniqueValue = uniqueTabValue(selectedTab);
|
|
24714
|
+
return (
|
|
24715
|
+
// Using FullBleed to allow the tab's bgColor to extend to the edges of the <ScrollableContent /> element.
|
|
24716
|
+
// Omit the padding from `FullBleed` if the caller passes in the `paddingLeft/Right` styles.
|
|
24717
|
+
/* @__PURE__ */ jsx201(FullBleed, { omitPadding: omitFullBleedPadding, children: /* @__PURE__ */ jsx201("div", { "aria-labelledby": `${uniqueValue}-tab`, id: `${uniqueValue}-tabPanel`, role: "tabpanel", tabIndex: 0, ...tid.panel, ...trussProps106(contentXss), children: selectedTab.render() }) })
|
|
24718
|
+
);
|
|
24719
|
+
}
|
|
24720
|
+
function Tabs(props) {
|
|
24721
|
+
const {
|
|
24722
|
+
ariaLabel,
|
|
24723
|
+
tabs,
|
|
24724
|
+
includeBottomBorder,
|
|
24725
|
+
right,
|
|
24726
|
+
...others
|
|
24727
|
+
} = props;
|
|
24728
|
+
const location = useLocation2();
|
|
24729
|
+
const selected = isRouteTabs(props) ? uniqueTabValue(props.tabs.find((t) => {
|
|
24730
|
+
const paths = Array.isArray(t.path) ? t.path : [t.path];
|
|
24731
|
+
return paths.some((p) => !!matchPath({
|
|
24732
|
+
path: p,
|
|
24733
|
+
end: true
|
|
24734
|
+
}, location.pathname));
|
|
24735
|
+
}) || props.tabs[0]) : props.selected;
|
|
24736
|
+
const {
|
|
24737
|
+
isFocusVisible,
|
|
24738
|
+
focusProps
|
|
24739
|
+
} = useFocusRing19();
|
|
24740
|
+
const tid = useTestIds(others, "tabs");
|
|
24741
|
+
const [active, setActive] = useState56(selected);
|
|
24742
|
+
const ref = useRef63(null);
|
|
24743
|
+
useEffect37(() => setActive(selected), [selected]);
|
|
24744
|
+
function onKeyUp(e) {
|
|
24745
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
|
|
24746
|
+
const nextTabValue = getNextTabValue(active, e.key, tabs);
|
|
24747
|
+
setActive(nextTabValue);
|
|
24748
|
+
document.getElementById(`${nextTabValue}-tab`)?.focus();
|
|
24749
|
+
}
|
|
24750
|
+
}
|
|
24751
|
+
function onClick(value) {
|
|
24752
|
+
!isRouteTabs(props) && props.onChange(value);
|
|
24753
|
+
}
|
|
24754
|
+
function onBlur(e) {
|
|
24755
|
+
if (!(ref.current && ref.current.contains(e.relatedTarget))) {
|
|
24756
|
+
setActive(selected);
|
|
24757
|
+
}
|
|
24758
|
+
}
|
|
24759
|
+
return /* @__PURE__ */ jsxs102("div", { ...trussProps106({
|
|
24760
|
+
...{
|
|
24761
|
+
display: "df",
|
|
24762
|
+
alignItems: "aic",
|
|
24763
|
+
overflow: "oa",
|
|
24764
|
+
whiteSpace: "wsnw",
|
|
24765
|
+
gap: "gap1"
|
|
24766
|
+
},
|
|
24767
|
+
...includeBottomBorder ? {
|
|
24768
|
+
...{
|
|
24769
|
+
borderBottomStyle: "bbs_solid",
|
|
24770
|
+
borderBottomWidth: "bbw_1px",
|
|
24771
|
+
borderColor: "bcGray200"
|
|
24772
|
+
}
|
|
24773
|
+
} : {}
|
|
24774
|
+
}), children: [
|
|
24775
|
+
!hideTabs(props) && /* @__PURE__ */ jsx201("div", { ref, className: "dif gap1 asfe", "aria-label": ariaLabel, role: "tablist", ...tid, children: tabs.map((tab) => {
|
|
24776
|
+
const uniqueValue = uniqueTabValue(tab);
|
|
24777
|
+
return /* @__PURE__ */ jsx201(TabImpl, { active: active === uniqueValue, focusProps, isFocusVisible, onClick, onKeyUp, onBlur, tab, ...tid[defaultTestId(uniqueValue)] }, uniqueValue);
|
|
24778
|
+
}) }),
|
|
24779
|
+
right && /* @__PURE__ */ jsx201("div", { className: "mla df aic gap1 pb1", children: right })
|
|
24780
|
+
] });
|
|
24781
|
+
}
|
|
24782
|
+
function TabImpl(props) {
|
|
24783
|
+
const {
|
|
24784
|
+
tab,
|
|
24785
|
+
onClick,
|
|
24786
|
+
active,
|
|
24787
|
+
onKeyUp,
|
|
24788
|
+
onBlur,
|
|
24789
|
+
focusProps,
|
|
24790
|
+
isFocusVisible = false,
|
|
24791
|
+
...others
|
|
24792
|
+
} = props;
|
|
24793
|
+
const {
|
|
24794
|
+
disabled = false,
|
|
24795
|
+
name: label,
|
|
24796
|
+
icon,
|
|
24797
|
+
endAdornment
|
|
24798
|
+
} = tab;
|
|
24799
|
+
const isDisabled = !!disabled;
|
|
24800
|
+
const {
|
|
24801
|
+
hoverProps,
|
|
24802
|
+
isHovered
|
|
24803
|
+
} = useHover23({
|
|
24804
|
+
isDisabled
|
|
24805
|
+
});
|
|
24806
|
+
const {
|
|
24807
|
+
baseStyles: baseStyles4,
|
|
24808
|
+
activeStyles: activeStyles3,
|
|
24809
|
+
focusRingStyles: focusRingStyles2,
|
|
24810
|
+
hoverStyles: hoverStyles4,
|
|
24811
|
+
disabledStyles: disabledStyles3,
|
|
24812
|
+
activeHoverStyles
|
|
24813
|
+
} = useMemo55(() => getTabStyles(), []);
|
|
24814
|
+
const uniqueValue = uniqueTabValue(tab);
|
|
24815
|
+
const tabProps = {
|
|
24816
|
+
"aria-controls": `${uniqueValue}-tabPanel`,
|
|
24817
|
+
"aria-selected": active,
|
|
24818
|
+
"aria-disabled": isDisabled || void 0,
|
|
24819
|
+
id: `${uniqueValue}-tab`,
|
|
24820
|
+
role: "tab",
|
|
24821
|
+
tabIndex: active ? 0 : -1,
|
|
24822
|
+
...others,
|
|
24823
|
+
...trussProps106({
|
|
24824
|
+
...baseStyles4,
|
|
24825
|
+
...active && activeStyles3,
|
|
24826
|
+
...isDisabled && disabledStyles3,
|
|
24827
|
+
...isHovered && hoverStyles4,
|
|
24828
|
+
...isHovered && active && activeHoverStyles,
|
|
24829
|
+
...isFocusVisible && active && focusRingStyles2
|
|
24830
|
+
})
|
|
24831
|
+
};
|
|
24832
|
+
const interactiveProps = mergeProps32(focusProps, hoverProps, {
|
|
24833
|
+
onKeyUp,
|
|
24834
|
+
onBlur,
|
|
24835
|
+
...isRouteTab(tab) ? {} : {
|
|
24836
|
+
onClick: () => onClick(tab.value)
|
|
24837
|
+
}
|
|
24838
|
+
});
|
|
24839
|
+
const tabLabel = /* @__PURE__ */ jsxs102(Fragment46, { children: [
|
|
24840
|
+
label,
|
|
24841
|
+
(icon || endAdornment) && /* @__PURE__ */ jsx201("span", { className: "ml1", children: icon ? /* @__PURE__ */ jsx201(Icon, { icon }) : endAdornment })
|
|
24842
|
+
] });
|
|
24843
|
+
return isDisabled ? maybeTooltip({
|
|
24844
|
+
title: resolveTooltip(disabled),
|
|
24845
|
+
placement: "top",
|
|
24846
|
+
children: /* @__PURE__ */ jsx201("div", { ...tabProps, children: tabLabel })
|
|
24847
|
+
}) : isRouteTab(tab) ? /* @__PURE__ */ jsx201(Link7, { ...mergeProps32(tabProps, interactiveProps, {
|
|
24848
|
+
className: "navLink"
|
|
24849
|
+
}), to: tab.href, children: tabLabel }) : /* @__PURE__ */ jsx201("button", { ...{
|
|
24850
|
+
...tabProps,
|
|
24851
|
+
...interactiveProps
|
|
24852
|
+
}, children: tabLabel });
|
|
24853
|
+
}
|
|
24854
|
+
function getTabStyles() {
|
|
24855
|
+
const borderBottomWidthPx = 4;
|
|
24856
|
+
const verticalPaddingPx = 6;
|
|
24857
|
+
const borderBottomStyles = {
|
|
24858
|
+
borderBottomStyle: "bbs_solid",
|
|
24859
|
+
borderBottomWidth: ["borderBottomWidth_var", {
|
|
24860
|
+
"--borderBottomWidth": maybeCssVar56(`${borderBottomWidthPx}px`)
|
|
24861
|
+
}],
|
|
24862
|
+
paddingBottom: ["pb_var", {
|
|
24863
|
+
"--paddingBottom": `${verticalPaddingPx - borderBottomWidthPx}px`
|
|
24864
|
+
}]
|
|
24865
|
+
};
|
|
24866
|
+
return {
|
|
24867
|
+
baseStyles: {
|
|
24868
|
+
display: "df",
|
|
24869
|
+
alignItems: "aic",
|
|
24870
|
+
height: "h_32px",
|
|
24871
|
+
paddingTop: ["py_var", {
|
|
24872
|
+
"--paddingTop": `${verticalPaddingPx}px`
|
|
24873
|
+
}],
|
|
24874
|
+
paddingBottom: ["py_var", {
|
|
24875
|
+
"--paddingBottom": `${verticalPaddingPx}px`
|
|
24876
|
+
}],
|
|
24877
|
+
paddingLeft: "pl1",
|
|
24878
|
+
paddingRight: "pr1",
|
|
24879
|
+
outline: "outline0",
|
|
24880
|
+
color: "gray700",
|
|
24881
|
+
width: "width_fit_content",
|
|
24882
|
+
cursor: "cursorPointer",
|
|
24883
|
+
fontWeight: "fw4",
|
|
24884
|
+
fontSize: "fz_14px",
|
|
24885
|
+
lineHeight: "lh_20px"
|
|
24886
|
+
},
|
|
24887
|
+
activeStyles: {
|
|
24888
|
+
...{
|
|
24889
|
+
borderColor: "bcBlue700",
|
|
24890
|
+
fontWeight: "fw6",
|
|
24891
|
+
fontSize: "fz_14px",
|
|
24892
|
+
lineHeight: "lh_20px",
|
|
24893
|
+
color: "gray900"
|
|
24894
|
+
},
|
|
24895
|
+
...borderBottomStyles
|
|
24896
|
+
},
|
|
24897
|
+
disabledStyles: {
|
|
24898
|
+
color: "gray400",
|
|
24899
|
+
cursor: "cursorNotAllowed"
|
|
24900
|
+
},
|
|
24901
|
+
focusRingStyles: {
|
|
24902
|
+
backgroundColor: "bgBlue50",
|
|
24903
|
+
boxShadow: "bshFocus"
|
|
24904
|
+
},
|
|
24905
|
+
hoverStyles: {
|
|
24906
|
+
...{
|
|
24907
|
+
borderColor: "bcGray400"
|
|
24908
|
+
},
|
|
24909
|
+
...borderBottomStyles
|
|
24910
|
+
},
|
|
24911
|
+
activeHoverStyles: {
|
|
24912
|
+
...{
|
|
24913
|
+
backgroundColor: "bgBlue50",
|
|
24914
|
+
borderColor: "bcBlue700"
|
|
24915
|
+
},
|
|
24916
|
+
...borderBottomStyles
|
|
24917
|
+
}
|
|
24918
|
+
};
|
|
24919
|
+
}
|
|
24920
|
+
function getNextTabValue(selected, key, tabs) {
|
|
24921
|
+
const enabledTabs = tabs.filter((tab) => tab.disabled !== true);
|
|
24922
|
+
const tabsToScan = key === "ArrowRight" ? enabledTabs : enabledTabs.reverse();
|
|
24923
|
+
const currentIndex = tabsToScan.findIndex((tab) => uniqueTabValue(tab) === selected);
|
|
24924
|
+
const nextIndex = currentIndex === tabsToScan.length - 1 ? 0 : currentIndex + 1;
|
|
24925
|
+
return uniqueTabValue(tabsToScan[nextIndex]);
|
|
24926
|
+
}
|
|
24927
|
+
function isRouteTabs(props) {
|
|
24928
|
+
const {
|
|
24929
|
+
tabs
|
|
24930
|
+
} = props;
|
|
24931
|
+
return tabs.length > 0 && isRouteTab(tabs[0]);
|
|
24932
|
+
}
|
|
24933
|
+
function isRouteTab(tab) {
|
|
24934
|
+
return "path" in tab;
|
|
24935
|
+
}
|
|
24936
|
+
function uniqueTabValue(tab) {
|
|
24937
|
+
return isRouteTab(tab) ? camelCase7(tab.name) : tab.value;
|
|
24938
|
+
}
|
|
24939
|
+
function hideTabs(props) {
|
|
24940
|
+
return props.alwaysShowAllTabs ? false : props.tabs.filter((t) => !t.disabled).length === 1;
|
|
24941
|
+
}
|
|
24942
|
+
|
|
24943
|
+
// src/components/TagGroup.tsx
|
|
24944
|
+
import { jsx as jsx202, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
24945
|
+
function TagGroup(props) {
|
|
24946
|
+
const {
|
|
24947
|
+
tags,
|
|
24948
|
+
onEdit,
|
|
24949
|
+
...otherProps
|
|
24950
|
+
} = props;
|
|
25042
24951
|
const tid = useTestIds(otherProps, "tagGroup");
|
|
25043
|
-
return /* @__PURE__ */
|
|
25044
|
-
tags.map((tag) => /* @__PURE__ */
|
|
25045
|
-
onEdit && /* @__PURE__ */
|
|
24952
|
+
return /* @__PURE__ */ jsxs103("div", { ...tid, className: "df aic fww gap1", children: [
|
|
24953
|
+
tags.map((tag) => /* @__PURE__ */ jsx202(Tag, { ...tag, variant: "secondary" }, tag.text)),
|
|
24954
|
+
onEdit && /* @__PURE__ */ jsx202("span", { className: "ml1 fw4 fz_14px lh_20px", children: /* @__PURE__ */ jsx202(Button, { label: "Edit", variant: "text", onClick: onEdit, ...tid.edit }) })
|
|
25046
24955
|
] });
|
|
25047
24956
|
}
|
|
25048
24957
|
|
|
@@ -25055,15 +24964,15 @@ function useToast() {
|
|
|
25055
24964
|
}
|
|
25056
24965
|
|
|
25057
24966
|
// src/layouts/SideNavLayout/SideNavLayout.tsx
|
|
25058
|
-
import { trussProps as
|
|
25059
|
-
import { jsx as
|
|
24967
|
+
import { trussProps as trussProps107, mergeProps as mergeProps33, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
|
|
24968
|
+
import { jsx as jsx203, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
25060
24969
|
var __maybeInc21 = (inc) => {
|
|
25061
24970
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25062
24971
|
};
|
|
25063
24972
|
function SideNavLayout(props) {
|
|
25064
24973
|
const hasProvider = useHasSideNavLayoutProvider();
|
|
25065
|
-
if (hasProvider) return /* @__PURE__ */
|
|
25066
|
-
return /* @__PURE__ */
|
|
24974
|
+
if (hasProvider) return /* @__PURE__ */ jsx203(SideNavLayoutContent, { ...props });
|
|
24975
|
+
return /* @__PURE__ */ jsx203(SideNavLayoutProvider, { children: /* @__PURE__ */ jsx203(SideNavLayoutContent, { ...props }) });
|
|
25067
24976
|
}
|
|
25068
24977
|
function SideNavLayoutContent(props) {
|
|
25069
24978
|
const {
|
|
@@ -25085,7 +24994,7 @@ function SideNavLayoutContent(props) {
|
|
|
25085
24994
|
const railOffsetPx = !showRail ? 0 : !bp.mdAndUp || collapsed ? railCollapsedWidthPx : railWidthPx;
|
|
25086
24995
|
const navTop = bannerAndNavbarChromeTop();
|
|
25087
24996
|
const railViewportHeight = `calc(var(${beamLayoutViewportHeightVar}, 100vh) - var(${beamEnvironmentBannerLayoutHeightVar}, 0px) - var(${beamNavbarLayoutHeightVar}, 0px))`;
|
|
25088
|
-
const rail = showRail && /* @__PURE__ */
|
|
24997
|
+
const rail = showRail && /* @__PURE__ */ jsxs104("div", { ...trussProps107({
|
|
25089
24998
|
...{
|
|
25090
24999
|
display: "df",
|
|
25091
25000
|
flexDirection: "fdc",
|
|
@@ -25142,18 +25051,18 @@ function SideNavLayoutContent(props) {
|
|
|
25142
25051
|
}
|
|
25143
25052
|
}
|
|
25144
25053
|
}), ...tid.sideNav, children: [
|
|
25145
|
-
showCollapseToggle && /* @__PURE__ */
|
|
25146
|
-
/* @__PURE__ */
|
|
25054
|
+
showCollapseToggle && /* @__PURE__ */ jsx203("div", { className: "absolute right2 top2 z2", children: /* @__PURE__ */ jsx203(IconButton, { icon: collapsed ? "menuOpen" : "menuClose", label: collapsed ? "Expand navigation" : "Collapse navigation", onClick: () => setNavState(collapsed ? "expanded" : "collapse"), ...tid.toggle }) }),
|
|
25055
|
+
/* @__PURE__ */ jsx203("div", { className: "fg1 mh0 df fdc", ...tid.sideNavContent, children: /* @__PURE__ */ jsx203(SideNav, { ...sideNav }) })
|
|
25147
25056
|
] });
|
|
25148
|
-
return /* @__PURE__ */
|
|
25057
|
+
return /* @__PURE__ */ jsx203(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs104("div", { ...mergeProps33(void 0, {
|
|
25149
25058
|
[beamSideNavLayoutWidthVar]: `${railOffsetPx}px`
|
|
25150
25059
|
}, {
|
|
25151
25060
|
display: "df",
|
|
25152
25061
|
flexDirection: "fdr",
|
|
25153
25062
|
width: "w100"
|
|
25154
25063
|
}), ...tid, children: [
|
|
25155
|
-
contrastRail ? /* @__PURE__ */
|
|
25156
|
-
/* @__PURE__ */
|
|
25064
|
+
contrastRail ? /* @__PURE__ */ jsx203(ContrastScope, { children: rail }) : rail,
|
|
25065
|
+
/* @__PURE__ */ jsx203("div", { ...trussProps107({
|
|
25157
25066
|
display: "df",
|
|
25158
25067
|
flexDirection: "fdc",
|
|
25159
25068
|
flexGrow: "fg1",
|
|
@@ -25169,8 +25078,8 @@ function SideNavLayoutContent(props) {
|
|
|
25169
25078
|
}
|
|
25170
25079
|
|
|
25171
25080
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayout.tsx
|
|
25172
|
-
import { trussProps as
|
|
25173
|
-
import { jsx as
|
|
25081
|
+
import { trussProps as trussProps108, mergeProps as mergeProps34, maybeCssVar as maybeCssVar58 } from "@homebound/truss/runtime";
|
|
25082
|
+
import { jsx as jsx204, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
25174
25083
|
var __maybeInc22 = (inc) => {
|
|
25175
25084
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25176
25085
|
};
|
|
@@ -25186,18 +25095,18 @@ function EnvironmentBannerLayout(props) {
|
|
|
25186
25095
|
[beamEnvironmentBannerLayoutHeightVar]: `${bannerHeightPx}px`
|
|
25187
25096
|
};
|
|
25188
25097
|
const innerWidth = `var(${beamLayoutViewportWidthVar}, 100vw)`;
|
|
25189
|
-
return /* @__PURE__ */
|
|
25098
|
+
return /* @__PURE__ */ jsx204(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx204(EnvironmentBannerLayoutHeightProvider, { value: bannerHeightPx, children: /* @__PURE__ */ jsxs105("div", { ...mergeProps34(void 0, style, {
|
|
25190
25099
|
display: "df",
|
|
25191
25100
|
flexDirection: "fdc",
|
|
25192
25101
|
width: "wfc",
|
|
25193
25102
|
minWidth: "mw100"
|
|
25194
25103
|
}), ...tid, children: [
|
|
25195
|
-
showBanner && environmentBanner && /* @__PURE__ */
|
|
25104
|
+
showBanner && environmentBanner && /* @__PURE__ */ jsx204("div", { ...mergeProps34(void 0, {
|
|
25196
25105
|
height: environmentBannerSizePx
|
|
25197
25106
|
}, {
|
|
25198
25107
|
flexShrink: "fs0",
|
|
25199
25108
|
width: "w100"
|
|
25200
|
-
}), children: /* @__PURE__ */
|
|
25109
|
+
}), children: /* @__PURE__ */ jsx204("div", { ...trussProps108({
|
|
25201
25110
|
position: "fixed",
|
|
25202
25111
|
top: "top0",
|
|
25203
25112
|
left: "left0",
|
|
@@ -25207,7 +25116,7 @@ function EnvironmentBannerLayout(props) {
|
|
|
25207
25116
|
width: ["w_var", {
|
|
25208
25117
|
"--width": maybeCssVar58(__maybeInc22(innerWidth))
|
|
25209
25118
|
}]
|
|
25210
|
-
}), ...tid.bannerSticky, children: /* @__PURE__ */
|
|
25119
|
+
}), ...tid.bannerSticky, children: /* @__PURE__ */ jsx204(EnvironmentBanner, { ...environmentBanner, ...tid.environmentBanner }) }) }),
|
|
25211
25120
|
children
|
|
25212
25121
|
] }) }) });
|
|
25213
25122
|
}
|
|
@@ -25325,17 +25234,17 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
25325
25234
|
|
|
25326
25235
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
25327
25236
|
import { createContext as createContext15, useContext as useContext27 } from "react";
|
|
25328
|
-
import { jsx as
|
|
25237
|
+
import { jsx as jsx205 } from "react/jsx-runtime";
|
|
25329
25238
|
var NavbarLayoutHeightContext = createContext15(0);
|
|
25330
25239
|
function NavbarLayoutHeightProvider({ value, children }) {
|
|
25331
|
-
return /* @__PURE__ */
|
|
25240
|
+
return /* @__PURE__ */ jsx205(NavbarLayoutHeightContext.Provider, { value, children });
|
|
25332
25241
|
}
|
|
25333
25242
|
function useNavbarLayoutHeight() {
|
|
25334
25243
|
return useContext27(NavbarLayoutHeightContext);
|
|
25335
25244
|
}
|
|
25336
25245
|
|
|
25337
25246
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
25338
|
-
import { jsx as
|
|
25247
|
+
import { jsx as jsx206, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
25339
25248
|
var __maybeInc23 = (inc) => {
|
|
25340
25249
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25341
25250
|
};
|
|
@@ -25388,26 +25297,90 @@ function NavbarLayout(props) {
|
|
|
25388
25297
|
const innerStyle = autoHideState !== "static" ? {
|
|
25389
25298
|
top: autoHideState === "revealed" ? bannerTop : `calc(${bannerTop} - ${navHeight}px)`
|
|
25390
25299
|
} : void 0;
|
|
25391
|
-
const navbarEl = useMemo56(() => /* @__PURE__ */
|
|
25392
|
-
return /* @__PURE__ */
|
|
25300
|
+
const navbarEl = useMemo56(() => /* @__PURE__ */ jsx206(Navbar, { ...navbar }), [navbar]);
|
|
25301
|
+
return /* @__PURE__ */ jsx206(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx206(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsxs106("div", { ...mergeProps35(void 0, cssVars, {
|
|
25393
25302
|
display: "df",
|
|
25394
25303
|
flexDirection: "fdc",
|
|
25395
25304
|
width: "wfc",
|
|
25396
25305
|
minWidth: "mw100"
|
|
25397
25306
|
}), ...tid, children: [
|
|
25398
|
-
/* @__PURE__ */
|
|
25307
|
+
/* @__PURE__ */ jsx206("div", { ref: spacerRef, ...mergeProps35(void 0, {
|
|
25399
25308
|
height: navHeight
|
|
25400
25309
|
}, {
|
|
25401
25310
|
flexShrink: "fs0",
|
|
25402
25311
|
width: "w100"
|
|
25403
|
-
}), children: /* @__PURE__ */
|
|
25404
|
-
/* @__PURE__ */
|
|
25312
|
+
}), children: /* @__PURE__ */ jsx206("div", { ref: navMetricsRef, ...mergeProps35(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
25313
|
+
/* @__PURE__ */ jsx206("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
25405
25314
|
] }) }) });
|
|
25406
25315
|
}
|
|
25407
25316
|
|
|
25408
25317
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25409
25318
|
import { useCallback as useCallback39, useMemo as useMemo57, useRef as useRef66 } from "react";
|
|
25410
25319
|
|
|
25320
|
+
// src/components/Headers/BaseHeader.tsx
|
|
25321
|
+
import { trussProps as trussProps109 } from "@homebound/truss/runtime";
|
|
25322
|
+
import { jsx as jsx207, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
25323
|
+
function BaseHeader(props) {
|
|
25324
|
+
const {
|
|
25325
|
+
title,
|
|
25326
|
+
documentTitleSuffix,
|
|
25327
|
+
rightSlot,
|
|
25328
|
+
breadcrumbs,
|
|
25329
|
+
bottomSlot,
|
|
25330
|
+
...otherProps
|
|
25331
|
+
} = props;
|
|
25332
|
+
const tid = useTestIds(otherProps, "header");
|
|
25333
|
+
useDocumentTitle(title, documentTitleSuffix);
|
|
25334
|
+
return /* @__PURE__ */ jsxs107("header", { ...tid, ...trussProps109({
|
|
25335
|
+
display: "df",
|
|
25336
|
+
flexDirection: "fdc",
|
|
25337
|
+
paddingTop: "pt3",
|
|
25338
|
+
borderBottomStyle: "bbs_solid",
|
|
25339
|
+
borderBottomWidth: "bbw_1px",
|
|
25340
|
+
gap: "gap2",
|
|
25341
|
+
borderColor: ["bc_var", {
|
|
25342
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
25343
|
+
}],
|
|
25344
|
+
backgroundColor: ["bgColor_var", {
|
|
25345
|
+
"--backgroundColor": "var(--b-surface)"
|
|
25346
|
+
}]
|
|
25347
|
+
}), children: [
|
|
25348
|
+
/* @__PURE__ */ jsxs107("div", { ...trussProps109({
|
|
25349
|
+
...{
|
|
25350
|
+
display: "df",
|
|
25351
|
+
justifyContent: "jcsb",
|
|
25352
|
+
width: "w100",
|
|
25353
|
+
gap: "gap1",
|
|
25354
|
+
paddingLeft: "pl3",
|
|
25355
|
+
paddingRight: "pr3"
|
|
25356
|
+
},
|
|
25357
|
+
...{
|
|
25358
|
+
...!bottomSlot ? {
|
|
25359
|
+
marginBottom: "mb2"
|
|
25360
|
+
} : {}
|
|
25361
|
+
}
|
|
25362
|
+
}), children: [
|
|
25363
|
+
/* @__PURE__ */ jsxs107("div", { className: "mw0", children: [
|
|
25364
|
+
breadcrumbs && /* @__PURE__ */ jsx207(Breadcrumbs, { ...breadcrumbs }),
|
|
25365
|
+
/* @__PURE__ */ jsx207("h1", { ...tid.title, className: "fw6 fz_20px lh_28px", children: title })
|
|
25366
|
+
] }),
|
|
25367
|
+
/* @__PURE__ */ jsx207("div", { className: "fs0", children: rightSlot })
|
|
25368
|
+
] }),
|
|
25369
|
+
bottomSlot
|
|
25370
|
+
] });
|
|
25371
|
+
}
|
|
25372
|
+
|
|
25373
|
+
// src/components/Headers/PageHeader.tsx
|
|
25374
|
+
import { jsx as jsx208 } from "react/jsx-runtime";
|
|
25375
|
+
function PageHeader2(props) {
|
|
25376
|
+
const {
|
|
25377
|
+
tabs,
|
|
25378
|
+
...otherProps
|
|
25379
|
+
} = props;
|
|
25380
|
+
const tid = useTestIds(otherProps, "header");
|
|
25381
|
+
return /* @__PURE__ */ jsx208(BaseHeader, { ...otherProps, bottomSlot: tabs && /* @__PURE__ */ jsx208("div", { className: "pl3 pr3", children: /* @__PURE__ */ jsx208(Tabs, { ...tabs, ...tid.tabs }) }) });
|
|
25382
|
+
}
|
|
25383
|
+
|
|
25411
25384
|
// src/layouts/useBannerAndNavbarHeight.ts
|
|
25412
25385
|
function useBannerAndNavbarHeight() {
|
|
25413
25386
|
return useEnvironmentBannerLayoutHeight() + useNavbarLayoutHeight();
|
|
@@ -25415,7 +25388,7 @@ function useBannerAndNavbarHeight() {
|
|
|
25415
25388
|
|
|
25416
25389
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
25417
25390
|
import { mergeProps as mergeProps36, maybeCssVar as maybeCssVar60 } from "@homebound/truss/runtime";
|
|
25418
|
-
import { jsx as
|
|
25391
|
+
import { jsx as jsx209, jsxs as jsxs108 } from "react/jsx-runtime";
|
|
25419
25392
|
var __maybeInc24 = (inc) => {
|
|
25420
25393
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25421
25394
|
};
|
|
@@ -25470,19 +25443,19 @@ function PageHeaderLayout(props) {
|
|
|
25470
25443
|
const innerStyle = autoHideState !== "static" ? {
|
|
25471
25444
|
top: autoHideState === "revealed" ? outerTop : `calc(${outerTop} - ${headerHeight}px)`
|
|
25472
25445
|
} : void 0;
|
|
25473
|
-
const pageHeaderEl = useMemo57(() => /* @__PURE__ */
|
|
25474
|
-
return /* @__PURE__ */
|
|
25446
|
+
const pageHeaderEl = useMemo57(() => /* @__PURE__ */ jsx209(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
25447
|
+
return /* @__PURE__ */ jsx209(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs108("div", { ...mergeProps36(void 0, cssVars, {
|
|
25475
25448
|
display: "df",
|
|
25476
25449
|
flexDirection: "fdc",
|
|
25477
25450
|
width: "w100"
|
|
25478
25451
|
}), ...tid, children: [
|
|
25479
|
-
/* @__PURE__ */
|
|
25452
|
+
/* @__PURE__ */ jsx209("div", { ref: spacerRef, ...mergeProps36(void 0, {
|
|
25480
25453
|
height: headerHeight
|
|
25481
25454
|
}, {
|
|
25482
25455
|
flexShrink: "fs0",
|
|
25483
25456
|
width: "w100"
|
|
25484
|
-
}), children: /* @__PURE__ */
|
|
25485
|
-
/* @__PURE__ */
|
|
25457
|
+
}), children: /* @__PURE__ */ jsx209("div", { ref: headerMetricsRef, ...mergeProps36(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
25458
|
+
/* @__PURE__ */ jsx209("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
25486
25459
|
] }) });
|
|
25487
25460
|
}
|
|
25488
25461
|
export {
|
|
@@ -25592,7 +25565,6 @@ export {
|
|
|
25592
25565
|
NavbarLayout,
|
|
25593
25566
|
NumberField,
|
|
25594
25567
|
OpenModal,
|
|
25595
|
-
PageHeader2 as PageHeader,
|
|
25596
25568
|
PageHeaderLayout,
|
|
25597
25569
|
Pagination,
|
|
25598
25570
|
Palette,
|