@homebound/beam 3.105.2 → 3.106.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.d.cts CHANGED
@@ -10283,6 +10283,7 @@ type StepperTabProps = {
10283
10283
  /** Whether this step's content has been completed. */
10284
10284
  completed: boolean;
10285
10285
  onClick: (value: string) => void;
10286
+ /** Tab isn't clickable. */
10286
10287
  disabled?: boolean;
10287
10288
  /** Collapses the tab down to its colored bottom border only, hiding the label — for the mobile view */
10288
10289
  collapsed?: boolean;
@@ -10303,8 +10304,8 @@ type WorkflowActionsProps = {
10303
10304
  completeLabel: "Create" | "Save";
10304
10305
  /** Called when the completion button is clicked. */
10305
10306
  onComplete: (e: PressEvent) => void | Promise<void>;
10306
- /** Disables whichever of Continue/Complete is currently shown, e.g. while the active step is invalid. */
10307
- primaryDisabled?: boolean;
10307
+ /** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
10308
+ primaryDisabled?: boolean | ReactNode;
10308
10309
  /** When true, Continue/Complete use the `ai` button variant instead of `primary`. */
10309
10310
  aiMode?: boolean;
10310
10311
  isFirstStep?: boolean;
@@ -10680,8 +10681,8 @@ type PageHeaderLayoutProps<V extends string, X> = {
10680
10681
  declare function PageHeaderLayout<V extends string, X extends Only<TabsContentXss, X>>(props: PageHeaderLayoutProps<V, X>): JSX.Element;
10681
10682
 
10682
10683
  type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
10683
- /** Gates the Create/Save CTA. */
10684
- isValid: boolean;
10684
+ /** Create/Save is disabled. A ReactNode is shown in Beam's tooltip. */
10685
+ primaryDisabled?: WorkflowActionsProps["primaryDisabled"];
10685
10686
  /** Read on Cancel / leave — a callback so flipping dirty does not re-render. */
10686
10687
  isDirty?: () => boolean;
10687
10688
  /** Full-bleed AI wash on the body and the `ai` Create/Save variant. Pair with body `aiMode` (e.g. FormSectionLayout). */
@@ -10697,15 +10698,15 @@ type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuff
10697
10698
  declare function FocusedFormLayout(props: FocusedFormLayoutProps): JSX.Element;
10698
10699
 
10699
10700
  /**
10700
- * A `StepperLayout` step: a `StepperTabsStep` (minus `value`, which is derived from `label`) plus
10701
- * page content. Stepper chrome marks prior steps complete via current-step index; `isValid` only
10702
- * gates the Continue/Complete CTA for the active step.
10701
+ * A `StepperLayout` step: `StepperTabsStep` (minus `value`) plus page content.
10703
10702
  */
10704
- type StepperLayoutStep = Omit<StepperTabsStep, "value"> & {
10703
+ type StepperLayoutStep = Omit<StepperTabsStep, "value" | "disabled"> & {
10705
10704
  /** Rendered as the page body while this is the active step. */
10706
10705
  content: ReactNode;
10707
- /** Gates Continue/Complete for the active step (form validity) */
10708
- isValid: boolean;
10706
+ /** Tab isn't clickable. */
10707
+ disabled?: boolean;
10708
+ /** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
10709
+ primaryDisabled?: boolean | ReactNode;
10709
10710
  };
10710
10711
  type StepperLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
10711
10712
  /** The workflow's steps; the active step's `content` is the body, and it drives the header's tab strip. */
package/dist/index.d.ts CHANGED
@@ -10283,6 +10283,7 @@ type StepperTabProps = {
10283
10283
  /** Whether this step's content has been completed. */
10284
10284
  completed: boolean;
10285
10285
  onClick: (value: string) => void;
10286
+ /** Tab isn't clickable. */
10286
10287
  disabled?: boolean;
10287
10288
  /** Collapses the tab down to its colored bottom border only, hiding the label — for the mobile view */
10288
10289
  collapsed?: boolean;
@@ -10303,8 +10304,8 @@ type WorkflowActionsProps = {
10303
10304
  completeLabel: "Create" | "Save";
10304
10305
  /** Called when the completion button is clicked. */
10305
10306
  onComplete: (e: PressEvent) => void | Promise<void>;
10306
- /** Disables whichever of Continue/Complete is currently shown, e.g. while the active step is invalid. */
10307
- primaryDisabled?: boolean;
10307
+ /** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
10308
+ primaryDisabled?: boolean | ReactNode;
10308
10309
  /** When true, Continue/Complete use the `ai` button variant instead of `primary`. */
10309
10310
  aiMode?: boolean;
10310
10311
  isFirstStep?: boolean;
@@ -10680,8 +10681,8 @@ type PageHeaderLayoutProps<V extends string, X> = {
10680
10681
  declare function PageHeaderLayout<V extends string, X extends Only<TabsContentXss, X>>(props: PageHeaderLayoutProps<V, X>): JSX.Element;
10681
10682
 
10682
10683
  type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
10683
- /** Gates the Create/Save CTA. */
10684
- isValid: boolean;
10684
+ /** Create/Save is disabled. A ReactNode is shown in Beam's tooltip. */
10685
+ primaryDisabled?: WorkflowActionsProps["primaryDisabled"];
10685
10686
  /** Read on Cancel / leave — a callback so flipping dirty does not re-render. */
10686
10687
  isDirty?: () => boolean;
10687
10688
  /** Full-bleed AI wash on the body and the `ai` Create/Save variant. Pair with body `aiMode` (e.g. FormSectionLayout). */
@@ -10697,15 +10698,15 @@ type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuff
10697
10698
  declare function FocusedFormLayout(props: FocusedFormLayoutProps): JSX.Element;
10698
10699
 
10699
10700
  /**
10700
- * A `StepperLayout` step: a `StepperTabsStep` (minus `value`, which is derived from `label`) plus
10701
- * page content. Stepper chrome marks prior steps complete via current-step index; `isValid` only
10702
- * gates the Continue/Complete CTA for the active step.
10701
+ * A `StepperLayout` step: `StepperTabsStep` (minus `value`) plus page content.
10703
10702
  */
10704
- type StepperLayoutStep = Omit<StepperTabsStep, "value"> & {
10703
+ type StepperLayoutStep = Omit<StepperTabsStep, "value" | "disabled"> & {
10705
10704
  /** Rendered as the page body while this is the active step. */
10706
10705
  content: ReactNode;
10707
- /** Gates Continue/Complete for the active step (form validity) */
10708
- isValid: boolean;
10706
+ /** Tab isn't clickable. */
10707
+ disabled?: boolean;
10708
+ /** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
10709
+ primaryDisabled?: boolean | ReactNode;
10709
10710
  };
10710
10711
  type StepperLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
10711
10712
  /** The workflow's steps; the active step's `content` is the body, and it drives the header's tab strip. */
package/dist/index.js CHANGED
@@ -28647,7 +28647,17 @@ function WorkflowPageLayout(props) {
28647
28647
  // src/layouts/Workflow/FocusedFormLayout.tsx
28648
28648
  import { jsx as jsx240 } from "react/jsx-runtime";
28649
28649
  function FocusedFormLayout(props) {
28650
- const { onCancel, completeLabel, onComplete, onSaveAndExit, isValid, isDirty, aiMode, children, ...headerProps } = props;
28650
+ const {
28651
+ onCancel,
28652
+ completeLabel,
28653
+ onComplete,
28654
+ onSaveAndExit,
28655
+ primaryDisabled,
28656
+ isDirty,
28657
+ aiMode,
28658
+ children,
28659
+ ...headerProps
28660
+ } = props;
28651
28661
  const tid = useTestIds(props, "focusedFormLayout");
28652
28662
  return /* @__PURE__ */ jsx240(
28653
28663
  WorkflowPageLayout,
@@ -28660,7 +28670,7 @@ function FocusedFormLayout(props) {
28660
28670
  onSaveAndExit,
28661
28671
  completeLabel,
28662
28672
  onComplete,
28663
- primaryDisabled: !isValid,
28673
+ primaryDisabled,
28664
28674
  children
28665
28675
  }
28666
28676
  );
@@ -28696,7 +28706,7 @@ function StepperLayout(props) {
28696
28706
  onSaveAndExit,
28697
28707
  completeLabel,
28698
28708
  onComplete,
28699
- primaryDisabled: !activeStep?.isValid,
28709
+ primaryDisabled: activeStep?.primaryDisabled,
28700
28710
  onContinue: async () => {
28701
28711
  const onContinue = activeStep?.onContinue;
28702
28712
  if (onContinue) {