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