@homebound/beam 3.34.1 → 3.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +776 -712
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +87 -71
- package/dist/index.d.ts +87 -71
- package/dist/index.js +628 -564
- package/dist/index.js.map +1 -1
- package/dist/truss.css +10 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -50,14 +50,14 @@ __export(index_exports, {
|
|
|
50
50
|
BoundDateField: () => BoundDateField,
|
|
51
51
|
BoundDateRangeField: () => BoundDateRangeField,
|
|
52
52
|
BoundForm: () => BoundForm,
|
|
53
|
-
BoundIconCardField: () => BoundIconCardField,
|
|
54
|
-
BoundIconCardGroupField: () => BoundIconCardGroupField,
|
|
55
53
|
BoundMultiLineSelectField: () => BoundMultiLineSelectField,
|
|
56
54
|
BoundMultiSelectField: () => BoundMultiSelectField,
|
|
57
55
|
BoundNumberField: () => BoundNumberField,
|
|
58
56
|
BoundRadioGroupField: () => BoundRadioGroupField,
|
|
59
57
|
BoundRichTextField: () => BoundRichTextField,
|
|
60
58
|
BoundSelectAndTextField: () => BoundSelectAndTextField,
|
|
59
|
+
BoundSelectCardField: () => BoundSelectCardField,
|
|
60
|
+
BoundSelectCardGroupField: () => BoundSelectCardGroupField,
|
|
61
61
|
BoundSelectField: () => BoundSelectField,
|
|
62
62
|
BoundSwitchField: () => BoundSwitchField,
|
|
63
63
|
BoundTextAreaField: () => BoundTextAreaField,
|
|
@@ -117,7 +117,6 @@ __export(index_exports, {
|
|
|
117
117
|
HomeboundLogo: () => HomeboundLogo,
|
|
118
118
|
Icon: () => Icon,
|
|
119
119
|
IconButton: () => IconButton,
|
|
120
|
-
IconCard: () => IconCard,
|
|
121
120
|
Icons: () => Icons,
|
|
122
121
|
KEPT_GROUP: () => KEPT_GROUP,
|
|
123
122
|
Loader: () => Loader,
|
|
@@ -159,6 +158,8 @@ __export(index_exports, {
|
|
|
159
158
|
ScrollableContent: () => ScrollableContent,
|
|
160
159
|
ScrollableFooter: () => ScrollableFooter,
|
|
161
160
|
ScrollableParent: () => ScrollableParent,
|
|
161
|
+
SelectCard: () => SelectCard,
|
|
162
|
+
SelectCardGroup: () => SelectCardGroup,
|
|
162
163
|
SelectField: () => SelectField,
|
|
163
164
|
SelectToggle: () => SelectToggle,
|
|
164
165
|
SideNav: () => SideNav,
|
|
@@ -207,13 +208,13 @@ __export(index_exports, {
|
|
|
207
208
|
boundCheckboxGroupField: () => boundCheckboxGroupField,
|
|
208
209
|
boundDateField: () => boundDateField,
|
|
209
210
|
boundDateRangeField: () => boundDateRangeField,
|
|
210
|
-
boundIconCardField: () => boundIconCardField,
|
|
211
|
-
boundIconCardGroupField: () => boundIconCardGroupField,
|
|
212
211
|
boundMultiSelectField: () => boundMultiSelectField,
|
|
213
212
|
boundMultilineSelectField: () => boundMultilineSelectField,
|
|
214
213
|
boundNumberField: () => boundNumberField,
|
|
215
214
|
boundRadioGroupField: () => boundRadioGroupField,
|
|
216
215
|
boundRichTextField: () => boundRichTextField,
|
|
216
|
+
boundSelectCardField: () => boundSelectCardField,
|
|
217
|
+
boundSelectCardGroupField: () => boundSelectCardGroupField,
|
|
217
218
|
boundSelectField: () => boundSelectField,
|
|
218
219
|
boundSwitchField: () => boundSwitchField,
|
|
219
220
|
boundTextAreaField: () => boundTextAreaField,
|
|
@@ -253,6 +254,7 @@ __export(index_exports, {
|
|
|
253
254
|
emptyCell: () => emptyCell,
|
|
254
255
|
ensureClientSideSortValueIsSortable: () => ensureClientSideSortValueIsSortable,
|
|
255
256
|
environmentBannerSizePx: () => environmentBannerSizePx,
|
|
257
|
+
fillRowStyles: () => fillRowStyles,
|
|
256
258
|
filterTestIdPrefix: () => filterTestIdPrefix,
|
|
257
259
|
formatDate: () => formatDate,
|
|
258
260
|
formatDateRange: () => formatDateRange,
|
|
@@ -269,7 +271,6 @@ __export(index_exports, {
|
|
|
269
271
|
getTableStyles: () => getTableStyles,
|
|
270
272
|
headerRenderFn: () => headerRenderFn,
|
|
271
273
|
hoverStyles: () => hoverStyles,
|
|
272
|
-
iconCardStylesHover: () => iconCardStylesHover,
|
|
273
274
|
increment: () => increment,
|
|
274
275
|
insertAtIndex: () => insertAtIndex,
|
|
275
276
|
isContentColumn: () => isContentColumn,
|
|
@@ -311,7 +312,6 @@ __export(index_exports, {
|
|
|
311
312
|
rowClickRenderFn: () => rowClickRenderFn,
|
|
312
313
|
rowLinkRenderFn: () => rowLinkRenderFn,
|
|
313
314
|
selectColumn: () => selectColumn,
|
|
314
|
-
selectedStyles: () => selectedStyles,
|
|
315
315
|
setDefaultStyle: () => setDefaultStyle,
|
|
316
316
|
setEnvironmentFavicon: () => setEnvironmentFavicon,
|
|
317
317
|
setGridTableDefaults: () => setGridTableDefaults,
|
|
@@ -5342,7 +5342,21 @@ var Icons = {
|
|
|
5342
5342
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M1.28481 17.9291C1.68761 18.0252 1.93583 18.4306 1.83991 18.8335L1.68148 19.4996H2.36957C2.78374 19.4997 3.11896 19.836 3.11896 20.2501C3.11871 20.6641 2.78359 20.9995 2.36957 20.9995H1.68148C0.712759 20.9995 -0.00204962 20.095 0.222017 19.1527L0.381609 18.4854C0.47768 18.0826 0.881956 17.8332 1.28481 17.9291ZM6.49699 19.4996L6.64849 19.5146C6.99008 19.5847 7.24638 19.8878 7.24638 20.2501C7.24616 20.6122 6.98991 20.9144 6.64849 20.9845L6.49699 20.9995H5.1208C4.70687 20.9994 4.37166 20.664 4.37141 20.2501C4.37141 19.836 4.70672 19.4997 5.1208 19.4996H6.49699ZM10.6244 19.4996C11.0386 19.4996 11.3738 19.8359 11.3738 20.2501C11.3736 20.6641 11.0384 20.9995 10.6244 20.9995H9.24822C8.8343 20.9994 8.49909 20.664 8.49883 20.2501C8.49883 19.836 8.83415 19.4998 9.24822 19.4996H10.6244ZM14.7518 19.4996C15.166 19.4996 15.5012 19.8359 15.5012 20.2501C15.501 20.6641 15.1659 20.9995 14.7518 20.9995H13.3756C12.9617 20.9994 12.6265 20.664 12.6263 20.2501C12.6263 19.836 12.9616 19.4998 13.3756 19.4996H14.7518ZM18.8793 19.4996C19.2935 19.4996 19.6298 19.8359 19.6298 20.2501C19.6296 20.6641 19.2933 20.9995 18.8793 20.9995H17.5031C17.0892 20.9993 16.7539 20.664 16.7537 20.2501C16.7537 19.836 17.089 19.4998 17.5031 19.4996H18.8793ZM22.7765 17.9511C23.1826 17.8707 23.5771 18.1348 23.6578 18.5409L23.7896 19.2082C23.9734 20.1356 23.2641 20.9995 22.3186 20.9995H21.6305C21.2166 20.9993 20.8814 20.664 20.8811 20.2501C20.8811 19.836 21.2164 19.4998 21.6305 19.4996H22.3186L22.1868 18.8335L22.1717 18.682C22.1737 18.333 22.421 18.0216 22.7765 17.9511ZM23.1293 15.8741C23.2099 16.2803 22.9456 16.6757 22.5395 16.7565C22.1333 16.8371 21.7378 16.5728 21.6571 16.1667L21.3923 14.8333L22.1289 14.6875L22.8644 14.5407L23.1293 15.8741ZM2.47481 16.1667C2.37869 16.5694 1.97442 16.8177 1.57161 16.7218C1.16887 16.6257 0.920596 16.2214 1.01651 15.8186L2.47481 16.1667ZM2.23658 13.9301C2.63953 14.026 2.88878 14.4303 2.79284 14.8333L2.47481 16.1667L1.74508 15.992L1.01651 15.8186L1.33338 14.4852C1.42946 14.0824 1.83377 13.8342 2.23658 13.9301ZM21.9821 13.9509C22.3883 13.8703 22.7837 14.1345 22.8644 14.5407L21.3923 14.8333C21.3117 14.4271 21.576 14.0317 21.9821 13.9509ZM22.3348 11.8739C22.4154 12.2802 22.1513 12.6756 21.745 12.7562C21.3894 12.8266 21.0426 12.6329 20.9077 12.311L20.8638 12.1664L20.5989 10.833L21.3344 10.6873L22.0699 10.5405L22.3348 11.8739ZM3.18951 9.92985C3.59224 10.0259 3.84052 10.4302 3.74461 10.833L3.42774 12.1664L3.37801 12.3099C3.23088 12.626 2.87702 12.8065 2.52454 12.7227C2.12159 12.6268 1.87234 12.2213 1.96828 11.8184L2.28631 10.485C2.38252 10.0824 2.78676 9.83396 3.18951 9.92985ZM21.1887 9.95182C21.5948 9.87125 21.9891 10.1345 22.0699 10.5405L20.5989 10.833C20.5183 10.4268 20.7826 10.0325 21.1887 9.95182ZM19.9374 5.99902C20.6533 5.99902 21.2703 6.50534 21.4096 7.20753L21.5414 7.87481L21.5553 8.02515C21.5534 8.37415 21.3073 8.68547 20.9516 8.75604C20.5963 8.82651 20.2496 8.63336 20.1144 8.31195L20.0704 8.16624L19.9374 7.50011H19.0828C18.6686 7.50011 18.3323 7.16379 18.3323 6.74957C18.3323 6.33535 18.6686 5.99902 19.0828 5.99902H19.9374ZM5.39373 5.99902C5.80794 5.99902 6.14427 6.33535 6.14427 6.74957C6.14427 7.16379 5.80794 7.50011 5.39373 7.50011H4.5391L4.37951 8.16624C4.28352 8.56913 3.87923 8.81843 3.47631 8.7225C3.07363 8.62647 2.82552 8.22204 2.92121 7.8193L3.07964 7.15202C3.24058 6.47639 3.84455 5.99902 4.5391 5.99902H5.39373ZM10.5273 5.99902C10.9415 5.99904 11.2778 6.33536 11.2778 6.74957C11.2778 7.16378 10.9415 7.5001 10.5273 7.50011H8.81571C8.40174 7.49982 8.06632 7.16361 8.06632 6.74957C8.06632 6.33553 8.40174 5.99931 8.81571 5.99902H10.5273ZM15.6608 5.99902C16.0748 5.99932 16.4102 6.33554 16.4102 6.74957C16.4102 7.1636 16.0748 7.49982 15.6608 7.50011H13.9493C13.535 7.50011 13.1987 7.16378 13.1987 6.74957C13.1987 6.33536 13.535 5.99903 13.9493 5.99902H15.6608Z" }),
|
|
5343
5343
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M10.6309 14.7413V10.9913H13.6309V14.7413C13.6309 15.1538 13.9684 15.4913 14.3809 15.4913H16.6309C17.0434 15.4913 17.3809 15.1538 17.3809 14.7413V9.4913H18.6559C19.0009 9.4913 19.1659 9.0638 18.9034 8.8388L12.6334 3.19125C12.3484 2.93625 11.9134 2.93625 11.6284 3.19125L5.35831 8.8388C5.10331 9.0638 5.26081 9.4913 5.60581 9.4913H6.88082V14.7413C6.88082 15.1538 7.21833 15.4913 7.63083 15.4913H9.88085C10.2934 15.4913 10.6309 15.1538 10.6309 14.7413Z" })
|
|
5344
5344
|
] }),
|
|
5345
|
-
houseFilled: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9.82369 19.9192V14.5155H14.1715V19.9192C14.1715 20.5137 14.6606 21 15.2584 21H18.5193C19.1171 21 19.6062 20.5137 19.6062 19.9192V12.3539H21.454C21.954 12.3539 22.1932 11.7379 21.8127 11.4137L12.7258 3.27559C12.3128 2.90814 11.6824 2.90814 11.2693 3.27559L2.18245 11.4137C1.81288 11.7379 2.04114 12.3539 2.54114 12.3539H4.38895V19.9192C4.38895 20.5137 4.87808 21 5.4759 21H8.73674C9.33456 21 9.82369 20.5137 9.82369 19.9192Z" }) })
|
|
5345
|
+
houseFilled: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9.82369 19.9192V14.5155H14.1715V19.9192C14.1715 20.5137 14.6606 21 15.2584 21H18.5193C19.1171 21 19.6062 20.5137 19.6062 19.9192V12.3539H21.454C21.954 12.3539 22.1932 11.7379 21.8127 11.4137L12.7258 3.27559C12.3128 2.90814 11.6824 2.90814 11.2693 3.27559L2.18245 11.4137C1.81288 11.7379 2.04114 12.3539 2.54114 12.3539H4.38895V19.9192C4.38895 20.5137 4.87808 21 5.4759 21H8.73674C9.33456 21 9.82369 20.5137 9.82369 19.9192Z" }) }),
|
|
5346
|
+
// Option Type / slot icons
|
|
5347
|
+
single: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
5348
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 15V17H5V15H9ZM9 9H5V17C3.96435 17 3.113 16.2128 3.01074 15.2041L3 15V9C3 7.89543 3.89543 7 5 7H9L9.2041 7.01074C10.2128 7.113 11 7.96435 11 9V15C11 16.1046 10.1046 17 9 17V9Z" }),
|
|
5349
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19 15V17H15V15H19ZM19 9H15V17C13.9643 17 13.113 16.2128 13.0107 15.2041L13 15V9C13 7.89543 13.8954 7 15 7H19L19.2041 7.01074C20.2128 7.113 21 7.96435 21 9V15C21 16.1046 20.1046 17 19 17V9Z" })
|
|
5350
|
+
] }),
|
|
5351
|
+
linked: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
5352
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 15V17H5V15H9ZM19 15V17H15V15H19ZM19 9H15V17C13.8954 17 13 16.1046 13 15V9C13 7.89543 13.8954 7 15 7H19C20.1046 7 21 7.89543 21 9V15C21 16.1046 20.1046 17 19 17V9ZM9 9H5V17C3.89543 17 3 16.1046 3 15V9C3 7.89543 3.89543 7 5 7H9C10.1046 7 11 7.89543 11 9V15C11 16.1046 10.1046 17 9 17V9Z" }),
|
|
5353
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M7 11H17V13H7V11Z" })
|
|
5354
|
+
] }),
|
|
5355
|
+
package: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
5356
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M9 15V17H5V15H9ZM9 9H5V17C3.96435 17 3.113 16.2128 3.01074 15.2041L3 15V9C3 7.89543 3.89543 7 5 7H9L9.2041 7.01074C10.2128 7.113 11 7.96435 11 9V15C11 16.1046 10.1046 17 9 17V9Z" }),
|
|
5357
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M20 18V20H4V18H20ZM22 16V8C22 6.89543 21.1046 6 20 6H4C2.89543 6 2 6.89543 2 8V16C2 17.1046 2.89543 18 4 18V20C1.79086 20 0 18.2091 0 16V8C0 5.79086 1.79086 4 4 4H20L20.2061 4.00488C22.3194 4.11211 24 5.85996 24 8V16L23.9951 16.2061C23.8913 18.2512 22.2512 19.8913 20.2061 19.9951L20 20V18C21.1046 18 22 17.1046 22 16Z" }),
|
|
5358
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("path", { d: "M19 15V17H15V15H19ZM19 9H15V17C13.9643 17 13.113 16.2128 13.0107 15.2041L13 15V9C13 7.89543 13.8954 7 15 7H19L19.2041 7.01074C20.2128 7.113 21 7.96435 21 9V15C21 16.1046 20.1046 17 19 17V9Z" })
|
|
5359
|
+
] })
|
|
5346
5360
|
};
|
|
5347
5361
|
|
|
5348
5362
|
// src/components/PresentationContext.tsx
|
|
@@ -5502,7 +5516,7 @@ function Chips(props) {
|
|
|
5502
5516
|
// src/components/Table/GridTable.tsx
|
|
5503
5517
|
var import_memoize_one = __toESM(require("memoize-one"), 1);
|
|
5504
5518
|
var import_mobx10 = require("mobx");
|
|
5505
|
-
var
|
|
5519
|
+
var import_react81 = __toESM(require("react"), 1);
|
|
5506
5520
|
var import_react_virtuoso2 = require("react-virtuoso");
|
|
5507
5521
|
|
|
5508
5522
|
// src/components/Layout/ScrollableContent.tsx
|
|
@@ -5693,7 +5707,7 @@ var sizeToPixels = {
|
|
|
5693
5707
|
// src/components/Table/GridTableApi.ts
|
|
5694
5708
|
var import_mobx9 = require("mobx");
|
|
5695
5709
|
var import_mobx_utils = require("mobx-utils");
|
|
5696
|
-
var
|
|
5710
|
+
var import_react72 = require("react");
|
|
5697
5711
|
|
|
5698
5712
|
// src/components/Table/types.ts
|
|
5699
5713
|
var nonKindGridColumnKeys = [
|
|
@@ -7762,7 +7776,7 @@ function PinToggle({ rowId }) {
|
|
|
7762
7776
|
}
|
|
7763
7777
|
|
|
7764
7778
|
// src/components/Table/components/SelectToggle.tsx
|
|
7765
|
-
var
|
|
7779
|
+
var import_react71 = require("react");
|
|
7766
7780
|
|
|
7767
7781
|
// src/inputs/Autocomplete.tsx
|
|
7768
7782
|
var import_react53 = require("react");
|
|
@@ -10392,7 +10406,7 @@ function Button(props) {
|
|
|
10392
10406
|
} = (0, import_react_aria12.useHover)(ariaProps);
|
|
10393
10407
|
const {
|
|
10394
10408
|
baseStyles: baseStyles5,
|
|
10395
|
-
hoverStyles:
|
|
10409
|
+
hoverStyles: hoverStyles5,
|
|
10396
10410
|
disabledStyles: disabledStyles4,
|
|
10397
10411
|
pressedStyles: pressedStyles2,
|
|
10398
10412
|
focusStyles: focusStyles2
|
|
@@ -10421,7 +10435,7 @@ function Button(props) {
|
|
|
10421
10435
|
textTransform: "tt_inherit"
|
|
10422
10436
|
},
|
|
10423
10437
|
...baseStyles5,
|
|
10424
|
-
...isHovered && !isPressed && !active ?
|
|
10438
|
+
...isHovered && !isPressed && !active ? hoverStyles5 : {},
|
|
10425
10439
|
...isPressed || active ? pressedStyles2 : {},
|
|
10426
10440
|
...isDisabled || asyncInProgress ? {
|
|
10427
10441
|
...disabledStyles4,
|
|
@@ -10824,7 +10838,7 @@ function NavLink(props) {
|
|
|
10824
10838
|
baseStyles: baseStyles5,
|
|
10825
10839
|
activeStyles: activeStyles3,
|
|
10826
10840
|
focusRingStyles: focusRingStyles2,
|
|
10827
|
-
hoverStyles:
|
|
10841
|
+
hoverStyles: hoverStyles5,
|
|
10828
10842
|
disabledStyles: disabledStyles4,
|
|
10829
10843
|
pressedStyles: pressedStyles2
|
|
10830
10844
|
} = (0, import_react37.useMemo)(() => getNavLinkStyles(variant), [variant]);
|
|
@@ -10844,7 +10858,7 @@ function NavLink(props) {
|
|
|
10844
10858
|
...active && activeStyles3,
|
|
10845
10859
|
...isDisabled && disabledStyles4,
|
|
10846
10860
|
...isFocusVisible && focusRingStyles2,
|
|
10847
|
-
...isHovered &&
|
|
10861
|
+
...isHovered && hoverStyles5,
|
|
10848
10862
|
...isPressed && pressedStyles2
|
|
10849
10863
|
})
|
|
10850
10864
|
};
|
|
@@ -13985,102 +13999,10 @@ function DateRangeField(props) {
|
|
|
13985
13999
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(DateFieldBase, { ...props, mode: "range" });
|
|
13986
14000
|
}
|
|
13987
14001
|
|
|
13988
|
-
// src/inputs/
|
|
14002
|
+
// src/inputs/MultiLineSelectField.tsx
|
|
13989
14003
|
var import_react58 = require("react");
|
|
13990
|
-
var import_react_aria33 = require("react-aria");
|
|
13991
|
-
var import_react_stately11 = require("react-stately");
|
|
13992
14004
|
var import_runtime45 = require("@homebound/truss/runtime");
|
|
13993
14005
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
13994
|
-
function IconCard(props) {
|
|
13995
|
-
const {
|
|
13996
|
-
selected: isSelected = false,
|
|
13997
|
-
disabled: isDisabled = false,
|
|
13998
|
-
icon,
|
|
13999
|
-
cardRef,
|
|
14000
|
-
label,
|
|
14001
|
-
tooltip,
|
|
14002
|
-
...otherProps
|
|
14003
|
-
} = props;
|
|
14004
|
-
const ref = useGetRef(cardRef);
|
|
14005
|
-
const ariaProps = {
|
|
14006
|
-
isSelected,
|
|
14007
|
-
isDisabled,
|
|
14008
|
-
...otherProps
|
|
14009
|
-
};
|
|
14010
|
-
const checkboxProps = {
|
|
14011
|
-
...ariaProps,
|
|
14012
|
-
"aria-label": label
|
|
14013
|
-
};
|
|
14014
|
-
const {
|
|
14015
|
-
hoverProps,
|
|
14016
|
-
isHovered
|
|
14017
|
-
} = (0, import_react_aria33.useHover)({
|
|
14018
|
-
isDisabled
|
|
14019
|
-
});
|
|
14020
|
-
const toggleState = (0, import_react_stately11.useToggleState)(ariaProps);
|
|
14021
|
-
const {
|
|
14022
|
-
inputProps
|
|
14023
|
-
} = (0, import_react_aria33.useCheckbox)(checkboxProps, toggleState, ref);
|
|
14024
|
-
const styles = (0, import_react58.useMemo)(() => ({
|
|
14025
|
-
...baseStyles3,
|
|
14026
|
-
...isHovered && iconCardStylesHover,
|
|
14027
|
-
...isSelected && selectedStyles,
|
|
14028
|
-
...isDisabled && disabledStyles2
|
|
14029
|
-
}), [isDisabled, isHovered, isSelected]);
|
|
14030
|
-
const tid = useTestIds(props, defaultTestId(label));
|
|
14031
|
-
return maybeTooltip({
|
|
14032
|
-
title: resolveTooltip(isDisabled, tooltip),
|
|
14033
|
-
placement: "top",
|
|
14034
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("button", { ...(0, import_runtime45.trussProps)(styles), ...hoverProps, onClick: toggleState.toggle, disabled: isDisabled, ...tid, children: [
|
|
14035
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react_aria33.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("input", { ref, ...inputProps, ...tid.value }) }),
|
|
14036
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Icon, { icon, inc: 4, color: isDisabled ? "rgba(221, 220, 220, 1)" /* Gray300 */ : "rgba(36, 36, 36, 1)" /* Gray900 */ }),
|
|
14037
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { ...(0, import_runtime45.trussProps)({
|
|
14038
|
-
fontWeight: "fw4",
|
|
14039
|
-
fontSize: "fz_12px",
|
|
14040
|
-
lineHeight: "lh_16px",
|
|
14041
|
-
...isDisabled ? {
|
|
14042
|
-
color: "gray300"
|
|
14043
|
-
} : {}
|
|
14044
|
-
}), children: label })
|
|
14045
|
-
] })
|
|
14046
|
-
});
|
|
14047
|
-
}
|
|
14048
|
-
var baseStyles3 = {
|
|
14049
|
-
display: "df",
|
|
14050
|
-
flexDirection: "fdc",
|
|
14051
|
-
alignItems: "aic",
|
|
14052
|
-
justifyContent: "jcc",
|
|
14053
|
-
width: "w_130px",
|
|
14054
|
-
height: "h_114px",
|
|
14055
|
-
borderStyle: "bss",
|
|
14056
|
-
borderWidth: "bw1",
|
|
14057
|
-
borderRadius: "br8",
|
|
14058
|
-
borderColor: "bcGray300",
|
|
14059
|
-
backgroundColor: "bgWhite",
|
|
14060
|
-
gap: "gap_12px",
|
|
14061
|
-
paddingTop: "pt2",
|
|
14062
|
-
paddingBottom: "pb2",
|
|
14063
|
-
paddingRight: "pr2",
|
|
14064
|
-
paddingLeft: "pl2",
|
|
14065
|
-
textAlign: "tac"
|
|
14066
|
-
};
|
|
14067
|
-
var selectedStyles = {
|
|
14068
|
-
borderWidth: "bw2",
|
|
14069
|
-
borderColor: "bcBlue500",
|
|
14070
|
-
backgroundColor: "bgBlue50"
|
|
14071
|
-
};
|
|
14072
|
-
var disabledStyles2 = {
|
|
14073
|
-
borderColor: "bcGray200",
|
|
14074
|
-
backgroundColor: "bgGray50"
|
|
14075
|
-
};
|
|
14076
|
-
var iconCardStylesHover = {
|
|
14077
|
-
backgroundColor: "bgGray100"
|
|
14078
|
-
};
|
|
14079
|
-
|
|
14080
|
-
// src/inputs/MultiLineSelectField.tsx
|
|
14081
|
-
var import_react59 = require("react");
|
|
14082
|
-
var import_runtime46 = require("@homebound/truss/runtime");
|
|
14083
|
-
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
14084
14006
|
function MultiLineSelectField(props) {
|
|
14085
14007
|
const {
|
|
14086
14008
|
options,
|
|
@@ -14092,29 +14014,29 @@ function MultiLineSelectField(props) {
|
|
|
14092
14014
|
...otherProps
|
|
14093
14015
|
} = props;
|
|
14094
14016
|
const tid = useTestIds(props, "");
|
|
14095
|
-
const [isDisplayed, setIsDisplayed] = (0,
|
|
14017
|
+
const [isDisplayed, setIsDisplayed] = (0, import_react58.useState)(true);
|
|
14096
14018
|
const currentOptions = options.filter((o) => !values.includes(getOptionValue(o)));
|
|
14097
|
-
return /* @__PURE__ */ (0,
|
|
14019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { ...(0, import_runtime45.trussProps)({
|
|
14098
14020
|
marginTop: "mt1",
|
|
14099
14021
|
...labelStyle === "left" ? {
|
|
14100
14022
|
display: "df"
|
|
14101
14023
|
} : {}
|
|
14102
14024
|
}), children: [
|
|
14103
|
-
labelStyle !== "hidden" && /* @__PURE__ */ (0,
|
|
14025
|
+
labelStyle !== "hidden" && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { ...(0, import_runtime45.trussProps)({
|
|
14104
14026
|
...labelStyle === "left" ? {
|
|
14105
14027
|
width: "w50"
|
|
14106
14028
|
} : {}
|
|
14107
|
-
}), children: /* @__PURE__ */ (0,
|
|
14108
|
-
/* @__PURE__ */ (0,
|
|
14029
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Label, { ...tid.label, label: props.label }) }),
|
|
14030
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { ...(0, import_runtime45.trussProps)({
|
|
14109
14031
|
...labelStyle === "left" ? {
|
|
14110
14032
|
width: "w50"
|
|
14111
14033
|
} : {}
|
|
14112
14034
|
}), children: [
|
|
14113
14035
|
values.map((value, index) => {
|
|
14114
|
-
return /* @__PURE__ */ (0,
|
|
14115
|
-
/* @__PURE__ */ (0,
|
|
14036
|
+
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "mb1 pl1 df", children: [
|
|
14037
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "wsnw oh to_ellipsis w100", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SelectField, { ...otherProps, ...tid.selectField, labelStyle: "hidden", value, onSelect: () => {
|
|
14116
14038
|
}, options, getOptionValue, getOptionLabel, compact: true, readOnly: true }) }),
|
|
14117
|
-
/* @__PURE__ */ (0,
|
|
14039
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { ...tid.deleteSelected, variant: "tertiary", label: "", "aria-label": `Delete selected ${otherProps.label}`, icon: "x", onClick: () => {
|
|
14118
14040
|
const selectedOptions = options.filter((o) => values.includes(getOptionValue(o)) && getOptionValue(o) !== value);
|
|
14119
14041
|
const selectedValues = selectedOptions.map((o) => getOptionValue(o));
|
|
14120
14042
|
onSelect(selectedValues, selectedOptions);
|
|
@@ -14122,17 +14044,17 @@ function MultiLineSelectField(props) {
|
|
|
14122
14044
|
} })
|
|
14123
14045
|
] }, index);
|
|
14124
14046
|
}),
|
|
14125
|
-
isDisplayed && /* @__PURE__ */ (0,
|
|
14047
|
+
isDisplayed && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "mb1", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(SelectField, { ...tid.selectField, label: otherProps.label, labelStyle: "hidden", getOptionValue, getOptionLabel, value: "", onSelect: (value) => {
|
|
14126
14048
|
onSelect([...values, value], options);
|
|
14127
14049
|
setIsDisplayed(false);
|
|
14128
14050
|
}, options: currentOptions, disabled: otherProps.disabled }) }),
|
|
14129
|
-
/* @__PURE__ */ (0,
|
|
14051
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Button, { ...tid.addAnother, label: "Add Another", variant: "tertiary", onClick: () => setIsDisplayed(true), disabled: isDisplayed || currentOptions.length === 0 })
|
|
14130
14052
|
] })
|
|
14131
14053
|
] });
|
|
14132
14054
|
}
|
|
14133
14055
|
|
|
14134
14056
|
// src/inputs/MultiSelectField.tsx
|
|
14135
|
-
var
|
|
14057
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
14136
14058
|
function MultiSelectField(props) {
|
|
14137
14059
|
const {
|
|
14138
14060
|
getOptionValue = (opt) => opt.id,
|
|
@@ -14141,15 +14063,15 @@ function MultiSelectField(props) {
|
|
|
14141
14063
|
// if unset, assume O implements HasName
|
|
14142
14064
|
...otherProps
|
|
14143
14065
|
} = props;
|
|
14144
|
-
return /* @__PURE__ */ (0,
|
|
14066
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(ComboBoxBase, { multiselect: true, getOptionLabel, getOptionValue, ...otherProps });
|
|
14145
14067
|
}
|
|
14146
14068
|
|
|
14147
14069
|
// src/inputs/NumberField.tsx
|
|
14148
14070
|
var import_number = require("@internationalized/number");
|
|
14149
|
-
var
|
|
14150
|
-
var
|
|
14151
|
-
var
|
|
14152
|
-
var
|
|
14071
|
+
var import_react59 = require("react");
|
|
14072
|
+
var import_react_aria33 = require("react-aria");
|
|
14073
|
+
var import_react_stately11 = require("react-stately");
|
|
14074
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
14153
14075
|
function NumberField(props) {
|
|
14154
14076
|
const {
|
|
14155
14077
|
fieldProps
|
|
@@ -14189,7 +14111,7 @@ function NumberField(props) {
|
|
|
14189
14111
|
const isReadOnly = !!readOnly;
|
|
14190
14112
|
const factor = type === "percent" ? 100 : type === "cents" ? 100 : type === "mills" ? 1e3 : type === "basisPoints" ? 1e4 : 1;
|
|
14191
14113
|
const signDisplay = displayDirection ? "always" : "auto";
|
|
14192
|
-
const defaultFormatOptions = (0,
|
|
14114
|
+
const defaultFormatOptions = (0, import_react59.useMemo)(() => ({
|
|
14193
14115
|
[truncate ? "maximumFractionDigits" : "minimumFractionDigits"]: numFractionDigits,
|
|
14194
14116
|
...numIntegerDigits !== void 0 && {
|
|
14195
14117
|
minimumIntegerDigits: numIntegerDigits
|
|
@@ -14199,8 +14121,8 @@ function NumberField(props) {
|
|
|
14199
14121
|
}), [truncate, numIntegerDigits, useGrouping, signDisplay, numFractionDigits]);
|
|
14200
14122
|
const {
|
|
14201
14123
|
locale
|
|
14202
|
-
} = (0,
|
|
14203
|
-
const formatOptions = (0,
|
|
14124
|
+
} = (0, import_react_aria33.useLocale)();
|
|
14125
|
+
const formatOptions = (0, import_react59.useMemo)(() => {
|
|
14204
14126
|
if (numberFormatOptions !== void 0) {
|
|
14205
14127
|
return numberFormatOptions;
|
|
14206
14128
|
}
|
|
@@ -14232,13 +14154,13 @@ function NumberField(props) {
|
|
|
14232
14154
|
...typeFormat
|
|
14233
14155
|
};
|
|
14234
14156
|
}, [type, numberFormatOptions, defaultFormatOptions, numFractionDigits]);
|
|
14235
|
-
const numberParser = (0,
|
|
14236
|
-
const valueRef = (0,
|
|
14157
|
+
const numberParser = (0, import_react59.useMemo)(() => new import_number.NumberParser(locale, formatOptions), [locale, formatOptions]);
|
|
14158
|
+
const valueRef = (0, import_react59.useRef)({
|
|
14237
14159
|
wip: false
|
|
14238
14160
|
});
|
|
14239
|
-
const lastSentRef = (0,
|
|
14240
|
-
const focusValueRef = (0,
|
|
14241
|
-
const [, forceRender] = (0,
|
|
14161
|
+
const lastSentRef = (0, import_react59.useRef)(void 0);
|
|
14162
|
+
const focusValueRef = (0, import_react59.useRef)(void 0);
|
|
14163
|
+
const [, forceRender] = (0, import_react59.useState)(0);
|
|
14242
14164
|
const propValue = value === void 0 ? Number.NaN : value / factor;
|
|
14243
14165
|
if (valueRef.current.wip && !Object.is(valueRef.current.value, propValue)) {
|
|
14244
14166
|
const lastSentInternal = lastSentRef.current === void 0 ? Number.NaN : lastSentRef.current / factor;
|
|
@@ -14284,17 +14206,17 @@ function NumberField(props) {
|
|
|
14284
14206
|
formatOptions,
|
|
14285
14207
|
...otherProps
|
|
14286
14208
|
};
|
|
14287
|
-
const state = (0,
|
|
14288
|
-
const inputRef = (0,
|
|
14209
|
+
const state = (0, import_react_stately11.useNumberFieldState)(useProps);
|
|
14210
|
+
const inputRef = (0, import_react59.useRef)(null);
|
|
14289
14211
|
const {
|
|
14290
14212
|
labelProps,
|
|
14291
14213
|
inputProps,
|
|
14292
14214
|
groupProps
|
|
14293
|
-
} = (0,
|
|
14215
|
+
} = (0, import_react_aria33.useNumberField)(useProps, state, inputRef);
|
|
14294
14216
|
if (readOnly && !inputRef.current) {
|
|
14295
14217
|
inputRef.current = document.createElement("input");
|
|
14296
14218
|
}
|
|
14297
|
-
return /* @__PURE__ */ (0,
|
|
14219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(
|
|
14298
14220
|
TextFieldBase,
|
|
14299
14221
|
{
|
|
14300
14222
|
xss: {
|
|
@@ -14305,7 +14227,7 @@ function NumberField(props) {
|
|
|
14305
14227
|
labelProps,
|
|
14306
14228
|
label,
|
|
14307
14229
|
required,
|
|
14308
|
-
inputProps: (0,
|
|
14230
|
+
inputProps: (0, import_react_aria33.mergeProps)(inputProps, {
|
|
14309
14231
|
size: sizeToContent ? String(inputProps.value ?? "").length || 1 : void 0
|
|
14310
14232
|
}),
|
|
14311
14233
|
onChange: (rawInputValue) => {
|
|
@@ -14337,11 +14259,11 @@ function formatValue(value, factor, numFractionDigits, numIntegerDigits, positiv
|
|
|
14337
14259
|
}
|
|
14338
14260
|
|
|
14339
14261
|
// src/inputs/RadioGroupField.tsx
|
|
14340
|
-
var
|
|
14341
|
-
var
|
|
14342
|
-
var
|
|
14343
|
-
var
|
|
14344
|
-
var
|
|
14262
|
+
var import_react60 = require("react");
|
|
14263
|
+
var import_react_aria34 = require("react-aria");
|
|
14264
|
+
var import_react_stately12 = require("react-stately");
|
|
14265
|
+
var import_runtime46 = require("@homebound/truss/runtime");
|
|
14266
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
14345
14267
|
var nextNameId = 0;
|
|
14346
14268
|
function RadioGroupField(props) {
|
|
14347
14269
|
const {
|
|
@@ -14357,8 +14279,8 @@ function RadioGroupField(props) {
|
|
|
14357
14279
|
layout = "vertical",
|
|
14358
14280
|
...otherProps
|
|
14359
14281
|
} = props;
|
|
14360
|
-
const name = (0,
|
|
14361
|
-
const state = (0,
|
|
14282
|
+
const name = (0, import_react60.useMemo)(() => `radio-group-${++nextNameId}`, []);
|
|
14283
|
+
const state = (0, import_react_stately12.useRadioGroupState)({
|
|
14362
14284
|
name,
|
|
14363
14285
|
value,
|
|
14364
14286
|
onChange: (value2) => onChange(value2),
|
|
@@ -14370,14 +14292,14 @@ function RadioGroupField(props) {
|
|
|
14370
14292
|
const {
|
|
14371
14293
|
labelProps,
|
|
14372
14294
|
radioGroupProps
|
|
14373
|
-
} = (0,
|
|
14295
|
+
} = (0, import_react_aria34.useRadioGroup)({
|
|
14374
14296
|
label,
|
|
14375
14297
|
isDisabled: disabled,
|
|
14376
14298
|
isRequired: required
|
|
14377
14299
|
}, state);
|
|
14378
14300
|
return (
|
|
14379
14301
|
// default styling to position `<Label />` above.
|
|
14380
|
-
/* @__PURE__ */ (0,
|
|
14302
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { ...(0, import_runtime46.trussProps)({
|
|
14381
14303
|
display: "df",
|
|
14382
14304
|
flexDirection: "fdc",
|
|
14383
14305
|
gap: "gap1",
|
|
@@ -14388,9 +14310,9 @@ function RadioGroupField(props) {
|
|
|
14388
14310
|
justifyContent: "jcsb"
|
|
14389
14311
|
} : {}
|
|
14390
14312
|
}), children: [
|
|
14391
|
-
/* @__PURE__ */ (0,
|
|
14392
|
-
/* @__PURE__ */ (0,
|
|
14393
|
-
/* @__PURE__ */ (0,
|
|
14313
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Label, { label, ...labelProps, ...tid.label, suffix: labelSuffix, hidden: labelStyle === "hidden" }),
|
|
14314
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { ...radioGroupProps, children: [
|
|
14315
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { ...(0, import_runtime46.trussProps)({
|
|
14394
14316
|
display: "df",
|
|
14395
14317
|
...layout === "horizontal" ? {
|
|
14396
14318
|
flexDirection: "fdr",
|
|
@@ -14401,14 +14323,14 @@ function RadioGroupField(props) {
|
|
|
14401
14323
|
gap: "gap1"
|
|
14402
14324
|
}
|
|
14403
14325
|
}), children: options.map((option) => {
|
|
14404
|
-
return /* @__PURE__ */ (0,
|
|
14326
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react60.Fragment, { children: maybeTooltip({
|
|
14405
14327
|
title: resolveTooltip(option.disabled),
|
|
14406
14328
|
placement: "bottom",
|
|
14407
|
-
children: /* @__PURE__ */ (0,
|
|
14329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Radio, { parentId: name, option, state, isOptionDisabled: !!option.disabled, ...otherProps, ...tid[option.value] })
|
|
14408
14330
|
}) }, option.value);
|
|
14409
14331
|
}) }),
|
|
14410
|
-
errorMsg && /* @__PURE__ */ (0,
|
|
14411
|
-
helperText && /* @__PURE__ */ (0,
|
|
14332
|
+
errorMsg && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(ErrorMessage, { errorMsg, ...tid.errorMsg }),
|
|
14333
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(HelperText, { helperText })
|
|
14412
14334
|
] })
|
|
14413
14335
|
] })
|
|
14414
14336
|
);
|
|
@@ -14427,11 +14349,11 @@ function Radio(props) {
|
|
|
14427
14349
|
} = props;
|
|
14428
14350
|
const labelId = `${parentId}-${value}-label`;
|
|
14429
14351
|
const descriptionId = `${parentId}-${value}-description`;
|
|
14430
|
-
const ref = (0,
|
|
14352
|
+
const ref = (0, import_react60.useRef)(null);
|
|
14431
14353
|
const {
|
|
14432
14354
|
inputProps,
|
|
14433
14355
|
isDisabled
|
|
14434
|
-
} = (0,
|
|
14356
|
+
} = (0, import_react_aria34.useRadio)({
|
|
14435
14357
|
value,
|
|
14436
14358
|
"aria-labelledby": labelId,
|
|
14437
14359
|
isDisabled: isOptionDisabled
|
|
@@ -14440,26 +14362,26 @@ function Radio(props) {
|
|
|
14440
14362
|
const {
|
|
14441
14363
|
focusProps,
|
|
14442
14364
|
isFocusVisible
|
|
14443
|
-
} = (0,
|
|
14365
|
+
} = (0, import_react_aria34.useFocusRing)();
|
|
14444
14366
|
const {
|
|
14445
14367
|
hoverProps,
|
|
14446
14368
|
isHovered
|
|
14447
|
-
} = (0,
|
|
14369
|
+
} = (0, import_react_aria34.useHover)({
|
|
14448
14370
|
isDisabled: disabled
|
|
14449
14371
|
});
|
|
14450
|
-
return /* @__PURE__ */ (0,
|
|
14372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("label", { ...(0, import_runtime46.trussProps)({
|
|
14451
14373
|
display: "df",
|
|
14452
14374
|
cursor: "cursorPointer",
|
|
14453
14375
|
...disabled ? {
|
|
14454
14376
|
cursor: "cursor_initial"
|
|
14455
14377
|
} : {}
|
|
14456
14378
|
}), ...hoverProps, children: [
|
|
14457
|
-
/* @__PURE__ */ (0,
|
|
14379
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
14458
14380
|
"input",
|
|
14459
14381
|
{
|
|
14460
14382
|
type: "radio",
|
|
14461
14383
|
ref,
|
|
14462
|
-
...(0,
|
|
14384
|
+
...(0, import_runtime46.trussProps)({
|
|
14463
14385
|
...radioReset,
|
|
14464
14386
|
...radioDefault,
|
|
14465
14387
|
...!disabled && state.selectedValue === value ? radioChecked : radioUnchecked,
|
|
@@ -14479,8 +14401,8 @@ function Radio(props) {
|
|
|
14479
14401
|
...others
|
|
14480
14402
|
}
|
|
14481
14403
|
),
|
|
14482
|
-
/* @__PURE__ */ (0,
|
|
14483
|
-
/* @__PURE__ */ (0,
|
|
14404
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { children: [
|
|
14405
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { id: labelId, ...(0, import_runtime46.trussProps)({
|
|
14484
14406
|
fontWeight: "fw4",
|
|
14485
14407
|
fontSize: "fz_14px",
|
|
14486
14408
|
lineHeight: "lh_20px",
|
|
@@ -14491,7 +14413,7 @@ function Radio(props) {
|
|
|
14491
14413
|
}), ...description ? {
|
|
14492
14414
|
"aria-describedby": descriptionId
|
|
14493
14415
|
} : {}, children: label }),
|
|
14494
|
-
description && /* @__PURE__ */ (0,
|
|
14416
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { id: descriptionId, ...(0, import_runtime46.trussProps)({
|
|
14495
14417
|
fontWeight: "fw4",
|
|
14496
14418
|
fontSize: "fz_14px",
|
|
14497
14419
|
lineHeight: "lh_20px",
|
|
@@ -14555,7 +14477,7 @@ var radioChecked = {
|
|
|
14555
14477
|
// And use backgroundImage to draw a white dot in the middle of the background
|
|
14556
14478
|
...{
|
|
14557
14479
|
backgroundImage: ["backgroundImage_var", {
|
|
14558
|
-
"--backgroundImage": (0,
|
|
14480
|
+
"--backgroundImage": (0, import_runtime46.maybeCssVar)(`url("${whiteCircle}")`)
|
|
14559
14481
|
}]
|
|
14560
14482
|
},
|
|
14561
14483
|
// Make our border the same color as the dot
|
|
@@ -14596,19 +14518,19 @@ var radioDisabled = {
|
|
|
14596
14518
|
|
|
14597
14519
|
// src/inputs/RichTextField.tsx
|
|
14598
14520
|
var import_dompurify = __toESM(require("dompurify"), 1);
|
|
14599
|
-
var
|
|
14521
|
+
var import_react62 = require("react");
|
|
14600
14522
|
|
|
14601
14523
|
// src/inputs/RichTextField.mock.tsx
|
|
14602
14524
|
var import_change_case5 = require("change-case");
|
|
14603
|
-
var
|
|
14604
|
-
var
|
|
14525
|
+
var import_react61 = require("react");
|
|
14526
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
14605
14527
|
function RichTextFieldMock(props) {
|
|
14606
14528
|
const { onBlur = () => {
|
|
14607
14529
|
}, onFocus = () => {
|
|
14608
14530
|
}, readOnly } = props;
|
|
14609
|
-
const [value, setValue] = (0,
|
|
14531
|
+
const [value, setValue] = (0, import_react61.useState)(props.value || "");
|
|
14610
14532
|
const tid = useTestIds(props, defaultTestId2(props.label || "richTextField"));
|
|
14611
|
-
return /* @__PURE__ */ (0,
|
|
14533
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
14612
14534
|
"input",
|
|
14613
14535
|
{
|
|
14614
14536
|
type: "text",
|
|
@@ -14634,8 +14556,8 @@ var import_tributejs = __toESM(require("tributejs"), 1);
|
|
|
14634
14556
|
var import_tribute = require("tributejs/dist/tribute.css");
|
|
14635
14557
|
var import_trix = require("trix/dist/trix");
|
|
14636
14558
|
var import_trix2 = require("trix/dist/trix.css");
|
|
14637
|
-
var
|
|
14638
|
-
var
|
|
14559
|
+
var import_runtime47 = require("@homebound/truss/runtime");
|
|
14560
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
14639
14561
|
var RichTextField = withTestMock(RichTextFieldImpl, RichTextFieldMock);
|
|
14640
14562
|
function RichTextFieldImpl(props) {
|
|
14641
14563
|
const {
|
|
@@ -14651,16 +14573,16 @@ function RichTextFieldImpl(props) {
|
|
|
14651
14573
|
readOnly,
|
|
14652
14574
|
fullWidth = fieldProps?.fullWidth ?? false
|
|
14653
14575
|
} = props;
|
|
14654
|
-
const [editor, setEditor] = (0,
|
|
14655
|
-
const editorElement = (0,
|
|
14656
|
-
const currentHtml = (0,
|
|
14657
|
-
const onChangeRef = (0,
|
|
14576
|
+
const [editor, setEditor] = (0, import_react62.useState)();
|
|
14577
|
+
const editorElement = (0, import_react62.useRef)();
|
|
14578
|
+
const currentHtml = (0, import_react62.useRef)(void 0);
|
|
14579
|
+
const onChangeRef = (0, import_react62.useRef)(onChange);
|
|
14658
14580
|
onChangeRef.current = onChange;
|
|
14659
|
-
const onBlurRef = (0,
|
|
14581
|
+
const onBlurRef = (0, import_react62.useRef)(onBlur);
|
|
14660
14582
|
onBlurRef.current = onBlur;
|
|
14661
|
-
const onFocusRef = (0,
|
|
14583
|
+
const onFocusRef = (0, import_react62.useRef)(onFocus);
|
|
14662
14584
|
onFocusRef.current = onFocus;
|
|
14663
|
-
const id = (0,
|
|
14585
|
+
const id = (0, import_react62.useMemo)(() => {
|
|
14664
14586
|
if (readOnly) return;
|
|
14665
14587
|
const id2 = `trix-editor-${trixId}`;
|
|
14666
14588
|
trixId++;
|
|
@@ -14704,7 +14626,7 @@ function RichTextFieldImpl(props) {
|
|
|
14704
14626
|
window.addEventListener("trix-initialize", onEditorInit);
|
|
14705
14627
|
return id2;
|
|
14706
14628
|
}, [readOnly]);
|
|
14707
|
-
(0,
|
|
14629
|
+
(0, import_react62.useEffect)(() => {
|
|
14708
14630
|
if (!readOnly && editor && value !== currentHtml.current) {
|
|
14709
14631
|
editor.loadHTML(value || "");
|
|
14710
14632
|
}
|
|
@@ -14714,16 +14636,16 @@ function RichTextFieldImpl(props) {
|
|
|
14714
14636
|
autoFocus
|
|
14715
14637
|
} = props;
|
|
14716
14638
|
if (!readOnly) {
|
|
14717
|
-
return /* @__PURE__ */ (0,
|
|
14639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { ...(0, import_runtime47.trussProps)({
|
|
14718
14640
|
width: "w100",
|
|
14719
14641
|
...!fullWidth ? {
|
|
14720
14642
|
maxWidth: "maxw_550px"
|
|
14721
14643
|
} : {}
|
|
14722
14644
|
}), children: [
|
|
14723
|
-
label && /* @__PURE__ */ (0,
|
|
14724
|
-
/* @__PURE__ */ (0,
|
|
14725
|
-
/* @__PURE__ */ (0,
|
|
14726
|
-
(0,
|
|
14645
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Label, { labelProps: {}, label }),
|
|
14646
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "beam-trix-editor", children: [
|
|
14647
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("input", { type: "hidden", id: `input-${id}`, value }),
|
|
14648
|
+
(0, import_react62.createElement)("trix-editor", {
|
|
14727
14649
|
id,
|
|
14728
14650
|
input: `input-${id}`,
|
|
14729
14651
|
// Autofocus attribute is case sensitive since this is standard HTML
|
|
@@ -14737,14 +14659,14 @@ function RichTextFieldImpl(props) {
|
|
|
14737
14659
|
] })
|
|
14738
14660
|
] });
|
|
14739
14661
|
} else {
|
|
14740
|
-
return /* @__PURE__ */ (0,
|
|
14662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { ...(0, import_runtime47.trussProps)({
|
|
14741
14663
|
width: "w100",
|
|
14742
14664
|
...!fullWidth ? {
|
|
14743
14665
|
maxWidth: "maxw_550px"
|
|
14744
14666
|
} : {}
|
|
14745
14667
|
}), children: [
|
|
14746
|
-
label && /* @__PURE__ */ (0,
|
|
14747
|
-
/* @__PURE__ */ (0,
|
|
14668
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Label, { label }),
|
|
14669
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "mh_120px bgWhite fw4 fz_14px lh_20px gray900 bss bw1 pt1 pb1 pr1 pl1 br4 bcGray300", dangerouslySetInnerHTML: {
|
|
14748
14670
|
__html: import_dompurify.default.sanitize(value) || placeholder || ""
|
|
14749
14671
|
}, "data-readonly": "true" })
|
|
14750
14672
|
] });
|
|
@@ -14777,9 +14699,222 @@ function extractIdsFromMentions(mergeTags, content) {
|
|
|
14777
14699
|
}
|
|
14778
14700
|
var trixId = 1;
|
|
14779
14701
|
|
|
14780
|
-
// src/inputs/
|
|
14702
|
+
// src/inputs/SelectCard.tsx
|
|
14703
|
+
var import_react63 = require("react");
|
|
14704
|
+
var import_react_aria35 = require("react-aria");
|
|
14705
|
+
var import_react_stately13 = require("react-stately");
|
|
14706
|
+
var import_runtime48 = require("@homebound/truss/runtime");
|
|
14707
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
14708
|
+
function SelectCard(props) {
|
|
14709
|
+
const {
|
|
14710
|
+
selected: isSelected = false,
|
|
14711
|
+
disabled: isDisabled = false,
|
|
14712
|
+
icon,
|
|
14713
|
+
cardRef,
|
|
14714
|
+
label,
|
|
14715
|
+
description,
|
|
14716
|
+
tooltip,
|
|
14717
|
+
xss,
|
|
14718
|
+
...otherProps
|
|
14719
|
+
} = props;
|
|
14720
|
+
const ref = useGetRef(cardRef);
|
|
14721
|
+
const ariaProps = {
|
|
14722
|
+
isSelected,
|
|
14723
|
+
isDisabled,
|
|
14724
|
+
...otherProps
|
|
14725
|
+
};
|
|
14726
|
+
const checkboxProps = {
|
|
14727
|
+
...ariaProps,
|
|
14728
|
+
"aria-label": label
|
|
14729
|
+
};
|
|
14730
|
+
const {
|
|
14731
|
+
hoverProps,
|
|
14732
|
+
isHovered
|
|
14733
|
+
} = (0, import_react_aria35.useHover)({
|
|
14734
|
+
isDisabled
|
|
14735
|
+
});
|
|
14736
|
+
const toggleState = (0, import_react_stately13.useToggleState)(ariaProps);
|
|
14737
|
+
const {
|
|
14738
|
+
inputProps
|
|
14739
|
+
} = (0, import_react_aria35.useCheckbox)(checkboxProps, toggleState, ref);
|
|
14740
|
+
const styles = (0, import_react63.useMemo)(() => ({
|
|
14741
|
+
...baseStyles3,
|
|
14742
|
+
// A label-only card is a fixed compact box; a description card fills the row and stretches.
|
|
14743
|
+
...description ? fillRowStyles : fixedSizeStyles,
|
|
14744
|
+
// Description cards top-align so multi-line copy lines up; label-only cards center.
|
|
14745
|
+
...description ? {
|
|
14746
|
+
justifyContent: "jcfs"
|
|
14747
|
+
} : {
|
|
14748
|
+
justifyContent: "jcc"
|
|
14749
|
+
},
|
|
14750
|
+
...isHovered && !isDisabled && hoverStyles2,
|
|
14751
|
+
...isSelected && !isDisabled && selectedStyles,
|
|
14752
|
+
...isDisabled && (isSelected ? disabledSelectedStyles : disabledStyles2),
|
|
14753
|
+
// Spread last so a parent can override sizing (see `SelectCardGroup`).
|
|
14754
|
+
...xss
|
|
14755
|
+
}), [description, isDisabled, isHovered, isSelected, xss]);
|
|
14756
|
+
const tid = useTestIds(props, defaultTestId(label));
|
|
14757
|
+
return maybeTooltip({
|
|
14758
|
+
title: resolveTooltip(isDisabled, tooltip),
|
|
14759
|
+
placement: "top",
|
|
14760
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("button", { ...(0, import_runtime48.trussProps)(styles), ...hoverProps, onClick: toggleState.toggle, disabled: isDisabled, ...tid, children: [
|
|
14761
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_react_aria35.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("input", { ref, ...inputProps, ...tid.value }) }),
|
|
14762
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Icon, { icon, inc: 4, color: isDisabled ? "rgba(100, 100, 100, 1)" /* Gray700 */ : "rgba(36, 36, 36, 1)" /* Gray900 */ }),
|
|
14763
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("span", { ...(0, import_runtime48.trussProps)(copyStyles), children: [
|
|
14764
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { ...(0, import_runtime48.trussProps)({
|
|
14765
|
+
fontWeight: "fw6",
|
|
14766
|
+
fontSize: "fz_14px",
|
|
14767
|
+
lineHeight: "lh_20px",
|
|
14768
|
+
...isDisabled ? {
|
|
14769
|
+
color: "gray700"
|
|
14770
|
+
} : {}
|
|
14771
|
+
}), children: label }),
|
|
14772
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "fw4 fz_12px lh_16px gray700", children: description })
|
|
14773
|
+
] })
|
|
14774
|
+
] })
|
|
14775
|
+
});
|
|
14776
|
+
}
|
|
14777
|
+
var baseStyles3 = {
|
|
14778
|
+
display: "df",
|
|
14779
|
+
flexDirection: "fdc",
|
|
14780
|
+
alignItems: "aic",
|
|
14781
|
+
borderStyle: "bss",
|
|
14782
|
+
borderWidth: "bw1",
|
|
14783
|
+
borderRadius: "br12",
|
|
14784
|
+
backgroundColor: "bgWhite",
|
|
14785
|
+
borderColor: "bcGray300",
|
|
14786
|
+
gap: "gap1",
|
|
14787
|
+
paddingLeft: "pl2",
|
|
14788
|
+
paddingRight: "pr2",
|
|
14789
|
+
paddingTop: "pt3",
|
|
14790
|
+
paddingBottom: "pb3",
|
|
14791
|
+
textAlign: "tac"
|
|
14792
|
+
};
|
|
14793
|
+
var fixedSizeStyles = {
|
|
14794
|
+
width: "w_130px",
|
|
14795
|
+
height: "h_114px"
|
|
14796
|
+
};
|
|
14797
|
+
var fillRowStyles = {
|
|
14798
|
+
flexBasis: "fb_0",
|
|
14799
|
+
flexGrow: "fg1",
|
|
14800
|
+
flexShrink: "fs0",
|
|
14801
|
+
alignSelf: "asStretch",
|
|
14802
|
+
minWidth: "mw_187px",
|
|
14803
|
+
width: "wa",
|
|
14804
|
+
height: "ha"
|
|
14805
|
+
};
|
|
14806
|
+
var copyStyles = {
|
|
14807
|
+
display: "df",
|
|
14808
|
+
flexDirection: "fdc",
|
|
14809
|
+
alignItems: "aic",
|
|
14810
|
+
gap: "gap_4px",
|
|
14811
|
+
width: "w100"
|
|
14812
|
+
};
|
|
14813
|
+
var hoverStyles2 = {
|
|
14814
|
+
borderColor: "bcBlue600"
|
|
14815
|
+
};
|
|
14816
|
+
var selectedStyles = {
|
|
14817
|
+
borderColor: "bcBlue600",
|
|
14818
|
+
backgroundColor: "bgBlue50"
|
|
14819
|
+
};
|
|
14820
|
+
var disabledStyles2 = {
|
|
14821
|
+
backgroundColor: "bgGray50",
|
|
14822
|
+
borderColor: "bcGray300"
|
|
14823
|
+
};
|
|
14824
|
+
var disabledSelectedStyles = {
|
|
14825
|
+
backgroundColor: "bgGray100",
|
|
14826
|
+
borderColor: "bcGray300"
|
|
14827
|
+
};
|
|
14828
|
+
|
|
14829
|
+
// src/inputs/SelectCardGroup.tsx
|
|
14781
14830
|
var import_react64 = require("react");
|
|
14831
|
+
var import_react_aria36 = require("react-aria");
|
|
14832
|
+
var import_runtime49 = require("@homebound/truss/runtime");
|
|
14782
14833
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
14834
|
+
function SelectCardGroup(props) {
|
|
14835
|
+
const {
|
|
14836
|
+
fieldProps
|
|
14837
|
+
} = usePresentationContext();
|
|
14838
|
+
const {
|
|
14839
|
+
options,
|
|
14840
|
+
label,
|
|
14841
|
+
labelStyle = fieldProps?.labelStyle ?? "above",
|
|
14842
|
+
values,
|
|
14843
|
+
errorMsg,
|
|
14844
|
+
helperText,
|
|
14845
|
+
disabled: isDisabled = false,
|
|
14846
|
+
onChange
|
|
14847
|
+
} = props;
|
|
14848
|
+
const [selected, setSelected] = (0, import_react64.useState)(values);
|
|
14849
|
+
const exclusiveOptions = (0, import_react64.useMemo)(() => options.filter((o) => o.exclusive), [options]);
|
|
14850
|
+
const hasDescription = (0, import_react64.useMemo)(() => options.some((o) => o.description), [options]);
|
|
14851
|
+
const toggleValue = (0, import_react64.useCallback)((value) => {
|
|
14852
|
+
if (isDisabled) return;
|
|
14853
|
+
const option = options.find((o) => o.value === value);
|
|
14854
|
+
if (!option) return;
|
|
14855
|
+
let newSelected = [];
|
|
14856
|
+
if (selected.includes(value)) {
|
|
14857
|
+
newSelected = selected.filter((v) => v !== value);
|
|
14858
|
+
} else {
|
|
14859
|
+
if (option.exclusive) {
|
|
14860
|
+
newSelected = [value];
|
|
14861
|
+
} else {
|
|
14862
|
+
newSelected = [...selected, value];
|
|
14863
|
+
newSelected = newSelected.filter((v) => !exclusiveOptions.some((o) => o.value === v));
|
|
14864
|
+
}
|
|
14865
|
+
}
|
|
14866
|
+
setSelected(newSelected);
|
|
14867
|
+
onChange(newSelected);
|
|
14868
|
+
}, [exclusiveOptions, isDisabled, onChange, options, selected]);
|
|
14869
|
+
const tid = useTestIds(props);
|
|
14870
|
+
const {
|
|
14871
|
+
labelProps,
|
|
14872
|
+
fieldProps: fieldPropsAria
|
|
14873
|
+
} = (0, import_react_aria36.useField)(props);
|
|
14874
|
+
const groupProps = (0, import_react_aria36.mergeProps)(tid, {
|
|
14875
|
+
role: "group",
|
|
14876
|
+
"aria-disabled": isDisabled || void 0,
|
|
14877
|
+
...fieldPropsAria
|
|
14878
|
+
});
|
|
14879
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsxs)("div", { ...groupProps, children: [
|
|
14880
|
+
labelStyle !== "hidden" && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { ...(0, import_runtime49.trussProps)({
|
|
14881
|
+
...labelStyle === "left" ? {
|
|
14882
|
+
width: "w50"
|
|
14883
|
+
} : {}
|
|
14884
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Label, { label, ...labelProps, ...tid.label }) }),
|
|
14885
|
+
/* @__PURE__ */ (0, import_jsx_runtime75.jsx)("div", { className: "df gap2 flexWrap_wrap", children: options.map((option) => {
|
|
14886
|
+
const {
|
|
14887
|
+
icon,
|
|
14888
|
+
label: label2,
|
|
14889
|
+
description,
|
|
14890
|
+
disabled,
|
|
14891
|
+
tooltip
|
|
14892
|
+
} = option;
|
|
14893
|
+
const isSelected = selected.includes(option.value);
|
|
14894
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
14895
|
+
SelectCard,
|
|
14896
|
+
{
|
|
14897
|
+
icon,
|
|
14898
|
+
label: label2,
|
|
14899
|
+
description,
|
|
14900
|
+
xss: hasDescription ? fillRowStyles : void 0,
|
|
14901
|
+
selected: isSelected,
|
|
14902
|
+
disabled,
|
|
14903
|
+
tooltip,
|
|
14904
|
+
onChange: () => toggleValue(option.value),
|
|
14905
|
+
...tid[option.label]
|
|
14906
|
+
},
|
|
14907
|
+
option.label
|
|
14908
|
+
);
|
|
14909
|
+
}) }),
|
|
14910
|
+
errorMsg && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ErrorMessage, { errorMsg, ...tid.errorMsg }),
|
|
14911
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(HelperText, { helperText, ...tid.helperText })
|
|
14912
|
+
] });
|
|
14913
|
+
}
|
|
14914
|
+
|
|
14915
|
+
// src/inputs/SelectField.tsx
|
|
14916
|
+
var import_react65 = require("react");
|
|
14917
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
14783
14918
|
function SelectField(props) {
|
|
14784
14919
|
const {
|
|
14785
14920
|
getOptionValue = defaultOptionValue,
|
|
@@ -14789,8 +14924,8 @@ function SelectField(props) {
|
|
|
14789
14924
|
value,
|
|
14790
14925
|
...otherProps
|
|
14791
14926
|
} = props;
|
|
14792
|
-
const values = (0,
|
|
14793
|
-
return /* @__PURE__ */ (0,
|
|
14927
|
+
const values = (0, import_react65.useMemo)(() => [value], [value]);
|
|
14928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
14794
14929
|
ComboBoxBase,
|
|
14795
14930
|
{
|
|
14796
14931
|
...otherProps,
|
|
@@ -14809,12 +14944,12 @@ function SelectField(props) {
|
|
|
14809
14944
|
}
|
|
14810
14945
|
|
|
14811
14946
|
// src/inputs/Switch.tsx
|
|
14812
|
-
var
|
|
14813
|
-
var
|
|
14814
|
-
var
|
|
14815
|
-
var
|
|
14816
|
-
var __maybeInc8 = (inc) => {
|
|
14817
|
-
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
14947
|
+
var import_react66 = require("react");
|
|
14948
|
+
var import_react_aria37 = require("react-aria");
|
|
14949
|
+
var import_runtime50 = require("@homebound/truss/runtime");
|
|
14950
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
14951
|
+
var __maybeInc8 = (inc) => {
|
|
14952
|
+
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
14818
14953
|
};
|
|
14819
14954
|
function Switch(props) {
|
|
14820
14955
|
const {
|
|
@@ -14842,26 +14977,26 @@ function Switch(props) {
|
|
|
14842
14977
|
...otherProps
|
|
14843
14978
|
};
|
|
14844
14979
|
const state = toToggleState(isSelected, onChange);
|
|
14845
|
-
const ref = (0,
|
|
14980
|
+
const ref = (0, import_react66.useRef)(null);
|
|
14846
14981
|
const {
|
|
14847
14982
|
inputProps
|
|
14848
|
-
} = (0,
|
|
14983
|
+
} = (0, import_react_aria37.useSwitch)({
|
|
14849
14984
|
...ariaProps,
|
|
14850
14985
|
"aria-label": label
|
|
14851
14986
|
}, state, ref);
|
|
14852
14987
|
const {
|
|
14853
14988
|
isFocusVisible: isFocusVisibleFromEvents,
|
|
14854
14989
|
focusProps
|
|
14855
|
-
} = (0,
|
|
14990
|
+
} = (0, import_react_aria37.useFocusRing)(otherProps);
|
|
14856
14991
|
const {
|
|
14857
14992
|
hoverProps,
|
|
14858
14993
|
isHovered: isHoveredFromEvents
|
|
14859
|
-
} = (0,
|
|
14994
|
+
} = (0, import_react_aria37.useHover)(ariaProps);
|
|
14860
14995
|
const isFocusVisible = __storyState?.focusVisible ?? isFocusVisibleFromEvents;
|
|
14861
14996
|
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
14862
14997
|
const tooltip = resolveTooltip(disabled, props.tooltip);
|
|
14863
14998
|
const tid = useTestIds(otherProps, label);
|
|
14864
|
-
return /* @__PURE__ */ (0,
|
|
14999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("label", { ...hoverProps, ...(0, import_runtime50.trussProps)({
|
|
14865
15000
|
...{
|
|
14866
15001
|
position: "relative",
|
|
14867
15002
|
cursor: "cursorPointer",
|
|
@@ -14899,18 +15034,18 @@ function Switch(props) {
|
|
|
14899
15034
|
color: "gray400"
|
|
14900
15035
|
}
|
|
14901
15036
|
}), children: [
|
|
14902
|
-
labelStyle !== "inline" && labelStyle !== "hidden" && /* @__PURE__ */ (0,
|
|
15037
|
+
labelStyle !== "inline" && labelStyle !== "hidden" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Label, { label, tooltip, xss: {
|
|
14903
15038
|
...labelStyle === "filter" ? {
|
|
14904
15039
|
color: "gray900"
|
|
14905
15040
|
} : {}
|
|
14906
15041
|
}, inline: labelStyle === "left" || labelStyle === "filter" }) }),
|
|
14907
|
-
/* @__PURE__ */ (0,
|
|
15042
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ...(0, import_runtime50.trussProps)({
|
|
14908
15043
|
...labelStyle === "left" ? {
|
|
14909
15044
|
width: ["w_var", {
|
|
14910
|
-
"--width": (0,
|
|
15045
|
+
"--width": (0, import_runtime50.maybeCssVar)(__maybeInc8(labelLeftFieldWidth))
|
|
14911
15046
|
}]
|
|
14912
15047
|
} : {}
|
|
14913
|
-
}), children: /* @__PURE__ */ (0,
|
|
15048
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { "aria-hidden": "true", ...(0, import_runtime50.trussProps)({
|
|
14914
15049
|
...{
|
|
14915
15050
|
width: ["w_var", {
|
|
14916
15051
|
"--width": `${toggleWidth(compact)}px`
|
|
@@ -14932,14 +15067,14 @@ function Switch(props) {
|
|
|
14932
15067
|
backgroundColor: "bgBlue700"
|
|
14933
15068
|
},
|
|
14934
15069
|
...isSelected && isHovered && switchSelectedHoverStyles
|
|
14935
|
-
}), children: /* @__PURE__ */ (0,
|
|
15070
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { ...(0, import_runtime50.trussProps)({
|
|
14936
15071
|
...switchCircleDefaultStyles(compact),
|
|
14937
15072
|
...isDisabled && {
|
|
14938
15073
|
backgroundColor: "bgGray100"
|
|
14939
15074
|
},
|
|
14940
15075
|
...isSelected && switchCircleSelectedStyles(compact)
|
|
14941
|
-
}), children: withIcon && /* @__PURE__ */ (0,
|
|
14942
|
-
labelStyle === "inline" && /* @__PURE__ */ (0,
|
|
15076
|
+
}), children: withIcon && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Icon, { icon: isSelected ? "check" : "x", color: isSelected ? "rgba(29, 78, 216, 1)" /* Blue700 */ : "rgba(201, 201, 201, 1)" /* Gray400 */, inc: toggleHeight(compact) / 16 }) }) }) }),
|
|
15077
|
+
labelStyle === "inline" && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Label, { label, tooltip, inline: true, xss: {
|
|
14943
15078
|
fontWeight: "fw4",
|
|
14944
15079
|
fontSize: "fz_14px",
|
|
14945
15080
|
lineHeight: "lh_20px",
|
|
@@ -14948,7 +15083,7 @@ function Switch(props) {
|
|
|
14948
15083
|
lineHeight: "lineHeight_1"
|
|
14949
15084
|
} : {}
|
|
14950
15085
|
} }),
|
|
14951
|
-
/* @__PURE__ */ (0,
|
|
15086
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react_aria37.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("input", { ref, ...inputProps, ...focusProps, ...tid }) })
|
|
14952
15087
|
] });
|
|
14953
15088
|
}
|
|
14954
15089
|
var toggleHeight = (isCompact) => isCompact ? 16 : 24;
|
|
@@ -14988,15 +15123,15 @@ function switchCircleDefaultStyles(isCompact) {
|
|
|
14988
15123
|
function switchCircleSelectedStyles(isCompact) {
|
|
14989
15124
|
return {
|
|
14990
15125
|
left: ["left_var", {
|
|
14991
|
-
"--left": (0,
|
|
15126
|
+
"--left": (0, import_runtime50.maybeCssVar)(__maybeInc8(`calc(100% - ${circleDiameter(isCompact)}px - 2px)`))
|
|
14992
15127
|
}]
|
|
14993
15128
|
};
|
|
14994
15129
|
}
|
|
14995
15130
|
|
|
14996
15131
|
// src/inputs/TextAreaField.tsx
|
|
14997
|
-
var
|
|
14998
|
-
var
|
|
14999
|
-
var
|
|
15132
|
+
var import_react67 = require("react");
|
|
15133
|
+
var import_react_aria38 = require("react-aria");
|
|
15134
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
15000
15135
|
function TextAreaField(props) {
|
|
15001
15136
|
const {
|
|
15002
15137
|
value = "",
|
|
@@ -15012,10 +15147,10 @@ function TextAreaField(props) {
|
|
|
15012
15147
|
const isDisabled = !!disabled;
|
|
15013
15148
|
const isReadOnly = !!readOnly;
|
|
15014
15149
|
const textFieldProps = { ...otherProps, value, isDisabled, isReadOnly };
|
|
15015
|
-
const inputRef = (0,
|
|
15016
|
-
const inputWrapRef = (0,
|
|
15150
|
+
const inputRef = (0, import_react67.useRef)(null);
|
|
15151
|
+
const inputWrapRef = (0, import_react67.useRef)(null);
|
|
15017
15152
|
useGrowingTextField({ inputRef, inputWrapRef, value, maxLines });
|
|
15018
|
-
const { labelProps, inputProps } = (0,
|
|
15153
|
+
const { labelProps, inputProps } = (0, import_react_aria38.useTextField)(
|
|
15019
15154
|
{
|
|
15020
15155
|
...textFieldProps,
|
|
15021
15156
|
inputElementType: "textarea",
|
|
@@ -15035,10 +15170,10 @@ function TextAreaField(props) {
|
|
|
15035
15170
|
},
|
|
15036
15171
|
inputRef
|
|
15037
15172
|
);
|
|
15038
|
-
return /* @__PURE__ */ (0,
|
|
15173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
15039
15174
|
TextFieldBase,
|
|
15040
15175
|
{
|
|
15041
|
-
...(0,
|
|
15176
|
+
...(0, import_react_aria38.mergeProps)(otherProps, { onBlur, onFocus }),
|
|
15042
15177
|
multiline: true,
|
|
15043
15178
|
labelProps,
|
|
15044
15179
|
inputProps,
|
|
@@ -15051,9 +15186,9 @@ function TextAreaField(props) {
|
|
|
15051
15186
|
}
|
|
15052
15187
|
|
|
15053
15188
|
// src/inputs/TextField.tsx
|
|
15054
|
-
var
|
|
15055
|
-
var
|
|
15056
|
-
var
|
|
15189
|
+
var import_react68 = require("react");
|
|
15190
|
+
var import_react_aria39 = require("react-aria");
|
|
15191
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
15057
15192
|
function TextField(props) {
|
|
15058
15193
|
const {
|
|
15059
15194
|
disabled = false,
|
|
@@ -15079,8 +15214,8 @@ function TextField(props) {
|
|
|
15079
15214
|
validationState: errorMsg ? "invalid" : "valid",
|
|
15080
15215
|
value
|
|
15081
15216
|
};
|
|
15082
|
-
const inputRef = (0,
|
|
15083
|
-
const { labelProps, inputProps } = (0,
|
|
15217
|
+
const inputRef = (0, import_react68.useRef)(null);
|
|
15218
|
+
const { labelProps, inputProps } = (0, import_react_aria39.useTextField)(
|
|
15084
15219
|
{
|
|
15085
15220
|
...textFieldProps,
|
|
15086
15221
|
onKeyDown: (e) => {
|
|
@@ -15099,10 +15234,10 @@ function TextField(props) {
|
|
|
15099
15234
|
focus: () => inputRef.current && inputRef.current.focus()
|
|
15100
15235
|
};
|
|
15101
15236
|
}
|
|
15102
|
-
return /* @__PURE__ */ (0,
|
|
15237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
15103
15238
|
TextFieldBase,
|
|
15104
15239
|
{
|
|
15105
|
-
...(0,
|
|
15240
|
+
...(0, import_react_aria39.mergeProps)(textFieldProps, { onBlur, onFocus }),
|
|
15106
15241
|
errorMsg,
|
|
15107
15242
|
required,
|
|
15108
15243
|
labelProps,
|
|
@@ -15115,11 +15250,11 @@ function TextField(props) {
|
|
|
15115
15250
|
}
|
|
15116
15251
|
|
|
15117
15252
|
// src/inputs/ToggleButton.tsx
|
|
15118
|
-
var
|
|
15119
|
-
var
|
|
15253
|
+
var import_react69 = require("react");
|
|
15254
|
+
var import_react_aria40 = require("react-aria");
|
|
15120
15255
|
var import_react_stately14 = require("react-stately");
|
|
15121
|
-
var
|
|
15122
|
-
var
|
|
15256
|
+
var import_runtime51 = require("@homebound/truss/runtime");
|
|
15257
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
15123
15258
|
function ToggleButton(props) {
|
|
15124
15259
|
const {
|
|
15125
15260
|
selected: isSelected = false,
|
|
@@ -15130,7 +15265,7 @@ function ToggleButton(props) {
|
|
|
15130
15265
|
__storyState,
|
|
15131
15266
|
...otherProps
|
|
15132
15267
|
} = props;
|
|
15133
|
-
const [asyncInProgress, setAsyncInProgress] = (0,
|
|
15268
|
+
const [asyncInProgress, setAsyncInProgress] = (0, import_react69.useState)(false);
|
|
15134
15269
|
const isDisabled = !!disabled || asyncInProgress;
|
|
15135
15270
|
const ariaProps = {
|
|
15136
15271
|
"aria-label": label,
|
|
@@ -15149,30 +15284,30 @@ function ToggleButton(props) {
|
|
|
15149
15284
|
return result;
|
|
15150
15285
|
}
|
|
15151
15286
|
});
|
|
15152
|
-
const labelRef = (0,
|
|
15153
|
-
const ref = (0,
|
|
15287
|
+
const labelRef = (0, import_react69.useRef)(null);
|
|
15288
|
+
const ref = (0, import_react69.useRef)(null);
|
|
15154
15289
|
const tid = useTestIds(otherProps, label);
|
|
15155
15290
|
const {
|
|
15156
15291
|
isPressed: isPressedFromEvents,
|
|
15157
15292
|
pressProps
|
|
15158
|
-
} = (0,
|
|
15293
|
+
} = (0, import_react_aria40.usePress)({
|
|
15159
15294
|
ref: labelRef,
|
|
15160
15295
|
isDisabled
|
|
15161
15296
|
});
|
|
15162
15297
|
const {
|
|
15163
15298
|
inputProps
|
|
15164
|
-
} = (0,
|
|
15299
|
+
} = (0, import_react_aria40.useSwitch)(ariaProps, state, ref);
|
|
15165
15300
|
const {
|
|
15166
15301
|
isFocusVisible: isFocusVisibleFromEvents,
|
|
15167
15302
|
focusProps
|
|
15168
|
-
} = (0,
|
|
15303
|
+
} = (0, import_react_aria40.useFocusRing)({
|
|
15169
15304
|
...otherProps,
|
|
15170
15305
|
within: true
|
|
15171
15306
|
});
|
|
15172
15307
|
const {
|
|
15173
15308
|
hoverProps,
|
|
15174
15309
|
isHovered: isHoveredFromEvents
|
|
15175
|
-
} = (0,
|
|
15310
|
+
} = (0, import_react_aria40.useHover)({
|
|
15176
15311
|
isDisabled
|
|
15177
15312
|
});
|
|
15178
15313
|
const isHovered = __storyState?.hovered ?? isHoveredFromEvents;
|
|
@@ -15183,7 +15318,7 @@ function ToggleButton(props) {
|
|
|
15183
15318
|
...focusProps,
|
|
15184
15319
|
...hoverProps,
|
|
15185
15320
|
...pressProps,
|
|
15186
|
-
...(0,
|
|
15321
|
+
...(0, import_runtime51.trussProps)({
|
|
15187
15322
|
...{
|
|
15188
15323
|
borderRadius: "br4",
|
|
15189
15324
|
display: "dif",
|
|
@@ -15218,10 +15353,10 @@ function ToggleButton(props) {
|
|
|
15218
15353
|
return maybeTooltip({
|
|
15219
15354
|
title: tooltip,
|
|
15220
15355
|
placement: "top",
|
|
15221
|
-
children: /* @__PURE__ */ (0,
|
|
15222
|
-
icon && /* @__PURE__ */ (0,
|
|
15356
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("label", { ...labelAttrs, children: [
|
|
15357
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(Icon, { icon }),
|
|
15223
15358
|
label,
|
|
15224
|
-
/* @__PURE__ */ (0,
|
|
15359
|
+
/* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react_aria40.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("input", { ref, ...inputProps, ...tid.value }) })
|
|
15225
15360
|
] })
|
|
15226
15361
|
});
|
|
15227
15362
|
}
|
|
@@ -15236,11 +15371,11 @@ var togglePressStyles = {
|
|
|
15236
15371
|
};
|
|
15237
15372
|
|
|
15238
15373
|
// src/inputs/ToggleChipGroup.tsx
|
|
15239
|
-
var
|
|
15240
|
-
var
|
|
15374
|
+
var import_react70 = require("react");
|
|
15375
|
+
var import_react_aria41 = require("react-aria");
|
|
15241
15376
|
var import_react_stately15 = require("react-stately");
|
|
15242
|
-
var
|
|
15243
|
-
var
|
|
15377
|
+
var import_runtime52 = require("@homebound/truss/runtime");
|
|
15378
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
15244
15379
|
var __maybeInc9 = (inc) => {
|
|
15245
15380
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
15246
15381
|
};
|
|
@@ -15268,10 +15403,10 @@ function ToggleChipGroup(props) {
|
|
|
15268
15403
|
const {
|
|
15269
15404
|
groupProps,
|
|
15270
15405
|
labelProps
|
|
15271
|
-
} = (0,
|
|
15406
|
+
} = (0, import_react_aria41.useCheckboxGroup)(props, state);
|
|
15272
15407
|
const tid = useTestIds(props, "toggleChip");
|
|
15273
15408
|
const labelSuffix = useLabelSuffix(required, false);
|
|
15274
|
-
return /* @__PURE__ */ (0,
|
|
15409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { ...groupProps, ...(0, import_runtime52.trussProps)({
|
|
15275
15410
|
position: "relative",
|
|
15276
15411
|
display: "df",
|
|
15277
15412
|
flexDirection: "fdc",
|
|
@@ -15282,17 +15417,17 @@ function ToggleChipGroup(props) {
|
|
|
15282
15417
|
justifyContent: "jcsb"
|
|
15283
15418
|
} : {}
|
|
15284
15419
|
}), children: [
|
|
15285
|
-
/* @__PURE__ */ (0,
|
|
15286
|
-
/* @__PURE__ */ (0,
|
|
15420
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(Label, { label, ...labelProps, hidden: labelStyle === "hidden", inline: labelStyle !== "above", suffix: labelSuffix }),
|
|
15421
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { ...(0, import_runtime52.trussProps)({
|
|
15287
15422
|
display: "df",
|
|
15288
15423
|
gap: "gap1",
|
|
15289
15424
|
flexWrap: "flexWrap_wrap",
|
|
15290
15425
|
...labelStyle === "left" ? {
|
|
15291
15426
|
width: ["w_var", {
|
|
15292
|
-
"--width": (0,
|
|
15427
|
+
"--width": (0, import_runtime52.maybeCssVar)(__maybeInc9(labelLeftFieldWidth))
|
|
15293
15428
|
}]
|
|
15294
15429
|
} : {}
|
|
15295
|
-
}), children: options.map((o) => /* @__PURE__ */ (0,
|
|
15430
|
+
}), children: options.map((o) => /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ToggleChip2, { value: o.value, groupState: state, selected: state.value.includes(o.value), label: o.label, disabled: o.disabled, readonly: o.readonly, startAdornment: o.startAdornment, xss, ...tid[o.value] }, o.value)) })
|
|
15296
15431
|
] });
|
|
15297
15432
|
}
|
|
15298
15433
|
function ToggleChip2(props) {
|
|
@@ -15309,10 +15444,10 @@ function ToggleChip2(props) {
|
|
|
15309
15444
|
} = props;
|
|
15310
15445
|
const isDisabled = !!disabled;
|
|
15311
15446
|
const isReadOnly = !!readonly;
|
|
15312
|
-
const ref = (0,
|
|
15447
|
+
const ref = (0, import_react70.useRef)(null);
|
|
15313
15448
|
const {
|
|
15314
15449
|
inputProps
|
|
15315
|
-
} = (0,
|
|
15450
|
+
} = (0, import_react_aria41.useCheckboxGroupItem)({
|
|
15316
15451
|
value,
|
|
15317
15452
|
"aria-label": label,
|
|
15318
15453
|
isReadOnly,
|
|
@@ -15321,19 +15456,19 @@ function ToggleChip2(props) {
|
|
|
15321
15456
|
const {
|
|
15322
15457
|
isFocusVisible,
|
|
15323
15458
|
focusProps
|
|
15324
|
-
} = (0,
|
|
15459
|
+
} = (0, import_react_aria41.useFocusRing)();
|
|
15325
15460
|
const tooltip = resolveTooltip(disabled);
|
|
15326
15461
|
const chipStateCss = isSelected ? {
|
|
15327
15462
|
color: ["color_var", {
|
|
15328
|
-
"--color": (0,
|
|
15463
|
+
"--color": (0, import_runtime52.maybeCssVar)(xss?.color ?? "rgba(255, 255, 255, 1)" /* White */)
|
|
15329
15464
|
}],
|
|
15330
15465
|
backgroundColor: ["bgColor_var", {
|
|
15331
|
-
"--backgroundColor": (0,
|
|
15466
|
+
"--backgroundColor": (0, import_runtime52.maybeCssVar)(xss?.backgroundColor ?? "rgba(29, 78, 216, 1)" /* Blue700 */)
|
|
15332
15467
|
}],
|
|
15333
15468
|
...!isDisabled ? {
|
|
15334
15469
|
backgroundColor: ["bgColor_var h_bgColor_var", {
|
|
15335
|
-
"--backgroundColor": (0,
|
|
15336
|
-
"--h_backgroundColor": (0,
|
|
15470
|
+
"--backgroundColor": (0, import_runtime52.maybeCssVar)(xss?.backgroundColor ?? "rgba(29, 78, 216, 1)" /* Blue700 */),
|
|
15471
|
+
"--h_backgroundColor": (0, import_runtime52.maybeCssVar)(xss?.backgroundColor ?? "rgba(30, 64, 175, 1)" /* Blue800 */)
|
|
15337
15472
|
}]
|
|
15338
15473
|
} : {}
|
|
15339
15474
|
} : isDisabled ? {
|
|
@@ -15348,7 +15483,7 @@ function ToggleChip2(props) {
|
|
|
15348
15483
|
return maybeTooltip({
|
|
15349
15484
|
title: tooltip,
|
|
15350
15485
|
placement: "top",
|
|
15351
|
-
children: /* @__PURE__ */ (0,
|
|
15486
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("label", { ...(0, import_runtime52.trussProps)({
|
|
15352
15487
|
...{
|
|
15353
15488
|
position: "relative",
|
|
15354
15489
|
display: "dif",
|
|
@@ -15369,7 +15504,7 @@ function ToggleChip2(props) {
|
|
|
15369
15504
|
boxShadow: "bshFocus"
|
|
15370
15505
|
} : {}
|
|
15371
15506
|
}), "data-selected": isSelected, "data-disabled": isDisabled, "aria-disabled": isDisabled, ...others, children: [
|
|
15372
|
-
/* @__PURE__ */ (0,
|
|
15507
|
+
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_aria41.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("input", { ...inputProps, ...focusProps }) }),
|
|
15373
15508
|
startAdornment,
|
|
15374
15509
|
label
|
|
15375
15510
|
] })
|
|
@@ -15377,12 +15512,12 @@ function ToggleChip2(props) {
|
|
|
15377
15512
|
}
|
|
15378
15513
|
|
|
15379
15514
|
// src/components/Table/components/SelectToggle.tsx
|
|
15380
|
-
var
|
|
15515
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
15381
15516
|
function SelectToggle({ id, disabled }) {
|
|
15382
|
-
const { tableState } = (0,
|
|
15517
|
+
const { tableState } = (0, import_react71.useContext)(TableStateContext);
|
|
15383
15518
|
const state = useComputed(() => tableState.getSelected(id), [tableState]);
|
|
15384
15519
|
const selected = state === "checked" ? true : state === "unchecked" ? false : "indeterminate";
|
|
15385
|
-
return /* @__PURE__ */ (0,
|
|
15520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
15386
15521
|
Checkbox,
|
|
15387
15522
|
{
|
|
15388
15523
|
checkboxOnly: true,
|
|
@@ -15395,7 +15530,7 @@ function SelectToggle({ id, disabled }) {
|
|
|
15395
15530
|
}
|
|
15396
15531
|
|
|
15397
15532
|
// src/components/Table/utils/columns.tsx
|
|
15398
|
-
var
|
|
15533
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
15399
15534
|
function column(columnDef) {
|
|
15400
15535
|
return {
|
|
15401
15536
|
canHide: true,
|
|
@@ -15448,7 +15583,7 @@ function selectColumn(columnDef) {
|
|
|
15448
15583
|
return (data, {
|
|
15449
15584
|
row
|
|
15450
15585
|
}) => ({
|
|
15451
|
-
content: /* @__PURE__ */ (0,
|
|
15586
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(SelectToggle, { id: row.id, disabled: row.selectable === false })
|
|
15452
15587
|
});
|
|
15453
15588
|
});
|
|
15454
15589
|
}
|
|
@@ -15472,7 +15607,7 @@ function collapseColumn(columnDef) {
|
|
|
15472
15607
|
row,
|
|
15473
15608
|
level
|
|
15474
15609
|
}) => ({
|
|
15475
|
-
content: /* @__PURE__ */ (0,
|
|
15610
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(CollapseToggle, { row, compact: level > 0 })
|
|
15476
15611
|
});
|
|
15477
15612
|
});
|
|
15478
15613
|
}
|
|
@@ -15496,7 +15631,7 @@ function pinColumn(columnDef) {
|
|
|
15496
15631
|
return (data, {
|
|
15497
15632
|
row
|
|
15498
15633
|
}) => ({
|
|
15499
|
-
content: /* @__PURE__ */ (0,
|
|
15634
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(PinToggle, { rowId: row.id })
|
|
15500
15635
|
});
|
|
15501
15636
|
});
|
|
15502
15637
|
}
|
|
@@ -15754,10 +15889,10 @@ function dragHandleColumn(columnDef) {
|
|
|
15754
15889
|
onDragOver
|
|
15755
15890
|
} = dragData;
|
|
15756
15891
|
return {
|
|
15757
|
-
content: row.draggable ? /* @__PURE__ */ (0,
|
|
15892
|
+
content: row.draggable ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { draggable: row.draggable, onDragStart: (evt) => {
|
|
15758
15893
|
ref.current && evt.dataTransfer.setDragImage(ref.current, 0, 0);
|
|
15759
15894
|
return onDragStart?.(row, evt);
|
|
15760
|
-
}, onDragEnd: (evt) => onDragEnd?.(row, evt), onDrop: (evt) => onDrop?.(row, evt), onDragEnter: (evt) => onDragEnter?.(row, evt), onDragOver: (evt) => onDragOver?.(row, evt), className: "mta mba mra mla cursorPointer", children: /* @__PURE__ */ (0,
|
|
15895
|
+
}, onDragEnd: (evt) => onDragEnd?.(row, evt), onDrop: (evt) => onDrop?.(row, evt), onDragEnter: (evt) => onDragEnter?.(row, evt), onDragOver: (evt) => onDragOver?.(row, evt), className: "mta mba mra mla cursorPointer", children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Icon, { icon: "drag" }) }) : void 0
|
|
15761
15896
|
};
|
|
15762
15897
|
};
|
|
15763
15898
|
});
|
|
@@ -15821,7 +15956,7 @@ function shouldSkipScrollTo(index, virtuosoRangeRef) {
|
|
|
15821
15956
|
|
|
15822
15957
|
// src/components/Table/GridTableApi.ts
|
|
15823
15958
|
function useGridTableApi() {
|
|
15824
|
-
return (0,
|
|
15959
|
+
return (0, import_react72.useMemo)(() => new GridTableApiImpl(), []);
|
|
15825
15960
|
}
|
|
15826
15961
|
var GridTableApiImpl = class {
|
|
15827
15962
|
// This is public to GridTable but not exported outside of Beam
|
|
@@ -15994,10 +16129,10 @@ function maybeApply(maybeFn) {
|
|
|
15994
16129
|
}
|
|
15995
16130
|
|
|
15996
16131
|
// src/components/Table/hooks/useColumnResizeHandlers.ts
|
|
15997
|
-
var
|
|
16132
|
+
var import_react73 = require("react");
|
|
15998
16133
|
function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWidth, setResizedWidths) {
|
|
15999
|
-
const hasLockedColumnsRef = (0,
|
|
16000
|
-
const distributeAdjustment = (0,
|
|
16134
|
+
const hasLockedColumnsRef = (0, import_react73.useRef)(false);
|
|
16135
|
+
const distributeAdjustment = (0, import_react73.useCallback)(
|
|
16001
16136
|
(rightColumns, totalRightWidth, adjustment) => {
|
|
16002
16137
|
const updates = {};
|
|
16003
16138
|
let remainingAdjustment = adjustment;
|
|
@@ -16012,7 +16147,7 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
16012
16147
|
},
|
|
16013
16148
|
[]
|
|
16014
16149
|
);
|
|
16015
|
-
const calculateResizeUpdates = (0,
|
|
16150
|
+
const calculateResizeUpdates = (0, import_react73.useCallback)(
|
|
16016
16151
|
(columnId, newWidth, columnIndex) => {
|
|
16017
16152
|
if (!tableWidth || !columnSizes || columnSizes.length === 0) {
|
|
16018
16153
|
return null;
|
|
@@ -16058,7 +16193,7 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
16058
16193
|
},
|
|
16059
16194
|
[tableWidth, columnSizes, columns, distributeAdjustment]
|
|
16060
16195
|
);
|
|
16061
|
-
const calculatePreviewWidth = (0,
|
|
16196
|
+
const calculatePreviewWidth = (0, import_react73.useCallback)(
|
|
16062
16197
|
(columnId, newWidth, columnIndex) => {
|
|
16063
16198
|
const result = calculateResizeUpdates(columnId, newWidth, columnIndex);
|
|
16064
16199
|
if (!result) {
|
|
@@ -16068,7 +16203,7 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
16068
16203
|
},
|
|
16069
16204
|
[calculateResizeUpdates]
|
|
16070
16205
|
);
|
|
16071
|
-
const handleColumnResize = (0,
|
|
16206
|
+
const handleColumnResize = (0, import_react73.useCallback)(
|
|
16072
16207
|
(columnId, newWidth, columnIndex) => {
|
|
16073
16208
|
const result = calculateResizeUpdates(columnId, newWidth, columnIndex);
|
|
16074
16209
|
if (!result) {
|
|
@@ -16105,10 +16240,10 @@ function useColumnResizeHandlers(columns, columnSizes, tableWidth, setResizedWid
|
|
|
16105
16240
|
}
|
|
16106
16241
|
|
|
16107
16242
|
// src/components/Table/hooks/useScrollStorage.ts
|
|
16108
|
-
var
|
|
16243
|
+
var import_react74 = require("react");
|
|
16109
16244
|
function useScrollStorage(tableId, enabled = true) {
|
|
16110
16245
|
const storageKey = `scrollPosition_${window.location.pathname}${window.location.search}_${tableId}`;
|
|
16111
|
-
return (0,
|
|
16246
|
+
return (0, import_react74.useMemo)(
|
|
16112
16247
|
() => ({
|
|
16113
16248
|
getScrollIndex: () => {
|
|
16114
16249
|
if (!enabled) return void 0;
|
|
@@ -16124,14 +16259,14 @@ function useScrollStorage(tableId, enabled = true) {
|
|
|
16124
16259
|
}
|
|
16125
16260
|
|
|
16126
16261
|
// src/components/Table/hooks/useSetupColumnSizes.ts
|
|
16127
|
-
var
|
|
16128
|
-
var
|
|
16262
|
+
var import_utils69 = require("@react-aria/utils");
|
|
16263
|
+
var import_react76 = require("react");
|
|
16129
16264
|
|
|
16130
16265
|
// src/components/Table/hooks/useColumnResizing.ts
|
|
16131
|
-
var
|
|
16266
|
+
var import_react75 = require("react");
|
|
16132
16267
|
var import_use_debounce4 = require("use-debounce");
|
|
16133
16268
|
function useColumnResizing(storageKey) {
|
|
16134
|
-
const [resizedWidths, setResizedWidths] = (0,
|
|
16269
|
+
const [resizedWidths, setResizedWidths] = (0, import_react75.useState)(() => {
|
|
16135
16270
|
if (!storageKey) return {};
|
|
16136
16271
|
try {
|
|
16137
16272
|
const stored = sessionStorage.getItem(`columnWidths_${storageKey}`);
|
|
@@ -16148,16 +16283,16 @@ function useColumnResizing(storageKey) {
|
|
|
16148
16283
|
} catch {
|
|
16149
16284
|
}
|
|
16150
16285
|
}, 500);
|
|
16151
|
-
(0,
|
|
16286
|
+
(0, import_react75.useEffect)(() => {
|
|
16152
16287
|
persistToStorage(resizedWidths);
|
|
16153
16288
|
}, [resizedWidths, persistToStorage]);
|
|
16154
|
-
const setResizedWidth = (0,
|
|
16289
|
+
const setResizedWidth = (0, import_react75.useCallback)((columnId, width2) => {
|
|
16155
16290
|
setResizedWidths((prev) => ({
|
|
16156
16291
|
...prev,
|
|
16157
16292
|
[columnId]: width2
|
|
16158
16293
|
}));
|
|
16159
16294
|
}, []);
|
|
16160
|
-
const batchSetResizedWidths = (0,
|
|
16295
|
+
const batchSetResizedWidths = (0, import_react75.useCallback)((widths2) => {
|
|
16161
16296
|
if (typeof widths2 === "function") {
|
|
16162
16297
|
setResizedWidths(widths2);
|
|
16163
16298
|
} else {
|
|
@@ -16167,7 +16302,7 @@ function useColumnResizing(storageKey) {
|
|
|
16167
16302
|
}));
|
|
16168
16303
|
}
|
|
16169
16304
|
}, []);
|
|
16170
|
-
const resetColumnWidths = (0,
|
|
16305
|
+
const resetColumnWidths = (0, import_react75.useCallback)(() => {
|
|
16171
16306
|
setResizedWidths({});
|
|
16172
16307
|
}, []);
|
|
16173
16308
|
return {
|
|
@@ -16184,14 +16319,14 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
16184
16319
|
const { resizedWidths, setResizedWidth, setResizedWidths, resetColumnWidths } = useColumnResizing(
|
|
16185
16320
|
disableColumnResizing ? void 0 : visibleColumnsStorageKey
|
|
16186
16321
|
);
|
|
16187
|
-
const calculateImmediately = (0,
|
|
16188
|
-
const [tableWidth, setTableWidth] = (0,
|
|
16189
|
-
const [contentWidth, setContentWidth] = (0,
|
|
16190
|
-
const [columnSizes, setColumnSizes] = (0,
|
|
16322
|
+
const calculateImmediately = (0, import_react76.useRef)(true);
|
|
16323
|
+
const [tableWidth, setTableWidth] = (0, import_react76.useState)();
|
|
16324
|
+
const [contentWidth, setContentWidth] = (0, import_react76.useState)();
|
|
16325
|
+
const [columnSizes, setColumnSizes] = (0, import_react76.useState)(
|
|
16191
16326
|
() => calcColumnLayout(columns, void 0, style.minWidthPx, expandedColumnIds, resizedWidths, inDocumentScrollLayout).columnSizes
|
|
16192
16327
|
);
|
|
16193
|
-
const prevTableWidthRef = (0,
|
|
16194
|
-
const applyColumnLayout = (0,
|
|
16328
|
+
const prevTableWidthRef = (0, import_react76.useRef)(tableWidth);
|
|
16329
|
+
const applyColumnLayout = (0, import_react76.useCallback)(
|
|
16195
16330
|
(probeWidth) => {
|
|
16196
16331
|
const layout = calcColumnLayout(
|
|
16197
16332
|
columns,
|
|
@@ -16207,7 +16342,7 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
16207
16342
|
},
|
|
16208
16343
|
[columns, style.minWidthPx, expandedColumnIds, resizedWidths, inDocumentScrollLayout]
|
|
16209
16344
|
);
|
|
16210
|
-
(0,
|
|
16345
|
+
(0, import_react76.useEffect)(() => {
|
|
16211
16346
|
if (!prevTableWidthRef.current) {
|
|
16212
16347
|
prevTableWidthRef.current = tableWidth;
|
|
16213
16348
|
return;
|
|
@@ -16230,7 +16365,7 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
16230
16365
|
prevTableWidthRef.current = tableWidth;
|
|
16231
16366
|
}
|
|
16232
16367
|
}, [tableWidth, setResizedWidths]);
|
|
16233
|
-
(0,
|
|
16368
|
+
(0, import_react76.useEffect)(
|
|
16234
16369
|
() => {
|
|
16235
16370
|
if (!calculateImmediately.current) {
|
|
16236
16371
|
const width2 = resizeRef.current?.clientWidth;
|
|
@@ -16242,7 +16377,7 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
16242
16377
|
[columns, resizedWidths, applyColumnLayout]
|
|
16243
16378
|
);
|
|
16244
16379
|
const applyColumnLayoutDebounced = (0, import_use_debounce5.useDebouncedCallback)(applyColumnLayout, 100);
|
|
16245
|
-
const onResize = (0,
|
|
16380
|
+
const onResize = (0, import_react76.useCallback)(
|
|
16246
16381
|
() => {
|
|
16247
16382
|
const target = resizeRef.current;
|
|
16248
16383
|
if (target && target.clientWidth !== tableWidth) {
|
|
@@ -16258,7 +16393,7 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
16258
16393
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16259
16394
|
[tableWidth, applyColumnLayout, applyColumnLayoutDebounced]
|
|
16260
16395
|
);
|
|
16261
|
-
(0,
|
|
16396
|
+
(0, import_utils69.useResizeObserver)({ ref: resizeRef, onResize });
|
|
16262
16397
|
return {
|
|
16263
16398
|
columnSizes,
|
|
16264
16399
|
tableWidth,
|
|
@@ -16271,10 +16406,10 @@ function useSetupColumnSizes(style, columns, resizeRef, expandedColumnIds, visib
|
|
|
16271
16406
|
}
|
|
16272
16407
|
|
|
16273
16408
|
// src/hooks/useRenderCount.ts
|
|
16274
|
-
var
|
|
16409
|
+
var import_react77 = require("react");
|
|
16275
16410
|
function useRenderCount() {
|
|
16276
|
-
const ref = (0,
|
|
16277
|
-
const getCount = (0,
|
|
16411
|
+
const ref = (0, import_react77.useRef)(/* @__PURE__ */ new Map());
|
|
16412
|
+
const getCount = (0, import_react77.useCallback)((id) => {
|
|
16278
16413
|
const count = ref.current.get(id) || 1;
|
|
16279
16414
|
ref.current.set(id, count + 1);
|
|
16280
16415
|
return { "data-render": count };
|
|
@@ -16283,39 +16418,39 @@ function useRenderCount() {
|
|
|
16283
16418
|
}
|
|
16284
16419
|
|
|
16285
16420
|
// src/layouts/DocumentScrollLayoutContext.tsx
|
|
16286
|
-
var
|
|
16287
|
-
var
|
|
16288
|
-
var
|
|
16421
|
+
var import_utils70 = require("@react-aria/utils");
|
|
16422
|
+
var import_react79 = require("react");
|
|
16423
|
+
var import_runtime54 = require("@homebound/truss/runtime");
|
|
16289
16424
|
|
|
16290
16425
|
// src/layouts/DocumentScrollToTopButton.tsx
|
|
16291
|
-
var
|
|
16292
|
-
var
|
|
16293
|
-
var
|
|
16426
|
+
var import_react78 = require("react");
|
|
16427
|
+
var import_runtime53 = require("@homebound/truss/runtime");
|
|
16428
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
16294
16429
|
function DocumentScrollToTopButton({
|
|
16295
16430
|
viewportHeight
|
|
16296
16431
|
}) {
|
|
16297
|
-
const [visible, setVisible] = (0,
|
|
16432
|
+
const [visible, setVisible] = (0, import_react78.useState)(false);
|
|
16298
16433
|
const tid = useTestIds({}, "documentScrollToTop");
|
|
16299
16434
|
const scrollToTopOffsetPx = 20;
|
|
16300
|
-
const syncVisibility = (0,
|
|
16435
|
+
const syncVisibility = (0, import_react78.useCallback)(() => {
|
|
16301
16436
|
if (viewportHeight <= 0) return;
|
|
16302
16437
|
setVisible(window.scrollY > viewportHeight);
|
|
16303
16438
|
}, [viewportHeight]);
|
|
16304
|
-
(0,
|
|
16439
|
+
(0, import_react78.useEffect)(() => {
|
|
16305
16440
|
syncVisibility();
|
|
16306
16441
|
window.addEventListener("scroll", syncVisibility, {
|
|
16307
16442
|
passive: true
|
|
16308
16443
|
});
|
|
16309
16444
|
return () => window.removeEventListener("scroll", syncVisibility);
|
|
16310
16445
|
}, [syncVisibility]);
|
|
16311
|
-
const scrollToTop = (0,
|
|
16446
|
+
const scrollToTop = (0, import_react78.useCallback)(() => {
|
|
16312
16447
|
window.scrollTo({
|
|
16313
16448
|
top: 0
|
|
16314
16449
|
});
|
|
16315
16450
|
}, []);
|
|
16316
|
-
return /* @__PURE__ */ (0,
|
|
16451
|
+
return /* @__PURE__ */ (0, import_jsx_runtime84.jsx)("div", { ...tid.wrapper, "aria-hidden": !visible, ...!visible ? {
|
|
16317
16452
|
inert: ""
|
|
16318
|
-
} : {}, ...(0,
|
|
16453
|
+
} : {}, ...(0, import_runtime53.trussProps)({
|
|
16319
16454
|
...{
|
|
16320
16455
|
position: "fixed",
|
|
16321
16456
|
bottom: ["bottom_var", {
|
|
@@ -16325,7 +16460,7 @@ function DocumentScrollToTopButton({
|
|
|
16325
16460
|
"--right": `${scrollToTopOffsetPx}px`
|
|
16326
16461
|
}],
|
|
16327
16462
|
zIndex: ["z_var", {
|
|
16328
|
-
"--zIndex": (0,
|
|
16463
|
+
"--zIndex": (0, import_runtime53.maybeCssVar)(zIndices.scrollToTop)
|
|
16329
16464
|
}],
|
|
16330
16465
|
display: "df",
|
|
16331
16466
|
justifyContent: "jcfe",
|
|
@@ -16335,35 +16470,35 @@ function DocumentScrollToTopButton({
|
|
|
16335
16470
|
transform: "transform_translateY_0"
|
|
16336
16471
|
} : {
|
|
16337
16472
|
transform: ["transform_var", {
|
|
16338
|
-
"--transform": (0,
|
|
16473
|
+
"--transform": (0, import_runtime53.maybeCssVar)(`translateY(calc(100% + ${scrollToTopOffsetPx}px))`)
|
|
16339
16474
|
}],
|
|
16340
16475
|
pointerEvents: "pointerEvents_none"
|
|
16341
16476
|
}
|
|
16342
|
-
}), children: /* @__PURE__ */ (0,
|
|
16477
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(ContrastScope, { children: /* @__PURE__ */ (0, import_jsx_runtime84.jsx)(IconButton, { icon: "arrowUp", disabled: !visible, variant: "outline", label: "Scroll to top", onClick: scrollToTop, ...tid }) }) });
|
|
16343
16478
|
}
|
|
16344
16479
|
|
|
16345
16480
|
// src/layouts/DocumentScrollLayoutContext.tsx
|
|
16346
|
-
var
|
|
16347
|
-
var DocumentScrollLayoutContext = (0,
|
|
16481
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
16482
|
+
var DocumentScrollLayoutContext = (0, import_react79.createContext)(false);
|
|
16348
16483
|
function DocumentScrollLayoutProvider({
|
|
16349
16484
|
children
|
|
16350
16485
|
}) {
|
|
16351
|
-
const inDocumentScrollLayout = (0,
|
|
16352
|
-
if (inDocumentScrollLayout) return /* @__PURE__ */ (0,
|
|
16353
|
-
return /* @__PURE__ */ (0,
|
|
16486
|
+
const inDocumentScrollLayout = (0, import_react79.useContext)(DocumentScrollLayoutContext);
|
|
16487
|
+
if (inDocumentScrollLayout) return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_jsx_runtime85.Fragment, { children });
|
|
16488
|
+
return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DocumentScrollLayoutContext.Provider, { value: true, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DocumentScrollLayoutViewportRoot, { children }) });
|
|
16354
16489
|
}
|
|
16355
16490
|
function useDocumentScrollLayout() {
|
|
16356
|
-
return (0,
|
|
16491
|
+
return (0, import_react79.useContext)(DocumentScrollLayoutContext);
|
|
16357
16492
|
}
|
|
16358
16493
|
function DocumentScrollLayoutViewportRoot({
|
|
16359
16494
|
children
|
|
16360
16495
|
}) {
|
|
16361
|
-
const docElementRef = (0,
|
|
16362
|
-
const [viewportSize, setViewportSize] = (0,
|
|
16496
|
+
const docElementRef = (0, import_react79.useRef)(typeof document !== "undefined" ? document.documentElement : null);
|
|
16497
|
+
const [viewportSize, setViewportSize] = (0, import_react79.useState)({
|
|
16363
16498
|
width: 0,
|
|
16364
16499
|
height: 0
|
|
16365
16500
|
});
|
|
16366
|
-
const syncViewportSize = (0,
|
|
16501
|
+
const syncViewportSize = (0, import_react79.useCallback)(() => {
|
|
16367
16502
|
const el = docElementRef.current;
|
|
16368
16503
|
if (!el) return;
|
|
16369
16504
|
const width2 = el.clientWidth;
|
|
@@ -16373,11 +16508,11 @@ function DocumentScrollLayoutViewportRoot({
|
|
|
16373
16508
|
height
|
|
16374
16509
|
});
|
|
16375
16510
|
}, []);
|
|
16376
|
-
(0,
|
|
16511
|
+
(0, import_utils70.useResizeObserver)({
|
|
16377
16512
|
ref: docElementRef,
|
|
16378
16513
|
onResize: syncViewportSize
|
|
16379
16514
|
});
|
|
16380
|
-
(0,
|
|
16515
|
+
(0, import_react79.useLayoutEffect)(() => {
|
|
16381
16516
|
syncViewportSize();
|
|
16382
16517
|
}, [syncViewportSize]);
|
|
16383
16518
|
const style = {};
|
|
@@ -16389,20 +16524,20 @@ function DocumentScrollLayoutViewportRoot({
|
|
|
16389
16524
|
}
|
|
16390
16525
|
return (
|
|
16391
16526
|
// `display: contents` keeps vars inheritable without adding a layout box.
|
|
16392
|
-
/* @__PURE__ */ (0,
|
|
16527
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { ...(0, import_runtime54.mergeProps)(void 0, Object.keys(style).length > 0 ? style : void 0, {
|
|
16393
16528
|
display: "display_contents"
|
|
16394
16529
|
}), children: [
|
|
16395
16530
|
children,
|
|
16396
|
-
/* @__PURE__ */ (0,
|
|
16531
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(DocumentScrollToTopButton, { viewportHeight: viewportSize.height })
|
|
16397
16532
|
] })
|
|
16398
16533
|
);
|
|
16399
16534
|
}
|
|
16400
16535
|
|
|
16401
16536
|
// src/components/Table/components/TableCard.tsx
|
|
16402
|
-
var
|
|
16537
|
+
var import_react80 = require("react");
|
|
16403
16538
|
var import_react_router_dom4 = require("react-router-dom");
|
|
16404
|
-
var
|
|
16405
|
-
var
|
|
16539
|
+
var import_runtime55 = require("@homebound/truss/runtime");
|
|
16540
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
16406
16541
|
var __maybeInc10 = (inc) => {
|
|
16407
16542
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
16408
16543
|
};
|
|
@@ -16450,16 +16585,16 @@ function TableCard(props) {
|
|
|
16450
16585
|
}
|
|
16451
16586
|
}
|
|
16452
16587
|
if (!title) return null;
|
|
16453
|
-
const card = /* @__PURE__ */ (0,
|
|
16588
|
+
const card = /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(TableCardView, { ...tid, imgSrc: rs.row.imgSrc ?? "", title, eyebrow, badge, status, data: dataBlocks, progress });
|
|
16454
16589
|
const to = rowStyle?.rowLink?.(rs.row);
|
|
16455
16590
|
if (to) {
|
|
16456
|
-
return /* @__PURE__ */ (0,
|
|
16591
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_react_router_dom4.Link, { to, ...(0, import_runtime55.mergeProps)(navLink, void 0, {
|
|
16457
16592
|
textDecoration: "tdn",
|
|
16458
16593
|
color: "color_unset"
|
|
16459
16594
|
}), children: card });
|
|
16460
16595
|
}
|
|
16461
16596
|
if (rowStyle?.onClick) {
|
|
16462
|
-
return /* @__PURE__ */ (0,
|
|
16597
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("button", { onClick: () => rowStyle.onClick(rs.row, api), className: "cursorPointer", children: card });
|
|
16463
16598
|
}
|
|
16464
16599
|
return card;
|
|
16465
16600
|
}
|
|
@@ -16474,8 +16609,8 @@ function TableCardView(props) {
|
|
|
16474
16609
|
progress
|
|
16475
16610
|
} = props;
|
|
16476
16611
|
const tid = useTestIds(props, "tableCardView");
|
|
16477
|
-
const progressValue = (0,
|
|
16478
|
-
return /* @__PURE__ */ (0,
|
|
16612
|
+
const progressValue = (0, import_react80.useMemo)(() => progress !== void 0 ? clampProgress(progress) : 0, [progress]);
|
|
16613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { ...(0, import_runtime55.trussProps)({
|
|
16479
16614
|
paddingTop: "pt3",
|
|
16480
16615
|
paddingBottom: "pb3",
|
|
16481
16616
|
paddingRight: "pr3",
|
|
@@ -16490,44 +16625,44 @@ function TableCardView(props) {
|
|
|
16490
16625
|
flexDirection: "fdc",
|
|
16491
16626
|
gap: "gap2"
|
|
16492
16627
|
}), ...tid, children: [
|
|
16493
|
-
/* @__PURE__ */ (0,
|
|
16494
|
-
/* @__PURE__ */ (0,
|
|
16495
|
-
status && /* @__PURE__ */ (0,
|
|
16628
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "relative", children: [
|
|
16629
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("img", { className: "h_184px w100 objectFit_cover", src: imgSrc, alt: title, ...tid.image }),
|
|
16630
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "absolute top1 left1", ...tid.status, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Tag, { ...status }) })
|
|
16496
16631
|
] }),
|
|
16497
|
-
/* @__PURE__ */ (0,
|
|
16498
|
-
/* @__PURE__ */ (0,
|
|
16499
|
-
eyebrow && /* @__PURE__ */ (0,
|
|
16500
|
-
title && /* @__PURE__ */ (0,
|
|
16501
|
-
/* @__PURE__ */ (0,
|
|
16632
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "df fdc gap2", children: [
|
|
16633
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { children: [
|
|
16634
|
+
eyebrow && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("p", { className: "fw4 fz_14px lh_20px", ...tid.eyebrow, children: eyebrow }),
|
|
16635
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "dif w100 jcsb aic", children: [
|
|
16636
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("h4", { className: "fwb fz_20px lh_28px", ...tid.title, children: [
|
|
16502
16637
|
title,
|
|
16503
16638
|
" "
|
|
16504
16639
|
] }),
|
|
16505
|
-
badge && /* @__PURE__ */ (0,
|
|
16640
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "fw4 fz_14px lh_20px wsnw", ...tid.badge, children: badge })
|
|
16506
16641
|
] })
|
|
16507
16642
|
] }),
|
|
16508
|
-
data && data?.length > 0 && /* @__PURE__ */ (0,
|
|
16643
|
+
data && data?.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("dl", { className: "dg gtc_repeat_2_minmax_0_1fr fw4 fz_14px lh_20px", children: data.map((d, idx) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { ...(0, import_runtime55.trussProps)({
|
|
16509
16644
|
display: "df",
|
|
16510
16645
|
gap: "gap_4px",
|
|
16511
16646
|
gridColumn: ["gc_var", {
|
|
16512
|
-
"--gridColumn": (0,
|
|
16647
|
+
"--gridColumn": (0, import_runtime55.maybeCssVar)(idx % 2 + 1)
|
|
16513
16648
|
}]
|
|
16514
16649
|
}), ...tid[defaultTestId(d.label)], children: [
|
|
16515
|
-
/* @__PURE__ */ (0,
|
|
16650
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("dt", { children: [
|
|
16516
16651
|
d.label,
|
|
16517
16652
|
":"
|
|
16518
16653
|
] }),
|
|
16519
|
-
/* @__PURE__ */ (0,
|
|
16654
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("dd", { children: d.value })
|
|
16520
16655
|
] }, d.label)) }),
|
|
16521
|
-
progress !== void 0 && /* @__PURE__ */ (0,
|
|
16522
|
-
/* @__PURE__ */ (0,
|
|
16656
|
+
progress !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "df fdc gap1", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "df aic gap1 fs_10px lh_14px", children: [
|
|
16657
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "w25 h_8px br4 bgGray200", children: /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { ...(0, import_runtime55.trussProps)({
|
|
16523
16658
|
height: "h100",
|
|
16524
16659
|
borderRadius: "br4",
|
|
16525
16660
|
backgroundColor: "bgBlue500",
|
|
16526
16661
|
width: ["w_var", {
|
|
16527
|
-
"--width": (0,
|
|
16662
|
+
"--width": (0, import_runtime55.maybeCssVar)(__maybeInc10(`${progressValue}%`))
|
|
16528
16663
|
}]
|
|
16529
16664
|
}) }) }),
|
|
16530
|
-
/* @__PURE__ */ (0,
|
|
16665
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { ...tid.progressValue, children: [
|
|
16531
16666
|
progressValue,
|
|
16532
16667
|
"%"
|
|
16533
16668
|
] })
|
|
@@ -16543,9 +16678,9 @@ function clampProgress(value) {
|
|
|
16543
16678
|
}
|
|
16544
16679
|
|
|
16545
16680
|
// src/components/Table/GridTable.tsx
|
|
16546
|
-
var
|
|
16547
|
-
var
|
|
16548
|
-
var
|
|
16681
|
+
var import_runtime56 = require("@homebound/truss/runtime");
|
|
16682
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
16683
|
+
var import_react82 = require("react");
|
|
16549
16684
|
var __maybeInc11 = (inc) => {
|
|
16550
16685
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
16551
16686
|
};
|
|
@@ -16595,15 +16730,15 @@ function GridTable(props) {
|
|
|
16595
16730
|
columnGutter = false
|
|
16596
16731
|
} = props;
|
|
16597
16732
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
16598
|
-
const columnsWithIds = (0,
|
|
16733
|
+
const columnsWithIds = (0, import_react81.useMemo)(() => {
|
|
16599
16734
|
const columns2 = columnGutter && inDocumentScrollLayout ? withColumnGutters(_columns) : _columns;
|
|
16600
16735
|
return assignDefaultColumnIds(columns2);
|
|
16601
16736
|
}, [_columns, columnGutter, inDocumentScrollLayout]);
|
|
16602
|
-
const virtuosoRef = (0,
|
|
16603
|
-
const virtuosoRangeRef = (0,
|
|
16604
|
-
const resizeRef = (0,
|
|
16605
|
-
const tableContainerRef = (0,
|
|
16606
|
-
const api = (0,
|
|
16737
|
+
const virtuosoRef = (0, import_react81.useRef)(null);
|
|
16738
|
+
const virtuosoRangeRef = (0, import_react81.useRef)(null);
|
|
16739
|
+
const resizeRef = (0, import_react81.useRef)(null);
|
|
16740
|
+
const tableContainerRef = (0, import_react81.useRef)(null);
|
|
16741
|
+
const api = (0, import_react81.useMemo)(
|
|
16607
16742
|
() => {
|
|
16608
16743
|
const api2 = props.api ?? new GridTableApiImpl();
|
|
16609
16744
|
api2.init(persistCollapse, virtuosoRef, virtuosoRangeRef);
|
|
@@ -16616,8 +16751,8 @@ function GridTable(props) {
|
|
|
16616
16751
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
16617
16752
|
[props.api]
|
|
16618
16753
|
);
|
|
16619
|
-
const [draggedRow, _setDraggedRow] = (0,
|
|
16620
|
-
const draggedRowRef = (0,
|
|
16754
|
+
const [draggedRow, _setDraggedRow] = (0, import_react81.useState)(void 0);
|
|
16755
|
+
const draggedRowRef = (0, import_react81.useRef)(draggedRow);
|
|
16621
16756
|
const setDraggedRow = (row) => {
|
|
16622
16757
|
draggedRowRef.current = row;
|
|
16623
16758
|
_setDraggedRow(row);
|
|
@@ -16627,7 +16762,7 @@ function GridTable(props) {
|
|
|
16627
16762
|
tableState
|
|
16628
16763
|
} = api;
|
|
16629
16764
|
tableState.onRowSelect = onRowSelect;
|
|
16630
|
-
(0,
|
|
16765
|
+
(0, import_react81.useEffect)(() => {
|
|
16631
16766
|
(0, import_mobx10.runInAction)(() => {
|
|
16632
16767
|
tableState.setRows(rows);
|
|
16633
16768
|
tableState.setColumns(columnsWithIds, visibleColumnsStorageKey);
|
|
@@ -16654,7 +16789,7 @@ function GridTable(props) {
|
|
|
16654
16789
|
setResizedWidths,
|
|
16655
16790
|
resetColumnWidths
|
|
16656
16791
|
} = useSetupColumnSizes(style, columns, resizeTarget ?? resizeRef, expandedColumnIds, visibleColumnsStorageKey, disableColumnResizing, inDocumentScrollLayout);
|
|
16657
|
-
(0,
|
|
16792
|
+
(0, import_react81.useEffect)(() => {
|
|
16658
16793
|
api.resetColumnWidthsFn = !disableColumnResizing ? resetColumnWidths : void 0;
|
|
16659
16794
|
}, [api, resetColumnWidths, disableColumnResizing]);
|
|
16660
16795
|
const {
|
|
@@ -16735,7 +16870,7 @@ function GridTable(props) {
|
|
|
16735
16870
|
};
|
|
16736
16871
|
const [tableHeadRows, visibleDataRows, keptSelectedRows, pinnedRows, tooManyClientSideRows] = useComputed(() => {
|
|
16737
16872
|
if (as === "card") {
|
|
16738
|
-
const cardElements = tableState.visibleRows.filter((rs) => ![HEADER, EXPANDABLE_HEADER, TOTALS, KEPT_GROUP].includes(rs.kind)).map((rs) => /* @__PURE__ */ (0,
|
|
16873
|
+
const cardElements = tableState.visibleRows.filter((rs) => ![HEADER, EXPANDABLE_HEADER, TOTALS, KEPT_GROUP].includes(rs.kind)).map((rs) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TableCard, { rs, columns, rowStyle: rowStyles?.[rs.row.kind], api: tableState.api }, rs.key));
|
|
16739
16874
|
return [[], cardElements, [], [], false];
|
|
16740
16875
|
}
|
|
16741
16876
|
const headerRows = [];
|
|
@@ -16747,7 +16882,7 @@ function GridTable(props) {
|
|
|
16747
16882
|
const pinnedIds = new Set(pinnedRowStates.map((rs) => rs.row.id));
|
|
16748
16883
|
const visibleRows = tableState.visibleRows.filter((rs) => !pinnedIds.has(rs.row.id));
|
|
16749
16884
|
const hasExpandableHeader = visibleRows.some((rs) => rs.row.id === EXPANDABLE_HEADER);
|
|
16750
|
-
const makeRow = (rs, isFirstHeadRow, isFirstBodyRow, isLastBodyRow) => /* @__PURE__ */ (0,
|
|
16885
|
+
const makeRow = (rs, isFirstHeadRow, isFirstBodyRow, isLastBodyRow) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Row, { onDragStart, onDragOver, onDragEnd, onDrop, onDragEnter, ...{
|
|
16751
16886
|
as,
|
|
16752
16887
|
rs,
|
|
16753
16888
|
style,
|
|
@@ -16809,7 +16944,7 @@ function GridTable(props) {
|
|
|
16809
16944
|
const borderless = style?.presentationSettings?.borderless;
|
|
16810
16945
|
const typeScale = style?.presentationSettings?.typeScale;
|
|
16811
16946
|
const borderOnHover = style?.presentationSettings?.borderOnHover;
|
|
16812
|
-
const fieldProps = (0,
|
|
16947
|
+
const fieldProps = (0, import_react81.useMemo)(() => ({
|
|
16813
16948
|
labelStyle: "hidden",
|
|
16814
16949
|
numberAlignment: "right",
|
|
16815
16950
|
compact: true,
|
|
@@ -16826,11 +16961,11 @@ function GridTable(props) {
|
|
|
16826
16961
|
} : {}
|
|
16827
16962
|
}), [borderOnHover, borderless, typeScale]);
|
|
16828
16963
|
const _as = as === "virtual" && runningInJest ? "div" : as;
|
|
16829
|
-
const rowStateContext = (0,
|
|
16964
|
+
const rowStateContext = (0, import_react81.useMemo)(() => ({
|
|
16830
16965
|
tableState,
|
|
16831
16966
|
tableContainerRef
|
|
16832
16967
|
}), [tableState, tableContainerRef]);
|
|
16833
|
-
const tableStyle = (0,
|
|
16968
|
+
const tableStyle = (0, import_react81.useMemo)(() => {
|
|
16834
16969
|
if (!inDocumentScrollLayout || contentWidth === void 0 || tableWidth === void 0) return style;
|
|
16835
16970
|
const minWidthPx = Math.max(style.minWidthPx ?? 0, contentWidth);
|
|
16836
16971
|
if (minWidthPx === style.minWidthPx) return style;
|
|
@@ -16839,9 +16974,9 @@ function GridTable(props) {
|
|
|
16839
16974
|
minWidthPx
|
|
16840
16975
|
};
|
|
16841
16976
|
}, [contentWidth, inDocumentScrollLayout, style, tableWidth]);
|
|
16842
|
-
return /* @__PURE__ */ (0,
|
|
16843
|
-
/* @__PURE__ */ (0,
|
|
16844
|
-
as === "card" ? /* @__PURE__ */ (0,
|
|
16977
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(TableStateContext.Provider, { value: rowStateContext, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(PresentationProvider, { fieldProps, wrap: style?.presentationSettings?.wrap, children: [
|
|
16978
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ref: resizeRef, ...(0, import_runtime56.trussProps)(getTableRefWidthStyles(as === "virtual", inDocumentScrollLayout)) }),
|
|
16979
|
+
as === "card" ? /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(CardView, { cardRows: visibleDataRows, id, virtuosoRangeRef, infiniteScroll, persistScrollPosition }) : renders[_as](tableStyle, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, tableContainerRef, persistScrollPosition)
|
|
16845
16980
|
] }) });
|
|
16846
16981
|
}
|
|
16847
16982
|
var renders = {
|
|
@@ -16850,7 +16985,7 @@ var renders = {
|
|
|
16850
16985
|
virtual: renderVirtual
|
|
16851
16986
|
};
|
|
16852
16987
|
function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, _virtuosoRef, _virtuosoRangeRef, tableHeadRows, stickyOffset, _infiniteScroll, tableContainerRef, _persistScrollPosition) {
|
|
16853
|
-
return /* @__PURE__ */ (0,
|
|
16988
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { ref: tableContainerRef, ...(0, import_runtime56.trussProps)({
|
|
16854
16989
|
// Use `fit-content` to ensure the width of the table takes up the full width of its content.
|
|
16855
16990
|
// Otherwise, the table's width would be that of its container, which may not be as wide as the table itself.
|
|
16856
16991
|
// In cases where we have sticky columns on a very wide table, then the container which the columns "stick" to (which is the table),
|
|
@@ -16866,24 +17001,24 @@ function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, pinned
|
|
|
16866
17001
|
} : {},
|
|
16867
17002
|
...xss
|
|
16868
17003
|
}), "data-testid": id, children: [
|
|
16869
|
-
/* @__PURE__ */ (0,
|
|
17004
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { ...(0, import_runtime56.trussProps)({
|
|
16870
17005
|
...stickyHeader || pinnedRows.length > 0 ? {
|
|
16871
17006
|
position: "sticky",
|
|
16872
17007
|
transition: "transitionTop",
|
|
16873
17008
|
top: ["top_var", {
|
|
16874
|
-
"--top": (0,
|
|
17009
|
+
"--top": (0, import_runtime56.maybeCssVar)(__maybeInc11(stickyTableHeaderOffset(stickyOffset)))
|
|
16875
17010
|
}],
|
|
16876
17011
|
zIndex: ["z_var", {
|
|
16877
|
-
"--zIndex": (0,
|
|
17012
|
+
"--zIndex": (0, import_runtime56.maybeCssVar)(zIndices.tableStickyHeader)
|
|
16878
17013
|
}]
|
|
16879
17014
|
} : {}
|
|
16880
17015
|
}), children: [
|
|
16881
17016
|
tableHeadRows,
|
|
16882
17017
|
pinnedRows
|
|
16883
17018
|
] }),
|
|
16884
|
-
/* @__PURE__ */ (0,
|
|
17019
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { children: [
|
|
16885
17020
|
keptSelectedRows,
|
|
16886
|
-
firstRowMessage && /* @__PURE__ */ (0,
|
|
17021
|
+
firstRowMessage && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ...(0, import_runtime56.trussProps)({
|
|
16887
17022
|
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
16888
17023
|
...style.firstRowMessageCss,
|
|
16889
17024
|
...visibleDataRows.length === 0 && style.lastRowCss,
|
|
@@ -16896,7 +17031,7 @@ function renderDiv(style, id, columns, visibleDataRows, keptSelectedRows, pinned
|
|
|
16896
17031
|
] });
|
|
16897
17032
|
}
|
|
16898
17033
|
function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, _virtuosoRef, _virtuosoRangeRef, tableHeadRows, stickyOffset, _infiniteScroll, tableContainerRef, _persistScrollPosition) {
|
|
16899
|
-
return /* @__PURE__ */ (0,
|
|
17034
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("table", { ref: tableContainerRef, ...(0, import_runtime56.trussProps)({
|
|
16900
17035
|
...{
|
|
16901
17036
|
width: "w100",
|
|
16902
17037
|
borderCollapse: "borderCollapse_separate",
|
|
@@ -16910,28 +17045,28 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
|
|
|
16910
17045
|
} : {},
|
|
16911
17046
|
...xss
|
|
16912
17047
|
}), "data-testid": id, children: [
|
|
16913
|
-
/* @__PURE__ */ (0,
|
|
17048
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("thead", { ...(0, import_runtime56.trussProps)({
|
|
16914
17049
|
...stickyHeader || pinnedRows.length > 0 ? {
|
|
16915
17050
|
position: "sticky",
|
|
16916
17051
|
transition: "transitionTop",
|
|
16917
17052
|
top: ["top_var", {
|
|
16918
|
-
"--top": (0,
|
|
17053
|
+
"--top": (0, import_runtime56.maybeCssVar)(__maybeInc11(stickyTableHeaderOffset(stickyOffset)))
|
|
16919
17054
|
}],
|
|
16920
17055
|
zIndex: ["z_var", {
|
|
16921
|
-
"--zIndex": (0,
|
|
17056
|
+
"--zIndex": (0, import_runtime56.maybeCssVar)(zIndices.tableStickyHeader)
|
|
16922
17057
|
}]
|
|
16923
17058
|
} : {}
|
|
16924
17059
|
}), children: [
|
|
16925
17060
|
tableHeadRows,
|
|
16926
17061
|
pinnedRows
|
|
16927
17062
|
] }),
|
|
16928
|
-
/* @__PURE__ */ (0,
|
|
17063
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("tbody", { children: [
|
|
16929
17064
|
keptSelectedRows,
|
|
16930
|
-
firstRowMessage && /* @__PURE__ */ (0,
|
|
17065
|
+
firstRowMessage && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("tr", { ...(0, import_runtime56.trussProps)({
|
|
16931
17066
|
...tableRowPrintBreakCss,
|
|
16932
17067
|
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
16933
17068
|
...visibleDataRows.length === 0 && style.lastRowCss
|
|
16934
|
-
}), children: /* @__PURE__ */ (0,
|
|
17069
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("td", { colSpan: columns.length, ...(0, import_runtime56.trussProps)({
|
|
16935
17070
|
...style.betweenRowsCss,
|
|
16936
17071
|
...style.firstRowMessageCss,
|
|
16937
17072
|
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
@@ -16945,7 +17080,7 @@ function renderTable(style, id, columns, visibleDataRows, keptSelectedRows, pinn
|
|
|
16945
17080
|
function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pinnedRows, firstRowMessage, stickyHeader, xss, virtuosoRef, virtuosoRangeRef, tableHeadRows, stickyOffset, infiniteScroll, _tableContainerRef, persistScrollPosition = infiniteScroll === void 0) {
|
|
16946
17081
|
const customScrollParent = useVirtualizedScrollParent();
|
|
16947
17082
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
16948
|
-
const [fetchMoreInProgress, setFetchMoreInProgress] = (0,
|
|
17083
|
+
const [fetchMoreInProgress, setFetchMoreInProgress] = (0, import_react81.useState)(false);
|
|
16949
17084
|
const {
|
|
16950
17085
|
getScrollIndex,
|
|
16951
17086
|
setScrollIndex
|
|
@@ -16954,7 +17089,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pi
|
|
|
16954
17089
|
const topItemCount = (stickyHeader || pinnedRows.length > 0 ? tableHeadRows.length : 0) + pinnedRows.length;
|
|
16955
17090
|
const validatedScrollIndex = savedScrollIndex !== void 0 && savedScrollIndex > 0 && savedScrollIndex < visibleDataRows.length ? savedScrollIndex + topItemCount : void 0;
|
|
16956
17091
|
const virtuosoKey = !!validatedScrollIndex && visibleDataRows.length > 0 ? "with-data" : "virtuoso";
|
|
16957
|
-
return /* @__PURE__ */ (0,
|
|
17092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
16958
17093
|
import_react_virtuoso2.Virtuoso,
|
|
16959
17094
|
{
|
|
16960
17095
|
useWindowScroll: inDocumentScrollLayout && !customScrollParent,
|
|
@@ -16969,7 +17104,7 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pi
|
|
|
16969
17104
|
components: {
|
|
16970
17105
|
// zIndex keeps the pinned head above sticky columns; `top` matches the offsets used by
|
|
16971
17106
|
// the div/table render paths so virtualized tables pin below the global nav + page header.
|
|
16972
|
-
TopItemList:
|
|
17107
|
+
TopItemList: import_react81.default.forwardRef((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ...props, ref, ...(0, import_runtime56.mergeProps)(void 0, {
|
|
16973
17108
|
...props.style,
|
|
16974
17109
|
...style.minWidthPx !== void 0 ? {
|
|
16975
17110
|
minWidth: style.minWidthPx
|
|
@@ -16981,13 +17116,13 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pi
|
|
|
16981
17116
|
}) })),
|
|
16982
17117
|
List: VirtualRoot(style, columns, id, xss),
|
|
16983
17118
|
Footer: () => {
|
|
16984
|
-
return /* @__PURE__ */ (0,
|
|
17119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ...(0, import_runtime56.trussProps)({
|
|
16985
17120
|
...style.virtualFooterPaddingBottomPx !== void 0 ? {
|
|
16986
17121
|
paddingBottom: ["pb_var", {
|
|
16987
17122
|
"--paddingBottom": `${style.virtualFooterPaddingBottomPx ?? 0}px`
|
|
16988
17123
|
}]
|
|
16989
17124
|
} : {}
|
|
16990
|
-
}), children: fetchMoreInProgress && /* @__PURE__ */ (0,
|
|
17125
|
+
}), children: fetchMoreInProgress && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "h5 df aic jcc", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Loader, { size: "xs" }) }) });
|
|
16991
17126
|
}
|
|
16992
17127
|
},
|
|
16993
17128
|
topItemCount,
|
|
@@ -17008,11 +17143,11 @@ function renderVirtual(style, id, columns, visibleDataRows, keptSelectedRows, pi
|
|
|
17008
17143
|
if (index === 0) {
|
|
17009
17144
|
return (
|
|
17010
17145
|
// Ensure the fallback message is the same width as the table
|
|
17011
|
-
/* @__PURE__ */ (0,
|
|
17146
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ...(0, import_runtime56.trussProps)({
|
|
17012
17147
|
...getTableRefWidthStyles(true, inDocumentScrollLayout),
|
|
17013
17148
|
...keptSelectedRows.length === 0 && style.firstBodyRowCss,
|
|
17014
17149
|
...visibleDataRows.length === 0 && style.lastRowCss
|
|
17015
|
-
}), children: /* @__PURE__ */ (0,
|
|
17150
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ...(0, import_runtime56.trussProps)({
|
|
17016
17151
|
...style.firstRowMessageCss,
|
|
17017
17152
|
...visibleDataRows.length === 0 && style.lastRowCellCss,
|
|
17018
17153
|
...visibleDataRows.length === 0 && style.lastRowFirstCellCss,
|
|
@@ -17061,7 +17196,7 @@ function CardView({
|
|
|
17061
17196
|
}) {
|
|
17062
17197
|
const customScrollParent = useVirtualizedScrollParent();
|
|
17063
17198
|
const inDocumentScrollLayout = useDocumentScrollLayout();
|
|
17064
|
-
const [fetchMoreInProgress, setFetchMoreInProgress] = (0,
|
|
17199
|
+
const [fetchMoreInProgress, setFetchMoreInProgress] = (0, import_react81.useState)(false);
|
|
17065
17200
|
const {
|
|
17066
17201
|
getScrollIndex,
|
|
17067
17202
|
setScrollIndex
|
|
@@ -17070,18 +17205,18 @@ function CardView({
|
|
|
17070
17205
|
const validatedScrollIndex = savedScrollIndex !== void 0 && savedScrollIndex > 0 && savedScrollIndex < cardRows.length ? savedScrollIndex : void 0;
|
|
17071
17206
|
const virtuosoKey = !!validatedScrollIndex && cardRows.length > 0 ? "with-data" : "virtuoso";
|
|
17072
17207
|
if (runningInJest) {
|
|
17073
|
-
return /* @__PURE__ */ (0,
|
|
17208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt2 pb2", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "dg gtc_repeat_auto_fill_330px jcc gap3 pt3 pb3 pr3 pl3", children: cardRows }) });
|
|
17074
17209
|
}
|
|
17075
|
-
return /* @__PURE__ */ (0,
|
|
17210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "pt2 pb2 h100", children: /* @__PURE__ */ (0, import_react82.createElement)(import_react_virtuoso2.VirtuosoGrid, { useWindowScroll: inDocumentScrollLayout && !customScrollParent, ...customScrollParent ? {
|
|
17076
17211
|
customScrollParent
|
|
17077
17212
|
} : {}, ...validatedScrollIndex !== void 0 ? {
|
|
17078
17213
|
initialTopMostItemIndex: validatedScrollIndex
|
|
17079
17214
|
} : {}, key: virtuosoKey, "data-testid": id, totalCount: cardRows.length, itemContent: (index) => cardRows[index], components: {
|
|
17080
|
-
List:
|
|
17215
|
+
List: import_react81.default.forwardRef(function CardList({
|
|
17081
17216
|
style,
|
|
17082
17217
|
children
|
|
17083
17218
|
}, ref) {
|
|
17084
|
-
return /* @__PURE__ */ (0,
|
|
17219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ref, ...(0, import_runtime56.mergeProps)(void 0, style, {
|
|
17085
17220
|
display: "dg",
|
|
17086
17221
|
gridTemplateColumns: "gtc_repeat_auto_fill_330px",
|
|
17087
17222
|
justifyContent: "jcc",
|
|
@@ -17092,7 +17227,7 @@ function CardView({
|
|
|
17092
17227
|
paddingLeft: "pl3"
|
|
17093
17228
|
}), children });
|
|
17094
17229
|
}),
|
|
17095
|
-
Footer: () => /* @__PURE__ */ (0,
|
|
17230
|
+
Footer: () => /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { children: fetchMoreInProgress && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: "h5 df aic jcc", children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Loader, { size: "xs" }) }) })
|
|
17096
17231
|
}, rangeChanged: (newRange) => {
|
|
17097
17232
|
virtuosoRangeRef.current = newRange;
|
|
17098
17233
|
if (!infiniteScroll && cardRows.length > 0) {
|
|
@@ -17114,11 +17249,11 @@ function CardView({
|
|
|
17114
17249
|
} : {} }) });
|
|
17115
17250
|
}
|
|
17116
17251
|
var VirtualRoot = (0, import_memoize_one.default)((gs, _columns, id, xss) => {
|
|
17117
|
-
return
|
|
17252
|
+
return import_react81.default.forwardRef(function VirtualRoot2({
|
|
17118
17253
|
style,
|
|
17119
17254
|
children
|
|
17120
17255
|
}, ref) {
|
|
17121
|
-
return /* @__PURE__ */ (0,
|
|
17256
|
+
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { ref, ...(0, import_runtime56.mergeProps)(void 0, style, {
|
|
17122
17257
|
...gs.rootCss,
|
|
17123
17258
|
...gs.minWidthPx ? {
|
|
17124
17259
|
minWidth: ["mw_var", {
|
|
@@ -17134,8 +17269,8 @@ var VirtualRoot = (0, import_memoize_one.default)((gs, _columns, id, xss) => {
|
|
|
17134
17269
|
});
|
|
17135
17270
|
|
|
17136
17271
|
// src/components/ToggleChip.tsx
|
|
17137
|
-
var
|
|
17138
|
-
var
|
|
17272
|
+
var import_runtime57 = require("@homebound/truss/runtime");
|
|
17273
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
17139
17274
|
function ToggleChip(props) {
|
|
17140
17275
|
const {
|
|
17141
17276
|
text,
|
|
@@ -17153,7 +17288,7 @@ function ToggleChip(props) {
|
|
|
17153
17288
|
} = useHover2({});
|
|
17154
17289
|
const compact = fieldProps?.compact;
|
|
17155
17290
|
const tid = useTestIds(props, "chip");
|
|
17156
|
-
return /* @__PURE__ */ (0,
|
|
17291
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("button", { type: "button", ...(0, import_runtime57.trussProps)({
|
|
17157
17292
|
...chipBaseStyles(compact),
|
|
17158
17293
|
...isHovered && !disabled && chipHoverStyles,
|
|
17159
17294
|
// Use a lower right-padding to get closer to the `X` circle when clearable, i.e. not disabled
|
|
@@ -17168,8 +17303,8 @@ function ToggleChip(props) {
|
|
|
17168
17303
|
},
|
|
17169
17304
|
...xss
|
|
17170
17305
|
}), disabled, onClick, ...hoverProps, ...tid, children: [
|
|
17171
|
-
icon && /* @__PURE__ */ (0,
|
|
17172
|
-
/* @__PURE__ */ (0,
|
|
17306
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "fs0", ...tid.icon, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { icon, color: "rgba(36, 36, 36, 1)" /* Gray900 */, inc: 2 }) }),
|
|
17307
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { ...(0, import_runtime57.trussProps)({
|
|
17173
17308
|
textAlign: "tal",
|
|
17174
17309
|
overflow: "oh",
|
|
17175
17310
|
display: "d_negwebkit_box",
|
|
@@ -17181,14 +17316,14 @@ function ToggleChip(props) {
|
|
|
17181
17316
|
paddingRight: "pr0"
|
|
17182
17317
|
} : {}
|
|
17183
17318
|
}), title: text, children: text }),
|
|
17184
|
-
!disabled && /* @__PURE__ */ (0,
|
|
17319
|
+
!disabled && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { ...(0, import_runtime57.trussProps)({
|
|
17185
17320
|
...{
|
|
17186
17321
|
flexShrink: "fs0",
|
|
17187
17322
|
borderRadius: "br16",
|
|
17188
17323
|
backgroundColor: "bgGray200"
|
|
17189
17324
|
},
|
|
17190
17325
|
...isHovered && chipHoverStyles
|
|
17191
|
-
}), ...tid.x, children: /* @__PURE__ */ (0,
|
|
17326
|
+
}), ...tid.x, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(Icon, { icon: "x", color: "rgba(141, 141, 141, 1)" /* Gray600 */, inc: 2 }) })
|
|
17192
17327
|
] });
|
|
17193
17328
|
}
|
|
17194
17329
|
var chipHoverStyles = {
|
|
@@ -17203,8 +17338,8 @@ var chipDisabledStyles = {
|
|
|
17203
17338
|
};
|
|
17204
17339
|
|
|
17205
17340
|
// src/components/ToggleChips.tsx
|
|
17206
|
-
var
|
|
17207
|
-
var
|
|
17341
|
+
var import_runtime58 = require("@homebound/truss/runtime");
|
|
17342
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
17208
17343
|
function ToggleChips(props) {
|
|
17209
17344
|
const {
|
|
17210
17345
|
values,
|
|
@@ -17213,22 +17348,22 @@ function ToggleChips(props) {
|
|
|
17213
17348
|
xss
|
|
17214
17349
|
} = props;
|
|
17215
17350
|
const tid = useTestIds(props, "toggleChips");
|
|
17216
|
-
return /* @__PURE__ */ (0,
|
|
17351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { ...(0, import_runtime58.trussProps)({
|
|
17217
17352
|
...{
|
|
17218
17353
|
display: "df",
|
|
17219
17354
|
flexWrap: "flexWrap_wrap",
|
|
17220
17355
|
gap: "gap1"
|
|
17221
17356
|
},
|
|
17222
17357
|
...xss
|
|
17223
|
-
}), ...tid, children: values.map((value) => /* @__PURE__ */ (0,
|
|
17358
|
+
}), ...tid, children: values.map((value) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ToggleChip, { text: getLabel(value), onClick: () => onRemove(value), ...tid.chip }, getLabel(value))) });
|
|
17224
17359
|
}
|
|
17225
17360
|
|
|
17226
17361
|
// src/components/Accordion.tsx
|
|
17227
|
-
var
|
|
17228
|
-
var
|
|
17229
|
-
var
|
|
17230
|
-
var
|
|
17231
|
-
var
|
|
17362
|
+
var import_utils75 = require("@react-aria/utils");
|
|
17363
|
+
var import_react83 = require("react");
|
|
17364
|
+
var import_react_aria42 = require("react-aria");
|
|
17365
|
+
var import_runtime59 = require("@homebound/truss/runtime");
|
|
17366
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
17232
17367
|
var __maybeInc12 = (inc) => {
|
|
17233
17368
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
17234
17369
|
};
|
|
@@ -17250,38 +17385,38 @@ function Accordion(props) {
|
|
|
17250
17385
|
xss
|
|
17251
17386
|
} = props;
|
|
17252
17387
|
const tid = useTestIds(props, "accordion");
|
|
17253
|
-
const id = (0,
|
|
17254
|
-
const [expanded, setExpanded] = (0,
|
|
17388
|
+
const id = (0, import_utils75.useId)();
|
|
17389
|
+
const [expanded, setExpanded] = (0, import_react83.useState)(defaultExpanded && !disabled);
|
|
17255
17390
|
const {
|
|
17256
17391
|
isFocusVisible,
|
|
17257
17392
|
focusProps
|
|
17258
|
-
} = (0,
|
|
17259
|
-
const [contentEl, setContentEl] = (0,
|
|
17260
|
-
const contentRef = (0,
|
|
17393
|
+
} = (0, import_react_aria42.useFocusRing)();
|
|
17394
|
+
const [contentEl, setContentEl] = (0, import_react83.useState)(null);
|
|
17395
|
+
const contentRef = (0, import_react83.useMemo)(() => ({
|
|
17261
17396
|
current: contentEl
|
|
17262
17397
|
}), [contentEl]);
|
|
17263
|
-
const [contentHeight, setContentHeight] = (0,
|
|
17264
|
-
(0,
|
|
17398
|
+
const [contentHeight, setContentHeight] = (0, import_react83.useState)(expanded ? "auto" : "0");
|
|
17399
|
+
(0, import_react83.useEffect)(() => {
|
|
17265
17400
|
setExpanded(defaultExpanded && !disabled);
|
|
17266
17401
|
}, [defaultExpanded, disabled]);
|
|
17267
|
-
(0,
|
|
17402
|
+
(0, import_react83.useEffect)(() => {
|
|
17268
17403
|
setContentHeight(expanded && contentEl ? `${contentEl.scrollHeight}px` : "0");
|
|
17269
17404
|
}, [expanded, contentEl]);
|
|
17270
|
-
const onResize = (0,
|
|
17405
|
+
const onResize = (0, import_react83.useCallback)(() => {
|
|
17271
17406
|
if (contentEl && expanded) {
|
|
17272
17407
|
setContentHeight(`${contentEl.scrollHeight}px`);
|
|
17273
17408
|
}
|
|
17274
17409
|
}, [expanded, contentEl, setContentHeight]);
|
|
17275
|
-
(0,
|
|
17410
|
+
(0, import_utils75.useResizeObserver)({
|
|
17276
17411
|
ref: contentRef,
|
|
17277
17412
|
onResize
|
|
17278
17413
|
});
|
|
17279
|
-
const toggle = (0,
|
|
17414
|
+
const toggle = (0, import_react83.useCallback)(() => {
|
|
17280
17415
|
setExpanded((prev) => !prev);
|
|
17281
17416
|
if (setExpandedIndex) setExpandedIndex(index);
|
|
17282
17417
|
if (onToggle) onToggle();
|
|
17283
17418
|
}, [index, setExpandedIndex, onToggle]);
|
|
17284
|
-
const touchableStyle = (0,
|
|
17419
|
+
const touchableStyle = (0, import_react83.useMemo)(() => ({
|
|
17285
17420
|
...{
|
|
17286
17421
|
display: "df",
|
|
17287
17422
|
justifyContent: "jcsb",
|
|
@@ -17322,12 +17457,12 @@ function Accordion(props) {
|
|
|
17322
17457
|
},
|
|
17323
17458
|
...isFocusVisible && {
|
|
17324
17459
|
boxShadow: ["boxShadow_var", {
|
|
17325
|
-
"--boxShadow": (0,
|
|
17460
|
+
"--boxShadow": (0, import_runtime59.maybeCssVar)(`inset 0 0 0 2px ${"rgba(29, 78, 216, 1)" /* Blue700 */}`)
|
|
17326
17461
|
}]
|
|
17327
17462
|
},
|
|
17328
17463
|
...xss
|
|
17329
17464
|
}), [compact, disabled, isFocusVisible, titleOnClick, xss]);
|
|
17330
|
-
return /* @__PURE__ */ (0,
|
|
17465
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { ...tid.container, ...(0, import_runtime59.trussProps)({
|
|
17331
17466
|
...{
|
|
17332
17467
|
borderColor: "bcGray300",
|
|
17333
17468
|
...topBorder ? {
|
|
@@ -17345,14 +17480,14 @@ function Accordion(props) {
|
|
|
17345
17480
|
}]
|
|
17346
17481
|
} : {}
|
|
17347
17482
|
}), children: [
|
|
17348
|
-
titleOnClick ? /* @__PURE__ */ (0,
|
|
17349
|
-
/* @__PURE__ */ (0,
|
|
17483
|
+
titleOnClick ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { ...focusProps, "aria-controls": id, "aria-expanded": expanded, className: "df", children: [
|
|
17484
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("button", { ...tid.title, disabled, ...(0, import_runtime59.trussProps)({
|
|
17350
17485
|
...touchableStyle,
|
|
17351
17486
|
...{
|
|
17352
17487
|
flexGrow: "fg1"
|
|
17353
17488
|
}
|
|
17354
17489
|
}), onClick: titleOnClick, children: title }),
|
|
17355
|
-
/* @__PURE__ */ (0,
|
|
17490
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("button", { ...tid.toggle, disabled, ...(0, import_runtime59.trussProps)({
|
|
17356
17491
|
...touchableStyle,
|
|
17357
17492
|
...{
|
|
17358
17493
|
paddingLeft: "pl2",
|
|
@@ -17363,23 +17498,23 @@ function Accordion(props) {
|
|
|
17363
17498
|
paddingRight: "pr_10px"
|
|
17364
17499
|
} : {}
|
|
17365
17500
|
}
|
|
17366
|
-
}), onClick: toggle, children: /* @__PURE__ */ (0,
|
|
17367
|
-
] }) : /* @__PURE__ */ (0,
|
|
17501
|
+
}), onClick: toggle, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(RotatingChevronIcon, { expanded }) })
|
|
17502
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("button", { ...tid.title, ...focusProps, "aria-controls": id, "aria-expanded": expanded, disabled, ...(0, import_runtime59.trussProps)({
|
|
17368
17503
|
...{
|
|
17369
17504
|
width: "w100"
|
|
17370
17505
|
},
|
|
17371
17506
|
...touchableStyle
|
|
17372
17507
|
}), onClick: toggle, children: [
|
|
17373
|
-
/* @__PURE__ */ (0,
|
|
17374
|
-
/* @__PURE__ */ (0,
|
|
17508
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { className: "fg1 tal", children: title }),
|
|
17509
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(RotatingChevronIcon, { expanded })
|
|
17375
17510
|
] }),
|
|
17376
|
-
/* @__PURE__ */ (0,
|
|
17511
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { ...tid.details, id, "aria-hidden": !expanded, ...(0, import_runtime59.trussProps)({
|
|
17377
17512
|
overflow: "oh",
|
|
17378
17513
|
height: ["h_var", {
|
|
17379
|
-
"--height": (0,
|
|
17514
|
+
"--height": (0, import_runtime59.maybeCssVar)(__maybeInc12(contentHeight))
|
|
17380
17515
|
}],
|
|
17381
17516
|
transition: "transition_height_250ms_ease_in_out"
|
|
17382
|
-
}), children: expanded && /* @__PURE__ */ (0,
|
|
17517
|
+
}), children: expanded && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { ...(0, import_runtime59.trussProps)({
|
|
17383
17518
|
paddingLeft: "pl2",
|
|
17384
17519
|
paddingRight: "pr2",
|
|
17385
17520
|
paddingBottom: "pb2",
|
|
@@ -17394,13 +17529,13 @@ function Accordion(props) {
|
|
|
17394
17529
|
] });
|
|
17395
17530
|
}
|
|
17396
17531
|
function RotatingChevronIcon(props) {
|
|
17397
|
-
return /* @__PURE__ */ (0,
|
|
17532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("span", { ...(0, import_runtime59.trussProps)({
|
|
17398
17533
|
flexShrink: "fs0",
|
|
17399
17534
|
transition: "transition_transform_250ms_linear",
|
|
17400
17535
|
transform: ["transform_var", {
|
|
17401
|
-
"--transform": (0,
|
|
17536
|
+
"--transform": (0, import_runtime59.maybeCssVar)(props.expanded ? "rotate(180deg)" : "rotate(0deg)")
|
|
17402
17537
|
}]
|
|
17403
|
-
}), children: /* @__PURE__ */ (0,
|
|
17538
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(Icon, { icon: "chevronDown" }) });
|
|
17404
17539
|
}
|
|
17405
17540
|
var accordionSizes = {
|
|
17406
17541
|
xs: 240,
|
|
@@ -17410,15 +17545,15 @@ var accordionSizes = {
|
|
|
17410
17545
|
};
|
|
17411
17546
|
|
|
17412
17547
|
// src/components/AccordionList.tsx
|
|
17413
|
-
var
|
|
17414
|
-
var
|
|
17548
|
+
var import_react84 = require("react");
|
|
17549
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
17415
17550
|
function AccordionList(props) {
|
|
17416
17551
|
const { accordions, size, allowMultipleExpanded = true, compact = false } = props;
|
|
17417
|
-
const [expandedIndex, setExpandedIndex] = (0,
|
|
17552
|
+
const [expandedIndex, setExpandedIndex] = (0, import_react84.useState)(
|
|
17418
17553
|
accordions.findIndex((a) => a.defaultExpanded)
|
|
17419
17554
|
);
|
|
17420
17555
|
const tid = useTestIds(props, "accordionList");
|
|
17421
|
-
return /* @__PURE__ */ (0,
|
|
17556
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_jsx_runtime91.Fragment, { children: accordions.map((accordionProps, index, arr) => /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
17422
17557
|
Accordion,
|
|
17423
17558
|
{
|
|
17424
17559
|
...accordionProps,
|
|
@@ -17435,7 +17570,7 @@ function AccordionList(props) {
|
|
|
17435
17570
|
}
|
|
17436
17571
|
|
|
17437
17572
|
// src/components/AutoSaveIndicator.tsx
|
|
17438
|
-
var
|
|
17573
|
+
var import_react85 = require("react");
|
|
17439
17574
|
|
|
17440
17575
|
// src/types.ts
|
|
17441
17576
|
function assertNever(x) {
|
|
@@ -17443,7 +17578,7 @@ function assertNever(x) {
|
|
|
17443
17578
|
}
|
|
17444
17579
|
|
|
17445
17580
|
// src/components/AutoSaveIndicator.tsx
|
|
17446
|
-
var
|
|
17581
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
17447
17582
|
function AutoSaveIndicator({
|
|
17448
17583
|
hideOnIdle,
|
|
17449
17584
|
doNotReset
|
|
@@ -17453,7 +17588,7 @@ function AutoSaveIndicator({
|
|
|
17453
17588
|
resetStatus,
|
|
17454
17589
|
errors
|
|
17455
17590
|
} = useAutoSaveStatus();
|
|
17456
|
-
(0,
|
|
17591
|
+
(0, import_react85.useEffect)(
|
|
17457
17592
|
() => {
|
|
17458
17593
|
if (doNotReset) return;
|
|
17459
17594
|
return () => resetStatus();
|
|
@@ -17464,11 +17599,11 @@ function AutoSaveIndicator({
|
|
|
17464
17599
|
);
|
|
17465
17600
|
switch (status) {
|
|
17466
17601
|
case "idle" /* IDLE */:
|
|
17467
|
-
return hideOnIdle ? null : /* @__PURE__ */ (0,
|
|
17602
|
+
return hideOnIdle ? null : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Indicator, { icon: "cloudSave" });
|
|
17468
17603
|
case "saving" /* SAVING */:
|
|
17469
|
-
return /* @__PURE__ */ (0,
|
|
17604
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Indicator, { icon: "refresh", text: "Saving..." });
|
|
17470
17605
|
case "done" /* DONE */:
|
|
17471
|
-
return /* @__PURE__ */ (0,
|
|
17606
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Indicator, { icon: "cloudSave", text: "Saved" });
|
|
17472
17607
|
case "error" /* ERROR */:
|
|
17473
17608
|
return (
|
|
17474
17609
|
/**
|
|
@@ -17476,7 +17611,7 @@ function AutoSaveIndicator({
|
|
|
17476
17611
|
* rendering it far away from the Icon/Text. Wrap it with a div to constrain
|
|
17477
17612
|
* it.
|
|
17478
17613
|
*/
|
|
17479
|
-
/* @__PURE__ */ (0,
|
|
17614
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "dif", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Tooltip, { title: String(errors), placement: "bottom", children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Indicator, { icon: "error", color: "rgba(239, 68, 68, 1)" /* Red500 */, text: "Error saving" }) }) })
|
|
17480
17615
|
);
|
|
17481
17616
|
default:
|
|
17482
17617
|
assertNever(status);
|
|
@@ -17487,15 +17622,15 @@ function Indicator({
|
|
|
17487
17622
|
icon,
|
|
17488
17623
|
color
|
|
17489
17624
|
}) {
|
|
17490
|
-
return /* @__PURE__ */ (0,
|
|
17491
|
-
/* @__PURE__ */ (0,
|
|
17625
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { "data-testid": "autoSave", className: "df gap1 aic gray700 fw6 fz_14px lh_20px", children: [
|
|
17626
|
+
/* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Icon, { icon, color }),
|
|
17492
17627
|
text
|
|
17493
17628
|
] });
|
|
17494
17629
|
}
|
|
17495
17630
|
|
|
17496
17631
|
// src/components/Banner.tsx
|
|
17497
|
-
var
|
|
17498
|
-
var
|
|
17632
|
+
var import_runtime60 = require("@homebound/truss/runtime");
|
|
17633
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
17499
17634
|
function Banner(props) {
|
|
17500
17635
|
const {
|
|
17501
17636
|
type,
|
|
@@ -17505,7 +17640,7 @@ function Banner(props) {
|
|
|
17505
17640
|
...others
|
|
17506
17641
|
} = props;
|
|
17507
17642
|
const tid = useTestIds(others, "banner");
|
|
17508
|
-
return /* @__PURE__ */ (0,
|
|
17643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { ...(0, import_runtime60.trussProps)({
|
|
17509
17644
|
...variantStyles3[type],
|
|
17510
17645
|
...{
|
|
17511
17646
|
display: "df",
|
|
@@ -17523,9 +17658,9 @@ function Banner(props) {
|
|
|
17523
17658
|
boxShadow: "bshBasic"
|
|
17524
17659
|
}
|
|
17525
17660
|
}), ...tid, role: "alert", children: [
|
|
17526
|
-
showIcon && /* @__PURE__ */ (0,
|
|
17527
|
-
/* @__PURE__ */ (0,
|
|
17528
|
-
onClose && /* @__PURE__ */ (0,
|
|
17661
|
+
showIcon && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "fs0", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Icon, { icon: typeToIcon[type], ...tid.type, color: "rgba(36, 36, 36, 1)" /* Gray900 */ }) }),
|
|
17662
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "fg1", ...tid.message, children: message }),
|
|
17663
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "lh_0", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(IconButton, { icon: "x", onClick: onClose, ...tid.close, color: "rgba(36, 36, 36, 1)" /* Gray900 */ }) })
|
|
17529
17664
|
] });
|
|
17530
17665
|
}
|
|
17531
17666
|
var typeToIcon = {
|
|
@@ -17563,38 +17698,38 @@ var import_react113 = require("react");
|
|
|
17563
17698
|
var import_react_aria47 = require("react-aria");
|
|
17564
17699
|
|
|
17565
17700
|
// src/components/Modal/Modal.tsx
|
|
17566
|
-
var
|
|
17567
|
-
var
|
|
17568
|
-
var
|
|
17701
|
+
var import_utils79 = require("@react-aria/utils");
|
|
17702
|
+
var import_react88 = require("react");
|
|
17703
|
+
var import_react_aria43 = require("react-aria");
|
|
17569
17704
|
var import_react_dom3 = require("react-dom");
|
|
17570
17705
|
|
|
17571
17706
|
// src/components/Modal/useModal.tsx
|
|
17572
|
-
var
|
|
17707
|
+
var import_react87 = require("react");
|
|
17573
17708
|
|
|
17574
17709
|
// src/components/Modal/ModalContext.tsx
|
|
17575
|
-
var
|
|
17576
|
-
var
|
|
17577
|
-
var ModalContext = (0,
|
|
17710
|
+
var import_react86 = require("react");
|
|
17711
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
17712
|
+
var ModalContext = (0, import_react86.createContext)({ inModal: false });
|
|
17578
17713
|
function ModalProvider({ children }) {
|
|
17579
|
-
const value = (0,
|
|
17580
|
-
return /* @__PURE__ */ (0,
|
|
17714
|
+
const value = (0, import_react86.useMemo)(() => ({ inModal: true }), []);
|
|
17715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(ModalContext.Provider, { value, children });
|
|
17581
17716
|
}
|
|
17582
17717
|
function useModalContext() {
|
|
17583
|
-
return (0,
|
|
17718
|
+
return (0, import_react86.useContext)(ModalContext);
|
|
17584
17719
|
}
|
|
17585
17720
|
|
|
17586
17721
|
// src/components/Modal/useModal.tsx
|
|
17587
17722
|
function useModal() {
|
|
17588
17723
|
const { modalState, modalCanCloseChecks } = useBeamContext();
|
|
17589
17724
|
const { inModal } = useModalContext();
|
|
17590
|
-
const lastCanClose = (0,
|
|
17591
|
-
const api = (0,
|
|
17592
|
-
(0,
|
|
17725
|
+
const lastCanClose = (0, import_react87.useRef)();
|
|
17726
|
+
const api = (0, import_react87.useRef)();
|
|
17727
|
+
(0, import_react87.useEffect)(() => {
|
|
17593
17728
|
return () => {
|
|
17594
17729
|
modalCanCloseChecks.current = modalCanCloseChecks.current.filter((c) => c !== lastCanClose.current);
|
|
17595
17730
|
};
|
|
17596
17731
|
}, [modalCanCloseChecks]);
|
|
17597
|
-
return (0,
|
|
17732
|
+
return (0, import_react87.useMemo)(
|
|
17598
17733
|
() => ({
|
|
17599
17734
|
openModal(props) {
|
|
17600
17735
|
modalState.current = { ...props, api };
|
|
@@ -17629,8 +17764,8 @@ function useModal() {
|
|
|
17629
17764
|
}
|
|
17630
17765
|
|
|
17631
17766
|
// src/components/Modal/Modal.tsx
|
|
17632
|
-
var
|
|
17633
|
-
var
|
|
17767
|
+
var import_runtime61 = require("@homebound/truss/runtime");
|
|
17768
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
17634
17769
|
function Modal(props) {
|
|
17635
17770
|
const {
|
|
17636
17771
|
size = "md",
|
|
@@ -17641,7 +17776,7 @@ function Modal(props) {
|
|
|
17641
17776
|
allowClosing = true
|
|
17642
17777
|
} = props;
|
|
17643
17778
|
const isFixedHeight = typeof size !== "string";
|
|
17644
|
-
const ref = (0,
|
|
17779
|
+
const ref = (0, import_react88.useRef)(null);
|
|
17645
17780
|
const {
|
|
17646
17781
|
modalBodyDiv,
|
|
17647
17782
|
modalFooterDiv,
|
|
@@ -17653,7 +17788,7 @@ function Modal(props) {
|
|
|
17653
17788
|
const {
|
|
17654
17789
|
overlayProps,
|
|
17655
17790
|
underlayProps
|
|
17656
|
-
} = (0,
|
|
17791
|
+
} = (0, import_react_aria43.useOverlay)({
|
|
17657
17792
|
...props,
|
|
17658
17793
|
isOpen: true,
|
|
17659
17794
|
onClose: closeModal,
|
|
@@ -17664,19 +17799,19 @@ function Modal(props) {
|
|
|
17664
17799
|
}, ref);
|
|
17665
17800
|
const {
|
|
17666
17801
|
modalProps
|
|
17667
|
-
} = (0,
|
|
17802
|
+
} = (0, import_react_aria43.useModal)();
|
|
17668
17803
|
const {
|
|
17669
17804
|
dialogProps,
|
|
17670
17805
|
titleProps
|
|
17671
|
-
} = (0,
|
|
17806
|
+
} = (0, import_react_aria43.useDialog)({
|
|
17672
17807
|
role: "dialog"
|
|
17673
17808
|
}, ref);
|
|
17674
|
-
const [[width2, height], setSize] = (0,
|
|
17675
|
-
const modalBodyRef = (0,
|
|
17676
|
-
const modalFooterRef = (0,
|
|
17677
|
-
const modalHeaderRef = (0,
|
|
17809
|
+
const [[width2, height], setSize] = (0, import_react88.useState)(getSize(size));
|
|
17810
|
+
const modalBodyRef = (0, import_react88.useRef)(null);
|
|
17811
|
+
const modalFooterRef = (0, import_react88.useRef)(null);
|
|
17812
|
+
const modalHeaderRef = (0, import_react88.useRef)(null);
|
|
17678
17813
|
const testId = useTestIds({}, testIdPrefix);
|
|
17679
|
-
(0,
|
|
17814
|
+
(0, import_react_aria43.usePreventScroll)();
|
|
17680
17815
|
const {
|
|
17681
17816
|
sm
|
|
17682
17817
|
} = useBreakpoint();
|
|
@@ -17685,10 +17820,10 @@ function Modal(props) {
|
|
|
17685
17820
|
setSize: (size2 = "md") => setSize(getSize(size2))
|
|
17686
17821
|
};
|
|
17687
17822
|
}
|
|
17688
|
-
const [hasScroll, setHasScroll] = (0,
|
|
17689
|
-
(0,
|
|
17823
|
+
const [hasScroll, setHasScroll] = (0, import_react88.useState)(forceScrolling ?? false);
|
|
17824
|
+
(0, import_utils79.useResizeObserver)({
|
|
17690
17825
|
ref: modalBodyRef,
|
|
17691
|
-
onResize: (0,
|
|
17826
|
+
onResize: (0, import_react88.useCallback)(
|
|
17692
17827
|
() => {
|
|
17693
17828
|
const target = modalBodyRef.current;
|
|
17694
17829
|
if (forceScrolling === void 0 && !isFixedHeight) {
|
|
@@ -17700,7 +17835,7 @@ function Modal(props) {
|
|
|
17700
17835
|
[]
|
|
17701
17836
|
)
|
|
17702
17837
|
});
|
|
17703
|
-
(0,
|
|
17838
|
+
(0, import_react88.useEffect)(
|
|
17704
17839
|
() => {
|
|
17705
17840
|
modalHeaderRef.current.appendChild(modalHeaderDiv);
|
|
17706
17841
|
modalBodyRef.current.appendChild(modalBodyDiv);
|
|
@@ -17710,7 +17845,7 @@ function Modal(props) {
|
|
|
17710
17845
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17711
17846
|
[modalBodyRef, modalFooterRef, modalHeaderRef]
|
|
17712
17847
|
);
|
|
17713
|
-
return /* @__PURE__ */ (0,
|
|
17848
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_aria43.OverlayContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(AutoSaveStatusProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { ...(0, import_runtime61.trussProps)({
|
|
17714
17849
|
position: "fixed",
|
|
17715
17850
|
top: "tp_0",
|
|
17716
17851
|
bottom: "bot_0",
|
|
@@ -17721,9 +17856,9 @@ function Modal(props) {
|
|
|
17721
17856
|
justifyContent: "jcc",
|
|
17722
17857
|
backgroundColor: "bgc_rgba_36_36_36_0_6",
|
|
17723
17858
|
zIndex: ["z_var", {
|
|
17724
|
-
"--zIndex": (0,
|
|
17859
|
+
"--zIndex": (0, import_runtime61.maybeCssVar)(zIndices.modalUnderlay)
|
|
17725
17860
|
}]
|
|
17726
|
-
}), ...underlayProps, ...testId.underlay, children: /* @__PURE__ */ (0,
|
|
17861
|
+
}), ...underlayProps, ...testId.underlay, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_aria43.FocusScope, { contain: true, restoreFocus: true, autoFocus: true, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { ...(0, import_runtime61.trussProps)({
|
|
17727
17862
|
borderRadius: "br24",
|
|
17728
17863
|
backgroundColor: "bgWhite",
|
|
17729
17864
|
boxShadow: "bshModal",
|
|
@@ -17749,7 +17884,7 @@ function Modal(props) {
|
|
|
17749
17884
|
borderRadius: "br0"
|
|
17750
17885
|
} : {}
|
|
17751
17886
|
}), ref, ...overlayProps, ...dialogProps, ...modalProps, ...testId, children: [
|
|
17752
|
-
/* @__PURE__ */ (0,
|
|
17887
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("header", { ...(0, import_runtime61.trussProps)({
|
|
17753
17888
|
display: "df",
|
|
17754
17889
|
flexDirection: "fdrr",
|
|
17755
17890
|
paddingTop: "pt3",
|
|
@@ -17763,10 +17898,10 @@ function Modal(props) {
|
|
|
17763
17898
|
borderColor: "bcGray200"
|
|
17764
17899
|
} : {}
|
|
17765
17900
|
}), children: [
|
|
17766
|
-
/* @__PURE__ */ (0,
|
|
17767
|
-
/* @__PURE__ */ (0,
|
|
17901
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("span", { className: "fs0 pl1", children: allowClosing && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(IconButton, { icon: "x", onClick: closeModal, ...testId.titleClose }) }),
|
|
17902
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("h1", { className: "fg1 fw6 fz_30px lh_36px gray900", ref: modalHeaderRef, ...titleProps, ...testId.title })
|
|
17768
17903
|
] }),
|
|
17769
|
-
/* @__PURE__ */ (0,
|
|
17904
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("main", { ref: modalBodyRef, ...(0, import_runtime61.trussProps)({
|
|
17770
17905
|
flexGrow: "fg1",
|
|
17771
17906
|
overflowY: "oya",
|
|
17772
17907
|
...hasScroll ? {
|
|
@@ -17778,7 +17913,7 @@ function Modal(props) {
|
|
|
17778
17913
|
overflowY: "oys"
|
|
17779
17914
|
} : {}
|
|
17780
17915
|
}), children: content }),
|
|
17781
|
-
/* @__PURE__ */ (0,
|
|
17916
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("footer", { className: "fs0", children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { ref: modalFooterRef }) })
|
|
17782
17917
|
] }) }) }) }) }) });
|
|
17783
17918
|
}
|
|
17784
17919
|
function ModalHeader({
|
|
@@ -17787,7 +17922,7 @@ function ModalHeader({
|
|
|
17787
17922
|
const {
|
|
17788
17923
|
modalHeaderDiv
|
|
17789
17924
|
} = useBeamContext();
|
|
17790
|
-
return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0,
|
|
17925
|
+
return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_jsx_runtime95.Fragment, { children }), modalHeaderDiv);
|
|
17791
17926
|
}
|
|
17792
17927
|
function ModalBody({
|
|
17793
17928
|
children,
|
|
@@ -17799,7 +17934,7 @@ function ModalBody({
|
|
|
17799
17934
|
const testId = useTestIds({}, testIdPrefix);
|
|
17800
17935
|
return (0, import_react_dom3.createPortal)(
|
|
17801
17936
|
// If `virtualized`, then we are expecting the `children` will handle their own scrollbar, so have the overflow hidden and adjust padding
|
|
17802
|
-
/* @__PURE__ */ (0,
|
|
17937
|
+
/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { ...(0, import_runtime61.trussProps)({
|
|
17803
17938
|
height: "h100",
|
|
17804
17939
|
...virtualized ? {
|
|
17805
17940
|
overflow: "oh",
|
|
@@ -17820,7 +17955,7 @@ function ModalFooter({
|
|
|
17820
17955
|
modalFooterDiv
|
|
17821
17956
|
} = useBeamContext();
|
|
17822
17957
|
const testId = useTestIds({}, testIdPrefix);
|
|
17823
|
-
return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0,
|
|
17958
|
+
return (0, import_react_dom3.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { ...(0, import_runtime61.trussProps)({
|
|
17824
17959
|
...{
|
|
17825
17960
|
paddingTop: "pt3",
|
|
17826
17961
|
paddingBottom: "pb3",
|
|
@@ -17852,11 +17987,11 @@ function getSize(size) {
|
|
|
17852
17987
|
}
|
|
17853
17988
|
|
|
17854
17989
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
17855
|
-
var
|
|
17990
|
+
var import_react89 = require("react");
|
|
17856
17991
|
|
|
17857
17992
|
// src/components/Snackbar/SnackbarNotice.tsx
|
|
17858
|
-
var
|
|
17859
|
-
var
|
|
17993
|
+
var import_runtime62 = require("@homebound/truss/runtime");
|
|
17994
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
17860
17995
|
function SnackbarNotice(props) {
|
|
17861
17996
|
const {
|
|
17862
17997
|
icon,
|
|
@@ -17868,12 +18003,12 @@ function SnackbarNotice(props) {
|
|
|
17868
18003
|
} = props;
|
|
17869
18004
|
const tid = useTestIds(props, "snackbar");
|
|
17870
18005
|
const reallyHideClose = hideCloseButton && !persistent;
|
|
17871
|
-
return /* @__PURE__ */ (0,
|
|
17872
|
-
icon && /* @__PURE__ */ (0,
|
|
17873
|
-
/* @__PURE__ */ (0,
|
|
18006
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "white bgGray800 br4 fw4 fz_16px lh_24px df aic maxw_420px", "data-theme": contrastDataTheme, ...tid, role: "alert", children: [
|
|
18007
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "fs0 pl_12px", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Icon, { ...typeToIcon2[icon], ...tid.icon }) }),
|
|
18008
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
17874
18009
|
"span",
|
|
17875
18010
|
{
|
|
17876
|
-
...(0,
|
|
18011
|
+
...(0, import_runtime62.trussProps)({
|
|
17877
18012
|
overflow: "oh",
|
|
17878
18013
|
display: "d_negwebkit_box",
|
|
17879
18014
|
WebkitBoxOrient: "wbo_vertical",
|
|
@@ -17893,8 +18028,8 @@ function SnackbarNotice(props) {
|
|
|
17893
18028
|
children: message
|
|
17894
18029
|
}
|
|
17895
18030
|
),
|
|
17896
|
-
(action || !reallyHideClose) && /* @__PURE__ */ (0,
|
|
17897
|
-
action && /* @__PURE__ */ (0,
|
|
18031
|
+
(action || !reallyHideClose) && /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("span", { className: "fs0 df aic", children: [
|
|
18032
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { ...(0, import_runtime62.trussProps)({
|
|
17898
18033
|
textTransform: "ttu",
|
|
17899
18034
|
fontWeight: "fw4",
|
|
17900
18035
|
fontSize: "fz_14px",
|
|
@@ -17902,8 +18037,8 @@ function SnackbarNotice(props) {
|
|
|
17902
18037
|
paddingRight: ["pr_var", {
|
|
17903
18038
|
"--paddingRight": `${!reallyHideClose && action.variant !== "text" ? 4 : 8}px`
|
|
17904
18039
|
}]
|
|
17905
|
-
}), children: /* @__PURE__ */ (0,
|
|
17906
|
-
!reallyHideClose && /* @__PURE__ */ (0,
|
|
18040
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Button, { ...action, ...tid.action }) }),
|
|
18041
|
+
!reallyHideClose && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("span", { className: "pr1 lineHeight_0", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(IconButton, { icon: "x", onClick: onClose, ...tid.close }) })
|
|
17907
18042
|
] })
|
|
17908
18043
|
] });
|
|
17909
18044
|
}
|
|
@@ -17932,17 +18067,17 @@ var typeToIcon2 = {
|
|
|
17932
18067
|
};
|
|
17933
18068
|
|
|
17934
18069
|
// src/components/Snackbar/Snackbar.tsx
|
|
17935
|
-
var
|
|
17936
|
-
var
|
|
18070
|
+
var import_runtime63 = require("@homebound/truss/runtime");
|
|
18071
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
17937
18072
|
function Snackbar({
|
|
17938
18073
|
notices,
|
|
17939
18074
|
offset
|
|
17940
18075
|
}) {
|
|
17941
18076
|
const tid = useTestIds({});
|
|
17942
|
-
return /* @__PURE__ */ (0,
|
|
18077
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)("div", { ...tid.snackbarWrapper, ...(0, import_runtime63.trussProps)({
|
|
17943
18078
|
position: "fixed",
|
|
17944
18079
|
zIndex: ["z_var", {
|
|
17945
|
-
"--zIndex": (0,
|
|
18080
|
+
"--zIndex": (0, import_runtime63.maybeCssVar)(zIndices.snackbar)
|
|
17946
18081
|
}],
|
|
17947
18082
|
bottom: ["bottom_var", {
|
|
17948
18083
|
"--bottom": `${offset.bottom ?? defaultOffset.bottom}px`
|
|
@@ -17952,33 +18087,33 @@ function Snackbar({
|
|
|
17952
18087
|
flexDirection: "fdc",
|
|
17953
18088
|
alignItems: "aifs",
|
|
17954
18089
|
gap: "gap_12px"
|
|
17955
|
-
}), children: notices.map((data) => /* @__PURE__ */ (0,
|
|
18090
|
+
}), children: notices.map((data) => /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SnackbarNotice, { ...data }, data.id)) });
|
|
17956
18091
|
}
|
|
17957
18092
|
var defaultOffset = {
|
|
17958
18093
|
bottom: 24
|
|
17959
18094
|
};
|
|
17960
18095
|
|
|
17961
18096
|
// src/components/Snackbar/SnackbarContext.tsx
|
|
17962
|
-
var
|
|
17963
|
-
var SnackbarContext = (0,
|
|
18097
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
18098
|
+
var SnackbarContext = (0, import_react89.createContext)({ setNotices: () => {
|
|
17964
18099
|
}, setOffset: () => {
|
|
17965
18100
|
} });
|
|
17966
18101
|
function SnackbarProvider(props) {
|
|
17967
|
-
const [notices, setNotices] = (0,
|
|
17968
|
-
const [offset, setOffset] = (0,
|
|
17969
|
-
const contextValue = (0,
|
|
17970
|
-
return /* @__PURE__ */ (0,
|
|
18102
|
+
const [notices, setNotices] = (0, import_react89.useState)([]);
|
|
18103
|
+
const [offset, setOffset] = (0, import_react89.useState)({});
|
|
18104
|
+
const contextValue = (0, import_react89.useMemo)(() => ({ setNotices, setOffset }), []);
|
|
18105
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(SnackbarContext.Provider, { value: contextValue, children: [
|
|
17971
18106
|
props.children,
|
|
17972
|
-
/* @__PURE__ */ (0,
|
|
18107
|
+
/* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Snackbar, { notices, offset })
|
|
17973
18108
|
] });
|
|
17974
18109
|
}
|
|
17975
18110
|
function useSnackbarContext() {
|
|
17976
|
-
return (0,
|
|
18111
|
+
return (0, import_react89.useContext)(SnackbarContext);
|
|
17977
18112
|
}
|
|
17978
18113
|
|
|
17979
18114
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
17980
18115
|
var import_framer_motion = require("framer-motion");
|
|
17981
|
-
var
|
|
18116
|
+
var import_react90 = require("react");
|
|
17982
18117
|
var import_react_dom4 = require("react-dom");
|
|
17983
18118
|
|
|
17984
18119
|
// src/components/SuperDrawer/utils.ts
|
|
@@ -17989,9 +18124,9 @@ var SuperDrawerWidth = /* @__PURE__ */ ((SuperDrawerWidth2) => {
|
|
|
17989
18124
|
})(SuperDrawerWidth || {});
|
|
17990
18125
|
|
|
17991
18126
|
// src/components/SuperDrawer/SuperDrawer.tsx
|
|
17992
|
-
var
|
|
17993
|
-
var
|
|
17994
|
-
var
|
|
18127
|
+
var import_runtime64 = require("@homebound/truss/runtime");
|
|
18128
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
18129
|
+
var import_react91 = require("react");
|
|
17995
18130
|
function SuperDrawer() {
|
|
17996
18131
|
const {
|
|
17997
18132
|
drawerContentStack: contentStack,
|
|
@@ -18000,7 +18135,7 @@ function SuperDrawer() {
|
|
|
18000
18135
|
const {
|
|
18001
18136
|
closeDrawer
|
|
18002
18137
|
} = useSuperDrawer();
|
|
18003
|
-
const headerRef = (0,
|
|
18138
|
+
const headerRef = (0, import_react90.useRef)(null);
|
|
18004
18139
|
const testId = useTestIds({}, "superDrawer");
|
|
18005
18140
|
const currentContent = contentStack.current[contentStack.current.length - 1]?.opts;
|
|
18006
18141
|
const {
|
|
@@ -18010,7 +18145,7 @@ function SuperDrawer() {
|
|
|
18010
18145
|
const {
|
|
18011
18146
|
width: width2 = 1040 /* Normal */
|
|
18012
18147
|
} = firstContent ?? {};
|
|
18013
|
-
(0,
|
|
18148
|
+
(0, import_react90.useEffect)(() => {
|
|
18014
18149
|
if (content) {
|
|
18015
18150
|
document.body.style.overflow = "hidden";
|
|
18016
18151
|
return () => {
|
|
@@ -18018,7 +18153,7 @@ function SuperDrawer() {
|
|
|
18018
18153
|
};
|
|
18019
18154
|
}
|
|
18020
18155
|
}, [content]);
|
|
18021
|
-
(0,
|
|
18156
|
+
(0, import_react90.useEffect)(
|
|
18022
18157
|
() => {
|
|
18023
18158
|
if (headerRef.current?.childNodes.length === 0 && content) {
|
|
18024
18159
|
headerRef.current.appendChild(sdHeaderDiv);
|
|
@@ -18028,12 +18163,12 @@ function SuperDrawer() {
|
|
|
18028
18163
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18029
18164
|
[headerRef, content]
|
|
18030
18165
|
);
|
|
18031
|
-
return (0, import_react_dom4.createPortal)(/* @__PURE__ */ (0,
|
|
18166
|
+
return (0, import_react_dom4.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_framer_motion.AnimatePresence, { children: content && /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_jsx_runtime99.Fragment, { children: /* @__PURE__ */ (0, import_react91.createElement)(
|
|
18032
18167
|
import_framer_motion.motion.div,
|
|
18033
18168
|
{
|
|
18034
18169
|
...testId,
|
|
18035
18170
|
key: "superDrawer",
|
|
18036
|
-
...(0,
|
|
18171
|
+
...(0, import_runtime64.trussProps)({
|
|
18037
18172
|
position: "fixed",
|
|
18038
18173
|
display: "df",
|
|
18039
18174
|
justifyContent: "jcfe",
|
|
@@ -18043,7 +18178,7 @@ function SuperDrawer() {
|
|
|
18043
18178
|
bottom: "bottom0",
|
|
18044
18179
|
left: "left0",
|
|
18045
18180
|
zIndex: ["z_var", {
|
|
18046
|
-
"--zIndex": (0,
|
|
18181
|
+
"--zIndex": (0, import_runtime64.maybeCssVar)(zIndices.superDrawerScrim)
|
|
18047
18182
|
}]
|
|
18048
18183
|
}),
|
|
18049
18184
|
initial: {
|
|
@@ -18060,14 +18195,14 @@ function SuperDrawer() {
|
|
|
18060
18195
|
},
|
|
18061
18196
|
onClick: closeDrawer
|
|
18062
18197
|
},
|
|
18063
|
-
/* @__PURE__ */ (0,
|
|
18198
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
18064
18199
|
import_framer_motion.motion.aside,
|
|
18065
18200
|
{
|
|
18066
|
-
...(0,
|
|
18201
|
+
...(0, import_runtime64.trussProps)({
|
|
18067
18202
|
backgroundColor: "bgWhite",
|
|
18068
18203
|
height: "h100",
|
|
18069
18204
|
maxWidth: ["maxw_var", {
|
|
18070
|
-
"--maxWidth": (0,
|
|
18205
|
+
"--maxWidth": (0, import_runtime64.maybeCssVar)(px(width2))
|
|
18071
18206
|
}],
|
|
18072
18207
|
width: "w100",
|
|
18073
18208
|
display: "df",
|
|
@@ -18093,10 +18228,10 @@ function SuperDrawer() {
|
|
|
18093
18228
|
x: width2
|
|
18094
18229
|
},
|
|
18095
18230
|
onClick: (e) => e.stopPropagation(),
|
|
18096
|
-
children: /* @__PURE__ */ (0,
|
|
18097
|
-
/* @__PURE__ */ (0,
|
|
18098
|
-
/* @__PURE__ */ (0,
|
|
18099
|
-
/* @__PURE__ */ (0,
|
|
18231
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(AutoSaveStatusProvider, { children: [
|
|
18232
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsxs)("header", { className: "pt3 pb3 pr3 pl3 bbs_solid bbw_1px bcGray200 df aic jcsb gap3", children: [
|
|
18233
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)("div", { ref: headerRef, className: "gray900 fg1" }),
|
|
18234
|
+
/* @__PURE__ */ (0, import_jsx_runtime99.jsx)(IconButton, { icon: "x", onClick: closeDrawer, ...testId.close })
|
|
18100
18235
|
] }),
|
|
18101
18236
|
content
|
|
18102
18237
|
] })
|
|
@@ -18120,7 +18255,7 @@ function defaultLabel(id) {
|
|
|
18120
18255
|
}
|
|
18121
18256
|
|
|
18122
18257
|
// src/forms/BoundCheckboxField.tsx
|
|
18123
|
-
var
|
|
18258
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
18124
18259
|
function BoundCheckboxField(props) {
|
|
18125
18260
|
const {
|
|
18126
18261
|
field,
|
|
@@ -18132,7 +18267,7 @@ function BoundCheckboxField(props) {
|
|
|
18132
18267
|
...others
|
|
18133
18268
|
} = props;
|
|
18134
18269
|
const testId = useTestIds(props, field.key);
|
|
18135
|
-
return /* @__PURE__ */ (0,
|
|
18270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_mobx_react2.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
18136
18271
|
Checkbox,
|
|
18137
18272
|
{
|
|
18138
18273
|
label,
|
|
@@ -18159,7 +18294,7 @@ function BoundCheckboxField(props) {
|
|
|
18159
18294
|
|
|
18160
18295
|
// src/forms/BoundCheckboxGroupField.tsx
|
|
18161
18296
|
var import_mobx_react3 = require("mobx-react");
|
|
18162
|
-
var
|
|
18297
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
18163
18298
|
function BoundCheckboxGroupField(props) {
|
|
18164
18299
|
const {
|
|
18165
18300
|
field,
|
|
@@ -18170,7 +18305,7 @@ function BoundCheckboxGroupField(props) {
|
|
|
18170
18305
|
...others
|
|
18171
18306
|
} = props;
|
|
18172
18307
|
const testId = useTestIds(props, field.key);
|
|
18173
|
-
return /* @__PURE__ */ (0,
|
|
18308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_mobx_react3.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
18174
18309
|
CheckboxGroup,
|
|
18175
18310
|
{
|
|
18176
18311
|
label,
|
|
@@ -18197,7 +18332,7 @@ function BoundCheckboxGroupField(props) {
|
|
|
18197
18332
|
|
|
18198
18333
|
// src/forms/BoundChipSelectField.tsx
|
|
18199
18334
|
var import_mobx_react4 = require("mobx-react");
|
|
18200
|
-
var
|
|
18335
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
18201
18336
|
function BoundChipSelectField(props) {
|
|
18202
18337
|
const {
|
|
18203
18338
|
field,
|
|
@@ -18213,7 +18348,7 @@ function BoundChipSelectField(props) {
|
|
|
18213
18348
|
...others
|
|
18214
18349
|
} = props;
|
|
18215
18350
|
const testId = useTestIds(props, field.key);
|
|
18216
|
-
return /* @__PURE__ */ (0,
|
|
18351
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_mobx_react4.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
18217
18352
|
ChipSelectField,
|
|
18218
18353
|
{
|
|
18219
18354
|
label,
|
|
@@ -18244,7 +18379,7 @@ function BoundChipSelectField(props) {
|
|
|
18244
18379
|
|
|
18245
18380
|
// src/forms/BoundDateField.tsx
|
|
18246
18381
|
var import_mobx_react5 = require("mobx-react");
|
|
18247
|
-
var
|
|
18382
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
18248
18383
|
function BoundDateField(props) {
|
|
18249
18384
|
const {
|
|
18250
18385
|
field,
|
|
@@ -18257,7 +18392,7 @@ function BoundDateField(props) {
|
|
|
18257
18392
|
...others
|
|
18258
18393
|
} = props;
|
|
18259
18394
|
const testId = useTestIds(props, field.key);
|
|
18260
|
-
return /* @__PURE__ */ (0,
|
|
18395
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_mobx_react5.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
18261
18396
|
DateField,
|
|
18262
18397
|
{
|
|
18263
18398
|
label,
|
|
@@ -18289,7 +18424,7 @@ function BoundDateField(props) {
|
|
|
18289
18424
|
|
|
18290
18425
|
// src/forms/BoundDateRangeField.tsx
|
|
18291
18426
|
var import_mobx_react6 = require("mobx-react");
|
|
18292
|
-
var
|
|
18427
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
18293
18428
|
function BoundDateRangeField(props) {
|
|
18294
18429
|
const {
|
|
18295
18430
|
field,
|
|
@@ -18302,7 +18437,7 @@ function BoundDateRangeField(props) {
|
|
|
18302
18437
|
...others
|
|
18303
18438
|
} = props;
|
|
18304
18439
|
const testId = useTestIds(props, field.key);
|
|
18305
|
-
return /* @__PURE__ */ (0,
|
|
18440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_mobx_react6.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
18306
18441
|
DateRangeField,
|
|
18307
18442
|
{
|
|
18308
18443
|
label,
|
|
@@ -18335,125 +18470,9 @@ function BoundDateRangeField(props) {
|
|
|
18335
18470
|
// src/forms/BoundForm.tsx
|
|
18336
18471
|
var import_react93 = require("react");
|
|
18337
18472
|
|
|
18338
|
-
// src/forms/
|
|
18473
|
+
// src/forms/BoundListField.tsx
|
|
18339
18474
|
var import_mobx_react7 = require("mobx-react");
|
|
18340
|
-
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
18341
|
-
function BoundIconCardField(props) {
|
|
18342
|
-
const { icon, field, onChange = (value) => field.set(value), label = defaultLabel(field.key), ...others } = props;
|
|
18343
|
-
const testId = useTestIds(props, field.key);
|
|
18344
|
-
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_mobx_react7.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
18345
|
-
IconCard,
|
|
18346
|
-
{
|
|
18347
|
-
icon,
|
|
18348
|
-
label,
|
|
18349
|
-
selected: field.value ?? false,
|
|
18350
|
-
onChange: (selected) => {
|
|
18351
|
-
onChange(selected);
|
|
18352
|
-
field.maybeAutoSave();
|
|
18353
|
-
},
|
|
18354
|
-
disabled: field.readOnly,
|
|
18355
|
-
...testId,
|
|
18356
|
-
...others
|
|
18357
|
-
}
|
|
18358
|
-
) });
|
|
18359
|
-
}
|
|
18360
|
-
|
|
18361
|
-
// src/forms/BoundIconCardGroupField.tsx
|
|
18362
|
-
var import_mobx_react8 = require("mobx-react");
|
|
18363
|
-
|
|
18364
|
-
// src/inputs/IconCardGroup.tsx
|
|
18365
|
-
var import_react91 = require("react");
|
|
18366
|
-
var import_react_aria43 = require("react-aria");
|
|
18367
|
-
var import_runtime64 = require("@homebound/truss/runtime");
|
|
18368
18475
|
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
18369
|
-
function IconCardGroup(props) {
|
|
18370
|
-
const {
|
|
18371
|
-
fieldProps
|
|
18372
|
-
} = usePresentationContext();
|
|
18373
|
-
const {
|
|
18374
|
-
options,
|
|
18375
|
-
label,
|
|
18376
|
-
labelStyle = fieldProps?.labelStyle ?? "above",
|
|
18377
|
-
values,
|
|
18378
|
-
errorMsg,
|
|
18379
|
-
helperText,
|
|
18380
|
-
disabled: isDisabled = false,
|
|
18381
|
-
onChange
|
|
18382
|
-
} = props;
|
|
18383
|
-
const [selected, setSelected] = (0, import_react91.useState)(values);
|
|
18384
|
-
const exclusiveOptions = (0, import_react91.useMemo)(() => options.filter((o) => o.exclusive), [options]);
|
|
18385
|
-
const toggleValue = (0, import_react91.useCallback)((value) => {
|
|
18386
|
-
if (isDisabled) return;
|
|
18387
|
-
const option = options.find((o) => o.value === value);
|
|
18388
|
-
if (!option) return;
|
|
18389
|
-
let newSelected = [];
|
|
18390
|
-
if (selected.includes(value)) {
|
|
18391
|
-
newSelected = selected.filter((v) => v !== value);
|
|
18392
|
-
} else {
|
|
18393
|
-
if (option.exclusive) {
|
|
18394
|
-
newSelected = [value];
|
|
18395
|
-
} else {
|
|
18396
|
-
newSelected = [...selected, value];
|
|
18397
|
-
newSelected = newSelected.filter((v) => !exclusiveOptions.some((o) => o.value === v));
|
|
18398
|
-
}
|
|
18399
|
-
}
|
|
18400
|
-
setSelected(newSelected);
|
|
18401
|
-
onChange(newSelected);
|
|
18402
|
-
}, [exclusiveOptions, isDisabled, onChange, options, selected]);
|
|
18403
|
-
const tid = useTestIds(props);
|
|
18404
|
-
const {
|
|
18405
|
-
labelProps,
|
|
18406
|
-
fieldProps: fieldPropsAria
|
|
18407
|
-
} = (0, import_react_aria43.useField)(props);
|
|
18408
|
-
const groupProps = (0, import_react_aria43.mergeProps)(tid, {
|
|
18409
|
-
role: "group",
|
|
18410
|
-
"aria-disabled": isDisabled || void 0,
|
|
18411
|
-
...fieldPropsAria
|
|
18412
|
-
});
|
|
18413
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { ...groupProps, children: [
|
|
18414
|
-
labelStyle !== "hidden" && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { ...(0, import_runtime64.trussProps)({
|
|
18415
|
-
...labelStyle === "left" ? {
|
|
18416
|
-
width: "w50"
|
|
18417
|
-
} : {}
|
|
18418
|
-
}), children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Label, { label, ...labelProps, ...tid.label }) }),
|
|
18419
|
-
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: "df gap2 flexWrap_wrap", children: options.map((option) => {
|
|
18420
|
-
const {
|
|
18421
|
-
icon,
|
|
18422
|
-
label: label2,
|
|
18423
|
-
disabled
|
|
18424
|
-
} = option;
|
|
18425
|
-
const isSelected = selected.includes(option.value);
|
|
18426
|
-
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(IconCard, { icon, label: label2, selected: isSelected, disabled, onChange: () => toggleValue(option.value), ...tid[option.label] }, option.label);
|
|
18427
|
-
}) }),
|
|
18428
|
-
errorMsg && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ErrorMessage, { errorMsg, ...tid.errorMsg }),
|
|
18429
|
-
helperText && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(HelperText, { helperText, ...tid.helperText })
|
|
18430
|
-
] });
|
|
18431
|
-
}
|
|
18432
|
-
|
|
18433
|
-
// src/forms/BoundIconCardGroupField.tsx
|
|
18434
|
-
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
18435
|
-
function BoundIconCardGroupField(props) {
|
|
18436
|
-
const { field, onChange = (value) => field.set(value), label = defaultLabel(field.key), ...others } = props;
|
|
18437
|
-
const testId = useTestIds(props, field.key);
|
|
18438
|
-
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_mobx_react8.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18439
|
-
IconCardGroup,
|
|
18440
|
-
{
|
|
18441
|
-
label,
|
|
18442
|
-
values: field.value || [],
|
|
18443
|
-
onChange: (values) => {
|
|
18444
|
-
onChange(values);
|
|
18445
|
-
field.maybeAutoSave();
|
|
18446
|
-
},
|
|
18447
|
-
disabled: field.readOnly,
|
|
18448
|
-
...testId,
|
|
18449
|
-
...others
|
|
18450
|
-
}
|
|
18451
|
-
) });
|
|
18452
|
-
}
|
|
18453
|
-
|
|
18454
|
-
// src/forms/BoundListField.tsx
|
|
18455
|
-
var import_mobx_react9 = require("mobx-react");
|
|
18456
|
-
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
18457
18476
|
function ListField({
|
|
18458
18477
|
row,
|
|
18459
18478
|
formState
|
|
@@ -18470,9 +18489,9 @@ function ListField({
|
|
|
18470
18489
|
const tid = useTestIds({}, "listField");
|
|
18471
18490
|
const filteredRows = useComputed(() => filterDeleted ? listFieldObjectState.rows.filter((rowState) => filterDeleted(rowState)) : listFieldObjectState.rows, [filterDeleted]);
|
|
18472
18491
|
const listIsValid = useComputed(() => listFieldObjectState.valid, [filteredRows]);
|
|
18473
|
-
return /* @__PURE__ */ (0,
|
|
18474
|
-
filteredRows.map((rowState, index) => /* @__PURE__ */ (0,
|
|
18475
|
-
/* @__PURE__ */ (0,
|
|
18492
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_mobx_react7.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "df fdc gap3", ...tid, children: [
|
|
18493
|
+
filteredRows.map((rowState, index) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ListFieldRowInputs, { rowState, rowNumber: index + 1, listFieldConfig, formState, listFieldKey }, `listFieldRowInputs-${listFieldKey}-${index}`)),
|
|
18494
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { icon: "plus", label: `Add ${listFieldConfig.name}`, onClick: () => onNew(listFieldObjectState), variant: "secondary", disabled: !listIsValid }) })
|
|
18476
18495
|
] }) });
|
|
18477
18496
|
}
|
|
18478
18497
|
function ListFieldRowInputs({
|
|
@@ -18486,21 +18505,21 @@ function ListFieldRowInputs({
|
|
|
18486
18505
|
onDelete
|
|
18487
18506
|
} = listFieldConfig;
|
|
18488
18507
|
const tid = useTestIds({}, "listFieldRow");
|
|
18489
|
-
return /* @__PURE__ */ (0,
|
|
18490
|
-
/* @__PURE__ */ (0,
|
|
18491
|
-
/* @__PURE__ */ (0,
|
|
18508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)(import_jsx_runtime105.Fragment, { children: [
|
|
18509
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "df jcsb", ...tid, children: [
|
|
18510
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("span", { className: "fw6 fz_16px lh_24px", ...tid.name, children: [
|
|
18492
18511
|
listFieldConfig.name,
|
|
18493
18512
|
" ",
|
|
18494
18513
|
rowNumber
|
|
18495
18514
|
] }),
|
|
18496
|
-
onDelete && /* @__PURE__ */ (0,
|
|
18515
|
+
onDelete && /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ButtonMenu, { trigger: {
|
|
18497
18516
|
icon: "verticalDots"
|
|
18498
18517
|
}, items: [{
|
|
18499
18518
|
label: "Delete",
|
|
18500
18519
|
onClick: () => onDelete(formState[listFieldKey], rowState)
|
|
18501
18520
|
}], ...tid.menu })
|
|
18502
18521
|
] }),
|
|
18503
|
-
listFieldConfig.rows.map((row, rowIndex) => /* @__PURE__ */ (0,
|
|
18522
|
+
listFieldConfig.rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(FormRow, { row, formState: rowState }, `listField-${listFieldKey}-row-${rowIndex}`))
|
|
18504
18523
|
] });
|
|
18505
18524
|
}
|
|
18506
18525
|
function isListFieldKey(key) {
|
|
@@ -18517,8 +18536,8 @@ function isListFieldRow(row) {
|
|
|
18517
18536
|
}
|
|
18518
18537
|
|
|
18519
18538
|
// src/forms/BoundMultiLineSelectField.tsx
|
|
18520
|
-
var
|
|
18521
|
-
var
|
|
18539
|
+
var import_mobx_react8 = require("mobx-react");
|
|
18540
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
18522
18541
|
function BoundMultiLineSelectField(props) {
|
|
18523
18542
|
const {
|
|
18524
18543
|
field,
|
|
@@ -18535,7 +18554,7 @@ function BoundMultiLineSelectField(props) {
|
|
|
18535
18554
|
...others
|
|
18536
18555
|
} = props;
|
|
18537
18556
|
const testId = useTestIds(props, field.key);
|
|
18538
|
-
return /* @__PURE__ */ (0,
|
|
18557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_mobx_react8.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
18539
18558
|
MultiLineSelectField,
|
|
18540
18559
|
{
|
|
18541
18560
|
label,
|
|
@@ -18565,8 +18584,8 @@ function BoundMultiLineSelectField(props) {
|
|
|
18565
18584
|
}
|
|
18566
18585
|
|
|
18567
18586
|
// src/forms/BoundMultiSelectField.tsx
|
|
18568
|
-
var
|
|
18569
|
-
var
|
|
18587
|
+
var import_mobx_react9 = require("mobx-react");
|
|
18588
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
18570
18589
|
function BoundMultiSelectField(props) {
|
|
18571
18590
|
const {
|
|
18572
18591
|
field,
|
|
@@ -18583,7 +18602,7 @@ function BoundMultiSelectField(props) {
|
|
|
18583
18602
|
...others
|
|
18584
18603
|
} = props;
|
|
18585
18604
|
const testId = useTestIds(props, field.key);
|
|
18586
|
-
return /* @__PURE__ */ (0,
|
|
18605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_mobx_react9.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
18587
18606
|
MultiSelectField,
|
|
18588
18607
|
{
|
|
18589
18608
|
label,
|
|
@@ -18613,8 +18632,8 @@ function BoundMultiSelectField(props) {
|
|
|
18613
18632
|
}
|
|
18614
18633
|
|
|
18615
18634
|
// src/forms/BoundNumberField.tsx
|
|
18616
|
-
var
|
|
18617
|
-
var
|
|
18635
|
+
var import_mobx_react10 = require("mobx-react");
|
|
18636
|
+
var import_jsx_runtime108 = require("react/jsx-runtime");
|
|
18618
18637
|
function BoundNumberField(props) {
|
|
18619
18638
|
const {
|
|
18620
18639
|
field,
|
|
@@ -18628,7 +18647,7 @@ function BoundNumberField(props) {
|
|
|
18628
18647
|
...others
|
|
18629
18648
|
} = props;
|
|
18630
18649
|
const testId = useTestIds(props, label || field.key);
|
|
18631
|
-
return /* @__PURE__ */ (0,
|
|
18650
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_mobx_react10.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
18632
18651
|
NumberField,
|
|
18633
18652
|
{
|
|
18634
18653
|
label,
|
|
@@ -18657,8 +18676,8 @@ function BoundNumberField(props) {
|
|
|
18657
18676
|
}
|
|
18658
18677
|
|
|
18659
18678
|
// src/forms/BoundRadioGroupField.tsx
|
|
18660
|
-
var
|
|
18661
|
-
var
|
|
18679
|
+
var import_mobx_react11 = require("mobx-react");
|
|
18680
|
+
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
18662
18681
|
function BoundRadioGroupField(props) {
|
|
18663
18682
|
const {
|
|
18664
18683
|
field,
|
|
@@ -18669,7 +18688,7 @@ function BoundRadioGroupField(props) {
|
|
|
18669
18688
|
...others
|
|
18670
18689
|
} = props;
|
|
18671
18690
|
const testId = useTestIds(props, field.key);
|
|
18672
|
-
return /* @__PURE__ */ (0,
|
|
18691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_mobx_react11.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
18673
18692
|
RadioGroupField,
|
|
18674
18693
|
{
|
|
18675
18694
|
label,
|
|
@@ -18695,8 +18714,8 @@ function BoundRadioGroupField(props) {
|
|
|
18695
18714
|
}
|
|
18696
18715
|
|
|
18697
18716
|
// src/forms/BoundRichTextField.tsx
|
|
18698
|
-
var
|
|
18699
|
-
var
|
|
18717
|
+
var import_mobx_react12 = require("mobx-react");
|
|
18718
|
+
var import_jsx_runtime110 = require("react/jsx-runtime");
|
|
18700
18719
|
function BoundRichTextField(props) {
|
|
18701
18720
|
const {
|
|
18702
18721
|
field,
|
|
@@ -18708,7 +18727,7 @@ function BoundRichTextField(props) {
|
|
|
18708
18727
|
...others
|
|
18709
18728
|
} = props;
|
|
18710
18729
|
const testId = useTestIds(props, field.key);
|
|
18711
|
-
return /* @__PURE__ */ (0,
|
|
18730
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_mobx_react12.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
18712
18731
|
RichTextField,
|
|
18713
18732
|
{
|
|
18714
18733
|
label,
|
|
@@ -18729,6 +18748,51 @@ function BoundRichTextField(props) {
|
|
|
18729
18748
|
) });
|
|
18730
18749
|
}
|
|
18731
18750
|
|
|
18751
|
+
// src/forms/BoundSelectCardField.tsx
|
|
18752
|
+
var import_mobx_react13 = require("mobx-react");
|
|
18753
|
+
var import_jsx_runtime111 = require("react/jsx-runtime");
|
|
18754
|
+
function BoundSelectCardField(props) {
|
|
18755
|
+
const { icon, field, onChange = (value) => field.set(value), label = defaultLabel(field.key), ...others } = props;
|
|
18756
|
+
const testId = useTestIds(props, field.key);
|
|
18757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(import_mobx_react13.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
18758
|
+
SelectCard,
|
|
18759
|
+
{
|
|
18760
|
+
icon,
|
|
18761
|
+
label,
|
|
18762
|
+
selected: field.value ?? false,
|
|
18763
|
+
onChange: (selected) => {
|
|
18764
|
+
onChange(selected);
|
|
18765
|
+
field.maybeAutoSave();
|
|
18766
|
+
},
|
|
18767
|
+
disabled: field.readOnly,
|
|
18768
|
+
...testId,
|
|
18769
|
+
...others
|
|
18770
|
+
}
|
|
18771
|
+
) });
|
|
18772
|
+
}
|
|
18773
|
+
|
|
18774
|
+
// src/forms/BoundSelectCardGroupField.tsx
|
|
18775
|
+
var import_mobx_react14 = require("mobx-react");
|
|
18776
|
+
var import_jsx_runtime112 = require("react/jsx-runtime");
|
|
18777
|
+
function BoundSelectCardGroupField(props) {
|
|
18778
|
+
const { field, onChange = (value) => field.set(value), label = defaultLabel(field.key), ...others } = props;
|
|
18779
|
+
const testId = useTestIds(props, field.key);
|
|
18780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(import_mobx_react14.Observer, { children: () => /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
18781
|
+
SelectCardGroup,
|
|
18782
|
+
{
|
|
18783
|
+
label,
|
|
18784
|
+
values: field.value || [],
|
|
18785
|
+
onChange: (values) => {
|
|
18786
|
+
onChange(values);
|
|
18787
|
+
field.maybeAutoSave();
|
|
18788
|
+
},
|
|
18789
|
+
disabled: field.readOnly,
|
|
18790
|
+
...testId,
|
|
18791
|
+
...others
|
|
18792
|
+
}
|
|
18793
|
+
) });
|
|
18794
|
+
}
|
|
18795
|
+
|
|
18732
18796
|
// src/forms/BoundSelectField.tsx
|
|
18733
18797
|
var import_mobx_react15 = require("mobx-react");
|
|
18734
18798
|
var import_jsx_runtime113 = require("react/jsx-runtime");
|
|
@@ -19174,15 +19238,15 @@ function boundCheckboxGroupField(props) {
|
|
|
19174
19238
|
minWidth: "200px"
|
|
19175
19239
|
});
|
|
19176
19240
|
}
|
|
19177
|
-
function
|
|
19241
|
+
function boundSelectCardField(props) {
|
|
19178
19242
|
return (field) => ({
|
|
19179
|
-
component: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
19243
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(BoundSelectCardField, { field, ...props }),
|
|
19180
19244
|
minWidth: "150px"
|
|
19181
19245
|
});
|
|
19182
19246
|
}
|
|
19183
|
-
function
|
|
19247
|
+
function boundSelectCardGroupField(props) {
|
|
19184
19248
|
return (field) => ({
|
|
19185
|
-
component: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
19249
|
+
component: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(BoundSelectCardGroupField, { field, ...props }),
|
|
19186
19250
|
minWidth: "100%"
|
|
19187
19251
|
});
|
|
19188
19252
|
}
|
|
@@ -19760,7 +19824,7 @@ var activeStyles = {
|
|
|
19760
19824
|
"--boxShadow": (0, import_runtime72.maybeCssVar)(`inset 3px 0px 0 0px ${"rgba(37, 99, 235, 1)" /* Blue600 */}`)
|
|
19761
19825
|
}]
|
|
19762
19826
|
};
|
|
19763
|
-
var
|
|
19827
|
+
var hoverStyles3 = {
|
|
19764
19828
|
backgroundColor: "bgBlue50",
|
|
19765
19829
|
fontWeight: "fw6",
|
|
19766
19830
|
fontSize: "fz_14px",
|
|
@@ -19828,7 +19892,7 @@ function SectionNavLink(props) {
|
|
|
19828
19892
|
},
|
|
19829
19893
|
...isFocusVisible ? defaultFocusRingStyles : {},
|
|
19830
19894
|
...active ? activeStyles : {},
|
|
19831
|
-
...isPressed ? activeStyles : isHovered ?
|
|
19895
|
+
...isPressed ? activeStyles : isHovered ? hoverStyles3 : {}
|
|
19832
19896
|
}), ...tids.sectionNavLink, children: section.title });
|
|
19833
19897
|
}
|
|
19834
19898
|
function useActiveSection(sectionsWithRefs) {
|
|
@@ -21702,7 +21766,7 @@ function GroupButton(props) {
|
|
|
21702
21766
|
},
|
|
21703
21767
|
...isFocusVisible ? defaultFocusRingStyles2 : {},
|
|
21704
21768
|
...active ? activeStyles2 : {},
|
|
21705
|
-
...isPressed ? pressedStyles : isHovered ?
|
|
21769
|
+
...isPressed ? pressedStyles : isHovered ? hoverStyles4 : {},
|
|
21706
21770
|
...icon ? iconStyles2[size] : {}
|
|
21707
21771
|
}), ...tid[defaultTestId(typeof text === "string" && text || icon || "button")], children: [
|
|
21708
21772
|
icon && /* @__PURE__ */ (0, import_jsx_runtime160.jsx)(Icon, { xss: {
|
|
@@ -21720,7 +21784,7 @@ var pressedStyles = {
|
|
|
21720
21784
|
var activeStyles2 = {
|
|
21721
21785
|
backgroundColor: "bgGray300"
|
|
21722
21786
|
};
|
|
21723
|
-
var
|
|
21787
|
+
var hoverStyles4 = {
|
|
21724
21788
|
backgroundColor: "bgGray100"
|
|
21725
21789
|
};
|
|
21726
21790
|
var defaultFocusRingStyles2 = {
|
|
@@ -22810,7 +22874,7 @@ function AppNavGroupTrigger(props) {
|
|
|
22810
22874
|
const {
|
|
22811
22875
|
baseStyles: baseStyles5,
|
|
22812
22876
|
focusRingStyles: focusRingStyles2,
|
|
22813
|
-
hoverStyles:
|
|
22877
|
+
hoverStyles: hoverStyles5,
|
|
22814
22878
|
pressedStyles: pressedStyles2
|
|
22815
22879
|
} = (0, import_react127.useMemo)(() => getNavLinkStyles("side"), []);
|
|
22816
22880
|
return /* @__PURE__ */ (0, import_jsx_runtime172.jsxs)("button", { type: "button", ...(0, import_react_aria53.mergeProps)(buttonProps, focusProps, hoverProps, tid.trigger, {
|
|
@@ -22820,7 +22884,7 @@ function AppNavGroupTrigger(props) {
|
|
|
22820
22884
|
...(0, import_runtime96.mergeProps)(navLink, void 0, {
|
|
22821
22885
|
...baseStyles5,
|
|
22822
22886
|
...isFocusVisible && focusRingStyles2,
|
|
22823
|
-
...isHovered &&
|
|
22887
|
+
...isHovered && hoverStyles5,
|
|
22824
22888
|
...isPressed && pressedStyles2
|
|
22825
22889
|
})
|
|
22826
22890
|
}), children: [
|
|
@@ -23477,7 +23541,7 @@ function TabImpl(props) {
|
|
|
23477
23541
|
baseStyles: baseStyles5,
|
|
23478
23542
|
activeStyles: activeStyles3,
|
|
23479
23543
|
focusRingStyles: focusRingStyles2,
|
|
23480
|
-
hoverStyles:
|
|
23544
|
+
hoverStyles: hoverStyles5,
|
|
23481
23545
|
disabledStyles: disabledStyles4,
|
|
23482
23546
|
activeHoverStyles
|
|
23483
23547
|
} = (0, import_react132.useMemo)(() => getTabStyles(), []);
|
|
@@ -23494,7 +23558,7 @@ function TabImpl(props) {
|
|
|
23494
23558
|
...baseStyles5,
|
|
23495
23559
|
...active && activeStyles3,
|
|
23496
23560
|
...isDisabled && disabledStyles4,
|
|
23497
|
-
...isHovered &&
|
|
23561
|
+
...isHovered && hoverStyles5,
|
|
23498
23562
|
...isHovered && active && activeHoverStyles,
|
|
23499
23563
|
...isFocusVisible && active && focusRingStyles2
|
|
23500
23564
|
})
|
|
@@ -24981,14 +25045,14 @@ function PageHeaderLayout(props) {
|
|
|
24981
25045
|
BoundDateField,
|
|
24982
25046
|
BoundDateRangeField,
|
|
24983
25047
|
BoundForm,
|
|
24984
|
-
BoundIconCardField,
|
|
24985
|
-
BoundIconCardGroupField,
|
|
24986
25048
|
BoundMultiLineSelectField,
|
|
24987
25049
|
BoundMultiSelectField,
|
|
24988
25050
|
BoundNumberField,
|
|
24989
25051
|
BoundRadioGroupField,
|
|
24990
25052
|
BoundRichTextField,
|
|
24991
25053
|
BoundSelectAndTextField,
|
|
25054
|
+
BoundSelectCardField,
|
|
25055
|
+
BoundSelectCardGroupField,
|
|
24992
25056
|
BoundSelectField,
|
|
24993
25057
|
BoundSwitchField,
|
|
24994
25058
|
BoundTextAreaField,
|
|
@@ -25048,7 +25112,6 @@ function PageHeaderLayout(props) {
|
|
|
25048
25112
|
HomeboundLogo,
|
|
25049
25113
|
Icon,
|
|
25050
25114
|
IconButton,
|
|
25051
|
-
IconCard,
|
|
25052
25115
|
Icons,
|
|
25053
25116
|
KEPT_GROUP,
|
|
25054
25117
|
Loader,
|
|
@@ -25090,6 +25153,8 @@ function PageHeaderLayout(props) {
|
|
|
25090
25153
|
ScrollableContent,
|
|
25091
25154
|
ScrollableFooter,
|
|
25092
25155
|
ScrollableParent,
|
|
25156
|
+
SelectCard,
|
|
25157
|
+
SelectCardGroup,
|
|
25093
25158
|
SelectField,
|
|
25094
25159
|
SelectToggle,
|
|
25095
25160
|
SideNav,
|
|
@@ -25138,13 +25203,13 @@ function PageHeaderLayout(props) {
|
|
|
25138
25203
|
boundCheckboxGroupField,
|
|
25139
25204
|
boundDateField,
|
|
25140
25205
|
boundDateRangeField,
|
|
25141
|
-
boundIconCardField,
|
|
25142
|
-
boundIconCardGroupField,
|
|
25143
25206
|
boundMultiSelectField,
|
|
25144
25207
|
boundMultilineSelectField,
|
|
25145
25208
|
boundNumberField,
|
|
25146
25209
|
boundRadioGroupField,
|
|
25147
25210
|
boundRichTextField,
|
|
25211
|
+
boundSelectCardField,
|
|
25212
|
+
boundSelectCardGroupField,
|
|
25148
25213
|
boundSelectField,
|
|
25149
25214
|
boundSwitchField,
|
|
25150
25215
|
boundTextAreaField,
|
|
@@ -25184,6 +25249,7 @@ function PageHeaderLayout(props) {
|
|
|
25184
25249
|
emptyCell,
|
|
25185
25250
|
ensureClientSideSortValueIsSortable,
|
|
25186
25251
|
environmentBannerSizePx,
|
|
25252
|
+
fillRowStyles,
|
|
25187
25253
|
filterTestIdPrefix,
|
|
25188
25254
|
formatDate,
|
|
25189
25255
|
formatDateRange,
|
|
@@ -25200,7 +25266,6 @@ function PageHeaderLayout(props) {
|
|
|
25200
25266
|
getTableStyles,
|
|
25201
25267
|
headerRenderFn,
|
|
25202
25268
|
hoverStyles,
|
|
25203
|
-
iconCardStylesHover,
|
|
25204
25269
|
increment,
|
|
25205
25270
|
insertAtIndex,
|
|
25206
25271
|
isContentColumn,
|
|
@@ -25242,7 +25307,6 @@ function PageHeaderLayout(props) {
|
|
|
25242
25307
|
rowClickRenderFn,
|
|
25243
25308
|
rowLinkRenderFn,
|
|
25244
25309
|
selectColumn,
|
|
25245
|
-
selectedStyles,
|
|
25246
25310
|
setDefaultStyle,
|
|
25247
25311
|
setEnvironmentFavicon,
|
|
25248
25312
|
setGridTableDefaults,
|