@homebound/beam 4.9.2 → 4.11.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 +358 -261
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -7
- package/dist/index.d.ts +22 -7
- package/dist/index.js +330 -233
- package/dist/index.js.map +1 -1
- package/dist/truss.css +2 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5580,13 +5580,14 @@ function IconButton(props) {
|
|
|
5580
5580
|
const isCircle = variant === "circle";
|
|
5581
5581
|
const isOutline = variant === "outline";
|
|
5582
5582
|
const styles = useMemo4(() => {
|
|
5583
|
-
const variantKey = isCircle ? "circle" : isOutline ? "outline" : compact ? "compact" : "default";
|
|
5584
5583
|
const {
|
|
5585
5584
|
base,
|
|
5586
5585
|
hover,
|
|
5587
5586
|
focus,
|
|
5588
5587
|
pressed
|
|
5589
|
-
} = variantStyles
|
|
5588
|
+
} = variantStyles(variant, {
|
|
5589
|
+
compact
|
|
5590
|
+
});
|
|
5590
5591
|
return {
|
|
5591
5592
|
...iconButtonStylesReset,
|
|
5592
5593
|
...base,
|
|
@@ -5600,7 +5601,7 @@ function IconButton(props) {
|
|
|
5600
5601
|
}]
|
|
5601
5602
|
}
|
|
5602
5603
|
};
|
|
5603
|
-
}, [isHovered, isFocusVisible, isDisabled, compact,
|
|
5604
|
+
}, [isHovered, isFocusVisible, isDisabled, compact, variant, isPressing, bgColor, forceFocusStyles]);
|
|
5604
5605
|
const iconColor = isCircle ? circleIconColor : defaultIconColor;
|
|
5605
5606
|
const buttonAttrs = {
|
|
5606
5607
|
...testIds,
|
|
@@ -5637,36 +5638,93 @@ var iconButtonStylesDisabled = {
|
|
|
5637
5638
|
"--backgroundColor": "var(--b-surface-disabled)"
|
|
5638
5639
|
}]
|
|
5639
5640
|
};
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5641
|
+
function variantStyles(variant, {
|
|
5642
|
+
compact
|
|
5643
|
+
}) {
|
|
5644
|
+
if (variant === "circle") {
|
|
5645
|
+
return {
|
|
5646
|
+
base: {
|
|
5647
|
+
borderRadius: "br100",
|
|
5648
|
+
height: ["sq_var", {
|
|
5649
|
+
"--height": `${compact ? 32 : 48}px`
|
|
5650
|
+
}],
|
|
5651
|
+
width: ["sq_var", {
|
|
5652
|
+
"--width": `${compact ? 32 : 48}px`
|
|
5653
|
+
}],
|
|
5654
|
+
borderColor: ["bc_var", {
|
|
5655
|
+
"--borderColor": "var(--b-field-border-default)"
|
|
5656
|
+
}],
|
|
5657
|
+
borderStyle: "bss",
|
|
5658
|
+
borderWidth: "bw1",
|
|
5659
|
+
display: "df",
|
|
5660
|
+
justifyContent: "jcc",
|
|
5661
|
+
alignItems: "aic",
|
|
5662
|
+
backgroundColor: ["bgColor_var", {
|
|
5663
|
+
"--backgroundColor": "var(--b-surface-raised)"
|
|
5664
|
+
}]
|
|
5665
|
+
},
|
|
5666
|
+
hover: {
|
|
5667
|
+
backgroundColor: "bgBlue100",
|
|
5668
|
+
borderColor: "bcBlue200"
|
|
5669
|
+
},
|
|
5670
|
+
focus: {
|
|
5671
|
+
backgroundColor: "bgBlue100",
|
|
5672
|
+
borderColor: ["bc_var", {
|
|
5673
|
+
"--borderColor": "var(--b-field-border-focus)"
|
|
5674
|
+
}]
|
|
5675
|
+
},
|
|
5676
|
+
pressed: {
|
|
5677
|
+
backgroundColor: ["bgColor_var", {
|
|
5678
|
+
"--backgroundColor": "var(--b-neutral-fill-pressed)"
|
|
5679
|
+
}],
|
|
5680
|
+
borderColor: ["bc_var", {
|
|
5681
|
+
"--borderColor": "var(--b-neutral-fill-pressed)"
|
|
5682
|
+
}]
|
|
5683
|
+
}
|
|
5684
|
+
};
|
|
5685
|
+
}
|
|
5686
|
+
if (variant === "outline") {
|
|
5687
|
+
return {
|
|
5688
|
+
base: {
|
|
5689
|
+
borderRadius: "br8",
|
|
5690
|
+
width: "w_42px",
|
|
5691
|
+
height: "h_40px",
|
|
5692
|
+
borderColor: "bcGray300",
|
|
5693
|
+
borderStyle: "bss",
|
|
5694
|
+
borderWidth: "bw1",
|
|
5695
|
+
display: "df",
|
|
5696
|
+
justifyContent: "jcc",
|
|
5697
|
+
alignItems: "aic",
|
|
5698
|
+
backgroundColor: ["bgColor_var", {
|
|
5699
|
+
"--backgroundColor": "var(--b-surface-raised)"
|
|
5700
|
+
}]
|
|
5701
|
+
},
|
|
5702
|
+
hover: {
|
|
5703
|
+
backgroundColor: ["bgColor_var", {
|
|
5704
|
+
"--backgroundColor": "var(--b-surface-raised-hover)"
|
|
5705
|
+
}]
|
|
5706
|
+
},
|
|
5707
|
+
focus: {
|
|
5708
|
+
boxShadow: "bshFocus"
|
|
5709
|
+
},
|
|
5710
|
+
pressed: {
|
|
5711
|
+
backgroundColor: ["bgColor_var", {
|
|
5712
|
+
"--backgroundColor": "var(--b-surface-raised-pressed)"
|
|
5713
|
+
}]
|
|
5714
|
+
}
|
|
5715
|
+
};
|
|
5716
|
+
}
|
|
5717
|
+
return {
|
|
5718
|
+
base: compact ? {
|
|
5666
5719
|
height: "h_18px",
|
|
5667
5720
|
width: "w_18px",
|
|
5668
5721
|
borderRadius: "br4",
|
|
5669
5722
|
borderWidth: "bw1"
|
|
5723
|
+
} : {
|
|
5724
|
+
height: "h_28px",
|
|
5725
|
+
width: "w_28px",
|
|
5726
|
+
borderRadius: "br8",
|
|
5727
|
+
borderWidth: "bw2"
|
|
5670
5728
|
},
|
|
5671
5729
|
hover: {
|
|
5672
5730
|
backgroundColor: ["bgColor_var", {
|
|
@@ -5683,71 +5741,8 @@ var variantStyles = {
|
|
|
5683
5741
|
"--backgroundColor": "var(--b-neutral-fill-hover-strong)"
|
|
5684
5742
|
}]
|
|
5685
5743
|
}
|
|
5686
|
-
}
|
|
5687
|
-
|
|
5688
|
-
// Blue100/200 hover fills have no semantic tokens — keep palette for those.
|
|
5689
|
-
base: {
|
|
5690
|
-
borderRadius: "br100",
|
|
5691
|
-
height: "h_48px",
|
|
5692
|
-
width: "w_48px",
|
|
5693
|
-
borderColor: ["bc_var", {
|
|
5694
|
-
"--borderColor": "var(--b-field-border-default)"
|
|
5695
|
-
}],
|
|
5696
|
-
borderStyle: "bss",
|
|
5697
|
-
borderWidth: "bw1",
|
|
5698
|
-
display: "df",
|
|
5699
|
-
justifyContent: "jcc",
|
|
5700
|
-
alignItems: "aic"
|
|
5701
|
-
},
|
|
5702
|
-
hover: {
|
|
5703
|
-
backgroundColor: "bgBlue100",
|
|
5704
|
-
borderColor: "bcBlue200"
|
|
5705
|
-
},
|
|
5706
|
-
focus: {
|
|
5707
|
-
backgroundColor: "bgBlue100",
|
|
5708
|
-
borderColor: ["bc_var", {
|
|
5709
|
-
"--borderColor": "var(--b-field-border-focus)"
|
|
5710
|
-
}]
|
|
5711
|
-
},
|
|
5712
|
-
pressed: {
|
|
5713
|
-
backgroundColor: ["bgColor_var", {
|
|
5714
|
-
"--backgroundColor": "var(--b-neutral-fill-pressed)"
|
|
5715
|
-
}],
|
|
5716
|
-
borderColor: ["bc_var", {
|
|
5717
|
-
"--borderColor": "var(--b-neutral-fill-pressed)"
|
|
5718
|
-
}]
|
|
5719
|
-
}
|
|
5720
|
-
},
|
|
5721
|
-
outline: {
|
|
5722
|
-
base: {
|
|
5723
|
-
borderRadius: "br8",
|
|
5724
|
-
width: "w_42px",
|
|
5725
|
-
height: "h_40px",
|
|
5726
|
-
borderColor: "bcGray300",
|
|
5727
|
-
borderStyle: "bss",
|
|
5728
|
-
borderWidth: "bw1",
|
|
5729
|
-
display: "df",
|
|
5730
|
-
justifyContent: "jcc",
|
|
5731
|
-
alignItems: "aic",
|
|
5732
|
-
backgroundColor: ["bgColor_var", {
|
|
5733
|
-
"--backgroundColor": "var(--b-surface-raised)"
|
|
5734
|
-
}]
|
|
5735
|
-
},
|
|
5736
|
-
hover: {
|
|
5737
|
-
backgroundColor: ["bgColor_var", {
|
|
5738
|
-
"--backgroundColor": "var(--b-surface-raised-hover)"
|
|
5739
|
-
}]
|
|
5740
|
-
},
|
|
5741
|
-
focus: {
|
|
5742
|
-
boxShadow: "bshFocus"
|
|
5743
|
-
},
|
|
5744
|
-
pressed: {
|
|
5745
|
-
backgroundColor: ["bgColor_var", {
|
|
5746
|
-
"--backgroundColor": "var(--b-surface-raised-pressed)"
|
|
5747
|
-
}]
|
|
5748
|
-
}
|
|
5749
|
-
}
|
|
5750
|
-
};
|
|
5744
|
+
};
|
|
5745
|
+
}
|
|
5751
5746
|
|
|
5752
5747
|
// src/components/Table/utils/TableState.ts
|
|
5753
5748
|
import { makeAutoObservable as makeAutoObservable4, observableRef as observableRef3, reaction as reaction4 } from "mobx";
|
|
@@ -5964,6 +5959,8 @@ var zIndices = {
|
|
|
5964
5959
|
scrollShadow: 50,
|
|
5965
5960
|
// Document-scroll detail pane (DocumentScrollOverlayRightPaneLayout) — above table sticky chrome, below page sticky headers.
|
|
5966
5961
|
rightPane: 60,
|
|
5962
|
+
// Workflow floating right-pane triggers — above the pane, below sticky headers.
|
|
5963
|
+
rightPaneTriggers: 65,
|
|
5967
5964
|
pageStickyHeader: 70,
|
|
5968
5965
|
// Sticky mobile action footer (workflow layouts) — same tier as pageStickyHeader; header and footer never overlap on screen.
|
|
5969
5966
|
pageStickyFooter: 70,
|
|
@@ -10714,6 +10711,8 @@ function TextFieldBase(props) {
|
|
|
10714
10711
|
const compactFieldHeight = 32;
|
|
10715
10712
|
const showProposal = proposedValue !== void 0;
|
|
10716
10713
|
const showOriginal = originalValue !== void 0 && originalValue !== "";
|
|
10714
|
+
const originalBelow = showOriginal && !inputProps.readOnly && !compound ? originalValue : void 0;
|
|
10715
|
+
const showErrorAndHelper = alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly;
|
|
10717
10716
|
const [bgColor, hoverBgColor, disabledBgColor] = showProposal ? ["--b-ai-field-bg" /* AiFieldBg */, "rgba(237, 233, 254, 1)" /* Purple100 */, "--b-field-bg-disabled" /* FieldBgDisabled */] : inputStylePalette ? getInputStylePalette(inputStylePalette) : borderOnHover ? (
|
|
10718
10717
|
// Use transparent backgrounds to blend with the table row hover color
|
|
10719
10718
|
["rgba(0,0,0,0)" /* Transparent */, "rgba(219, 234, 254, 1)" /* Blue100 */, "rgba(247, 245, 245, 1)" /* Gray100 */]
|
|
@@ -11039,21 +11038,6 @@ function TextFieldBase(props) {
|
|
|
11039
11038
|
children: [
|
|
11040
11039
|
labelStyle === "inline" && label && /* @__PURE__ */ jsx36(InlineLabel, { multiline, labelProps, label, ...tid.label }),
|
|
11041
11040
|
startAdornment && /* @__PURE__ */ jsx36("span", { className: "df aic asc fs0 br4 pr1", children: startAdornment }),
|
|
11042
|
-
showOriginal && /* @__PURE__ */ jsx36("span", { ...trussProps24({
|
|
11043
|
-
display: "df",
|
|
11044
|
-
alignItems: "aic",
|
|
11045
|
-
flexShrink: "fs0",
|
|
11046
|
-
paddingRight: "pr1",
|
|
11047
|
-
textDecoration: "tdlt",
|
|
11048
|
-
color: ["color_var", {
|
|
11049
|
-
"--color": "var(--b-on-surface-muted)"
|
|
11050
|
-
}],
|
|
11051
|
-
...multiline ? {
|
|
11052
|
-
alignSelf: "asfs",
|
|
11053
|
-
paddingTop: "pt_11px",
|
|
11054
|
-
paddingBottom: "pb_11px"
|
|
11055
|
-
} : {}
|
|
11056
|
-
}), ...tid.originalValue, children: originalValue }),
|
|
11057
11041
|
unfocusedPlaceholder && /* @__PURE__ */ jsx36(
|
|
11058
11042
|
"div",
|
|
11059
11043
|
{
|
|
@@ -11103,18 +11087,40 @@ function TextFieldBase(props) {
|
|
|
11103
11087
|
}
|
|
11104
11088
|
)
|
|
11105
11089
|
}),
|
|
11106
|
-
labelStyle !== "left" &&
|
|
11107
|
-
|
|
11108
|
-
|
|
11090
|
+
labelStyle !== "left" && /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11091
|
+
originalBelow && /* @__PURE__ */ jsx36(OriginalValue, { originalValue: originalBelow, ...tid.originalValue }),
|
|
11092
|
+
showErrorAndHelper && /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11093
|
+
errorMsg && !errorInTooltip && /* @__PURE__ */ jsx36(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
|
|
11094
|
+
helperText && /* @__PURE__ */ jsx36(HelperText, { helperText, ...tid.helperText })
|
|
11095
|
+
] })
|
|
11109
11096
|
] })
|
|
11110
11097
|
] }),
|
|
11111
|
-
labelStyle === "left" && (alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly && (errorMsg && !errorInTooltip || helperText)) && // Reduces the margin between the error/helper text and input field
|
|
11098
|
+
labelStyle === "left" && (originalBelow || alwaysShowHelperText || !compound && !inputProps.disabled && !inputProps.readOnly && (errorMsg && !errorInTooltip || helperText)) && // Reduces the margin between the error/helper text and input field
|
|
11112
11099
|
/* @__PURE__ */ jsxs20("div", { className: "mt_neg8px", children: [
|
|
11113
|
-
|
|
11114
|
-
|
|
11100
|
+
originalBelow && /* @__PURE__ */ jsx36(OriginalValue, { originalValue: originalBelow, ...tid.originalValue }),
|
|
11101
|
+
showErrorAndHelper && /* @__PURE__ */ jsxs20(Fragment13, { children: [
|
|
11102
|
+
errorMsg && !errorInTooltip && /* @__PURE__ */ jsx36(ErrorMessage, { id: errorMessageId, errorMsg, hidden: hideErrorMessage, ...tid.errorMsg }),
|
|
11103
|
+
helperText && /* @__PURE__ */ jsx36(HelperText, { helperText, ...tid.helperText })
|
|
11104
|
+
] })
|
|
11115
11105
|
] })
|
|
11116
11106
|
] });
|
|
11117
11107
|
}
|
|
11108
|
+
function OriginalValue(props) {
|
|
11109
|
+
const {
|
|
11110
|
+
originalValue,
|
|
11111
|
+
...others
|
|
11112
|
+
} = props;
|
|
11113
|
+
return /* @__PURE__ */ jsx36("div", { ...trussProps24({
|
|
11114
|
+
color: ["color_var", {
|
|
11115
|
+
"--color": "var(--b-text-helper)"
|
|
11116
|
+
}],
|
|
11117
|
+
fontWeight: "fw4",
|
|
11118
|
+
fontSize: "fz_12px",
|
|
11119
|
+
lineHeight: "lh_16px",
|
|
11120
|
+
marginTop: "mt_4px",
|
|
11121
|
+
textDecoration: "tdlt"
|
|
11122
|
+
}), ...others, children: originalValue });
|
|
11123
|
+
}
|
|
11118
11124
|
function getInputStylePalette(inputStylePalette) {
|
|
11119
11125
|
switch (inputStylePalette) {
|
|
11120
11126
|
case "success":
|
|
@@ -23567,50 +23573,65 @@ function DocumentScrollRightPane({
|
|
|
23567
23573
|
height: paneBounds.heightPx,
|
|
23568
23574
|
maxHeight: paneBounds.heightPx
|
|
23569
23575
|
} : void 0;
|
|
23570
|
-
const pane = /* @__PURE__ */ jsx168(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx168(
|
|
23571
|
-
|
|
23572
|
-
|
|
23573
|
-
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
|
|
23577
|
-
|
|
23578
|
-
|
|
23579
|
-
|
|
23580
|
-
|
|
23581
|
-
|
|
23582
|
-
|
|
23583
|
-
|
|
23584
|
-
|
|
23585
|
-
|
|
23586
|
-
|
|
23587
|
-
|
|
23588
|
-
|
|
23589
|
-
|
|
23590
|
-
|
|
23591
|
-
|
|
23592
|
-
|
|
23593
|
-
|
|
23594
|
-
|
|
23595
|
-
|
|
23596
|
-
|
|
23597
|
-
|
|
23598
|
-
|
|
23599
|
-
|
|
23600
|
-
|
|
23601
|
-
|
|
23602
|
-
|
|
23603
|
-
|
|
23604
|
-
|
|
23605
|
-
|
|
23606
|
-
|
|
23607
|
-
|
|
23608
|
-
|
|
23609
|
-
|
|
23610
|
-
|
|
23611
|
-
|
|
23612
|
-
|
|
23613
|
-
|
|
23576
|
+
const pane = /* @__PURE__ */ jsx168(AnimatePresence3, { children: isRightPaneOpen && /* @__PURE__ */ jsx168(
|
|
23577
|
+
motion3.div,
|
|
23578
|
+
{
|
|
23579
|
+
ref: paneRef,
|
|
23580
|
+
...{
|
|
23581
|
+
[rightPaneContentDataAttribute]: true
|
|
23582
|
+
},
|
|
23583
|
+
...tid,
|
|
23584
|
+
...mergeProps27(void 0, paneStyle, mobile ? {
|
|
23585
|
+
position: "fixed",
|
|
23586
|
+
right: "right0",
|
|
23587
|
+
bottom: "bottom0",
|
|
23588
|
+
left: "left0",
|
|
23589
|
+
overflowY: "oya",
|
|
23590
|
+
backgroundColor: ["bgColor_var", {
|
|
23591
|
+
"--backgroundColor": "var(--b-surface)"
|
|
23592
|
+
}],
|
|
23593
|
+
zIndex: ["z_var", {
|
|
23594
|
+
"--zIndex": maybeCssVar47(zIndices.rightPaneMobile)
|
|
23595
|
+
}]
|
|
23596
|
+
} : {
|
|
23597
|
+
position: "fixed",
|
|
23598
|
+
right: "right0",
|
|
23599
|
+
overflowY: "oya",
|
|
23600
|
+
width: ["w_var", {
|
|
23601
|
+
"--width": maybeCssVar47(__maybeInc20(paneWidthCss))
|
|
23602
|
+
}],
|
|
23603
|
+
backgroundColor: ["bgColor_var", {
|
|
23604
|
+
"--backgroundColor": "var(--b-surface)"
|
|
23605
|
+
}],
|
|
23606
|
+
zIndex: ["z_var", {
|
|
23607
|
+
"--zIndex": maybeCssVar47(zIndices.rightPane)
|
|
23608
|
+
}],
|
|
23609
|
+
borderLeftStyle: "bls_solid",
|
|
23610
|
+
borderLeftWidth: "blw_1px",
|
|
23611
|
+
borderColor: ["bc_var", {
|
|
23612
|
+
"--borderColor": "var(--b-surface-separator)"
|
|
23613
|
+
}]
|
|
23614
|
+
}),
|
|
23615
|
+
initial: {
|
|
23616
|
+
x: slideX
|
|
23617
|
+
},
|
|
23618
|
+
animate: {
|
|
23619
|
+
x: 0
|
|
23620
|
+
},
|
|
23621
|
+
exit: {
|
|
23622
|
+
x: slideX
|
|
23623
|
+
},
|
|
23624
|
+
transition: {
|
|
23625
|
+
duration: 0.2,
|
|
23626
|
+
ease: [0.4, 0, 0.2, 1]
|
|
23627
|
+
},
|
|
23628
|
+
onAnimationComplete: (definition) => {
|
|
23629
|
+
if (definition.x !== 0 && definition.x !== void 0) releaseAfterExit();
|
|
23630
|
+
},
|
|
23631
|
+
children: rightPaneContent
|
|
23632
|
+
},
|
|
23633
|
+
"documentScrollRightPane"
|
|
23634
|
+
) });
|
|
23614
23635
|
return createPortal6(pane, document.body);
|
|
23615
23636
|
}
|
|
23616
23637
|
|
|
@@ -23708,7 +23729,8 @@ function DocumentScrollOverlayRightPaneLayout({
|
|
|
23708
23729
|
}, {
|
|
23709
23730
|
flexShrink: "fs0",
|
|
23710
23731
|
flexGrow: "fg0",
|
|
23711
|
-
height: "h1"
|
|
23732
|
+
height: "h1",
|
|
23733
|
+
transition: "transitionWidth"
|
|
23712
23734
|
}), ...tid.spacer })
|
|
23713
23735
|
] }),
|
|
23714
23736
|
/* @__PURE__ */ jsx170(DocumentScrollOverlayRightPaneHost, { anchorRef: anchorRef.ref, spacerRef, paneWidth })
|
|
@@ -23733,26 +23755,24 @@ function DocumentScrollOverlayRightPaneHost(props) {
|
|
|
23733
23755
|
return waitForRightPaneExit(() => setKeepOverlayChrome(false));
|
|
23734
23756
|
}, [isRightPaneOpen]);
|
|
23735
23757
|
useLayoutEffect8(() => {
|
|
23736
|
-
const layoutRoot = anchorRef.current;
|
|
23737
23758
|
const spacer = spacerRef.current;
|
|
23759
|
+
if (!spacer) return;
|
|
23760
|
+
spacer.style.width = isRightPaneOpen ? paneWidthCss : "0px";
|
|
23761
|
+
}, [isRightPaneOpen, paneWidthCss, spacerRef]);
|
|
23762
|
+
useLayoutEffect8(() => {
|
|
23763
|
+
const layoutRoot = anchorRef.current;
|
|
23738
23764
|
if (!layoutRoot) return;
|
|
23739
23765
|
const openPaneWidth = keepOverlayChrome ? paneWidthCss : "0px";
|
|
23740
23766
|
const contentMin = keepOverlayChrome ? `${minDocumentScrollContentWidthPx}px` : "0px";
|
|
23741
23767
|
layoutRoot.style.setProperty(beamRightPaneWidthVar, openPaneWidth);
|
|
23742
23768
|
layoutRoot.style.setProperty(beamRightPaneContentMinVar, contentMin);
|
|
23743
23769
|
document.documentElement.style.setProperty(beamFloatingRightOffsetVar, openPaneWidth);
|
|
23744
|
-
if (spacer) {
|
|
23745
|
-
spacer.style.width = openPaneWidth;
|
|
23746
|
-
}
|
|
23747
23770
|
return () => {
|
|
23748
23771
|
layoutRoot.style.setProperty(beamRightPaneWidthVar, "0px");
|
|
23749
23772
|
layoutRoot.style.setProperty(beamRightPaneContentMinVar, "0px");
|
|
23750
23773
|
document.documentElement.style.setProperty(beamFloatingRightOffsetVar, "0px");
|
|
23751
|
-
if (spacer) {
|
|
23752
|
-
spacer.style.width = "0px";
|
|
23753
|
-
}
|
|
23754
23774
|
};
|
|
23755
|
-
}, [anchorRef, keepOverlayChrome, paneWidthCss
|
|
23775
|
+
}, [anchorRef, keepOverlayChrome, paneWidthCss]);
|
|
23756
23776
|
return /* @__PURE__ */ jsx170(DocumentScrollRightPane, { paneWidth, mobile: false, anchorRef });
|
|
23757
23777
|
}
|
|
23758
23778
|
|
|
@@ -24387,7 +24407,7 @@ function RightPaneLayout(props) {
|
|
|
24387
24407
|
width: ["w_var", {
|
|
24388
24408
|
"--width": maybeCssVar49(__maybeInc22(`calc(100% - ${paneWidth + 24}px)`))
|
|
24389
24409
|
}],
|
|
24390
|
-
transition: "
|
|
24410
|
+
transition: "transitionWidth",
|
|
24391
24411
|
height: "h100",
|
|
24392
24412
|
marginRight: "mr3",
|
|
24393
24413
|
overflowX: "oxa"
|
|
@@ -24450,13 +24470,13 @@ function RightPaneLayout(props) {
|
|
|
24450
24470
|
x: 0
|
|
24451
24471
|
},
|
|
24452
24472
|
transition: {
|
|
24453
|
-
|
|
24454
|
-
|
|
24473
|
+
duration: 0.2,
|
|
24474
|
+
ease: [0.4, 0, 0.2, 1]
|
|
24455
24475
|
},
|
|
24456
24476
|
exit: {
|
|
24457
24477
|
transition: {
|
|
24458
|
-
|
|
24459
|
-
|
|
24478
|
+
duration: 0.2,
|
|
24479
|
+
ease: [0.4, 0, 0.2, 1]
|
|
24460
24480
|
},
|
|
24461
24481
|
x: paneWidth
|
|
24462
24482
|
},
|
|
@@ -24500,7 +24520,7 @@ function RightPanePanel(props) {
|
|
|
24500
24520
|
flexShrink: "fs0"
|
|
24501
24521
|
}), ...tid.header, children: [
|
|
24502
24522
|
/* @__PURE__ */ jsx180("div", { className: "fw6 fz_16px lh_24px", children: title }),
|
|
24503
|
-
withClose && /* @__PURE__ */ jsx180(IconButton, { icon: "x", label: "Close", onClick: closeRightPane, ...tid.close })
|
|
24523
|
+
withClose && /* @__PURE__ */ jsx180(IconButton, { icon: "x", label: "Close", autoFocus: true, onClick: closeRightPane, ...tid.close })
|
|
24504
24524
|
] }),
|
|
24505
24525
|
/* @__PURE__ */ jsx180("div", { className: "fg1 mh0 oya pt2 pb2 pr2 pl2", ...tid.body, children })
|
|
24506
24526
|
] });
|
|
@@ -28935,10 +28955,74 @@ function WorkflowHeader(props) {
|
|
|
28935
28955
|
);
|
|
28936
28956
|
}
|
|
28937
28957
|
|
|
28958
|
+
// src/layouts/Workflow/RightPaneTriggers.tsx
|
|
28959
|
+
import { useCallback as useCallback44 } from "react";
|
|
28960
|
+
import { trussProps as trussProps137, maybeCssVar as maybeCssVar70 } from "@homebound/truss/runtime";
|
|
28961
|
+
import { jsx as jsx237 } from "react/jsx-runtime";
|
|
28962
|
+
var __maybeInc36 = (inc) => {
|
|
28963
|
+
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
28964
|
+
};
|
|
28965
|
+
function WorkflowPageRightPaneTriggers(props) {
|
|
28966
|
+
const {
|
|
28967
|
+
triggers
|
|
28968
|
+
} = props;
|
|
28969
|
+
const {
|
|
28970
|
+
sm: isMobile
|
|
28971
|
+
} = useBreakpoint();
|
|
28972
|
+
const {
|
|
28973
|
+
isRightPaneOpen
|
|
28974
|
+
} = useRightPane();
|
|
28975
|
+
const {
|
|
28976
|
+
openRightPane
|
|
28977
|
+
} = useRightPaneActions();
|
|
28978
|
+
const tid = useTestIds(props, "rightPaneTriggers");
|
|
28979
|
+
const pageTriggerInsetPx = 24;
|
|
28980
|
+
const onClick = useCallback44((trigger) => {
|
|
28981
|
+
openRightPane({
|
|
28982
|
+
content: /* @__PURE__ */ jsx237(RightPanePanel, { title: trigger.label, children: trigger.content })
|
|
28983
|
+
});
|
|
28984
|
+
}, [openRightPane]);
|
|
28985
|
+
return /* @__PURE__ */ jsx237("div", { ...tid, "aria-hidden": isRightPaneOpen, ...isRightPaneOpen ? {
|
|
28986
|
+
inert: true
|
|
28987
|
+
} : {}, ...trussProps137({
|
|
28988
|
+
...{
|
|
28989
|
+
display: "df",
|
|
28990
|
+
alignItems: "aic",
|
|
28991
|
+
gap: "gap2",
|
|
28992
|
+
flexShrink: "fs0",
|
|
28993
|
+
...!isMobile ? {
|
|
28994
|
+
transition: "transitionTransform",
|
|
28995
|
+
flexDirection: "fdc"
|
|
28996
|
+
} : {}
|
|
28997
|
+
},
|
|
28998
|
+
...!isMobile && {
|
|
28999
|
+
position: "fixed",
|
|
29000
|
+
top: ["top_var", {
|
|
29001
|
+
"--top": maybeCssVar70(__maybeInc36(stickyNavAndHeaderOffset(pageTriggerInsetPx)))
|
|
29002
|
+
}],
|
|
29003
|
+
right: ["right_var", {
|
|
29004
|
+
"--right": `${pageTriggerInsetPx}px`
|
|
29005
|
+
}],
|
|
29006
|
+
zIndex: ["z_var", {
|
|
29007
|
+
"--zIndex": maybeCssVar70(zIndices.rightPaneTriggers)
|
|
29008
|
+
}]
|
|
29009
|
+
},
|
|
29010
|
+
// Desktop only — on `sm` the full-bleed pane covers the header slot.
|
|
29011
|
+
...!isMobile && (isRightPaneOpen ? {
|
|
29012
|
+
transform: ["transform_var", {
|
|
29013
|
+
"--transform": maybeCssVar70(`translateX(calc(100% + ${pageTriggerInsetPx}px))`)
|
|
29014
|
+
}],
|
|
29015
|
+
pointerEvents: "pe_none"
|
|
29016
|
+
} : {
|
|
29017
|
+
transform: "tf_translateX_0"
|
|
29018
|
+
})
|
|
29019
|
+
}), children: triggers.map((trigger) => /* @__PURE__ */ jsx237(IconButton, { icon: trigger.icon, label: trigger.label, variant: "circle", compact: isMobile, onClick: () => onClick(trigger), ...tid[trigger.icon] }, trigger.label)) });
|
|
29020
|
+
}
|
|
29021
|
+
|
|
28938
29022
|
// src/layouts/Workflow/useUnsavedChangesGuard.tsx
|
|
28939
29023
|
import { useEffect as useEffect40, useRef as useRef74 } from "react";
|
|
28940
29024
|
import { useBlocker } from "react-router-dom";
|
|
28941
|
-
import { jsx as
|
|
29025
|
+
import { jsx as jsx238 } from "react/jsx-runtime";
|
|
28942
29026
|
function useUnsavedChangesGuard(options) {
|
|
28943
29027
|
const { isDirty, allowNavigation, onCancel } = options;
|
|
28944
29028
|
const { openModal } = useModal();
|
|
@@ -28974,7 +29058,7 @@ function useUnsavedChangesGuard(options) {
|
|
|
28974
29058
|
}
|
|
28975
29059
|
openModal({
|
|
28976
29060
|
allowClosing: false,
|
|
28977
|
-
content: /* @__PURE__ */
|
|
29061
|
+
content: /* @__PURE__ */ jsx238(ConfirmCloseModal, { onClose: () => confirmCancel(e) })
|
|
28978
29062
|
});
|
|
28979
29063
|
};
|
|
28980
29064
|
const navigationBlocker = blocker.state === "blocked" ? { proceed: () => blocker.proceed?.(), cancelNavigation: () => blocker.reset?.() } : void 0;
|
|
@@ -28986,7 +29070,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
28986
29070
|
useEffect40(() => {
|
|
28987
29071
|
openModal({
|
|
28988
29072
|
allowClosing: false,
|
|
28989
|
-
content: /* @__PURE__ */
|
|
29073
|
+
content: /* @__PURE__ */ jsx238(ConfirmCloseModal, { title: "Leave page?", onClose: proceed, onContinue: cancelNavigation })
|
|
28990
29074
|
});
|
|
28991
29075
|
return () => closeModal();
|
|
28992
29076
|
}, []);
|
|
@@ -28994,7 +29078,7 @@ function UnsavedChangesNavigationModal(props) {
|
|
|
28994
29078
|
}
|
|
28995
29079
|
|
|
28996
29080
|
// src/layouts/Workflow/WorkflowActions.tsx
|
|
28997
|
-
import { jsx as
|
|
29081
|
+
import { jsx as jsx239, jsxs as jsxs128 } from "react/jsx-runtime";
|
|
28998
29082
|
function WorkflowActions(props) {
|
|
28999
29083
|
const {
|
|
29000
29084
|
onCancel,
|
|
@@ -29013,11 +29097,11 @@ function WorkflowActions(props) {
|
|
|
29013
29097
|
} = useBreakpoint();
|
|
29014
29098
|
const primaryVariant = aiMode ? "ai" : "primary";
|
|
29015
29099
|
return /* @__PURE__ */ jsxs128("div", { className: "df aic jcsb sm_w100", children: [
|
|
29016
|
-
/* @__PURE__ */
|
|
29100
|
+
/* @__PURE__ */ jsx239("div", { className: "df aic", children: !isFirstStep && isMobile && onBack && /* @__PURE__ */ jsx239(IconButton, { icon: "arrowBack", label: "Back", onClick: onBack }) }),
|
|
29017
29101
|
/* @__PURE__ */ jsxs128("div", { className: "df aic gap1", children: [
|
|
29018
|
-
/* @__PURE__ */
|
|
29019
|
-
onSaveAndExit && /* @__PURE__ */
|
|
29020
|
-
isLastStep ? /* @__PURE__ */
|
|
29102
|
+
/* @__PURE__ */ jsx239(Button, { label: "Cancel", variant: "quaternary", onClick: onCancel }),
|
|
29103
|
+
onSaveAndExit && /* @__PURE__ */ jsx239(Button, { label: "Save & Exit", variant: "secondary", onClick: onSaveAndExit }),
|
|
29104
|
+
isLastStep ? /* @__PURE__ */ jsx239(Button, { label: completeLabel, variant: primaryVariant, onClick: onComplete, disabled: primaryDisabled }) : /* @__PURE__ */ jsx239(Button, { label: "Continue", variant: primaryVariant, onClick: async () => {
|
|
29021
29105
|
await onContinue?.();
|
|
29022
29106
|
}, disabled: primaryDisabled })
|
|
29023
29107
|
] })
|
|
@@ -29025,9 +29109,9 @@ function WorkflowActions(props) {
|
|
|
29025
29109
|
}
|
|
29026
29110
|
|
|
29027
29111
|
// src/layouts/Workflow/WorkflowPageLayout.tsx
|
|
29028
|
-
import { trussProps as
|
|
29029
|
-
import { jsx as
|
|
29030
|
-
var
|
|
29112
|
+
import { trussProps as trussProps138, mergeProps as mergeProps43, maybeCssVar as maybeCssVar71 } from "@homebound/truss/runtime";
|
|
29113
|
+
import { jsx as jsx240, jsxs as jsxs129 } from "react/jsx-runtime";
|
|
29114
|
+
var __maybeInc37 = (inc) => {
|
|
29031
29115
|
return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
|
|
29032
29116
|
};
|
|
29033
29117
|
var mobileFooterHeightPx = 80;
|
|
@@ -29042,6 +29126,7 @@ function WorkflowPageLayout(props) {
|
|
|
29042
29126
|
documentTitleSuffix,
|
|
29043
29127
|
breadcrumbs,
|
|
29044
29128
|
onCancel,
|
|
29129
|
+
rightPaneTriggers,
|
|
29045
29130
|
...actionProps
|
|
29046
29131
|
} = props;
|
|
29047
29132
|
const tid = useTestIds(props, "workflowPageLayout");
|
|
@@ -29056,7 +29141,9 @@ function WorkflowPageLayout(props) {
|
|
|
29056
29141
|
allowNavigation,
|
|
29057
29142
|
onCancel
|
|
29058
29143
|
});
|
|
29059
|
-
const actions = /* @__PURE__ */
|
|
29144
|
+
const actions = /* @__PURE__ */ jsx240(WorkflowActions, { ...actionProps, aiMode, onCancel: onCancelClick });
|
|
29145
|
+
const triggers = rightPaneTriggers ?? [];
|
|
29146
|
+
const pageTriggers = triggers.length > 0 ? /* @__PURE__ */ jsx240(WorkflowPageRightPaneTriggers, { triggers }) : void 0;
|
|
29060
29147
|
const headerMetricsRef = useRef75(null);
|
|
29061
29148
|
const headerHeight = useMeasuredHeight(headerMetricsRef, true);
|
|
29062
29149
|
const headerWidth = documentScrollChromeWidth();
|
|
@@ -29083,26 +29170,26 @@ function WorkflowPageLayout(props) {
|
|
|
29083
29170
|
flexDirection: "fdc",
|
|
29084
29171
|
width: "w100"
|
|
29085
29172
|
}), ...tid, children: [
|
|
29086
|
-
/* @__PURE__ */
|
|
29173
|
+
/* @__PURE__ */ jsx240("div", { ...mergeProps43(void 0, {
|
|
29087
29174
|
height: headerHeight
|
|
29088
29175
|
}, {
|
|
29089
29176
|
flexShrink: "fs0",
|
|
29090
29177
|
width: "w100"
|
|
29091
|
-
}), children: /* @__PURE__ */
|
|
29178
|
+
}), children: /* @__PURE__ */ jsx240("div", { ref: headerMetricsRef, ...trussProps138({
|
|
29092
29179
|
position: "fixed",
|
|
29093
29180
|
left: "left0",
|
|
29094
29181
|
width: ["w_var", {
|
|
29095
|
-
"--width":
|
|
29182
|
+
"--width": maybeCssVar71(__maybeInc37(headerWidth))
|
|
29096
29183
|
}],
|
|
29097
29184
|
zIndex: ["z_var", {
|
|
29098
|
-
"--zIndex":
|
|
29185
|
+
"--zIndex": maybeCssVar71(zIndices.pageStickyHeader)
|
|
29099
29186
|
}],
|
|
29100
29187
|
top: ["top_var", {
|
|
29101
|
-
"--top":
|
|
29188
|
+
"--top": maybeCssVar71(__maybeInc37(outerTop))
|
|
29102
29189
|
}],
|
|
29103
29190
|
transition: "transitionAll"
|
|
29104
|
-
}), ...tid.header, children: /* @__PURE__ */
|
|
29105
|
-
/* @__PURE__ */
|
|
29191
|
+
}), ...tid.header, children: /* @__PURE__ */ jsx240(WorkflowHeader, { title, documentTitleSuffix, breadcrumbs, rightSlot: isMobile ? pageTriggers : actions, stepperTabs }) }) }),
|
|
29192
|
+
/* @__PURE__ */ jsx240("div", { ...trussProps138({
|
|
29106
29193
|
...{
|
|
29107
29194
|
display: "df",
|
|
29108
29195
|
flexDirection: "fdc",
|
|
@@ -29114,28 +29201,29 @@ function WorkflowPageLayout(props) {
|
|
|
29114
29201
|
...aiMode && {
|
|
29115
29202
|
backgroundImage: "aiBackground",
|
|
29116
29203
|
minHeight: ["mh_var", {
|
|
29117
|
-
"--minHeight":
|
|
29204
|
+
"--minHeight": maybeCssVar71(documentScrollBodyMinHeight())
|
|
29118
29205
|
}]
|
|
29119
29206
|
}
|
|
29120
|
-
}), ...tid.body, children }),
|
|
29121
|
-
|
|
29207
|
+
}), ...tid.body, children: triggers.length > 0 ? /* @__PURE__ */ jsx240(DocumentScrollOverlayRightPaneLayout, { children }) : children }),
|
|
29208
|
+
!isMobile && pageTriggers,
|
|
29209
|
+
showFooter && /* @__PURE__ */ jsx240("div", { ...trussProps138({
|
|
29122
29210
|
flexShrink: "fs0",
|
|
29123
29211
|
width: "w100",
|
|
29124
29212
|
height: ["h_var", {
|
|
29125
29213
|
"--height": `${mobileFooterHeightPx}px`
|
|
29126
29214
|
}]
|
|
29127
|
-
}), children: /* @__PURE__ */
|
|
29215
|
+
}), children: /* @__PURE__ */ jsx240("div", { ...trussProps138({
|
|
29128
29216
|
...{
|
|
29129
29217
|
position: "fixed",
|
|
29130
29218
|
bottom: "bottom0",
|
|
29131
29219
|
width: ["w_var", {
|
|
29132
|
-
"--width":
|
|
29220
|
+
"--width": maybeCssVar71(__maybeInc37(headerWidth))
|
|
29133
29221
|
}],
|
|
29134
29222
|
height: ["h_var", {
|
|
29135
29223
|
"--height": `${mobileFooterHeightPx}px`
|
|
29136
29224
|
}],
|
|
29137
29225
|
zIndex: ["z_var", {
|
|
29138
|
-
"--zIndex":
|
|
29226
|
+
"--zIndex": maybeCssVar71(zIndices.pageStickyFooter)
|
|
29139
29227
|
}],
|
|
29140
29228
|
display: "df",
|
|
29141
29229
|
alignItems: "aic",
|
|
@@ -29153,12 +29241,12 @@ function WorkflowPageLayout(props) {
|
|
|
29153
29241
|
...pageContentPaddingX
|
|
29154
29242
|
}), ...tid.footer, children: actions }) })
|
|
29155
29243
|
] }),
|
|
29156
|
-
navigationBlocker && /* @__PURE__ */
|
|
29244
|
+
navigationBlocker && /* @__PURE__ */ jsx240(UnsavedChangesNavigationModal, { ...navigationBlocker })
|
|
29157
29245
|
] });
|
|
29158
29246
|
}
|
|
29159
29247
|
|
|
29160
29248
|
// src/layouts/Workflow/FocusedFormLayout.tsx
|
|
29161
|
-
import { jsx as
|
|
29249
|
+
import { jsx as jsx241 } from "react/jsx-runtime";
|
|
29162
29250
|
function FocusedFormLayout(props) {
|
|
29163
29251
|
const {
|
|
29164
29252
|
onCancel,
|
|
@@ -29169,11 +29257,12 @@ function FocusedFormLayout(props) {
|
|
|
29169
29257
|
isDirty,
|
|
29170
29258
|
allowNavigation,
|
|
29171
29259
|
aiMode,
|
|
29260
|
+
rightPaneTriggers,
|
|
29172
29261
|
children,
|
|
29173
29262
|
...headerProps
|
|
29174
29263
|
} = props;
|
|
29175
29264
|
const tid = useTestIds(props, "focusedFormLayout");
|
|
29176
|
-
return /* @__PURE__ */
|
|
29265
|
+
return /* @__PURE__ */ jsx241(
|
|
29177
29266
|
WorkflowPageLayout,
|
|
29178
29267
|
{
|
|
29179
29268
|
...tid,
|
|
@@ -29186,6 +29275,7 @@ function FocusedFormLayout(props) {
|
|
|
29186
29275
|
completeLabel,
|
|
29187
29276
|
onComplete,
|
|
29188
29277
|
primaryDisabled,
|
|
29278
|
+
rightPaneTriggers,
|
|
29189
29279
|
children
|
|
29190
29280
|
}
|
|
29191
29281
|
);
|
|
@@ -29193,7 +29283,7 @@ function FocusedFormLayout(props) {
|
|
|
29193
29283
|
|
|
29194
29284
|
// src/layouts/Workflow/StepperLayout.tsx
|
|
29195
29285
|
import { useState as useState64 } from "react";
|
|
29196
|
-
import { jsx as
|
|
29286
|
+
import { jsx as jsx242 } from "react/jsx-runtime";
|
|
29197
29287
|
function StepperLayout(props) {
|
|
29198
29288
|
const {
|
|
29199
29289
|
steps,
|
|
@@ -29210,30 +29300,37 @@ function StepperLayout(props) {
|
|
|
29210
29300
|
const stepTabs = steps.map((step) => ({ ...step, value: defaultTestId(step.label) }));
|
|
29211
29301
|
const [currentStep, setCurrentStep] = useState64(() => getInitialStep(stepTabs, defaultStep));
|
|
29212
29302
|
const tid = useTestIds(props, "stepperLayout");
|
|
29303
|
+
const { closeRightPane } = useRightPaneActions();
|
|
29213
29304
|
const currentIndex = hasStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
|
|
29214
29305
|
const isFirstStep = currentIndex <= 0;
|
|
29215
29306
|
const isLastStep = currentIndex >= stepTabs.length - 1;
|
|
29216
29307
|
const activeStep = stepTabs[currentIndex];
|
|
29217
|
-
|
|
29308
|
+
function goToStep(value) {
|
|
29309
|
+
if (value === currentStep) return;
|
|
29310
|
+
closeRightPane();
|
|
29311
|
+
setCurrentStep(value);
|
|
29312
|
+
}
|
|
29313
|
+
return /* @__PURE__ */ jsx242(
|
|
29218
29314
|
WorkflowPageLayout,
|
|
29219
29315
|
{
|
|
29220
29316
|
...tid,
|
|
29221
29317
|
...headerProps,
|
|
29222
29318
|
aiMode,
|
|
29223
|
-
stepperTabs: { steps: stepTabs, currentStep, onChange:
|
|
29319
|
+
stepperTabs: { steps: stepTabs, currentStep, onChange: goToStep },
|
|
29224
29320
|
isDirty,
|
|
29225
29321
|
allowNavigation,
|
|
29226
29322
|
isFirstStep,
|
|
29227
29323
|
isLastStep,
|
|
29228
29324
|
onBack: () => {
|
|
29229
29325
|
const prev = stepTabs[currentIndex - 1];
|
|
29230
|
-
if (prev)
|
|
29326
|
+
if (prev) goToStep(prev.value);
|
|
29231
29327
|
},
|
|
29232
29328
|
onCancel,
|
|
29233
29329
|
onSaveAndExit,
|
|
29234
29330
|
completeLabel,
|
|
29235
29331
|
onComplete,
|
|
29236
29332
|
primaryDisabled: activeStep?.primaryDisabled,
|
|
29333
|
+
rightPaneTriggers: activeStep?.rightPaneTriggers,
|
|
29237
29334
|
onContinue: async () => {
|
|
29238
29335
|
const onContinue = activeStep?.onContinue;
|
|
29239
29336
|
if (onContinue) {
|
|
@@ -29241,7 +29338,7 @@ function StepperLayout(props) {
|
|
|
29241
29338
|
if (allowed === false) return;
|
|
29242
29339
|
}
|
|
29243
29340
|
const next = stepTabs[currentIndex + 1];
|
|
29244
|
-
if (next)
|
|
29341
|
+
if (next) goToStep(next.value);
|
|
29245
29342
|
},
|
|
29246
29343
|
children: activeStep?.content
|
|
29247
29344
|
}
|
|
@@ -29256,7 +29353,7 @@ function getInitialStep(steps, defaultStep) {
|
|
|
29256
29353
|
|
|
29257
29354
|
// src/forms/BoundChipSelectField.tsx
|
|
29258
29355
|
import { Observer as Observer19 } from "mobx-react";
|
|
29259
|
-
import { jsx as
|
|
29356
|
+
import { jsx as jsx243 } from "react/jsx-runtime";
|
|
29260
29357
|
function BoundChipSelectField(props) {
|
|
29261
29358
|
const {
|
|
29262
29359
|
field,
|
|
@@ -29272,7 +29369,7 @@ function BoundChipSelectField(props) {
|
|
|
29272
29369
|
...others
|
|
29273
29370
|
} = props;
|
|
29274
29371
|
const testId = useTestIds(props, field.key);
|
|
29275
|
-
return /* @__PURE__ */
|
|
29372
|
+
return /* @__PURE__ */ jsx243(Observer19, { children: () => /* @__PURE__ */ jsx243(
|
|
29276
29373
|
ChipSelectField,
|
|
29277
29374
|
{
|
|
29278
29375
|
label,
|
|
@@ -29302,12 +29399,12 @@ function BoundChipSelectField(props) {
|
|
|
29302
29399
|
}
|
|
29303
29400
|
|
|
29304
29401
|
// src/forms/BoundSelectAndTextField.tsx
|
|
29305
|
-
import { jsx as
|
|
29402
|
+
import { jsx as jsx244, jsxs as jsxs130 } from "react/jsx-runtime";
|
|
29306
29403
|
function BoundSelectAndTextField(props) {
|
|
29307
29404
|
const { selectFieldProps, textFieldProps, compact = true } = props;
|
|
29308
29405
|
const tid = useTestIds(props);
|
|
29309
29406
|
return /* @__PURE__ */ jsxs130(CompoundField, { children: [
|
|
29310
|
-
/* @__PURE__ */
|
|
29407
|
+
/* @__PURE__ */ jsx244(
|
|
29311
29408
|
BoundSelectField,
|
|
29312
29409
|
{
|
|
29313
29410
|
...tid[defaultTestId(selectFieldProps.label ?? selectFieldProps.field.key)],
|
|
@@ -29316,7 +29413,7 @@ function BoundSelectAndTextField(props) {
|
|
|
29316
29413
|
compact
|
|
29317
29414
|
}
|
|
29318
29415
|
),
|
|
29319
|
-
/* @__PURE__ */
|
|
29416
|
+
/* @__PURE__ */ jsx244(
|
|
29320
29417
|
BoundTextField,
|
|
29321
29418
|
{
|
|
29322
29419
|
...tid[defaultTestId(textFieldProps.label ?? textFieldProps.field.key)],
|
|
@@ -29328,8 +29425,8 @@ function BoundSelectAndTextField(props) {
|
|
|
29328
29425
|
}
|
|
29329
29426
|
|
|
29330
29427
|
// src/forms/FormHeading.tsx
|
|
29331
|
-
import { trussProps as
|
|
29332
|
-
import { jsx as
|
|
29428
|
+
import { trussProps as trussProps139 } from "@homebound/truss/runtime";
|
|
29429
|
+
import { jsx as jsx245 } from "react/jsx-runtime";
|
|
29333
29430
|
function FormHeading(props) {
|
|
29334
29431
|
const {
|
|
29335
29432
|
title,
|
|
@@ -29339,7 +29436,7 @@ function FormHeading(props) {
|
|
|
29339
29436
|
} = props;
|
|
29340
29437
|
return (
|
|
29341
29438
|
// Add space before the heading, but only if it's not first.
|
|
29342
|
-
/* @__PURE__ */
|
|
29439
|
+
/* @__PURE__ */ jsx245("h3", { ...trussProps139({
|
|
29343
29440
|
...{
|
|
29344
29441
|
fontWeight: "fw4",
|
|
29345
29442
|
fontSize: "fz_16px",
|
|
@@ -29356,8 +29453,8 @@ FormHeading.isFormHeading = true;
|
|
|
29356
29453
|
|
|
29357
29454
|
// src/forms/StaticField.tsx
|
|
29358
29455
|
import { useId as useId3 } from "@react-aria/utils";
|
|
29359
|
-
import { trussProps as
|
|
29360
|
-
import { jsx as
|
|
29456
|
+
import { trussProps as trussProps140 } from "@homebound/truss/runtime";
|
|
29457
|
+
import { jsx as jsx246, jsxs as jsxs131 } from "react/jsx-runtime";
|
|
29361
29458
|
function StaticField(props) {
|
|
29362
29459
|
const {
|
|
29363
29460
|
fieldProps
|
|
@@ -29370,14 +29467,14 @@ function StaticField(props) {
|
|
|
29370
29467
|
} = props;
|
|
29371
29468
|
const tid = useTestIds(props, typeof label === "string" ? defaultTestId(label) : "staticField");
|
|
29372
29469
|
const id = useId3();
|
|
29373
|
-
return /* @__PURE__ */ jsxs131("div", { ...
|
|
29470
|
+
return /* @__PURE__ */ jsxs131("div", { ...trussProps140({
|
|
29374
29471
|
...labelStyle === "left" ? {
|
|
29375
29472
|
display: "df",
|
|
29376
29473
|
justifyContent: "jcsb",
|
|
29377
29474
|
maxWidth: "maxw100"
|
|
29378
29475
|
} : {}
|
|
29379
29476
|
}), ...tid.container, children: [
|
|
29380
|
-
/* @__PURE__ */
|
|
29477
|
+
/* @__PURE__ */ jsx246("label", { ...trussProps140({
|
|
29381
29478
|
display: "db",
|
|
29382
29479
|
fontWeight: "fw4",
|
|
29383
29480
|
fontSize: "fz_14px",
|
|
@@ -29387,7 +29484,7 @@ function StaticField(props) {
|
|
|
29387
29484
|
}],
|
|
29388
29485
|
marginBottom: "mb_4px"
|
|
29389
29486
|
}), htmlFor: id, ...tid.label, children: label }),
|
|
29390
|
-
/* @__PURE__ */
|
|
29487
|
+
/* @__PURE__ */ jsx246("div", { id, ...trussProps140({
|
|
29391
29488
|
fontWeight: "fw4",
|
|
29392
29489
|
fontSize: "fz_14px",
|
|
29393
29490
|
lineHeight: "lh_20px",
|
|
@@ -29415,10 +29512,10 @@ function useFilter4({ filterDefs }) {
|
|
|
29415
29512
|
}
|
|
29416
29513
|
|
|
29417
29514
|
// src/inputs/Autocomplete.tsx
|
|
29418
|
-
import { useCallback as
|
|
29515
|
+
import { useCallback as useCallback45, useRef as useRef76 } from "react";
|
|
29419
29516
|
import { useComboBox as useComboBox3, useOverlayPosition as useOverlayPosition6 } from "react-aria";
|
|
29420
29517
|
import { Item as Item5, useComboBoxState as useComboBoxState3 } from "react-stately";
|
|
29421
|
-
import { Fragment as Fragment53, jsx as
|
|
29518
|
+
import { Fragment as Fragment53, jsx as jsx247, jsxs as jsxs132 } from "react/jsx-runtime";
|
|
29422
29519
|
function Autocomplete(props) {
|
|
29423
29520
|
const {
|
|
29424
29521
|
onSelect,
|
|
@@ -29435,8 +29532,8 @@ function Autocomplete(props) {
|
|
|
29435
29532
|
} = props;
|
|
29436
29533
|
const { effectiveValue, proposalProps } = useAiProposal(value, proposedValue);
|
|
29437
29534
|
const disabledOptionsWithReasons = Object.fromEntries(disabledOptions?.map(disabledOptionToKeyedTuple) ?? []);
|
|
29438
|
-
const comboBoxChildren =
|
|
29439
|
-
(item) => /* @__PURE__ */
|
|
29535
|
+
const comboBoxChildren = useCallback45(
|
|
29536
|
+
(item) => /* @__PURE__ */ jsx247(Item5, { textValue: getOptionLabel(item), children: getOptionMenuLabel ? getOptionMenuLabel(item) : getOptionLabel(item) }, getOptionValue(item)),
|
|
29440
29537
|
[getOptionValue, getOptionLabel, getOptionMenuLabel]
|
|
29441
29538
|
);
|
|
29442
29539
|
const comboBoxProps = {
|
|
@@ -29490,7 +29587,7 @@ function Autocomplete(props) {
|
|
|
29490
29587
|
minWidth: 200
|
|
29491
29588
|
};
|
|
29492
29589
|
return /* @__PURE__ */ jsxs132(Fragment53, { children: [
|
|
29493
|
-
/* @__PURE__ */
|
|
29590
|
+
/* @__PURE__ */ jsx247(
|
|
29494
29591
|
TextFieldBase,
|
|
29495
29592
|
{
|
|
29496
29593
|
inputRef,
|
|
@@ -29500,11 +29597,11 @@ function Autocomplete(props) {
|
|
|
29500
29597
|
onChange: onInputChange,
|
|
29501
29598
|
...proposalProps,
|
|
29502
29599
|
clearable: true,
|
|
29503
|
-
startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */
|
|
29600
|
+
startAdornment: "startAdornment" in props ? props.startAdornment : /* @__PURE__ */ jsx247(Icon, { icon: "search" }),
|
|
29504
29601
|
...others
|
|
29505
29602
|
}
|
|
29506
29603
|
),
|
|
29507
|
-
state.isOpen && /* @__PURE__ */
|
|
29604
|
+
state.isOpen && /* @__PURE__ */ jsx247(
|
|
29508
29605
|
Popover,
|
|
29509
29606
|
{
|
|
29510
29607
|
triggerRef: inputRef,
|
|
@@ -29513,7 +29610,7 @@ function Autocomplete(props) {
|
|
|
29513
29610
|
onClose: () => state.close(),
|
|
29514
29611
|
isOpen: state.isOpen,
|
|
29515
29612
|
minWidth: 200,
|
|
29516
|
-
children: /* @__PURE__ */
|
|
29613
|
+
children: /* @__PURE__ */ jsx247(
|
|
29517
29614
|
ListBox,
|
|
29518
29615
|
{
|
|
29519
29616
|
...listBoxProps,
|
|
@@ -29534,8 +29631,8 @@ function Autocomplete(props) {
|
|
|
29534
29631
|
import { useRef as useRef77, useState as useState66 } from "react";
|
|
29535
29632
|
import { useFocusRing as useFocusRing21, useHover as useHover24, usePress as usePress2, useSwitch as useSwitch2, VisuallyHidden as VisuallyHidden10 } from "react-aria";
|
|
29536
29633
|
import { useToggleState as useToggleState2 } from "react-stately";
|
|
29537
|
-
import { trussProps as
|
|
29538
|
-
import { jsx as
|
|
29634
|
+
import { trussProps as trussProps141 } from "@homebound/truss/runtime";
|
|
29635
|
+
import { jsx as jsx248, jsxs as jsxs133 } from "react/jsx-runtime";
|
|
29539
29636
|
function ToggleButton(props) {
|
|
29540
29637
|
const {
|
|
29541
29638
|
selected: isSelected = false,
|
|
@@ -29599,7 +29696,7 @@ function ToggleButton(props) {
|
|
|
29599
29696
|
...focusProps,
|
|
29600
29697
|
...hoverProps,
|
|
29601
29698
|
...pressProps,
|
|
29602
|
-
...
|
|
29699
|
+
...trussProps141({
|
|
29603
29700
|
// Gray500 off-state has no semantic match — keep palette (OnSurfaceMuted is Gray700).
|
|
29604
29701
|
...{
|
|
29605
29702
|
borderRadius: "br4",
|
|
@@ -29640,9 +29737,9 @@ function ToggleButton(props) {
|
|
|
29640
29737
|
title: tooltip,
|
|
29641
29738
|
placement: "top",
|
|
29642
29739
|
children: /* @__PURE__ */ jsxs133("label", { ...labelAttrs, children: [
|
|
29643
|
-
icon && /* @__PURE__ */
|
|
29740
|
+
icon && /* @__PURE__ */ jsx248(Icon, { icon }),
|
|
29644
29741
|
label,
|
|
29645
|
-
/* @__PURE__ */
|
|
29742
|
+
/* @__PURE__ */ jsx248(VisuallyHidden10, { children: /* @__PURE__ */ jsx248("input", { ref, ...inputProps, ...tid.value }) })
|
|
29646
29743
|
] })
|
|
29647
29744
|
});
|
|
29648
29745
|
}
|