@homebound/beam 4.14.3 → 4.14.5
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 +1001 -978
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +584 -560
- package/dist/index.js.map +1 -1
- package/dist/truss.css +4 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7139,6 +7139,10 @@ var pageContentPaddingX = {
|
|
|
7139
7139
|
"--mdandup_paddingRight": maybeCssVar11(__maybeInc6(pageContentPaddingXValue))
|
|
7140
7140
|
}]
|
|
7141
7141
|
};
|
|
7142
|
+
var selfTopSpacedAttr = "data-self-top-spaced";
|
|
7143
|
+
var selfTopSpaced = {
|
|
7144
|
+
[selfTopSpacedAttr]: true
|
|
7145
|
+
};
|
|
7142
7146
|
function headerContentPaddingX(compact = false) {
|
|
7143
7147
|
return compact ? {
|
|
7144
7148
|
paddingLeft: "pl1",
|
|
@@ -9760,12 +9764,27 @@ function isGridStyleDef(style) {
|
|
|
9760
9764
|
const defKeys = safeKeys(gridStyleDefKeysRecord);
|
|
9761
9765
|
return keys.length === 0 || keys.some((k) => defKeys.includes(k));
|
|
9762
9766
|
}
|
|
9763
|
-
function resolveStyles(style) {
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
+
function resolveStyles(style, insetHandled = false, inDocumentScrollLayout = false) {
|
|
9768
|
+
const layoutDefaults = getLayoutDefaults(insetHandled, inDocumentScrollLayout);
|
|
9769
|
+
if (isGridStyleDef(style)) return getTableStyles({
|
|
9770
|
+
...layoutDefaults,
|
|
9771
|
+
...style
|
|
9772
|
+
});
|
|
9773
|
+
if (style === defaultStyle) return getTableStyles(layoutDefaults);
|
|
9767
9774
|
return style;
|
|
9768
9775
|
}
|
|
9776
|
+
function getLayoutDefaults(insetHandled, inDocumentScrollLayout) {
|
|
9777
|
+
if (insetHandled) return {
|
|
9778
|
+
allWhite: true,
|
|
9779
|
+
bordered: true,
|
|
9780
|
+
roundedHeader: true
|
|
9781
|
+
};
|
|
9782
|
+
if (inDocumentScrollLayout) return {
|
|
9783
|
+
allWhite: true,
|
|
9784
|
+
roundedHeader: false
|
|
9785
|
+
};
|
|
9786
|
+
return {};
|
|
9787
|
+
}
|
|
9769
9788
|
|
|
9770
9789
|
// src/components/Table/utils/maybeApplyFunction.ts
|
|
9771
9790
|
function maybeApplyFunction(row, maybeFn) {
|
|
@@ -9784,15 +9803,26 @@ function useRenderCount() {
|
|
|
9784
9803
|
return { getCount };
|
|
9785
9804
|
}
|
|
9786
9805
|
|
|
9806
|
+
// src/layouts/ContentInsetContext.tsx
|
|
9807
|
+
import { createContext as createContext6, useContext as useContext11 } from "react";
|
|
9808
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
9809
|
+
var ContentInsetContext = createContext6(false);
|
|
9810
|
+
function ContentInsetProvider({ children }) {
|
|
9811
|
+
return /* @__PURE__ */ jsx26(ContentInsetContext.Provider, { value: true, children });
|
|
9812
|
+
}
|
|
9813
|
+
function useContentInsetHandled() {
|
|
9814
|
+
return useContext11(ContentInsetContext);
|
|
9815
|
+
}
|
|
9816
|
+
|
|
9787
9817
|
// src/components/Table/components/Row.tsx
|
|
9788
9818
|
import { observer as observer2 } from "mobx-react";
|
|
9789
|
-
import React5, { useCallback as useCallback9, useContext as
|
|
9819
|
+
import React5, { useCallback as useCallback9, useContext as useContext14, useRef as useRef12 } from "react";
|
|
9790
9820
|
import { mergeProps as mergeProps6 } from "react-aria";
|
|
9791
9821
|
|
|
9792
9822
|
// src/components/Table/components/cell.tsx
|
|
9793
9823
|
import { Link as Link2 } from "react-router-dom";
|
|
9794
9824
|
import { mergeProps as mergeProps5 } from "@homebound/truss/runtime";
|
|
9795
|
-
import { jsx as
|
|
9825
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
9796
9826
|
function fieldCell(cell) {
|
|
9797
9827
|
if (typeof cell === "object" && cell !== null && "content" in cell) {
|
|
9798
9828
|
return {
|
|
@@ -9807,7 +9837,7 @@ function fieldCell(cell) {
|
|
|
9807
9837
|
}
|
|
9808
9838
|
var defaultRenderFn = (as, colSpan) => (key, css2, content2, row, rowStyle, classNames, onClick, tooltip) => {
|
|
9809
9839
|
const Cell = as === "table" ? "td" : "div";
|
|
9810
|
-
return /* @__PURE__ */
|
|
9840
|
+
return /* @__PURE__ */ jsx27(Cell, { ...mergeProps5(classNames, void 0, {
|
|
9811
9841
|
...css2,
|
|
9812
9842
|
...{
|
|
9813
9843
|
cursor: "cur_default"
|
|
@@ -9818,7 +9848,7 @@ var defaultRenderFn = (as, colSpan) => (key, css2, content2, row, rowStyle, clas
|
|
|
9818
9848
|
};
|
|
9819
9849
|
var headerRenderFn = (column2, as, colSpan) => (key, css2, content2, row, rowStyle, classNames, onClick, tooltip) => {
|
|
9820
9850
|
const Cell = as === "table" ? "th" : "div";
|
|
9821
|
-
return /* @__PURE__ */
|
|
9851
|
+
return /* @__PURE__ */ jsx27(Cell, { ...mergeProps5(classNames, void 0, {
|
|
9822
9852
|
...css2
|
|
9823
9853
|
}), ...as === "table" && {
|
|
9824
9854
|
colSpan
|
|
@@ -9827,15 +9857,15 @@ var headerRenderFn = (column2, as, colSpan) => (key, css2, content2, row, rowSty
|
|
|
9827
9857
|
var rowLinkRenderFn = (as, colSpan) => (key, css2, content2, row, rowStyle, classNames, onClick, tooltip) => {
|
|
9828
9858
|
const to = rowStyle.rowLink(row);
|
|
9829
9859
|
if (as === "table") {
|
|
9830
|
-
return /* @__PURE__ */
|
|
9860
|
+
return /* @__PURE__ */ jsx27("td", { ...mergeProps5(classNames, void 0, {
|
|
9831
9861
|
...css2
|
|
9832
|
-
}), colSpan, children: /* @__PURE__ */
|
|
9862
|
+
}), colSpan, children: /* @__PURE__ */ jsx27(Link2, { to, ...mergeProps5(navLink, void 0, {
|
|
9833
9863
|
textDecoration: "tdn",
|
|
9834
9864
|
color: "c_unset",
|
|
9835
9865
|
display: "db"
|
|
9836
9866
|
}), children: content2 }) }, key);
|
|
9837
9867
|
}
|
|
9838
|
-
return /* @__PURE__ */
|
|
9868
|
+
return /* @__PURE__ */ jsx27(Link2, { to, ...mergeProps5(`${navLink} ${classNames}`, void 0, {
|
|
9839
9869
|
...{
|
|
9840
9870
|
textDecoration: "tdn",
|
|
9841
9871
|
color: "c_unset"
|
|
@@ -9845,7 +9875,7 @@ var rowLinkRenderFn = (as, colSpan) => (key, css2, content2, row, rowStyle, clas
|
|
|
9845
9875
|
};
|
|
9846
9876
|
var rowClickRenderFn = (as, api, colSpan) => (key, css2, content2, row, rowStyle, classNames, onClick, tooltip) => {
|
|
9847
9877
|
const Cell = as === "table" ? "td" : "div";
|
|
9848
|
-
return /* @__PURE__ */
|
|
9878
|
+
return /* @__PURE__ */ jsx27(Cell, { ...mergeProps5(classNames, void 0, {
|
|
9849
9879
|
...css2
|
|
9850
9880
|
}), onClick: (e) => {
|
|
9851
9881
|
rowStyle.onClick(row, api);
|
|
@@ -9856,9 +9886,9 @@ var rowClickRenderFn = (as, api, colSpan) => (key, css2, content2, row, rowStyle
|
|
|
9856
9886
|
};
|
|
9857
9887
|
|
|
9858
9888
|
// src/components/Table/components/ColumnResizeHandle.tsx
|
|
9859
|
-
import { useCallback as useCallback8, useContext as
|
|
9889
|
+
import { useCallback as useCallback8, useContext as useContext12, useEffect as useEffect7, useRef as useRef11, useState as useState9 } from "react";
|
|
9860
9890
|
import { trussProps as trussProps16, maybeCssVar as maybeCssVar14 } from "@homebound/truss/runtime";
|
|
9861
|
-
import { Fragment as Fragment7, jsx as
|
|
9891
|
+
import { Fragment as Fragment7, jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
9862
9892
|
function findScrollableParent(element) {
|
|
9863
9893
|
if (!element) return null;
|
|
9864
9894
|
let parent = element.parentElement;
|
|
@@ -9885,7 +9915,7 @@ function ColumnResizeHandle({
|
|
|
9885
9915
|
}) {
|
|
9886
9916
|
const {
|
|
9887
9917
|
tableContainerRef
|
|
9888
|
-
} =
|
|
9918
|
+
} = useContext12(TableStateContext);
|
|
9889
9919
|
const {
|
|
9890
9920
|
scrollableEl
|
|
9891
9921
|
} = useScrollableParent();
|
|
@@ -10022,7 +10052,7 @@ function ColumnResizeHandle({
|
|
|
10022
10052
|
};
|
|
10023
10053
|
}, []);
|
|
10024
10054
|
return /* @__PURE__ */ jsxs12(Fragment7, { children: [
|
|
10025
|
-
/* @__PURE__ */
|
|
10055
|
+
/* @__PURE__ */ jsx28("div", { ref: handleRef, onMouseDown: handleMouseDown, onMouseEnter: () => setIsHovering(true), onMouseLeave: () => !isDragging && setIsHovering(false), ...trussProps16({
|
|
10026
10056
|
position: "absolute",
|
|
10027
10057
|
top: "top0",
|
|
10028
10058
|
bottom: "bot_0",
|
|
@@ -10037,7 +10067,7 @@ function ColumnResizeHandle({
|
|
|
10037
10067
|
}]
|
|
10038
10068
|
} : {}
|
|
10039
10069
|
}), ...tid.handle, "data-column-id": columnId, "data-column-index": columnIndex }),
|
|
10040
|
-
isDragging && guideLineX !== null && /* @__PURE__ */
|
|
10070
|
+
isDragging && guideLineX !== null && /* @__PURE__ */ jsx28("div", { ...trussProps16({
|
|
10041
10071
|
position: "fixed",
|
|
10042
10072
|
top: ["top_var", {
|
|
10043
10073
|
"--top": `${guideLineTop}px`
|
|
@@ -10062,9 +10092,9 @@ function ColumnResizeHandle({
|
|
|
10062
10092
|
}
|
|
10063
10093
|
|
|
10064
10094
|
// src/components/Table/components/KeptGroupRow.tsx
|
|
10065
|
-
import { useContext as
|
|
10095
|
+
import { useContext as useContext13 } from "react";
|
|
10066
10096
|
import { trussProps as trussProps17, maybeCssVar as maybeCssVar15 } from "@homebound/truss/runtime";
|
|
10067
|
-
import { jsx as
|
|
10097
|
+
import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10068
10098
|
var __maybeInc8 = (inc) => {
|
|
10069
10099
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
10070
10100
|
};
|
|
@@ -10080,9 +10110,9 @@ function KeptGroupRow(props) {
|
|
|
10080
10110
|
const CellTag = as === "table" ? "td" : "div";
|
|
10081
10111
|
const {
|
|
10082
10112
|
tableState
|
|
10083
|
-
} =
|
|
10113
|
+
} = useContext13(TableStateContext);
|
|
10084
10114
|
const numHiddenSelectedRows = useComputed(() => tableState.keptRows.length, [tableState]);
|
|
10085
|
-
return /* @__PURE__ */
|
|
10115
|
+
return /* @__PURE__ */ jsx29(CellTag, { ...trussProps17({
|
|
10086
10116
|
...style.cellCss,
|
|
10087
10117
|
...style.betweenRowsCss,
|
|
10088
10118
|
...isLastBodyRow && style.lastRowCellCss,
|
|
@@ -10098,9 +10128,9 @@ function KeptGroupRow(props) {
|
|
|
10098
10128
|
}), ...as === "table" ? {
|
|
10099
10129
|
colSpan
|
|
10100
10130
|
} : {}, children: /* @__PURE__ */ jsxs13("div", { className: "df aic g_12px", children: [
|
|
10101
|
-
/* @__PURE__ */
|
|
10131
|
+
/* @__PURE__ */ jsx29("div", { className: "w_38px df jcc", children: /* @__PURE__ */ jsx29(CollapseToggle, { row, compact: true }) }),
|
|
10102
10132
|
/* @__PURE__ */ jsxs13("div", { className: "df aic g_1", children: [
|
|
10103
|
-
/* @__PURE__ */
|
|
10133
|
+
/* @__PURE__ */ jsx29(Icon, { icon: "infoCircle", inc: 2 }),
|
|
10104
10134
|
`${numHiddenSelectedRows} selected ${pluralize(numHiddenSelectedRows, "row")} hidden due to filters`
|
|
10105
10135
|
] })
|
|
10106
10136
|
] }) });
|
|
@@ -10109,7 +10139,7 @@ function KeptGroupRow(props) {
|
|
|
10109
10139
|
// src/components/Table/components/Row.tsx
|
|
10110
10140
|
import { useDebouncedCallback as useDebouncedCallback3 } from "use-debounce";
|
|
10111
10141
|
import { trussProps as trussProps18, mergeProps as mergeProps_12, maybeCssVar as maybeCssVar_12 } from "@homebound/truss/runtime";
|
|
10112
|
-
import { Fragment as Fragment8, jsx as
|
|
10142
|
+
import { Fragment as Fragment8, jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10113
10143
|
var __maybeInc9 = (inc) => {
|
|
10114
10144
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
10115
10145
|
};
|
|
@@ -10201,7 +10231,7 @@ function RowImpl(props) {
|
|
|
10201
10231
|
} = props;
|
|
10202
10232
|
const {
|
|
10203
10233
|
tableState
|
|
10204
|
-
} =
|
|
10234
|
+
} = useContext14(TableStateContext);
|
|
10205
10235
|
const {
|
|
10206
10236
|
api,
|
|
10207
10237
|
visibleColumns: columns
|
|
@@ -10282,12 +10312,12 @@ function RowImpl(props) {
|
|
|
10282
10312
|
const ref = useRef12(null);
|
|
10283
10313
|
const dragOverCallback = useCallback9((row2, evt) => onDragOver?.(row2, evt), [onDragOver]);
|
|
10284
10314
|
const onDragOverDebounced = useDebouncedCallback3(dragOverCallback, 100);
|
|
10285
|
-
const RowContent = () => /* @__PURE__ */
|
|
10315
|
+
const RowContent = () => /* @__PURE__ */ jsx30(RowTag, { ...mergeProps_12(`${BorderHoverParent}${showRowHoverColor ? ` ${RowHoverClass}` : ""}`, void 0, rowCss), ...others, "data-gridrow": true, ...getCount(row.id), ref, children: isKeptGroupRow ? /* @__PURE__ */ jsx30(KeptGroupRow, { as, style, columnSizes, row, colSpan: columns.length, isLastBodyRow }) : columns.map((column2, columnIndex) => {
|
|
10286
10316
|
const maybeExpandedColumn = expandColumnHidden ? columns[columnIndex - 1] : column2;
|
|
10287
10317
|
const isExpanded = tableState.isExpandedColumn(maybeExpandedColumn.id);
|
|
10288
10318
|
if (column2.hideOnExpand && isExpanded) {
|
|
10289
10319
|
expandColumnHidden = true;
|
|
10290
|
-
return /* @__PURE__ */
|
|
10320
|
+
return /* @__PURE__ */ jsx30(Fragment8, {});
|
|
10291
10321
|
}
|
|
10292
10322
|
const numExpandedColumns = isExpanded ? tableState.numberOfExpandedChildren(maybeExpandedColumn.id) ? (
|
|
10293
10323
|
// Subtract 1 if the column is hidden on expand, since we're not rendering it.
|
|
@@ -10476,14 +10506,14 @@ function RowImpl(props) {
|
|
|
10476
10506
|
}), {
|
|
10477
10507
|
children: /* @__PURE__ */ jsxs14(Fragment8, { children: [
|
|
10478
10508
|
cellElement.props.children,
|
|
10479
|
-
/* @__PURE__ */
|
|
10509
|
+
/* @__PURE__ */ jsx30(ColumnResizeHandle, { columnId: column2.id, columnIndex, currentWidth: currentWidthPx, minWidth: minWidthPx, onResize: (colId, width2) => setResizedWidth?.(colId, width2, columnIndex), calculatePreviewWidth })
|
|
10480
10510
|
] })
|
|
10481
10511
|
}));
|
|
10482
10512
|
return cellElementWithHandle;
|
|
10483
10513
|
}
|
|
10484
10514
|
return cellElement;
|
|
10485
10515
|
}) });
|
|
10486
|
-
return row.draggable ? /* @__PURE__ */
|
|
10516
|
+
return row.draggable ? /* @__PURE__ */ jsx30(
|
|
10487
10517
|
"div",
|
|
10488
10518
|
{
|
|
10489
10519
|
...trussProps18(containerCss),
|
|
@@ -10495,7 +10525,7 @@ function RowImpl(props) {
|
|
|
10495
10525
|
},
|
|
10496
10526
|
children: RowContent()
|
|
10497
10527
|
}
|
|
10498
|
-
) : /* @__PURE__ */
|
|
10528
|
+
) : /* @__PURE__ */ jsx30(Fragment8, { children: RowContent() });
|
|
10499
10529
|
}
|
|
10500
10530
|
var Row = observer2(RowImpl);
|
|
10501
10531
|
var BorderHoverParent = "beam-bhp";
|
|
@@ -10506,7 +10536,7 @@ var rowHoverBgVar = "--beam-row-hover-bg";
|
|
|
10506
10536
|
// src/components/Table/components/RowGroup.tsx
|
|
10507
10537
|
import { Fragment as Fragment9 } from "react";
|
|
10508
10538
|
import { mergeProps as mergeProps7 } from "@homebound/truss/runtime";
|
|
10509
|
-
import { jsx as
|
|
10539
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
10510
10540
|
function RowGroup(props) {
|
|
10511
10541
|
const {
|
|
10512
10542
|
as,
|
|
@@ -10516,11 +10546,11 @@ function RowGroup(props) {
|
|
|
10516
10546
|
children
|
|
10517
10547
|
} = props;
|
|
10518
10548
|
if (as === "table" && inHead) {
|
|
10519
|
-
return /* @__PURE__ */
|
|
10549
|
+
return /* @__PURE__ */ jsx31(Fragment9, { children });
|
|
10520
10550
|
}
|
|
10521
10551
|
const Tag2 = as === "table" ? "tbody" : "div";
|
|
10522
10552
|
const rowHoverBg = maybeCssVar(style.rowHoverColor !== void 0 && style.rowHoverColor !== "none" ? style.rowHoverColor : "--b-surface-hover" /* SurfaceHover */);
|
|
10523
|
-
return /* @__PURE__ */
|
|
10553
|
+
return /* @__PURE__ */ jsx31(Tag2, { ...mergeProps7(showRowHover ? `${BorderHoverParent} ${RowHoverClass}` : BorderHoverParent, void 0, {
|
|
10524
10554
|
...as === "table" ? tableRowPrintBreakCss : void 0,
|
|
10525
10555
|
...showRowHover && {
|
|
10526
10556
|
style_rowHoverBgVar_rowHoverBg: {
|
|
@@ -10559,7 +10589,7 @@ import { Link as Link3, useNavigate } from "react-router-dom";
|
|
|
10559
10589
|
// src/components/Avatar/Avatar.tsx
|
|
10560
10590
|
import { useState as useState10 } from "react";
|
|
10561
10591
|
import { trussProps as trussProps19 } from "@homebound/truss/runtime";
|
|
10562
|
-
import { jsx as
|
|
10592
|
+
import { jsx as jsx32, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10563
10593
|
var __typography3 = {
|
|
10564
10594
|
xs2: {
|
|
10565
10595
|
fontWeight: "fw4",
|
|
@@ -10641,7 +10671,7 @@ function Avatar({
|
|
|
10641
10671
|
}],
|
|
10642
10672
|
overflow: "oh"
|
|
10643
10673
|
};
|
|
10644
|
-
const img = showFallback ? /* @__PURE__ */
|
|
10674
|
+
const img = showFallback ? /* @__PURE__ */ jsx32("div", { ...trussProps19({
|
|
10645
10675
|
...styles,
|
|
10646
10676
|
...{
|
|
10647
10677
|
...__typography3[sizeToFallbackTypeScale[size]] ?? {},
|
|
@@ -10655,7 +10685,7 @@ function Avatar({
|
|
|
10655
10685
|
alignItems: "aic",
|
|
10656
10686
|
justifyContent: "jcc"
|
|
10657
10687
|
}
|
|
10658
|
-
}), ...tid, children: name ? nameToInitials(name) : /* @__PURE__ */
|
|
10688
|
+
}), ...tid, children: name ? nameToInitials(name) : /* @__PURE__ */ jsx32(Icon, { icon: "userCircle", inc: sizeToIconInc[size] }) }) : /* @__PURE__ */ jsx32("img", { src, alt: name, ...trussProps19({
|
|
10659
10689
|
...styles,
|
|
10660
10690
|
...{
|
|
10661
10691
|
objectFit: "obf_cover"
|
|
@@ -10670,7 +10700,7 @@ function Avatar({
|
|
|
10670
10700
|
} : {}
|
|
10671
10701
|
}), children: [
|
|
10672
10702
|
img,
|
|
10673
|
-
/* @__PURE__ */
|
|
10703
|
+
/* @__PURE__ */ jsx32("span", { ...trussProps19({
|
|
10674
10704
|
...__typography3[sizeToTypeScale[size]] ?? {}
|
|
10675
10705
|
}), children: name })
|
|
10676
10706
|
] }) : maybeTooltip({
|
|
@@ -10709,7 +10739,7 @@ function nameToInitials(name) {
|
|
|
10709
10739
|
|
|
10710
10740
|
// src/components/internal/MenuItem.tsx
|
|
10711
10741
|
import { trussProps as trussProps20, mergeProps as mergeProps8, maybeCssVar as maybeCssVar16 } from "@homebound/truss/runtime";
|
|
10712
|
-
import { Fragment as Fragment10, jsx as
|
|
10742
|
+
import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10713
10743
|
function MenuItemImpl(props) {
|
|
10714
10744
|
const {
|
|
10715
10745
|
item,
|
|
@@ -10764,7 +10794,7 @@ function MenuItemImpl(props) {
|
|
|
10764
10794
|
const isDisabled = Boolean(disabled);
|
|
10765
10795
|
const isSelected = state.selectionManager.selectedKeys.has(label);
|
|
10766
10796
|
const isFocused = state.selectionManager.focusedKey === item.key;
|
|
10767
|
-
return /* @__PURE__ */
|
|
10797
|
+
return /* @__PURE__ */ jsx33(
|
|
10768
10798
|
"li",
|
|
10769
10799
|
{
|
|
10770
10800
|
...menuItemProps,
|
|
@@ -10837,12 +10867,12 @@ function renderMenuItem(menuItem, isSelected, isDisabled, itemTid) {
|
|
|
10837
10867
|
display: "df",
|
|
10838
10868
|
alignItems: "aic"
|
|
10839
10869
|
}), children: [
|
|
10840
|
-
menuItem.ai ? /* @__PURE__ */
|
|
10841
|
-
showDescription && /* @__PURE__ */
|
|
10870
|
+
menuItem.ai ? /* @__PURE__ */ jsx33(AiMenuItem, { label: menuItem.label, isDisabled }) : isIconMenuItem(menuItem) ? /* @__PURE__ */ jsx33(IconMenuItem, { ...menuItem }) : isImageMenuItem(menuItem) ? /* @__PURE__ */ jsx33(ImageMenuItem, { ...menuItem }) : menuItem.label,
|
|
10871
|
+
showDescription && /* @__PURE__ */ jsx33("div", { className: "fw4 fz_10px lh_14px", ...itemTid.description, children: menuItem.description })
|
|
10842
10872
|
] });
|
|
10843
10873
|
return /* @__PURE__ */ jsxs16("div", { className: "df w100 aic jcsb g_2", children: [
|
|
10844
10874
|
maybeWrapInLink(menuItem.onClick, body, isDisabled),
|
|
10845
|
-
isSelected && /* @__PURE__ */
|
|
10875
|
+
isSelected && /* @__PURE__ */ jsx33(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ })
|
|
10846
10876
|
] });
|
|
10847
10877
|
}
|
|
10848
10878
|
function ImageMenuItem(item) {
|
|
@@ -10853,7 +10883,7 @@ function ImageMenuItem(item) {
|
|
|
10853
10883
|
isAvatar = false
|
|
10854
10884
|
} = item;
|
|
10855
10885
|
return /* @__PURE__ */ jsxs16(Fragment10, { children: [
|
|
10856
|
-
/* @__PURE__ */
|
|
10886
|
+
/* @__PURE__ */ jsx33("span", { className: "fs0 mr2", children: isAvatar ? /* @__PURE__ */ jsx33(Avatar, { src, name: label, size: size === 24 ? "sm" : "lg" }) : /* @__PURE__ */ jsx33("img", { width: size, src, className: "br4", alt: label }) }),
|
|
10857
10887
|
label
|
|
10858
10888
|
] });
|
|
10859
10889
|
}
|
|
@@ -10862,8 +10892,8 @@ function AiMenuItem({
|
|
|
10862
10892
|
isDisabled
|
|
10863
10893
|
}) {
|
|
10864
10894
|
return /* @__PURE__ */ jsxs16(Fragment10, { children: [
|
|
10865
|
-
/* @__PURE__ */
|
|
10866
|
-
/* @__PURE__ */
|
|
10895
|
+
/* @__PURE__ */ jsx33("span", { className: "df aic jcc fs0 h_24px w_24px mr2", children: /* @__PURE__ */ jsx33(Icon, { icon: "aiStar" }) }),
|
|
10896
|
+
/* @__PURE__ */ jsx33("span", { ...trussProps20({
|
|
10867
10897
|
...!isDisabled ? {
|
|
10868
10898
|
color: ["color_var", {
|
|
10869
10899
|
"--color": maybeCssVar16("rgba(124, 58, 237, 1)" /* Purple600 */)
|
|
@@ -10878,13 +10908,13 @@ function IconMenuItem(item) {
|
|
|
10878
10908
|
label
|
|
10879
10909
|
} = item;
|
|
10880
10910
|
return /* @__PURE__ */ jsxs16(Fragment10, { children: [
|
|
10881
|
-
/* @__PURE__ */
|
|
10911
|
+
/* @__PURE__ */ jsx33("span", { className: "fs0 mr2", children: /* @__PURE__ */ jsx33(Icon, { icon }) }),
|
|
10882
10912
|
label
|
|
10883
10913
|
] });
|
|
10884
10914
|
}
|
|
10885
10915
|
function maybeWrapInLink(onClick, content2, disabled) {
|
|
10886
10916
|
if (disabled || typeof onClick !== "string") {
|
|
10887
|
-
return /* @__PURE__ */
|
|
10917
|
+
return /* @__PURE__ */ jsx33(Fragment10, { children: content2 });
|
|
10888
10918
|
}
|
|
10889
10919
|
return isAbsoluteUrl(onClick) ? /* @__PURE__ */ jsxs16("a", { href: onClick, target: "_blank", rel: "noopener noreferrer", ...mergeProps8("navLink", void 0, {
|
|
10890
10920
|
display: "df",
|
|
@@ -10893,8 +10923,8 @@ function maybeWrapInLink(onClick, content2, disabled) {
|
|
|
10893
10923
|
width: "w100"
|
|
10894
10924
|
}), children: [
|
|
10895
10925
|
content2,
|
|
10896
|
-
/* @__PURE__ */
|
|
10897
|
-
] }) : /* @__PURE__ */
|
|
10926
|
+
/* @__PURE__ */ jsx33("span", { className: "fs0 ml2", children: /* @__PURE__ */ jsx33(Icon, { icon: "linkExternal" }) })
|
|
10927
|
+
] }) : /* @__PURE__ */ jsx33(Link3, { ...mergeProps8("navLink", void 0, {
|
|
10898
10928
|
display: "df",
|
|
10899
10929
|
alignItems: "aic",
|
|
10900
10930
|
width: "w100"
|
|
@@ -10912,7 +10942,7 @@ function isImageMenuItem(item) {
|
|
|
10912
10942
|
|
|
10913
10943
|
// src/components/internal/MenuSection.tsx
|
|
10914
10944
|
import { trussProps as trussProps21 } from "@homebound/truss/runtime";
|
|
10915
|
-
import { Fragment as Fragment11, jsx as
|
|
10945
|
+
import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
10916
10946
|
function MenuSectionImpl(props) {
|
|
10917
10947
|
const {
|
|
10918
10948
|
section,
|
|
@@ -10931,21 +10961,21 @@ function MenuSectionImpl(props) {
|
|
|
10931
10961
|
const isPersistentSection = section.key !== state.collection.getFirstKey();
|
|
10932
10962
|
const tid = useTestIds(props);
|
|
10933
10963
|
return /* @__PURE__ */ jsxs17(Fragment11, { children: [
|
|
10934
|
-
isPersistentSection && /* @__PURE__ */
|
|
10964
|
+
isPersistentSection && /* @__PURE__ */ jsx34("li", { ...separatorProps, ...trussProps21({
|
|
10935
10965
|
borderTopStyle: "bts_solid",
|
|
10936
10966
|
borderTopWidth: "btw_1px",
|
|
10937
10967
|
borderColor: ["bc_var", {
|
|
10938
10968
|
"--borderColor": "var(--b-surface-separator)"
|
|
10939
10969
|
}]
|
|
10940
10970
|
}) }),
|
|
10941
|
-
/* @__PURE__ */
|
|
10971
|
+
/* @__PURE__ */ jsx34("li", { ...itemProps, ...trussProps21({
|
|
10942
10972
|
color: ["color_var", {
|
|
10943
10973
|
"--color": "var(--b-on-surface)"
|
|
10944
10974
|
}],
|
|
10945
10975
|
...!isPersistentSection ? {
|
|
10946
10976
|
overflow: "oa"
|
|
10947
10977
|
} : {}
|
|
10948
|
-
}), children: /* @__PURE__ */
|
|
10978
|
+
}), children: /* @__PURE__ */ jsx34("ul", { className: "p_0 m_0 listNone", ...groupProps, ...tid[isPersistentSection ? "persistentItems" : "menuItems"], children: [...section.childNodes].map((item) => /* @__PURE__ */ jsx34(MenuItemImpl, { item, state, onClose, ...tid }, item.key)) }) })
|
|
10949
10979
|
] });
|
|
10950
10980
|
}
|
|
10951
10981
|
|
|
@@ -10985,7 +11015,7 @@ import { chain, mergeProps as mergeProps9, useFocusWithin, useHover as useHover5
|
|
|
10985
11015
|
import React6 from "react";
|
|
10986
11016
|
import { VisuallyHidden as VisuallyHidden3 } from "react-aria";
|
|
10987
11017
|
import { trussProps as trussProps22 } from "@homebound/truss/runtime";
|
|
10988
|
-
import { jsx as
|
|
11018
|
+
import { jsx as jsx35, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
10989
11019
|
function LabelComponent(props) {
|
|
10990
11020
|
const {
|
|
10991
11021
|
labelProps,
|
|
@@ -11019,9 +11049,9 @@ function LabelComponent(props) {
|
|
|
11019
11049
|
}), children: [
|
|
11020
11050
|
label,
|
|
11021
11051
|
suffix && ` ${suffix}`,
|
|
11022
|
-
tooltip && /* @__PURE__ */
|
|
11052
|
+
tooltip && /* @__PURE__ */ jsx35("span", { className: "fs0", children: /* @__PURE__ */ jsx35(Icon, { icon: "infoCircle", tooltip, inc: 2, color: "--b-text-label" /* TextLabel */ }) })
|
|
11023
11053
|
] });
|
|
11024
|
-
return hidden ? /* @__PURE__ */
|
|
11054
|
+
return hidden ? /* @__PURE__ */ jsx35(VisuallyHidden3, { children: labelEl }) : labelEl;
|
|
11025
11055
|
}
|
|
11026
11056
|
var Label = React6.memo(LabelComponent);
|
|
11027
11057
|
function InlineLabel({
|
|
@@ -11050,7 +11080,7 @@ function InlineLabel({
|
|
|
11050
11080
|
|
|
11051
11081
|
// src/components/ProposedValue.tsx
|
|
11052
11082
|
import { trussProps as trussProps23 } from "@homebound/truss/runtime";
|
|
11053
|
-
import { Fragment as Fragment12, jsx as
|
|
11083
|
+
import { Fragment as Fragment12, jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
11054
11084
|
function ProposedValue(props) {
|
|
11055
11085
|
const {
|
|
11056
11086
|
original,
|
|
@@ -11059,7 +11089,7 @@ function ProposedValue(props) {
|
|
|
11059
11089
|
const tid = useTestIds(props, "proposedValue");
|
|
11060
11090
|
return /* @__PURE__ */ jsxs19("span", { ...tid, children: [
|
|
11061
11091
|
original && /* @__PURE__ */ jsxs19(Fragment12, { children: [
|
|
11062
|
-
/* @__PURE__ */
|
|
11092
|
+
/* @__PURE__ */ jsx36("span", { ...trussProps23({
|
|
11063
11093
|
textDecoration: "tdlt",
|
|
11064
11094
|
color: ["color_var", {
|
|
11065
11095
|
"--color": "var(--b-on-surface)"
|
|
@@ -11067,7 +11097,7 @@ function ProposedValue(props) {
|
|
|
11067
11097
|
}), ...tid.original, children: original }),
|
|
11068
11098
|
" "
|
|
11069
11099
|
] }),
|
|
11070
|
-
/* @__PURE__ */
|
|
11100
|
+
/* @__PURE__ */ jsx36("span", { ...trussProps23({
|
|
11071
11101
|
fontWeight: "fw6",
|
|
11072
11102
|
color: ["color_var", {
|
|
11073
11103
|
"--color": "var(--b-ai-field-fg)"
|
|
@@ -11103,7 +11133,7 @@ function getFieldWidth(fullWidth) {
|
|
|
11103
11133
|
|
|
11104
11134
|
// src/inputs/TextFieldBase.tsx
|
|
11105
11135
|
import { trussProps as trussProps24, mergeProps as mergeProps_13, maybeCssVar as maybeCssVar17 } from "@homebound/truss/runtime";
|
|
11106
|
-
import { Fragment as Fragment13, jsx as
|
|
11136
|
+
import { Fragment as Fragment13, jsx as jsx37, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
11107
11137
|
var __maybeInc10 = (inc) => {
|
|
11108
11138
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
11109
11139
|
};
|
|
@@ -11507,7 +11537,7 @@ function TextFieldBase(props) {
|
|
|
11507
11537
|
};
|
|
11508
11538
|
return /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11509
11539
|
/* @__PURE__ */ jsxs20("div", { ...trussProps24(fieldStyles.container), ...groupProps, ...focusWithinProps, children: [
|
|
11510
|
-
label && labelStyle !== "inline" && /* @__PURE__ */
|
|
11540
|
+
label && labelStyle !== "inline" && /* @__PURE__ */ jsx37(Label, { labelProps, hidden: labelStyle === "hidden" || compound, label, inline: labelStyle !== "above", suffix: labelSuffix, ...tid.label }),
|
|
11511
11541
|
maybeTooltip({
|
|
11512
11542
|
title: tooltip,
|
|
11513
11543
|
placement: "top",
|
|
@@ -11527,14 +11557,14 @@ function TextFieldBase(props) {
|
|
|
11527
11557
|
},
|
|
11528
11558
|
...xss
|
|
11529
11559
|
}), "data-readonly": "true", "data-ai-mode": showProposal ? "true" : void 0, ...tid, children: [
|
|
11530
|
-
labelStyle === "inline" && label && /* @__PURE__ */
|
|
11560
|
+
labelStyle === "inline" && label && /* @__PURE__ */ jsx37(InlineLabel, { multiline, labelProps, label, ...tid.label }),
|
|
11531
11561
|
showProposal ? (
|
|
11532
11562
|
// Read-only renders no input at all, so both halves are drawn as text here. Checked
|
|
11533
11563
|
// before `multiline` so a read-only TextAreaField still shows the struck-through original.
|
|
11534
|
-
/* @__PURE__ */
|
|
11535
|
-
) : multiline ? inputProps.value?.split("\n\n").map((p, i) => /* @__PURE__ */
|
|
11564
|
+
/* @__PURE__ */ jsx37(ProposedValue, { original: showOriginal ? originalValue : void 0, proposed: proposedValue, ...tid.proposedValue })
|
|
11565
|
+
) : multiline ? inputProps.value?.split("\n\n").map((p, i) => /* @__PURE__ */ jsx37("p", { className: "pt1 pb1", children: p.split("\n").map((sentence, j) => /* @__PURE__ */ jsxs20("span", { children: [
|
|
11536
11566
|
sentence,
|
|
11537
|
-
/* @__PURE__ */
|
|
11567
|
+
/* @__PURE__ */ jsx37("br", {})
|
|
11538
11568
|
] }, j)) }, i)) : inputProps.value
|
|
11539
11569
|
] }) : /* @__PURE__ */ jsxs20(
|
|
11540
11570
|
"div",
|
|
@@ -11560,9 +11590,9 @@ function TextFieldBase(props) {
|
|
|
11560
11590
|
ref: inputWrapRef,
|
|
11561
11591
|
onClick: unfocusedPlaceholder ? handleUnfocusedPlaceholderClick : void 0,
|
|
11562
11592
|
children: [
|
|
11563
|
-
labelStyle === "inline" && label && /* @__PURE__ */
|
|
11564
|
-
startAdornment && /* @__PURE__ */
|
|
11565
|
-
unfocusedPlaceholder && /* @__PURE__ */
|
|
11593
|
+
labelStyle === "inline" && label && /* @__PURE__ */ jsx37(InlineLabel, { multiline, labelProps, label, ...tid.label }),
|
|
11594
|
+
startAdornment && /* @__PURE__ */ jsx37("span", { className: "df aic asc fs0 br4 pr1", children: startAdornment }),
|
|
11595
|
+
unfocusedPlaceholder && /* @__PURE__ */ jsx37(
|
|
11566
11596
|
"div",
|
|
11567
11597
|
{
|
|
11568
11598
|
tabIndex: -1,
|
|
@@ -11599,32 +11629,32 @@ function TextFieldBase(props) {
|
|
|
11599
11629
|
children: unfocusedPlaceholder
|
|
11600
11630
|
}
|
|
11601
11631
|
),
|
|
11602
|
-
multiline ? /* @__PURE__ */
|
|
11603
|
-
isFocused && clearable && onChange && inputProps.value && /* @__PURE__ */
|
|
11632
|
+
multiline ? /* @__PURE__ */ jsx37("textarea", { ...fieldElementProps, ...errorMessageProps, ref: fieldRef, rows: 1, ...trussProps24(fieldElementCss), ...tid }) : /* @__PURE__ */ jsx37("input", { ...fieldElementProps, ...errorMessageProps, ref: fieldRef, ...trussProps24(fieldElementCss), ...tid }),
|
|
11633
|
+
isFocused && clearable && onChange && inputProps.value && /* @__PURE__ */ jsx37(IconButton, { icon: "xCircle", color: "--b-on-surface-muted" /* OnSurfaceMuted */, onClick: () => {
|
|
11604
11634
|
maybeCall(onUserEdit);
|
|
11605
11635
|
onChange(void 0);
|
|
11606
11636
|
fieldRef.current?.focus();
|
|
11607
11637
|
} }),
|
|
11608
|
-
errorInTooltip && errorMsg && !hideErrorMessage && /* @__PURE__ */
|
|
11609
|
-
endAdornment && /* @__PURE__ */
|
|
11638
|
+
errorInTooltip && errorMsg && !hideErrorMessage && /* @__PURE__ */ jsx37("span", { className: "df aic asc pl1 fs0", children: /* @__PURE__ */ jsx37(Icon, { icon: "error", color: "--b-danger" /* Danger */, tooltip: errorMsg }) }),
|
|
11639
|
+
endAdornment && /* @__PURE__ */ jsx37("span", { className: "df aic asc pl1 fs0", children: endAdornment })
|
|
11610
11640
|
]
|
|
11611
11641
|
}
|
|
11612
11642
|
)
|
|
11613
11643
|
}),
|
|
11614
11644
|
labelStyle !== "left" && /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11615
|
-
originalBelow && /* @__PURE__ */
|
|
11645
|
+
originalBelow && /* @__PURE__ */ jsx37(OriginalValue, { originalValue: originalBelow, ...tid.originalValue }),
|
|
11616
11646
|
showErrorAndHelper && /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11617
|
-
errorMsg && !errorInTooltip && /* @__PURE__ */
|
|
11618
|
-
helperText && /* @__PURE__ */
|
|
11647
|
+
errorMsg && !errorInTooltip && /* @__PURE__ */ jsx37(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
|
|
11648
|
+
helperText && /* @__PURE__ */ jsx37(HelperText, { helperText, ...tid.helperText })
|
|
11619
11649
|
] })
|
|
11620
11650
|
] })
|
|
11621
11651
|
] }),
|
|
11622
11652
|
labelStyle === "left" && (originalBelow || alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly && (errorMsg && !errorInTooltip || helperText)) && // Reduces the margin between the error/helper text and input field
|
|
11623
11653
|
/* @__PURE__ */ jsxs20("div", { className: "mt_neg8px ml_50", children: [
|
|
11624
|
-
originalBelow && /* @__PURE__ */
|
|
11654
|
+
originalBelow && /* @__PURE__ */ jsx37(OriginalValue, { originalValue: originalBelow, ...tid.originalValue }),
|
|
11625
11655
|
showErrorAndHelper && /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11626
|
-
errorMsg && !errorInTooltip && /* @__PURE__ */
|
|
11627
|
-
helperText && /* @__PURE__ */
|
|
11656
|
+
errorMsg && !errorInTooltip && /* @__PURE__ */ jsx37(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
|
|
11657
|
+
helperText && /* @__PURE__ */ jsx37(HelperText, { helperText, ...tid.helperText })
|
|
11628
11658
|
] })
|
|
11629
11659
|
] })
|
|
11630
11660
|
] });
|
|
@@ -11634,7 +11664,7 @@ function OriginalValue(props) {
|
|
|
11634
11664
|
originalValue,
|
|
11635
11665
|
...others
|
|
11636
11666
|
} = props;
|
|
11637
|
-
return /* @__PURE__ */
|
|
11667
|
+
return /* @__PURE__ */ jsx37("div", { ...trussProps24({
|
|
11638
11668
|
color: ["color_var", {
|
|
11639
11669
|
"--color": "var(--b-text-helper)"
|
|
11640
11670
|
}],
|
|
@@ -11663,20 +11693,20 @@ var textFieldBasePadding = increment(1);
|
|
|
11663
11693
|
var textFieldBaseMultilineTopPadding = 11;
|
|
11664
11694
|
|
|
11665
11695
|
// src/inputs/internal/MenuSearchField.tsx
|
|
11666
|
-
import { jsx as
|
|
11696
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
11667
11697
|
function MenuSearchField(props) {
|
|
11668
11698
|
const { value, proposedValue } = props;
|
|
11669
11699
|
const { effectiveValue, proposalProps } = useAiProposal(value, proposedValue);
|
|
11670
11700
|
const tid = useTestIds(props);
|
|
11671
11701
|
const inputRef = useRef15(null);
|
|
11672
11702
|
const { labelProps, inputProps } = useTextField({ ...props, value: effectiveValue }, inputRef);
|
|
11673
|
-
return /* @__PURE__ */
|
|
11703
|
+
return /* @__PURE__ */ jsx38(
|
|
11674
11704
|
TextFieldBase,
|
|
11675
11705
|
{
|
|
11676
11706
|
label: "",
|
|
11677
11707
|
labelProps,
|
|
11678
11708
|
inputProps,
|
|
11679
|
-
startAdornment: /* @__PURE__ */
|
|
11709
|
+
startAdornment: /* @__PURE__ */ jsx38(Icon, { icon: "search" }),
|
|
11680
11710
|
...proposalProps,
|
|
11681
11711
|
...tid.search
|
|
11682
11712
|
}
|
|
@@ -11685,7 +11715,7 @@ function MenuSearchField(props) {
|
|
|
11685
11715
|
|
|
11686
11716
|
// src/components/internal/Menu.tsx
|
|
11687
11717
|
import { trussProps as trussProps25 } from "@homebound/truss/runtime";
|
|
11688
|
-
import { jsx as
|
|
11718
|
+
import { jsx as jsx39, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
11689
11719
|
function Menu(props) {
|
|
11690
11720
|
const {
|
|
11691
11721
|
ariaMenuProps,
|
|
@@ -11742,7 +11772,7 @@ function Menu(props) {
|
|
|
11742
11772
|
const menuChildren = useMemo8(() => {
|
|
11743
11773
|
return filteredTree.items.map(({
|
|
11744
11774
|
value: s
|
|
11745
|
-
}) => /* @__PURE__ */
|
|
11775
|
+
}) => /* @__PURE__ */ jsx39(Section, { title: s.label, items: s.items, children: (item) => /* @__PURE__ */ jsx39(Item, { children: item.label }, item.label.replace(/"/g, "")) }, s.label.replace(/"/g, "")));
|
|
11746
11776
|
}, [filteredTree]);
|
|
11747
11777
|
const state = useTreeState({
|
|
11748
11778
|
children: menuChildren,
|
|
@@ -11766,7 +11796,7 @@ function Menu(props) {
|
|
|
11766
11796
|
label: "items",
|
|
11767
11797
|
items
|
|
11768
11798
|
}), [items]);
|
|
11769
|
-
return /* @__PURE__ */
|
|
11799
|
+
return /* @__PURE__ */ jsx39(FocusScope, { children: /* @__PURE__ */ jsxs21(
|
|
11770
11800
|
"div",
|
|
11771
11801
|
{
|
|
11772
11802
|
...trussProps25({
|
|
@@ -11784,7 +11814,7 @@ function Menu(props) {
|
|
|
11784
11814
|
overflow: "h_oa"
|
|
11785
11815
|
}),
|
|
11786
11816
|
children: [
|
|
11787
|
-
header && /* @__PURE__ */
|
|
11817
|
+
header && /* @__PURE__ */ jsx39("div", { ...trussProps25({
|
|
11788
11818
|
paddingLeft: "pl2",
|
|
11789
11819
|
paddingRight: "pr2",
|
|
11790
11820
|
paddingTop: "pt_12px",
|
|
@@ -11796,8 +11826,8 @@ function Menu(props) {
|
|
|
11796
11826
|
}],
|
|
11797
11827
|
minWidth: "mw_240px"
|
|
11798
11828
|
}), ...tid.header, children: header }),
|
|
11799
|
-
searchable && /* @__PURE__ */
|
|
11800
|
-
/* @__PURE__ */
|
|
11829
|
+
searchable && /* @__PURE__ */ jsx39(MenuSearchField, { label: "", value: search, placeholder: "Search...", labelStyle: "inline", onChange: setSearch, ...tid }),
|
|
11830
|
+
/* @__PURE__ */ jsx39("ul", { className: "p_0 m_0 listNone ol_0", ...menuProps, ref: menuRef, ...tid.menu, children: [...state.collection].map((item) => /* @__PURE__ */ jsx39(MenuSectionImpl, { section: item, state, onClose, ...tid }, item.key)) })
|
|
11801
11831
|
]
|
|
11802
11832
|
}
|
|
11803
11833
|
) });
|
|
@@ -11811,7 +11841,7 @@ import { useOverlayPosition } from "react-aria";
|
|
|
11811
11841
|
import { useMemo as useMemo9 } from "react";
|
|
11812
11842
|
import { useButton as useButton2, useFocusRing as useFocusRing3, useHover as useHover6 } from "react-aria";
|
|
11813
11843
|
import { trussProps as trussProps26, mergeProps as mergeProps10 } from "@homebound/truss/runtime";
|
|
11814
|
-
import { Fragment as Fragment14, jsx as
|
|
11844
|
+
import { Fragment as Fragment14, jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
11815
11845
|
function AvatarButton(props) {
|
|
11816
11846
|
const {
|
|
11817
11847
|
onClick: onPress,
|
|
@@ -11870,8 +11900,8 @@ function AvatarButton(props) {
|
|
|
11870
11900
|
...mergeProps10(typeof onPress === "string" ? navLink : void 0, void 0, styles)
|
|
11871
11901
|
};
|
|
11872
11902
|
const content2 = /* @__PURE__ */ jsxs22(Fragment14, { children: [
|
|
11873
|
-
/* @__PURE__ */
|
|
11874
|
-
isPressed && /* @__PURE__ */
|
|
11903
|
+
/* @__PURE__ */ jsx40(Avatar, { ...avatarProps, ...tid, preventTooltip: true }),
|
|
11904
|
+
isPressed && /* @__PURE__ */ jsx40("span", { ...trussProps26(pressedOverlayCss) })
|
|
11875
11905
|
] });
|
|
11876
11906
|
return maybeTooltip({
|
|
11877
11907
|
title: resolveTooltip(disabled, tooltip ?? (preventTooltip ? void 0 : avatarProps.name)),
|
|
@@ -11913,7 +11943,7 @@ var pressedOverlayCss = {
|
|
|
11913
11943
|
import { useMemo as useMemo10, useState as useState14 } from "react";
|
|
11914
11944
|
import { useButton as useButton3, useFocusRing as useFocusRing4, useHover as useHover7 } from "react-aria";
|
|
11915
11945
|
import { mergeProps as mergeProps11, maybeCssVar as maybeCssVar18 } from "@homebound/truss/runtime";
|
|
11916
|
-
import { Fragment as Fragment15, jsx as
|
|
11946
|
+
import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
11917
11947
|
function Button(props) {
|
|
11918
11948
|
const {
|
|
11919
11949
|
onClick: onPress,
|
|
@@ -11980,9 +12010,9 @@ function Button(props) {
|
|
|
11980
12010
|
focusStyles: focusStyles2
|
|
11981
12011
|
} = useMemo10(() => getButtonStyles(variant, size, colorScheme), [variant, size, colorScheme]);
|
|
11982
12012
|
const buttonContent = /* @__PURE__ */ jsxs23(Fragment15, { children: [
|
|
11983
|
-
icon && /* @__PURE__ */
|
|
12013
|
+
icon && /* @__PURE__ */ jsx41(Icon, { xss: iconStyles[size], icon }),
|
|
11984
12014
|
labelInFlight && asyncInProgress ? labelInFlight : label,
|
|
11985
|
-
(endAdornment || asyncInProgress) && /* @__PURE__ */
|
|
12015
|
+
(endAdornment || asyncInProgress) && /* @__PURE__ */ jsx41("span", { className: "ml1", children: asyncInProgress ? /* @__PURE__ */ jsx41(Loader, { size: "xs" }) : endAdornment })
|
|
11986
12016
|
] });
|
|
11987
12017
|
const buttonAttrs = {
|
|
11988
12018
|
ref,
|
|
@@ -12499,7 +12529,7 @@ var iconStyles = {
|
|
|
12499
12529
|
// src/components/internal/Popover.tsx
|
|
12500
12530
|
import "react";
|
|
12501
12531
|
import { DismissButton, OverlayContainer, useOverlay } from "react-aria";
|
|
12502
|
-
import { jsx as
|
|
12532
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
12503
12533
|
function Popover(props) {
|
|
12504
12534
|
const { triggerRef, popoverRef, positionProps, children, onClose, isOpen: isOpen2, ...others } = props;
|
|
12505
12535
|
const contrastScopeActive = useContrastScope();
|
|
@@ -12518,7 +12548,7 @@ function Popover(props) {
|
|
|
12518
12548
|
},
|
|
12519
12549
|
popoverRef
|
|
12520
12550
|
);
|
|
12521
|
-
return /* @__PURE__ */
|
|
12551
|
+
return /* @__PURE__ */ jsx42(OverlayContainer, { children: /* @__PURE__ */ jsxs24(
|
|
12522
12552
|
"div",
|
|
12523
12553
|
{
|
|
12524
12554
|
...{ ...overlayProps, ...positionProps },
|
|
@@ -12526,7 +12556,7 @@ function Popover(props) {
|
|
|
12526
12556
|
"data-theme": contrastScopeActive ? contrastDataTheme : void 0,
|
|
12527
12557
|
children: [
|
|
12528
12558
|
children,
|
|
12529
|
-
/* @__PURE__ */
|
|
12559
|
+
/* @__PURE__ */ jsx42(DismissButton, { onDismiss: () => onClose() })
|
|
12530
12560
|
]
|
|
12531
12561
|
}
|
|
12532
12562
|
) });
|
|
@@ -12536,7 +12566,7 @@ function Popover(props) {
|
|
|
12536
12566
|
import { useMemo as useMemo11 } from "react";
|
|
12537
12567
|
import { mergeProps as mergeProps12, useButton as useButton4, useFocusRing as useFocusRing5, useHover as useHover8, VisuallyHidden as VisuallyHidden4 } from "react-aria";
|
|
12538
12568
|
import { trussProps as trussProps27 } from "@homebound/truss/runtime";
|
|
12539
|
-
import { Fragment as Fragment16, jsx as
|
|
12569
|
+
import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
12540
12570
|
function NavLink(props) {
|
|
12541
12571
|
const {
|
|
12542
12572
|
disabled: isDisabled,
|
|
@@ -12555,7 +12585,7 @@ function NavLink(props) {
|
|
|
12555
12585
|
} = props;
|
|
12556
12586
|
const asLink = typeof onClick === "string";
|
|
12557
12587
|
const isIconOnly = !!iconOnly && !!icon;
|
|
12558
|
-
const labelContent = isIconOnly ? /* @__PURE__ */
|
|
12588
|
+
const labelContent = isIconOnly ? /* @__PURE__ */ jsx43(VisuallyHidden4, { children: label }) : label;
|
|
12559
12589
|
const ariaProps = {
|
|
12560
12590
|
children: labelContent,
|
|
12561
12591
|
isDisabled,
|
|
@@ -12619,7 +12649,7 @@ function NavLink(props) {
|
|
|
12619
12649
|
};
|
|
12620
12650
|
const linkContent = /* @__PURE__ */ jsxs25(Fragment16, { children: [
|
|
12621
12651
|
labelContent,
|
|
12622
|
-
icon && /* @__PURE__ */
|
|
12652
|
+
icon && /* @__PURE__ */ jsx43("span", { className: "fs0", children: /* @__PURE__ */ jsx43(Icon, { icon }) })
|
|
12623
12653
|
] });
|
|
12624
12654
|
return getButtonOrLink(linkContent, onClick, mergeProps12(buttonProps, focusProps, hoverProps, linkAttributes, {
|
|
12625
12655
|
className: navLink
|
|
@@ -12757,7 +12787,7 @@ var navLinkVariantStyles = {
|
|
|
12757
12787
|
};
|
|
12758
12788
|
|
|
12759
12789
|
// src/components/internal/OverlayTrigger.tsx
|
|
12760
|
-
import { jsx as
|
|
12790
|
+
import { jsx as jsx44, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
12761
12791
|
function OverlayTrigger(props) {
|
|
12762
12792
|
const {
|
|
12763
12793
|
trigger,
|
|
@@ -12805,8 +12835,8 @@ function OverlayTrigger(props) {
|
|
|
12805
12835
|
return (
|
|
12806
12836
|
// Add `line-height: 0` to prevent the Icon button and Avatar buttons from inheriting the line-height, causing them to be taller than they should.
|
|
12807
12837
|
/* @__PURE__ */ jsxs26("div", { className: "dib lh_0", children: [
|
|
12808
|
-
isTextButton(trigger) ? /* @__PURE__ */
|
|
12809
|
-
state.isOpen && /* @__PURE__ */
|
|
12838
|
+
isTextButton(trigger) ? /* @__PURE__ */ jsx44(Button, { variant: variant ? variant : "secondary", ...trigger, menuTriggerProps: wrappedMenuTriggerProps, buttonRef, endAdornment: !hideEndAdornment ? /* @__PURE__ */ jsx44(Icon, { icon: state.isOpen ? "chevronUp" : "chevronDown" }) : null, disabled, tooltip, onClick: wrappedMenuTriggerProps.onPress ?? noop, forceFocusStyles: showActiveBorder && state.isOpen, ...tid }) : isNavLinkButton(trigger) ? /* @__PURE__ */ jsx44(NavLink, { active: trigger.active, variant: trigger.variant, icon: trigger.icon, label: trigger.navLabel, disabled: !!disabled, menuTriggerProps: wrappedMenuTriggerProps, buttonRef, ...tid }) : isIconButton(trigger) ? /* @__PURE__ */ jsx44(IconButton, { ...trigger, menuTriggerProps: wrappedMenuTriggerProps, buttonRef, ...tid, disabled, tooltip, onClick: wrappedMenuTriggerProps.onPress ?? noop, forceFocusStyles: showActiveBorder && state.isOpen }) : /* @__PURE__ */ jsx44(AvatarButton, { ...trigger, menuTriggerProps: wrappedMenuTriggerProps, buttonRef, ...tid, disabled, tooltip, onClick: wrappedMenuTriggerProps.onPress ?? noop, forceFocusStyles: showActiveBorder && state.isOpen }),
|
|
12839
|
+
state.isOpen && /* @__PURE__ */ jsx44(Popover, { triggerRef: buttonRef, popoverRef, positionProps, onClose: () => state.close(), isOpen: state.isOpen, children })
|
|
12810
12840
|
] })
|
|
12811
12841
|
);
|
|
12812
12842
|
}
|
|
@@ -12824,7 +12854,7 @@ function labelOr(trigger, fallback) {
|
|
|
12824
12854
|
}
|
|
12825
12855
|
|
|
12826
12856
|
// src/components/ButtonMenu.tsx
|
|
12827
|
-
import { jsx as
|
|
12857
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
12828
12858
|
function ButtonMenu(props) {
|
|
12829
12859
|
const { defaultOpen, disabled, items, persistentItems, trigger, searchable, header } = props;
|
|
12830
12860
|
let selectedItem, onChange;
|
|
@@ -12839,7 +12869,7 @@ function ButtonMenu(props) {
|
|
|
12839
12869
|
props,
|
|
12840
12870
|
isTextButton(trigger) ? labelOr(trigger, "buttonMenu") : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name
|
|
12841
12871
|
);
|
|
12842
|
-
return /* @__PURE__ */
|
|
12872
|
+
return /* @__PURE__ */ jsx45(OverlayTrigger, { ...props, menuTriggerProps, state, buttonRef, ...tid, children: /* @__PURE__ */ jsx45(
|
|
12843
12873
|
Menu,
|
|
12844
12874
|
{
|
|
12845
12875
|
ariaMenuProps: menuProps,
|
|
@@ -12862,7 +12892,7 @@ function isSelectionButtonMenuProps(props) {
|
|
|
12862
12892
|
import { useResizeObserver as useResizeObserver3 } from "@react-aria/utils";
|
|
12863
12893
|
import { useRef as useRef19, useState as useState15 } from "react";
|
|
12864
12894
|
import { trussProps as trussProps28 } from "@homebound/truss/runtime";
|
|
12865
|
-
import { jsx as
|
|
12895
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
12866
12896
|
function Tag(props) {
|
|
12867
12897
|
const {
|
|
12868
12898
|
text,
|
|
@@ -12919,13 +12949,13 @@ function Tag(props) {
|
|
|
12919
12949
|
} : {},
|
|
12920
12950
|
...xss
|
|
12921
12951
|
}), children: [
|
|
12922
|
-
icon && /* @__PURE__ */
|
|
12952
|
+
icon && /* @__PURE__ */ jsx46("span", { className: "fs0", children: /* @__PURE__ */ jsx46(Icon, { icon, inc: isAiStar ? 2.5 : 1.75, xss: isAiStar ? {
|
|
12923
12953
|
marginTop: "mt_neg3px",
|
|
12924
12954
|
marginBottom: "mb_neg3px",
|
|
12925
12955
|
marginRight: "mr_neg3px",
|
|
12926
12956
|
marginLeft: "ml_neg3px"
|
|
12927
12957
|
} : {}, color: iconColor }) }),
|
|
12928
|
-
isIconOnly ? /* @__PURE__ */
|
|
12958
|
+
isIconOnly ? /* @__PURE__ */ jsx46("span", { className: "absolute oh cli_inset_50 clp_none bd_0 h_1px m_neg1px w_1px p_0 wsnw o0", children: text }) : /* @__PURE__ */ jsx46("span", { ref, ...trussProps28({
|
|
12929
12959
|
overflow: "oh",
|
|
12930
12960
|
display: "d_negwebkit_box",
|
|
12931
12961
|
WebkitBoxOrient: "wbo_vertical",
|
|
@@ -13043,7 +13073,7 @@ function getPrimaryStyles(type) {
|
|
|
13043
13073
|
|
|
13044
13074
|
// src/components/BaseCard.tsx
|
|
13045
13075
|
import { trussProps as trussProps29, maybeCssVar as maybeCssVar19 } from "@homebound/truss/runtime";
|
|
13046
|
-
import { Fragment as Fragment17, jsx as
|
|
13076
|
+
import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
13047
13077
|
function BaseCard(props) {
|
|
13048
13078
|
const {
|
|
13049
13079
|
imgSrc,
|
|
@@ -13090,16 +13120,16 @@ function BaseCard(props) {
|
|
|
13090
13120
|
}]
|
|
13091
13121
|
}
|
|
13092
13122
|
}), ...tid.hero, children: [
|
|
13093
|
-
/* @__PURE__ */
|
|
13123
|
+
/* @__PURE__ */ jsx47("img", { ...trussProps29({
|
|
13094
13124
|
height: "h100",
|
|
13095
13125
|
width: "w100",
|
|
13096
13126
|
objectFit: ["objectFit_var", {
|
|
13097
13127
|
"--objectFit": maybeCssVar19(imageFit)
|
|
13098
13128
|
}]
|
|
13099
13129
|
}), src: imgSrc, alt: imgAlt, "aria-hidden": imgAlt === "" || void 0, loading: "lazy", ...tid.image }),
|
|
13100
|
-
tag && /* @__PURE__ */
|
|
13130
|
+
tag && /* @__PURE__ */ jsx47("div", { className: "absolute top1 l_1 df", ...tid.tag, children: /* @__PURE__ */ jsx47(Tag, { ...tag }) })
|
|
13101
13131
|
] }),
|
|
13102
|
-
/* @__PURE__ */
|
|
13132
|
+
/* @__PURE__ */ jsx47("div", { ...trussProps29({
|
|
13103
13133
|
display: "df",
|
|
13104
13134
|
flexDirection: "fdc",
|
|
13105
13135
|
flexGrow: "fg1",
|
|
@@ -13156,9 +13186,9 @@ function BaseCard(props) {
|
|
|
13156
13186
|
}]
|
|
13157
13187
|
} : {}
|
|
13158
13188
|
}), ...tid, children: [
|
|
13159
|
-
onClick ? getButtonOrLink(content2, onClick, actionAttrs) : /* @__PURE__ */
|
|
13160
|
-
action && /* @__PURE__ */
|
|
13161
|
-
footer && /* @__PURE__ */
|
|
13189
|
+
onClick ? getButtonOrLink(content2, onClick, actionAttrs) : /* @__PURE__ */ jsx47("div", { ...trussProps29(contentStyles), children: content2 }),
|
|
13190
|
+
action && /* @__PURE__ */ jsx47("div", { className: "absolute top2 r_2", ...tid.heroAction, children: "items" in action ? /* @__PURE__ */ jsx47(ButtonMenu, { ...action }) : /* @__PURE__ */ jsx47(IconButton, { ...action }) }),
|
|
13191
|
+
footer && /* @__PURE__ */ jsx47("div", { ...tid.footer, children: footer })
|
|
13162
13192
|
] });
|
|
13163
13193
|
}
|
|
13164
13194
|
var heroHeight = 184;
|
|
@@ -13184,7 +13214,7 @@ var contentStyles = {
|
|
|
13184
13214
|
// src/components/CardBody.tsx
|
|
13185
13215
|
import { useMemo as useMemo13 } from "react";
|
|
13186
13216
|
import { trussProps as trussProps30, maybeCssVar as maybeCssVar20 } from "@homebound/truss/runtime";
|
|
13187
|
-
import { jsx as
|
|
13217
|
+
import { jsx as jsx48, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
13188
13218
|
var __maybeInc11 = (inc) => {
|
|
13189
13219
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
13190
13220
|
};
|
|
@@ -13218,11 +13248,11 @@ function CardBody(props) {
|
|
|
13218
13248
|
"--color": "var(--b-on-surface)"
|
|
13219
13249
|
}]
|
|
13220
13250
|
}), ...tid.eyebrow, children: [
|
|
13221
|
-
/* @__PURE__ */
|
|
13222
|
-
rightEyebrow && /* @__PURE__ */
|
|
13251
|
+
/* @__PURE__ */ jsx48("span", { className: "wsnw oh to_ellipsis", ...tid.leftEyebrow, children: renderMaybeProposed(leftEyebrow, tid.leftEyebrowProposal) }),
|
|
13252
|
+
rightEyebrow && /* @__PURE__ */ jsx48("span", { className: "fs0", ...tid.rightEyebrow, children: renderMaybeProposed(rightEyebrow, tid.rightEyebrowProposal) })
|
|
13223
13253
|
] }),
|
|
13224
13254
|
/* @__PURE__ */ jsxs29("div", { className: "dif w100 jcsb aic", children: [
|
|
13225
|
-
/* @__PURE__ */
|
|
13255
|
+
/* @__PURE__ */ jsx48("h4", { ...trussProps30({
|
|
13226
13256
|
fontWeight: "fw6",
|
|
13227
13257
|
fontSize: "fz_20px",
|
|
13228
13258
|
lineHeight: "lh_28px",
|
|
@@ -13236,37 +13266,37 @@ function CardBody(props) {
|
|
|
13236
13266
|
}]
|
|
13237
13267
|
}), ...tid.title, children: renderMaybeProposed(title, tid.titleProposal) }),
|
|
13238
13268
|
(badge || badgeTags?.length) && /* @__PURE__ */ jsxs29("div", { className: "dif aic g_1 fs0", ...tid.badge, children: [
|
|
13239
|
-
badge && /* @__PURE__ */
|
|
13240
|
-
badgeTags?.map((tag) => /* @__PURE__ */
|
|
13269
|
+
badge && /* @__PURE__ */ jsx48("span", { className: "fw4 fz_14px lh_20px wsnw", children: badge }),
|
|
13270
|
+
badgeTags?.map((tag) => /* @__PURE__ */ jsx48(Tag, { ...tag }, tag.text))
|
|
13241
13271
|
] })
|
|
13242
13272
|
] })
|
|
13243
13273
|
] }),
|
|
13244
13274
|
hasDetails && /* @__PURE__ */ jsxs29("div", { className: "df fdc g_2 mta", children: [
|
|
13245
13275
|
data.length > 0 && /* @__PURE__ */ jsxs29("dl", { className: "df g_2 fw4 fz_14px lh_20px", children: [
|
|
13246
|
-
/* @__PURE__ */
|
|
13276
|
+
/* @__PURE__ */ jsx48("div", { className: "df fdc fg1 fb2 mw0", children: col1.map((d) => /* @__PURE__ */ jsxs29("div", { className: "df g_4px", ...tid[defaultTestId(d.label)], children: [
|
|
13247
13277
|
/* @__PURE__ */ jsxs29("dt", { className: "fs0", children: [
|
|
13248
13278
|
d.label,
|
|
13249
13279
|
":"
|
|
13250
13280
|
] }),
|
|
13251
|
-
/* @__PURE__ */
|
|
13281
|
+
/* @__PURE__ */ jsx48("dd", { className: "mw0", children: d.value })
|
|
13252
13282
|
] }, d.label)) }),
|
|
13253
|
-
/* @__PURE__ */
|
|
13283
|
+
/* @__PURE__ */ jsx48("div", { className: "df fdc fg1 fb2 mw0", children: col2.map((d) => /* @__PURE__ */ jsxs29("div", { className: "df g_4px", ...tid[defaultTestId(d.label)], children: [
|
|
13254
13284
|
/* @__PURE__ */ jsxs29("dt", { className: "fs0", children: [
|
|
13255
13285
|
d.label,
|
|
13256
13286
|
":"
|
|
13257
13287
|
] }),
|
|
13258
|
-
/* @__PURE__ */
|
|
13288
|
+
/* @__PURE__ */ jsx48("dd", { className: "mw0", children: d.value })
|
|
13259
13289
|
] }, d.label)) })
|
|
13260
13290
|
] }),
|
|
13261
13291
|
progress !== void 0 && /* @__PURE__ */ jsxs29("div", { className: "df aic g_1 fs_10px lh_14px", children: [
|
|
13262
|
-
/* @__PURE__ */
|
|
13292
|
+
/* @__PURE__ */ jsx48("div", { ...trussProps30({
|
|
13263
13293
|
width: "w25",
|
|
13264
13294
|
height: "h_8px",
|
|
13265
13295
|
borderRadius: "br4",
|
|
13266
13296
|
backgroundColor: ["bgColor_var", {
|
|
13267
13297
|
"--backgroundColor": maybeCssVar20(aiMode ? "rgba(221, 214, 254, 1)" /* Purple200 */ : "--b-surface-subtle" /* SurfaceSubtle */)
|
|
13268
13298
|
}]
|
|
13269
|
-
}), ...tid.progressTrack, children: /* @__PURE__ */
|
|
13299
|
+
}), ...tid.progressTrack, children: /* @__PURE__ */ jsx48("div", { ...trussProps30({
|
|
13270
13300
|
height: "h100",
|
|
13271
13301
|
borderRadius: "br4",
|
|
13272
13302
|
backgroundColor: "bgBlue500",
|
|
@@ -13284,7 +13314,7 @@ function CardBody(props) {
|
|
|
13284
13314
|
] });
|
|
13285
13315
|
}
|
|
13286
13316
|
function renderMaybeProposed(value, tid) {
|
|
13287
|
-
return typeof value === "string" || value === void 0 ? value : /* @__PURE__ */
|
|
13317
|
+
return typeof value === "string" || value === void 0 ? value : /* @__PURE__ */ jsx48(ProposedValue, { ...value, ...tid });
|
|
13288
13318
|
}
|
|
13289
13319
|
function clampProgress(value) {
|
|
13290
13320
|
if (process.env.NODE_ENV !== "production" && (value < 0 || value > 100)) {
|
|
@@ -13297,7 +13327,7 @@ function clampProgress(value) {
|
|
|
13297
13327
|
import { useResizeObserver as useResizeObserver4 } from "@react-aria/utils";
|
|
13298
13328
|
import { Children, useCallback as useCallback11, useLayoutEffect as useLayoutEffect3, useRef as useRef20, useState as useState16 } from "react";
|
|
13299
13329
|
import { trussProps as trussProps31, maybeCssVar as maybeCssVar21 } from "@homebound/truss/runtime";
|
|
13300
|
-
import { jsx as
|
|
13330
|
+
import { jsx as jsx49, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
13301
13331
|
function Carousel(props) {
|
|
13302
13332
|
const {
|
|
13303
13333
|
children,
|
|
@@ -13349,8 +13379,8 @@ function Carousel(props) {
|
|
|
13349
13379
|
return (
|
|
13350
13380
|
// The chevrons overlay the strip's edges, rather than taking a gutter that sits empty whenever they are hidden.
|
|
13351
13381
|
/* @__PURE__ */ jsxs30("div", { className: "df aic relative", ...tid, children: [
|
|
13352
|
-
/* @__PURE__ */
|
|
13353
|
-
/* @__PURE__ */
|
|
13382
|
+
/* @__PURE__ */ jsx49(ScrollButton, { direction: "back", label: prevLabel, inc: chevronInc, visible: canScrollBack, onClick: () => scrollByPage(-1), ...tid.prev }),
|
|
13383
|
+
/* @__PURE__ */ jsx49("div", { ref: stripRef, ...trussProps31({
|
|
13354
13384
|
display: "df",
|
|
13355
13385
|
flexGrow: "fg1",
|
|
13356
13386
|
minWidth: "mw0",
|
|
@@ -13372,8 +13402,8 @@ function Carousel(props) {
|
|
|
13372
13402
|
maskImage: ["maskImage_var", {
|
|
13373
13403
|
"--maskImage": maybeCssVar21(maskImage)
|
|
13374
13404
|
}]
|
|
13375
|
-
}), ...tid.items, children: Children.map(children, (child) => /* @__PURE__ */
|
|
13376
|
-
/* @__PURE__ */
|
|
13405
|
+
}), ...tid.items, children: Children.map(children, (child) => /* @__PURE__ */ jsx49("div", { className: "fs0 ssa_start", children: child })) }),
|
|
13406
|
+
/* @__PURE__ */ jsx49(ScrollButton, { direction: "forward", label: nextLabel, inc: chevronInc, visible: canScrollForward, onClick: () => scrollByPage(1), ...tid.next })
|
|
13377
13407
|
] })
|
|
13378
13408
|
);
|
|
13379
13409
|
}
|
|
@@ -13391,7 +13421,7 @@ function ScrollButton(props) {
|
|
|
13391
13421
|
} = chevronSizes(inc);
|
|
13392
13422
|
const back = direction === "back";
|
|
13393
13423
|
if (!visible) return null;
|
|
13394
|
-
return /* @__PURE__ */
|
|
13424
|
+
return /* @__PURE__ */ jsx49("button", { type: "button", "aria-label": label, onClick, ...trussProps31({
|
|
13395
13425
|
position: "absolute",
|
|
13396
13426
|
top: "top0",
|
|
13397
13427
|
bottom: "bot_0",
|
|
@@ -13420,7 +13450,7 @@ function ScrollButton(props) {
|
|
|
13420
13450
|
right: "r_0"
|
|
13421
13451
|
},
|
|
13422
13452
|
boxShadow: "fv_bshFocus"
|
|
13423
|
-
}), ...others, children: /* @__PURE__ */
|
|
13453
|
+
}), ...others, children: /* @__PURE__ */ jsx49(Icon, { icon: back ? "chevronLeft" : "chevronRight", inc, color: "--b-on-surface" /* OnSurface */ }) });
|
|
13424
13454
|
}
|
|
13425
13455
|
function chevronSizes(inc) {
|
|
13426
13456
|
const iconSize = increment(inc);
|
|
@@ -13436,7 +13466,7 @@ function chevronSizes(inc) {
|
|
|
13436
13466
|
|
|
13437
13467
|
// src/components/Table/components/TableCard.tsx
|
|
13438
13468
|
import { mergeProps as mergeProps13 } from "@homebound/truss/runtime";
|
|
13439
|
-
import { Fragment as Fragment18, jsx as
|
|
13469
|
+
import { Fragment as Fragment18, jsx as jsx50, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
13440
13470
|
function TableCardImpl(props) {
|
|
13441
13471
|
const {
|
|
13442
13472
|
rs,
|
|
@@ -13494,7 +13524,7 @@ function TableCardImpl(props) {
|
|
|
13494
13524
|
}
|
|
13495
13525
|
if (!title) return null;
|
|
13496
13526
|
const onClick = rowStyle?.onClick;
|
|
13497
|
-
return /* @__PURE__ */
|
|
13527
|
+
return /* @__PURE__ */ jsx50(TableCardView, { ...tid, imgSrc: rs.row.imgSrc ?? "", title, leftEyebrow, rightEyebrow, badge, badgeTags, status, data: dataBlocks, progress, interactiveFooter, to: rowStyle?.rowLink?.(rs.row), onClick: onClick ? () => onClick(rs.row, api) : void 0, height, imageFit, aiMode: rs.aiMode });
|
|
13498
13528
|
}
|
|
13499
13529
|
var TableCard = observer3(TableCardImpl);
|
|
13500
13530
|
function TableCardView(props) {
|
|
@@ -13519,7 +13549,7 @@ function TableCardView(props) {
|
|
|
13519
13549
|
const titleText = typeof title === "string" ? title : title.proposed;
|
|
13520
13550
|
const shownFooter = shownInteractiveFooter(interactiveFooter);
|
|
13521
13551
|
const action = to || onClick;
|
|
13522
|
-
return /* @__PURE__ */
|
|
13552
|
+
return /* @__PURE__ */ jsx50(BaseCard, { ...tid, imgSrc, imgAlt: titleText, imageFit, tag: status, onClick: action, height, aiMode, footer: shownFooter && /* @__PURE__ */ jsx50("div", { className: "df fdc g_2 pl3 pr3 pb3 pt2", ...tid.interactiveFooter, children: /* @__PURE__ */ jsx50(InteractiveFooter, { footer: shownFooter, tid }) }), children: /* @__PURE__ */ jsx50(CardBody, { ...tid, title, leftEyebrow, rightEyebrow, badge, badgeTags, data, progress, aiMode }) });
|
|
13523
13553
|
}
|
|
13524
13554
|
function InteractiveFooter(props) {
|
|
13525
13555
|
const {
|
|
@@ -13528,7 +13558,7 @@ function InteractiveFooter(props) {
|
|
|
13528
13558
|
} = props;
|
|
13529
13559
|
switch (footer.kind) {
|
|
13530
13560
|
case "carousel":
|
|
13531
|
-
return /* @__PURE__ */
|
|
13561
|
+
return /* @__PURE__ */ jsx50(CarouselFooter, { footer, tid });
|
|
13532
13562
|
}
|
|
13533
13563
|
}
|
|
13534
13564
|
function CarouselFooter(props) {
|
|
@@ -13537,8 +13567,8 @@ function CarouselFooter(props) {
|
|
|
13537
13567
|
tid
|
|
13538
13568
|
} = props;
|
|
13539
13569
|
return /* @__PURE__ */ jsxs31(Fragment18, { children: [
|
|
13540
|
-
/* @__PURE__ */
|
|
13541
|
-
/* @__PURE__ */
|
|
13570
|
+
/* @__PURE__ */ jsx50("div", { className: "fw4 fz_14px lh_20px", ...tid.carouselTitle, children: footer.title }),
|
|
13571
|
+
/* @__PURE__ */ jsx50(Carousel, { ...tid.carousel, children: footer.thumbnails.map((item) => /* @__PURE__ */ jsx50(Thumbnail, { item, tid: tid.carousel_item }, item.id)) })
|
|
13542
13572
|
] });
|
|
13543
13573
|
}
|
|
13544
13574
|
function shownInteractiveFooter(footer) {
|
|
@@ -13553,7 +13583,7 @@ function Thumbnail(props) {
|
|
|
13553
13583
|
item,
|
|
13554
13584
|
tid
|
|
13555
13585
|
} = props;
|
|
13556
|
-
return /* @__PURE__ */
|
|
13586
|
+
return /* @__PURE__ */ jsx50(Tooltip, { title: item.label, placement: "top", children: /* @__PURE__ */ jsx50(Link4, { to: item.to, "aria-label": item.label, ...tid, ...mergeProps13(navLink, void 0, {
|
|
13557
13587
|
position: "relative after_a_absolute",
|
|
13558
13588
|
display: "db",
|
|
13559
13589
|
flexShrink: "fs0",
|
|
@@ -13571,12 +13601,12 @@ function Thumbnail(props) {
|
|
|
13571
13601
|
left: "after_a_l_0",
|
|
13572
13602
|
opacity: "after_a_o_0_28",
|
|
13573
13603
|
pointerEvents: "after_a_pen"
|
|
13574
|
-
}), children: /* @__PURE__ */
|
|
13604
|
+
}), children: /* @__PURE__ */ jsx50("span", { className: "db w100 h100 oh br8", children: /* @__PURE__ */ jsx50("img", { className: "w100 h100 obf_cover db", src: item.imgUrl, alt: "", loading: "lazy" }) }) }) });
|
|
13575
13605
|
}
|
|
13576
13606
|
|
|
13577
13607
|
// src/components/Table/GridTableEmptyState.tsx
|
|
13578
13608
|
import { trussProps as trussProps32 } from "@homebound/truss/runtime";
|
|
13579
|
-
import { jsx as
|
|
13609
|
+
import { jsx as jsx51, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
13580
13610
|
function GridTableEmptyState(props) {
|
|
13581
13611
|
const {
|
|
13582
13612
|
title = "No results found",
|
|
@@ -13585,8 +13615,8 @@ function GridTableEmptyState(props) {
|
|
|
13585
13615
|
} = props;
|
|
13586
13616
|
const tid = useTestIds(props, "gridTableEmptyState");
|
|
13587
13617
|
return /* @__PURE__ */ jsxs32("div", { className: "df fdc aic pt_12 pb_12 g_2", ...tid, children: [
|
|
13588
|
-
/* @__PURE__ */
|
|
13589
|
-
description && /* @__PURE__ */
|
|
13618
|
+
/* @__PURE__ */ jsx51("div", { className: "fw6 fz_20px lh_28px", ...tid.title, children: title }),
|
|
13619
|
+
description && /* @__PURE__ */ jsx51("div", { ...trussProps32({
|
|
13590
13620
|
fontWeight: "fw4",
|
|
13591
13621
|
fontSize: "fz_14px",
|
|
13592
13622
|
lineHeight: "lh_20px",
|
|
@@ -13594,13 +13624,13 @@ function GridTableEmptyState(props) {
|
|
|
13594
13624
|
"--color": "var(--b-on-surface-muted)"
|
|
13595
13625
|
}]
|
|
13596
13626
|
}), ...tid.description, children: description }),
|
|
13597
|
-
actions && /* @__PURE__ */
|
|
13627
|
+
actions && /* @__PURE__ */ jsx51("div", { ...tid.actions, children: actions })
|
|
13598
13628
|
] });
|
|
13599
13629
|
}
|
|
13600
13630
|
|
|
13601
13631
|
// src/components/Table/GridTable.tsx
|
|
13602
13632
|
import { trussProps as trussProps33, mergeProps as mergeProps14, maybeCssVar as maybeCssVar22 } from "@homebound/truss/runtime";
|
|
13603
|
-
import { jsx as
|
|
13633
|
+
import { jsx as jsx52, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
13604
13634
|
import { createElement } from "react";
|
|
13605
13635
|
var __maybeInc12 = (inc) => {
|
|
13606
13636
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
@@ -13655,13 +13685,15 @@ function GridTable(props) {
|
|
|
13655
13685
|
cardImageFit
|
|
13656
13686
|
} = props;
|
|
13657
13687
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
13688
|
+
const insetHandled = useContentInsetHandled();
|
|
13689
|
+
const withGutters = columnGutter && inDocumentScrollLayout && !insetHandled;
|
|
13658
13690
|
const tid = useTestIds({
|
|
13659
13691
|
"data-testid": id
|
|
13660
13692
|
}, "gridTable");
|
|
13661
13693
|
const columnsWithIds = useMemo14(() => {
|
|
13662
|
-
const columns2 =
|
|
13694
|
+
const columns2 = withGutters ? withColumnGutters(_columns) : _columns;
|
|
13663
13695
|
return assignDefaultColumnIds(columns2);
|
|
13664
|
-
}, [_columns,
|
|
13696
|
+
}, [_columns, withGutters]);
|
|
13665
13697
|
const virtuosoRef = useRef21(null);
|
|
13666
13698
|
const virtuosoRangeRef = useRef21(null);
|
|
13667
13699
|
const resizeRef = useRef21(null);
|
|
@@ -13685,7 +13717,7 @@ function GridTable(props) {
|
|
|
13685
13717
|
draggedRowRef.current = row;
|
|
13686
13718
|
_setDraggedRow(row);
|
|
13687
13719
|
};
|
|
13688
|
-
const style = resolveStyles(maybeStyle);
|
|
13720
|
+
const style = resolveStyles(maybeStyle, insetHandled, inDocumentScrollLayout);
|
|
13689
13721
|
const {
|
|
13690
13722
|
tableState
|
|
13691
13723
|
} = api;
|
|
@@ -13800,7 +13832,7 @@ function GridTable(props) {
|
|
|
13800
13832
|
};
|
|
13801
13833
|
const [tableHeadRows, visibleDataRows, keptSelectedRows, pinnedRows, tooManyClientSideRows] = useComputed(() => {
|
|
13802
13834
|
if (as === "card") {
|
|
13803
|
-
const cardElements = tableState.visibleRows.filter((rs) => ![HEADER, EXPANDABLE_HEADER, TOTALS, KEPT_GROUP].includes(rs.kind)).map((rs) => /* @__PURE__ */
|
|
13835
|
+
const cardElements = tableState.visibleRows.filter((rs) => ![HEADER, EXPANDABLE_HEADER, TOTALS, KEPT_GROUP].includes(rs.kind)).map((rs) => /* @__PURE__ */ jsx52(TableCard, { rs, columns, rowStyle: rowStyles?.[rs.row.kind], api: tableState.api, height: cardHeight, imageFit: cardImageFit }, rs.key));
|
|
13804
13836
|
return [[], cardElements, [], [], false];
|
|
13805
13837
|
}
|
|
13806
13838
|
const headerRows = [];
|
|
@@ -13814,7 +13846,7 @@ function GridTable(props) {
|
|
|
13814
13846
|
const hasExpandableHeader = visibleRows.some((rs) => rs.row.id === EXPANDABLE_HEADER);
|
|
13815
13847
|
const omitRowHover = "rowHover" in maybeStyle && maybeStyle.rowHover === false;
|
|
13816
13848
|
const isHeadKind = (kind) => [HEADER, EXPANDABLE_HEADER, TOTALS].includes(kind);
|
|
13817
|
-
const makeRow = (rs, isFirstHeadRow, isFirstBodyRow, isLastBodyRow, hasTrailingCompanion) => /* @__PURE__ */
|
|
13849
|
+
const makeRow = (rs, isFirstHeadRow, isFirstBodyRow, isLastBodyRow, hasTrailingCompanion) => /* @__PURE__ */ jsx52(Row, { onDragStart, onDragOver, onDragEnd, onDrop, onDragEnter, ...{
|
|
13818
13850
|
as,
|
|
13819
13851
|
rs,
|
|
13820
13852
|
style,
|
|
@@ -13836,7 +13868,7 @@ function GridTable(props) {
|
|
|
13836
13868
|
const makeCompanionRow = (rs, resolved, isFirstBodyRow, isLastBodyRow) => {
|
|
13837
13869
|
const levelStyle = style.levels && (typeof style.levels === "function" ? style.levels(rs.level) : style.levels[rs.level]);
|
|
13838
13870
|
const rowStyle = rowStyles?.[rs.row.kind];
|
|
13839
|
-
return /* @__PURE__ */
|
|
13871
|
+
return /* @__PURE__ */ jsx52(CompanionRow, { as, style, columnSizes, rowId: rs.row.id, colSpan: columns.length, isFirstBodyRow, isLastBodyRow, position: resolved.position, companion: resolved.content, levelIndent: levelStyle?.rowIndent, rowCss: maybeApplyFunction(rs.row, rowStyle?.rowCss), cellCss: maybeApplyFunction(rs.row, rowStyle?.cellCss) }, `${rs.key}-companion`);
|
|
13840
13872
|
};
|
|
13841
13873
|
const makeRowGroup = (rs, isFirstBodyRow, isLastBodyRow, inHead) => {
|
|
13842
13874
|
const resolved = rs.companion;
|
|
@@ -13847,7 +13879,7 @@ function GridTable(props) {
|
|
|
13847
13879
|
const rowStyle = rowStyles?.[rs.row.kind];
|
|
13848
13880
|
const hasRowAction = !!(rowStyle?.rowLink || rowStyle?.onClick);
|
|
13849
13881
|
const showRowHover = hasRowAction && !reservedRowKinds.includes(rs.kind) && !omitRowHover && style.rowHoverColor !== "none";
|
|
13850
|
-
return /* @__PURE__ */
|
|
13882
|
+
return /* @__PURE__ */ jsx52(RowGroup, { as, inHead, showRowHover, style, children }, rs.key);
|
|
13851
13883
|
};
|
|
13852
13884
|
const bodyRowStates = visibleRows.filter((rs) => !isHeadKind(rs.kind));
|
|
13853
13885
|
const onlyKeptBodyRows = bodyRowStates.length > 0 && bodyRowStates.every((rs) => rs.isKept || rs.kind === KEPT_GROUP);
|
|
@@ -13918,12 +13950,12 @@ function GridTable(props) {
|
|
|
13918
13950
|
};
|
|
13919
13951
|
}, [contentWidth, inDocumentScrollLayout, style, tableWidth]);
|
|
13920
13952
|
if (noData && emptyState && tableStateSyncedFromPropsRef.current) {
|
|
13921
|
-
return /* @__PURE__ */
|
|
13953
|
+
return /* @__PURE__ */ jsx52(GridTableEmptyState, { ...emptyState });
|
|
13922
13954
|
}
|
|
13923
|
-
return /* @__PURE__ */
|
|
13924
|
-
/* @__PURE__ */
|
|
13925
|
-
loading && /* @__PURE__ */
|
|
13926
|
-
as === "card" ? /* @__PURE__ */
|
|
13955
|
+
return /* @__PURE__ */ jsx52(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ jsxs33(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
|
|
13956
|
+
/* @__PURE__ */ jsx52("div", { ref: resizeRef, ...trussProps33(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)), ...tid.probe }),
|
|
13957
|
+
loading && /* @__PURE__ */ jsx52("div", { ...trussProps33(loadingOverlayCss), ...tid.loadingOverlay, children: /* @__PURE__ */ jsx52(Loader, { ...tid.loadingSpinner }) }),
|
|
13958
|
+
as === "card" ? /* @__PURE__ */ jsx52(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition, loading }) : _as === "virtual" ? /* @__PURE__ */ jsx52(VirtualGridTableView, { style: tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, persistScrollPosition, loading }) : renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, loading, infiniteScroll, tableContainerRef, persistScrollPosition)
|
|
13927
13959
|
] }) });
|
|
13928
13960
|
}
|
|
13929
13961
|
var loadingOverlayCss = {
|
|
@@ -13987,7 +14019,7 @@ function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, pinned
|
|
|
13987
14019
|
] }),
|
|
13988
14020
|
/* @__PURE__ */ jsxs33("div", { children: [
|
|
13989
14021
|
keptSelectedRows,
|
|
13990
|
-
firstRowMessage && /* @__PURE__ */
|
|
14022
|
+
firstRowMessage && /* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
13991
14023
|
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
13992
14024
|
...style.firstRowMessageCss,
|
|
13993
14025
|
...visibleDataRows.length === 0 && style.lastRowCss,
|
|
@@ -14031,11 +14063,11 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
|
|
|
14031
14063
|
pinnedRows
|
|
14032
14064
|
] }),
|
|
14033
14065
|
keptSelectedRows,
|
|
14034
|
-
firstRowMessage && /* @__PURE__ */
|
|
14066
|
+
firstRowMessage && /* @__PURE__ */ jsx52("tbody", { children: /* @__PURE__ */ jsx52("tr", { ...trussProps33({
|
|
14035
14067
|
...tableRowPrintBreakCss,
|
|
14036
14068
|
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
14037
14069
|
...visibleDataRows.length === 0 && style.lastRowCss
|
|
14038
|
-
}), children: /* @__PURE__ */
|
|
14070
|
+
}), children: /* @__PURE__ */ jsx52("td", { colSpan: columns.length, ...trussProps33({
|
|
14039
14071
|
...style.betweenRowsCss,
|
|
14040
14072
|
...style.firstRowMessageCss,
|
|
14041
14073
|
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
@@ -14076,7 +14108,7 @@ function VirtualGridTableView({
|
|
|
14076
14108
|
const components = useMemo14(() => ({
|
|
14077
14109
|
// zIndex keeps the pinned head above sticky columns; `top` matches the offsets used by
|
|
14078
14110
|
// the div/table render paths so virtualized tables pin below the global nav + page header.
|
|
14079
|
-
TopItemList: React9.forwardRef((props, ref) => /* @__PURE__ */
|
|
14111
|
+
TopItemList: React9.forwardRef((props, ref) => /* @__PURE__ */ jsx52("div", { ...props, ref, ...mergeProps14(void 0, {
|
|
14080
14112
|
...props.style,
|
|
14081
14113
|
...style.minWidthPx !== void 0 ? {
|
|
14082
14114
|
minWidth: style.minWidthPx
|
|
@@ -14088,17 +14120,17 @@ function VirtualGridTableView({
|
|
|
14088
14120
|
}) })),
|
|
14089
14121
|
List: VirtualRoot(style, columns, id, xss),
|
|
14090
14122
|
Footer: () => {
|
|
14091
|
-
return /* @__PURE__ */
|
|
14123
|
+
return /* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
14092
14124
|
...style.virtualFooterPaddingBottomPx !== void 0 ? {
|
|
14093
14125
|
paddingBottom: ["pb_var", {
|
|
14094
14126
|
"--paddingBottom": `${style.virtualFooterPaddingBottomPx ?? 0}px`
|
|
14095
14127
|
}]
|
|
14096
14128
|
} : {}
|
|
14097
|
-
}), children: fetchMoreInProgress && /* @__PURE__ */
|
|
14129
|
+
}), children: fetchMoreInProgress && /* @__PURE__ */ jsx52("div", { className: "h5 df aic jcc", children: /* @__PURE__ */ jsx52(Loader, { size: "xs" }) }) });
|
|
14098
14130
|
}
|
|
14099
14131
|
}), [columns, fetchMoreInProgress, id, stickyOffset, style, xss]);
|
|
14100
14132
|
const virtuosoKey = !!validatedScrollIndex && visibleDataRows.length > 0 ? "with-data" : "virtuoso";
|
|
14101
|
-
return /* @__PURE__ */
|
|
14133
|
+
return /* @__PURE__ */ jsx52(
|
|
14102
14134
|
Virtuoso,
|
|
14103
14135
|
{
|
|
14104
14136
|
useWindowScroll: inDocumentScrollLayout && !customScrollParent,
|
|
@@ -14130,11 +14162,11 @@ function VirtualGridTableView({
|
|
|
14130
14162
|
if (index === 0) {
|
|
14131
14163
|
return (
|
|
14132
14164
|
// Ensure the fallback message is the same width as the table
|
|
14133
|
-
/* @__PURE__ */
|
|
14165
|
+
/* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
14134
14166
|
...getTableRefWidthStyles(true, inDocumentScrollLayout),
|
|
14135
14167
|
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
14136
14168
|
...visibleDataRows.length === 0 && style.lastRowCss
|
|
14137
|
-
}), children: /* @__PURE__ */
|
|
14169
|
+
}), children: /* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
14138
14170
|
...style.firstRowMessageCss,
|
|
14139
14171
|
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
14140
14172
|
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
@@ -14193,13 +14225,13 @@ function CardView({
|
|
|
14193
14225
|
const validatedScrollIndex = savedScrollIndex !== void 0 && savedScrollIndex > 0 && savedScrollIndex < cardRows.length ? savedScrollIndex : void 0;
|
|
14194
14226
|
const virtuosoKey = !!validatedScrollIndex && cardRows.length > 0 ? "with-data" : "virtuoso";
|
|
14195
14227
|
if (runningInJest) {
|
|
14196
|
-
return /* @__PURE__ */
|
|
14228
|
+
return /* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
14197
14229
|
...{
|
|
14198
14230
|
paddingTop: "pt2",
|
|
14199
14231
|
paddingBottom: "pb2"
|
|
14200
14232
|
},
|
|
14201
14233
|
...loading && loadingTableCss
|
|
14202
|
-
}), children: /* @__PURE__ */
|
|
14234
|
+
}), children: /* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
14203
14235
|
display: "dg",
|
|
14204
14236
|
gridTemplateColumns: ["gtc_var", {
|
|
14205
14237
|
"--gridTemplateColumns": maybeCssVar22(`repeat(auto-fill, minmax(${CARD_MIN_WIDTH_PX}px, 1fr))`)
|
|
@@ -14212,7 +14244,7 @@ function CardView({
|
|
|
14212
14244
|
paddingLeft: "pl3"
|
|
14213
14245
|
}), children: cardRows }) });
|
|
14214
14246
|
}
|
|
14215
|
-
return /* @__PURE__ */
|
|
14247
|
+
return /* @__PURE__ */ jsx52("div", { ...trussProps33({
|
|
14216
14248
|
...{
|
|
14217
14249
|
paddingBottom: "pb2",
|
|
14218
14250
|
height: "h100"
|
|
@@ -14227,7 +14259,7 @@ function CardView({
|
|
|
14227
14259
|
style,
|
|
14228
14260
|
children
|
|
14229
14261
|
}, ref) {
|
|
14230
|
-
return /* @__PURE__ */
|
|
14262
|
+
return /* @__PURE__ */ jsx52("div", { ref, ...mergeProps14(void 0, style, {
|
|
14231
14263
|
display: "dg",
|
|
14232
14264
|
gridTemplateColumns: ["gtc_var", {
|
|
14233
14265
|
"--gridTemplateColumns": maybeCssVar22(`repeat(auto-fill, minmax(${CARD_MIN_WIDTH_PX}px, 1fr))`)
|
|
@@ -14240,7 +14272,7 @@ function CardView({
|
|
|
14240
14272
|
paddingLeft: "pl3"
|
|
14241
14273
|
}), children });
|
|
14242
14274
|
}),
|
|
14243
|
-
Footer: () => /* @__PURE__ */
|
|
14275
|
+
Footer: () => /* @__PURE__ */ jsx52("div", { children: fetchMoreInProgress && /* @__PURE__ */ jsx52("div", { className: "h5 df aic jcc", children: /* @__PURE__ */ jsx52(Loader, { size: "xs" }) }) })
|
|
14244
14276
|
}, rangeChanged: (newRange) => {
|
|
14245
14277
|
virtuosoRangeRef.current = newRange;
|
|
14246
14278
|
if (!infiniteScroll && cardRows.length > 0) {
|
|
@@ -14266,7 +14298,7 @@ var VirtualRoot = memoizeOne((gs, _columns, id, xss) => {
|
|
|
14266
14298
|
style,
|
|
14267
14299
|
children
|
|
14268
14300
|
}, ref) {
|
|
14269
|
-
return /* @__PURE__ */
|
|
14301
|
+
return /* @__PURE__ */ jsx52("div", { ref, ...mergeProps14(void 0, style, {
|
|
14270
14302
|
...gs.rootCss,
|
|
14271
14303
|
...gs.minWidthPx ? {
|
|
14272
14304
|
minWidth: ["mw_var", {
|
|
@@ -14284,7 +14316,7 @@ var CARD_MIN_WIDTH_PX = 330;
|
|
|
14284
14316
|
|
|
14285
14317
|
// src/components/ToggleChip.tsx
|
|
14286
14318
|
import { trussProps as trussProps34 } from "@homebound/truss/runtime";
|
|
14287
|
-
import { jsx as
|
|
14319
|
+
import { jsx as jsx53, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
14288
14320
|
function ToggleChip(props) {
|
|
14289
14321
|
const {
|
|
14290
14322
|
text,
|
|
@@ -14317,8 +14349,8 @@ function ToggleChip(props) {
|
|
|
14317
14349
|
},
|
|
14318
14350
|
...xss
|
|
14319
14351
|
}), disabled, onClick, ...hoverProps, ...tid, children: [
|
|
14320
|
-
icon && /* @__PURE__ */
|
|
14321
|
-
/* @__PURE__ */
|
|
14352
|
+
icon && /* @__PURE__ */ jsx53("span", { className: "fs0", ...tid.icon, children: /* @__PURE__ */ jsx53(Icon, { icon, color: "rgba(36, 36, 36, 1)" /* Gray900 */, inc: 2 }) }),
|
|
14353
|
+
/* @__PURE__ */ jsx53("span", { ...trussProps34({
|
|
14322
14354
|
textAlign: "tal",
|
|
14323
14355
|
overflow: "oh",
|
|
14324
14356
|
display: "d_negwebkit_box",
|
|
@@ -14330,14 +14362,14 @@ function ToggleChip(props) {
|
|
|
14330
14362
|
paddingRight: "pr0"
|
|
14331
14363
|
} : {}
|
|
14332
14364
|
}), title: text, children: text }),
|
|
14333
|
-
!disabled && /* @__PURE__ */
|
|
14365
|
+
!disabled && /* @__PURE__ */ jsx53("span", { ...trussProps34({
|
|
14334
14366
|
...{
|
|
14335
14367
|
flexShrink: "fs0",
|
|
14336
14368
|
borderRadius: "br16",
|
|
14337
14369
|
backgroundColor: "bgGray200"
|
|
14338
14370
|
},
|
|
14339
14371
|
...isHovered && chipHoverStyles
|
|
14340
|
-
}), ...tid.x, children: /* @__PURE__ */
|
|
14372
|
+
}), ...tid.x, children: /* @__PURE__ */ jsx53(Icon, { icon: "x", color: "rgba(141, 141, 141, 1)" /* Gray600 */, inc: 2 }) })
|
|
14341
14373
|
] });
|
|
14342
14374
|
}
|
|
14343
14375
|
var chipHoverStyles = {
|
|
@@ -14353,7 +14385,7 @@ var chipDisabledStyles = {
|
|
|
14353
14385
|
|
|
14354
14386
|
// src/components/ToggleChips.tsx
|
|
14355
14387
|
import { trussProps as trussProps35 } from "@homebound/truss/runtime";
|
|
14356
|
-
import { jsx as
|
|
14388
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
14357
14389
|
function ToggleChips(props) {
|
|
14358
14390
|
const {
|
|
14359
14391
|
values,
|
|
@@ -14362,14 +14394,14 @@ function ToggleChips(props) {
|
|
|
14362
14394
|
xss
|
|
14363
14395
|
} = props;
|
|
14364
14396
|
const tid = useTestIds(props, "toggleChips");
|
|
14365
|
-
return /* @__PURE__ */
|
|
14397
|
+
return /* @__PURE__ */ jsx54("div", { ...trussProps35({
|
|
14366
14398
|
...{
|
|
14367
14399
|
display: "df",
|
|
14368
14400
|
flexWrap: "fww",
|
|
14369
14401
|
gap: "g_1"
|
|
14370
14402
|
},
|
|
14371
14403
|
...xss
|
|
14372
|
-
}), ...tid, children: values.map((value) => /* @__PURE__ */
|
|
14404
|
+
}), ...tid, children: values.map((value) => /* @__PURE__ */ jsx54(ToggleChip, { text: getLabel(value), onClick: () => onRemove(value), ...tid.chip }, getLabel(value))) });
|
|
14373
14405
|
}
|
|
14374
14406
|
|
|
14375
14407
|
// src/components/Accordion.tsx
|
|
@@ -14377,7 +14409,7 @@ import { useId, useResizeObserver as useResizeObserver5 } from "@react-aria/util
|
|
|
14377
14409
|
import { useCallback as useCallback12, useEffect as useEffect10, useMemo as useMemo15, useState as useState18 } from "react";
|
|
14378
14410
|
import { useFocusRing as useFocusRing7 } from "react-aria";
|
|
14379
14411
|
import { trussProps as trussProps36, maybeCssVar as maybeCssVar23 } from "@homebound/truss/runtime";
|
|
14380
|
-
import { jsx as
|
|
14412
|
+
import { jsx as jsx55, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
14381
14413
|
var __maybeInc13 = (inc) => {
|
|
14382
14414
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
14383
14415
|
};
|
|
@@ -14502,13 +14534,13 @@ function Accordion(props) {
|
|
|
14502
14534
|
} : {}
|
|
14503
14535
|
}), children: [
|
|
14504
14536
|
titleOnClick ? /* @__PURE__ */ jsxs35("div", { ...focusProps, "aria-controls": id, "aria-expanded": expanded, className: "df", children: [
|
|
14505
|
-
/* @__PURE__ */
|
|
14537
|
+
/* @__PURE__ */ jsx55("button", { ...tid.title, disabled, ...trussProps36({
|
|
14506
14538
|
...touchableStyle,
|
|
14507
14539
|
...{
|
|
14508
14540
|
flexGrow: "fg1"
|
|
14509
14541
|
}
|
|
14510
14542
|
}), onClick: titleOnClick, children: title }),
|
|
14511
|
-
/* @__PURE__ */
|
|
14543
|
+
/* @__PURE__ */ jsx55("button", { ...tid.toggle, disabled, ...trussProps36({
|
|
14512
14544
|
...touchableStyle,
|
|
14513
14545
|
...{
|
|
14514
14546
|
paddingLeft: "pl2",
|
|
@@ -14519,23 +14551,23 @@ function Accordion(props) {
|
|
|
14519
14551
|
paddingRight: "pr_10px"
|
|
14520
14552
|
} : {}
|
|
14521
14553
|
}
|
|
14522
|
-
}), onClick: toggle, children: /* @__PURE__ */
|
|
14554
|
+
}), onClick: toggle, children: /* @__PURE__ */ jsx55(RotatingChevronIcon, { expanded }) })
|
|
14523
14555
|
] }) : /* @__PURE__ */ jsxs35("button", { ...tid.title, ...focusProps, "aria-controls": id, "aria-expanded": expanded, disabled, ...trussProps36({
|
|
14524
14556
|
...{
|
|
14525
14557
|
width: "w100"
|
|
14526
14558
|
},
|
|
14527
14559
|
...touchableStyle
|
|
14528
14560
|
}), onClick: toggle, children: [
|
|
14529
|
-
/* @__PURE__ */
|
|
14530
|
-
/* @__PURE__ */
|
|
14561
|
+
/* @__PURE__ */ jsx55("span", { className: "fg1 tal", children: title }),
|
|
14562
|
+
/* @__PURE__ */ jsx55(RotatingChevronIcon, { expanded })
|
|
14531
14563
|
] }),
|
|
14532
|
-
/* @__PURE__ */
|
|
14564
|
+
/* @__PURE__ */ jsx55("div", { ...tid.details, id, "aria-hidden": !expanded, ...trussProps36({
|
|
14533
14565
|
overflow: "oh",
|
|
14534
14566
|
height: ["h_var", {
|
|
14535
14567
|
"--height": maybeCssVar23(__maybeInc13(contentHeight))
|
|
14536
14568
|
}],
|
|
14537
14569
|
transition: "tsn_height_250ms_ease_in_out"
|
|
14538
|
-
}), children: expanded && /* @__PURE__ */
|
|
14570
|
+
}), children: expanded && /* @__PURE__ */ jsx55("div", { ...trussProps36({
|
|
14539
14571
|
paddingLeft: "pl2",
|
|
14540
14572
|
paddingRight: "pr2",
|
|
14541
14573
|
paddingBottom: "pb2",
|
|
@@ -14550,13 +14582,13 @@ function Accordion(props) {
|
|
|
14550
14582
|
] });
|
|
14551
14583
|
}
|
|
14552
14584
|
function RotatingChevronIcon(props) {
|
|
14553
|
-
return /* @__PURE__ */
|
|
14585
|
+
return /* @__PURE__ */ jsx55("span", { ...trussProps36({
|
|
14554
14586
|
flexShrink: "fs0",
|
|
14555
14587
|
transition: "tsn_transform_250ms_linear",
|
|
14556
14588
|
transform: ["transform_var", {
|
|
14557
14589
|
"--transform": maybeCssVar23(props.expanded ? "rotate(180deg)" : "rotate(0deg)")
|
|
14558
14590
|
}]
|
|
14559
|
-
}), children: /* @__PURE__ */
|
|
14591
|
+
}), children: /* @__PURE__ */ jsx55(Icon, { icon: "chevronDown" }) });
|
|
14560
14592
|
}
|
|
14561
14593
|
var accordionSizes = {
|
|
14562
14594
|
xs: 240,
|
|
@@ -14567,14 +14599,14 @@ var accordionSizes = {
|
|
|
14567
14599
|
|
|
14568
14600
|
// src/components/AccordionList.tsx
|
|
14569
14601
|
import { useState as useState19 } from "react";
|
|
14570
|
-
import { Fragment as Fragment19, jsx as
|
|
14602
|
+
import { Fragment as Fragment19, jsx as jsx56 } from "react/jsx-runtime";
|
|
14571
14603
|
function AccordionList(props) {
|
|
14572
14604
|
const { accordions, size, allowMultipleExpanded = true, compact = false } = props;
|
|
14573
14605
|
const [expandedIndex, setExpandedIndex] = useState19(
|
|
14574
14606
|
accordions.findIndex((a) => a.defaultExpanded)
|
|
14575
14607
|
);
|
|
14576
14608
|
const tid = useTestIds(props, "accordionList");
|
|
14577
|
-
return /* @__PURE__ */
|
|
14609
|
+
return /* @__PURE__ */ jsx56(Fragment19, { children: accordions.map((accordionProps, index, arr) => /* @__PURE__ */ jsx56(
|
|
14578
14610
|
Accordion,
|
|
14579
14611
|
{
|
|
14580
14612
|
...accordionProps,
|
|
@@ -14593,7 +14625,7 @@ function AccordionList(props) {
|
|
|
14593
14625
|
// src/components/Logos/BlueprintAiLogo.tsx
|
|
14594
14626
|
import { useId as useId2 } from "@react-aria/utils";
|
|
14595
14627
|
import { trussProps as trussProps37, maybeCssVar as maybeCssVar24 } from "@homebound/truss/runtime";
|
|
14596
|
-
import { jsx as
|
|
14628
|
+
import { jsx as jsx57, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
14597
14629
|
var __maybeInc14 = (inc) => {
|
|
14598
14630
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
14599
14631
|
};
|
|
@@ -14612,29 +14644,29 @@ function BlueprintAiLogo(props) {
|
|
|
14612
14644
|
}]
|
|
14613
14645
|
}), children: [
|
|
14614
14646
|
/* @__PURE__ */ jsxs36("g", { transform: "translate(0.32171630859375, 3)", fill: `url(#${gradientId})`, children: [
|
|
14615
|
-
/* @__PURE__ */
|
|
14616
|
-
/* @__PURE__ */
|
|
14617
|
-
/* @__PURE__ */
|
|
14618
|
-
/* @__PURE__ */
|
|
14619
|
-
/* @__PURE__ */
|
|
14620
|
-
/* @__PURE__ */
|
|
14621
|
-
/* @__PURE__ */
|
|
14622
|
-
/* @__PURE__ */
|
|
14623
|
-
/* @__PURE__ */
|
|
14624
|
-
/* @__PURE__ */
|
|
14625
|
-
/* @__PURE__ */
|
|
14626
|
-
/* @__PURE__ */
|
|
14647
|
+
/* @__PURE__ */ jsx57("path", { d: "M17.2834 12.4731L25.9591 3.79741C26.4761 3.2804 27.3148 3.28029 27.8319 3.79741L27.9224 3.89763C28.3464 4.41754 28.3169 5.18521 27.8319 5.67026L18.7856 14.7166H30.6756C31.4069 14.7166 32 15.3096 32 16.0409C31.9998 16.7719 31.407 17.3653 30.6756 17.3653H19.3545L27.5075 25.5183L27.5991 25.6196C27.9937 26.1046 27.9936 26.8039 27.5991 27.2888L27.5075 27.3901C26.9904 27.9072 26.1518 27.9072 25.6347 27.3901L17.2834 19.0388V30.6756C17.2834 31.4069 16.6904 32 15.9591 32C15.2281 31.9998 14.6347 31.407 14.6347 30.6756V18.8664L6.15733 27.3437C5.67242 27.8287 4.90483 27.8588 4.3847 27.4343L4.28448 27.3437C3.76784 26.8267 3.76779 25.989 4.28448 25.472L12.3912 17.3653H1.32435C0.638773 17.3653 0.0745504 16.8441 0.00646552 16.1767L0 16.0409C0 15.3096 0.593052 14.7166 1.32435 14.7166H12.9601L3.96013 5.71659C3.44299 5.19946 3.44322 4.3608 3.96013 3.84375L4.06034 3.75323C4.58047 3.32871 5.34806 3.35884 5.83297 3.84375L14.6347 12.6455V1.32435C14.6347 0.592974 15.2281 0.000199548 15.9591 0C16.6904 3.28853e-08 17.2834 0.593052 17.2834 1.32435V12.4731Z" }),
|
|
14648
|
+
/* @__PURE__ */ jsx57("path", { d: "M202.994 28.2798V3.31983H206.322V28.2798H202.994Z" }),
|
|
14649
|
+
/* @__PURE__ */ jsx57("path", { d: "M174.792 28.2798L185.928 3.31983H190.024L201.16 28.2798H197.48L194.664 21.9118H181.32L178.472 28.2798H174.792ZM182.696 18.7438H193.288L187.976 6.80783L182.696 18.7438Z" }),
|
|
14650
|
+
/* @__PURE__ */ jsx57("path", { d: "M165.349 28.2478C160.581 28.6958 158.053 28.5038 158.149 23.7998V14.5198H154.597V11.6398H158.149V7.15983H161.413V11.6398H166.181V14.5198H161.413V22.5838C161.413 25.3358 161.541 25.6878 165.349 25.3998V28.2478Z" }),
|
|
14651
|
+
/* @__PURE__ */ jsx57("path", { d: "M138.102 28.2798V11.6398H141.366V14.4878C142.55 12.4718 144.47 11.1278 147.222 11.1278C151.254 11.1278 153.334 13.5918 153.334 18.3598V28.2798H150.038V18.4558C150.038 15.6718 148.694 13.9118 146.262 13.9118C143.318 13.9118 141.366 16.5038 141.366 20.0558V28.2798H138.102Z" }),
|
|
14652
|
+
/* @__PURE__ */ jsx57("path", { d: "M133.364 9.11183C132.052 9.11183 131.028 8.11983 131.028 6.80783C131.028 5.52783 132.052 4.50383 133.364 4.50383C134.676 4.50383 135.668 5.52783 135.668 6.80783C135.668 8.11983 134.612 9.11183 133.364 9.11183ZM131.764 28.2798V11.6398H134.996V28.2798H131.764Z" }),
|
|
14653
|
+
/* @__PURE__ */ jsx57("path", { d: "M120.958 28.2798V11.6398H124.062V14.8078C125.15 12.5678 127.422 11.4478 130.718 11.4478V14.4878C126.782 14.4878 124.062 15.8958 124.062 18.9038V28.2798H120.958Z" }),
|
|
14654
|
+
/* @__PURE__ */ jsx57("path", { d: "M102.558 34.6798V11.6398H105.822V14.2318C106.974 12.2798 108.894 11.0958 111.326 11.1278C115.678 11.1278 118.75 14.8078 118.75 20.0238C118.75 25.1438 115.678 28.7918 111.326 28.7918C108.894 28.7918 106.974 27.6078 105.822 25.6878V34.6798H102.558ZM110.622 26.0078C113.502 26.0078 115.518 23.5118 115.518 19.9918C115.518 16.4398 113.502 13.9118 110.622 13.9118C107.742 13.9118 105.694 16.4398 105.694 19.9918C105.694 23.5118 107.742 26.0078 110.622 26.0078Z" }),
|
|
14655
|
+
/* @__PURE__ */ jsx57("path", { d: "M92.5547 28.7918C87.5947 28.7918 84.3307 25.1118 84.3307 19.9278C84.3307 14.7758 87.5947 11.1278 92.5547 11.1278C96.6187 11.1278 100.043 14.1678 100.043 19.7038V20.9838H87.6907C87.9147 24.0238 89.4827 26.1038 92.5547 26.1038C94.7947 26.1038 96.2987 24.7918 96.6187 23.4478H99.8507C99.3387 26.3918 96.4907 28.7918 92.5547 28.7918ZM87.6907 18.5518H96.7787C96.6507 15.8318 94.9227 13.9118 92.4587 13.9118C89.6107 13.9118 88.1067 15.7678 87.6907 18.5518Z" }),
|
|
14656
|
+
/* @__PURE__ */ jsx57("path", { d: "M81.796 11.6398V28.2798H78.564V25.4318C77.38 27.4478 75.428 28.7918 72.676 28.7918C68.644 28.7918 66.596 26.3278 66.596 21.5598V11.6398H69.86V21.4638C69.86 24.2478 71.236 26.0078 73.636 26.0078C76.58 26.0078 78.564 23.4158 78.564 19.8638V11.6398H81.796Z" }),
|
|
14657
|
+
/* @__PURE__ */ jsx57("path", { d: "M60.452 28.2798V2.99983H63.716V28.2798H60.452Z" }),
|
|
14658
|
+
/* @__PURE__ */ jsx57("path", { d: "M53.104 15.2238C56.048 15.8638 57.68 18.2638 57.68 21.4318C57.68 25.4638 54.384 28.2798 49.68 28.2798H38V3.31983H48.848C53.68 3.31983 56.624 5.62383 56.624 9.65583C56.624 12.4078 55.248 14.4558 53.104 15.2238ZM41.328 6.48783V14.0398H47.952C51.312 14.0398 53.168 12.7278 53.168 10.1358C53.168 7.60783 51.28 6.48783 47.792 6.48783H41.328ZM48.72 25.1118C52.24 25.1118 54.16 23.5438 54.16 20.7598C54.16 18.2638 52.272 16.9838 48.848 16.9838H41.328V25.1118H48.72Z" })
|
|
14627
14659
|
] }),
|
|
14628
|
-
/* @__PURE__ */
|
|
14629
|
-
/* @__PURE__ */
|
|
14630
|
-
/* @__PURE__ */
|
|
14660
|
+
/* @__PURE__ */ jsx57("defs", { children: /* @__PURE__ */ jsxs36("linearGradient", { id: gradientId, x1: "47.4999", y1: "35", x2: "51.8397", y2: "-28.0595", gradientUnits: "userSpaceOnUse", children: [
|
|
14661
|
+
/* @__PURE__ */ jsx57("stop", { offset: "0.135528", stopColor: "rgba(91, 33, 182, 1)" /* Purple800 */ }),
|
|
14662
|
+
/* @__PURE__ */ jsx57("stop", { offset: "0.705975", stopColor: "rgba(37, 99, 235, 1)" /* Blue600 */ })
|
|
14631
14663
|
] }) })
|
|
14632
14664
|
] });
|
|
14633
14665
|
}
|
|
14634
14666
|
|
|
14635
14667
|
// src/components/AiPanel.tsx
|
|
14636
14668
|
import { trussProps as trussProps38 } from "@homebound/truss/runtime";
|
|
14637
|
-
import { jsx as
|
|
14669
|
+
import { jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
14638
14670
|
function AiPanel(props) {
|
|
14639
14671
|
const {
|
|
14640
14672
|
rounded = false,
|
|
@@ -14643,7 +14675,7 @@ function AiPanel(props) {
|
|
|
14643
14675
|
...others
|
|
14644
14676
|
} = props;
|
|
14645
14677
|
const tid = useTestIds(others, "aiPanel");
|
|
14646
|
-
return /* @__PURE__ */
|
|
14678
|
+
return /* @__PURE__ */ jsx58("div", { ...trussProps38({
|
|
14647
14679
|
...{
|
|
14648
14680
|
width: "w100",
|
|
14649
14681
|
backgroundImage: "aiBackground",
|
|
@@ -14681,8 +14713,8 @@ function AiCard(props) {
|
|
|
14681
14713
|
},
|
|
14682
14714
|
...gapCss
|
|
14683
14715
|
}), ...tid.column, children: [
|
|
14684
|
-
/* @__PURE__ */
|
|
14685
|
-
/* @__PURE__ */
|
|
14716
|
+
/* @__PURE__ */ jsx58(BlueprintAiLogo, { height: logoHeight }),
|
|
14717
|
+
/* @__PURE__ */ jsx58("div", { ...trussProps38({
|
|
14686
14718
|
display: "df",
|
|
14687
14719
|
flexDirection: "fdc",
|
|
14688
14720
|
width: "w100",
|
|
@@ -14726,7 +14758,7 @@ var aiCardChrome = {
|
|
|
14726
14758
|
|
|
14727
14759
|
// src/components/AiBanner.tsx
|
|
14728
14760
|
import { trussProps as trussProps39 } from "@homebound/truss/runtime";
|
|
14729
|
-
import { jsx as
|
|
14761
|
+
import { jsx as jsx59, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
14730
14762
|
function AiBanner(props) {
|
|
14731
14763
|
const {
|
|
14732
14764
|
title,
|
|
@@ -14735,10 +14767,10 @@ function AiBanner(props) {
|
|
|
14735
14767
|
secondaryAction
|
|
14736
14768
|
} = props;
|
|
14737
14769
|
const tid = useTestIds(props, "aiBanner");
|
|
14738
|
-
return /* @__PURE__ */
|
|
14770
|
+
return /* @__PURE__ */ jsx59(AiPanel, { padding: "sm", ...tid, children: /* @__PURE__ */ jsx59(AiCard, { size: "sm", ...tid, children: /* @__PURE__ */ jsxs38("div", { className: "df aic jcsb g_2 w100 fww pt_12px pb2 pl2 pr2", children: [
|
|
14739
14771
|
/* @__PURE__ */ jsxs38("div", { className: "df fdc g_4px fg1 fb_0 mw_240px", children: [
|
|
14740
|
-
/* @__PURE__ */
|
|
14741
|
-
message && /* @__PURE__ */
|
|
14772
|
+
/* @__PURE__ */ jsx59("span", { className: "fw6 fz_14px lh_20px purple700 aiBoldBg bgcl_text WebkitBackgroundClip_text wktfc_transparent", ...tid.title, children: title }),
|
|
14773
|
+
message && /* @__PURE__ */ jsx59("span", { ...trussProps39({
|
|
14742
14774
|
fontWeight: "fw4",
|
|
14743
14775
|
fontSize: "fz_12px",
|
|
14744
14776
|
lineHeight: "lh_16px",
|
|
@@ -14748,15 +14780,15 @@ function AiBanner(props) {
|
|
|
14748
14780
|
}), ...tid.message, children: message })
|
|
14749
14781
|
] }),
|
|
14750
14782
|
(primaryAction || secondaryAction) && /* @__PURE__ */ jsxs38("div", { className: "df aic g_2 fs0", children: [
|
|
14751
|
-
secondaryAction && /* @__PURE__ */
|
|
14752
|
-
primaryAction && /* @__PURE__ */
|
|
14783
|
+
secondaryAction && /* @__PURE__ */ jsx59(Button, { ...secondaryAction, variant: "quaternary" }),
|
|
14784
|
+
primaryAction && /* @__PURE__ */ jsx59(Button, { ...primaryAction, variant: "ai" })
|
|
14753
14785
|
] })
|
|
14754
14786
|
] }) }) });
|
|
14755
14787
|
}
|
|
14756
14788
|
|
|
14757
14789
|
// src/components/LinkCard.tsx
|
|
14758
14790
|
import { trussProps as trussProps40 } from "@homebound/truss/runtime";
|
|
14759
|
-
import { jsx as
|
|
14791
|
+
import { jsx as jsx60, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
14760
14792
|
function LinkCard(props) {
|
|
14761
14793
|
const {
|
|
14762
14794
|
title,
|
|
@@ -14788,7 +14820,7 @@ function LinkCard(props) {
|
|
|
14788
14820
|
...tid,
|
|
14789
14821
|
children: [
|
|
14790
14822
|
/* @__PURE__ */ jsxs39("div", { className: "df fdc g_4px fg1 mw0 wbbw", children: [
|
|
14791
|
-
/* @__PURE__ */
|
|
14823
|
+
/* @__PURE__ */ jsx60("span", { ...trussProps40({
|
|
14792
14824
|
fontWeight: "fw6",
|
|
14793
14825
|
fontSize: "fz_14px",
|
|
14794
14826
|
lineHeight: "lh_20px",
|
|
@@ -14796,7 +14828,7 @@ function LinkCard(props) {
|
|
|
14796
14828
|
"--color": "var(--b-on-surface)"
|
|
14797
14829
|
}]
|
|
14798
14830
|
}), ...tid.title, children: title }),
|
|
14799
|
-
message && /* @__PURE__ */
|
|
14831
|
+
message && /* @__PURE__ */ jsx60("span", { ...trussProps40({
|
|
14800
14832
|
fontWeight: "fw4",
|
|
14801
14833
|
fontSize: "fz_12px",
|
|
14802
14834
|
lineHeight: "lh_16px",
|
|
@@ -14805,29 +14837,29 @@ function LinkCard(props) {
|
|
|
14805
14837
|
}]
|
|
14806
14838
|
}), ...tid.message, children: message })
|
|
14807
14839
|
] }),
|
|
14808
|
-
/* @__PURE__ */
|
|
14840
|
+
/* @__PURE__ */ jsx60("div", { className: "df aic fs0 h5", children: /* @__PURE__ */ jsx60(IconButton, { icon: "arrowRight", color: "--b-text-link-default" /* TextLinkDefault */, ...action, label: title, preventTooltip: true, ...tid.action }) })
|
|
14809
14841
|
]
|
|
14810
14842
|
}
|
|
14811
14843
|
);
|
|
14812
14844
|
}
|
|
14813
14845
|
|
|
14814
14846
|
// src/components/AiLinkCardGroup.tsx
|
|
14815
|
-
import { jsx as
|
|
14847
|
+
import { jsx as jsx61, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
14816
14848
|
function AiLinkCardGroup(props) {
|
|
14817
14849
|
const {
|
|
14818
14850
|
cards
|
|
14819
14851
|
} = props;
|
|
14820
14852
|
const tid = useTestIds(props, "aiLinkCardGroup");
|
|
14821
14853
|
if (cards.length === 0) return null;
|
|
14822
|
-
return /* @__PURE__ */
|
|
14823
|
-
/* @__PURE__ */
|
|
14824
|
-
cards.map((card) => /* @__PURE__ */
|
|
14854
|
+
return /* @__PURE__ */ jsx61(AiPanel, { padding: "lg", ...tid, children: /* @__PURE__ */ jsxs40("div", { className: "df fdc aifs g_2 w100", children: [
|
|
14855
|
+
/* @__PURE__ */ jsx61(BlueprintAiLogo, { height: 3 }),
|
|
14856
|
+
cards.map((card) => /* @__PURE__ */ jsx61(LinkCard, { ...card }, card.title))
|
|
14825
14857
|
] }) });
|
|
14826
14858
|
}
|
|
14827
14859
|
|
|
14828
14860
|
// src/components/AiLoader.tsx
|
|
14829
14861
|
import { trussProps as trussProps41, maybeCssVar as maybeCssVar25 } from "@homebound/truss/runtime";
|
|
14830
|
-
import { jsx as
|
|
14862
|
+
import { jsx as jsx62 } from "react/jsx-runtime";
|
|
14831
14863
|
function AiLoader(props) {
|
|
14832
14864
|
const {
|
|
14833
14865
|
inc = 3,
|
|
@@ -14836,7 +14868,7 @@ function AiLoader(props) {
|
|
|
14836
14868
|
} = props;
|
|
14837
14869
|
const tid = useTestIds(props, "aiLoader");
|
|
14838
14870
|
const gap = increment(inc) / 6;
|
|
14839
|
-
return /* @__PURE__ */
|
|
14871
|
+
return /* @__PURE__ */ jsx62("div", { role: "img", "aria-label": label, ...trussProps41({
|
|
14840
14872
|
...{
|
|
14841
14873
|
display: "df",
|
|
14842
14874
|
alignItems: "aic",
|
|
@@ -14853,7 +14885,7 @@ function AiLoader(props) {
|
|
|
14853
14885
|
}]
|
|
14854
14886
|
},
|
|
14855
14887
|
...xss
|
|
14856
|
-
}), ...tid, children: [0, 1, 2].map((i) => /* @__PURE__ */
|
|
14888
|
+
}), ...tid, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx62("span", { ...trussProps41(starStyles(i, inc)), ...tid[`star${i + 1}`], children: /* @__PURE__ */ jsx62(Icon, { icon: "aiStar", inc: inc * 1.4, xss: {
|
|
14857
14889
|
flexShrink: "fs0"
|
|
14858
14890
|
} }) }, i)) });
|
|
14859
14891
|
}
|
|
@@ -14878,7 +14910,7 @@ function starStyles(index, inc) {
|
|
|
14878
14910
|
|
|
14879
14911
|
// src/components/AiLoadingPanel.tsx
|
|
14880
14912
|
import { trussProps as trussProps42 } from "@homebound/truss/runtime";
|
|
14881
|
-
import { jsx as
|
|
14913
|
+
import { jsx as jsx63, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
14882
14914
|
function AiLoadingPanel(props) {
|
|
14883
14915
|
const {
|
|
14884
14916
|
title = "Importing Details...",
|
|
@@ -14890,10 +14922,10 @@ function AiLoadingPanel(props) {
|
|
|
14890
14922
|
const card = (
|
|
14891
14923
|
// `status` rather than `alert` so assistive tech waits for a pause instead of interrupting, and
|
|
14892
14924
|
// `aria-busy` so it knows the surrounding content is still settling.
|
|
14893
|
-
/* @__PURE__ */
|
|
14894
|
-
/* @__PURE__ */
|
|
14895
|
-
/* @__PURE__ */
|
|
14896
|
-
/* @__PURE__ */
|
|
14925
|
+
/* @__PURE__ */ jsx63(AiCard, { role: "status", "aria-busy": true, size: "lg", ...tid, children: /* @__PURE__ */ jsxs41("div", { className: "df fdc aic g_1 w100 pt2 pb2 pl3 pr3", children: [
|
|
14926
|
+
/* @__PURE__ */ jsx63(AiLoader, {}),
|
|
14927
|
+
/* @__PURE__ */ jsx63("span", { className: "fw6 fz_18px lh_28px purple700 aiBoldBg bgcl_text WebkitBackgroundClip_text wktfc_transparent", ...tid.title, children: title }),
|
|
14928
|
+
/* @__PURE__ */ jsx63("span", { ...trussProps42({
|
|
14897
14929
|
fontWeight: "fw4",
|
|
14898
14930
|
fontSize: "fz_14px",
|
|
14899
14931
|
lineHeight: "lh_20px",
|
|
@@ -14919,16 +14951,16 @@ function AiLoadingPanel(props) {
|
|
|
14919
14951
|
fontSize: "fz_12px",
|
|
14920
14952
|
lineHeight: "lh_16px"
|
|
14921
14953
|
}), children: [
|
|
14922
|
-
/* @__PURE__ */
|
|
14923
|
-
/* @__PURE__ */
|
|
14954
|
+
/* @__PURE__ */ jsx63(Icon, { icon: "time", inc: 2 }),
|
|
14955
|
+
/* @__PURE__ */ jsx63("span", { ...tid.progressText, children: progressText })
|
|
14924
14956
|
] })
|
|
14925
14957
|
] }) })
|
|
14926
14958
|
);
|
|
14927
|
-
return omitBg ? card : /* @__PURE__ */
|
|
14959
|
+
return omitBg ? card : /* @__PURE__ */ jsx63(AiPanel, { padding: "lg", ...tid, children: card });
|
|
14928
14960
|
}
|
|
14929
14961
|
|
|
14930
14962
|
// src/components/AiSlimBanner.tsx
|
|
14931
|
-
import { jsx as
|
|
14963
|
+
import { jsx as jsx64, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
14932
14964
|
function AiSlimBanner(props) {
|
|
14933
14965
|
const {
|
|
14934
14966
|
title,
|
|
@@ -14936,12 +14968,12 @@ function AiSlimBanner(props) {
|
|
|
14936
14968
|
} = props;
|
|
14937
14969
|
const tid = useTestIds(props, "aiSlimBanner");
|
|
14938
14970
|
return /* @__PURE__ */ jsxs42("div", { className: "df ais g_2 w100 pl2 pr2 fw4 fz_12px lh_16px aiBackground", ...tid, children: [
|
|
14939
|
-
/* @__PURE__ */
|
|
14971
|
+
/* @__PURE__ */ jsx64("span", { className: "df aic jcc fs0 pt1 pb1 w_12px h_32px", children: /* @__PURE__ */ jsx64(Icon, { icon: "aiStar", inc: 2.125, xss: {
|
|
14940
14972
|
flexShrink: "fs0"
|
|
14941
14973
|
} }) }),
|
|
14942
14974
|
/* @__PURE__ */ jsxs42("div", { className: "df aic jcsb g_2 fg1 mw0", children: [
|
|
14943
|
-
/* @__PURE__ */
|
|
14944
|
-
action && /* @__PURE__ */
|
|
14975
|
+
/* @__PURE__ */ jsx64("span", { className: "fw6 fz_12px lh_16px purple700 aiBoldBg bgcl_text WebkitBackgroundClip_text wktfc_transparent pt1 pb1 mw0", ...tid.title, children: title }),
|
|
14976
|
+
action && /* @__PURE__ */ jsx64("div", { className: "fs0", children: /* @__PURE__ */ jsx64(Button, { ...action, variant: "text" }) })
|
|
14945
14977
|
] })
|
|
14946
14978
|
] });
|
|
14947
14979
|
}
|
|
@@ -14951,7 +14983,7 @@ import { useEffect as useEffect12 } from "react";
|
|
|
14951
14983
|
|
|
14952
14984
|
// src/components/AutoSaveStatus/AutoSaveStatusProvider.tsx
|
|
14953
14985
|
import React10, { useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo16, useRef as useRef22, useState as useState20 } from "react";
|
|
14954
|
-
import { jsx as
|
|
14986
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
14955
14987
|
var AutoSaveStatus = /* @__PURE__ */ ((AutoSaveStatus2) => {
|
|
14956
14988
|
AutoSaveStatus2["IDLE"] = "idle";
|
|
14957
14989
|
AutoSaveStatus2["SAVING"] = "saving";
|
|
@@ -15005,13 +15037,13 @@ function AutoSaveStatusProvider({ children, resetToIdleTimeout = 6e3 }) {
|
|
|
15005
15037
|
() => ({ status, resetStatus, errors, triggerAutoSave, resolveAutoSave }),
|
|
15006
15038
|
[errors, resetStatus, resolveAutoSave, status, triggerAutoSave]
|
|
15007
15039
|
);
|
|
15008
|
-
return /* @__PURE__ */
|
|
15040
|
+
return /* @__PURE__ */ jsx65(AutoSaveStatusContext.Provider, { value, children });
|
|
15009
15041
|
}
|
|
15010
15042
|
|
|
15011
15043
|
// src/components/AutoSaveStatus/useAutoSaveStatus.ts
|
|
15012
|
-
import { useContext as
|
|
15044
|
+
import { useContext as useContext15 } from "react";
|
|
15013
15045
|
function useAutoSaveStatus() {
|
|
15014
|
-
return
|
|
15046
|
+
return useContext15(AutoSaveStatusContext);
|
|
15015
15047
|
}
|
|
15016
15048
|
|
|
15017
15049
|
// src/types.ts
|
|
@@ -15021,7 +15053,7 @@ function assertNever(x) {
|
|
|
15021
15053
|
|
|
15022
15054
|
// src/components/AutoSaveIndicator.tsx
|
|
15023
15055
|
import { trussProps as trussProps43 } from "@homebound/truss/runtime";
|
|
15024
|
-
import { jsx as
|
|
15056
|
+
import { jsx as jsx66, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
15025
15057
|
function AutoSaveIndicator({
|
|
15026
15058
|
hideOnIdle,
|
|
15027
15059
|
doNotReset
|
|
@@ -15042,11 +15074,11 @@ function AutoSaveIndicator({
|
|
|
15042
15074
|
);
|
|
15043
15075
|
switch (status) {
|
|
15044
15076
|
case "idle" /* IDLE */:
|
|
15045
|
-
return hideOnIdle ? null : /* @__PURE__ */
|
|
15077
|
+
return hideOnIdle ? null : /* @__PURE__ */ jsx66(Indicator, { icon: "cloudSave" });
|
|
15046
15078
|
case "saving" /* SAVING */:
|
|
15047
|
-
return /* @__PURE__ */
|
|
15079
|
+
return /* @__PURE__ */ jsx66(Indicator, { icon: "refresh", text: "Saving..." });
|
|
15048
15080
|
case "done" /* DONE */:
|
|
15049
|
-
return /* @__PURE__ */
|
|
15081
|
+
return /* @__PURE__ */ jsx66(Indicator, { icon: "cloudSave", text: "Saved" });
|
|
15050
15082
|
case "error" /* ERROR */:
|
|
15051
15083
|
return (
|
|
15052
15084
|
/**
|
|
@@ -15054,7 +15086,7 @@ function AutoSaveIndicator({
|
|
|
15054
15086
|
* rendering it far away from the Icon/Text. Wrap it with a div to constrain
|
|
15055
15087
|
* it.
|
|
15056
15088
|
*/
|
|
15057
|
-
/* @__PURE__ */
|
|
15089
|
+
/* @__PURE__ */ jsx66("div", { className: "dif", children: /* @__PURE__ */ jsx66(Tooltip, { title: String(errors), placement: "bottom", children: /* @__PURE__ */ jsx66(Indicator, { icon: "error", color: "--b-danger" /* Danger */, text: "Error saving" }) }) })
|
|
15058
15090
|
);
|
|
15059
15091
|
default:
|
|
15060
15092
|
assertNever(status);
|
|
@@ -15076,7 +15108,7 @@ function Indicator({
|
|
|
15076
15108
|
fontSize: "fz_14px",
|
|
15077
15109
|
lineHeight: "lh_20px"
|
|
15078
15110
|
}), children: [
|
|
15079
|
-
/* @__PURE__ */
|
|
15111
|
+
/* @__PURE__ */ jsx66(Icon, { icon, color }),
|
|
15080
15112
|
text
|
|
15081
15113
|
] });
|
|
15082
15114
|
}
|
|
@@ -15088,7 +15120,7 @@ import { useMenuTriggerState as useMenuTriggerState2 } from "react-stately";
|
|
|
15088
15120
|
|
|
15089
15121
|
// src/components/internal/ContextualModal.tsx
|
|
15090
15122
|
import { FocusScope as FocusScope2 } from "react-aria";
|
|
15091
|
-
import { jsx as
|
|
15123
|
+
import { jsx as jsx67, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
15092
15124
|
function ContextualModal(props) {
|
|
15093
15125
|
const {
|
|
15094
15126
|
content: content2,
|
|
@@ -15096,14 +15128,14 @@ function ContextualModal(props) {
|
|
|
15096
15128
|
close
|
|
15097
15129
|
} = props;
|
|
15098
15130
|
const tid = useTestIds(props, "popup");
|
|
15099
|
-
return /* @__PURE__ */
|
|
15100
|
-
title && /* @__PURE__ */
|
|
15101
|
-
/* @__PURE__ */
|
|
15131
|
+
return /* @__PURE__ */ jsx67(FocusScope2, { restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsxs44("div", { className: "pt3 pb3 pr3 pl3 df fdc g_3 bgWhite bshModal br4 maxh_inherit oa", ...tid, children: [
|
|
15132
|
+
title && /* @__PURE__ */ jsx67("div", { className: "fw6 fz_18px lh_28px tac", ...tid.title, children: title }),
|
|
15133
|
+
/* @__PURE__ */ jsx67("div", { ...tid.content, children: typeof content2 === "function" ? content2(close) : content2 })
|
|
15102
15134
|
] }) });
|
|
15103
15135
|
}
|
|
15104
15136
|
|
|
15105
15137
|
// src/components/ButtonModal.tsx
|
|
15106
|
-
import { jsx as
|
|
15138
|
+
import { jsx as jsx68 } from "react/jsx-runtime";
|
|
15107
15139
|
function ButtonModal(props) {
|
|
15108
15140
|
const { storybookDefaultOpen, trigger, disabled, content: content2, title } = props;
|
|
15109
15141
|
const state = useMenuTriggerState2({ isOpen: storybookDefaultOpen });
|
|
@@ -15113,12 +15145,12 @@ function ButtonModal(props) {
|
|
|
15113
15145
|
props,
|
|
15114
15146
|
isTextButton(trigger) ? labelOr(trigger, "buttonModal") : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name
|
|
15115
15147
|
);
|
|
15116
|
-
return /* @__PURE__ */
|
|
15148
|
+
return /* @__PURE__ */ jsx68(OverlayTrigger, { ...props, menuTriggerProps, state, buttonRef, ...tid, children: /* @__PURE__ */ jsx68(ContextualModal, { content: content2, title, close: state.close }) });
|
|
15117
15149
|
}
|
|
15118
15150
|
|
|
15119
15151
|
// src/components/Avatar/AvatarGroup.tsx
|
|
15120
15152
|
import { trussProps as trussProps44 } from "@homebound/truss/runtime";
|
|
15121
|
-
import { jsx as
|
|
15153
|
+
import { jsx as jsx69, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
15122
15154
|
function AvatarGroup(props) {
|
|
15123
15155
|
const {
|
|
15124
15156
|
avatars,
|
|
@@ -15128,7 +15160,7 @@ function AvatarGroup(props) {
|
|
|
15128
15160
|
const visibleAvatars = avatars.slice(0, maxVisibleAvatars);
|
|
15129
15161
|
const menuAvatars = avatars.slice(maxVisibleAvatars);
|
|
15130
15162
|
return /* @__PURE__ */ jsxs45("div", { className: "df aic g_1 fw6 fz_12px lh_16px", children: [
|
|
15131
|
-
/* @__PURE__ */
|
|
15163
|
+
/* @__PURE__ */ jsx69("div", { className: "df aic", children: visibleAvatars.map((avatar, idx) => /* @__PURE__ */ jsx69("div", { ...trussProps44({
|
|
15132
15164
|
borderRadius: "br100",
|
|
15133
15165
|
borderStyle: "bss",
|
|
15134
15166
|
borderWidth: "bw_3px",
|
|
@@ -15138,11 +15170,11 @@ function AvatarGroup(props) {
|
|
|
15138
15170
|
"--marginLeft": `${-1 * sizeToOverlap[size]}px`
|
|
15139
15171
|
}]
|
|
15140
15172
|
} : {}
|
|
15141
|
-
}), children: /* @__PURE__ */
|
|
15142
|
-
menuAvatars.length > 0 && /* @__PURE__ */
|
|
15173
|
+
}), children: /* @__PURE__ */ jsx69(Avatar, { src: avatar.src, name: avatar.name, size }) }, avatar.src ?? idx)) }),
|
|
15174
|
+
menuAvatars.length > 0 && /* @__PURE__ */ jsx69(ButtonModal, { trigger: {
|
|
15143
15175
|
label: `+ ${menuAvatars.length} more`,
|
|
15144
15176
|
variant: "text"
|
|
15145
|
-
}, hideEndAdornment: true, content: /* @__PURE__ */
|
|
15177
|
+
}, hideEndAdornment: true, content: /* @__PURE__ */ jsx69("div", { className: "df fdc g_1 mt_neg12px mb_neg12px mr_neg12px ml_neg12px", children: menuAvatars.map((a, idx) => /* @__PURE__ */ jsx69(Avatar, { src: a.src, name: a.name, showName: true, size: "md" }, a.src ?? idx)) }) })
|
|
15146
15178
|
] });
|
|
15147
15179
|
}
|
|
15148
15180
|
var sizeToOverlap = {
|
|
@@ -15154,7 +15186,7 @@ var sizeToOverlap = {
|
|
|
15154
15186
|
|
|
15155
15187
|
// src/components/Banner.tsx
|
|
15156
15188
|
import { trussProps as trussProps45 } from "@homebound/truss/runtime";
|
|
15157
|
-
import { jsx as
|
|
15189
|
+
import { jsx as jsx70, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
15158
15190
|
function Banner(props) {
|
|
15159
15191
|
const {
|
|
15160
15192
|
type,
|
|
@@ -15182,9 +15214,9 @@ function Banner(props) {
|
|
|
15182
15214
|
boxShadow: "bshBasic"
|
|
15183
15215
|
}
|
|
15184
15216
|
}), ...tid, role: "alert", children: [
|
|
15185
|
-
showIcon && /* @__PURE__ */
|
|
15186
|
-
/* @__PURE__ */
|
|
15187
|
-
onClose && /* @__PURE__ */
|
|
15217
|
+
showIcon && /* @__PURE__ */ jsx70("span", { className: "fs0", children: /* @__PURE__ */ jsx70(Icon, { icon: typeToIcon[type], ...tid.type, color: "rgba(36, 36, 36, 1)" /* Gray900 */ }) }),
|
|
15218
|
+
/* @__PURE__ */ jsx70("span", { className: "fg1", ...tid.message, children: message }),
|
|
15219
|
+
onClose && /* @__PURE__ */ jsx70("span", { className: "lh_0", children: /* @__PURE__ */ jsx70(IconButton, { icon: "x", onClick: onClose, ...tid.close, color: "rgba(36, 36, 36, 1)" /* Gray900 */ }) })
|
|
15188
15220
|
] });
|
|
15189
15221
|
}
|
|
15190
15222
|
var typeToIcon = {
|
|
@@ -15248,7 +15280,7 @@ function matchMediaBreakpoints() {
|
|
|
15248
15280
|
}
|
|
15249
15281
|
|
|
15250
15282
|
// src/components/Breadcrumbs.tsx
|
|
15251
|
-
import { Fragment as Fragment21, jsx as
|
|
15283
|
+
import { Fragment as Fragment21, jsx as jsx71, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
15252
15284
|
function Breadcrumbs({
|
|
15253
15285
|
breadcrumbs
|
|
15254
15286
|
}) {
|
|
@@ -15264,8 +15296,8 @@ function Breadcrumbs({
|
|
|
15264
15296
|
return (
|
|
15265
15297
|
// Index is added to the key to prevent rendering issues when multiple items have the same label
|
|
15266
15298
|
/* @__PURE__ */ jsxs47(Fragment20, { children: [
|
|
15267
|
-
index > 0 && /* @__PURE__ */
|
|
15268
|
-
/* @__PURE__ */
|
|
15299
|
+
index > 0 && /* @__PURE__ */ jsx71("span", { className: "fs0 fw4 fz_12px lh_16px", children: "/" }),
|
|
15300
|
+
/* @__PURE__ */ jsx71(Link5, { ...tid.link, to: bc.href, title: bc.label, ...trussProps46({
|
|
15269
15301
|
...{
|
|
15270
15302
|
fontWeight: "fw4",
|
|
15271
15303
|
fontSize: "fz_12px",
|
|
@@ -15284,10 +15316,10 @@ function Breadcrumbs({
|
|
|
15284
15316
|
] }, `${bc.label}-${index}`)
|
|
15285
15317
|
);
|
|
15286
15318
|
}
|
|
15287
|
-
return /* @__PURE__ */
|
|
15319
|
+
return /* @__PURE__ */ jsx71("div", { className: "df aic g_4px", children: shouldCollapse ? /* @__PURE__ */ jsxs47(Fragment21, { children: [
|
|
15288
15320
|
items.slice(0, leadCount).map((bc, i) => renderBreadcrumb(bc, i)),
|
|
15289
|
-
/* @__PURE__ */
|
|
15290
|
-
/* @__PURE__ */
|
|
15321
|
+
/* @__PURE__ */ jsx71("span", { className: "fs0 fw4 fz_12px lh_16px", children: "/" }),
|
|
15322
|
+
/* @__PURE__ */ jsx71("button", { ...tid.expand, className: "fw4 fz_12px lh_16px gray900 h_gray600", onClick: () => setCollapsed(false), children: "..." }),
|
|
15291
15323
|
renderBreadcrumb(items[items.length - 1], items.length - 1, true)
|
|
15292
15324
|
] }) : items.map((bc, i) => renderBreadcrumb(bc, i, i === items.length - 1)) });
|
|
15293
15325
|
}
|
|
@@ -15405,7 +15437,7 @@ function dateMatchersToDayPickerMatchers(matchers) {
|
|
|
15405
15437
|
import { useRef as useRef24 } from "react";
|
|
15406
15438
|
import { useDayRender } from "react-day-picker";
|
|
15407
15439
|
import { trussProps as trussProps47, mergeProps as mergeProps15 } from "@homebound/truss/runtime";
|
|
15408
|
-
import { Fragment as Fragment22, jsx as
|
|
15440
|
+
import { Fragment as Fragment22, jsx as jsx72, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
15409
15441
|
function Day(props) {
|
|
15410
15442
|
const tid = useTestIds(props, "datePickerDay");
|
|
15411
15443
|
const buttonRef = useRef24(null);
|
|
@@ -15417,10 +15449,10 @@ function Day(props) {
|
|
|
15417
15449
|
divProps
|
|
15418
15450
|
} = useDayRender(props.date, props.displayMonth, buttonRef);
|
|
15419
15451
|
if (isHidden) {
|
|
15420
|
-
return /* @__PURE__ */
|
|
15452
|
+
return /* @__PURE__ */ jsx72(Fragment22, {});
|
|
15421
15453
|
}
|
|
15422
15454
|
if (!isButton) {
|
|
15423
|
-
return /* @__PURE__ */
|
|
15455
|
+
return /* @__PURE__ */ jsx72("div", { ...divProps });
|
|
15424
15456
|
}
|
|
15425
15457
|
const {
|
|
15426
15458
|
className,
|
|
@@ -15484,8 +15516,8 @@ function Day(props) {
|
|
|
15484
15516
|
}]
|
|
15485
15517
|
}
|
|
15486
15518
|
}), children: [
|
|
15487
|
-
/* @__PURE__ */
|
|
15488
|
-
indicatorDot && /* @__PURE__ */
|
|
15519
|
+
/* @__PURE__ */ jsx72("div", { className: "mt_neg2px", children }),
|
|
15520
|
+
indicatorDot && /* @__PURE__ */ jsx72(
|
|
15489
15521
|
"div",
|
|
15490
15522
|
{
|
|
15491
15523
|
...trussProps47({
|
|
@@ -15507,21 +15539,21 @@ function Day(props) {
|
|
|
15507
15539
|
}
|
|
15508
15540
|
)
|
|
15509
15541
|
] }),
|
|
15510
|
-
showRangeStyles && range_start && /* @__PURE__ */
|
|
15542
|
+
showRangeStyles && range_start && /* @__PURE__ */ jsx72("span", { ...trussProps47({
|
|
15511
15543
|
...rangeBaseStyles,
|
|
15512
15544
|
...{
|
|
15513
15545
|
right: "r_neg2px",
|
|
15514
15546
|
width: "w_8px"
|
|
15515
15547
|
}
|
|
15516
15548
|
}) }),
|
|
15517
|
-
showRangeStyles && range_end && /* @__PURE__ */
|
|
15549
|
+
showRangeStyles && range_end && /* @__PURE__ */ jsx72("span", { ...trussProps47({
|
|
15518
15550
|
...rangeBaseStyles,
|
|
15519
15551
|
...{
|
|
15520
15552
|
width: "w_8px",
|
|
15521
15553
|
left: "l_neg2px"
|
|
15522
15554
|
}
|
|
15523
15555
|
}) }),
|
|
15524
|
-
showRangeStyles && range_middle && /* @__PURE__ */
|
|
15556
|
+
showRangeStyles && range_middle && /* @__PURE__ */ jsx72("span", { ...trussProps47({
|
|
15525
15557
|
...rangeBaseStyles,
|
|
15526
15558
|
...{
|
|
15527
15559
|
left: "l_neg2px"
|
|
@@ -15543,7 +15575,7 @@ var rangeBaseStyles = {
|
|
|
15543
15575
|
import { addMonths, addYears } from "date-fns";
|
|
15544
15576
|
import { useNavigation } from "react-day-picker";
|
|
15545
15577
|
import { trussProps as trussProps48 } from "@homebound/truss/runtime";
|
|
15546
|
-
import { jsx as
|
|
15578
|
+
import { jsx as jsx73, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
15547
15579
|
function Header(props) {
|
|
15548
15580
|
const {
|
|
15549
15581
|
displayMonth
|
|
@@ -15553,10 +15585,10 @@ function Header(props) {
|
|
|
15553
15585
|
goToMonth
|
|
15554
15586
|
} = useNavigation();
|
|
15555
15587
|
return /* @__PURE__ */ jsxs49("div", { className: "df jcsb aic ml_12px mr_2px h_32px", children: [
|
|
15556
|
-
/* @__PURE__ */
|
|
15588
|
+
/* @__PURE__ */ jsx73("h1", { className: "fw4 fz_16px lh_24px", children: formatPlainDate(displayMonthDate, "monthYear") }),
|
|
15557
15589
|
/* @__PURE__ */ jsxs49("div", { children: [
|
|
15558
|
-
/* @__PURE__ */
|
|
15559
|
-
/* @__PURE__ */
|
|
15590
|
+
/* @__PURE__ */ jsx73(IconButton, { color: "--b-on-surface-muted" /* OnSurfaceMuted */, icon: "chevronLeft", onClick: () => goToMonth(addMonths(displayMonth, -1)) }),
|
|
15591
|
+
/* @__PURE__ */ jsx73(IconButton, { color: "--b-on-surface-muted" /* OnSurfaceMuted */, icon: "chevronRight", onClick: () => goToMonth(addMonths(displayMonth, 1)) })
|
|
15560
15592
|
] })
|
|
15561
15593
|
] });
|
|
15562
15594
|
}
|
|
@@ -15570,8 +15602,8 @@ function YearSkipHeader(props) {
|
|
|
15570
15602
|
} = useNavigation();
|
|
15571
15603
|
return /* @__PURE__ */ jsxs49("div", { className: "df jcsb aic ml_12px mr_12px h_32px", children: [
|
|
15572
15604
|
/* @__PURE__ */ jsxs49("div", { className: "df fdr jcsb", children: [
|
|
15573
|
-
/* @__PURE__ */
|
|
15574
|
-
/* @__PURE__ */
|
|
15605
|
+
/* @__PURE__ */ jsx73(IconButton, { color: "--b-on-surface-muted" /* OnSurfaceMuted */, icon: "chevronLeft", onClick: () => goToMonth(addMonths(displayMonth, -1)) }),
|
|
15606
|
+
/* @__PURE__ */ jsx73("h1", { ...trussProps48({
|
|
15575
15607
|
fontWeight: "fw4",
|
|
15576
15608
|
fontSize: "fz_16px",
|
|
15577
15609
|
lineHeight: "lh_24px",
|
|
@@ -15579,11 +15611,11 @@ function YearSkipHeader(props) {
|
|
|
15579
15611
|
"--color": "var(--b-on-surface)"
|
|
15580
15612
|
}]
|
|
15581
15613
|
}), children: formatPlainDate(displayMonthDate, "shortMonth") }),
|
|
15582
|
-
/* @__PURE__ */
|
|
15614
|
+
/* @__PURE__ */ jsx73(IconButton, { color: "--b-on-surface-muted" /* OnSurfaceMuted */, icon: "chevronRight", onClick: () => goToMonth(addMonths(displayMonth, 1)) })
|
|
15583
15615
|
] }),
|
|
15584
15616
|
/* @__PURE__ */ jsxs49("div", { className: "df fdr jcsb", children: [
|
|
15585
|
-
/* @__PURE__ */
|
|
15586
|
-
/* @__PURE__ */
|
|
15617
|
+
/* @__PURE__ */ jsx73(IconButton, { color: "--b-on-surface-muted" /* OnSurfaceMuted */, icon: "chevronLeft", onClick: () => goToMonth(addYears(displayMonth, -1)) }),
|
|
15618
|
+
/* @__PURE__ */ jsx73("h1", { ...trussProps48({
|
|
15587
15619
|
fontWeight: "fw4",
|
|
15588
15620
|
fontSize: "fz_16px",
|
|
15589
15621
|
lineHeight: "lh_24px",
|
|
@@ -15591,14 +15623,14 @@ function YearSkipHeader(props) {
|
|
|
15591
15623
|
"--color": "var(--b-on-surface)"
|
|
15592
15624
|
}]
|
|
15593
15625
|
}), children: formatPlainDate(displayMonthDate, "year") }),
|
|
15594
|
-
/* @__PURE__ */
|
|
15626
|
+
/* @__PURE__ */ jsx73(IconButton, { color: "--b-on-surface-muted" /* OnSurfaceMuted */, icon: "chevronRight", onClick: () => goToMonth(addYears(displayMonth, 1)) })
|
|
15595
15627
|
] })
|
|
15596
15628
|
] });
|
|
15597
15629
|
}
|
|
15598
15630
|
|
|
15599
15631
|
// src/components/internal/DatePicker/WeekHeader.tsx
|
|
15600
15632
|
import { trussProps as trussProps49 } from "@homebound/truss/runtime";
|
|
15601
|
-
import { jsx as
|
|
15633
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
15602
15634
|
import { createElement as createElement2 } from "react";
|
|
15603
15635
|
function WeekHeader() {
|
|
15604
15636
|
const today = todayPlainDate();
|
|
@@ -15611,7 +15643,7 @@ function WeekHeader() {
|
|
|
15611
15643
|
days: i
|
|
15612
15644
|
}));
|
|
15613
15645
|
}
|
|
15614
|
-
return /* @__PURE__ */
|
|
15646
|
+
return /* @__PURE__ */ jsx74("thead", { className: "rdp-head", children: /* @__PURE__ */ jsx74("tr", { className: "rdp-head_row", children: days.map((day) => /* @__PURE__ */ createElement2("th", { scope: "col", ...trussProps49({
|
|
15615
15647
|
paddingTop: "pt1",
|
|
15616
15648
|
paddingBottom: "pb_12px",
|
|
15617
15649
|
paddingRight: "pr1",
|
|
@@ -15622,12 +15654,12 @@ function WeekHeader() {
|
|
|
15622
15654
|
color: ["color_var", {
|
|
15623
15655
|
"--color": "var(--b-on-surface-muted)"
|
|
15624
15656
|
}]
|
|
15625
|
-
}), key: formatPlainDate(day, "weekday") }, /* @__PURE__ */
|
|
15657
|
+
}), key: formatPlainDate(day, "weekday") }, /* @__PURE__ */ jsx74("span", { "aria-hidden": "true", children: formatPlainDate(day, "weekdayInitial") }), /* @__PURE__ */ jsx74("span", { className: "rdp-vhidden", children: formatPlainDate(day, "weekday") }))) }) });
|
|
15626
15658
|
}
|
|
15627
15659
|
|
|
15628
15660
|
// src/components/internal/DatePicker/DatePicker.tsx
|
|
15629
15661
|
import { trussProps as trussProps50 } from "@homebound/truss/runtime";
|
|
15630
|
-
import { jsx as
|
|
15662
|
+
import { jsx as jsx75 } from "react/jsx-runtime";
|
|
15631
15663
|
function DatePicker(props) {
|
|
15632
15664
|
const {
|
|
15633
15665
|
value,
|
|
@@ -15637,7 +15669,7 @@ function DatePicker(props) {
|
|
|
15637
15669
|
useYearPicker
|
|
15638
15670
|
} = props;
|
|
15639
15671
|
const tid = useTestIds(props, "datePicker");
|
|
15640
|
-
return /* @__PURE__ */
|
|
15672
|
+
return /* @__PURE__ */ jsx75("div", { ...trussProps50({
|
|
15641
15673
|
display: "dib",
|
|
15642
15674
|
backgroundColor: ["bgColor_var", {
|
|
15643
15675
|
"--backgroundColor": "var(--b-surface-raised)"
|
|
@@ -15645,7 +15677,7 @@ function DatePicker(props) {
|
|
|
15645
15677
|
fontWeight: "fw4",
|
|
15646
15678
|
fontSize: "fz_12px",
|
|
15647
15679
|
lineHeight: "lh_16px"
|
|
15648
|
-
}), ...tid, children: /* @__PURE__ */
|
|
15680
|
+
}), ...tid, children: /* @__PURE__ */ jsx75(
|
|
15649
15681
|
DayPicker,
|
|
15650
15682
|
{
|
|
15651
15683
|
components: {
|
|
@@ -15668,16 +15700,16 @@ function DatePicker(props) {
|
|
|
15668
15700
|
}
|
|
15669
15701
|
|
|
15670
15702
|
// src/components/internal/DatePicker/DatePickerOverlay.tsx
|
|
15671
|
-
import { jsx as
|
|
15703
|
+
import { jsx as jsx76 } from "react/jsx-runtime";
|
|
15672
15704
|
function DatePickerOverlay({
|
|
15673
15705
|
overlayProps,
|
|
15674
15706
|
children
|
|
15675
15707
|
}) {
|
|
15676
|
-
return /* @__PURE__ */
|
|
15708
|
+
return /* @__PURE__ */ jsx76("div", { className: "br4 bshModal", ...overlayProps, children });
|
|
15677
15709
|
}
|
|
15678
15710
|
|
|
15679
15711
|
// src/components/ButtonDatePicker.tsx
|
|
15680
|
-
import { jsx as
|
|
15712
|
+
import { jsx as jsx77 } from "react/jsx-runtime";
|
|
15681
15713
|
function ButtonDatePicker(props) {
|
|
15682
15714
|
const { defaultOpen, disabled, trigger, onSelect, ...datePickerProps } = props;
|
|
15683
15715
|
const state = useMenuTriggerState3({ isOpen: defaultOpen });
|
|
@@ -15690,7 +15722,7 @@ function ButtonDatePicker(props) {
|
|
|
15690
15722
|
props,
|
|
15691
15723
|
isTextButton(trigger) ? defaultTestId(labelOr(trigger, "buttonDatePicker")) : isNavLinkButton(trigger) ? defaultTestId(trigger.navLabel) : isIconButton(trigger) ? trigger.icon : trigger.name
|
|
15692
15724
|
);
|
|
15693
|
-
return /* @__PURE__ */
|
|
15725
|
+
return /* @__PURE__ */ jsx77(OverlayTrigger, { ...props, menuTriggerProps, state, buttonRef, ...tid, children: /* @__PURE__ */ jsx77(DatePickerOverlay, { overlayProps: menuProps, children: /* @__PURE__ */ jsx77(
|
|
15694
15726
|
DatePicker,
|
|
15695
15727
|
{
|
|
15696
15728
|
...datePickerProps,
|
|
@@ -15707,7 +15739,7 @@ function ButtonDatePicker(props) {
|
|
|
15707
15739
|
import { useRef as useRef26 } from "react";
|
|
15708
15740
|
import { useButton as useButton5, useFocusRing as useFocusRing8, useHover as useHover9 } from "react-aria";
|
|
15709
15741
|
import { trussProps as trussProps51 } from "@homebound/truss/runtime";
|
|
15710
|
-
import { jsx as
|
|
15742
|
+
import { jsx as jsx78, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
15711
15743
|
function ButtonGroup(props) {
|
|
15712
15744
|
const {
|
|
15713
15745
|
buttons,
|
|
@@ -15717,7 +15749,7 @@ function ButtonGroup(props) {
|
|
|
15717
15749
|
const tid = useTestIds(props, "buttonGroup");
|
|
15718
15750
|
return (
|
|
15719
15751
|
// Adding `line-height: 0` prevent inheriting line-heights that might throw off sizing within the button group.
|
|
15720
|
-
/* @__PURE__ */
|
|
15752
|
+
/* @__PURE__ */ jsx78("div", { ...tid, ...trussProps51({
|
|
15721
15753
|
...{
|
|
15722
15754
|
display: "df",
|
|
15723
15755
|
lineHeight: "lh_0"
|
|
@@ -15728,7 +15760,7 @@ function ButtonGroup(props) {
|
|
|
15728
15760
|
...buttonProps
|
|
15729
15761
|
}, i) => (
|
|
15730
15762
|
// Disable the button if the ButtonGroup is disabled or if the current button is disabled.
|
|
15731
|
-
/* @__PURE__ */
|
|
15763
|
+
/* @__PURE__ */ jsx78(GroupButton, { ...buttonProps, disabled: disabled || buttonDisabled, size, isFirst: i === 0, isLast: i === buttons.length - 1, ...tid }, i)
|
|
15732
15764
|
)) })
|
|
15733
15765
|
);
|
|
15734
15766
|
}
|
|
@@ -15766,7 +15798,7 @@ function GroupButton(props) {
|
|
|
15766
15798
|
isHovered
|
|
15767
15799
|
} = useHover9(ariaProps);
|
|
15768
15800
|
const tid = useTestIds(props);
|
|
15769
|
-
return /* @__PURE__ */
|
|
15801
|
+
return /* @__PURE__ */ jsx78("span", { ...trussProps51(getButtonStyles2(isFirst, isLast)), children: maybeTooltip({
|
|
15770
15802
|
title: resolveTooltip(disabled, tooltip),
|
|
15771
15803
|
placement: "top",
|
|
15772
15804
|
children: /* @__PURE__ */ jsxs50("button", { ref, ...buttonProps, ...focusProps, ...hoverProps, ...trussProps51({
|
|
@@ -15796,7 +15828,7 @@ function GroupButton(props) {
|
|
|
15796
15828
|
...isPressed ? pressedStyles : isHovered ? hoverStyles2 : {},
|
|
15797
15829
|
...icon ? iconStyles2[size] : {}
|
|
15798
15830
|
}), ...tid[defaultTestId(typeof text === "string" && text || icon || "button")], children: [
|
|
15799
|
-
icon && /* @__PURE__ */
|
|
15831
|
+
icon && /* @__PURE__ */ jsx78(Icon, { xss: {
|
|
15800
15832
|
...!!text ? {
|
|
15801
15833
|
marginRight: "mr_4px"
|
|
15802
15834
|
} : {}
|
|
@@ -15887,7 +15919,7 @@ var iconStyles2 = {
|
|
|
15887
15919
|
import { useMemo as useMemo17 } from "react";
|
|
15888
15920
|
import { useHover as useHover10 } from "react-aria";
|
|
15889
15921
|
import { trussProps as trussProps52, maybeCssVar as maybeCssVar26 } from "@homebound/truss/runtime";
|
|
15890
|
-
import { jsx as
|
|
15922
|
+
import { jsx as jsx79, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
15891
15923
|
function Card(props) {
|
|
15892
15924
|
const {
|
|
15893
15925
|
title,
|
|
@@ -15920,7 +15952,7 @@ function Card(props) {
|
|
|
15920
15952
|
...isDisabled && disabledStyles2
|
|
15921
15953
|
}), [isDisabled, isHovered, bordered, type, isList, fullWidth]);
|
|
15922
15954
|
return /* @__PURE__ */ jsxs51("div", { ...trussProps52(styles), ...hoverProps, ...tid, children: [
|
|
15923
|
-
/* @__PURE__ */
|
|
15955
|
+
/* @__PURE__ */ jsx79("div", { ...trussProps52({
|
|
15924
15956
|
...{
|
|
15925
15957
|
height: ["h_var", {
|
|
15926
15958
|
"--height": `${imgHeight}px`
|
|
@@ -15943,14 +15975,14 @@ function Card(props) {
|
|
|
15943
15975
|
flexShrink: "fs0"
|
|
15944
15976
|
},
|
|
15945
15977
|
...isHovered && !isList && imageHoverStyles
|
|
15946
|
-
}), children: /* @__PURE__ */
|
|
15978
|
+
}), children: /* @__PURE__ */ jsx79("img", { ...trussProps52({
|
|
15947
15979
|
width: "w100",
|
|
15948
15980
|
height: "h100",
|
|
15949
15981
|
objectFit: ["objectFit_var", {
|
|
15950
15982
|
"--objectFit": maybeCssVar26(imageFit)
|
|
15951
15983
|
}]
|
|
15952
15984
|
}), src: imgSrc, alt: title, ...tid.img }) }),
|
|
15953
|
-
isHovered && buttonMenuItems && /* @__PURE__ */
|
|
15985
|
+
isHovered && buttonMenuItems && /* @__PURE__ */ jsx79("div", { ...trussProps52({
|
|
15954
15986
|
position: "absolute",
|
|
15955
15987
|
right: "r_1",
|
|
15956
15988
|
top: "top1",
|
|
@@ -15958,15 +15990,15 @@ function Card(props) {
|
|
|
15958
15990
|
right: "r_3",
|
|
15959
15991
|
top: "top3"
|
|
15960
15992
|
} : {}
|
|
15961
|
-
}), children: /* @__PURE__ */
|
|
15993
|
+
}), children: /* @__PURE__ */ jsx79(ButtonMenu, { trigger: {
|
|
15962
15994
|
icon: "verticalDots",
|
|
15963
15995
|
color: isList ? "--b-on-surface-muted" /* OnSurfaceMuted */ : "--b-on-primary" /* OnPrimary */
|
|
15964
15996
|
}, items: buttonMenuItems }) }),
|
|
15965
|
-
tag && !isList && /* @__PURE__ */
|
|
15997
|
+
tag && !isList && /* @__PURE__ */ jsx79("div", { className: "absolute l_1 tp_4px", children: /* @__PURE__ */ jsx79(Tag, { type: tag.type, text: tag.text, ...tid.tag }) }),
|
|
15966
15998
|
/* @__PURE__ */ jsxs51("div", { className: "df fdc aifs g_1", children: [
|
|
15967
|
-
tag && isList && /* @__PURE__ */
|
|
15999
|
+
tag && isList && /* @__PURE__ */ jsx79(Tag, { type: tag.type, text: tag.text, ...tid.tag }),
|
|
15968
16000
|
/* @__PURE__ */ jsxs51("div", { children: [
|
|
15969
|
-
/* @__PURE__ */
|
|
16001
|
+
/* @__PURE__ */ jsx79("div", { ...trussProps52({
|
|
15970
16002
|
fontWeight: "fw6",
|
|
15971
16003
|
fontSize: "fz_12px",
|
|
15972
16004
|
lineHeight: "lh_16px",
|
|
@@ -15974,7 +16006,7 @@ function Card(props) {
|
|
|
15974
16006
|
"--color": "var(--b-on-surface-muted)"
|
|
15975
16007
|
}]
|
|
15976
16008
|
}), ...tid.subtitle, children: subtitle }),
|
|
15977
|
-
/* @__PURE__ */
|
|
16009
|
+
/* @__PURE__ */ jsx79("div", { ...trussProps52({
|
|
15978
16010
|
fontWeight: "fw6",
|
|
15979
16011
|
fontSize: "fz_14px",
|
|
15980
16012
|
lineHeight: "lh_20px",
|
|
@@ -15988,7 +16020,7 @@ function Card(props) {
|
|
|
15988
16020
|
} : {}
|
|
15989
16021
|
}), ...tid.title, children: title })
|
|
15990
16022
|
] }),
|
|
15991
|
-
/* @__PURE__ */
|
|
16023
|
+
/* @__PURE__ */ jsx79("div", { ...tid.details, children: detailContent })
|
|
15992
16024
|
] })
|
|
15993
16025
|
] });
|
|
15994
16026
|
}
|
|
@@ -16048,9 +16080,9 @@ var imageHoverStyles = {
|
|
|
16048
16080
|
|
|
16049
16081
|
// src/components/Copy.tsx
|
|
16050
16082
|
import { mergeProps as mergeProps16 } from "@homebound/truss/runtime";
|
|
16051
|
-
import { jsx as
|
|
16083
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
16052
16084
|
function Copy(props) {
|
|
16053
|
-
return /* @__PURE__ */
|
|
16085
|
+
return /* @__PURE__ */ jsx80("div", { ...mergeProps16("beam-copy", void 0, {
|
|
16054
16086
|
...{
|
|
16055
16087
|
fontWeight: "fw4",
|
|
16056
16088
|
fontSize: "fz_14px",
|
|
@@ -16067,7 +16099,7 @@ function Copy(props) {
|
|
|
16067
16099
|
|
|
16068
16100
|
// src/components/CountBadge.tsx
|
|
16069
16101
|
import { trussProps as trussProps53, maybeCssVar as maybeCssVar27 } from "@homebound/truss/runtime";
|
|
16070
|
-
import { jsx as
|
|
16102
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
16071
16103
|
function CountBadge(props) {
|
|
16072
16104
|
const {
|
|
16073
16105
|
count,
|
|
@@ -16078,7 +16110,7 @@ function CountBadge(props) {
|
|
|
16078
16110
|
} = props;
|
|
16079
16111
|
const tid = useTestIds(otherProps, "countBadge");
|
|
16080
16112
|
if (hideIfZero && count === 0) return null;
|
|
16081
|
-
return /* @__PURE__ */
|
|
16113
|
+
return /* @__PURE__ */ jsx81("span", { ...tid, ...trussProps53({
|
|
16082
16114
|
...{
|
|
16083
16115
|
height: ["sq_var", {
|
|
16084
16116
|
"--height": `${count > 100 ? 18 : 16}px`
|
|
@@ -16111,7 +16143,7 @@ function CountBadge(props) {
|
|
|
16111
16143
|
|
|
16112
16144
|
// src/components/EnvironmentBanner/EnvironmentBanner.tsx
|
|
16113
16145
|
import { trussProps as trussProps54, maybeCssVar as maybeCssVar_13 } from "@homebound/truss/runtime";
|
|
16114
|
-
import { jsx as
|
|
16146
|
+
import { jsx as jsx82, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
16115
16147
|
function EnvironmentBanner(props) {
|
|
16116
16148
|
const {
|
|
16117
16149
|
env,
|
|
@@ -16158,7 +16190,7 @@ function EnvironmentBanner(props) {
|
|
|
16158
16190
|
...headerContentPaddingX()
|
|
16159
16191
|
}), ...tid.content, children: [
|
|
16160
16192
|
/* @__PURE__ */ jsxs52("span", { className: "df aic g_2 fg1 mh0 oh", ...tid.left, children: [
|
|
16161
|
-
/* @__PURE__ */
|
|
16193
|
+
/* @__PURE__ */ jsx82(Tag, { text: badgeLabel, xss: {
|
|
16162
16194
|
backgroundColor: "bgColor_FFFFFF90"
|
|
16163
16195
|
}, ...tid.badge }),
|
|
16164
16196
|
/* @__PURE__ */ jsxs52("span", { ...trussProps54({
|
|
@@ -16179,7 +16211,7 @@ function EnvironmentBanner(props) {
|
|
|
16179
16211
|
}
|
|
16180
16212
|
}), ...tid.message, children: [
|
|
16181
16213
|
message,
|
|
16182
|
-
/* @__PURE__ */
|
|
16214
|
+
/* @__PURE__ */ jsx82("span", { className: "fs0", ...tid.info, children: /* @__PURE__ */ jsx82(Icon, { icon: "infoCircle", tooltip, inc: 2, color: "--b-on-primary" /* OnPrimary */ }) })
|
|
16183
16215
|
] })
|
|
16184
16216
|
] }),
|
|
16185
16217
|
impersonating != null && /* @__PURE__ */ jsxs52("span", { ...trussProps54({
|
|
@@ -16195,10 +16227,10 @@ function EnvironmentBanner(props) {
|
|
|
16195
16227
|
flexShrink: "fs0"
|
|
16196
16228
|
}), ...tid.impersonating, children: [
|
|
16197
16229
|
(env !== "prod" || showProdWarning) && /* @__PURE__ */ jsxs52("span", { children: [
|
|
16198
|
-
/* @__PURE__ */
|
|
16230
|
+
/* @__PURE__ */ jsx82("span", { className: "dn mdandup_dib", children: "Impersonating \xA0" }),
|
|
16199
16231
|
impersonating.name
|
|
16200
16232
|
] }),
|
|
16201
|
-
/* @__PURE__ */
|
|
16233
|
+
/* @__PURE__ */ jsx82("span", { className: "df fs0", ...tid.impersonatingIcon, children: /* @__PURE__ */ jsx82(Icon, { icon: "impersonate", inc: 2, color: "--b-on-primary" /* OnPrimary */ }) })
|
|
16202
16234
|
] })
|
|
16203
16235
|
] })
|
|
16204
16236
|
] });
|
|
@@ -16271,10 +16303,10 @@ function getInvertedCorner(side, bgColorVar) {
|
|
|
16271
16303
|
right: "r_0"
|
|
16272
16304
|
};
|
|
16273
16305
|
const shadowXOffset = side === "left" ? -invertedCornerRadiusPx : invertedCornerRadiusPx;
|
|
16274
|
-
return /* @__PURE__ */
|
|
16306
|
+
return /* @__PURE__ */ jsx82("div", { "aria-hidden": true, ...trussProps54({
|
|
16275
16307
|
...shell,
|
|
16276
16308
|
...outerPosition
|
|
16277
|
-
}), children: /* @__PURE__ */
|
|
16309
|
+
}), children: /* @__PURE__ */ jsx82("div", { ...trussProps54({
|
|
16278
16310
|
height: "h_200",
|
|
16279
16311
|
width: "w_200",
|
|
16280
16312
|
position: "absolute",
|
|
@@ -16313,8 +16345,8 @@ import { createPortal as createPortal5 } from "react-dom";
|
|
|
16313
16345
|
|
|
16314
16346
|
// src/components/BeamContext.tsx
|
|
16315
16347
|
import {
|
|
16316
|
-
createContext as
|
|
16317
|
-
useContext as
|
|
16348
|
+
createContext as createContext11,
|
|
16349
|
+
useContext as useContext20,
|
|
16318
16350
|
useMemo as useMemo24,
|
|
16319
16351
|
useReducer,
|
|
16320
16352
|
useRef as useRef30
|
|
@@ -16322,20 +16354,20 @@ import {
|
|
|
16322
16354
|
import { OverlayProvider } from "react-aria";
|
|
16323
16355
|
|
|
16324
16356
|
// src/components/DocumentTitle/DocumentTitleContext.tsx
|
|
16325
|
-
import { createContext as
|
|
16326
|
-
import { jsx as
|
|
16327
|
-
var DocumentTitleContext =
|
|
16357
|
+
import { createContext as createContext7, useContext as useContext16, useMemo as useMemo18 } from "react";
|
|
16358
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
16359
|
+
var DocumentTitleContext = createContext7(void 0);
|
|
16328
16360
|
function DocumentTitleProvider(props) {
|
|
16329
16361
|
const { children, env, suffix } = props;
|
|
16330
16362
|
const value = useMemo18(() => ({ env, suffix }), [env, suffix]);
|
|
16331
|
-
return /* @__PURE__ */
|
|
16363
|
+
return /* @__PURE__ */ jsx83(DocumentTitleContext.Provider, { value, children });
|
|
16332
16364
|
}
|
|
16333
16365
|
function useDocumentTitleConfig() {
|
|
16334
|
-
return
|
|
16366
|
+
return useContext16(DocumentTitleContext);
|
|
16335
16367
|
}
|
|
16336
16368
|
|
|
16337
16369
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
16338
|
-
import { createContext as
|
|
16370
|
+
import { createContext as createContext8, useContext as useContext17, useMemo as useMemo19, useState as useState24 } from "react";
|
|
16339
16371
|
|
|
16340
16372
|
// src/components/Snackbar/Snackbar.tsx
|
|
16341
16373
|
import { createPortal as createPortal3 } from "react-dom";
|
|
@@ -16344,7 +16376,7 @@ import { createPortal as createPortal3 } from "react-dom";
|
|
|
16344
16376
|
import { useLayoutEffect as useLayoutEffect4, useResizeObserver as useResizeObserver6 } from "@react-aria/utils";
|
|
16345
16377
|
import { useCallback as useCallback14, useRef as useRef27, useState as useState23 } from "react";
|
|
16346
16378
|
import { trussProps as trussProps55, maybeCssVar as maybeCssVar28 } from "@homebound/truss/runtime";
|
|
16347
|
-
import { jsx as
|
|
16379
|
+
import { jsx as jsx84, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
16348
16380
|
function SnackbarNotice(props) {
|
|
16349
16381
|
const {
|
|
16350
16382
|
icon,
|
|
@@ -16394,7 +16426,7 @@ function SnackbarNotice(props) {
|
|
|
16394
16426
|
}]
|
|
16395
16427
|
} : void 0
|
|
16396
16428
|
}), "data-theme": contrastDataTheme, ...tid, role: "alert", children: [
|
|
16397
|
-
icon && /* @__PURE__ */
|
|
16429
|
+
icon && /* @__PURE__ */ jsx84("span", { className: "fs0 pl_12px", children: /* @__PURE__ */ jsx84(Icon, { ...typeToIcon2[icon], ...tid.icon }) }),
|
|
16398
16430
|
/* @__PURE__ */ jsxs53("div", { ...trussProps55({
|
|
16399
16431
|
flexGrow: "fg1",
|
|
16400
16432
|
minWidth: "mw0",
|
|
@@ -16407,7 +16439,7 @@ function SnackbarNotice(props) {
|
|
|
16407
16439
|
"--paddingLeft": `${icon ? 8 : 16}px`
|
|
16408
16440
|
}]
|
|
16409
16441
|
}), children: [
|
|
16410
|
-
/* @__PURE__ */
|
|
16442
|
+
/* @__PURE__ */ jsx84(
|
|
16411
16443
|
"span",
|
|
16412
16444
|
{
|
|
16413
16445
|
ref: messageRef,
|
|
@@ -16427,10 +16459,10 @@ function SnackbarNotice(props) {
|
|
|
16427
16459
|
children: message
|
|
16428
16460
|
}
|
|
16429
16461
|
),
|
|
16430
|
-
hasOverflow && /* @__PURE__ */
|
|
16462
|
+
hasOverflow && /* @__PURE__ */ jsx84(Button, { variant: "text", size: "sm", label: expanded ? "Collapse" : "Expand", "aria-expanded": expanded, onClick: () => setExpanded((prev) => !prev), ...tid.expand })
|
|
16431
16463
|
] }),
|
|
16432
16464
|
(action || !reallyHideClose) && /* @__PURE__ */ jsxs53("span", { className: "fs0 df aic", children: [
|
|
16433
|
-
action && /* @__PURE__ */
|
|
16465
|
+
action && /* @__PURE__ */ jsx84("span", { ...trussProps55({
|
|
16434
16466
|
textTransform: "ttu",
|
|
16435
16467
|
fontWeight: "fw4",
|
|
16436
16468
|
fontSize: "fz_14px",
|
|
@@ -16438,8 +16470,8 @@ function SnackbarNotice(props) {
|
|
|
16438
16470
|
paddingRight: ["pr_var", {
|
|
16439
16471
|
"--paddingRight": `${!reallyHideClose && action.variant !== "text" ? 4 : 8}px`
|
|
16440
16472
|
}]
|
|
16441
|
-
}), children: /* @__PURE__ */
|
|
16442
|
-
!reallyHideClose && /* @__PURE__ */
|
|
16473
|
+
}), children: /* @__PURE__ */ jsx84(Button, { ...action, ...tid.action }) }),
|
|
16474
|
+
!reallyHideClose && /* @__PURE__ */ jsx84("span", { className: "pr1 lh_0", children: /* @__PURE__ */ jsx84(IconButton, { icon: "x", onClick: onClose, ...tid.close }) })
|
|
16443
16475
|
] })
|
|
16444
16476
|
] });
|
|
16445
16477
|
}
|
|
@@ -16471,13 +16503,13 @@ var typeToIcon2 = {
|
|
|
16471
16503
|
|
|
16472
16504
|
// src/components/Snackbar/Snackbar.tsx
|
|
16473
16505
|
import { trussProps as trussProps56, maybeCssVar as maybeCssVar29 } from "@homebound/truss/runtime";
|
|
16474
|
-
import { jsx as
|
|
16506
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
16475
16507
|
function Snackbar({
|
|
16476
16508
|
notices,
|
|
16477
16509
|
offset
|
|
16478
16510
|
}) {
|
|
16479
16511
|
const tid = useTestIds({});
|
|
16480
|
-
return createPortal3(/* @__PURE__ */
|
|
16512
|
+
return createPortal3(/* @__PURE__ */ jsx85("div", { ...tid.snackbarWrapper, ...trussProps56({
|
|
16481
16513
|
position: "fixed",
|
|
16482
16514
|
zIndex: ["z_var", {
|
|
16483
16515
|
"--zIndex": maybeCssVar29(zIndices.snackbar)
|
|
@@ -16490,15 +16522,15 @@ function Snackbar({
|
|
|
16490
16522
|
flexDirection: "fdc",
|
|
16491
16523
|
alignItems: "aifs",
|
|
16492
16524
|
gap: "g_12px"
|
|
16493
|
-
}), children: notices.map((data) => /* @__PURE__ */
|
|
16525
|
+
}), children: notices.map((data) => /* @__PURE__ */ jsx85(SnackbarNotice, { ...data }, data.id)) }), document.body);
|
|
16494
16526
|
}
|
|
16495
16527
|
var defaultOffset = {
|
|
16496
16528
|
bottom: 24
|
|
16497
16529
|
};
|
|
16498
16530
|
|
|
16499
16531
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
16500
|
-
import { jsx as
|
|
16501
|
-
var SnackbarContext =
|
|
16532
|
+
import { jsx as jsx86, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
16533
|
+
var SnackbarContext = createContext8({ setNotices: () => {
|
|
16502
16534
|
}, setOffset: () => {
|
|
16503
16535
|
} });
|
|
16504
16536
|
function SnackbarProvider(props) {
|
|
@@ -16507,11 +16539,11 @@ function SnackbarProvider(props) {
|
|
|
16507
16539
|
const contextValue = useMemo19(() => ({ setNotices, setOffset }), []);
|
|
16508
16540
|
return /* @__PURE__ */ jsxs54(SnackbarContext.Provider, { value: contextValue, children: [
|
|
16509
16541
|
props.children,
|
|
16510
|
-
/* @__PURE__ */
|
|
16542
|
+
/* @__PURE__ */ jsx86(Snackbar, { notices, offset })
|
|
16511
16543
|
] });
|
|
16512
16544
|
}
|
|
16513
16545
|
function useSnackbarContext() {
|
|
16514
|
-
return
|
|
16546
|
+
return useContext17(SnackbarContext);
|
|
16515
16547
|
}
|
|
16516
16548
|
|
|
16517
16549
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
@@ -16523,7 +16555,7 @@ import { createPortal as createPortal4 } from "react-dom";
|
|
|
16523
16555
|
import { useMemo as useMemo22 } from "react";
|
|
16524
16556
|
|
|
16525
16557
|
// src/components/Modal/ConfirmCloseModal.tsx
|
|
16526
|
-
import { Fragment as Fragment23, jsx as
|
|
16558
|
+
import { Fragment as Fragment23, jsx as jsx87, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
16527
16559
|
function ConfirmCloseModal(props) {
|
|
16528
16560
|
const {
|
|
16529
16561
|
onClose,
|
|
@@ -16538,10 +16570,10 @@ function ConfirmCloseModal(props) {
|
|
|
16538
16570
|
modalState.current = void 0;
|
|
16539
16571
|
}
|
|
16540
16572
|
return /* @__PURE__ */ jsxs55(Fragment23, { children: [
|
|
16541
|
-
/* @__PURE__ */
|
|
16542
|
-
/* @__PURE__ */
|
|
16573
|
+
/* @__PURE__ */ jsx87(ModalHeader, { children: title }),
|
|
16574
|
+
/* @__PURE__ */ jsx87(ModalBody, { children: /* @__PURE__ */ jsx87("p", { children: message }) }),
|
|
16543
16575
|
/* @__PURE__ */ jsxs55(ModalFooter, { children: [
|
|
16544
|
-
/* @__PURE__ */
|
|
16576
|
+
/* @__PURE__ */ jsx87(
|
|
16545
16577
|
Button,
|
|
16546
16578
|
{
|
|
16547
16579
|
variant: "quaternary",
|
|
@@ -16552,7 +16584,7 @@ function ConfirmCloseModal(props) {
|
|
|
16552
16584
|
}
|
|
16553
16585
|
}
|
|
16554
16586
|
),
|
|
16555
|
-
/* @__PURE__ */
|
|
16587
|
+
/* @__PURE__ */ jsx87(
|
|
16556
16588
|
Button,
|
|
16557
16589
|
{
|
|
16558
16590
|
label: continueText,
|
|
@@ -16570,15 +16602,15 @@ function ConfirmCloseModal(props) {
|
|
|
16570
16602
|
import { useEffect as useEffect14, useMemo as useMemo21, useRef as useRef28 } from "react";
|
|
16571
16603
|
|
|
16572
16604
|
// src/components/Modal/ModalContext.tsx
|
|
16573
|
-
import { createContext as
|
|
16574
|
-
import { jsx as
|
|
16575
|
-
var ModalContext =
|
|
16605
|
+
import { createContext as createContext9, useContext as useContext18, useMemo as useMemo20 } from "react";
|
|
16606
|
+
import { jsx as jsx88 } from "react/jsx-runtime";
|
|
16607
|
+
var ModalContext = createContext9({ inModal: false });
|
|
16576
16608
|
function ModalProvider({ children }) {
|
|
16577
16609
|
const value = useMemo20(() => ({ inModal: true }), []);
|
|
16578
|
-
return /* @__PURE__ */
|
|
16610
|
+
return /* @__PURE__ */ jsx88(ModalContext.Provider, { value, children });
|
|
16579
16611
|
}
|
|
16580
16612
|
function useModalContext() {
|
|
16581
|
-
return
|
|
16613
|
+
return useContext18(ModalContext);
|
|
16582
16614
|
}
|
|
16583
16615
|
|
|
16584
16616
|
// src/components/Modal/useModal.tsx
|
|
@@ -16627,7 +16659,7 @@ function useModal() {
|
|
|
16627
16659
|
}
|
|
16628
16660
|
|
|
16629
16661
|
// src/components/SuperDrawer/useSuperDrawer.tsx
|
|
16630
|
-
import { jsx as
|
|
16662
|
+
import { jsx as jsx89 } from "react/jsx-runtime";
|
|
16631
16663
|
function useSuperDrawer() {
|
|
16632
16664
|
const {
|
|
16633
16665
|
drawerContentStack: contentStack,
|
|
@@ -16639,7 +16671,7 @@ function useSuperDrawer() {
|
|
|
16639
16671
|
function canCloseDrawerDetails(i, doChange) {
|
|
16640
16672
|
for (const canCloseDrawerDetail of canCloseDetailsChecks.current[i] ?? []) {
|
|
16641
16673
|
if (!canClose(canCloseDrawerDetail)) {
|
|
16642
|
-
openModal({ content: /* @__PURE__ */
|
|
16674
|
+
openModal({ content: /* @__PURE__ */ jsx89(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawerDetail }) });
|
|
16643
16675
|
return false;
|
|
16644
16676
|
}
|
|
16645
16677
|
}
|
|
@@ -16659,7 +16691,7 @@ function useSuperDrawer() {
|
|
|
16659
16691
|
for (const canCloseDrawer of canCloseChecks.current) {
|
|
16660
16692
|
if (!canClose(canCloseDrawer)) {
|
|
16661
16693
|
openModal({
|
|
16662
|
-
content: /* @__PURE__ */
|
|
16694
|
+
content: /* @__PURE__ */ jsx89(ConfirmCloseModal, { onClose: doChange, ...canCloseDrawer })
|
|
16663
16695
|
});
|
|
16664
16696
|
return;
|
|
16665
16697
|
}
|
|
@@ -16762,7 +16794,7 @@ var SuperDrawerWidth = /* @__PURE__ */ ((SuperDrawerWidth2) => {
|
|
|
16762
16794
|
|
|
16763
16795
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
16764
16796
|
import { trussProps as trussProps57, maybeCssVar as maybeCssVar30 } from "@homebound/truss/runtime";
|
|
16765
|
-
import { Fragment as Fragment24, jsx as
|
|
16797
|
+
import { Fragment as Fragment24, jsx as jsx90, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
16766
16798
|
import { createElement as createElement3 } from "react";
|
|
16767
16799
|
function SuperDrawer() {
|
|
16768
16800
|
const {
|
|
@@ -16800,7 +16832,7 @@ function SuperDrawer() {
|
|
|
16800
16832
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16801
16833
|
[headerRef, content2]
|
|
16802
16834
|
);
|
|
16803
|
-
return createPortal4(/* @__PURE__ */
|
|
16835
|
+
return createPortal4(/* @__PURE__ */ jsx90(AnimatePresence, { children: content2 && /* @__PURE__ */ jsx90(Fragment24, { children: /* @__PURE__ */ createElement3(
|
|
16804
16836
|
motion.div,
|
|
16805
16837
|
{
|
|
16806
16838
|
...testId,
|
|
@@ -16834,7 +16866,7 @@ function SuperDrawer() {
|
|
|
16834
16866
|
},
|
|
16835
16867
|
onClick: closeDrawer
|
|
16836
16868
|
},
|
|
16837
|
-
/* @__PURE__ */
|
|
16869
|
+
/* @__PURE__ */ jsx90(
|
|
16838
16870
|
motion.aside,
|
|
16839
16871
|
{
|
|
16840
16872
|
...trussProps57({
|
|
@@ -16885,13 +16917,13 @@ function SuperDrawer() {
|
|
|
16885
16917
|
justifyContent: "jcsb",
|
|
16886
16918
|
gap: "g_3"
|
|
16887
16919
|
}), children: [
|
|
16888
|
-
/* @__PURE__ */
|
|
16920
|
+
/* @__PURE__ */ jsx90("div", { ref: headerRef, ...trussProps57({
|
|
16889
16921
|
color: ["color_var", {
|
|
16890
16922
|
"--color": "var(--b-on-surface)"
|
|
16891
16923
|
}],
|
|
16892
16924
|
flexGrow: "fg1"
|
|
16893
16925
|
}) }),
|
|
16894
|
-
/* @__PURE__ */
|
|
16926
|
+
/* @__PURE__ */ jsx90(IconButton, { icon: "x", onClick: closeDrawer, ...testId.close })
|
|
16895
16927
|
] }),
|
|
16896
16928
|
content2
|
|
16897
16929
|
] })
|
|
@@ -16902,9 +16934,9 @@ function SuperDrawer() {
|
|
|
16902
16934
|
}
|
|
16903
16935
|
|
|
16904
16936
|
// src/components/Toast/ToastContext.tsx
|
|
16905
|
-
import { createContext as
|
|
16906
|
-
import { jsx as
|
|
16907
|
-
var ToastContext =
|
|
16937
|
+
import { createContext as createContext10, useCallback as useCallback15, useContext as useContext19, useMemo as useMemo23, useState as useState25 } from "react";
|
|
16938
|
+
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
16939
|
+
var ToastContext = createContext10({
|
|
16908
16940
|
setNotice: () => {
|
|
16909
16941
|
throw new Error("Missing ToastProvider");
|
|
16910
16942
|
},
|
|
@@ -16916,15 +16948,15 @@ function ToastProvider(props) {
|
|
|
16916
16948
|
const [notice, setNotice] = useState25();
|
|
16917
16949
|
const clear = useCallback15(() => setNotice(void 0), [setNotice]);
|
|
16918
16950
|
const contextValue = useMemo23(() => ({ setNotice, notice, clear }), [notice, clear]);
|
|
16919
|
-
return /* @__PURE__ */
|
|
16951
|
+
return /* @__PURE__ */ jsx91(ToastContext.Provider, { value: contextValue, children: props.children });
|
|
16920
16952
|
}
|
|
16921
16953
|
function useToastContext() {
|
|
16922
|
-
return
|
|
16954
|
+
return useContext19(ToastContext);
|
|
16923
16955
|
}
|
|
16924
16956
|
|
|
16925
16957
|
// src/components/BeamContext.tsx
|
|
16926
|
-
import { jsx as
|
|
16927
|
-
var BeamContext =
|
|
16958
|
+
import { jsx as jsx92, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
16959
|
+
var BeamContext = createContext11({
|
|
16928
16960
|
modalState: new EmptyRef(),
|
|
16929
16961
|
modalCanCloseChecks: new EmptyRef(),
|
|
16930
16962
|
modalHeaderDiv: void 0,
|
|
@@ -16968,14 +17000,14 @@ function BeamProvider({ children, documentTitleConfig, ...presentationProps }) {
|
|
|
16968
17000
|
sdHeaderDiv
|
|
16969
17001
|
};
|
|
16970
17002
|
}, [modalBannerDiv, modalBodyDiv, modalFooterDiv, modalHeaderDiv, sdHeaderDiv]);
|
|
16971
|
-
const beamTree = /* @__PURE__ */
|
|
17003
|
+
const beamTree = /* @__PURE__ */ jsx92(PresentationProvider, { ...presentationProps, children: /* @__PURE__ */ jsx92(AutoSaveStatusProvider, { children: /* @__PURE__ */ jsx92(SnackbarProvider, { children: /* @__PURE__ */ jsxs57(ToastProvider, { children: [
|
|
16972
17004
|
/* @__PURE__ */ jsxs57(OverlayProvider, { children: [
|
|
16973
17005
|
children,
|
|
16974
|
-
modalRef.current && /* @__PURE__ */
|
|
17006
|
+
modalRef.current && /* @__PURE__ */ jsx92(Modal, { ...modalRef.current })
|
|
16975
17007
|
] }),
|
|
16976
|
-
/* @__PURE__ */
|
|
17008
|
+
/* @__PURE__ */ jsx92(SuperDrawer, {})
|
|
16977
17009
|
] }) }) }) });
|
|
16978
|
-
return /* @__PURE__ */
|
|
17010
|
+
return /* @__PURE__ */ jsx92(BeamContext.Provider, { value: { ...context }, children: documentTitleConfig ? /* @__PURE__ */ jsx92(DocumentTitleProvider, { ...documentTitleConfig, children: beamTree }) : beamTree });
|
|
16979
17011
|
}
|
|
16980
17012
|
var PretendRefThatTicks = class {
|
|
16981
17013
|
constructor(ref, tick) {
|
|
@@ -16991,12 +17023,12 @@ var PretendRefThatTicks = class {
|
|
|
16991
17023
|
}
|
|
16992
17024
|
};
|
|
16993
17025
|
function useBeamContext() {
|
|
16994
|
-
return
|
|
17026
|
+
return useContext20(BeamContext);
|
|
16995
17027
|
}
|
|
16996
17028
|
|
|
16997
17029
|
// src/components/Modal/Modal.tsx
|
|
16998
17030
|
import { trussProps as trussProps58, maybeCssVar as maybeCssVar31 } from "@homebound/truss/runtime";
|
|
16999
|
-
import { Fragment as Fragment25, jsx as
|
|
17031
|
+
import { Fragment as Fragment25, jsx as jsx93, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17000
17032
|
function Modal(props) {
|
|
17001
17033
|
const {
|
|
17002
17034
|
size = "md",
|
|
@@ -17080,7 +17112,7 @@ function Modal(props) {
|
|
|
17080
17112
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17081
17113
|
[modalBannerRef, modalBodyRef, modalFooterRef, modalHeaderRef]
|
|
17082
17114
|
);
|
|
17083
|
-
const title = /* @__PURE__ */
|
|
17115
|
+
const title = /* @__PURE__ */ jsx93("h1", { ...trussProps58({
|
|
17084
17116
|
flexGrow: "fg1",
|
|
17085
17117
|
fontWeight: "fw6",
|
|
17086
17118
|
fontSize: "fz_24px",
|
|
@@ -17097,7 +17129,7 @@ function Modal(props) {
|
|
|
17097
17129
|
}]
|
|
17098
17130
|
}
|
|
17099
17131
|
}), ref: modalHeaderRef, ...titleProps, ...testId.title });
|
|
17100
|
-
return /* @__PURE__ */
|
|
17132
|
+
return /* @__PURE__ */ jsx93(ModalProvider, { children: /* @__PURE__ */ jsx93(OverlayContainer2, { children: /* @__PURE__ */ jsx93(AutoSaveStatusProvider, { children: /* @__PURE__ */ jsx93("div", { ...trussProps58({
|
|
17101
17133
|
position: "fixed",
|
|
17102
17134
|
top: "tp_0",
|
|
17103
17135
|
bottom: "bot_0",
|
|
@@ -17110,7 +17142,7 @@ function Modal(props) {
|
|
|
17110
17142
|
zIndex: ["z_var", {
|
|
17111
17143
|
"--zIndex": maybeCssVar31(zIndices.modalUnderlay)
|
|
17112
17144
|
}]
|
|
17113
|
-
}), ...underlayProps, ...testId.underlay, children: /* @__PURE__ */
|
|
17145
|
+
}), ...underlayProps, ...testId.underlay, children: /* @__PURE__ */ jsx93(FocusScope3, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ jsxs58("div", { ...trussProps58({
|
|
17114
17146
|
borderRadius: "br24",
|
|
17115
17147
|
backgroundColor: ["bgColor_var", {
|
|
17116
17148
|
"--backgroundColor": "var(--b-surface)"
|
|
@@ -17154,14 +17186,14 @@ function Modal(props) {
|
|
|
17154
17186
|
}]
|
|
17155
17187
|
} : {}
|
|
17156
17188
|
}), children: [
|
|
17157
|
-
/* @__PURE__ */
|
|
17189
|
+
/* @__PURE__ */ jsx93("span", { className: "fs0 pl1", children: allowClosing && /* @__PURE__ */ jsx93(IconButton, { icon: "x", onClick: closeModal, ...testId.titleClose }) }),
|
|
17158
17190
|
aiMode ? /* @__PURE__ */ jsxs58("div", { className: "df fdc aifs g_4px fg1 mw0", ...testId.aiTitle, children: [
|
|
17159
|
-
/* @__PURE__ */
|
|
17191
|
+
/* @__PURE__ */ jsx93(BlueprintAiLogo, { height: 2 }),
|
|
17160
17192
|
title
|
|
17161
17193
|
] }) : title
|
|
17162
17194
|
] }),
|
|
17163
|
-
/* @__PURE__ */
|
|
17164
|
-
/* @__PURE__ */
|
|
17195
|
+
/* @__PURE__ */ jsx93("div", { ref: modalBannerRef, className: "fs0" }),
|
|
17196
|
+
/* @__PURE__ */ jsx93("main", { ref: modalBodyRef, ...trussProps58({
|
|
17165
17197
|
flexGrow: "fg1",
|
|
17166
17198
|
overflowY: "oya",
|
|
17167
17199
|
paddingTop: "pt_12px",
|
|
@@ -17176,7 +17208,7 @@ function Modal(props) {
|
|
|
17176
17208
|
overflowY: "oys"
|
|
17177
17209
|
} : {}
|
|
17178
17210
|
}), children: content2 }),
|
|
17179
|
-
/* @__PURE__ */
|
|
17211
|
+
/* @__PURE__ */ jsx93("footer", { className: "fs0", children: /* @__PURE__ */ jsx93("div", { ref: modalFooterRef }) })
|
|
17180
17212
|
] }) }) }) }) }) });
|
|
17181
17213
|
}
|
|
17182
17214
|
function ModalHeader({
|
|
@@ -17185,7 +17217,7 @@ function ModalHeader({
|
|
|
17185
17217
|
const {
|
|
17186
17218
|
modalHeaderDiv
|
|
17187
17219
|
} = useBeamContext();
|
|
17188
|
-
return createPortal5(/* @__PURE__ */
|
|
17220
|
+
return createPortal5(/* @__PURE__ */ jsx93(Fragment25, { children }), modalHeaderDiv);
|
|
17189
17221
|
}
|
|
17190
17222
|
function ModalBanner({
|
|
17191
17223
|
children
|
|
@@ -17194,7 +17226,7 @@ function ModalBanner({
|
|
|
17194
17226
|
modalBannerDiv
|
|
17195
17227
|
} = useBeamContext();
|
|
17196
17228
|
const testId = useTestIds({}, testIdPrefix);
|
|
17197
|
-
return createPortal5(/* @__PURE__ */
|
|
17229
|
+
return createPortal5(/* @__PURE__ */ jsx93("div", { className: "mt_4px", ...testId.banner, children }), modalBannerDiv);
|
|
17198
17230
|
}
|
|
17199
17231
|
function ModalBody({
|
|
17200
17232
|
children,
|
|
@@ -17206,7 +17238,7 @@ function ModalBody({
|
|
|
17206
17238
|
const testId = useTestIds({}, testIdPrefix);
|
|
17207
17239
|
return createPortal5(
|
|
17208
17240
|
// If `virtualized`, then we are expecting the `children` will handle their own scrollbar, so have the overflow hidden and adjust padding
|
|
17209
|
-
/* @__PURE__ */
|
|
17241
|
+
/* @__PURE__ */ jsx93("div", { ...trussProps58({
|
|
17210
17242
|
height: "h100",
|
|
17211
17243
|
...virtualized ? {
|
|
17212
17244
|
overflow: "oh",
|
|
@@ -17227,7 +17259,7 @@ function ModalFooter({
|
|
|
17227
17259
|
modalFooterDiv
|
|
17228
17260
|
} = useBeamContext();
|
|
17229
17261
|
const testId = useTestIds({}, testIdPrefix);
|
|
17230
|
-
return createPortal5(/* @__PURE__ */
|
|
17262
|
+
return createPortal5(/* @__PURE__ */ jsx93("div", { ...trussProps58({
|
|
17231
17263
|
...{
|
|
17232
17264
|
paddingTop: "pt3",
|
|
17233
17265
|
paddingBottom: "pb3",
|
|
@@ -17260,7 +17292,7 @@ function getSize(size) {
|
|
|
17260
17292
|
|
|
17261
17293
|
// src/components/Filters/FilterModal.tsx
|
|
17262
17294
|
import { trussProps as trussProps59 } from "@homebound/truss/runtime";
|
|
17263
|
-
import { Fragment as Fragment26, jsx as
|
|
17295
|
+
import { Fragment as Fragment26, jsx as jsx94, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
17264
17296
|
function FilterModal(props) {
|
|
17265
17297
|
const {
|
|
17266
17298
|
filter,
|
|
@@ -17273,18 +17305,18 @@ function FilterModal(props) {
|
|
|
17273
17305
|
} = useModal();
|
|
17274
17306
|
const [modalFilter, setModalFilter] = useState27(filter);
|
|
17275
17307
|
return /* @__PURE__ */ jsxs59(Fragment26, { children: [
|
|
17276
|
-
/* @__PURE__ */
|
|
17277
|
-
/* @__PURE__ */
|
|
17308
|
+
/* @__PURE__ */ jsx94(ModalHeader, { children: "More Filters" }),
|
|
17309
|
+
/* @__PURE__ */ jsx94(ModalBody, { children: /* @__PURE__ */ jsx94("div", { className: "df fdc", children: safeEntries(filters).map(([key, f]) => /* @__PURE__ */ jsx94(ModalFilterItem, { label: f.hideLabelInModal ? void 0 : f.label, children: f.render(modalFilter[key], (value) => setModalFilter(updateFilter(modalFilter, key, value)), testId, true, false) }, key)) }) }),
|
|
17278
17310
|
/* @__PURE__ */ jsxs59(ModalFooter, { xss: {
|
|
17279
17311
|
justifyContent: "jcsb"
|
|
17280
17312
|
}, children: [
|
|
17281
|
-
/* @__PURE__ */
|
|
17313
|
+
/* @__PURE__ */ jsx94(Button, { label: "Clear", variant: "tertiary", disabled: safeKeys(filters).filter((fk) => modalFilter[fk] !== void 0).length === 0, onClick: () => (
|
|
17282
17314
|
// Only remove the filters keys that exist in the modal.
|
|
17283
17315
|
setModalFilter(safeKeys(filters).reduce((acc, fk) => omitKey(fk, acc), modalFilter))
|
|
17284
17316
|
), ...testId.modalClear }),
|
|
17285
17317
|
/* @__PURE__ */ jsxs59("div", { className: "df g_1", children: [
|
|
17286
|
-
/* @__PURE__ */
|
|
17287
|
-
/* @__PURE__ */
|
|
17318
|
+
/* @__PURE__ */ jsx94(Button, { label: "Cancel", variant: "quaternary", onClick: closeModal, ...testId.modalClose }),
|
|
17319
|
+
/* @__PURE__ */ jsx94(Button, { label: "Apply", onClick: () => {
|
|
17288
17320
|
onApply(modalFilter);
|
|
17289
17321
|
closeModal();
|
|
17290
17322
|
}, ...testId.modalApply })
|
|
@@ -17304,8 +17336,8 @@ function ModalFilterItem({
|
|
|
17304
17336
|
borderColor: "bcGray200"
|
|
17305
17337
|
} : {}
|
|
17306
17338
|
}), children: [
|
|
17307
|
-
label && /* @__PURE__ */
|
|
17308
|
-
/* @__PURE__ */
|
|
17339
|
+
label && /* @__PURE__ */ jsx94("h2", { className: "fw4 fz_16px lh_24px mb2", children: label }),
|
|
17340
|
+
/* @__PURE__ */ jsx94("div", { ...trussProps59({
|
|
17309
17341
|
...!label ? {
|
|
17310
17342
|
paddingTop: "pt3"
|
|
17311
17343
|
} : {}
|
|
@@ -17391,7 +17423,7 @@ function useGrowingTextField({ inputRef, inputWrapRef, value, disabled, maxLines
|
|
|
17391
17423
|
}
|
|
17392
17424
|
|
|
17393
17425
|
// src/inputs/TreeSelectField/TreeSelectField.tsx
|
|
17394
|
-
import React14, { useCallback as useCallback18, useContext as
|
|
17426
|
+
import React14, { useCallback as useCallback18, useContext as useContext21, useEffect as useEffect21, useMemo as useMemo26, useRef as useRef38, useState as useState31 } from "react";
|
|
17395
17427
|
import { useButton as useButton7, useComboBox, useFilter as useFilter2, useOverlayPosition as useOverlayPosition3 } from "react-aria";
|
|
17396
17428
|
import { Item as Item3, useComboBoxState } from "react-stately";
|
|
17397
17429
|
import { trussProps as trussProps68, maybeCssVar as maybeCssVar32 } from "@homebound/truss/runtime";
|
|
@@ -17421,7 +17453,7 @@ import { Item as Item2, Section as Section2, useListData, useSelectState } from
|
|
|
17421
17453
|
import { useEffect as useEffect17, useRef as useRef32, useState as useState28 } from "react";
|
|
17422
17454
|
import { useFocus } from "react-aria";
|
|
17423
17455
|
import { trussProps as trussProps60 } from "@homebound/truss/runtime";
|
|
17424
|
-
import { jsx as
|
|
17456
|
+
import { jsx as jsx95 } from "react/jsx-runtime";
|
|
17425
17457
|
function ChipTextField(props) {
|
|
17426
17458
|
const {
|
|
17427
17459
|
autoFocus,
|
|
@@ -17467,7 +17499,7 @@ function ChipTextField(props) {
|
|
|
17467
17499
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17468
17500
|
[]
|
|
17469
17501
|
);
|
|
17470
|
-
return /* @__PURE__ */
|
|
17502
|
+
return /* @__PURE__ */ jsx95("span", { ref: fieldRef, contentEditable: true, suppressContentEditableWarning: true, "aria-required": required, "aria-label": label, onKeyDown: (e) => {
|
|
17471
17503
|
if (e.key === "Enter") {
|
|
17472
17504
|
e.preventDefault();
|
|
17473
17505
|
maybeCall(onEnter);
|
|
@@ -17494,14 +17526,14 @@ function ChipTextField(props) {
|
|
|
17494
17526
|
|
|
17495
17527
|
// src/inputs/internal/ListBoxChip.tsx
|
|
17496
17528
|
import { trussProps as trussProps61 } from "@homebound/truss/runtime";
|
|
17497
|
-
import { jsx as
|
|
17529
|
+
import { jsx as jsx96 } from "react/jsx-runtime";
|
|
17498
17530
|
function ListBoxChip({
|
|
17499
17531
|
label
|
|
17500
17532
|
}) {
|
|
17501
17533
|
const {
|
|
17502
17534
|
fieldProps
|
|
17503
17535
|
} = usePresentationContext();
|
|
17504
|
-
return /* @__PURE__ */
|
|
17536
|
+
return /* @__PURE__ */ jsx96("span", { ...trussProps61({
|
|
17505
17537
|
...chipBaseStyles(fieldProps?.compact),
|
|
17506
17538
|
...{
|
|
17507
17539
|
whiteSpace: "wsnw",
|
|
@@ -17563,7 +17595,7 @@ function defaultOptionLabel(opt) {
|
|
|
17563
17595
|
|
|
17564
17596
|
// src/inputs/ChipSelectField.tsx
|
|
17565
17597
|
import { trussProps as trussProps62 } from "@homebound/truss/runtime";
|
|
17566
|
-
import { Fragment as Fragment27, jsx as
|
|
17598
|
+
import { Fragment as Fragment27, jsx as jsx97, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
17567
17599
|
function ChipSelectField(props) {
|
|
17568
17600
|
const firstRender = useRef33(true);
|
|
17569
17601
|
const {
|
|
@@ -17660,16 +17692,16 @@ function ChipSelectField(props) {
|
|
|
17660
17692
|
);
|
|
17661
17693
|
const selectChildren = useMemo25(() => listData.items.map((s) => {
|
|
17662
17694
|
if (isListBoxSection(s)) {
|
|
17663
|
-
return /* @__PURE__ */
|
|
17695
|
+
return /* @__PURE__ */ jsx97(Section2, { title: s.title, items: s.options, children: (item) => {
|
|
17664
17696
|
if (isPersistentItem(item)) {
|
|
17665
|
-
return /* @__PURE__ */
|
|
17697
|
+
return /* @__PURE__ */ jsx97(Item2, { textValue: item.name, children: item.name }, item.id);
|
|
17666
17698
|
}
|
|
17667
17699
|
const label3 = getOptionLabel(item);
|
|
17668
|
-
return /* @__PURE__ */
|
|
17700
|
+
return /* @__PURE__ */ jsx97(Item2, { textValue: label3, children: /* @__PURE__ */ jsx97(ListBoxChip, { label: label3 }) }, getOptionValue(item));
|
|
17669
17701
|
} }, camelCase4(s.title));
|
|
17670
17702
|
}
|
|
17671
17703
|
const label2 = getOptionLabel(s);
|
|
17672
|
-
return /* @__PURE__ */
|
|
17704
|
+
return /* @__PURE__ */ jsx97(Item2, { textValue: label2, children: /* @__PURE__ */ jsx97(ListBoxChip, { label: label2 }) }, getOptionValue(s));
|
|
17673
17705
|
}), [listData.items, getOptionLabel, getOptionValue]);
|
|
17674
17706
|
const selectHookProps = {
|
|
17675
17707
|
label,
|
|
@@ -17733,7 +17765,7 @@ function ChipSelectField(props) {
|
|
|
17733
17765
|
};
|
|
17734
17766
|
const [showInput, setShowInput] = useState29(false);
|
|
17735
17767
|
return /* @__PURE__ */ jsxs60(Fragment27, { children: [
|
|
17736
|
-
showInput && onCreateNew && /* @__PURE__ */
|
|
17768
|
+
showInput && onCreateNew && /* @__PURE__ */ jsx97(CreateNewField, { onBlur: () => setShowInput(false), onEnter: async (value2) => {
|
|
17737
17769
|
await onCreateNew(value2);
|
|
17738
17770
|
setShowInput(false);
|
|
17739
17771
|
}, ...tid.createNewField }),
|
|
@@ -17757,8 +17789,8 @@ function ChipSelectField(props) {
|
|
|
17757
17789
|
display: "dn"
|
|
17758
17790
|
} : {}
|
|
17759
17791
|
}), children: [
|
|
17760
|
-
/* @__PURE__ */
|
|
17761
|
-
/* @__PURE__ */
|
|
17792
|
+
/* @__PURE__ */ jsx97(Label, { label, labelProps, hidden: true, ...tid.label }),
|
|
17793
|
+
/* @__PURE__ */ jsx97("button", { ...mergeProps17(focusProps, buttonProps), ref: buttonRef, ...trussProps62({
|
|
17762
17794
|
...{
|
|
17763
17795
|
textAlign: "tal",
|
|
17764
17796
|
borderRadius: "br16",
|
|
@@ -17773,8 +17805,8 @@ function ChipSelectField(props) {
|
|
|
17773
17805
|
} : {}
|
|
17774
17806
|
},
|
|
17775
17807
|
...isDisabled ? chipDisabledStyles : chipHoverOnlyStyles
|
|
17776
|
-
}), title: state.selectedItem ? state.selectedItem.textValue : placeholder, ...tid, children: /* @__PURE__ */
|
|
17777
|
-
showClearButton && /* @__PURE__ */
|
|
17808
|
+
}), title: state.selectedItem ? state.selectedItem.textValue : placeholder, ...tid, children: /* @__PURE__ */ jsx97("span", { ...valueProps, className: "oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1 wbba", children: state.selectedItem ? state.selectedItem.textValue : placeholder }) }),
|
|
17809
|
+
showClearButton && /* @__PURE__ */ jsx97("button", { ...clearFocusProps, ...trussProps62({
|
|
17778
17810
|
...{
|
|
17779
17811
|
paddingRight: "pr_4px",
|
|
17780
17812
|
borderRadius: "bra_0_16px_16px_0",
|
|
@@ -17787,10 +17819,10 @@ function ChipSelectField(props) {
|
|
|
17787
17819
|
}), onClick: () => {
|
|
17788
17820
|
onSelect(void 0, void 0);
|
|
17789
17821
|
setIsClearFocused(false);
|
|
17790
|
-
}, "aria-label": "Remove", ...tid.clearButton, children: /* @__PURE__ */
|
|
17822
|
+
}, "aria-label": "Remove", ...tid.clearButton, children: /* @__PURE__ */ jsx97(Icon, { icon: "x", color: "rgba(141, 141, 141, 1)" /* Gray600 */, inc: typeScale === "xs" ? 2 : void 0 }) })
|
|
17791
17823
|
] })
|
|
17792
17824
|
}),
|
|
17793
|
-
state.isOpen && /* @__PURE__ */
|
|
17825
|
+
state.isOpen && /* @__PURE__ */ jsx97(Popover, { triggerRef: buttonRef, popoverRef, positionProps: overlayProps, onClose: state.close, isOpen: state.isOpen, shouldCloseOnBlur: true, children: /* @__PURE__ */ jsx97(ListBox, { ...menuProps, listBoxRef, state, getOptionLabel, getOptionValue, positionProps: overlayProps }) })
|
|
17794
17826
|
] });
|
|
17795
17827
|
}
|
|
17796
17828
|
var persistentItemPrefix = "persistentItem:";
|
|
@@ -17814,12 +17846,12 @@ function CreateNewField(props) {
|
|
|
17814
17846
|
} = props;
|
|
17815
17847
|
const [value, setValue] = useState29("Add new");
|
|
17816
17848
|
const tid = useTestIds(props);
|
|
17817
|
-
return /* @__PURE__ */
|
|
17849
|
+
return /* @__PURE__ */ jsx97(ChipTextField, { autoFocus: true, label: "Add new", value, onChange: setValue, onEnter: () => onEnter(value), onBlur, ...tid });
|
|
17818
17850
|
}
|
|
17819
17851
|
|
|
17820
17852
|
// src/inputs/internal/Option.tsx
|
|
17821
17853
|
import { trussProps as trussProps63 } from "@homebound/truss/runtime";
|
|
17822
|
-
import { jsx as
|
|
17854
|
+
import { jsx as jsx98, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
17823
17855
|
function Option(props) {
|
|
17824
17856
|
const {
|
|
17825
17857
|
item,
|
|
@@ -17896,7 +17928,7 @@ function Option(props) {
|
|
|
17896
17928
|
...isDisabled ? themeStyles.disabled : {}
|
|
17897
17929
|
}), children: [
|
|
17898
17930
|
item.rendered,
|
|
17899
|
-
isSelected && /* @__PURE__ */
|
|
17931
|
+
isSelected && /* @__PURE__ */ jsx98("span", { className: "fs0", children: /* @__PURE__ */ jsx98(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ }) })
|
|
17900
17932
|
] })
|
|
17901
17933
|
});
|
|
17902
17934
|
}
|
|
@@ -17908,7 +17940,7 @@ import { Virtuoso as Virtuoso2 } from "react-virtuoso";
|
|
|
17908
17940
|
|
|
17909
17941
|
// src/inputs/internal/LoadingDots.tsx
|
|
17910
17942
|
import { trussProps as trussProps64 } from "@homebound/truss/runtime";
|
|
17911
|
-
import { jsx as
|
|
17943
|
+
import { jsx as jsx99, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
17912
17944
|
function LoadingDots() {
|
|
17913
17945
|
const dotCss = {
|
|
17914
17946
|
height: "h_8px",
|
|
@@ -17919,20 +17951,20 @@ function LoadingDots() {
|
|
|
17919
17951
|
}]
|
|
17920
17952
|
};
|
|
17921
17953
|
const tid = useTestIds({});
|
|
17922
|
-
return /* @__PURE__ */
|
|
17923
|
-
/* @__PURE__ */
|
|
17954
|
+
return /* @__PURE__ */ jsx99("div", { className: "pt2 pb2 df jcc", ...tid.loadingDots, children: /* @__PURE__ */ jsxs62("div", { "aria-label": "Loading", className: "df g_4px", children: [
|
|
17955
|
+
/* @__PURE__ */ jsx99("div", { ...trussProps64({
|
|
17924
17956
|
...dotCss,
|
|
17925
17957
|
...{
|
|
17926
17958
|
animation: "anim_loadingDots_800ms_linear_0ms_infinite_alternate"
|
|
17927
17959
|
}
|
|
17928
17960
|
}) }),
|
|
17929
|
-
/* @__PURE__ */
|
|
17961
|
+
/* @__PURE__ */ jsx99("div", { ...trussProps64({
|
|
17930
17962
|
...dotCss,
|
|
17931
17963
|
...{
|
|
17932
17964
|
animation: "anim_loadingDots_800ms_linear_300ms_infinite_alternate"
|
|
17933
17965
|
}
|
|
17934
17966
|
}) }),
|
|
17935
|
-
/* @__PURE__ */
|
|
17967
|
+
/* @__PURE__ */ jsx99("div", { ...trussProps64({
|
|
17936
17968
|
...dotCss,
|
|
17937
17969
|
...{
|
|
17938
17970
|
animation: "anim_loadingDots_800ms_linear_600ms_infinite_alternate"
|
|
@@ -17945,7 +17977,7 @@ function LoadingDots() {
|
|
|
17945
17977
|
import { useRef as useRef35 } from "react";
|
|
17946
17978
|
import { useHover as useHover12, useOption as useOption2 } from "react-aria";
|
|
17947
17979
|
import { trussProps as trussProps65 } from "@homebound/truss/runtime";
|
|
17948
|
-
import { jsx as
|
|
17980
|
+
import { jsx as jsx100, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
17949
17981
|
function TreeOption(props) {
|
|
17950
17982
|
const {
|
|
17951
17983
|
item,
|
|
@@ -18034,15 +18066,15 @@ function TreeOption(props) {
|
|
|
18034
18066
|
...isFocused && !isGroup ? listItemStyles.focus : {},
|
|
18035
18067
|
...isDisabled && !isGroup ? listItemStyles.disabled : {}
|
|
18036
18068
|
}), children: [
|
|
18037
|
-
/* @__PURE__ */
|
|
18069
|
+
/* @__PURE__ */ jsx100("span", { className: "w_18px fs0 df aic", children: canCollapse && /* @__PURE__ */ jsx100("button", { onClick: (e) => {
|
|
18038
18070
|
e.preventDefault();
|
|
18039
18071
|
e.stopPropagation();
|
|
18040
18072
|
toggleCollapsed();
|
|
18041
18073
|
return false;
|
|
18042
|
-
}, className: "br4 h_16px w_16px bgTransparent h_bgGray300", ...tid[`collapseToggle_${item.key}`], children: /* @__PURE__ */
|
|
18074
|
+
}, className: "br4 h_16px w_16px bgTransparent h_bgGray300", ...tid[`collapseToggle_${item.key}`], children: /* @__PURE__ */ jsx100(Icon, { icon: collapsedKeys.includes(item.key) ? "triangleRight" : "triangleDown", inc: 2 }) }) }),
|
|
18043
18075
|
/* @__PURE__ */ jsxs63("span", { className: "df aic g_1 h100 fg1 pt1 pb1 pr2", ref, ...optionProps, "data-label": item.textValue, children: [
|
|
18044
|
-
!isGroup && /* @__PURE__ */
|
|
18045
|
-
/* @__PURE__ */
|
|
18076
|
+
!isGroup && /* @__PURE__ */ jsx100(StyledCheckbox, { isDisabled, isSelected, isIndeterminate, ...tid[item.key.toString()] }),
|
|
18077
|
+
/* @__PURE__ */ jsx100("div", { className: "pl1", children: item.rendered })
|
|
18046
18078
|
] })
|
|
18047
18079
|
] })
|
|
18048
18080
|
});
|
|
@@ -18091,7 +18123,7 @@ function isLeveledNode(node) {
|
|
|
18091
18123
|
}
|
|
18092
18124
|
|
|
18093
18125
|
// src/inputs/internal/VirtualizedOptions.tsx
|
|
18094
|
-
import { jsx as
|
|
18126
|
+
import { jsx as jsx101 } from "react/jsx-runtime";
|
|
18095
18127
|
function VirtualizedOptions(props) {
|
|
18096
18128
|
const { state, items, onListHeightChange, scrollOnFocus, loading, disabledOptionsWithReasons, isTree } = props;
|
|
18097
18129
|
const virtuosoRef = useRef36(null);
|
|
@@ -18109,7 +18141,7 @@ function VirtualizedOptions(props) {
|
|
|
18109
18141
|
[focusedItem]
|
|
18110
18142
|
);
|
|
18111
18143
|
const key = process.env.NODE_ENV === "test" ? items.length : "virtuoso";
|
|
18112
|
-
return /* @__PURE__ */
|
|
18144
|
+
return /* @__PURE__ */ jsx101(
|
|
18113
18145
|
Virtuoso2,
|
|
18114
18146
|
{
|
|
18115
18147
|
ref: virtuosoRef,
|
|
@@ -18129,7 +18161,7 @@ function VirtualizedOptions(props) {
|
|
|
18129
18161
|
const item = items[idx];
|
|
18130
18162
|
if (item) {
|
|
18131
18163
|
if (isTree && isLeveledNode(item)) {
|
|
18132
|
-
return /* @__PURE__ */
|
|
18164
|
+
return /* @__PURE__ */ jsx101(
|
|
18133
18165
|
TreeOption,
|
|
18134
18166
|
{
|
|
18135
18167
|
item,
|
|
@@ -18140,7 +18172,7 @@ function VirtualizedOptions(props) {
|
|
|
18140
18172
|
);
|
|
18141
18173
|
}
|
|
18142
18174
|
if (!isLeveledNode(item)) {
|
|
18143
|
-
return /* @__PURE__ */
|
|
18175
|
+
return /* @__PURE__ */ jsx101(
|
|
18144
18176
|
Option,
|
|
18145
18177
|
{
|
|
18146
18178
|
item,
|
|
@@ -18155,7 +18187,7 @@ function VirtualizedOptions(props) {
|
|
|
18155
18187
|
return null;
|
|
18156
18188
|
},
|
|
18157
18189
|
components: !loading ? {} : {
|
|
18158
|
-
Footer: typeof loading === "function" ? loading : () => /* @__PURE__ */
|
|
18190
|
+
Footer: typeof loading === "function" ? loading : () => /* @__PURE__ */ jsx101(LoadingDots, {})
|
|
18159
18191
|
}
|
|
18160
18192
|
},
|
|
18161
18193
|
key
|
|
@@ -18164,7 +18196,7 @@ function VirtualizedOptions(props) {
|
|
|
18164
18196
|
|
|
18165
18197
|
// src/inputs/internal/ListBoxSection.tsx
|
|
18166
18198
|
import { trussProps as trussProps66 } from "@homebound/truss/runtime";
|
|
18167
|
-
import { Fragment as Fragment28, jsx as
|
|
18199
|
+
import { Fragment as Fragment28, jsx as jsx102, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
18168
18200
|
function ListBoxSection(props) {
|
|
18169
18201
|
const {
|
|
18170
18202
|
section,
|
|
@@ -18186,18 +18218,18 @@ function ListBoxSection(props) {
|
|
|
18186
18218
|
const isPersistentSection = section.key !== state.collection.getFirstKey();
|
|
18187
18219
|
const childNodes = [...section.childNodes];
|
|
18188
18220
|
return /* @__PURE__ */ jsxs64(Fragment28, { children: [
|
|
18189
|
-
isPersistentSection && /* @__PURE__ */
|
|
18221
|
+
isPersistentSection && /* @__PURE__ */ jsx102("li", { ...separatorProps, ...trussProps66({
|
|
18190
18222
|
borderTopStyle: "bts_solid",
|
|
18191
18223
|
borderTopWidth: "btw_1px",
|
|
18192
18224
|
borderColor: ["bc_var", {
|
|
18193
18225
|
"--borderColor": "var(--b-surface-separator)"
|
|
18194
18226
|
}]
|
|
18195
18227
|
}) }),
|
|
18196
|
-
/* @__PURE__ */
|
|
18228
|
+
/* @__PURE__ */ jsx102("li", { ...itemProps, ...trussProps66({
|
|
18197
18229
|
...!isPersistentSection ? {
|
|
18198
18230
|
overflow: "oa"
|
|
18199
18231
|
} : {}
|
|
18200
|
-
}), children: /* @__PURE__ */
|
|
18232
|
+
}), children: /* @__PURE__ */ jsx102("ul", { ...trussProps66({
|
|
18201
18233
|
padding: "p_0",
|
|
18202
18234
|
margin: "m_0",
|
|
18203
18235
|
listStyle: "listNone",
|
|
@@ -18206,12 +18238,12 @@ function ListBoxSection(props) {
|
|
|
18206
18238
|
"--height": `${popoverHeight - sectionSeparatorHeight - persistentItemHeight}px`
|
|
18207
18239
|
}]
|
|
18208
18240
|
} : {}
|
|
18209
|
-
}), ...groupProps, children: isPersistentSection ? childNodes.map((item) => /* @__PURE__ */
|
|
18241
|
+
}), ...groupProps, children: isPersistentSection ? childNodes.map((item) => /* @__PURE__ */ jsx102(Option, { item, state, disabledReason: disabledOptionsWithReasons[item.key] }, item.key)) : /* @__PURE__ */ jsx102(VirtualizedOptions, { state, items: childNodes, onListHeightChange, scrollOnFocus, disabledOptionsWithReasons }) }) })
|
|
18210
18242
|
] });
|
|
18211
18243
|
}
|
|
18212
18244
|
|
|
18213
18245
|
// src/inputs/internal/ListBoxToggleChip.tsx
|
|
18214
|
-
import { jsx as
|
|
18246
|
+
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
18215
18247
|
function ListBoxToggleChip(props) {
|
|
18216
18248
|
const {
|
|
18217
18249
|
state,
|
|
@@ -18220,14 +18252,14 @@ function ListBoxToggleChip(props) {
|
|
|
18220
18252
|
getOptionValue,
|
|
18221
18253
|
disabled = false
|
|
18222
18254
|
} = props;
|
|
18223
|
-
return /* @__PURE__ */
|
|
18255
|
+
return /* @__PURE__ */ jsx103("li", { className: "mr1 mb1", children: /* @__PURE__ */ jsx103(ToggleChip, { text: getOptionLabel(option), onClick: () => {
|
|
18224
18256
|
state.selectionManager.toggleSelection(String(getOptionValue(option)));
|
|
18225
18257
|
}, disabled }) });
|
|
18226
18258
|
}
|
|
18227
18259
|
|
|
18228
18260
|
// src/inputs/internal/ListBox.tsx
|
|
18229
18261
|
import { trussProps as trussProps67 } from "@homebound/truss/runtime";
|
|
18230
|
-
import { jsx as
|
|
18262
|
+
import { jsx as jsx104, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
18231
18263
|
function ListBox(props) {
|
|
18232
18264
|
const {
|
|
18233
18265
|
state,
|
|
@@ -18297,7 +18329,7 @@ function ListBox(props) {
|
|
|
18297
18329
|
boxShadow: "bshBasic h_bshHover"
|
|
18298
18330
|
} : {}
|
|
18299
18331
|
}), ref: listBoxRef, ...listBoxProps, children: [
|
|
18300
|
-
isMultiSelect && !hideChips && selectedOptions.length > 0 && /* @__PURE__ */
|
|
18332
|
+
isMultiSelect && !hideChips && selectedOptions.length > 0 && /* @__PURE__ */ jsx104("ul", { ...trussProps67({
|
|
18301
18333
|
padding: "p_0",
|
|
18302
18334
|
margin: "m_0",
|
|
18303
18335
|
listStyle: "listNone",
|
|
@@ -18314,8 +18346,8 @@ function ListBox(props) {
|
|
|
18314
18346
|
flexWrap: "fww",
|
|
18315
18347
|
maxHeight: "maxh50",
|
|
18316
18348
|
overflow: "oa"
|
|
18317
|
-
}), ref: selectedList, children: selectedOptions.map((o) => /* @__PURE__ */
|
|
18318
|
-
/* @__PURE__ */
|
|
18349
|
+
}), ref: selectedList, children: selectedOptions.map((o) => /* @__PURE__ */ jsx104(ListBoxToggleChip, { state, option: o, getOptionValue, getOptionLabel, disabled: state.disabledKeys.has(getOptionValue(o)) }, getOptionValue(o))) }),
|
|
18350
|
+
/* @__PURE__ */ jsx104("ul", { className: "p_0 m_0 listNone fg1", children: hasSections ? [...state.collection].map((section) => /* @__PURE__ */ jsx104(
|
|
18319
18351
|
ListBoxSection,
|
|
18320
18352
|
{
|
|
18321
18353
|
section,
|
|
@@ -18326,7 +18358,7 @@ function ListBox(props) {
|
|
|
18326
18358
|
disabledOptionsWithReasons
|
|
18327
18359
|
},
|
|
18328
18360
|
section.key
|
|
18329
|
-
)) : /* @__PURE__ */
|
|
18361
|
+
)) : /* @__PURE__ */ jsx104(
|
|
18330
18362
|
VirtualizedOptions,
|
|
18331
18363
|
{
|
|
18332
18364
|
state,
|
|
@@ -18343,7 +18375,7 @@ function ListBox(props) {
|
|
|
18343
18375
|
var maxPopoverHeight = 512;
|
|
18344
18376
|
|
|
18345
18377
|
// src/inputs/TreeSelectField/TreeSelectField.tsx
|
|
18346
|
-
import { jsx as
|
|
18378
|
+
import { jsx as jsx105, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
18347
18379
|
function TreeSelectField(props) {
|
|
18348
18380
|
const {
|
|
18349
18381
|
getOptionValue = (opt) => opt.id,
|
|
@@ -18372,7 +18404,7 @@ function TreeSelectField(props) {
|
|
|
18372
18404
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18373
18405
|
[collapsedKeys, setCollapsedKeys, groupKeys]
|
|
18374
18406
|
);
|
|
18375
|
-
return /* @__PURE__ */
|
|
18407
|
+
return /* @__PURE__ */ jsx105(CollapsedContext.Provider, { value: contextValue, children: /* @__PURE__ */ jsx105(TreeSelectFieldBase, { ...otherProps, options, getOptionLabel, getOptionValue, values, onSelect: ({
|
|
18376
18408
|
all,
|
|
18377
18409
|
leaf,
|
|
18378
18410
|
root
|
|
@@ -18385,7 +18417,7 @@ function TreeSelectField(props) {
|
|
|
18385
18417
|
} }) });
|
|
18386
18418
|
}
|
|
18387
18419
|
function useTreeSelectFieldProvider() {
|
|
18388
|
-
return
|
|
18420
|
+
return useContext21(CollapsedContext);
|
|
18389
18421
|
}
|
|
18390
18422
|
var CollapsedContext = React14.createContext({
|
|
18391
18423
|
collapsedKeys: [],
|
|
@@ -18544,7 +18576,7 @@ function TreeSelectFieldBase(props) {
|
|
|
18544
18576
|
}));
|
|
18545
18577
|
}
|
|
18546
18578
|
}
|
|
18547
|
-
const comboBoxChildren = useCallback18(([item]) => /* @__PURE__ */
|
|
18579
|
+
const comboBoxChildren = useCallback18(([item]) => /* @__PURE__ */ jsx105(Item3, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item))), [getOptionValue, getOptionLabel, getOptionMenuLabel]);
|
|
18548
18580
|
const comboBoxProps = {
|
|
18549
18581
|
...otherProps,
|
|
18550
18582
|
disabledKeys,
|
|
@@ -18744,8 +18776,8 @@ function TreeSelectFieldBase(props) {
|
|
|
18744
18776
|
maxWidth: "maxw100"
|
|
18745
18777
|
} : {}
|
|
18746
18778
|
}), ref: comboBoxRef, children: [
|
|
18747
|
-
/* @__PURE__ */
|
|
18748
|
-
state.isOpen && /* @__PURE__ */
|
|
18779
|
+
/* @__PURE__ */ jsx105(ComboBoxInput, { ...otherProps, fullWidth, labelStyle, buttonProps, buttonRef: triggerRef, inputProps, inputRef, inputWrapRef, listBoxRef, state, labelProps, selectedOptions: fieldState.selectedOptions, selectedOptionsLabels: fieldState.selectedOptionsLabels, getOptionValue, getOptionLabel, borderless, tooltip: resolveTooltip(disabled, void 0, readOnly), resetField, nothingSelectedText, isTree: true }),
|
|
18780
|
+
state.isOpen && /* @__PURE__ */ jsx105(
|
|
18749
18781
|
Popover,
|
|
18750
18782
|
{
|
|
18751
18783
|
triggerRef,
|
|
@@ -18754,7 +18786,7 @@ function TreeSelectFieldBase(props) {
|
|
|
18754
18786
|
onClose: () => state.toggle(),
|
|
18755
18787
|
isOpen: state.isOpen,
|
|
18756
18788
|
minWidth: 320,
|
|
18757
|
-
children: /* @__PURE__ */
|
|
18789
|
+
children: /* @__PURE__ */ jsx105(ListBox, { ...listBoxProps, positionProps, state, listBoxRef, selectedOptions: fieldState.selectedChipOptions, getOptionLabel, getOptionValue: (o) => valueToKey(getOptionValue(o)), horizontalLayout: labelStyle === "left", loading: fieldState.optionsLoading, disabledOptionsWithReasons, isTree: true })
|
|
18758
18790
|
}
|
|
18759
18791
|
)
|
|
18760
18792
|
] });
|
|
@@ -18814,7 +18846,7 @@ function isLeafOption(option) {
|
|
|
18814
18846
|
|
|
18815
18847
|
// src/inputs/internal/ComboBoxInput.tsx
|
|
18816
18848
|
import { trussProps as trussProps69 } from "@homebound/truss/runtime";
|
|
18817
|
-
import { jsx as
|
|
18849
|
+
import { jsx as jsx106 } from "react/jsx-runtime";
|
|
18818
18850
|
function ComboBoxInput(props) {
|
|
18819
18851
|
const {
|
|
18820
18852
|
inputProps,
|
|
@@ -18867,9 +18899,9 @@ function ComboBoxInput(props) {
|
|
|
18867
18899
|
inputWrapRef,
|
|
18868
18900
|
value: inputProps.value
|
|
18869
18901
|
});
|
|
18870
|
-
return /* @__PURE__ */
|
|
18902
|
+
return /* @__PURE__ */ jsx106(TextFieldBase, { ...otherProps, ...multilineProps, unfocusedPlaceholder: showChipSelection && /* @__PURE__ */ jsx106(Chips, { compact: otherProps.compact, values: chipLabels, wrap: allowWrap }), inputRef, inputWrapRef, errorMsg, xss: otherProps.labelStyle !== "inline" && !inputProps.readOnly ? {
|
|
18871
18903
|
fontWeight: "fw5"
|
|
18872
|
-
} : void 0, startAdornment: showNumSelection && /* @__PURE__ */
|
|
18904
|
+
} : void 0, startAdornment: showNumSelection && /* @__PURE__ */ jsx106(Tooltip, { title: /* @__PURE__ */ jsx106(SelectedOptionBullets, { labels: chipLabels }), children: /* @__PURE__ */ jsx106(CountBadge, { count: selectedChipCount, "data-testid": "selectedOptionsCount" }) }) || showFieldDecoration && fieldDecoration(selectedOptions[0]), endAdornment: !inputProps.readOnly && /* @__PURE__ */ jsx106("button", { ...buttonProps, disabled: inputProps.disabled, ref: buttonRef, ...trussProps69({
|
|
18873
18905
|
...{
|
|
18874
18906
|
borderRadius: "br4",
|
|
18875
18907
|
outline: "ol_0",
|
|
@@ -18883,7 +18915,7 @@ function ComboBoxInput(props) {
|
|
|
18883
18915
|
"--color": "var(--b-field-text-disabled)"
|
|
18884
18916
|
}]
|
|
18885
18917
|
} : {}
|
|
18886
|
-
}), "data-testid": "toggleListBox", children: /* @__PURE__ */
|
|
18918
|
+
}), "data-testid": "toggleListBox", children: /* @__PURE__ */ jsx106(Icon, { icon: state.isOpen ? "chevronUp" : "chevronDown" }) }), inputProps: {
|
|
18887
18919
|
...mergeProps19(inputProps, {
|
|
18888
18920
|
"aria-invalid": Boolean(errorMsg),
|
|
18889
18921
|
onInput: () => state.open()
|
|
@@ -18962,12 +18994,12 @@ function ComboBoxInput(props) {
|
|
|
18962
18994
|
function SelectedOptionBullets({
|
|
18963
18995
|
labels = []
|
|
18964
18996
|
}) {
|
|
18965
|
-
return /* @__PURE__ */
|
|
18997
|
+
return /* @__PURE__ */ jsx106("div", { children: labels?.map((label) => /* @__PURE__ */ jsx106("li", { children: label }, label)) });
|
|
18966
18998
|
}
|
|
18967
18999
|
|
|
18968
19000
|
// src/inputs/internal/ComboBoxBase.tsx
|
|
18969
19001
|
import { useDebounce } from "use-debounce";
|
|
18970
|
-
import { jsx as
|
|
19002
|
+
import { jsx as jsx107, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
18971
19003
|
function ComboBoxBase(props) {
|
|
18972
19004
|
const {
|
|
18973
19005
|
fieldProps
|
|
@@ -19015,7 +19047,7 @@ function ComboBoxBase(props) {
|
|
|
19015
19047
|
return propOptionMenuLabel(o, Boolean(unsetLabel) && o === unsetOption, isAddNew);
|
|
19016
19048
|
}
|
|
19017
19049
|
const label = getOptionLabel(o);
|
|
19018
|
-
return isAddNew ? /* @__PURE__ */
|
|
19050
|
+
return isAddNew ? /* @__PURE__ */ jsx107("span", { className: "fsyi", children: label }) : label;
|
|
19019
19051
|
},
|
|
19020
19052
|
// propOptionMenuLabel is basically always a lambda, so don't dep on it
|
|
19021
19053
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -19102,7 +19134,7 @@ function ComboBoxBase(props) {
|
|
|
19102
19134
|
const listBoxRef = useRef39(null);
|
|
19103
19135
|
const popoverRef = useRef39(null);
|
|
19104
19136
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
19105
|
-
const comboBoxChildren = useCallback19((item) => /* @__PURE__ */
|
|
19137
|
+
const comboBoxChildren = useCallback19((item) => /* @__PURE__ */ jsx107(Item4, { textValue: getOptionLabel(item), children: getOptionMenuLabel(item) }, valueToKey(getOptionValue(item))), [getOptionValue, getOptionLabel, getOptionMenuLabel]);
|
|
19106
19138
|
const selectedKeys = useMemo27(() => {
|
|
19107
19139
|
return selectedOptions.map((o) => valueToKey(getOptionValue(o)));
|
|
19108
19140
|
}, [selectedOptions, getOptionValue]);
|
|
@@ -19225,8 +19257,8 @@ function ComboBoxBase(props) {
|
|
|
19225
19257
|
maxWidth: "maxw100"
|
|
19226
19258
|
} : {}
|
|
19227
19259
|
}), ref: comboBoxRef, children: [
|
|
19228
|
-
/* @__PURE__ */
|
|
19229
|
-
state.isOpen && /* @__PURE__ */
|
|
19260
|
+
/* @__PURE__ */ jsx107(ComboBoxInput, { ...otherProps, inputStylePalette, fullWidth, buttonProps, buttonRef: triggerRef, inputProps, inputRef, inputWrapRef, listBoxRef, state, labelProps, selectedOptions, getOptionValue, getOptionLabel, nothingSelectedText, borderless, tooltip: resolveTooltip(disabled, void 0, readOnly), resetField, hideChips, ...proposalProps }),
|
|
19261
|
+
state.isOpen && /* @__PURE__ */ jsx107(
|
|
19230
19262
|
Popover,
|
|
19231
19263
|
{
|
|
19232
19264
|
triggerRef,
|
|
@@ -19235,7 +19267,7 @@ function ComboBoxBase(props) {
|
|
|
19235
19267
|
onClose: () => multiselect ? state.toggle() : state.close(),
|
|
19236
19268
|
isOpen: state.isOpen,
|
|
19237
19269
|
minWidth: 200,
|
|
19238
|
-
children: /* @__PURE__ */
|
|
19270
|
+
children: /* @__PURE__ */ jsx107(ListBox, { ...listBoxProps, positionProps, state, listBoxRef, selectedOptions, getOptionLabel, getOptionValue: (o) => valueToKey(getOptionValue(o)), horizontalLayout: labelStyle === "left", loading: fieldState.optionsLoading, disabledOptionsWithReasons, hideChips })
|
|
19239
19271
|
}
|
|
19240
19272
|
)
|
|
19241
19273
|
] });
|
|
@@ -19315,7 +19347,7 @@ function disabledOptionToKeyedTuple(disabledOption) {
|
|
|
19315
19347
|
}
|
|
19316
19348
|
|
|
19317
19349
|
// src/inputs/SelectField.tsx
|
|
19318
|
-
import { jsx as
|
|
19350
|
+
import { jsx as jsx108 } from "react/jsx-runtime";
|
|
19319
19351
|
function SelectField(props) {
|
|
19320
19352
|
const {
|
|
19321
19353
|
getOptionValue = defaultOptionValue,
|
|
@@ -19328,7 +19360,7 @@ function SelectField(props) {
|
|
|
19328
19360
|
} = props;
|
|
19329
19361
|
const values = useMemo28(() => [value], [value]);
|
|
19330
19362
|
const proposedValues = useMemo28(() => proposedValue === void 0 ? void 0 : [proposedValue], [proposedValue]);
|
|
19331
|
-
return /* @__PURE__ */
|
|
19363
|
+
return /* @__PURE__ */ jsx108(
|
|
19332
19364
|
ComboBoxBase,
|
|
19333
19365
|
{
|
|
19334
19366
|
...otherProps,
|
|
@@ -19348,7 +19380,7 @@ function SelectField(props) {
|
|
|
19348
19380
|
}
|
|
19349
19381
|
|
|
19350
19382
|
// src/components/Filters/Filters.tsx
|
|
19351
|
-
import { jsx as
|
|
19383
|
+
import { jsx as jsx109, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
19352
19384
|
function Filters(props) {
|
|
19353
19385
|
const {
|
|
19354
19386
|
filter,
|
|
@@ -19370,7 +19402,7 @@ function Filters(props) {
|
|
|
19370
19402
|
return [Object.fromEntries(impls), {}];
|
|
19371
19403
|
}, [numberOfInlineFilters, vertical, filterDefs]);
|
|
19372
19404
|
const numModalFilters = safeKeys(modalFilters).filter((fk) => filter[fk] !== void 0).length;
|
|
19373
|
-
const maybeGroupByField = groupBy ? /* @__PURE__ */
|
|
19405
|
+
const maybeGroupByField = groupBy ? /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(SelectField, { label: "Group by", labelStyle: !vertical ? "inline" : "above", sizeToContent: !vertical, options: groupBy.options, getOptionValue: (o) => o.id, getOptionLabel: (o) => o.name, value: groupBy.value, onSelect: (g) => g && groupBy.setValue(g) }) }) : null;
|
|
19374
19406
|
return /* @__PURE__ */ jsxs68("div", { ...trussProps71({
|
|
19375
19407
|
...vertical ? {
|
|
19376
19408
|
display: "df",
|
|
@@ -19383,19 +19415,19 @@ function Filters(props) {
|
|
|
19383
19415
|
}
|
|
19384
19416
|
}), ...testId, children: [
|
|
19385
19417
|
maybeGroupByField,
|
|
19386
|
-
safeEntries(pageFilters).map(([key, f]) => /* @__PURE__ */
|
|
19387
|
-
Object.keys(modalFilters).length > 0 && /* @__PURE__ */
|
|
19418
|
+
safeEntries(pageFilters).map(([key, f]) => /* @__PURE__ */ jsx109("div", { children: f.render(filter[key], (value) => onChange(updateFilter(filter, key, value)), testId, false, vertical) }, key)),
|
|
19419
|
+
Object.keys(modalFilters).length > 0 && /* @__PURE__ */ jsx109(Button, { label: "More Filters", endAdornment: /* @__PURE__ */ jsx109(CountBadge, { count: numModalFilters, hideIfZero: true }), variant: "secondary", onClick: () => openModal({
|
|
19388
19420
|
// Spreading `props` to pass along `data-testid`
|
|
19389
|
-
content: /* @__PURE__ */
|
|
19421
|
+
content: /* @__PURE__ */ jsx109(FilterModal, { ...props, filter, onApply: onChange, filters: modalFilters })
|
|
19390
19422
|
}), ...testId.moreFiltersBtn }),
|
|
19391
|
-
Object.keys(filter).length > 0 && /* @__PURE__ */
|
|
19423
|
+
Object.keys(filter).length > 0 && /* @__PURE__ */ jsx109("div", { children: /* @__PURE__ */ jsx109(Button, { label: "Clear", variant: "tertiary", onClick: () => onChange({}), ...testId.clearBtn }) })
|
|
19392
19424
|
] });
|
|
19393
19425
|
}
|
|
19394
19426
|
var _Filters = memo(Filters);
|
|
19395
19427
|
|
|
19396
19428
|
// src/components/Headers/HeaderActions.tsx
|
|
19397
19429
|
import { trussProps as trussProps72 } from "@homebound/truss/runtime";
|
|
19398
|
-
import { jsx as
|
|
19430
|
+
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
19399
19431
|
function HeaderActions(props) {
|
|
19400
19432
|
const {
|
|
19401
19433
|
actions,
|
|
@@ -19408,12 +19440,12 @@ function HeaderActions(props) {
|
|
|
19408
19440
|
} = useBreakpoint();
|
|
19409
19441
|
const collapse = collapseOnSm && sm && actions.length > 1;
|
|
19410
19442
|
if (collapse) {
|
|
19411
|
-
return /* @__PURE__ */
|
|
19443
|
+
return /* @__PURE__ */ jsx110("div", { ...trussProps72(actionRowCss), ...tid, children: /* @__PURE__ */ jsx110(ButtonMenu, { trigger: {
|
|
19412
19444
|
icon: "verticalDots",
|
|
19413
19445
|
variant: "outline"
|
|
19414
19446
|
}, items: toMenuItems(actions) }) });
|
|
19415
19447
|
}
|
|
19416
|
-
return /* @__PURE__ */
|
|
19448
|
+
return /* @__PURE__ */ jsx110("div", { ...trussProps72(actionRowCss), ...tid, children: actions.map(renderHeaderAction) });
|
|
19417
19449
|
}
|
|
19418
19450
|
function splitHeaderActionsOnSm(actions, sm) {
|
|
19419
19451
|
if (!sm) return {
|
|
@@ -19440,7 +19472,7 @@ function renderHeaderAction(action, index) {
|
|
|
19440
19472
|
keepVisible: _keepVisible2,
|
|
19441
19473
|
...iconProps
|
|
19442
19474
|
} = action;
|
|
19443
|
-
return /* @__PURE__ */
|
|
19475
|
+
return /* @__PURE__ */ jsx110(IconButton, { ...iconProps, variant: "outline" }, key);
|
|
19444
19476
|
}
|
|
19445
19477
|
if (action.kind === "menu") {
|
|
19446
19478
|
const {
|
|
@@ -19448,14 +19480,14 @@ function renderHeaderAction(action, index) {
|
|
|
19448
19480
|
keepVisible: _keepVisible2,
|
|
19449
19481
|
...menuProps
|
|
19450
19482
|
} = action;
|
|
19451
|
-
return /* @__PURE__ */
|
|
19483
|
+
return /* @__PURE__ */ jsx110(ButtonMenu, { ...menuProps }, key);
|
|
19452
19484
|
}
|
|
19453
19485
|
const {
|
|
19454
19486
|
keepVisible: _keepVisible,
|
|
19455
19487
|
kind: _kind,
|
|
19456
19488
|
...buttonProps
|
|
19457
19489
|
} = action;
|
|
19458
|
-
return /* @__PURE__ */
|
|
19490
|
+
return /* @__PURE__ */ jsx110(Button, { ...buttonProps }, key);
|
|
19459
19491
|
}
|
|
19460
19492
|
function headerActionKey(action, index) {
|
|
19461
19493
|
if (action.kind === "icon") return `${action.icon}-${index}`;
|
|
@@ -19494,17 +19526,6 @@ function toMenuItems(actions) {
|
|
|
19494
19526
|
});
|
|
19495
19527
|
}
|
|
19496
19528
|
|
|
19497
|
-
// src/layouts/ContentInsetContext.tsx
|
|
19498
|
-
import { createContext as createContext11, useContext as useContext21 } from "react";
|
|
19499
|
-
import { jsx as jsx110 } from "react/jsx-runtime";
|
|
19500
|
-
var ContentInsetContext = createContext11(false);
|
|
19501
|
-
function ContentInsetProvider({ children }) {
|
|
19502
|
-
return /* @__PURE__ */ jsx110(ContentInsetContext.Provider, { value: true, children });
|
|
19503
|
-
}
|
|
19504
|
-
function useContentInsetHandled() {
|
|
19505
|
-
return useContext21(ContentInsetContext);
|
|
19506
|
-
}
|
|
19507
|
-
|
|
19508
19529
|
// src/components/Headers/ContentHeader.tsx
|
|
19509
19530
|
import { trussProps as trussProps73 } from "@homebound/truss/runtime";
|
|
19510
19531
|
import { jsx as jsx111, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
@@ -23997,7 +24018,9 @@ function useScrollPinnedViewportBounds(anchorRef, enabled, getPinTopPx) {
|
|
|
23997
24018
|
const isPinned = rect.top <= pinTopPx + 1;
|
|
23998
24019
|
const topPx = isPinned ? pinTopPx : Math.round(rect.top);
|
|
23999
24020
|
const heightPx = Math.max(0, Math.round(window.innerHeight - topPx));
|
|
24000
|
-
setBounds(
|
|
24021
|
+
setBounds(
|
|
24022
|
+
(prev) => prev?.topPx === topPx && prev?.heightPx === heightPx && prev?.isPinned === isPinned ? prev : { topPx, heightPx, isPinned }
|
|
24023
|
+
);
|
|
24001
24024
|
}, [anchorRef]);
|
|
24002
24025
|
useLayoutEffect6(() => {
|
|
24003
24026
|
getPinTopPxRef.current = getPinTopPx;
|
|
@@ -24216,7 +24239,10 @@ function DocumentScrollRightPane({
|
|
|
24216
24239
|
borderLeftWidth: "blw_1px",
|
|
24217
24240
|
borderColor: ["bc_var", {
|
|
24218
24241
|
"--borderColor": "var(--b-surface-separator)"
|
|
24219
|
-
}]
|
|
24242
|
+
}],
|
|
24243
|
+
...!!paneBounds?.isPinned ? {
|
|
24244
|
+
transition: "tsn_top_200ms_cubic_bezier_0_4_0_0_2_1_height_200ms_cubic_bezier_0_4_0_0_2_1"
|
|
24245
|
+
} : {}
|
|
24220
24246
|
}),
|
|
24221
24247
|
initial: {
|
|
24222
24248
|
x: slideX
|
|
@@ -24531,6 +24557,8 @@ function FilterPanelOpen({
|
|
|
24531
24557
|
}) {
|
|
24532
24558
|
const tid = useTestIds({}, filterTestIdPrefix);
|
|
24533
24559
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
24560
|
+
const insetHandled = useContentInsetHandled();
|
|
24561
|
+
const withPagePadding = inDocumentScrollLayout && !insetHandled;
|
|
24534
24562
|
const activeFilterCount = getActiveFilterCount(filter ?? {});
|
|
24535
24563
|
const filterControls = filter && setFilter ? buildFilterControls(filterImpls, filter, setFilter, tid) : null;
|
|
24536
24564
|
return /* @__PURE__ */ jsxs88("div", { ...trussProps99({
|
|
@@ -24547,7 +24575,7 @@ function FilterPanelOpen({
|
|
|
24547
24575
|
...{
|
|
24548
24576
|
flexWrap: "mdandup_fww"
|
|
24549
24577
|
},
|
|
24550
|
-
...
|
|
24578
|
+
...withPagePadding ? pageContentPaddingX : void 0
|
|
24551
24579
|
}), children: [
|
|
24552
24580
|
groupBy && /* @__PURE__ */ jsx175("div", { children: /* @__PURE__ */ jsx175(GroupByField, { ...groupBy }) }),
|
|
24553
24581
|
filterControls,
|
|
@@ -24562,6 +24590,8 @@ function FilterPanelClosed({
|
|
|
24562
24590
|
}) {
|
|
24563
24591
|
const tid = useTestIds({}, filterTestIdPrefix);
|
|
24564
24592
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
24593
|
+
const insetHandled = useContentInsetHandled();
|
|
24594
|
+
const withPagePadding = inDocumentScrollLayout && !insetHandled;
|
|
24565
24595
|
if (!filter || !setFilter) return null;
|
|
24566
24596
|
const chips = safeEntries(filterImpls).flatMap(([key, f]) => chipsForFilterKey(key, f, filter, setFilter, tid));
|
|
24567
24597
|
if (chips.length === 0) return null;
|
|
@@ -24573,7 +24603,7 @@ function FilterPanelClosed({
|
|
|
24573
24603
|
minWidth: "mw0",
|
|
24574
24604
|
flexWrap: "fww"
|
|
24575
24605
|
},
|
|
24576
|
-
...
|
|
24606
|
+
...withPagePadding ? pageContentPaddingX : void 0
|
|
24577
24607
|
}), children: [
|
|
24578
24608
|
chips,
|
|
24579
24609
|
/* @__PURE__ */ jsx175(Button, { label: "Clear", variant: "tertiary", onClick: () => maybeCall(onClear), ...tid.clearBtn })
|
|
@@ -24631,6 +24661,8 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
24631
24661
|
sm
|
|
24632
24662
|
} = useBreakpoint();
|
|
24633
24663
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
24664
|
+
const insetHandled = useContentInsetHandled();
|
|
24665
|
+
const withPagePadding = inDocumentScrollLayout && !insetHandled;
|
|
24634
24666
|
const [showSearch, setShowSearch] = useState47(false);
|
|
24635
24667
|
const [showFilters, setShowFilters] = useState47(false);
|
|
24636
24668
|
const [{
|
|
@@ -24674,6 +24706,7 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
24674
24706
|
display: "df",
|
|
24675
24707
|
flexDirection: "fdc",
|
|
24676
24708
|
gap: "g_1",
|
|
24709
|
+
paddingTop: "pt3",
|
|
24677
24710
|
paddingBottom: "pb2",
|
|
24678
24711
|
...view === "card" ? {
|
|
24679
24712
|
paddingBottom: "pb3"
|
|
@@ -24683,11 +24716,10 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
24683
24716
|
...{
|
|
24684
24717
|
display: "df",
|
|
24685
24718
|
gap: "g_1",
|
|
24686
|
-
justifyContent: "jcsb"
|
|
24687
|
-
paddingTop: "pt3"
|
|
24719
|
+
justifyContent: "jcsb"
|
|
24688
24720
|
},
|
|
24689
|
-
...
|
|
24690
|
-
}), children: [
|
|
24721
|
+
...withPagePadding ? pageContentPaddingX : void 0
|
|
24722
|
+
}), ...testId.toolbar, children: [
|
|
24691
24723
|
/* @__PURE__ */ jsxs89("div", { className: "df g_12px aic", children: [
|
|
24692
24724
|
!sm && hasSearch && /* @__PURE__ */ jsx176("div", { className: "w_244px", children: searchTextField }),
|
|
24693
24725
|
sm && hasSearch && /* @__PURE__ */ jsx176(IconButton, { variant: "outline", icon: searchValue ? "searchBadged" : "search", label: "Search", onClick: () => setShowSearch(!showSearch), active: showSearch, ...testId.searchButton }),
|
|
@@ -24704,7 +24736,7 @@ function GridTableLayoutActionsComponent(props) {
|
|
|
24704
24736
|
!!actions?.length && /* @__PURE__ */ jsx176(HeaderActions, { actions, ...testId.actions })
|
|
24705
24737
|
] })
|
|
24706
24738
|
] }),
|
|
24707
|
-
sm && showSearch && /* @__PURE__ */ jsx176("div", { ...trussProps100(pageContentPaddingX), children: searchTextField }),
|
|
24739
|
+
sm && showSearch && /* @__PURE__ */ jsx176("div", { ...trussProps100(withPagePadding ? pageContentPaddingX : void 0), children: searchTextField }),
|
|
24708
24740
|
hasFilterControls && !showInlineControl && /* @__PURE__ */ jsx176(FilterPanel, { isOpen: showFilters, groupBy, filterImpls, filter, setFilter, onClear: clearFilters })
|
|
24709
24741
|
] });
|
|
24710
24742
|
}
|
|
@@ -24821,12 +24853,11 @@ function GridTableLayoutComponent(props) {
|
|
|
24821
24853
|
const emptyState = useMemo45(() => composeEmptyState(tableProps, layoutState, layoutEmptyFallback, clearFilters), [layoutEmptyFallback, layoutState, tableProps, clearFilters]);
|
|
24822
24854
|
const tableActionsEl = /* @__PURE__ */ jsx178(_GridTableLayoutActions, { filterDefs: layoutState?.filterDefs, filter: layoutState?.filter, setFilter: layoutState?.setFilter, groupBy: layoutState?.groupBy, searchProps: filterSearchProps, hasHideableColumns, columns, api, withCardView, view, setView, clearFilters, searchApi: searchApiRef, actions });
|
|
24823
24855
|
const cardAs = view === "card" ? "card" : void 0;
|
|
24824
|
-
const tableStyle = useMemo45(() => resolveGridTableLayoutStyle(tableProps.style, inDocumentScrollLayout), [tableProps.style, inDocumentScrollLayout]);
|
|
24825
24856
|
const tableBody = /* @__PURE__ */ jsx178(Fragment40, { children: isGridTableProps(tableProps) ? /* @__PURE__ */ jsx178(GridTable, { ...tableProps, ...cardAs ? {
|
|
24826
24857
|
as: cardAs
|
|
24827
|
-
} : {}, api, emptyState, filter: clientSearch,
|
|
24858
|
+
} : {}, api, emptyState, filter: clientSearch, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) : /* @__PURE__ */ jsx178(QueryTable, { ...tableProps, ...cardAs ? {
|
|
24828
24859
|
as: cardAs
|
|
24829
|
-
} : {}, api, emptyState, filter: clientSearch,
|
|
24860
|
+
} : {}, api, emptyState, filter: clientSearch, stickyHeader: true, disableColumnResizing: false, visibleColumnsStorageKey, columnGutter: inDocumentScrollLayout }) });
|
|
24830
24861
|
const tableScrollContent = /* @__PURE__ */ jsxs91(Fragment40, { children: [
|
|
24831
24862
|
showTableActions && /* @__PURE__ */ jsx178("div", { ref: tableActionsRef, ...trussProps101({
|
|
24832
24863
|
...inDocumentScrollLayout ? {
|
|
@@ -24860,7 +24891,15 @@ function GridTableLayoutComponent(props) {
|
|
|
24860
24891
|
] });
|
|
24861
24892
|
return (
|
|
24862
24893
|
/* Wrapper sets --beam-table-actions-height so sticky headers / the pane can read it. */
|
|
24863
|
-
/* @__PURE__ */ jsx178("div", { ref: tableWrapperRef,
|
|
24894
|
+
/* @__PURE__ */ jsx178("div", { ref: tableWrapperRef, ...trussProps101(inDocumentScrollLayout ? {
|
|
24895
|
+
display: "df",
|
|
24896
|
+
flexDirection: "fdc",
|
|
24897
|
+
width: "wfc",
|
|
24898
|
+
minWidth: "mw100"
|
|
24899
|
+
} : {
|
|
24900
|
+
display: "df",
|
|
24901
|
+
flexDirection: "fdc"
|
|
24902
|
+
}), ...showTableActions ? selfTopSpaced : {}, ...tid.tableWrapper, children: tableScrollContent })
|
|
24864
24903
|
);
|
|
24865
24904
|
}
|
|
24866
24905
|
var GridTableLayout = React18.memo(GridTableLayoutComponent);
|
|
@@ -24949,22 +24988,6 @@ function useSetTableActionsHeight(tableWrapperRef, tableActionsRef, enabled) {
|
|
|
24949
24988
|
};
|
|
24950
24989
|
}, [tableWrapperRef, syncHeightVar]);
|
|
24951
24990
|
}
|
|
24952
|
-
function resolveGridTableLayoutStyle(userStyle, inDocumentScrollLayout) {
|
|
24953
|
-
const layoutDefaults = {
|
|
24954
|
-
allWhite: true,
|
|
24955
|
-
roundedHeader: !inDocumentScrollLayout
|
|
24956
|
-
};
|
|
24957
|
-
if (userStyle === void 0) {
|
|
24958
|
-
return layoutDefaults;
|
|
24959
|
-
}
|
|
24960
|
-
if (isGridStyleDef(userStyle)) {
|
|
24961
|
-
return {
|
|
24962
|
-
...layoutDefaults,
|
|
24963
|
-
...userStyle
|
|
24964
|
-
};
|
|
24965
|
-
}
|
|
24966
|
-
return userStyle;
|
|
24967
|
-
}
|
|
24968
24991
|
|
|
24969
24992
|
// src/components/Layout/PreventBrowserScroll.tsx
|
|
24970
24993
|
import { jsx as jsx179 } from "react/jsx-runtime";
|
|
@@ -29192,49 +29215,41 @@ import { useLayoutEffect as useLayoutEffect14, useRef as useRef71, useState as u
|
|
|
29192
29215
|
var THRESHOLD = 80;
|
|
29193
29216
|
function getInitialAutoHideState() {
|
|
29194
29217
|
if (typeof window === "undefined" || window.scrollY <= 0) {
|
|
29195
|
-
return
|
|
29218
|
+
return "resting";
|
|
29196
29219
|
}
|
|
29197
|
-
return
|
|
29220
|
+
return "hidden";
|
|
29198
29221
|
}
|
|
29199
29222
|
function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
29200
29223
|
const initial = getInitialAutoHideState();
|
|
29201
|
-
const [state, setState] = useState62(initial
|
|
29202
|
-
const stateRef = useRef71(initial
|
|
29203
|
-
const [atTop, setAtTop] = useState62(initial.atTop);
|
|
29204
|
-
const atTopRef = useRef71(initial.atTop);
|
|
29224
|
+
const [state, setState] = useState62(initial);
|
|
29225
|
+
const stateRef = useRef71(initial);
|
|
29205
29226
|
const getTopOffsetRef = useRef71(getTopOffset);
|
|
29206
29227
|
getTopOffsetRef.current = getTopOffset;
|
|
29207
29228
|
const lastScrollY = useRef71(Number.POSITIVE_INFINITY);
|
|
29208
29229
|
const lastScrollHeight = useRef71(0);
|
|
29209
29230
|
useLayoutEffect14(() => {
|
|
29210
29231
|
if (!enabled) {
|
|
29211
|
-
stateRef.current = "
|
|
29212
|
-
atTopRef.current = true;
|
|
29232
|
+
stateRef.current = "resting";
|
|
29213
29233
|
lastScrollY.current = Number.POSITIVE_INFINITY;
|
|
29214
29234
|
lastScrollHeight.current = 0;
|
|
29215
|
-
setState("
|
|
29216
|
-
setAtTop(true);
|
|
29235
|
+
setState("resting");
|
|
29217
29236
|
return;
|
|
29218
29237
|
}
|
|
29219
|
-
const commit = (nextState
|
|
29238
|
+
const commit = (nextState) => {
|
|
29220
29239
|
if (nextState !== stateRef.current) {
|
|
29221
29240
|
stateRef.current = nextState;
|
|
29222
29241
|
setState(nextState);
|
|
29223
29242
|
}
|
|
29224
|
-
if (nextAtTop !== atTopRef.current) {
|
|
29225
|
-
atTopRef.current = nextAtTop;
|
|
29226
|
-
setAtTop(nextAtTop);
|
|
29227
|
-
}
|
|
29228
29243
|
};
|
|
29229
29244
|
const autoHideStateOnLayoutChange = (rect, topOffset) => {
|
|
29230
29245
|
const nextAtTop = rect.top >= topOffset;
|
|
29231
29246
|
let next = stateRef.current;
|
|
29232
29247
|
if (nextAtTop) {
|
|
29233
|
-
next = "
|
|
29248
|
+
next = "resting";
|
|
29234
29249
|
} else if (rect.bottom < -THRESHOLD && next !== "revealed") {
|
|
29235
29250
|
next = "hidden";
|
|
29236
29251
|
}
|
|
29237
|
-
return
|
|
29252
|
+
return next;
|
|
29238
29253
|
};
|
|
29239
29254
|
const updateAutoHideState = () => {
|
|
29240
29255
|
const el = spacerRef.current;
|
|
@@ -29245,7 +29260,7 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
29245
29260
|
lastScrollHeight.current = currentScrollHeight;
|
|
29246
29261
|
if (window.scrollY <= 0) {
|
|
29247
29262
|
lastScrollY.current = 0;
|
|
29248
|
-
commit("
|
|
29263
|
+
commit("resting");
|
|
29249
29264
|
return;
|
|
29250
29265
|
}
|
|
29251
29266
|
const currentY = window.scrollY;
|
|
@@ -29253,8 +29268,7 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
29253
29268
|
const topOffset = getTopOffsetRef.current?.() ?? 0;
|
|
29254
29269
|
if (scrollHeightChanged) {
|
|
29255
29270
|
lastScrollY.current = currentY;
|
|
29256
|
-
|
|
29257
|
-
commit(next2, nextAtTop2);
|
|
29271
|
+
commit(autoHideStateOnLayoutChange(rect, topOffset));
|
|
29258
29272
|
return;
|
|
29259
29273
|
}
|
|
29260
29274
|
const dy = currentY - lastScrollY.current;
|
|
@@ -29263,18 +29277,18 @@ function useAutoHideOnScroll(spacerRef, enabled, getTopOffset) {
|
|
|
29263
29277
|
const nextAtTop = rect.top >= topOffset;
|
|
29264
29278
|
let next = stateRef.current;
|
|
29265
29279
|
if (nextAtTop) {
|
|
29266
|
-
next = "
|
|
29280
|
+
next = "resting";
|
|
29267
29281
|
} else if (rect.bottom < -THRESHOLD) {
|
|
29268
29282
|
if (dy < 0 && !atBottom) next = "revealed";
|
|
29269
29283
|
else if (dy > 0) next = "hidden";
|
|
29270
29284
|
}
|
|
29271
|
-
commit(next
|
|
29285
|
+
commit(next);
|
|
29272
29286
|
};
|
|
29273
29287
|
updateAutoHideState();
|
|
29274
29288
|
window.addEventListener("scroll", updateAutoHideState, { passive: true });
|
|
29275
29289
|
return () => window.removeEventListener("scroll", updateAutoHideState);
|
|
29276
29290
|
}, [enabled, spacerRef]);
|
|
29277
|
-
return { state
|
|
29291
|
+
return { state };
|
|
29278
29292
|
}
|
|
29279
29293
|
|
|
29280
29294
|
// src/layouts/useMeasuredHeight.ts
|
|
@@ -29294,6 +29308,19 @@ function useMeasuredHeight(ref, enabled) {
|
|
|
29294
29308
|
return height;
|
|
29295
29309
|
}
|
|
29296
29310
|
|
|
29311
|
+
// src/layouts/useTransitionAfterPaint.ts
|
|
29312
|
+
import { useLayoutEffect as useLayoutEffect16 } from "react";
|
|
29313
|
+
function useTransitionAfterPaint(ref, transition) {
|
|
29314
|
+
useLayoutEffect16(() => {
|
|
29315
|
+
const el = ref.current;
|
|
29316
|
+
if (!el) return;
|
|
29317
|
+
const id = requestAnimationFrame(() => {
|
|
29318
|
+
el.style.transition = transition;
|
|
29319
|
+
});
|
|
29320
|
+
return () => cancelAnimationFrame(id);
|
|
29321
|
+
}, [ref, transition]);
|
|
29322
|
+
}
|
|
29323
|
+
|
|
29297
29324
|
// src/layouts/NavbarLayout/NavbarLayoutHeightContext.tsx
|
|
29298
29325
|
import { createContext as createContext18, useContext as useContext29 } from "react";
|
|
29299
29326
|
import { jsx as jsx232 } from "react/jsx-runtime";
|
|
@@ -29320,10 +29347,9 @@ function NavbarLayout(props) {
|
|
|
29320
29347
|
const spacerRef = useRef72(null);
|
|
29321
29348
|
const navHeight = useMeasuredHeight(navMetricsRef, true);
|
|
29322
29349
|
const {
|
|
29323
|
-
state: autoHideState
|
|
29324
|
-
atTop
|
|
29350
|
+
state: autoHideState
|
|
29325
29351
|
} = useAutoHideOnScroll(spacerRef, true);
|
|
29326
|
-
const navOccupiesViewportTop = autoHideState
|
|
29352
|
+
const navOccupiesViewportTop = autoHideState !== "hidden";
|
|
29327
29353
|
const navbarOffsetPx = navHeight > 0 && navOccupiesViewportTop ? navHeight : 0;
|
|
29328
29354
|
const cssVars = navbarOffsetPx > 0 ? {
|
|
29329
29355
|
[beamNavbarLayoutHeightVar]: `${navbarOffsetPx}px`
|
|
@@ -29337,9 +29363,9 @@ function NavbarLayout(props) {
|
|
|
29337
29363
|
}],
|
|
29338
29364
|
width: ["w_var", {
|
|
29339
29365
|
"--width": maybeCssVar67(__maybeInc33(innerWidth))
|
|
29340
|
-
}]
|
|
29341
|
-
transition: "transitionTop"
|
|
29366
|
+
}]
|
|
29342
29367
|
};
|
|
29368
|
+
useTransitionAfterPaint(navMetricsRef, "top 200ms cubic-bezier(0.4, 0, 0.2, 1)");
|
|
29343
29369
|
const bannerTop = `var(${beamEnvironmentBannerLayoutHeightVar}, 0px)`;
|
|
29344
29370
|
const innerStyle = {
|
|
29345
29371
|
top: autoHideState === "hidden" ? `calc(${bannerTop} - ${navHeight}px)` : bannerTop
|
|
@@ -29365,11 +29391,11 @@ function NavbarLayout(props) {
|
|
|
29365
29391
|
import { useCallback as useCallback43, useMemo as useMemo58, useRef as useRef73 } from "react";
|
|
29366
29392
|
|
|
29367
29393
|
// src/hooks/useDocumentTitle.tsx
|
|
29368
|
-
import { useLayoutEffect as
|
|
29394
|
+
import { useLayoutEffect as useLayoutEffect17 } from "react";
|
|
29369
29395
|
function useDocumentTitle(...titleSegments) {
|
|
29370
29396
|
const config = useDocumentTitleConfig();
|
|
29371
29397
|
const pageTitle = joinDocumentTitleSegments(...titleSegments);
|
|
29372
|
-
|
|
29398
|
+
useLayoutEffect17(() => {
|
|
29373
29399
|
if (!config || !pageTitle || typeof document === "undefined") {
|
|
29374
29400
|
return;
|
|
29375
29401
|
}
|
|
@@ -29499,10 +29525,9 @@ function PageHeaderLayout(props) {
|
|
|
29499
29525
|
const spacerRef = useRef73(null);
|
|
29500
29526
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
29501
29527
|
const {
|
|
29502
|
-
state: autoHideState
|
|
29503
|
-
atTop
|
|
29528
|
+
state: autoHideState
|
|
29504
29529
|
} = useAutoHideOnScroll(spacerRef, true, getBannerAndNavbarHeight);
|
|
29505
|
-
const headerOccupiesPosition = autoHideState
|
|
29530
|
+
const headerOccupiesPosition = autoHideState !== "hidden";
|
|
29506
29531
|
const cssVars = headerHeight > 0 && headerOccupiesPosition ? {
|
|
29507
29532
|
[beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
|
|
29508
29533
|
} : void 0;
|
|
@@ -29519,9 +29544,9 @@ function PageHeaderLayout(props) {
|
|
|
29519
29544
|
}],
|
|
29520
29545
|
zIndex: ["z_var", {
|
|
29521
29546
|
"--zIndex": maybeCssVar68(zIndices.pageStickyHeader)
|
|
29522
|
-
}]
|
|
29523
|
-
transition: "transitionAll"
|
|
29547
|
+
}]
|
|
29524
29548
|
};
|
|
29549
|
+
useTransitionAfterPaint(headerMetricsRef, "all 200ms cubic-bezier(0.4, 0, 0.2, 1)");
|
|
29525
29550
|
const innerStyle = {
|
|
29526
29551
|
top: autoHideState === "hidden" ? `calc(${outerTop} - ${headerHeight}px)` : outerTop
|
|
29527
29552
|
};
|
|
@@ -29537,12 +29562,12 @@ function PageHeaderLayout(props) {
|
|
|
29537
29562
|
flexShrink: "fs0",
|
|
29538
29563
|
width: "w100"
|
|
29539
29564
|
}), children: /* @__PURE__ */ jsx236("div", { ref: headerMetricsRef, ...mergeProps42(void 0, innerStyle, innerCss), ...tid.pageHeader, children: pageHeaderEl }) }),
|
|
29540
|
-
/* @__PURE__ */ jsx236("div", { className: "df fdc fg1 mh0 w100", ...tid.body, children })
|
|
29565
|
+
/* @__PURE__ */ jsx236("div", { className: "df fdc fg1 mh0 w100 first_child_n_data_self_top_spaced_mt3", ...tid.body, children })
|
|
29541
29566
|
] }) });
|
|
29542
29567
|
}
|
|
29543
29568
|
|
|
29544
29569
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
29545
|
-
import { useLayoutEffect as
|
|
29570
|
+
import { useLayoutEffect as useLayoutEffect18, useRef as useRef75 } from "react";
|
|
29546
29571
|
|
|
29547
29572
|
// src/components/Headers/WorkflowHeader.tsx
|
|
29548
29573
|
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
@@ -29755,7 +29780,7 @@ function WorkflowPageLayout(props) {
|
|
|
29755
29780
|
[beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
|
|
29756
29781
|
} : void 0;
|
|
29757
29782
|
const showFooter = isMobile;
|
|
29758
|
-
|
|
29783
|
+
useLayoutEffect18(() => {
|
|
29759
29784
|
const root = document.documentElement;
|
|
29760
29785
|
const previous = root.style.getPropertyValue(beamWorkflowLayoutFooterHeightVar);
|
|
29761
29786
|
root.style.setProperty(beamWorkflowLayoutFooterHeightVar, showFooter ? `${mobileFooterHeightPx}px` : "0px");
|
|
@@ -30694,7 +30719,6 @@ export {
|
|
|
30694
30719
|
recursivelyGetContainingRow,
|
|
30695
30720
|
reservedRowKinds,
|
|
30696
30721
|
resetRightPaneStore,
|
|
30697
|
-
resolveGridTableLayoutStyle,
|
|
30698
30722
|
resolveTableContentWidth,
|
|
30699
30723
|
resolveTooltip,
|
|
30700
30724
|
resolveWithRightPaneOptions,
|