@homebound/beam 3.72.0 → 3.73.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 +88 -58
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -3
- package/dist/index.d.ts +9 -3
- package/dist/index.js +124 -94
- package/dist/index.js.map +1 -1
- package/dist/truss.css +12 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -25662,65 +25662,86 @@ function StepperTab(props) {
|
|
|
25662
25662
|
...stepperTabStyles.baseStyles,
|
|
25663
25663
|
...getStateStyles(active, completed),
|
|
25664
25664
|
...isHovered && !disabled ? stepperTabStyles.hoverStyles : {},
|
|
25665
|
-
...collapsed ?
|
|
25665
|
+
...collapsed ? stepperTabStyles.collapsedStyles : {},
|
|
25666
25666
|
...disabled ? stepperTabStyles.disabledStyles : {},
|
|
25667
25667
|
...isFocusVisible ? stepperTabStyles.focusRingStyles : {}
|
|
25668
25668
|
}), ...tid[defaultTestId(value)], children: [
|
|
25669
|
-
/* @__PURE__ */ (0, import_jsx_runtime200.
|
|
25670
|
-
|
|
25669
|
+
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime200.jsxs)(import_jsx_runtime200.Fragment, { children: [
|
|
25670
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsxs)("span", { className: "dg jic mw0", children: [
|
|
25671
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("span", { className: "fw6 fz_14px lh_20px visibility_hidden gridArea_1_1 oh d_negwebkit_box wbo_vertical to_ellipsis wlc_1 wordBreak_break_all", "aria-hidden": true, children: label }),
|
|
25672
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("span", { ...(0, import_runtime123.trussProps)({
|
|
25673
|
+
gridArea: "gridArea_1_1",
|
|
25674
|
+
overflow: "oh",
|
|
25675
|
+
display: "d_negwebkit_box",
|
|
25676
|
+
WebkitBoxOrient: "wbo_vertical",
|
|
25677
|
+
textOverflow: "to_ellipsis",
|
|
25678
|
+
WebkitLineClamp: "wlc_1",
|
|
25679
|
+
wordBreak: "wordBreak_break_all",
|
|
25680
|
+
...active ? {
|
|
25681
|
+
fontWeight: "fw6",
|
|
25682
|
+
fontSize: "fz_14px",
|
|
25683
|
+
lineHeight: "lh_20px"
|
|
25684
|
+
} : {}
|
|
25685
|
+
}), children: label })
|
|
25686
|
+
] }),
|
|
25687
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("span", { ...(0, import_runtime123.trussProps)({
|
|
25688
|
+
flexShrink: "fs0",
|
|
25689
|
+
marginLeft: "ml1",
|
|
25690
|
+
transition: "transitionAll",
|
|
25691
|
+
opacity: "o0",
|
|
25692
|
+
transform: "transform_scale_0_75_translateY_100",
|
|
25693
|
+
...completed ? {
|
|
25694
|
+
opacity: "o100",
|
|
25695
|
+
transform: "transform_scale_1_translateY_0"
|
|
25696
|
+
} : {}
|
|
25697
|
+
}), children: /* @__PURE__ */ (0, import_jsx_runtime200.jsx)(Icon, { icon: "check", inc: 2.5, ...tid.check }) })
|
|
25698
|
+
] }),
|
|
25699
|
+
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)("span", { "aria-hidden": true, ...(0, import_runtime123.trussProps)(getIndicatorStyles(active, completed, disabled)), ...tid.indicator }),
|
|
25671
25700
|
/* @__PURE__ */ (0, import_jsx_runtime200.jsx)(import_react_aria63.VisuallyHidden, { children: completed ? "Complete" : "Not Complete" })
|
|
25672
25701
|
] });
|
|
25673
25702
|
}
|
|
25674
|
-
function
|
|
25703
|
+
function getStateStyles(active, completed) {
|
|
25675
25704
|
return {
|
|
25676
|
-
|
|
25677
|
-
|
|
25678
|
-
|
|
25679
|
-
|
|
25705
|
+
color: ["color_var", {
|
|
25706
|
+
"--color": "var(--b-on-surface-muted)"
|
|
25707
|
+
}],
|
|
25708
|
+
...active || completed ? {
|
|
25709
|
+
color: ["color_var", {
|
|
25710
|
+
"--color": "var(--b-choice-selected)"
|
|
25680
25711
|
}]
|
|
25681
|
-
}
|
|
25682
|
-
...color
|
|
25712
|
+
} : {}
|
|
25683
25713
|
};
|
|
25684
25714
|
}
|
|
25685
|
-
function
|
|
25715
|
+
function getIndicatorStyles(active, completed, disabled) {
|
|
25686
25716
|
return {
|
|
25687
25717
|
...{
|
|
25688
|
-
|
|
25689
|
-
|
|
25690
|
-
|
|
25691
|
-
|
|
25692
|
-
|
|
25693
|
-
|
|
25694
|
-
|
|
25695
|
-
|
|
25718
|
+
position: "absolute",
|
|
25719
|
+
left: "left0",
|
|
25720
|
+
right: "right0",
|
|
25721
|
+
bottom: "bottom0",
|
|
25722
|
+
height: ["h_var", {
|
|
25723
|
+
"--height": `${active ? activeIndicatorHeightPx : inactiveIndicatorHeightPx}px`
|
|
25724
|
+
}],
|
|
25725
|
+
backgroundColor: ["bgColor_var", {
|
|
25726
|
+
"--backgroundColor": "var(--b-field-border-default)"
|
|
25727
|
+
}],
|
|
25728
|
+
...(active || completed) && !disabled ? {
|
|
25729
|
+
backgroundColor: ["bgColor_var", {
|
|
25730
|
+
"--backgroundColor": "var(--b-primary)"
|
|
25731
|
+
}]
|
|
25696
25732
|
} : {}
|
|
25697
|
-
},
|
|
25698
|
-
...withBorderBottom(active || completed ? {
|
|
25699
|
-
borderColor: "bcBlue600"
|
|
25700
|
-
} : {
|
|
25701
|
-
borderColor: "bcGray300"
|
|
25702
|
-
})
|
|
25703
|
-
};
|
|
25704
|
-
}
|
|
25705
|
-
function getCollapsedStyles(active, completed) {
|
|
25706
|
-
return {
|
|
25707
|
-
...{
|
|
25708
|
-
cursor: "cursor_default",
|
|
25709
|
-
height: "h_0px",
|
|
25710
|
-
paddingTop: "pt0",
|
|
25711
|
-
paddingBottom: "pb0"
|
|
25712
|
-
},
|
|
25713
|
-
...active || completed ? {
|
|
25714
|
-
borderColor: "bcBlue600"
|
|
25715
|
-
} : {
|
|
25716
|
-
borderColor: "bcGray300"
|
|
25717
25733
|
}
|
|
25718
25734
|
};
|
|
25719
25735
|
}
|
|
25736
|
+
var activeIndicatorHeightPx = 3;
|
|
25737
|
+
var inactiveIndicatorHeightPx = 2;
|
|
25720
25738
|
var stepperTabStyles = {
|
|
25739
|
+
// No overflow:hidden — collapsed indicators are absolute and must paint outside the 0-height box.
|
|
25721
25740
|
baseStyles: {
|
|
25741
|
+
position: "relative",
|
|
25722
25742
|
display: "df",
|
|
25723
25743
|
alignItems: "aic",
|
|
25744
|
+
justifyContent: "jcfs",
|
|
25724
25745
|
flexGrow: "fg1",
|
|
25725
25746
|
paddingTop: "pt1",
|
|
25726
25747
|
paddingBottom: "pb1",
|
|
@@ -25729,10 +25750,11 @@ var stepperTabStyles = {
|
|
|
25729
25750
|
fontWeight: "fw4",
|
|
25730
25751
|
fontSize: "fz_14px",
|
|
25731
25752
|
lineHeight: "lh_20px",
|
|
25732
|
-
|
|
25753
|
+
color: ["color_var", {
|
|
25754
|
+
"--color": "var(--b-on-surface-muted)"
|
|
25755
|
+
}],
|
|
25733
25756
|
textAlign: "tal",
|
|
25734
|
-
height: "
|
|
25735
|
-
transition: "transitionAll"
|
|
25757
|
+
height: "h_40px"
|
|
25736
25758
|
},
|
|
25737
25759
|
hoverStyles: {
|
|
25738
25760
|
backgroundColor: "bgGray100"
|
|
@@ -25741,11 +25763,17 @@ var stepperTabStyles = {
|
|
|
25741
25763
|
boxShadow: "bshFocus",
|
|
25742
25764
|
outline: "outline0"
|
|
25743
25765
|
},
|
|
25744
|
-
|
|
25766
|
+
collapsedStyles: {
|
|
25767
|
+
cursor: "cursor_default",
|
|
25768
|
+
height: "h_0px",
|
|
25769
|
+
paddingTop: "pt0",
|
|
25770
|
+
paddingBottom: "pb0"
|
|
25771
|
+
},
|
|
25745
25772
|
disabledStyles: {
|
|
25746
|
-
color: "
|
|
25747
|
-
|
|
25748
|
-
|
|
25773
|
+
color: ["color_var", {
|
|
25774
|
+
"--color": "var(--b-text-disabled)"
|
|
25775
|
+
}],
|
|
25776
|
+
cursor: "cursorNotAllowed"
|
|
25749
25777
|
}
|
|
25750
25778
|
};
|
|
25751
25779
|
|
|
@@ -25766,6 +25794,7 @@ function StepperTabs(props) {
|
|
|
25766
25794
|
} = useBreakpoint();
|
|
25767
25795
|
const collapsed = isMobile || !!forceCollapsed;
|
|
25768
25796
|
const capWidth = steps.length <= 3;
|
|
25797
|
+
const currentStepIndex = Math.max(0, steps.findIndex((step) => step.value === currentStep));
|
|
25769
25798
|
return /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("nav", { "aria-label": "steps", className: "w100", ...tid, children: /* @__PURE__ */ (0, import_jsx_runtime201.jsx)("ol", { ...(0, import_runtime124.trussProps)({
|
|
25770
25799
|
padding: "p_0",
|
|
25771
25800
|
margin: "m_0",
|
|
@@ -25778,8 +25807,9 @@ function StepperTabs(props) {
|
|
|
25778
25807
|
borderBottomStyle: "bbs_solid",
|
|
25779
25808
|
borderBottomWidth: "bbw_1px",
|
|
25780
25809
|
borderColor: "bcGray400"
|
|
25781
|
-
}), children: steps.map((step) => {
|
|
25782
|
-
const isCurrent =
|
|
25810
|
+
}), children: steps.map((step, idx) => {
|
|
25811
|
+
const isCurrent = idx === currentStepIndex;
|
|
25812
|
+
const isCompleted = idx < currentStepIndex;
|
|
25783
25813
|
return /* @__PURE__ */ (0, import_react145.createElement)("li", { ...(0, import_runtime124.trussProps)({
|
|
25784
25814
|
display: "df",
|
|
25785
25815
|
flexGrow: "fg1",
|
|
@@ -25792,7 +25822,7 @@ function StepperTabs(props) {
|
|
|
25792
25822
|
"--maxWidth": `${maxStepWidthPx}px`
|
|
25793
25823
|
}]
|
|
25794
25824
|
} : {}
|
|
25795
|
-
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed:
|
|
25825
|
+
}), key: step.value, "aria-current": isCurrent, ...tid.step }, /* @__PURE__ */ (0, import_jsx_runtime201.jsx)(StepperTab, { label: step.label, value: step.value, active: isCurrent, completed: isCompleted, disabled: step.disabled, collapsed, onClick: onChange, ...tid.tab }));
|
|
25796
25826
|
}) }) });
|
|
25797
25827
|
}
|
|
25798
25828
|
var maxStepWidthPx = 280;
|
|
@@ -26586,7 +26616,7 @@ function FormSectionLayout(props) {
|
|
|
26586
26616
|
] }),
|
|
26587
26617
|
initialFields
|
|
26588
26618
|
] }),
|
|
26589
|
-
/* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
26619
|
+
sections && /* @__PURE__ */ (0, import_jsx_runtime209.jsx)("div", { className: "df fdc gap8", children: sections.map((section, i) => /* @__PURE__ */ (0, import_jsx_runtime209.jsx)(FormSection, { ...section }, defaultTestId(section.title) || i)) })
|
|
26590
26620
|
] });
|
|
26591
26621
|
}
|
|
26592
26622
|
|
|
@@ -27084,11 +27114,11 @@ function WorkflowLayout(props) {
|
|
|
27084
27114
|
isDirty,
|
|
27085
27115
|
...headerProps
|
|
27086
27116
|
} = props;
|
|
27087
|
-
const
|
|
27117
|
+
const stepTabs = steps.map((step) => ({
|
|
27088
27118
|
...step,
|
|
27089
27119
|
value: defaultTestId(step.label)
|
|
27090
27120
|
}));
|
|
27091
|
-
const [currentStep, setCurrentStep] = (0, import_react156.useState)(() => getInitialStep(
|
|
27121
|
+
const [currentStep, setCurrentStep] = (0, import_react156.useState)(() => getInitialStep(stepTabs, defaultStep));
|
|
27092
27122
|
const tid = useTestIds(props, "workflowLayout");
|
|
27093
27123
|
const {
|
|
27094
27124
|
sm: isMobile
|
|
@@ -27110,17 +27140,17 @@ function WorkflowLayout(props) {
|
|
|
27110
27140
|
const cssVars = headerHeight > 0 ? {
|
|
27111
27141
|
[beamPageHeaderLayoutHeightVar]: `${headerHeight}px`
|
|
27112
27142
|
} : void 0;
|
|
27113
|
-
const currentIndex = isValidStep(
|
|
27143
|
+
const currentIndex = isValidStep(stepTabs, currentStep) ? stepTabs.findIndex((step) => step.value === currentStep) : 0;
|
|
27114
27144
|
const isFirstStep = currentIndex <= 0;
|
|
27115
|
-
const isLastStep = currentIndex ===
|
|
27116
|
-
const activeStep =
|
|
27117
|
-
const buttons = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(
|
|
27145
|
+
const isLastStep = currentIndex === stepTabs.length - 1;
|
|
27146
|
+
const activeStep = stepTabs[currentIndex];
|
|
27147
|
+
const buttons = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(WorkflowActions, { isFirstStep, isLastStep, isMobile, onBack: () => setCurrentStep(stepTabs[currentIndex - 1].value), onCancel: onCancelClick, onSaveAndExit, completeLabel, onComplete, primaryDisabled: !activeStep?.isValid, onContinue: async () => {
|
|
27118
27148
|
const onContinue = activeStep?.onContinue;
|
|
27119
27149
|
if (onContinue) {
|
|
27120
27150
|
const allowed = await onContinue();
|
|
27121
27151
|
if (allowed === false) return;
|
|
27122
27152
|
}
|
|
27123
|
-
setCurrentStep(
|
|
27153
|
+
setCurrentStep(stepTabs[currentIndex + 1].value);
|
|
27124
27154
|
} });
|
|
27125
27155
|
const showFooter = isMobile;
|
|
27126
27156
|
(0, import_react156.useLayoutEffect)(() => {
|
|
@@ -27136,7 +27166,7 @@ function WorkflowLayout(props) {
|
|
|
27136
27166
|
};
|
|
27137
27167
|
}, [showFooter]);
|
|
27138
27168
|
const headerEl = /* @__PURE__ */ (0, import_jsx_runtime218.jsx)(WorkflowHeader, { ...headerProps, rightSlot: isMobile ? void 0 : buttons, stepperTabs: {
|
|
27139
|
-
steps:
|
|
27169
|
+
steps: stepTabs,
|
|
27140
27170
|
currentStep,
|
|
27141
27171
|
onChange: setCurrentStep,
|
|
27142
27172
|
collapsed
|