@homebound/beam 4.33.0 → 4.35.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 +494 -306
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -6
- package/dist/index.d.ts +64 -6
- package/dist/index.js +510 -322
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7982,6 +7982,12 @@ var RowState = class {
|
|
|
7982
7982
|
if (this.isParent) return this.selectedState === "checked";
|
|
7983
7983
|
return this.selected;
|
|
7984
7984
|
}
|
|
7985
|
+
/** This row's share of `TableState.selectedLeafRowCount`, see `GridDataRow.childrenCount`. */
|
|
7986
|
+
get selectedLeafRowCount() {
|
|
7987
|
+
if (this.isReservedKind || !this.selected) return 0;
|
|
7988
|
+
if (this.children?.some((c) => c.row.selectable !== false)) return 0;
|
|
7989
|
+
return this.row.childrenCount ?? 1;
|
|
7990
|
+
}
|
|
7985
7991
|
/** The UI state for checked/unchecked + "partially checked" for parents. */
|
|
7986
7992
|
get selectedState() {
|
|
7987
7993
|
if (this.isParent && this.hasSelectableChildren) {
|
|
@@ -8632,6 +8638,10 @@ var TableState = class {
|
|
|
8632
8638
|
get selectedRows() {
|
|
8633
8639
|
return this.rowStates.allStates.filter((rs) => rs.isSelected && !reservedRowKinds.includes(rs.row.kind));
|
|
8634
8640
|
}
|
|
8641
|
+
/** How many leaf rows are selected, for `GridTableLayout`'s selection summary; see `GridDataRow.childrenCount`. */
|
|
8642
|
+
get selectedLeafRowCount() {
|
|
8643
|
+
return this.rowStates.allStates.reduce((sum, rs) => sum + rs.selectedLeafRowCount, 0);
|
|
8644
|
+
}
|
|
8635
8645
|
/** Returns kept group row, with the latest kept children, if any. */
|
|
8636
8646
|
get keptRowGroup() {
|
|
8637
8647
|
return this.rowStates.get(KEPT_GROUP).row;
|
|
@@ -9535,6 +9545,9 @@ var GridTableApiImpl = class {
|
|
|
9535
9545
|
getSelectedRowsImpl(kind) {
|
|
9536
9546
|
return this.tableState.selectedRows.filter((rs) => !kind || rs.kind === kind).map((rs) => rs.row);
|
|
9537
9547
|
}
|
|
9548
|
+
getSelectedLeafRowCount() {
|
|
9549
|
+
return this.tableState.selectedLeafRowCount;
|
|
9550
|
+
}
|
|
9538
9551
|
// The `any` is not great, but getting the overload to handle the optional kind is annoying
|
|
9539
9552
|
getVisibleRows(kind) {
|
|
9540
9553
|
return this.getVisibleRowsImpl(kind ?? void 0);
|
|
@@ -24897,12 +24910,82 @@ import React18, { useCallback as useCallback35, useEffect as useEffect28, useMem
|
|
|
24897
24910
|
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
24898
24911
|
import { memo as memo2, useMemo as useMemo43, useState as useState44 } from "react";
|
|
24899
24912
|
|
|
24913
|
+
// src/components/Pills/SelectionSummaryPill/SelectionSummaryPill.tsx
|
|
24914
|
+
import { useHover as useHover18 } from "react-aria";
|
|
24915
|
+
import { trussProps as trussProps104, maybeCssVar as maybeCssVar47 } from "@homebound/truss/runtime";
|
|
24916
|
+
import { Fragment as Fragment37, jsx as jsx178, jsxs as jsxs92 } from "react/jsx-runtime";
|
|
24917
|
+
function SelectionSummaryPill(props) {
|
|
24918
|
+
const {
|
|
24919
|
+
text,
|
|
24920
|
+
count,
|
|
24921
|
+
onClick,
|
|
24922
|
+
disabled = false,
|
|
24923
|
+
numberOnly = false,
|
|
24924
|
+
__storyState
|
|
24925
|
+
} = props;
|
|
24926
|
+
const tid = useTestIds(props, "selectionSummaryPill");
|
|
24927
|
+
const {
|
|
24928
|
+
hoverProps,
|
|
24929
|
+
isHovered: isHoveredFromEvents
|
|
24930
|
+
} = useHover18({
|
|
24931
|
+
isDisabled: !!disabled
|
|
24932
|
+
});
|
|
24933
|
+
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
24934
|
+
return maybeTooltip({
|
|
24935
|
+
title: resolveTooltip(disabled),
|
|
24936
|
+
placement: "top",
|
|
24937
|
+
children: /* @__PURE__ */ jsx178("button", { type: "button", disabled: !!disabled, onClick, "aria-label": `Clear ${text}`, ...trussProps104(pillStyles(!!disabled, isHovered, numberOnly)), ...hoverProps, ...tid, children: numberOnly ? /* @__PURE__ */ jsxs92(Fragment37, { children: [
|
|
24938
|
+
/* @__PURE__ */ jsx178(CountBadge, { count, bgColor: disabled ? "rgba(201, 201, 201, 1)" /* Gray400 */ : "rgba(37, 99, 235, 1)" /* Blue600 */, ...tid.count }),
|
|
24939
|
+
/* @__PURE__ */ jsx178("span", { className: "df fs0", ...tid.clear, children: /* @__PURE__ */ jsx178(Icon, { icon: "x", color: disabled ? "--b-on-surface-active-disabled" /* OnSurfaceActiveDisabled */ : "rgba(36, 36, 36, 1)" /* Gray900 */ }) })
|
|
24940
|
+
] }) : /* @__PURE__ */ jsxs92(Fragment37, { children: [
|
|
24941
|
+
text,
|
|
24942
|
+
/* @__PURE__ */ jsx178("span", { ...trussProps104({
|
|
24943
|
+
color: ["color_var", {
|
|
24944
|
+
"--color": maybeCssVar47(disabled ? "--b-on-surface-active-disabled" /* OnSurfaceActiveDisabled */ : "--b-on-surface-active" /* OnSurfaceActive */)
|
|
24945
|
+
}]
|
|
24946
|
+
}), ...tid.clear, children: "Clear" })
|
|
24947
|
+
] }) })
|
|
24948
|
+
});
|
|
24949
|
+
}
|
|
24950
|
+
function pillStyles(disabled, hovered, numberOnly) {
|
|
24951
|
+
return {
|
|
24952
|
+
fontWeight: "fw6",
|
|
24953
|
+
fontSize: "fz_14px",
|
|
24954
|
+
lineHeight: "lh_20px",
|
|
24955
|
+
display: "dif",
|
|
24956
|
+
alignItems: "aic",
|
|
24957
|
+
gap: "g_1",
|
|
24958
|
+
whiteSpace: "wsnw",
|
|
24959
|
+
borderStyle: "bss",
|
|
24960
|
+
borderWidth: "bw1",
|
|
24961
|
+
borderRadius: "brPill",
|
|
24962
|
+
paddingLeft: ["pl_var", {
|
|
24963
|
+
"--paddingLeft": `${numberOnly ? 19 : 15}px`
|
|
24964
|
+
}],
|
|
24965
|
+
paddingRight: "pr_15px",
|
|
24966
|
+
paddingTop: "pt_7px",
|
|
24967
|
+
paddingBottom: "pb_7px",
|
|
24968
|
+
borderColor: ["bc_var", {
|
|
24969
|
+
"--borderColor": "var(--b-surface-active-border)"
|
|
24970
|
+
}],
|
|
24971
|
+
color: ["color_var", {
|
|
24972
|
+
"--color": maybeCssVar47(disabled ? "--b-on-surface-active-disabled" /* OnSurfaceActiveDisabled */ : "rgba(36, 36, 36, 1)" /* Gray900 */)
|
|
24973
|
+
}],
|
|
24974
|
+
backgroundColor: ["bgColor_var", {
|
|
24975
|
+
"--backgroundColor": maybeCssVar47(hovered ? "--b-surface-active-hover" /* SurfaceActiveHover */ : "--b-surface-active" /* SurfaceActive */)
|
|
24976
|
+
}],
|
|
24977
|
+
...disabled ? {
|
|
24978
|
+
cursor: "cur_not_allowed"
|
|
24979
|
+
} : {}
|
|
24980
|
+
};
|
|
24981
|
+
}
|
|
24982
|
+
|
|
24900
24983
|
// src/components/Table/components/EditColumnsButton.tsx
|
|
24901
|
-
import { Fragment as
|
|
24984
|
+
import { Fragment as Fragment38, useCallback as useCallback27, useMemo as useMemo42, useRef as useRef53 } from "react";
|
|
24902
24985
|
import { useMenuTrigger as useMenuTrigger4 } from "react-aria";
|
|
24903
24986
|
import { useMenuTriggerState as useMenuTriggerState4 } from "react-stately";
|
|
24904
|
-
import { trussProps as
|
|
24905
|
-
import { jsx as
|
|
24987
|
+
import { trussProps as trussProps105 } from "@homebound/truss/runtime";
|
|
24988
|
+
import { jsx as jsx179, jsxs as jsxs93 } from "react/jsx-runtime";
|
|
24906
24989
|
function EditColumnsButton(props) {
|
|
24907
24990
|
const {
|
|
24908
24991
|
defaultOpen,
|
|
@@ -24943,7 +25026,7 @@ function EditColumnsButton(props) {
|
|
|
24943
25026
|
const selectableOptionValues = options.map((option) => option.value);
|
|
24944
25027
|
return selectableOptionValues.some((option) => !selectedValues.includes(option));
|
|
24945
25028
|
}, [options, selectedValues]);
|
|
24946
|
-
return /* @__PURE__ */
|
|
25029
|
+
return /* @__PURE__ */ jsx179(OverlayTrigger, { ...props, trigger: sm ? {
|
|
24947
25030
|
icon: hasHiddenColumn ? "columnsBadged" : "columns",
|
|
24948
25031
|
variant: "outline"
|
|
24949
25032
|
} : {
|
|
@@ -24951,7 +25034,7 @@ function EditColumnsButton(props) {
|
|
|
24951
25034
|
label: "",
|
|
24952
25035
|
size: "md",
|
|
24953
25036
|
variant: "secondaryBlack"
|
|
24954
|
-
}, menuTriggerProps, state, buttonRef, ...tid, children: /* @__PURE__ */
|
|
25037
|
+
}, menuTriggerProps, state, buttonRef, ...tid, children: /* @__PURE__ */ jsxs93("div", { ...trussProps105({
|
|
24955
25038
|
display: "df",
|
|
24956
25039
|
flexDirection: "fdc",
|
|
24957
25040
|
backgroundColor: ["bgColor_var", {
|
|
@@ -24964,14 +25047,14 @@ function EditColumnsButton(props) {
|
|
|
24964
25047
|
maxHeight: "maxh_512px",
|
|
24965
25048
|
boxShadow: "bshBasic h_bshHover"
|
|
24966
25049
|
}), children: [
|
|
24967
|
-
/* @__PURE__ */
|
|
24968
|
-
/* @__PURE__ */
|
|
24969
|
-
/* @__PURE__ */
|
|
24970
|
-
option.tooltip ? /* @__PURE__ */
|
|
25050
|
+
/* @__PURE__ */ jsx179("div", { className: "dg gtc_1fr_auto g_2 pt2 pb2 pr2 pl2 fg1 mh0 oya", children: options.map((option) => /* @__PURE__ */ jsxs93(Fragment38, { children: [
|
|
25051
|
+
/* @__PURE__ */ jsxs93("div", { className: "df aic g_4px mw0 pr1", children: [
|
|
25052
|
+
/* @__PURE__ */ jsx179("span", { className: "fw4 fz_14px lh_20px wsnw oh to_ellipsis mw0", children: option.label }),
|
|
25053
|
+
option.tooltip ? /* @__PURE__ */ jsx179(ColumnTooltipIcon, { ...tid[`tooltip_${option.value}`], tooltip: closeMenuOnClickTooltip(option.tooltip, state.close), color: "--b-text-link-default" /* TextLinkDefault */, label: option.label }) : null
|
|
24971
25054
|
] }),
|
|
24972
|
-
/* @__PURE__ */
|
|
25055
|
+
/* @__PURE__ */ jsx179(Switch, { compact: true, selected: selectedValues.includes(option.value), onChange: (value) => setSelectedValues(value ? [...selectedValues, option.value] : selectedValues.filter((v) => v !== option.value)), labelStyle: "hidden", label: option.label, ...tid[`option${option.value}`] })
|
|
24973
25056
|
] }, option.value)) }),
|
|
24974
|
-
/* @__PURE__ */
|
|
25057
|
+
/* @__PURE__ */ jsx179("div", { ...trussProps105({
|
|
24975
25058
|
display: "df",
|
|
24976
25059
|
justifyContent: "jcc",
|
|
24977
25060
|
paddingTop: "pt2",
|
|
@@ -24983,7 +25066,7 @@ function EditColumnsButton(props) {
|
|
|
24983
25066
|
borderColor: ["bc_var", {
|
|
24984
25067
|
"--borderColor": "var(--b-surface-separator)"
|
|
24985
25068
|
}]
|
|
24986
|
-
}), children: /* @__PURE__ */
|
|
25069
|
+
}), children: /* @__PURE__ */ jsx179(Button, { variant: "tertiary", label: "Reset Column Widths", onClick: () => api.resetColumnWidths() }) })
|
|
24987
25070
|
] }) });
|
|
24988
25071
|
}
|
|
24989
25072
|
function closeMenuOnClickTooltip(tooltip, closeMenu) {
|
|
@@ -24995,7 +25078,7 @@ function closeMenuOnClickTooltip(tooltip, closeMenu) {
|
|
|
24995
25078
|
}
|
|
24996
25079
|
|
|
24997
25080
|
// src/components/Table/components/ViewToggleButton.tsx
|
|
24998
|
-
import { jsx as
|
|
25081
|
+
import { jsx as jsx180 } from "react/jsx-runtime";
|
|
24999
25082
|
function ViewToggleButton({ view, onChange, defaultOpen }) {
|
|
25000
25083
|
const { sm } = useBreakpoint();
|
|
25001
25084
|
const tid = useTestIds({}, "viewToggleButton");
|
|
@@ -25004,7 +25087,7 @@ function ViewToggleButton({ view, onChange, defaultOpen }) {
|
|
|
25004
25087
|
{ label: "Card", icon: "tile", onClick: () => onChange("card") }
|
|
25005
25088
|
];
|
|
25006
25089
|
const icon = view === "list" ? "projects" : "tile";
|
|
25007
|
-
return /* @__PURE__ */
|
|
25090
|
+
return /* @__PURE__ */ jsx180(
|
|
25008
25091
|
ButtonMenu,
|
|
25009
25092
|
{
|
|
25010
25093
|
trigger: sm ? { icon, variant: "outline" } : { icon, label: "", size: "md", variant: "secondaryBlack" },
|
|
@@ -25020,9 +25103,9 @@ import { useDebouncedCallback as useDebouncedCallback6 } from "use-debounce";
|
|
|
25020
25103
|
import { StringParam, useQueryParams } from "use-query-params";
|
|
25021
25104
|
|
|
25022
25105
|
// src/components/Pills/FilterPill/FilterPill.tsx
|
|
25023
|
-
import { useHover as
|
|
25024
|
-
import { trussProps as
|
|
25025
|
-
import { jsx as
|
|
25106
|
+
import { useHover as useHover19 } from "react-aria";
|
|
25107
|
+
import { trussProps as trussProps106, maybeCssVar as maybeCssVar48 } from "@homebound/truss/runtime";
|
|
25108
|
+
import { jsx as jsx181, jsxs as jsxs94 } from "react/jsx-runtime";
|
|
25026
25109
|
function FilterPill(props) {
|
|
25027
25110
|
const {
|
|
25028
25111
|
text,
|
|
@@ -25035,7 +25118,7 @@ function FilterPill(props) {
|
|
|
25035
25118
|
const {
|
|
25036
25119
|
hoverProps,
|
|
25037
25120
|
isHovered: isHoveredFromEvents
|
|
25038
|
-
} =
|
|
25121
|
+
} = useHover19({
|
|
25039
25122
|
isDisabled
|
|
25040
25123
|
});
|
|
25041
25124
|
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
@@ -25043,13 +25126,13 @@ function FilterPill(props) {
|
|
|
25043
25126
|
return maybeTooltip({
|
|
25044
25127
|
title: resolveTooltip(disabled),
|
|
25045
25128
|
placement: "top",
|
|
25046
|
-
children: /* @__PURE__ */
|
|
25047
|
-
/* @__PURE__ */
|
|
25048
|
-
/* @__PURE__ */
|
|
25129
|
+
children: /* @__PURE__ */ jsxs94("button", { type: "button", disabled: isDisabled, onClick, ...trussProps106(pillStyles2(isDisabled, isHovered)), ...hoverProps, ...tid, children: [
|
|
25130
|
+
/* @__PURE__ */ jsx181("span", { className: "tal oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1 wbba", title: text, children: text }),
|
|
25131
|
+
/* @__PURE__ */ jsx181("span", { className: "fs0", ...tid.x, children: /* @__PURE__ */ jsx181(Icon, { icon: "x", color: ink, inc: 2 }) })
|
|
25049
25132
|
] })
|
|
25050
25133
|
});
|
|
25051
25134
|
}
|
|
25052
|
-
function
|
|
25135
|
+
function pillStyles2(disabled, hovered) {
|
|
25053
25136
|
return {
|
|
25054
25137
|
fontWeight: "fw6",
|
|
25055
25138
|
fontSize: "fz_12px",
|
|
@@ -25064,10 +25147,10 @@ function pillStyles(disabled, hovered) {
|
|
|
25064
25147
|
paddingBottom: "pb_4px",
|
|
25065
25148
|
minHeight: "mh_24px",
|
|
25066
25149
|
color: ["color_var", {
|
|
25067
|
-
"--color":
|
|
25150
|
+
"--color": maybeCssVar48(disabled ? "--b-on-surface-active-disabled" /* OnSurfaceActiveDisabled */ : "rgba(36, 36, 36, 1)" /* Gray900 */)
|
|
25068
25151
|
}],
|
|
25069
25152
|
backgroundColor: ["bgColor_var", {
|
|
25070
|
-
"--backgroundColor":
|
|
25153
|
+
"--backgroundColor": maybeCssVar48(hovered ? "--b-surface-active-hover" /* SurfaceActiveHover */ : "--b-surface-active" /* SurfaceActive */)
|
|
25071
25154
|
}],
|
|
25072
25155
|
...disabled ? {
|
|
25073
25156
|
cursor: "cur_not_allowed"
|
|
@@ -25076,12 +25159,12 @@ function pillStyles(disabled, hovered) {
|
|
|
25076
25159
|
}
|
|
25077
25160
|
|
|
25078
25161
|
// src/components/Layout/GridTableLayout/FilterPanel.tsx
|
|
25079
|
-
import { trussProps as
|
|
25162
|
+
import { trussProps as trussProps107 } from "@homebound/truss/runtime";
|
|
25080
25163
|
|
|
25081
25164
|
// src/components/Layout/GridTableLayout/GroupByField.tsx
|
|
25082
|
-
import { jsx as
|
|
25165
|
+
import { jsx as jsx182 } from "react/jsx-runtime";
|
|
25083
25166
|
function GroupByField({ value, setValue, options }) {
|
|
25084
|
-
return /* @__PURE__ */
|
|
25167
|
+
return /* @__PURE__ */ jsx182(
|
|
25085
25168
|
SelectField,
|
|
25086
25169
|
{
|
|
25087
25170
|
label: "Group by",
|
|
@@ -25097,9 +25180,9 @@ function GroupByField({ value, setValue, options }) {
|
|
|
25097
25180
|
}
|
|
25098
25181
|
|
|
25099
25182
|
// src/components/Layout/GridTableLayout/FilterPanel.tsx
|
|
25100
|
-
import { jsx as
|
|
25183
|
+
import { jsx as jsx183, jsxs as jsxs95 } from "react/jsx-runtime";
|
|
25101
25184
|
function FilterPanel(props) {
|
|
25102
|
-
return props.isOpen ? /* @__PURE__ */
|
|
25185
|
+
return props.isOpen ? /* @__PURE__ */ jsx183(FilterPanelOpen, { ...props }) : /* @__PURE__ */ jsx183(FilterPanelClosed, { ...props });
|
|
25103
25186
|
}
|
|
25104
25187
|
function FilterPanelOpen({
|
|
25105
25188
|
groupBy,
|
|
@@ -25114,7 +25197,7 @@ function FilterPanelOpen({
|
|
|
25114
25197
|
const withPagePadding = inDocumentScrollLayout && !insetHandled;
|
|
25115
25198
|
const activeFilterCount = getActiveFilterCount(filter ?? {});
|
|
25116
25199
|
const filterControls = filter && setFilter ? buildFilterControls(filterImpls, filter, setFilter, tid) : null;
|
|
25117
|
-
return /* @__PURE__ */
|
|
25200
|
+
return /* @__PURE__ */ jsxs95("div", { ...trussProps107({
|
|
25118
25201
|
...{
|
|
25119
25202
|
display: "df",
|
|
25120
25203
|
alignItems: "aic",
|
|
@@ -25130,9 +25213,9 @@ function FilterPanelOpen({
|
|
|
25130
25213
|
},
|
|
25131
25214
|
...withPagePadding ? pageContentPaddingX : void 0
|
|
25132
25215
|
}), children: [
|
|
25133
|
-
groupBy && /* @__PURE__ */
|
|
25216
|
+
groupBy && /* @__PURE__ */ jsx183("div", { children: /* @__PURE__ */ jsx183(GroupByField, { ...groupBy }) }),
|
|
25134
25217
|
filterControls,
|
|
25135
|
-
activeFilterCount > 0 && /* @__PURE__ */
|
|
25218
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx183(Button, { label: "Clear", variant: "tertiary", onClick: () => maybeCall(onClear), ...tid.clearBtn })
|
|
25136
25219
|
] });
|
|
25137
25220
|
}
|
|
25138
25221
|
function FilterPanelClosed({
|
|
@@ -25148,7 +25231,7 @@ function FilterPanelClosed({
|
|
|
25148
25231
|
if (!filter || !setFilter) return null;
|
|
25149
25232
|
const pills = getFilterPills(filterImpls, filter);
|
|
25150
25233
|
if (pills.length === 0) return null;
|
|
25151
|
-
return /* @__PURE__ */
|
|
25234
|
+
return /* @__PURE__ */ jsxs95("div", { ...trussProps107({
|
|
25152
25235
|
...{
|
|
25153
25236
|
display: "df",
|
|
25154
25237
|
gap: "g_1",
|
|
@@ -25158,15 +25241,15 @@ function FilterPanelClosed({
|
|
|
25158
25241
|
},
|
|
25159
25242
|
...withPagePadding ? pageContentPaddingX : void 0
|
|
25160
25243
|
}), children: [
|
|
25161
|
-
pills.map((pill) => /* @__PURE__ */
|
|
25162
|
-
/* @__PURE__ */
|
|
25244
|
+
pills.map((pill) => /* @__PURE__ */ jsx183(FilterPill, { text: pill.label, onClick: () => setFilter(pill.nextFilter), ...tid[`pill_${pill.key}`] }, pill.key)),
|
|
25245
|
+
/* @__PURE__ */ jsx183(Button, { label: "Clear", variant: "tertiary", onClick: () => maybeCall(onClear), ...tid.clearBtn })
|
|
25163
25246
|
] });
|
|
25164
25247
|
}
|
|
25165
25248
|
function buildFilterControls(filterImpls, filter, setFilter, testId) {
|
|
25166
25249
|
const entries = safeEntries(filterImpls);
|
|
25167
25250
|
const nonCheckbox = entries.filter(([_, f]) => !f.hideLabelInModal);
|
|
25168
25251
|
const checkbox = entries.filter(([_, f]) => f.hideLabelInModal);
|
|
25169
|
-
return [...nonCheckbox, ...checkbox].map(([key, f]) => /* @__PURE__ */
|
|
25252
|
+
return [...nonCheckbox, ...checkbox].map(([key, f]) => /* @__PURE__ */ jsx183("div", { children: f.render(filter[key], (value) => setFilter(updateFilter(filter, key, value)), testId, false, false) }, key));
|
|
25170
25253
|
}
|
|
25171
25254
|
function buildFilterImpls(filterDefs) {
|
|
25172
25255
|
return Object.fromEntries(safeEntries(filterDefs).map(([key, fn]) => [key, fn(key)]));
|
|
@@ -25199,8 +25282,8 @@ function filterPillsForKey(key, f, filter) {
|
|
|
25199
25282
|
}
|
|
25200
25283
|
|
|
25201
25284
|
// src/components/Layout/GridTableLayout/GridTableLayoutActions.tsx
|
|
25202
|
-
import { trussProps as
|
|
25203
|
-
import { jsx as
|
|
25285
|
+
import { trussProps as trussProps108 } from "@homebound/truss/runtime";
|
|
25286
|
+
import { jsx as jsx184, jsxs as jsxs96 } from "react/jsx-runtime";
|
|
25204
25287
|
function GridTableLayoutActionsComponent(props) {
|
|
25205
25288
|
const {
|
|
25206
25289
|
filter,
|
|
@@ -25216,7 +25299,8 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
25216
25299
|
setView,
|
|
25217
25300
|
clearFilters,
|
|
25218
25301
|
searchApi,
|
|
25219
|
-
actions
|
|
25302
|
+
actions,
|
|
25303
|
+
selectionSummary = false
|
|
25220
25304
|
} = props;
|
|
25221
25305
|
const testId = useTestIds(props, "gridTableLayoutActions");
|
|
25222
25306
|
const filterTid = useTestIds({}, filterTestIdPrefix);
|
|
@@ -25253,10 +25337,10 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
25253
25337
|
const showInlineControl = !inModal && !sm && controlCount === 1 && (hasGroupBy || !!(filter && setFilter));
|
|
25254
25338
|
const filterImpls = useMemo43(() => filterDefs ? buildFilterImpls(filterDefs) : {}, [filterDefs]);
|
|
25255
25339
|
const activeFilterCount = useMemo43(() => filter ? getFilterPills(filterImpls, filter).length : 0, [filter, filterImpls]);
|
|
25256
|
-
const searchTextField = /* @__PURE__ */
|
|
25340
|
+
const searchTextField = /* @__PURE__ */ jsx184(TextField, { label: "Search", labelStyle: "hidden", value: searchValue, onChange: (v) => {
|
|
25257
25341
|
setSearchValue(v ?? "");
|
|
25258
25342
|
handleSearchDebounced(v ?? "");
|
|
25259
|
-
}, placeholder: "Search", clearable: true, fullWidth: true, startAdornment: /* @__PURE__ */
|
|
25343
|
+
}, placeholder: "Search", clearable: true, fullWidth: true, startAdornment: /* @__PURE__ */ jsx184(Icon, { icon: "search", color: "--b-on-surface-muted" /* OnSurfaceMuted */ }) });
|
|
25260
25344
|
if (searchApi) {
|
|
25261
25345
|
searchApi.current = {
|
|
25262
25346
|
clear: () => {
|
|
@@ -25268,7 +25352,7 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
25268
25352
|
}
|
|
25269
25353
|
};
|
|
25270
25354
|
}
|
|
25271
|
-
return /* @__PURE__ */
|
|
25355
|
+
return /* @__PURE__ */ jsxs96("div", { ...trussProps108({
|
|
25272
25356
|
display: "df",
|
|
25273
25357
|
flexDirection: "fdc",
|
|
25274
25358
|
gap: "g_1",
|
|
@@ -25278,35 +25362,49 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
25278
25362
|
paddingBottom: "pb3"
|
|
25279
25363
|
} : {}
|
|
25280
25364
|
}), children: [
|
|
25281
|
-
/* @__PURE__ */
|
|
25365
|
+
/* @__PURE__ */ jsxs96("div", { ...trussProps108({
|
|
25366
|
+
// Holds the row at the 40px button height, so a pill alone in it doesn't shift the table when it appears
|
|
25282
25367
|
...{
|
|
25283
25368
|
display: "df",
|
|
25284
25369
|
gap: "g_1",
|
|
25285
|
-
justifyContent: "jcsb"
|
|
25370
|
+
justifyContent: "jcsb",
|
|
25371
|
+
...selectionSummary ? {
|
|
25372
|
+
minHeight: "mh_40px"
|
|
25373
|
+
} : {}
|
|
25286
25374
|
},
|
|
25287
25375
|
...withPagePadding ? pageContentPaddingX : void 0
|
|
25288
25376
|
}), ...testId.toolbar, children: [
|
|
25289
|
-
/* @__PURE__ */
|
|
25290
|
-
!sm && hasSearch && /* @__PURE__ */
|
|
25291
|
-
sm && hasSearch && /* @__PURE__ */
|
|
25292
|
-
sm && hasFilterControls && /* @__PURE__ */
|
|
25293
|
-
showInlineControl && (groupBy ? /* @__PURE__ */
|
|
25294
|
-
!sm && hasFilterControls && !showInlineControl && /* @__PURE__ */
|
|
25295
|
-
activeFilterCount > 0 && /* @__PURE__ */
|
|
25296
|
-
/* @__PURE__ */
|
|
25377
|
+
/* @__PURE__ */ jsxs96("div", { className: "df g_12px aic", children: [
|
|
25378
|
+
!sm && hasSearch && /* @__PURE__ */ jsx184("div", { className: "w_244px", children: searchTextField }),
|
|
25379
|
+
sm && hasSearch && /* @__PURE__ */ jsx184(IconButton, { variant: "outline", icon: searchValue ? "searchBadged" : "search", label: "Search", onClick: () => setShowSearch(!showSearch), active: showSearch, ...testId.searchButton }),
|
|
25380
|
+
sm && hasFilterControls && /* @__PURE__ */ jsx184(IconButton, { variant: "outline", icon: activeFilterCount > 0 ? "filterBadged" : "filter", label: "Filter", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterSmallButton }),
|
|
25381
|
+
showInlineControl && (groupBy ? /* @__PURE__ */ jsx184(GroupByField, { ...groupBy }) : filter && setFilter && buildFilterControls(filterImpls, filter, setFilter, filterTid)),
|
|
25382
|
+
!sm && hasFilterControls && !showInlineControl && /* @__PURE__ */ jsx184(Button, { label: "Filter", icon: "filter", size: "md", endAdornment: /* @__PURE__ */ jsxs96("div", { className: "df aic g_1", children: [
|
|
25383
|
+
activeFilterCount > 0 && /* @__PURE__ */ jsx184(CountBadge, { count: activeFilterCount }),
|
|
25384
|
+
/* @__PURE__ */ jsx184(Icon, { icon: showFilters ? "chevronUp" : "chevronDown" })
|
|
25297
25385
|
] }), variant: "secondaryBlack", onClick: () => setShowFilters(!showFilters), active: showFilters, ...testId.filterButton })
|
|
25298
25386
|
] }),
|
|
25299
|
-
(hasHideableColumns || withCardView || !!actions?.length) && /* @__PURE__ */
|
|
25300
|
-
|
|
25301
|
-
|
|
25302
|
-
|
|
25387
|
+
(hasHideableColumns || withCardView || !!actions?.length || selectionSummary) && /* @__PURE__ */ jsxs96("div", { className: "df aic g_12px", children: [
|
|
25388
|
+
selectionSummary && api && /* @__PURE__ */ jsx184(SelectionSummaryAction, { api, numberOnly: sm }),
|
|
25389
|
+
hasHideableColumns && view === "list" && columns && api && /* @__PURE__ */ jsx184(EditColumnsButton, { columns, api, tooltip: "Display columns" }),
|
|
25390
|
+
withCardView && view !== void 0 && setView && /* @__PURE__ */ jsx184(ViewToggleButton, { view, onChange: setView }),
|
|
25391
|
+
!!actions?.length && /* @__PURE__ */ jsx184(HeaderActions, { actions, ...testId.actions })
|
|
25303
25392
|
] })
|
|
25304
25393
|
] }),
|
|
25305
|
-
sm && showSearch && /* @__PURE__ */
|
|
25306
|
-
hasFilterControls && !showInlineControl && /* @__PURE__ */
|
|
25394
|
+
sm && showSearch && /* @__PURE__ */ jsx184("div", { ...trussProps108(withPagePadding ? pageContentPaddingX : void 0), children: searchTextField }),
|
|
25395
|
+
hasFilterControls && !showInlineControl && /* @__PURE__ */ jsx184(FilterPanel, { isOpen: showFilters, groupBy, filterImpls, filter, setFilter, onClear: clearFilters })
|
|
25307
25396
|
] });
|
|
25308
25397
|
}
|
|
25309
25398
|
var _GridTableLayoutActions = memo2(GridTableLayoutActionsComponent);
|
|
25399
|
+
function SelectionSummaryAction(props) {
|
|
25400
|
+
const {
|
|
25401
|
+
api,
|
|
25402
|
+
numberOnly
|
|
25403
|
+
} = props;
|
|
25404
|
+
const count = useComputed(() => api.getSelectedLeafRowCount(), [api]);
|
|
25405
|
+
if (count === 0) return null;
|
|
25406
|
+
return /* @__PURE__ */ jsx184(SelectionSummaryPill, { text: `${count} ${pluralize(count, "Row")} Selected`, count, onClick: () => api.clearSelections(), numberOnly });
|
|
25407
|
+
}
|
|
25310
25408
|
|
|
25311
25409
|
// src/components/Layout/GridTableLayout/GridTableLayoutHost.tsx
|
|
25312
25410
|
import { useResizeObserver as useResizeObserver8 } from "@react-aria/utils";
|
|
@@ -25324,10 +25422,10 @@ import { createPortal as createPortal6 } from "react-dom";
|
|
|
25324
25422
|
|
|
25325
25423
|
// src/layouts/EnvironmentBannerLayout/EnvironmentBannerLayoutHeightContext.tsx
|
|
25326
25424
|
import { createContext as createContext12, useContext as useContext22 } from "react";
|
|
25327
|
-
import { jsx as
|
|
25425
|
+
import { jsx as jsx185 } from "react/jsx-runtime";
|
|
25328
25426
|
var EnvironmentBannerLayoutHeightContext = createContext12(0);
|
|
25329
25427
|
function EnvironmentBannerLayoutHeightProvider({ value, children }) {
|
|
25330
|
-
return /* @__PURE__ */
|
|
25428
|
+
return /* @__PURE__ */ jsx185(EnvironmentBannerLayoutHeightContext.Provider, { value, children });
|
|
25331
25429
|
}
|
|
25332
25430
|
function useEnvironmentBannerLayoutHeight() {
|
|
25333
25431
|
return useContext22(EnvironmentBannerLayoutHeightContext);
|
|
@@ -25476,8 +25574,8 @@ function waitForRightPaneExit(onComplete) {
|
|
|
25476
25574
|
}
|
|
25477
25575
|
|
|
25478
25576
|
// src/components/Layout/RightPaneLayout/DocumentScrollRightPane.tsx
|
|
25479
|
-
import { mergeProps as mergeProps28, maybeCssVar as
|
|
25480
|
-
import { jsx as
|
|
25577
|
+
import { mergeProps as mergeProps28, maybeCssVar as maybeCssVar49 } from "@homebound/truss/runtime";
|
|
25578
|
+
import { jsx as jsx186 } from "react/jsx-runtime";
|
|
25481
25579
|
var __maybeInc20 = (inc) => {
|
|
25482
25580
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25483
25581
|
};
|
|
@@ -25530,7 +25628,7 @@ function DocumentScrollRightPane({
|
|
|
25530
25628
|
height: paneBounds.heightPx,
|
|
25531
25629
|
maxHeight: paneBounds.heightPx
|
|
25532
25630
|
} : void 0;
|
|
25533
|
-
const pane = /* @__PURE__ */
|
|
25631
|
+
const pane = /* @__PURE__ */ jsx186(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx186(
|
|
25534
25632
|
motion3.div,
|
|
25535
25633
|
{
|
|
25536
25634
|
ref: paneRef,
|
|
@@ -25548,20 +25646,20 @@ function DocumentScrollRightPane({
|
|
|
25548
25646
|
"--backgroundColor": "var(--b-surface)"
|
|
25549
25647
|
}],
|
|
25550
25648
|
zIndex: ["z_var", {
|
|
25551
|
-
"--zIndex":
|
|
25649
|
+
"--zIndex": maybeCssVar49(zIndices.rightPaneMobile)
|
|
25552
25650
|
}]
|
|
25553
25651
|
} : {
|
|
25554
25652
|
position: "fixed",
|
|
25555
25653
|
right: "r_0",
|
|
25556
25654
|
overflowY: "oya",
|
|
25557
25655
|
width: ["w_var", {
|
|
25558
|
-
"--width":
|
|
25656
|
+
"--width": maybeCssVar49(__maybeInc20(paneWidthCss))
|
|
25559
25657
|
}],
|
|
25560
25658
|
backgroundColor: ["bgColor_var", {
|
|
25561
25659
|
"--backgroundColor": "var(--b-surface)"
|
|
25562
25660
|
}],
|
|
25563
25661
|
zIndex: ["z_var", {
|
|
25564
|
-
"--zIndex":
|
|
25662
|
+
"--zIndex": maybeCssVar49(zIndices.rightPane)
|
|
25565
25663
|
}],
|
|
25566
25664
|
borderLeftStyle: "bls_solid",
|
|
25567
25665
|
borderLeftWidth: "blw_1px",
|
|
@@ -25598,7 +25696,7 @@ function DocumentScrollRightPane({
|
|
|
25598
25696
|
// src/components/Layout/RightPaneLayout/DocumentScrollRightPaneLayoutRoot.tsx
|
|
25599
25697
|
import { createContext as createContext13 } from "react";
|
|
25600
25698
|
import { mergeProps as mergeProps29 } from "@homebound/truss/runtime";
|
|
25601
|
-
import { jsx as
|
|
25699
|
+
import { jsx as jsx187 } from "react/jsx-runtime";
|
|
25602
25700
|
var NestedRightPaneLayoutContext = createContext13(false);
|
|
25603
25701
|
function DocumentScrollRightPaneLayoutRoot(props) {
|
|
25604
25702
|
const {
|
|
@@ -25609,7 +25707,7 @@ function DocumentScrollRightPaneLayoutRoot(props) {
|
|
|
25609
25707
|
const {
|
|
25610
25708
|
sm
|
|
25611
25709
|
} = useBreakpoint();
|
|
25612
|
-
return /* @__PURE__ */
|
|
25710
|
+
return /* @__PURE__ */ jsx187(NestedRightPaneLayoutContext.Provider, { value: true, children: /* @__PURE__ */ jsx187(
|
|
25613
25711
|
"div",
|
|
25614
25712
|
{
|
|
25615
25713
|
ref: anchorRef.setRef,
|
|
@@ -25660,7 +25758,7 @@ function resolveWithRightPaneOptions(withRightPane) {
|
|
|
25660
25758
|
}
|
|
25661
25759
|
|
|
25662
25760
|
// src/components/Layout/RightPaneLayout/DocumentScrollOverlayRightPaneLayout.tsx
|
|
25663
|
-
import { Fragment as
|
|
25761
|
+
import { Fragment as Fragment39, jsx as jsx188, jsxs as jsxs97 } from "react/jsx-runtime";
|
|
25664
25762
|
function DocumentScrollOverlayRightPaneLayout({
|
|
25665
25763
|
children,
|
|
25666
25764
|
paneWidth = defaultDocumentScrollRightPaneWidth
|
|
@@ -25677,14 +25775,14 @@ function DocumentScrollOverlayRightPaneLayout({
|
|
|
25677
25775
|
console.warn("DocumentScrollOverlayRightPaneLayout is nested inside another document-scroll right-pane layout. Use a single layout (compose at the body; do not set withRightPane on both a parent and a nested layout).");
|
|
25678
25776
|
}
|
|
25679
25777
|
}, [nestedInLayout]);
|
|
25680
|
-
if (nestedInLayout) return /* @__PURE__ */
|
|
25681
|
-
return /* @__PURE__ */
|
|
25778
|
+
if (nestedInLayout) return /* @__PURE__ */ jsx188(Fragment39, { children });
|
|
25779
|
+
return /* @__PURE__ */ jsx188(DocumentScrollRightPaneLayoutRoot, { anchorRef, tid, children: sm ? /* @__PURE__ */ jsxs97(Fragment39, { children: [
|
|
25682
25780
|
children,
|
|
25683
|
-
/* @__PURE__ */
|
|
25684
|
-
] }) : /* @__PURE__ */
|
|
25685
|
-
/* @__PURE__ */
|
|
25686
|
-
/* @__PURE__ */
|
|
25687
|
-
/* @__PURE__ */
|
|
25781
|
+
/* @__PURE__ */ jsx188(DocumentScrollRightPane, { paneWidth, mobile: true })
|
|
25782
|
+
] }) : /* @__PURE__ */ jsxs97(Fragment39, { children: [
|
|
25783
|
+
/* @__PURE__ */ jsxs97("div", { className: "df aifs wfc mw100", children: [
|
|
25784
|
+
/* @__PURE__ */ jsx188("div", { className: "w100 mwfc", ...tid.main, children }),
|
|
25785
|
+
/* @__PURE__ */ jsx188("div", { ref: spacerRef, "aria-hidden": true, ...mergeProps30(void 0, {
|
|
25688
25786
|
width: 0
|
|
25689
25787
|
}, {
|
|
25690
25788
|
flexShrink: "fs0",
|
|
@@ -25693,7 +25791,7 @@ function DocumentScrollOverlayRightPaneLayout({
|
|
|
25693
25791
|
transition: "transitionWidth"
|
|
25694
25792
|
}), ...tid.spacer })
|
|
25695
25793
|
] }),
|
|
25696
|
-
/* @__PURE__ */
|
|
25794
|
+
/* @__PURE__ */ jsx188(DocumentScrollOverlayRightPaneHost, { anchorRef: anchorRef.ref, spacerRef, paneWidth })
|
|
25697
25795
|
] }) });
|
|
25698
25796
|
}
|
|
25699
25797
|
function DocumentScrollOverlayRightPaneHost(props) {
|
|
@@ -25733,7 +25831,7 @@ function DocumentScrollOverlayRightPaneHost(props) {
|
|
|
25733
25831
|
document.documentElement.style.setProperty(beamFloatingRightOffsetVar, "0px");
|
|
25734
25832
|
};
|
|
25735
25833
|
}, [anchorRef, keepOverlayChrome, paneWidthCss]);
|
|
25736
|
-
return /* @__PURE__ */
|
|
25834
|
+
return /* @__PURE__ */ jsx188(DocumentScrollRightPane, { paneWidth, mobile: false, anchorRef });
|
|
25737
25835
|
}
|
|
25738
25836
|
|
|
25739
25837
|
// src/components/Modal/ModalFullBleed.tsx
|
|
@@ -25761,8 +25859,8 @@ function ModalFullBleed({
|
|
|
25761
25859
|
}
|
|
25762
25860
|
|
|
25763
25861
|
// src/components/Layout/GridTableLayout/GridTableLayoutHost.tsx
|
|
25764
|
-
import { trussProps as
|
|
25765
|
-
import { jsx as
|
|
25862
|
+
import { trussProps as trussProps109, maybeCssVar as maybeCssVar50 } from "@homebound/truss/runtime";
|
|
25863
|
+
import { jsx as jsx189, jsxs as jsxs98 } from "react/jsx-runtime";
|
|
25766
25864
|
var __maybeInc21 = (inc) => {
|
|
25767
25865
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
25768
25866
|
};
|
|
@@ -25786,9 +25884,9 @@ function GridTableLayoutHost(props) {
|
|
|
25786
25884
|
testIds,
|
|
25787
25885
|
children
|
|
25788
25886
|
};
|
|
25789
|
-
if (host.kind === "modal") return /* @__PURE__ */
|
|
25790
|
-
if (host.kind === "document-scroll") return /* @__PURE__ */
|
|
25791
|
-
return /* @__PURE__ */
|
|
25887
|
+
if (host.kind === "modal") return /* @__PURE__ */ jsx189(ModalHost, { ...shared, host });
|
|
25888
|
+
if (host.kind === "document-scroll") return /* @__PURE__ */ jsx189(DocumentScrollHost, { ...shared, rightPane });
|
|
25889
|
+
return /* @__PURE__ */ jsx189(ScrollableParentHost, { ...shared, isVirtualized });
|
|
25792
25890
|
}
|
|
25793
25891
|
function ModalHost(props) {
|
|
25794
25892
|
const {
|
|
@@ -25799,15 +25897,15 @@ function ModalHost(props) {
|
|
|
25799
25897
|
testIds,
|
|
25800
25898
|
children
|
|
25801
25899
|
} = props;
|
|
25802
|
-
return /* @__PURE__ */
|
|
25803
|
-
/* @__PURE__ */
|
|
25900
|
+
return /* @__PURE__ */ jsx189(ModalFullBleed, { omitPadding: true, children: /* @__PURE__ */ jsx189("div", { ref: tableWrapperRef, ...testIds.tableWrapper, children: /* @__PURE__ */ jsxs98("div", { className: "wmaxc mw100", children: [
|
|
25901
|
+
/* @__PURE__ */ jsx189(ActionsBar, { actionsRef: tableActionsRef, xss: {
|
|
25804
25902
|
...{
|
|
25805
25903
|
position: "sticky",
|
|
25806
25904
|
top: "top0",
|
|
25807
25905
|
left: "l_0",
|
|
25808
25906
|
width: "w_100cqw",
|
|
25809
25907
|
zIndex: ["z_var", {
|
|
25810
|
-
"--zIndex":
|
|
25908
|
+
"--zIndex": maybeCssVar50(zIndices.tableActions)
|
|
25811
25909
|
}],
|
|
25812
25910
|
backgroundColor: ["bgColor_var", {
|
|
25813
25911
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -25815,7 +25913,7 @@ function ModalHost(props) {
|
|
|
25815
25913
|
},
|
|
25816
25914
|
...modalBodyPaddingX
|
|
25817
25915
|
}, testIds, children: actions }),
|
|
25818
|
-
/* @__PURE__ */
|
|
25916
|
+
/* @__PURE__ */ jsx189(VirtualizedScrollParentProvider, { element: host.scrollEl, viewportWidth: host.scrollViewportWidth, children })
|
|
25819
25917
|
] }) }) });
|
|
25820
25918
|
}
|
|
25821
25919
|
function DocumentScrollHost(props) {
|
|
@@ -25827,26 +25925,26 @@ function DocumentScrollHost(props) {
|
|
|
25827
25925
|
testIds,
|
|
25828
25926
|
children
|
|
25829
25927
|
} = props;
|
|
25830
|
-
const tableBody = rightPane ? /* @__PURE__ */
|
|
25928
|
+
const tableBody = rightPane ? /* @__PURE__ */ jsx189(DocumentScrollOverlayRightPaneLayout, { paneWidth: rightPane.width, children: /* @__PURE__ */ jsx189("div", { ...trussProps109({
|
|
25831
25929
|
minWidth: ["mw_var", {
|
|
25832
|
-
"--minWidth":
|
|
25930
|
+
"--minWidth": maybeCssVar50(documentScrollRightPaneContentMinCss())
|
|
25833
25931
|
}]
|
|
25834
25932
|
}), children }) }) : children;
|
|
25835
|
-
return /* @__PURE__ */
|
|
25836
|
-
/* @__PURE__ */
|
|
25933
|
+
return /* @__PURE__ */ jsxs98("div", { ref: tableWrapperRef, className: "df fdc wfc mw100", ...actions !== void 0 ? selfTopSpaced : {}, ...testIds.tableWrapper, children: [
|
|
25934
|
+
/* @__PURE__ */ jsx189(ActionsBar, { actionsRef: tableActionsRef, xss: {
|
|
25837
25935
|
transition: "transitionTop",
|
|
25838
25936
|
position: "sticky",
|
|
25839
25937
|
top: ["top_var", {
|
|
25840
|
-
"--top":
|
|
25938
|
+
"--top": maybeCssVar50(__maybeInc21(stickyNavAndHeaderOffset()))
|
|
25841
25939
|
}],
|
|
25842
25940
|
left: ["left_var", {
|
|
25843
|
-
"--left":
|
|
25941
|
+
"--left": maybeCssVar50(__maybeInc21(documentScrollChromeLeft()))
|
|
25844
25942
|
}],
|
|
25845
25943
|
width: ["w_var", {
|
|
25846
|
-
"--width":
|
|
25944
|
+
"--width": maybeCssVar50(__maybeInc21(`min(100%, ${documentScrollChromeWidth()})`))
|
|
25847
25945
|
}],
|
|
25848
25946
|
zIndex: ["z_var", {
|
|
25849
|
-
"--zIndex":
|
|
25947
|
+
"--zIndex": maybeCssVar50(zIndices.tableActions)
|
|
25850
25948
|
}],
|
|
25851
25949
|
backgroundColor: ["bgColor_var", {
|
|
25852
25950
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -25864,9 +25962,9 @@ function ScrollableParentHost(props) {
|
|
|
25864
25962
|
testIds,
|
|
25865
25963
|
children
|
|
25866
25964
|
} = props;
|
|
25867
|
-
return /* @__PURE__ */
|
|
25868
|
-
/* @__PURE__ */
|
|
25869
|
-
/* @__PURE__ */
|
|
25965
|
+
return /* @__PURE__ */ jsxs98("div", { ref: tableWrapperRef, className: "df fdc", ...actions !== void 0 ? selfTopSpaced : {}, ...testIds.tableWrapper, children: [
|
|
25966
|
+
/* @__PURE__ */ jsx189(ActionsBar, { actionsRef: tableActionsRef, testIds, children: actions }),
|
|
25967
|
+
/* @__PURE__ */ jsx189(ScrollableContent, { virtualized: isVirtualized, children })
|
|
25870
25968
|
] });
|
|
25871
25969
|
}
|
|
25872
25970
|
function ActionsBar({
|
|
@@ -25876,7 +25974,7 @@ function ActionsBar({
|
|
|
25876
25974
|
children
|
|
25877
25975
|
}) {
|
|
25878
25976
|
if (children === void 0) return null;
|
|
25879
|
-
return /* @__PURE__ */
|
|
25977
|
+
return /* @__PURE__ */ jsx189("div", { ref: actionsRef, ...trussProps109(xss), ...testIds.stickyContent, children });
|
|
25880
25978
|
}
|
|
25881
25979
|
function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|
|
25882
25980
|
const syncHeightVar = useCallback31(() => {
|
|
@@ -25908,7 +26006,7 @@ function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|
|
|
25908
26006
|
|
|
25909
26007
|
// src/components/Layout/GridTableLayout/QueryTable.tsx
|
|
25910
26008
|
import { useMemo as useMemo44 } from "react";
|
|
25911
|
-
import { Fragment as
|
|
26009
|
+
import { Fragment as Fragment40, jsx as jsx190, jsxs as jsxs99 } from "react/jsx-runtime";
|
|
25912
26010
|
function QueryTable(props) {
|
|
25913
26011
|
const { emptyFallback, query, createRows, columns, emptyState: emptyStateProp, ...others } = props;
|
|
25914
26012
|
const displayData = query.error ? void 0 : query.data ?? query.previousData;
|
|
@@ -25920,15 +26018,15 @@ function QueryTable(props) {
|
|
|
25920
26018
|
return { title: emptyFallback };
|
|
25921
26019
|
}, [emptyFallback, emptyStateProp, query.error, query.loading]);
|
|
25922
26020
|
if (query.loading && displayData === void 0) {
|
|
25923
|
-
return /* @__PURE__ */
|
|
26021
|
+
return /* @__PURE__ */ jsx190("div", { children: /* @__PURE__ */ jsx190(LoadingTable, { columns: columns.length }) });
|
|
25924
26022
|
}
|
|
25925
|
-
return /* @__PURE__ */
|
|
26023
|
+
return /* @__PURE__ */ jsx190(GridTable, { ...{ rows, columns, fallbackMessage, emptyState, ...others }, loading: query.loading });
|
|
25926
26024
|
}
|
|
25927
26025
|
function LoadingTable(props) {
|
|
25928
26026
|
const { columns } = props;
|
|
25929
|
-
return /* @__PURE__ */
|
|
25930
|
-
/* @__PURE__ */
|
|
25931
|
-
/* @__PURE__ */
|
|
26027
|
+
return /* @__PURE__ */ jsxs99(Fragment40, { children: [
|
|
26028
|
+
/* @__PURE__ */ jsx190(LoadingSkeleton, { rows: 1, columns: 1 }),
|
|
26029
|
+
/* @__PURE__ */ jsx190(LoadingSkeleton, { rows: 5, columns: columns ?? 5 })
|
|
25932
26030
|
] });
|
|
25933
26031
|
}
|
|
25934
26032
|
|
|
@@ -26159,12 +26257,13 @@ function useStableValue(value) {
|
|
|
26159
26257
|
}
|
|
26160
26258
|
|
|
26161
26259
|
// src/components/Layout/GridTableLayout/GridTableLayout.tsx
|
|
26162
|
-
import { Fragment as
|
|
26260
|
+
import { Fragment as Fragment41, jsx as jsx191 } from "react/jsx-runtime";
|
|
26163
26261
|
function GridTableLayoutComponent(props) {
|
|
26164
26262
|
const {
|
|
26165
26263
|
tableProps,
|
|
26166
26264
|
layoutState,
|
|
26167
26265
|
actions,
|
|
26266
|
+
selectionSummary = false,
|
|
26168
26267
|
hideEditColumns = false,
|
|
26169
26268
|
withCardView,
|
|
26170
26269
|
defaultView = "list",
|
|
@@ -26187,7 +26286,8 @@ function GridTableLayoutComponent(props) {
|
|
|
26187
26286
|
);
|
|
26188
26287
|
const [view, setView] = usePersistedTableView(defaultView, !!withCardView);
|
|
26189
26288
|
const clientSearch = layoutState?.search === "client" ? layoutState.searchString : void 0;
|
|
26190
|
-
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView || actions?.length
|
|
26289
|
+
const showTableActions = !!(layoutState?.filterDefs || layoutState?.search || hasHideableColumns || withCardView || actions?.length || // Rendered before anything's selected, so the pill doesn't shift the table
|
|
26290
|
+
selectionSummary);
|
|
26191
26291
|
const isVirtualized = tableProps.as === "virtual" || view === "card";
|
|
26192
26292
|
const visibleColumnIds = useComputed(() => api.getVisibleColumnIds(), [api]);
|
|
26193
26293
|
useEffect28(() => {
|
|
@@ -26209,7 +26309,7 @@ function GridTableLayoutComponent(props) {
|
|
|
26209
26309
|
() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters),
|
|
26210
26310
|
[layoutEmptyFallback, layoutState, tableProps, clearFilters]
|
|
26211
26311
|
);
|
|
26212
|
-
const tableActionsEl = /* @__PURE__ */
|
|
26312
|
+
const tableActionsEl = /* @__PURE__ */ jsx191(
|
|
26213
26313
|
_GridTableLayoutActions,
|
|
26214
26314
|
{
|
|
26215
26315
|
filterDefs: layoutState?.filterDefs,
|
|
@@ -26225,12 +26325,13 @@ function GridTableLayoutComponent(props) {
|
|
|
26225
26325
|
setView,
|
|
26226
26326
|
clearFilters,
|
|
26227
26327
|
searchApi: searchApiRef,
|
|
26228
|
-
actions
|
|
26328
|
+
actions,
|
|
26329
|
+
selectionSummary
|
|
26229
26330
|
}
|
|
26230
26331
|
);
|
|
26231
26332
|
const cardAs = view === "card" ? "card" : void 0;
|
|
26232
26333
|
const tableStyle = useMemo47(() => getDefaultStyle(tableProps.style), [tableProps.style]);
|
|
26233
|
-
const tableBody = /* @__PURE__ */
|
|
26334
|
+
const tableBody = /* @__PURE__ */ jsx191(Fragment41, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx191(
|
|
26234
26335
|
GridTable,
|
|
26235
26336
|
{
|
|
26236
26337
|
...tableProps,
|
|
@@ -26244,7 +26345,7 @@ function GridTableLayoutComponent(props) {
|
|
|
26244
26345
|
visibleColumnsStorageKey,
|
|
26245
26346
|
columnGutter: includeColumnGutters
|
|
26246
26347
|
}
|
|
26247
|
-
) : /* @__PURE__ */
|
|
26348
|
+
) : /* @__PURE__ */ jsx191(
|
|
26248
26349
|
QueryTable,
|
|
26249
26350
|
{
|
|
26250
26351
|
...tableProps,
|
|
@@ -26259,7 +26360,7 @@ function GridTableLayoutComponent(props) {
|
|
|
26259
26360
|
columnGutter: includeColumnGutters
|
|
26260
26361
|
}
|
|
26261
26362
|
) });
|
|
26262
|
-
return /* @__PURE__ */
|
|
26363
|
+
return /* @__PURE__ */ jsx191(
|
|
26263
26364
|
GridTableLayoutHost,
|
|
26264
26365
|
{
|
|
26265
26366
|
host,
|
|
@@ -26327,12 +26428,12 @@ function composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFi
|
|
|
26327
26428
|
illustration: tableEmptyState?.illustration,
|
|
26328
26429
|
title: tableEmptyState?.title ?? tableEmptyFallback ?? layoutEmptyFallback,
|
|
26329
26430
|
description: tableEmptyState?.description ?? (filteringActive ? filterEmptyDescription : void 0),
|
|
26330
|
-
actions: tableEmptyState?.actions ?? (filteringActive && layoutState ? /* @__PURE__ */
|
|
26431
|
+
actions: tableEmptyState?.actions ?? (filteringActive && layoutState ? /* @__PURE__ */ jsx191(Button, { label: "Clear Filters", variant: "tertiary", onClick: clearFilters, "data-testid": "clearFilters" }) : void 0)
|
|
26331
26432
|
};
|
|
26332
26433
|
}
|
|
26333
26434
|
|
|
26334
26435
|
// src/components/Layout/PreventBrowserScroll.tsx
|
|
26335
|
-
import { jsx as
|
|
26436
|
+
import { jsx as jsx192 } from "react/jsx-runtime";
|
|
26336
26437
|
function PreventBrowserScroll({
|
|
26337
26438
|
children
|
|
26338
26439
|
}) {
|
|
@@ -26340,15 +26441,15 @@ function PreventBrowserScroll({
|
|
|
26340
26441
|
// Take over the full viewport and hide any overflown content.
|
|
26341
26442
|
// Using `-webkit-fill-available`, otherwise `height: 100vh` includes the app bars in mobile Safari. See https://allthingssmitty.com/2020/05/11/css-fix-for-100vh-in-mobile-webkit/
|
|
26342
26443
|
// Setting the multiple "(min|max-)height" properties is necessary, as Truss will turn this into an object and there can only be one `height` property.
|
|
26343
|
-
/* @__PURE__ */
|
|
26444
|
+
/* @__PURE__ */ jsx192("div", { className: "oh vh100 mh_negwebkit_fill_available maxh_negwebkit_fill_available", children: /* @__PURE__ */ jsx192("div", { className: "h100 df fdc mh0 oa", children }) })
|
|
26344
26445
|
);
|
|
26345
26446
|
}
|
|
26346
26447
|
|
|
26347
26448
|
// src/components/Layout/RightPaneLayout/RightPaneLayout.tsx
|
|
26348
26449
|
import { AnimatePresence as AnimatePresence4, motion as motion4 } from "framer-motion";
|
|
26349
26450
|
import { useEffect as useEffect29 } from "react";
|
|
26350
|
-
import { trussProps as
|
|
26351
|
-
import { Fragment as
|
|
26451
|
+
import { trussProps as trussProps110, maybeCssVar as maybeCssVar51 } from "@homebound/truss/runtime";
|
|
26452
|
+
import { Fragment as Fragment42, jsx as jsx193, jsxs as jsxs100 } from "react/jsx-runtime";
|
|
26352
26453
|
var __maybeInc22 = (inc) => {
|
|
26353
26454
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26354
26455
|
};
|
|
@@ -26366,11 +26467,11 @@ function RightPaneLayout(props) {
|
|
|
26366
26467
|
} = useRightPaneOpenState();
|
|
26367
26468
|
const rightPaneContent = useRightPaneContent();
|
|
26368
26469
|
useEffect29(() => closePane2, [closePane2]);
|
|
26369
|
-
return /* @__PURE__ */
|
|
26370
|
-
/* @__PURE__ */
|
|
26470
|
+
return /* @__PURE__ */ jsx193("div", { className: "h100 df oxh", children: /* @__PURE__ */ jsxs100(Fragment42, { children: [
|
|
26471
|
+
/* @__PURE__ */ jsx193("div", { ...trussProps110({
|
|
26371
26472
|
...{
|
|
26372
26473
|
width: ["w_var", {
|
|
26373
|
-
"--width":
|
|
26474
|
+
"--width": maybeCssVar51(__maybeInc22(`calc(100% - ${paneWidth + 24}px)`))
|
|
26374
26475
|
}],
|
|
26375
26476
|
transition: "transitionWidth",
|
|
26376
26477
|
height: "h100",
|
|
@@ -26386,13 +26487,13 @@ function RightPaneLayout(props) {
|
|
|
26386
26487
|
...{
|
|
26387
26488
|
...!!defaultPaneContent ? {
|
|
26388
26489
|
width: ["w_var", {
|
|
26389
|
-
"--width":
|
|
26490
|
+
"--width": maybeCssVar51(__maybeInc22(`calc(100% - ${paneWidth + 24}px)`))
|
|
26390
26491
|
}],
|
|
26391
26492
|
marginRight: "mr3"
|
|
26392
26493
|
} : {}
|
|
26393
26494
|
}
|
|
26394
26495
|
}), children }),
|
|
26395
|
-
/* @__PURE__ */
|
|
26496
|
+
/* @__PURE__ */ jsxs100("div", { ...trussProps110({
|
|
26396
26497
|
position: "relative",
|
|
26397
26498
|
...!!defaultPaneContent ? {
|
|
26398
26499
|
width: ["w_var", {
|
|
@@ -26400,7 +26501,7 @@ function RightPaneLayout(props) {
|
|
|
26400
26501
|
}]
|
|
26401
26502
|
} : {}
|
|
26402
26503
|
}), children: [
|
|
26403
|
-
defaultPaneContent && /* @__PURE__ */
|
|
26504
|
+
defaultPaneContent && /* @__PURE__ */ jsx193("div", { ...trussProps110({
|
|
26404
26505
|
height: "h100",
|
|
26405
26506
|
width: ["w_var", {
|
|
26406
26507
|
"--width": `${paneWidth}px`
|
|
@@ -26413,14 +26514,14 @@ function RightPaneLayout(props) {
|
|
|
26413
26514
|
left: "l_100"
|
|
26414
26515
|
} : {}
|
|
26415
26516
|
}), children: defaultPaneContent }),
|
|
26416
|
-
/* @__PURE__ */
|
|
26517
|
+
/* @__PURE__ */ jsx193(AnimatePresence4, { children: isRightPaneOpen && /* @__PURE__ */ jsx193(
|
|
26417
26518
|
motion4.div,
|
|
26418
26519
|
{
|
|
26419
26520
|
layout: "position",
|
|
26420
26521
|
"data-testid": "rightPaneContent",
|
|
26421
|
-
...
|
|
26522
|
+
...trussProps110({
|
|
26422
26523
|
backgroundColor: ["bgColor_var", {
|
|
26423
|
-
"--backgroundColor":
|
|
26524
|
+
"--backgroundColor": maybeCssVar51(paneBgColor)
|
|
26424
26525
|
}],
|
|
26425
26526
|
height: "h100",
|
|
26426
26527
|
width: ["w_var", {
|
|
@@ -26457,8 +26558,8 @@ function RightPaneLayout(props) {
|
|
|
26457
26558
|
// src/components/Layout/RightPaneLayout/internal/DeleteAction.tsx
|
|
26458
26559
|
import { useResizeObserver as useResizeObserver9 } from "@react-aria/utils";
|
|
26459
26560
|
import { useRef as useRef61, useState as useState52 } from "react";
|
|
26460
|
-
import { trussProps as
|
|
26461
|
-
import { jsx as
|
|
26561
|
+
import { trussProps as trussProps111 } from "@homebound/truss/runtime";
|
|
26562
|
+
import { jsx as jsx194, jsxs as jsxs101 } from "react/jsx-runtime";
|
|
26462
26563
|
function MaybeDeleteAction(props) {
|
|
26463
26564
|
const {
|
|
26464
26565
|
count = 0,
|
|
@@ -26466,7 +26567,7 @@ function MaybeDeleteAction(props) {
|
|
|
26466
26567
|
...buttonProps
|
|
26467
26568
|
} = props;
|
|
26468
26569
|
if (!onClick) return null;
|
|
26469
|
-
return count > 1 ? /* @__PURE__ */
|
|
26570
|
+
return count > 1 ? /* @__PURE__ */ jsx194(BulkDeleteAction, { count, onClick, ...buttonProps }) : /* @__PURE__ */ jsx194(IconButton, { icon: "trash", label: "Delete", onClick, ...buttonProps });
|
|
26470
26571
|
}
|
|
26471
26572
|
function BulkDeleteAction(props) {
|
|
26472
26573
|
const {
|
|
@@ -26490,15 +26591,15 @@ function BulkDeleteAction(props) {
|
|
|
26490
26591
|
});
|
|
26491
26592
|
return (
|
|
26492
26593
|
// Offset the Button's padding so the trash aligns with the footer inset.
|
|
26493
|
-
/* @__PURE__ */
|
|
26494
|
-
/* @__PURE__ */
|
|
26495
|
-
/* @__PURE__ */
|
|
26594
|
+
/* @__PURE__ */ jsxs101("div", { ref: containerRef, className: "relative fg1 mw0 ml_neg16px", children: [
|
|
26595
|
+
/* @__PURE__ */ jsx194("div", { "aria-hidden": true, className: "absolute top0 l_0 w100 oh vh pen", children: /* @__PURE__ */ jsx194("div", { ref: contentRef, className: "wmaxc", children: /* @__PURE__ */ jsx194(Button, { variant: "quaternary", icon: "trash", label: `Delete (${count})`, onClick: noop }) }) }),
|
|
26596
|
+
/* @__PURE__ */ jsx194(
|
|
26496
26597
|
Button,
|
|
26497
26598
|
{
|
|
26498
26599
|
variant: "quaternary",
|
|
26499
26600
|
icon: "trash",
|
|
26500
|
-
label: /* @__PURE__ */
|
|
26501
|
-
/* @__PURE__ */
|
|
26601
|
+
label: /* @__PURE__ */ jsxs101("span", { children: [
|
|
26602
|
+
/* @__PURE__ */ jsx194("span", { ...trussProps111({
|
|
26502
26603
|
...overflows ? {
|
|
26503
26604
|
position: "absolute",
|
|
26504
26605
|
overflow: "oh",
|
|
@@ -26525,8 +26626,8 @@ function BulkDeleteAction(props) {
|
|
|
26525
26626
|
}
|
|
26526
26627
|
|
|
26527
26628
|
// src/components/Layout/RightPaneLayout/RightPanePanel.tsx
|
|
26528
|
-
import { trussProps as
|
|
26529
|
-
import { jsx as
|
|
26629
|
+
import { trussProps as trussProps112 } from "@homebound/truss/runtime";
|
|
26630
|
+
import { jsx as jsx195, jsxs as jsxs102 } from "react/jsx-runtime";
|
|
26530
26631
|
function RightPanePanel(props) {
|
|
26531
26632
|
const {
|
|
26532
26633
|
title,
|
|
@@ -26540,8 +26641,8 @@ function RightPanePanel(props) {
|
|
|
26540
26641
|
const {
|
|
26541
26642
|
closeRightPane
|
|
26542
26643
|
} = useRightPaneActions();
|
|
26543
|
-
return /* @__PURE__ */
|
|
26544
|
-
/* @__PURE__ */
|
|
26644
|
+
return /* @__PURE__ */ jsxs102("div", { className: "relative df fdc h100", ...tid, children: [
|
|
26645
|
+
/* @__PURE__ */ jsxs102("div", { ...trussProps112({
|
|
26545
26646
|
display: "df",
|
|
26546
26647
|
alignItems: "aic",
|
|
26547
26648
|
justifyContent: "jcsb",
|
|
@@ -26557,11 +26658,11 @@ function RightPanePanel(props) {
|
|
|
26557
26658
|
}],
|
|
26558
26659
|
flexShrink: "fs0"
|
|
26559
26660
|
}), ...tid.header, children: [
|
|
26560
|
-
/* @__PURE__ */
|
|
26561
|
-
withClose && /* @__PURE__ */
|
|
26661
|
+
/* @__PURE__ */ jsx195("div", { className: "fw6 fz_16px lh_24px", children: title }),
|
|
26662
|
+
withClose && /* @__PURE__ */ jsx195(IconButton, { icon: "x", label: "Close", autoFocus: true, onClick: closeRightPane, ...tid.close })
|
|
26562
26663
|
] }),
|
|
26563
|
-
/* @__PURE__ */
|
|
26564
|
-
(deleteAction || secondaryAction || primaryAction) && /* @__PURE__ */
|
|
26664
|
+
/* @__PURE__ */ jsx195("div", { className: "fg1 mh0 oya pt3 pb3 pr3 pl3", ...tid.body, children }),
|
|
26665
|
+
(deleteAction || secondaryAction || primaryAction) && /* @__PURE__ */ jsxs102("div", { ...trussProps112({
|
|
26565
26666
|
display: "df",
|
|
26566
26667
|
alignItems: "aic",
|
|
26567
26668
|
gap: "g_2",
|
|
@@ -26576,10 +26677,10 @@ function RightPanePanel(props) {
|
|
|
26576
26677
|
}],
|
|
26577
26678
|
flexShrink: "fs0"
|
|
26578
26679
|
}), ...tid.footer, children: [
|
|
26579
|
-
/* @__PURE__ */
|
|
26580
|
-
/* @__PURE__ */
|
|
26581
|
-
secondaryAction && /* @__PURE__ */
|
|
26582
|
-
primaryAction && /* @__PURE__ */
|
|
26680
|
+
/* @__PURE__ */ jsx195(MaybeDeleteAction, { ...deleteAction, ...tid.delete }),
|
|
26681
|
+
/* @__PURE__ */ jsxs102("div", { className: "df aic g_1_5 fs0 mla", children: [
|
|
26682
|
+
secondaryAction && /* @__PURE__ */ jsx195(Button, { ...secondaryAction, variant: "secondary", ...tid.secondaryAction }),
|
|
26683
|
+
primaryAction && /* @__PURE__ */ jsx195(Button, { ...primaryAction, ...tid.primaryAction })
|
|
26583
26684
|
] })
|
|
26584
26685
|
] })
|
|
26585
26686
|
] });
|
|
@@ -26587,14 +26688,14 @@ function RightPanePanel(props) {
|
|
|
26587
26688
|
|
|
26588
26689
|
// src/components/Layout/ScrollableFooter.tsx
|
|
26589
26690
|
import { createPortal as createPortal7 } from "react-dom";
|
|
26590
|
-
import { Fragment as
|
|
26691
|
+
import { Fragment as Fragment43, jsx as jsx196 } from "react/jsx-runtime";
|
|
26591
26692
|
function ScrollableFooter(props) {
|
|
26592
26693
|
const { children } = props;
|
|
26593
26694
|
const { footerEl } = useScrollableParent();
|
|
26594
26695
|
if (!footerEl) {
|
|
26595
|
-
return /* @__PURE__ */
|
|
26696
|
+
return /* @__PURE__ */ jsx196(Fragment43, { children });
|
|
26596
26697
|
}
|
|
26597
|
-
return createPortal7(/* @__PURE__ */
|
|
26698
|
+
return createPortal7(/* @__PURE__ */ jsx196(Fragment43, { children }), footerEl);
|
|
26598
26699
|
}
|
|
26599
26700
|
|
|
26600
26701
|
// src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
|
|
@@ -26602,7 +26703,7 @@ import { AnimatePresence as AnimatePresence5, motion as motion5 } from "framer-m
|
|
|
26602
26703
|
import { useEffect as useEffect30, useState as useState53 } from "react";
|
|
26603
26704
|
|
|
26604
26705
|
// src/components/Layout/TableReviewLayout/SidePanel.tsx
|
|
26605
|
-
import { jsx as
|
|
26706
|
+
import { jsx as jsx197, jsxs as jsxs103 } from "react/jsx-runtime";
|
|
26606
26707
|
function SidePanel(props) {
|
|
26607
26708
|
const {
|
|
26608
26709
|
title,
|
|
@@ -26612,19 +26713,19 @@ function SidePanel(props) {
|
|
|
26612
26713
|
} = props;
|
|
26613
26714
|
const tid = useTestIds(props, "sidePanel");
|
|
26614
26715
|
const hasFooter = primaryAction || secondaryAction;
|
|
26615
|
-
return /* @__PURE__ */
|
|
26616
|
-
/* @__PURE__ */
|
|
26617
|
-
/* @__PURE__ */
|
|
26618
|
-
hasFooter && /* @__PURE__ */
|
|
26619
|
-
secondaryAction && /* @__PURE__ */
|
|
26620
|
-
primaryAction && /* @__PURE__ */
|
|
26716
|
+
return /* @__PURE__ */ jsxs103("div", { className: "h100 df fdc oh", ...tid, children: [
|
|
26717
|
+
/* @__PURE__ */ jsx197("div", { className: "pt3 pb3 pr3 pl3 fs0", ...tid.header, children: /* @__PURE__ */ jsx197("h2", { className: "fw6 fz_20px lh_28px mt0 mb0", ...tid.title, children: title }) }),
|
|
26718
|
+
/* @__PURE__ */ jsx197("div", { className: "fg1 oya mh0", ...tid.body, children: content2 }),
|
|
26719
|
+
hasFooter && /* @__PURE__ */ jsxs103("div", { className: "df g_2 jcfe pt3 pb3 pr3 pl3 fs0", ...tid.footer, children: [
|
|
26720
|
+
secondaryAction && /* @__PURE__ */ jsx197(Button, { ...secondaryAction, variant: "secondaryBlack" }),
|
|
26721
|
+
primaryAction && /* @__PURE__ */ jsx197(Button, { ...primaryAction })
|
|
26621
26722
|
] })
|
|
26622
26723
|
] });
|
|
26623
26724
|
}
|
|
26624
26725
|
|
|
26625
26726
|
// src/components/Layout/TableReviewLayout/TableReviewLayout.tsx
|
|
26626
|
-
import { trussProps as
|
|
26627
|
-
import { jsx as
|
|
26727
|
+
import { trussProps as trussProps113, maybeCssVar as maybeCssVar52 } from "@homebound/truss/runtime";
|
|
26728
|
+
import { jsx as jsx198, jsxs as jsxs104 } from "react/jsx-runtime";
|
|
26628
26729
|
var defaultRightPaneWidth = 450;
|
|
26629
26730
|
function TableReviewLayout(props) {
|
|
26630
26731
|
const {
|
|
@@ -26650,29 +26751,29 @@ function TableReviewLayout(props) {
|
|
|
26650
26751
|
let tableContent;
|
|
26651
26752
|
if (isGridTableProps(tableProps)) {
|
|
26652
26753
|
if (emptyState && !tableProps.rows.some((r) => r.kind !== "header")) {
|
|
26653
|
-
tableContent = /* @__PURE__ */
|
|
26754
|
+
tableContent = /* @__PURE__ */ jsx198("div", { className: "h100 df fdc aic jcc", children: emptyState });
|
|
26654
26755
|
} else {
|
|
26655
|
-
tableContent = /* @__PURE__ */
|
|
26756
|
+
tableContent = /* @__PURE__ */ jsx198(GridTable, { ...tableProps, style: {
|
|
26656
26757
|
allWhite: true,
|
|
26657
26758
|
bordered: true
|
|
26658
26759
|
}, stickyHeader: true });
|
|
26659
26760
|
}
|
|
26660
26761
|
} else if (emptyState) {
|
|
26661
|
-
tableContent = /* @__PURE__ */
|
|
26762
|
+
tableContent = /* @__PURE__ */ jsx198("div", { className: "h100 df fdc aic jcc", children: emptyState });
|
|
26662
26763
|
} else {
|
|
26663
|
-
tableContent = /* @__PURE__ */
|
|
26764
|
+
tableContent = /* @__PURE__ */ jsx198(QueryTable, { ...tableProps, style: {
|
|
26664
26765
|
allWhite: true,
|
|
26665
26766
|
bordered: true
|
|
26666
26767
|
}, stickyHeader: true });
|
|
26667
26768
|
}
|
|
26668
|
-
return /* @__PURE__ */
|
|
26769
|
+
return /* @__PURE__ */ jsxs104("div", { ...trussProps113({
|
|
26669
26770
|
position: "fixed",
|
|
26670
26771
|
top: "top0",
|
|
26671
26772
|
bottom: "bot_0",
|
|
26672
26773
|
left: "l_0",
|
|
26673
26774
|
right: "r_0",
|
|
26674
26775
|
zIndex: ["z_var", {
|
|
26675
|
-
"--zIndex":
|
|
26776
|
+
"--zIndex": maybeCssVar52(zIndices.pageOverlay)
|
|
26676
26777
|
}],
|
|
26677
26778
|
backgroundColor: ["bgColor_var", {
|
|
26678
26779
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -26680,16 +26781,16 @@ function TableReviewLayout(props) {
|
|
|
26680
26781
|
display: "df",
|
|
26681
26782
|
flexDirection: "fdc"
|
|
26682
26783
|
}), ...tid, children: [
|
|
26683
|
-
/* @__PURE__ */
|
|
26684
|
-
/* @__PURE__ */
|
|
26685
|
-
/* @__PURE__ */
|
|
26686
|
-
/* @__PURE__ */
|
|
26687
|
-
breadCrumb && /* @__PURE__ */
|
|
26688
|
-
/* @__PURE__ */
|
|
26784
|
+
/* @__PURE__ */ jsxs104("header", { className: "pl3 pr3 pt3 pb2 fs0", ...tid.header, children: [
|
|
26785
|
+
/* @__PURE__ */ jsx198(Toast, {}),
|
|
26786
|
+
/* @__PURE__ */ jsxs104("div", { className: "df jcsb aic", children: [
|
|
26787
|
+
/* @__PURE__ */ jsxs104("div", { children: [
|
|
26788
|
+
breadCrumb && /* @__PURE__ */ jsx198(PageHeaderBreadcrumbs, { breadcrumb: breadCrumb }),
|
|
26789
|
+
/* @__PURE__ */ jsx198("h1", { className: "fw6 fz_24px lh_32px mt1 mb0", ...tid.pageTitle, children: pageTitle })
|
|
26689
26790
|
] }),
|
|
26690
|
-
/* @__PURE__ */
|
|
26791
|
+
/* @__PURE__ */ jsx198(Button, { label: "Close", onClick: closeAction, ...tid.closeButton })
|
|
26691
26792
|
] }),
|
|
26692
|
-
/* @__PURE__ */
|
|
26793
|
+
/* @__PURE__ */ jsx198("div", { ...trussProps113({
|
|
26693
26794
|
fontWeight: "fw4",
|
|
26694
26795
|
fontSize: "fz_14px",
|
|
26695
26796
|
lineHeight: "lh_20px",
|
|
@@ -26699,8 +26800,8 @@ function TableReviewLayout(props) {
|
|
|
26699
26800
|
marginTop: "mt2"
|
|
26700
26801
|
}), ...tid.description, children: description })
|
|
26701
26802
|
] }),
|
|
26702
|
-
/* @__PURE__ */
|
|
26703
|
-
/* @__PURE__ */
|
|
26803
|
+
/* @__PURE__ */ jsxs104("div", { className: "fg1 df mh0", ...tid.content, children: [
|
|
26804
|
+
/* @__PURE__ */ jsx198("div", { ...trussProps113({
|
|
26704
26805
|
...{
|
|
26705
26806
|
flexGrow: "fg1",
|
|
26706
26807
|
overflowY: "oya",
|
|
@@ -26713,7 +26814,7 @@ function TableReviewLayout(props) {
|
|
|
26713
26814
|
} : {}
|
|
26714
26815
|
}
|
|
26715
26816
|
}), children: tableContent }),
|
|
26716
|
-
/* @__PURE__ */
|
|
26817
|
+
/* @__PURE__ */ jsx198(AnimatePresence5, { children: isPanelVisible && panelContent && /* @__PURE__ */ jsxs104(motion5.div, { initial: {
|
|
26717
26818
|
width: 0
|
|
26718
26819
|
}, animate: {
|
|
26719
26820
|
width: rightPaneWidth
|
|
@@ -26723,9 +26824,9 @@ function TableReviewLayout(props) {
|
|
|
26723
26824
|
ease: "linear",
|
|
26724
26825
|
duration: 0.2
|
|
26725
26826
|
}, className: "df fdc fs0 relative", children: [
|
|
26726
|
-
/* @__PURE__ */
|
|
26727
|
-
/* @__PURE__ */
|
|
26728
|
-
/* @__PURE__ */
|
|
26827
|
+
/* @__PURE__ */ jsxs104("div", { className: "absolute tp_neg32px df fdc aic l_neg24px z1", children: [
|
|
26828
|
+
/* @__PURE__ */ jsx198(IconButton, { bgColor: "--b-surface" /* Surface */, variant: "circle", icon: "x", inc: 3.5, onClick: handleClosePanel, ...tid.closePanelButton }),
|
|
26829
|
+
/* @__PURE__ */ jsx198("div", { ...trussProps113({
|
|
26729
26830
|
width: "w_1px",
|
|
26730
26831
|
backgroundColor: ["bgColor_var", {
|
|
26731
26832
|
"--backgroundColor": "var(--b-field-border-default)"
|
|
@@ -26733,15 +26834,15 @@ function TableReviewLayout(props) {
|
|
|
26733
26834
|
height: "vh100"
|
|
26734
26835
|
}) })
|
|
26735
26836
|
] }),
|
|
26736
|
-
/* @__PURE__ */
|
|
26837
|
+
/* @__PURE__ */ jsx198("div", { className: "fg1 oh mh0", children: /* @__PURE__ */ jsx198(SidePanel, { ...panelContent }) })
|
|
26737
26838
|
] }, "panel") })
|
|
26738
26839
|
] })
|
|
26739
26840
|
] });
|
|
26740
26841
|
}
|
|
26741
26842
|
|
|
26742
26843
|
// src/components/Logos/BeamLogo.tsx
|
|
26743
|
-
import { trussProps as
|
|
26744
|
-
import { jsx as
|
|
26844
|
+
import { trussProps as trussProps114, maybeCssVar as maybeCssVar53 } from "@homebound/truss/runtime";
|
|
26845
|
+
import { jsx as jsx199, jsxs as jsxs105 } from "react/jsx-runtime";
|
|
26745
26846
|
var __maybeInc23 = (inc) => {
|
|
26746
26847
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26747
26848
|
};
|
|
@@ -26751,31 +26852,31 @@ function BeamLogo(props) {
|
|
|
26751
26852
|
width: width2 = "auto",
|
|
26752
26853
|
height = "auto"
|
|
26753
26854
|
} = props;
|
|
26754
|
-
return /* @__PURE__ */
|
|
26855
|
+
return /* @__PURE__ */ jsxs105("svg", { viewBox: "0 0 500 500", xmlns: "http://www.w3.org/2000/svg", ...trussProps114({
|
|
26755
26856
|
fill: ["fill_var", {
|
|
26756
|
-
"--fill":
|
|
26857
|
+
"--fill": maybeCssVar53(fill)
|
|
26757
26858
|
}],
|
|
26758
26859
|
width: ["w_var", {
|
|
26759
|
-
"--width":
|
|
26860
|
+
"--width": maybeCssVar53(__maybeInc23(width2))
|
|
26760
26861
|
}],
|
|
26761
26862
|
height: ["h_var", {
|
|
26762
|
-
"--height":
|
|
26863
|
+
"--height": maybeCssVar53(__maybeInc23(height))
|
|
26763
26864
|
}]
|
|
26764
26865
|
}), children: [
|
|
26765
|
-
/* @__PURE__ */
|
|
26766
|
-
/* @__PURE__ */
|
|
26767
|
-
/* @__PURE__ */
|
|
26768
|
-
/* @__PURE__ */
|
|
26769
|
-
/* @__PURE__ */
|
|
26770
|
-
/* @__PURE__ */
|
|
26771
|
-
/* @__PURE__ */
|
|
26772
|
-
/* @__PURE__ */
|
|
26866
|
+
/* @__PURE__ */ jsx199("rect", { x: "10", y: "90", width: "32", height: "320" }),
|
|
26867
|
+
/* @__PURE__ */ jsx199("rect", { x: "122", y: "172", width: "32", height: "158" }),
|
|
26868
|
+
/* @__PURE__ */ jsx199("rect", { x: "346", y: "172", width: "32", height: "158" }),
|
|
26869
|
+
/* @__PURE__ */ jsx199("rect", { x: "458", y: "90", width: "32", height: "320" }),
|
|
26870
|
+
/* @__PURE__ */ jsx199("rect", { x: "10", y: "90", width: "480", height: "32" }),
|
|
26871
|
+
/* @__PURE__ */ jsx199("rect", { x: "10", y: "378", width: "480", height: "32" }),
|
|
26872
|
+
/* @__PURE__ */ jsx199("rect", { x: "10", y: "172", width: "480", height: "32" }),
|
|
26873
|
+
/* @__PURE__ */ jsx199("rect", { x: "10", y: "298", width: "480", height: "32" })
|
|
26773
26874
|
] });
|
|
26774
26875
|
}
|
|
26775
26876
|
|
|
26776
26877
|
// src/components/Logos/HomeboundLogo.tsx
|
|
26777
|
-
import { trussProps as
|
|
26778
|
-
import { jsx as
|
|
26878
|
+
import { trussProps as trussProps115, maybeCssVar as maybeCssVar54 } from "@homebound/truss/runtime";
|
|
26879
|
+
import { jsx as jsx200 } from "react/jsx-runtime";
|
|
26779
26880
|
var __maybeInc24 = (inc) => {
|
|
26780
26881
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
26781
26882
|
};
|
|
@@ -26785,24 +26886,24 @@ function HomeboundLogo(props) {
|
|
|
26785
26886
|
width: width2 = "auto",
|
|
26786
26887
|
height = "auto"
|
|
26787
26888
|
} = props;
|
|
26788
|
-
return /* @__PURE__ */
|
|
26889
|
+
return /* @__PURE__ */ jsx200("svg", { viewBox: "0 0 158.1 97.6", xmlns: "http://www.w3.org/2000/svg", ...trussProps115({
|
|
26789
26890
|
fill: ["fill_var", {
|
|
26790
|
-
"--fill":
|
|
26891
|
+
"--fill": maybeCssVar54(fill)
|
|
26791
26892
|
}],
|
|
26792
26893
|
width: ["w_var", {
|
|
26793
|
-
"--width":
|
|
26894
|
+
"--width": maybeCssVar54(__maybeInc24(width2))
|
|
26794
26895
|
}],
|
|
26795
26896
|
height: ["h_var", {
|
|
26796
|
-
"--height":
|
|
26897
|
+
"--height": maybeCssVar54(__maybeInc24(height))
|
|
26797
26898
|
}]
|
|
26798
|
-
}), children: /* @__PURE__ */
|
|
26899
|
+
}), children: /* @__PURE__ */ jsx200("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" }) });
|
|
26799
26900
|
}
|
|
26800
26901
|
|
|
26801
26902
|
// src/components/MaxLines.tsx
|
|
26802
26903
|
import { useLayoutEffect as useLayoutEffect10, useResizeObserver as useResizeObserver10 } from "@react-aria/utils";
|
|
26803
26904
|
import { useCallback as useCallback36, useEffect as useEffect31, useRef as useRef62, useState as useState54 } from "react";
|
|
26804
|
-
import { trussProps as
|
|
26805
|
-
import { jsx as
|
|
26905
|
+
import { trussProps as trussProps116, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
26906
|
+
import { jsx as jsx201, jsxs as jsxs106 } from "react/jsx-runtime";
|
|
26806
26907
|
function MaxLines({
|
|
26807
26908
|
maxLines,
|
|
26808
26909
|
children
|
|
@@ -26825,11 +26926,11 @@ function MaxLines({
|
|
|
26825
26926
|
ref: elRef,
|
|
26826
26927
|
onResize
|
|
26827
26928
|
});
|
|
26828
|
-
return /* @__PURE__ */
|
|
26829
|
-
/* @__PURE__ */
|
|
26929
|
+
return /* @__PURE__ */ jsxs106("div", { children: [
|
|
26930
|
+
/* @__PURE__ */ jsx201("div", { ref: elRef, ...trussProps116({
|
|
26830
26931
|
...!expanded ? {
|
|
26831
26932
|
WebkitLineClamp: ["lineClamp_var", {
|
|
26832
|
-
"--WebkitLineClamp":
|
|
26933
|
+
"--WebkitLineClamp": maybeCssVar55(maxLines)
|
|
26833
26934
|
}],
|
|
26834
26935
|
overflow: "oh",
|
|
26835
26936
|
display: "d_negwebkit_box",
|
|
@@ -26837,13 +26938,13 @@ function MaxLines({
|
|
|
26837
26938
|
textOverflow: "to_ellipsis"
|
|
26838
26939
|
} : {}
|
|
26839
26940
|
}), children }),
|
|
26840
|
-
hasMore && /* @__PURE__ */
|
|
26941
|
+
hasMore && /* @__PURE__ */ jsx201("button", { className: "db fw4 fz_14px lh_20px", onClick: () => setExpanded((prev) => !prev), children: expanded ? "Show Less" : "Show More" })
|
|
26841
26942
|
] });
|
|
26842
26943
|
}
|
|
26843
26944
|
|
|
26844
26945
|
// src/components/Pagination.tsx
|
|
26845
|
-
import { trussProps as
|
|
26846
|
-
import { jsx as
|
|
26946
|
+
import { trussProps as trussProps117 } from "@homebound/truss/runtime";
|
|
26947
|
+
import { jsx as jsx202, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
26847
26948
|
var defaultPage = {
|
|
26848
26949
|
offset: 0,
|
|
26849
26950
|
limit: 100
|
|
@@ -26875,7 +26976,7 @@ function Pagination(props) {
|
|
|
26875
26976
|
}
|
|
26876
26977
|
}
|
|
26877
26978
|
const tid = useTestIds(props, "pagination");
|
|
26878
|
-
return /* @__PURE__ */
|
|
26979
|
+
return /* @__PURE__ */ jsxs107("div", { ...trussProps117({
|
|
26879
26980
|
display: "df",
|
|
26880
26981
|
borderColor: ["bc_var", {
|
|
26881
26982
|
"--borderColor": "var(--b-surface-separator)"
|
|
@@ -26892,24 +26993,24 @@ function Pagination(props) {
|
|
|
26892
26993
|
paddingRight: "pr2",
|
|
26893
26994
|
paddingTop: "pt2"
|
|
26894
26995
|
}), ...tid, children: [
|
|
26895
|
-
/* @__PURE__ */
|
|
26896
|
-
/* @__PURE__ */
|
|
26996
|
+
/* @__PURE__ */ jsx202("div", { className: "df mta mba mr2", ...tid.pageSizeLabel, children: "Page size:" }),
|
|
26997
|
+
/* @__PURE__ */ jsx202("div", { className: "w_78px", children: /* @__PURE__ */ jsx202(SelectField, { compact: true, label: "Page Size", labelStyle: "hidden", options: pageOptions, value: pageSize, onSelect: (val) => set({
|
|
26897
26998
|
pageNumber: 1,
|
|
26898
26999
|
pageSize: val
|
|
26899
27000
|
}), autoSort: false, ...tid.pageSize }) }),
|
|
26900
|
-
/* @__PURE__ */
|
|
26901
|
-
/* @__PURE__ */
|
|
27001
|
+
/* @__PURE__ */ jsxs107("div", { className: "mla mta mba df", children: [
|
|
27002
|
+
/* @__PURE__ */ jsxs107("div", { className: "df mta mba mr2", ...tid.pageInfoLabel, children: [
|
|
26902
27003
|
first,
|
|
26903
27004
|
" ",
|
|
26904
27005
|
showLast ? `- ${last}` : "",
|
|
26905
27006
|
" of ",
|
|
26906
27007
|
totalCount
|
|
26907
27008
|
] }),
|
|
26908
|
-
/* @__PURE__ */
|
|
27009
|
+
/* @__PURE__ */ jsx202(IconButton, { icon: "chevronLeft", color: hasPrevPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
26909
27010
|
pageNumber: pageNumber - 1,
|
|
26910
27011
|
pageSize
|
|
26911
27012
|
}), disabled: !hasPrevPage, ...tid.previousIcon }),
|
|
26912
|
-
/* @__PURE__ */
|
|
27013
|
+
/* @__PURE__ */ jsx202(IconButton, { icon: "chevronRight", color: hasNextPage ? "--b-text-link-default" /* TextLinkDefault */ : "--b-surface-separator" /* SurfaceSeparator */, onClick: () => set({
|
|
26913
27014
|
pageNumber: pageNumber + 1,
|
|
26914
27015
|
pageSize
|
|
26915
27016
|
}), disabled: !hasNextPage, ...tid.nextIcon })
|
|
@@ -26930,69 +27031,6 @@ function toPageNumberSize(page) {
|
|
|
26930
27031
|
};
|
|
26931
27032
|
}
|
|
26932
27033
|
|
|
26933
|
-
// src/components/Pills/SelectionSummaryPill/SelectionSummaryPill.tsx
|
|
26934
|
-
import { useHover as useHover19 } from "react-aria";
|
|
26935
|
-
import { trussProps as trussProps117, maybeCssVar as maybeCssVar55 } from "@homebound/truss/runtime";
|
|
26936
|
-
import { jsx as jsx202, jsxs as jsxs107 } from "react/jsx-runtime";
|
|
26937
|
-
function SelectionSummaryPill(props) {
|
|
26938
|
-
const {
|
|
26939
|
-
text,
|
|
26940
|
-
onClick,
|
|
26941
|
-
disabled = false,
|
|
26942
|
-
__storyState
|
|
26943
|
-
} = props;
|
|
26944
|
-
const tid = useTestIds(props, "selectionSummaryPill");
|
|
26945
|
-
const {
|
|
26946
|
-
hoverProps,
|
|
26947
|
-
isHovered: isHoveredFromEvents
|
|
26948
|
-
} = useHover19({
|
|
26949
|
-
isDisabled: !!disabled
|
|
26950
|
-
});
|
|
26951
|
-
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
26952
|
-
return maybeTooltip({
|
|
26953
|
-
title: resolveTooltip(disabled),
|
|
26954
|
-
placement: "top",
|
|
26955
|
-
children: /* @__PURE__ */ jsxs107("button", { type: "button", disabled: !!disabled, onClick, "aria-label": `Clear ${text}`, ...trussProps117(pillStyles2(!!disabled, isHovered)), ...hoverProps, ...tid, children: [
|
|
26956
|
-
text,
|
|
26957
|
-
/* @__PURE__ */ jsx202("span", { ...trussProps117({
|
|
26958
|
-
color: ["color_var", {
|
|
26959
|
-
"--color": maybeCssVar55(disabled ? "--b-on-surface-active-disabled" /* OnSurfaceActiveDisabled */ : "--b-on-surface-active" /* OnSurfaceActive */)
|
|
26960
|
-
}]
|
|
26961
|
-
}), ...tid.clear, children: "Clear" })
|
|
26962
|
-
] })
|
|
26963
|
-
});
|
|
26964
|
-
}
|
|
26965
|
-
function pillStyles2(disabled, hovered) {
|
|
26966
|
-
return {
|
|
26967
|
-
fontWeight: "fw6",
|
|
26968
|
-
fontSize: "fz_14px",
|
|
26969
|
-
lineHeight: "lh_20px",
|
|
26970
|
-
display: "dif",
|
|
26971
|
-
alignItems: "aic",
|
|
26972
|
-
gap: "g_1",
|
|
26973
|
-
whiteSpace: "wsnw",
|
|
26974
|
-
borderStyle: "bss",
|
|
26975
|
-
borderWidth: "bw1",
|
|
26976
|
-
borderRadius: "brPill",
|
|
26977
|
-
paddingLeft: "pl_15px",
|
|
26978
|
-
paddingRight: "pr_15px",
|
|
26979
|
-
paddingTop: "pt_7px",
|
|
26980
|
-
paddingBottom: "pb_7px",
|
|
26981
|
-
borderColor: ["bc_var", {
|
|
26982
|
-
"--borderColor": "var(--b-surface-active-border)"
|
|
26983
|
-
}],
|
|
26984
|
-
color: ["color_var", {
|
|
26985
|
-
"--color": maybeCssVar55(disabled ? "--b-on-surface-active-disabled" /* OnSurfaceActiveDisabled */ : "rgba(36, 36, 36, 1)" /* Gray900 */)
|
|
26986
|
-
}],
|
|
26987
|
-
backgroundColor: ["bgColor_var", {
|
|
26988
|
-
"--backgroundColor": maybeCssVar55(hovered ? "--b-surface-active-hover" /* SurfaceActiveHover */ : "--b-surface-active" /* SurfaceActive */)
|
|
26989
|
-
}],
|
|
26990
|
-
...disabled ? {
|
|
26991
|
-
cursor: "cur_not_allowed"
|
|
26992
|
-
} : {}
|
|
26993
|
-
};
|
|
26994
|
-
}
|
|
26995
|
-
|
|
26996
27034
|
// src/components/ScrollShadows.tsx
|
|
26997
27035
|
import { useResizeObserver as useResizeObserver11 } from "@react-aria/utils";
|
|
26998
27036
|
import { useCallback as useCallback37, useMemo as useMemo48, useRef as useRef63, useState as useState55 } from "react";
|
|
@@ -27346,7 +27384,7 @@ function useAppNavGroupExpanded(linkGroup) {
|
|
|
27346
27384
|
|
|
27347
27385
|
// src/components/AppNav/AppNavGroup.tsx
|
|
27348
27386
|
import { trussProps as trussProps120, maybeCssVar as maybeCssVar57 } from "@homebound/truss/runtime";
|
|
27349
|
-
import { Fragment as
|
|
27387
|
+
import { Fragment as Fragment44, jsx as jsx205, jsxs as jsxs110 } from "react/jsx-runtime";
|
|
27350
27388
|
var __maybeInc25 = (inc) => {
|
|
27351
27389
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
27352
27390
|
};
|
|
@@ -27357,7 +27395,7 @@ function AppNavGroupView(props) {
|
|
|
27357
27395
|
} = props;
|
|
27358
27396
|
const tid = useTestIds(props, "linkGroup");
|
|
27359
27397
|
if (panelCollapsed) {
|
|
27360
|
-
return /* @__PURE__ */ jsx205(
|
|
27398
|
+
return /* @__PURE__ */ jsx205(Fragment44, { children: appNavLinkGroupLinks(linkGroup).map((link) => /* @__PURE__ */ jsx205(NavLink, { variant: "side", ...link, iconOnly: !!link.icon, ...tid[`link_${camelCase6(link.label)}`] }, link.label)) });
|
|
27361
27399
|
}
|
|
27362
27400
|
return /* @__PURE__ */ jsx205(AppNavGroupDisclosure, { ...props });
|
|
27363
27401
|
}
|
|
@@ -27477,11 +27515,11 @@ function AppNavSectionView(props) {
|
|
|
27477
27515
|
}
|
|
27478
27516
|
|
|
27479
27517
|
// src/components/AppNav/AppNavItems.tsx
|
|
27480
|
-
import { Fragment as
|
|
27518
|
+
import { Fragment as Fragment45, jsx as jsx208 } from "react/jsx-runtime";
|
|
27481
27519
|
function AppNavItems(props) {
|
|
27482
27520
|
const { items, variant = "side", panelCollapsed = false, nested = false } = props;
|
|
27483
27521
|
const tid = useTestIds(props, "appNav");
|
|
27484
|
-
return /* @__PURE__ */ jsx208(
|
|
27522
|
+
return /* @__PURE__ */ jsx208(Fragment45, { children: items.map((item, idx) => {
|
|
27485
27523
|
if (isAppNavLink(item)) {
|
|
27486
27524
|
return /* @__PURE__ */ jsx208(
|
|
27487
27525
|
NavLink,
|
|
@@ -27845,7 +27883,7 @@ function StepIcon({
|
|
|
27845
27883
|
import { useRef as useRef67 } from "react";
|
|
27846
27884
|
import { mergeProps as mergeProps33, useButton as useButton13, useFocusRing as useFocusRing18, useHover as useHover22, VisuallyHidden as VisuallyHidden10 } from "react-aria";
|
|
27847
27885
|
import { trussProps as trussProps124 } from "@homebound/truss/runtime";
|
|
27848
|
-
import { Fragment as
|
|
27886
|
+
import { Fragment as Fragment46, jsx as jsx212, jsxs as jsxs114 } from "react/jsx-runtime";
|
|
27849
27887
|
function StepperTab(props) {
|
|
27850
27888
|
const {
|
|
27851
27889
|
label,
|
|
@@ -27884,7 +27922,7 @@ function StepperTab(props) {
|
|
|
27884
27922
|
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
27885
27923
|
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
27886
27924
|
}), ...tid[defaultTestId(value)], children: [
|
|
27887
|
-
!collapsed && /* @__PURE__ */ jsxs114(
|
|
27925
|
+
!collapsed && /* @__PURE__ */ jsxs114(Fragment46, { children: [
|
|
27888
27926
|
/* @__PURE__ */ jsxs114("span", { className: "dg jic mw0", children: [
|
|
27889
27927
|
/* @__PURE__ */ jsx212("span", { className: "fw6 fz_14px lh_20px vh ga_1_1 oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1 wbba", "aria-hidden": true, children: label }),
|
|
27890
27928
|
/* @__PURE__ */ jsx212("span", { ...trussProps124({
|
|
@@ -28097,7 +28135,7 @@ function isStructuredProps(props) {
|
|
|
28097
28135
|
// src/components/SuperDrawer/SuperDrawerContent.tsx
|
|
28098
28136
|
import { motion as motion6 } from "framer-motion";
|
|
28099
28137
|
import { trussProps as trussProps127, mergeProps as mergeProps34 } from "@homebound/truss/runtime";
|
|
28100
|
-
import { Fragment as
|
|
28138
|
+
import { Fragment as Fragment47, jsx as jsx215, jsxs as jsxs116 } from "react/jsx-runtime";
|
|
28101
28139
|
var SuperDrawerContent = ({
|
|
28102
28140
|
children,
|
|
28103
28141
|
banner,
|
|
@@ -28160,7 +28198,7 @@ var SuperDrawerContent = ({
|
|
|
28160
28198
|
}) }, "content");
|
|
28161
28199
|
}
|
|
28162
28200
|
}
|
|
28163
|
-
return /* @__PURE__ */ jsxs116(
|
|
28201
|
+
return /* @__PURE__ */ jsxs116(Fragment47, { children: [
|
|
28164
28202
|
wrapWithMotionAndMaybeBack(children),
|
|
28165
28203
|
actions && /* @__PURE__ */ jsx215("footer", { ...trussProps127({
|
|
28166
28204
|
borderTopStyle: "bts_solid",
|
|
@@ -28791,7 +28829,7 @@ var BaseFilter = class {
|
|
|
28791
28829
|
};
|
|
28792
28830
|
|
|
28793
28831
|
// src/components/Filters/DateFilter.tsx
|
|
28794
|
-
import { Fragment as
|
|
28832
|
+
import { Fragment as Fragment48, jsx as jsx221, jsxs as jsxs120 } from "react/jsx-runtime";
|
|
28795
28833
|
function dateFilter(props) {
|
|
28796
28834
|
return (key) => new DateFilter(key, props);
|
|
28797
28835
|
}
|
|
@@ -28813,7 +28851,7 @@ var DateFilter = class extends BaseFilter {
|
|
|
28813
28851
|
}
|
|
28814
28852
|
render(value, setValue, tid, inModal, vertical) {
|
|
28815
28853
|
const { label, operations, getOperationValue, getOperationLabel, defaultValue } = this.props;
|
|
28816
|
-
return /* @__PURE__ */ jsxs120(
|
|
28854
|
+
return /* @__PURE__ */ jsxs120(Fragment48, { children: [
|
|
28817
28855
|
vertical && /* @__PURE__ */ jsx221(Label, { label }),
|
|
28818
28856
|
/* @__PURE__ */ jsxs120(CompoundField, { children: [
|
|
28819
28857
|
/* @__PURE__ */ jsx221(
|
|
@@ -28862,7 +28900,7 @@ function isDateFilterValue(value) {
|
|
|
28862
28900
|
}
|
|
28863
28901
|
|
|
28864
28902
|
// src/components/Filters/DateRangeFilter.tsx
|
|
28865
|
-
import { Fragment as
|
|
28903
|
+
import { Fragment as Fragment49, jsx as jsx222, jsxs as jsxs121 } from "react/jsx-runtime";
|
|
28866
28904
|
function dateRangeFilter(props) {
|
|
28867
28905
|
return (key) => new DateRangeFilter(key, props);
|
|
28868
28906
|
}
|
|
@@ -28884,7 +28922,7 @@ var DateRangeFilter = class extends BaseFilter {
|
|
|
28884
28922
|
}
|
|
28885
28923
|
render(value, setValue, tid, inModal, vertical) {
|
|
28886
28924
|
const { label, placeholderText, disabledDays, testFieldLabel, defaultValue } = this.props;
|
|
28887
|
-
return /* @__PURE__ */ jsxs121(
|
|
28925
|
+
return /* @__PURE__ */ jsxs121(Fragment49, { children: [
|
|
28888
28926
|
vertical && /* @__PURE__ */ jsx222(Label, { label }),
|
|
28889
28927
|
/* @__PURE__ */ jsx222(
|
|
28890
28928
|
DateRangeField,
|
|
@@ -28999,7 +29037,7 @@ var MultiFilter = class extends BaseFilter {
|
|
|
28999
29037
|
};
|
|
29000
29038
|
|
|
29001
29039
|
// src/components/Filters/NumberRangeFilter.tsx
|
|
29002
|
-
import { Fragment as
|
|
29040
|
+
import { Fragment as Fragment50, jsx as jsx224, jsxs as jsxs122 } from "react/jsx-runtime";
|
|
29003
29041
|
function numberRangeFilter(props) {
|
|
29004
29042
|
return (key) => new NumberRangeFilter(key, props);
|
|
29005
29043
|
}
|
|
@@ -29016,7 +29054,7 @@ var NumberRangeFilter = class extends BaseFilter {
|
|
|
29016
29054
|
} = this.props;
|
|
29017
29055
|
const min = value?.min ?? void 0;
|
|
29018
29056
|
const max = value?.max ?? void 0;
|
|
29019
|
-
return /* @__PURE__ */ jsxs122(
|
|
29057
|
+
return /* @__PURE__ */ jsxs122(Fragment50, { children: [
|
|
29020
29058
|
vertical && /* @__PURE__ */ jsxs122("div", { ...tid, children: [
|
|
29021
29059
|
/* @__PURE__ */ jsx224(Label, { label }),
|
|
29022
29060
|
/* @__PURE__ */ jsx224("div", { className: "pb1", children: /* @__PURE__ */ jsx224(NumberField, { labelStyle: "inline", clearable: true, label: "Min", value: min, type: numberFieldType, numberFormatOptions, onChange: (minVal) => {
|
|
@@ -29510,7 +29548,7 @@ function useRegisterMobileSubNav(content2) {
|
|
|
29510
29548
|
|
|
29511
29549
|
// src/components/Navbar/NavbarMobileMenu.tsx
|
|
29512
29550
|
import { trussProps as trussProps134, mergeProps as mergeProps38, maybeCssVar as maybeCssVar62 } from "@homebound/truss/runtime";
|
|
29513
|
-
import { Fragment as
|
|
29551
|
+
import { Fragment as Fragment51, jsx as jsx235, jsxs as jsxs124 } from "react/jsx-runtime";
|
|
29514
29552
|
function NavbarMobileMenu(props) {
|
|
29515
29553
|
const {
|
|
29516
29554
|
items
|
|
@@ -29530,7 +29568,7 @@ function NavbarMobileMenu(props) {
|
|
|
29530
29568
|
useEffect37(() => {
|
|
29531
29569
|
close();
|
|
29532
29570
|
}, [pathname, search]);
|
|
29533
|
-
return /* @__PURE__ */ jsxs124(
|
|
29571
|
+
return /* @__PURE__ */ jsxs124(Fragment51, { children: [
|
|
29534
29572
|
/* @__PURE__ */ jsx235(IconButton, { icon: isOpen2 ? "menuClose" : "menu", color: "--b-on-surface-muted" /* OnSurfaceMuted */, label: isOpen2 ? "Close navigation" : "Open navigation", onClick: () => {
|
|
29535
29573
|
if (isOpen2) {
|
|
29536
29574
|
close();
|
|
@@ -29559,7 +29597,7 @@ function NavbarMobileDrawer({
|
|
|
29559
29597
|
top: bannerHeightPx
|
|
29560
29598
|
};
|
|
29561
29599
|
const showSubLevel = mobileSubNav != null && level === "sub";
|
|
29562
|
-
return /* @__PURE__ */ jsxs124(
|
|
29600
|
+
return /* @__PURE__ */ jsxs124(Fragment51, { children: [
|
|
29563
29601
|
/* @__PURE__ */ jsx235(motion7.div, { ...mergeProps38(void 0, overlayTopStyle, {
|
|
29564
29602
|
position: "fixed",
|
|
29565
29603
|
right: "r_0",
|
|
@@ -29880,13 +29918,13 @@ import { mergeProps as mergeProps39, useFocusRing as useFocusRing21, useHover as
|
|
|
29880
29918
|
import { matchPath } from "react-router";
|
|
29881
29919
|
import { Link as Link7, useLocation as useLocation2 } from "react-router-dom";
|
|
29882
29920
|
import { trussProps as trussProps136, maybeCssVar as maybeCssVar63 } from "@homebound/truss/runtime";
|
|
29883
|
-
import { Fragment as
|
|
29921
|
+
import { Fragment as Fragment52, jsx as jsx237, jsxs as jsxs126 } from "react/jsx-runtime";
|
|
29884
29922
|
function TabsWithContent(props) {
|
|
29885
29923
|
const {
|
|
29886
29924
|
omitTopSpacing = false,
|
|
29887
29925
|
...tabProps
|
|
29888
29926
|
} = props;
|
|
29889
|
-
return /* @__PURE__ */ jsxs126(
|
|
29927
|
+
return /* @__PURE__ */ jsxs126(Fragment52, { children: [
|
|
29890
29928
|
/* @__PURE__ */ jsx237(Tabs, { ...tabProps }),
|
|
29891
29929
|
/* @__PURE__ */ jsx237(TabContent, { ...tabProps, omitTopSpacing: omitTopSpacing || hideTabs(props) })
|
|
29892
29930
|
] });
|
|
@@ -30063,7 +30101,7 @@ function TabImpl(props) {
|
|
|
30063
30101
|
}
|
|
30064
30102
|
});
|
|
30065
30103
|
const decoration = aiMode ? /* @__PURE__ */ jsx237(Tag, { text: "Tab has AI proposals ready for review", preventTooltip: true, icon: "aiStar", type: "ai", variant: "primary", iconOnly: true, ...tid.aiTag }) : icon ? /* @__PURE__ */ jsx237(Icon, { icon }) : endAdornment;
|
|
30066
|
-
const tabLabel = /* @__PURE__ */ jsxs126(
|
|
30104
|
+
const tabLabel = /* @__PURE__ */ jsxs126(Fragment52, { children: [
|
|
30067
30105
|
label,
|
|
30068
30106
|
decoration && /* @__PURE__ */ jsx237("span", { className: "ml1 df aic", children: decoration })
|
|
30069
30107
|
] });
|
|
@@ -30435,12 +30473,15 @@ function EnvironmentBannerLayout(props) {
|
|
|
30435
30473
|
import { trussProps as trussProps143, maybeCssVar as maybeCssVar68 } from "@homebound/truss/runtime";
|
|
30436
30474
|
|
|
30437
30475
|
// src/forms/FormSection/FormSection.tsx
|
|
30476
|
+
import { useCheckboxGroup as useCheckboxGroup4, useRadioGroup as useRadioGroup3 } from "react-aria";
|
|
30477
|
+
import { useCheckboxGroupState as useCheckboxGroupState4, useRadioGroupState as useRadioGroupState3 } from "react-stately";
|
|
30438
30478
|
import { trussProps as trussProps141, maybeCssVar as maybeCssVar66 } from "@homebound/truss/runtime";
|
|
30439
30479
|
|
|
30440
30480
|
// src/forms/FormSection/FormSectionChild.tsx
|
|
30441
30481
|
import { useRef as useRef72 } from "react";
|
|
30482
|
+
import { mergeProps as mergeProps43, useCheckboxGroupItem as useCheckboxGroupItem4, useFocusRing as useFocusRing22, useRadio as useRadio3, VisuallyHidden as VisuallyHidden11 } from "react-aria";
|
|
30442
30483
|
import { trussProps as trussProps140 } from "@homebound/truss/runtime";
|
|
30443
|
-
import { jsx as jsx242, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
30484
|
+
import { Fragment as Fragment53, jsx as jsx242, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
30444
30485
|
function FormSectionChild(props) {
|
|
30445
30486
|
const {
|
|
30446
30487
|
title,
|
|
@@ -30448,7 +30489,10 @@ function FormSectionChild(props) {
|
|
|
30448
30489
|
actions,
|
|
30449
30490
|
fields,
|
|
30450
30491
|
orderField,
|
|
30451
|
-
tag
|
|
30492
|
+
tag,
|
|
30493
|
+
value = title,
|
|
30494
|
+
selection,
|
|
30495
|
+
group
|
|
30452
30496
|
} = props;
|
|
30453
30497
|
const tid = useTestIds(props, "formSectionChild");
|
|
30454
30498
|
const itemRef = useRef72(null);
|
|
@@ -30460,6 +30504,7 @@ function FormSectionChild(props) {
|
|
|
30460
30504
|
id: props.id ?? title,
|
|
30461
30505
|
itemRef
|
|
30462
30506
|
});
|
|
30507
|
+
const control = group?.mode === "single" ? /* @__PURE__ */ jsx242(FormSectionChildRadio, { state: group.state, value, label: title, ...tid.radio }) : group?.mode === "multiple" ? /* @__PURE__ */ jsx242(FormSectionChildCheckbox, { state: group.state, value, label: title, ...tid.checkbox }) : selection ? /* @__PURE__ */ jsx242(BoundCheckboxField, { field: selection.field, label: title, checkboxOnly: true, ...tid.checkbox }) : void 0;
|
|
30463
30508
|
return /* @__PURE__ */ jsxs130("div", { ...isDraggable ? {
|
|
30464
30509
|
...dragItemProps,
|
|
30465
30510
|
ref: itemRef
|
|
@@ -30479,10 +30524,73 @@ function FormSectionChild(props) {
|
|
|
30479
30524
|
borderStyle: "lot_bsn",
|
|
30480
30525
|
borderWidth: "lot_bw_0"
|
|
30481
30526
|
}), ...tid, children: [
|
|
30482
|
-
/* @__PURE__ */ jsx242(ContentHeader, { ...tid.header, title, description, actions, level: 4, rightSlotLead: tag && /* @__PURE__ */ jsx242(Tag, { ...tag, ...tid.tag }), startAdornment: isDraggable ? /* @__PURE__ */
|
|
30527
|
+
/* @__PURE__ */ jsx242(ContentHeader, { ...tid.header, title, description, actions, level: 4, rightSlotLead: tag && /* @__PURE__ */ jsx242(Tag, { ...tag, ...tid.tag }), startAdornment: isDraggable || control ? /* @__PURE__ */ jsxs130(Fragment53, { children: [
|
|
30528
|
+
isDraggable && /* @__PURE__ */ jsx242(DnDGridItemHandle, { dragHandleProps, icon: "drag", compact: true }),
|
|
30529
|
+
control
|
|
30530
|
+
] }) : void 0 }),
|
|
30483
30531
|
fields
|
|
30484
30532
|
] });
|
|
30485
30533
|
}
|
|
30534
|
+
function FormSectionChildRadio(props) {
|
|
30535
|
+
const {
|
|
30536
|
+
state,
|
|
30537
|
+
value,
|
|
30538
|
+
label
|
|
30539
|
+
} = props;
|
|
30540
|
+
const ref = useRef72(null);
|
|
30541
|
+
const {
|
|
30542
|
+
inputProps,
|
|
30543
|
+
isDisabled,
|
|
30544
|
+
isSelected
|
|
30545
|
+
} = useRadio3({
|
|
30546
|
+
value,
|
|
30547
|
+
"aria-label": label
|
|
30548
|
+
}, state, ref);
|
|
30549
|
+
const {
|
|
30550
|
+
focusProps,
|
|
30551
|
+
isFocusVisible
|
|
30552
|
+
} = useFocusRing22();
|
|
30553
|
+
const tid = useTestIds(props);
|
|
30554
|
+
return /* @__PURE__ */ jsx242(StyledRadio, { isDisabled, isSelected, isFocusVisible, inputProps: {
|
|
30555
|
+
...mergeProps43(inputProps, focusProps),
|
|
30556
|
+
ref,
|
|
30557
|
+
...tid
|
|
30558
|
+
} });
|
|
30559
|
+
}
|
|
30560
|
+
function FormSectionChildCheckbox(props) {
|
|
30561
|
+
const {
|
|
30562
|
+
state,
|
|
30563
|
+
value,
|
|
30564
|
+
label
|
|
30565
|
+
} = props;
|
|
30566
|
+
const ref = useRef72(null);
|
|
30567
|
+
const {
|
|
30568
|
+
inputProps,
|
|
30569
|
+
isDisabled,
|
|
30570
|
+
isSelected
|
|
30571
|
+
} = useCheckboxGroupItem4({
|
|
30572
|
+
value,
|
|
30573
|
+
"aria-label": label
|
|
30574
|
+
}, state, ref);
|
|
30575
|
+
const {
|
|
30576
|
+
focusProps,
|
|
30577
|
+
isFocusVisible
|
|
30578
|
+
} = useFocusRing22();
|
|
30579
|
+
const tid = useTestIds(props);
|
|
30580
|
+
return (
|
|
30581
|
+
// `StyledCheckbox` is just the visual box, so the label makes clicking it toggle the hidden input
|
|
30582
|
+
/* @__PURE__ */ jsxs130("label", { ...trussProps140({
|
|
30583
|
+
display: "df",
|
|
30584
|
+
cursor: "cur_pointer",
|
|
30585
|
+
...isDisabled ? {
|
|
30586
|
+
cursor: "cur_not_allowed"
|
|
30587
|
+
} : {}
|
|
30588
|
+
}), children: [
|
|
30589
|
+
/* @__PURE__ */ jsx242(VisuallyHidden11, { children: /* @__PURE__ */ jsx242("input", { ref, ...mergeProps43(inputProps, focusProps), ...tid }) }),
|
|
30590
|
+
/* @__PURE__ */ jsx242(StyledCheckbox, { isDisabled, isSelected, isFocusVisible })
|
|
30591
|
+
] })
|
|
30592
|
+
);
|
|
30593
|
+
}
|
|
30486
30594
|
|
|
30487
30595
|
// src/forms/FormSection/FormSection.tsx
|
|
30488
30596
|
import { jsx as jsx243, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
@@ -30492,7 +30600,8 @@ function FormSection(props) {
|
|
|
30492
30600
|
description,
|
|
30493
30601
|
actions,
|
|
30494
30602
|
fields,
|
|
30495
|
-
childSections
|
|
30603
|
+
childSections,
|
|
30604
|
+
selection
|
|
30496
30605
|
} = props;
|
|
30497
30606
|
const tid = useTestIds(props, "formSection");
|
|
30498
30607
|
return /* @__PURE__ */ jsxs131("div", { id: defaultTestId(title), ...trussProps141({
|
|
@@ -30505,15 +30614,94 @@ function FormSection(props) {
|
|
|
30505
30614
|
}), ...tid.section, children: [
|
|
30506
30615
|
/* @__PURE__ */ jsx243(ContentHeader, { ...tid, title, description, actions, level: 3 }),
|
|
30507
30616
|
fields,
|
|
30508
|
-
childSections && (
|
|
30617
|
+
childSections && (selection?.mode === "single" ? /* @__PURE__ */ jsx243(FormSectionRadioGroup, { field: selection.field, label: title, childSections, ...tid }) : selection?.mode === "multiple" ? /* @__PURE__ */ jsx243(FormSectionCheckboxGroup, { field: selection.field, label: title, childSections, ...tid }) : /* @__PURE__ */ jsx243(ChildSectionList, { childSections, ...tid.childSection }))
|
|
30509
30618
|
] });
|
|
30510
30619
|
}
|
|
30620
|
+
function FormSectionRadioGroup(props) {
|
|
30621
|
+
const {
|
|
30622
|
+
field,
|
|
30623
|
+
label,
|
|
30624
|
+
childSections
|
|
30625
|
+
} = props;
|
|
30626
|
+
const tid = useTestIds(props);
|
|
30627
|
+
const {
|
|
30628
|
+
value,
|
|
30629
|
+
readOnly
|
|
30630
|
+
} = useComputed(() => ({
|
|
30631
|
+
value: field.value ?? null,
|
|
30632
|
+
readOnly: field.readOnly
|
|
30633
|
+
}), [field]);
|
|
30634
|
+
const state = useRadioGroupState3({
|
|
30635
|
+
value,
|
|
30636
|
+
onChange: (value2) => {
|
|
30637
|
+
field.set(value2);
|
|
30638
|
+
field.maybeAutoSave();
|
|
30639
|
+
},
|
|
30640
|
+
isDisabled: readOnly
|
|
30641
|
+
});
|
|
30642
|
+
const {
|
|
30643
|
+
radioGroupProps
|
|
30644
|
+
} = useRadioGroup3({
|
|
30645
|
+
"aria-label": label,
|
|
30646
|
+
isDisabled: readOnly,
|
|
30647
|
+
onFocus: () => field.focus(),
|
|
30648
|
+
onBlur: () => field.blur()
|
|
30649
|
+
}, state);
|
|
30650
|
+
return /* @__PURE__ */ jsx243("div", { ...radioGroupProps, ...tid.childGroup, children: /* @__PURE__ */ jsx243(ChildSectionList, { childSections, group: {
|
|
30651
|
+
mode: "single",
|
|
30652
|
+
state
|
|
30653
|
+
}, ...tid.childSection }) });
|
|
30654
|
+
}
|
|
30655
|
+
function FormSectionCheckboxGroup(props) {
|
|
30656
|
+
const {
|
|
30657
|
+
field,
|
|
30658
|
+
label,
|
|
30659
|
+
childSections
|
|
30660
|
+
} = props;
|
|
30661
|
+
const tid = useTestIds(props);
|
|
30662
|
+
const {
|
|
30663
|
+
value,
|
|
30664
|
+
readOnly
|
|
30665
|
+
} = useComputed(() => ({
|
|
30666
|
+
value: field.value ?? [],
|
|
30667
|
+
readOnly: field.readOnly
|
|
30668
|
+
}), [field]);
|
|
30669
|
+
const state = useCheckboxGroupState4({
|
|
30670
|
+
value,
|
|
30671
|
+
onChange: (values) => {
|
|
30672
|
+
field.set(values);
|
|
30673
|
+
field.maybeAutoSave();
|
|
30674
|
+
},
|
|
30675
|
+
isDisabled: readOnly
|
|
30676
|
+
});
|
|
30677
|
+
const {
|
|
30678
|
+
groupProps
|
|
30679
|
+
} = useCheckboxGroup4({
|
|
30680
|
+
"aria-label": label,
|
|
30681
|
+
isDisabled: readOnly,
|
|
30682
|
+
onFocus: () => field.focus(),
|
|
30683
|
+
onBlur: () => field.blur()
|
|
30684
|
+
}, state);
|
|
30685
|
+
return /* @__PURE__ */ jsx243("div", { ...groupProps, ...tid.childGroup, children: /* @__PURE__ */ jsx243(ChildSectionList, { childSections, group: {
|
|
30686
|
+
mode: "multiple",
|
|
30687
|
+
state
|
|
30688
|
+
}, ...tid.childSection }) });
|
|
30689
|
+
}
|
|
30690
|
+
function ChildSectionList(props) {
|
|
30691
|
+
const {
|
|
30692
|
+
childSections,
|
|
30693
|
+
group,
|
|
30694
|
+
...tid
|
|
30695
|
+
} = props;
|
|
30696
|
+
return isReorderable(childSections) ? /* @__PURE__ */ jsx243(DraggableChildren, { childSections, group, ...tid }) : /* @__PURE__ */ jsx243("div", { className: "df fdc g_3", children: childSections.map((child) => /* @__PURE__ */ jsx243(FormSectionChild, { ...child, group, ...tid }, child.id ?? child.title)) });
|
|
30697
|
+
}
|
|
30511
30698
|
function isReorderable(childSections) {
|
|
30512
30699
|
return childSections.length > 0 && childSections.every((c) => !!c.orderField);
|
|
30513
30700
|
}
|
|
30514
30701
|
function DraggableChildren(props) {
|
|
30515
30702
|
const {
|
|
30516
30703
|
childSections,
|
|
30704
|
+
group,
|
|
30517
30705
|
...tid
|
|
30518
30706
|
} = props;
|
|
30519
30707
|
const sorted = sortByOrderField(childSections);
|
|
@@ -30531,7 +30719,7 @@ function DraggableChildren(props) {
|
|
|
30531
30719
|
return /* @__PURE__ */ jsx243(DnDGrid, { onReorder: handleReorder, lockAxis: "y", gridStyles: {
|
|
30532
30720
|
gridTemplateColumns: "gtc_minmax_0_1fr",
|
|
30533
30721
|
gap: "g_3"
|
|
30534
|
-
}, children: sorted.map((child) => /* @__PURE__ */ jsx243(FormSectionChild, { ...child, ...tid }, child.id)) });
|
|
30722
|
+
}, children: sorted.map((child) => /* @__PURE__ */ jsx243(FormSectionChild, { ...child, group, ...tid }, child.id)) });
|
|
30535
30723
|
}
|
|
30536
30724
|
function sortByOrderField(childSections) {
|
|
30537
30725
|
return [...childSections].sort((a, b) => (a.orderField.value ?? 0) - (b.orderField.value ?? 0));
|
|
@@ -30730,7 +30918,7 @@ function PageBanner(props) {
|
|
|
30730
30918
|
|
|
30731
30919
|
// src/layouts/NavbarLayout/NavbarLayout.tsx
|
|
30732
30920
|
import { useMemo as useMemo59, useRef as useRef74 } from "react";
|
|
30733
|
-
import { mergeProps as
|
|
30921
|
+
import { mergeProps as mergeProps44, maybeCssVar as maybeCssVar69 } from "@homebound/truss/runtime";
|
|
30734
30922
|
|
|
30735
30923
|
// src/layouts/useAutoHideOnScroll.ts
|
|
30736
30924
|
import { useLayoutEffect as useLayoutEffect15, useRef as useRef73, useState as useState64 } from "react";
|
|
@@ -30893,18 +31081,18 @@ function NavbarLayout(props) {
|
|
|
30893
31081
|
top: autoHideState === "hidden" ? `calc(${bannerTop} - ${navHeight}px)` : bannerTop
|
|
30894
31082
|
};
|
|
30895
31083
|
const navbarEl = useMemo59(() => /* @__PURE__ */ jsx247(Navbar, { ...navbar }), [navbar]);
|
|
30896
|
-
return /* @__PURE__ */ jsx247(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx247(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsx247(MobileSubNavProvider, { children: /* @__PURE__ */ jsxs133("div", { ...
|
|
31084
|
+
return /* @__PURE__ */ jsx247(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsx247(NavbarLayoutHeightProvider, { value: navbarOffsetPx, children: /* @__PURE__ */ jsx247(MobileSubNavProvider, { children: /* @__PURE__ */ jsxs133("div", { ...mergeProps44(void 0, cssVars, {
|
|
30897
31085
|
display: "df",
|
|
30898
31086
|
flexDirection: "fdc",
|
|
30899
31087
|
width: "wfc",
|
|
30900
31088
|
minWidth: "mw100"
|
|
30901
31089
|
}), ...tid, children: [
|
|
30902
|
-
/* @__PURE__ */ jsx247("div", { ref: spacerRef, ...
|
|
31090
|
+
/* @__PURE__ */ jsx247("div", { ref: spacerRef, ...mergeProps44(void 0, {
|
|
30903
31091
|
height: navHeight
|
|
30904
31092
|
}, {
|
|
30905
31093
|
flexShrink: "fs0",
|
|
30906
31094
|
width: "w100"
|
|
30907
|
-
}), children: /* @__PURE__ */ jsx247("div", { ref: navMetricsRef, ...
|
|
31095
|
+
}), children: /* @__PURE__ */ jsx247("div", { ref: navMetricsRef, ...mergeProps44(void 0, innerStyle, innerCss), ...tid.navbar, children: navbarEl }) }),
|
|
30908
31096
|
/* @__PURE__ */ jsx247("div", { className: "df fdc mh0 mw100 w100", ...tid.body, children })
|
|
30909
31097
|
] }) }) }) });
|
|
30910
31098
|
}
|
|
@@ -30989,7 +31177,7 @@ function BaseHeader(props) {
|
|
|
30989
31177
|
|
|
30990
31178
|
// src/components/Headers/PageHeader.tsx
|
|
30991
31179
|
import { trussProps as trussProps145 } from "@homebound/truss/runtime";
|
|
30992
|
-
import { Fragment as
|
|
31180
|
+
import { Fragment as Fragment54, jsx as jsx249, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
30993
31181
|
function PageHeader2(props) {
|
|
30994
31182
|
const {
|
|
30995
31183
|
tabs,
|
|
@@ -31009,7 +31197,7 @@ function PageHeader2(props) {
|
|
|
31009
31197
|
/* @__PURE__ */ jsx249(AutoSaveIndicator, { hideOnIdle: true }),
|
|
31010
31198
|
rightSlotActions.length > 0 && /* @__PURE__ */ jsx249(HeaderActions, { actions: rightSlotActions, collapseOnSm: true }),
|
|
31011
31199
|
rightSlot
|
|
31012
|
-
] }), bottomSlot: (bottomSlotActions.length > 0 || tabs) && /* @__PURE__ */ jsxs135(
|
|
31200
|
+
] }), bottomSlot: (bottomSlotActions.length > 0 || tabs) && /* @__PURE__ */ jsxs135(Fragment54, { children: [
|
|
31013
31201
|
bottomSlotActions.length > 0 && /* @__PURE__ */ jsx249("div", { ...trussProps145({
|
|
31014
31202
|
...pageContentPaddingX,
|
|
31015
31203
|
...{
|
|
@@ -31085,7 +31273,7 @@ function useBannerAndNavbarHeight() {
|
|
|
31085
31273
|
}
|
|
31086
31274
|
|
|
31087
31275
|
// src/layouts/PageHeaderLayout/PageHeaderLayout.tsx
|
|
31088
|
-
import { mergeProps as
|
|
31276
|
+
import { mergeProps as mergeProps45, maybeCssVar as maybeCssVar71 } from "@homebound/truss/runtime";
|
|
31089
31277
|
import { jsx as jsx252, jsxs as jsxs136 } from "react/jsx-runtime";
|
|
31090
31278
|
var __maybeInc35 = (inc) => {
|
|
31091
31279
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -31140,17 +31328,17 @@ function PageHeaderLayout(props) {
|
|
|
31140
31328
|
top: autoHideState === "hidden" ? `calc(${outerTop} - ${headerHeight}px)` : outerTop
|
|
31141
31329
|
};
|
|
31142
31330
|
const pageHeaderEl = useMemo60(() => /* @__PURE__ */ jsx252(PageHeader2, { ...pageHeader }), [pageHeader]);
|
|
31143
|
-
return /* @__PURE__ */ jsx252(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs136("div", { ...
|
|
31331
|
+
return /* @__PURE__ */ jsx252(DocumentScrollLayoutProvider, { children: /* @__PURE__ */ jsxs136("div", { ...mergeProps45(void 0, style, {
|
|
31144
31332
|
display: "df",
|
|
31145
31333
|
flexDirection: "fdc",
|
|
31146
31334
|
width: "w100"
|
|
31147
31335
|
}), ...tid, children: [
|
|
31148
|
-
/* @__PURE__ */ jsx252("div", { ref: spacerRef, ...
|
|
31336
|
+
/* @__PURE__ */ jsx252("div", { ref: spacerRef, ...mergeProps45(void 0, {
|
|
31149
31337
|
height: headerHeight
|
|
31150
31338
|
}, {
|
|
31151
31339
|
flexShrink: "fs0",
|
|
31152
31340
|
width: "w100"
|
|
31153
|
-
}), children: /* @__PURE__ */ jsx252("div", { ref: headerMetricsRef, ...
|
|
31341
|
+
}), children: /* @__PURE__ */ jsx252("div", { ref: headerMetricsRef, ...mergeProps45(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
31154
31342
|
bannerSlot,
|
|
31155
31343
|
/* @__PURE__ */ jsx252("div", { className: "df fdc fg1 mh0 w100 n_has_data_self_top_spaced_first_child_pt3", ...tid.body, children })
|
|
31156
31344
|
] }) });
|
|
@@ -31327,7 +31515,7 @@ function WorkflowActions(props) {
|
|
|
31327
31515
|
}
|
|
31328
31516
|
|
|
31329
31517
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
31330
|
-
import { trussProps as trussProps148, mergeProps as
|
|
31518
|
+
import { trussProps as trussProps148, mergeProps as mergeProps46, maybeCssVar as maybeCssVar73 } from "@homebound/truss/runtime";
|
|
31331
31519
|
import { jsx as jsx257, jsxs as jsxs138 } from "react/jsx-runtime";
|
|
31332
31520
|
var __maybeInc37 = (inc) => {
|
|
31333
31521
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -31393,12 +31581,12 @@ function WorkflowPageLayout(props) {
|
|
|
31393
31581
|
};
|
|
31394
31582
|
}, [showFooter]);
|
|
31395
31583
|
return /* @__PURE__ */ jsxs138(DocumentScrollLayoutProvider, { children: [
|
|
31396
|
-
/* @__PURE__ */ jsxs138("div", { ...
|
|
31584
|
+
/* @__PURE__ */ jsxs138("div", { ...mergeProps46(void 0, style, {
|
|
31397
31585
|
display: "df",
|
|
31398
31586
|
flexDirection: "fdc",
|
|
31399
31587
|
width: "w100"
|
|
31400
31588
|
}), ...tid, children: [
|
|
31401
|
-
/* @__PURE__ */ jsx257("div", { ...
|
|
31589
|
+
/* @__PURE__ */ jsx257("div", { ...mergeProps46(void 0, {
|
|
31402
31590
|
height: headerHeight
|
|
31403
31591
|
}, {
|
|
31404
31592
|
flexShrink: "fs0",
|
|
@@ -31748,7 +31936,7 @@ function useFilter4({ filterDefs }) {
|
|
|
31748
31936
|
import { useCallback as useCallback49, useRef as useRef79 } from "react";
|
|
31749
31937
|
import { useComboBox as useComboBox3, useOverlayPosition as useOverlayPosition6 } from "react-aria";
|
|
31750
31938
|
import { Item as Item5, useComboBoxState as useComboBoxState3 } from "react-stately";
|
|
31751
|
-
import { Fragment as
|
|
31939
|
+
import { Fragment as Fragment55, jsx as jsx264, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
31752
31940
|
function Autocomplete(props) {
|
|
31753
31941
|
const {
|
|
31754
31942
|
onSelect,
|
|
@@ -31819,7 +32007,7 @@ function Autocomplete(props) {
|
|
|
31819
32007
|
// Ensures the menu never gets too small.
|
|
31820
32008
|
minWidth: 200
|
|
31821
32009
|
};
|
|
31822
|
-
return /* @__PURE__ */ jsxs141(
|
|
32010
|
+
return /* @__PURE__ */ jsxs141(Fragment55, { children: [
|
|
31823
32011
|
/* @__PURE__ */ jsx264(
|
|
31824
32012
|
TextFieldBase,
|
|
31825
32013
|
{
|
|
@@ -31862,7 +32050,7 @@ function Autocomplete(props) {
|
|
|
31862
32050
|
|
|
31863
32051
|
// src/inputs/ToggleButton.tsx
|
|
31864
32052
|
import { useRef as useRef80, useState as useState69 } from "react";
|
|
31865
|
-
import { useFocusRing as
|
|
32053
|
+
import { useFocusRing as useFocusRing23, useHover as useHover26, usePress as usePress3, useSwitch as useSwitch2, VisuallyHidden as VisuallyHidden12 } from "react-aria";
|
|
31866
32054
|
import { useToggleState as useToggleState2 } from "react-stately";
|
|
31867
32055
|
import { trussProps as trussProps151 } from "@homebound/truss/runtime";
|
|
31868
32056
|
import { jsx as jsx265, jsxs as jsxs142 } from "react/jsx-runtime";
|
|
@@ -31911,7 +32099,7 @@ function ToggleButton(props) {
|
|
|
31911
32099
|
const {
|
|
31912
32100
|
isFocusVisible: isFocusVisibleFromEvents,
|
|
31913
32101
|
focusProps
|
|
31914
|
-
} =
|
|
32102
|
+
} = useFocusRing23({
|
|
31915
32103
|
...otherProps,
|
|
31916
32104
|
within: true
|
|
31917
32105
|
});
|
|
@@ -31972,7 +32160,7 @@ function ToggleButton(props) {
|
|
|
31972
32160
|
children: /* @__PURE__ */ jsxs142("label", { ...labelAttrs, children: [
|
|
31973
32161
|
icon && /* @__PURE__ */ jsx265(Icon, { icon }),
|
|
31974
32162
|
label,
|
|
31975
|
-
/* @__PURE__ */ jsx265(
|
|
32163
|
+
/* @__PURE__ */ jsx265(VisuallyHidden12, { children: /* @__PURE__ */ jsx265("input", { ref, ...inputProps, ...tid.value }) })
|
|
31976
32164
|
] })
|
|
31977
32165
|
});
|
|
31978
32166
|
}
|