@homebound/beam 2.385.1 → 2.386.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 +35 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +35 -42
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -9552,31 +9552,36 @@ function CheckboxBase(props) {
|
|
|
9552
9552
|
errorMsg,
|
|
9553
9553
|
helperText,
|
|
9554
9554
|
checkboxOnly = false,
|
|
9555
|
-
withLabelElement = true
|
|
9555
|
+
withLabelElement = true,
|
|
9556
|
+
tooltip
|
|
9556
9557
|
} = props;
|
|
9557
9558
|
const ref = (0, import_react39.useRef)(null);
|
|
9558
9559
|
const { isFocusVisible, focusProps } = (0, import_react_aria21.useFocusRing)(ariaProps);
|
|
9559
9560
|
const tid = useTestIds(props, defaultTestId(label));
|
|
9560
9561
|
const Tag2 = withLabelElement ? "label" : "div";
|
|
9561
|
-
return
|
|
9562
|
-
|
|
9563
|
-
|
|
9564
|
-
|
|
9565
|
-
|
|
9566
|
-
|
|
9567
|
-
|
|
9568
|
-
|
|
9569
|
-
|
|
9570
|
-
|
|
9571
|
-
|
|
9572
|
-
|
|
9573
|
-
|
|
9574
|
-
|
|
9575
|
-
|
|
9576
|
-
|
|
9577
|
-
|
|
9578
|
-
|
|
9579
|
-
|
|
9562
|
+
return maybeTooltip({
|
|
9563
|
+
title: tooltip,
|
|
9564
|
+
placement: "top",
|
|
9565
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
9566
|
+
Tag2,
|
|
9567
|
+
{
|
|
9568
|
+
css: Css.df.cursorPointer.relative.w("max-content").maxw(px(320)).if(description !== void 0).maxw(px(344)).if(isDisabled).cursorNotAllowed.$,
|
|
9569
|
+
"aria-label": label,
|
|
9570
|
+
children: [
|
|
9571
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_aria21.VisuallyHidden, { children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("input", { ref, ...(0, import_react_aria21.mergeProps)(inputProps, focusProps), ...tid, "data-indeterminate": isIndeterminate }) }),
|
|
9572
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StyledCheckbox, { ...props, isFocusVisible, ...tid }),
|
|
9573
|
+
!checkboxOnly && // Use a mtPx(-2) to better align the label with the checkbox.
|
|
9574
|
+
// Not using align-items: center as the checkbox would align with all content below, where we really want it to stay only aligned with the label
|
|
9575
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", { css: Css.ml1.mtPx(-2).$, children: [
|
|
9576
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { css: { ...labelStyles, ...isDisabled && disabledColor }, children: label }),
|
|
9577
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { css: { ...descStyles, ...isDisabled && disabledColor }, children: description }),
|
|
9578
|
+
errorMsg && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ErrorMessage, { errorMsg, ...tid.errorMsg }),
|
|
9579
|
+
helperText && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(HelperText, { helperText, ...tid.helperText })
|
|
9580
|
+
] })
|
|
9581
|
+
]
|
|
9582
|
+
}
|
|
9583
|
+
)
|
|
9584
|
+
});
|
|
9580
9585
|
}
|
|
9581
9586
|
var baseStyles2 = Css.hPx(16).mw(px(16)).relative.ba.bcGray300.br4.bgWhite.transition.$;
|
|
9582
9587
|
var filledBoxStyles = Css.bcBlue700.bgBlue700.$;
|
|
@@ -11014,10 +11019,10 @@ var import_react_aria29 = require("react-aria");
|
|
|
11014
11019
|
var import_react_stately9 = require("react-stately");
|
|
11015
11020
|
var import_jsx_runtime57 = require("@emotion/react/jsx-runtime");
|
|
11016
11021
|
function Checkbox(props) {
|
|
11017
|
-
const { label, disabled
|
|
11022
|
+
const { label, disabled = false, selected, ...otherProps } = props;
|
|
11018
11023
|
const isSelected = selected === true;
|
|
11019
11024
|
const isIndeterminate = selected === "indeterminate";
|
|
11020
|
-
const ariaProps = { isSelected, isDisabled, isIndeterminate, ...otherProps };
|
|
11025
|
+
const ariaProps = { isSelected, isDisabled: !!disabled, isIndeterminate, ...otherProps };
|
|
11021
11026
|
const checkboxProps = { ...ariaProps, "aria-label": label };
|
|
11022
11027
|
const ref = (0, import_react47.useRef)(null);
|
|
11023
11028
|
const toggleState = (0, import_react_stately9.useToggleState)(ariaProps);
|
|
@@ -11026,11 +11031,12 @@ function Checkbox(props) {
|
|
|
11026
11031
|
CheckboxBase,
|
|
11027
11032
|
{
|
|
11028
11033
|
ariaProps,
|
|
11029
|
-
isDisabled,
|
|
11034
|
+
isDisabled: ariaProps.isDisabled,
|
|
11030
11035
|
isIndeterminate,
|
|
11031
11036
|
isSelected,
|
|
11032
11037
|
inputProps,
|
|
11033
11038
|
label,
|
|
11039
|
+
tooltip: resolveTooltip(disabled),
|
|
11034
11040
|
...otherProps
|
|
11035
11041
|
}
|
|
11036
11042
|
);
|
|
@@ -14384,7 +14390,6 @@ function SuperDrawer() {
|
|
|
14384
14390
|
}
|
|
14385
14391
|
|
|
14386
14392
|
// src/components/Layout/FormPageLayout.tsx
|
|
14387
|
-
var import_mobx_react21 = require("mobx-react");
|
|
14388
14393
|
var import_react85 = __toESM(require("react"), 1);
|
|
14389
14394
|
var import_react_aria43 = require("react-aria");
|
|
14390
14395
|
|
|
@@ -15240,7 +15245,7 @@ function BoundForm(props) {
|
|
|
15240
15245
|
function FormRow({ row, formState }) {
|
|
15241
15246
|
const tid = useTestIds({}, "boundFormRow");
|
|
15242
15247
|
const componentsWithConfig = (0, import_react81.useMemo)(() => {
|
|
15243
|
-
return
|
|
15248
|
+
return Object.entries(row).map(([key, fieldFnOrCustomNode]) => {
|
|
15244
15249
|
if (typeof fieldFnOrCustomNode === "function" && !isCustomReactNodeKey(key)) {
|
|
15245
15250
|
const field = formState[key] ?? fail(`Field ${key.toString()} not found in formState`);
|
|
15246
15251
|
const fieldFn = fieldFnOrCustomNode ?? fail(`Field function not defined for key ${key.toLocaleString()}`);
|
|
@@ -15606,7 +15611,7 @@ function PageHeader(props) {
|
|
|
15606
15611
|
breadCrumb && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(PageHeaderBreadcrumbs, { breadcrumb: breadCrumb }),
|
|
15607
15612
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("h1", { css: Css.xl3Sb.$, ...tids.pageTitle, children: pageTitle })
|
|
15608
15613
|
] }),
|
|
15609
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.
|
|
15614
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)("div", { css: Css.df.gap1.$, children: [
|
|
15610
15615
|
tertiaryAction && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15611
15616
|
Button,
|
|
15612
15617
|
{
|
|
@@ -15614,8 +15619,7 @@ function PageHeader(props) {
|
|
|
15614
15619
|
onClick: tertiaryAction.onClick,
|
|
15615
15620
|
variant: "tertiary",
|
|
15616
15621
|
disabled: tertiaryAction.disabled,
|
|
15617
|
-
tooltip: tertiaryAction.tooltip
|
|
15618
|
-
...tids.tertiaryAction
|
|
15622
|
+
tooltip: tertiaryAction.tooltip
|
|
15619
15623
|
}
|
|
15620
15624
|
),
|
|
15621
15625
|
cancelAction && /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
@@ -15625,22 +15629,11 @@ function PageHeader(props) {
|
|
|
15625
15629
|
onClick: cancelAction.onClick,
|
|
15626
15630
|
variant: "secondary",
|
|
15627
15631
|
disabled: cancelAction.disabled,
|
|
15628
|
-
tooltip: cancelAction.tooltip
|
|
15629
|
-
...tids.cancelAction
|
|
15632
|
+
tooltip: cancelAction.tooltip
|
|
15630
15633
|
}
|
|
15631
15634
|
),
|
|
15632
|
-
|
|
15633
|
-
|
|
15634
|
-
{
|
|
15635
|
-
label: submitAction.label,
|
|
15636
|
-
onClick: submitAction.onClick,
|
|
15637
|
-
variant: "primary",
|
|
15638
|
-
disabled: !formState.valid || submitAction.disabled,
|
|
15639
|
-
tooltip: submitAction.tooltip,
|
|
15640
|
-
...tids.submitAction
|
|
15641
|
-
}
|
|
15642
|
-
)
|
|
15643
|
-
] }) })
|
|
15635
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(SubmitButton, { form: formState, ...submitAction })
|
|
15636
|
+
] })
|
|
15644
15637
|
] }) });
|
|
15645
15638
|
}
|
|
15646
15639
|
function FormSections(props) {
|