@homebound/beam 3.105.2 → 3.107.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 +29 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -10
- package/dist/index.d.ts +13 -10
- package/dist/index.js +29 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -6938,6 +6938,8 @@ type MenuItemBase = {
|
|
|
6938
6938
|
disabled?: boolean | ReactNode;
|
|
6939
6939
|
destructive?: boolean;
|
|
6940
6940
|
hasDivider?: boolean;
|
|
6941
|
+
/** Shows AiStar and styling on label. This ai icon and styling trumps all other subtypes. */
|
|
6942
|
+
ai?: boolean;
|
|
6941
6943
|
};
|
|
6942
6944
|
type IconMenuItemType = MenuItemBase & {
|
|
6943
6945
|
icon: IconProps["icon"];
|
|
@@ -10283,6 +10285,7 @@ type StepperTabProps = {
|
|
|
10283
10285
|
/** Whether this step's content has been completed. */
|
|
10284
10286
|
completed: boolean;
|
|
10285
10287
|
onClick: (value: string) => void;
|
|
10288
|
+
/** Tab isn't clickable. */
|
|
10286
10289
|
disabled?: boolean;
|
|
10287
10290
|
/** Collapses the tab down to its colored bottom border only, hiding the label — for the mobile view */
|
|
10288
10291
|
collapsed?: boolean;
|
|
@@ -10303,8 +10306,8 @@ type WorkflowActionsProps = {
|
|
|
10303
10306
|
completeLabel: "Create" | "Save";
|
|
10304
10307
|
/** Called when the completion button is clicked. */
|
|
10305
10308
|
onComplete: (e: PressEvent) => void | Promise<void>;
|
|
10306
|
-
/**
|
|
10307
|
-
primaryDisabled?: boolean;
|
|
10309
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10310
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10308
10311
|
/** When true, Continue/Complete use the `ai` button variant instead of `primary`. */
|
|
10309
10312
|
aiMode?: boolean;
|
|
10310
10313
|
isFirstStep?: boolean;
|
|
@@ -10680,8 +10683,8 @@ type PageHeaderLayoutProps<V extends string, X> = {
|
|
|
10680
10683
|
declare function PageHeaderLayout<V extends string, X extends Only<TabsContentXss, X>>(props: PageHeaderLayoutProps<V, X>): JSX.Element;
|
|
10681
10684
|
|
|
10682
10685
|
type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10683
|
-
/**
|
|
10684
|
-
|
|
10686
|
+
/** Create/Save is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10687
|
+
primaryDisabled?: WorkflowActionsProps["primaryDisabled"];
|
|
10685
10688
|
/** Read on Cancel / leave — a callback so flipping dirty does not re-render. */
|
|
10686
10689
|
isDirty?: () => boolean;
|
|
10687
10690
|
/** Full-bleed AI wash on the body and the `ai` Create/Save variant. Pair with body `aiMode` (e.g. FormSectionLayout). */
|
|
@@ -10697,15 +10700,15 @@ type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuff
|
|
|
10697
10700
|
declare function FocusedFormLayout(props: FocusedFormLayoutProps): JSX.Element;
|
|
10698
10701
|
|
|
10699
10702
|
/**
|
|
10700
|
-
* A `StepperLayout` step:
|
|
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.
|
|
10703
|
+
* A `StepperLayout` step: `StepperTabsStep` (minus `value`) plus page content.
|
|
10703
10704
|
*/
|
|
10704
|
-
type StepperLayoutStep = Omit<StepperTabsStep, "value"> & {
|
|
10705
|
+
type StepperLayoutStep = Omit<StepperTabsStep, "value" | "disabled"> & {
|
|
10705
10706
|
/** Rendered as the page body while this is the active step. */
|
|
10706
10707
|
content: ReactNode;
|
|
10707
|
-
/**
|
|
10708
|
-
|
|
10708
|
+
/** Tab isn't clickable. */
|
|
10709
|
+
disabled?: boolean;
|
|
10710
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10711
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10709
10712
|
};
|
|
10710
10713
|
type StepperLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10711
10714
|
/** 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
|
@@ -6938,6 +6938,8 @@ type MenuItemBase = {
|
|
|
6938
6938
|
disabled?: boolean | ReactNode;
|
|
6939
6939
|
destructive?: boolean;
|
|
6940
6940
|
hasDivider?: boolean;
|
|
6941
|
+
/** Shows AiStar and styling on label. This ai icon and styling trumps all other subtypes. */
|
|
6942
|
+
ai?: boolean;
|
|
6941
6943
|
};
|
|
6942
6944
|
type IconMenuItemType = MenuItemBase & {
|
|
6943
6945
|
icon: IconProps["icon"];
|
|
@@ -10283,6 +10285,7 @@ type StepperTabProps = {
|
|
|
10283
10285
|
/** Whether this step's content has been completed. */
|
|
10284
10286
|
completed: boolean;
|
|
10285
10287
|
onClick: (value: string) => void;
|
|
10288
|
+
/** Tab isn't clickable. */
|
|
10286
10289
|
disabled?: boolean;
|
|
10287
10290
|
/** Collapses the tab down to its colored bottom border only, hiding the label — for the mobile view */
|
|
10288
10291
|
collapsed?: boolean;
|
|
@@ -10303,8 +10306,8 @@ type WorkflowActionsProps = {
|
|
|
10303
10306
|
completeLabel: "Create" | "Save";
|
|
10304
10307
|
/** Called when the completion button is clicked. */
|
|
10305
10308
|
onComplete: (e: PressEvent) => void | Promise<void>;
|
|
10306
|
-
/**
|
|
10307
|
-
primaryDisabled?: boolean;
|
|
10309
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10310
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10308
10311
|
/** When true, Continue/Complete use the `ai` button variant instead of `primary`. */
|
|
10309
10312
|
aiMode?: boolean;
|
|
10310
10313
|
isFirstStep?: boolean;
|
|
@@ -10680,8 +10683,8 @@ type PageHeaderLayoutProps<V extends string, X> = {
|
|
|
10680
10683
|
declare function PageHeaderLayout<V extends string, X extends Only<TabsContentXss, X>>(props: PageHeaderLayoutProps<V, X>): JSX.Element;
|
|
10681
10684
|
|
|
10682
10685
|
type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10683
|
-
/**
|
|
10684
|
-
|
|
10686
|
+
/** Create/Save is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10687
|
+
primaryDisabled?: WorkflowActionsProps["primaryDisabled"];
|
|
10685
10688
|
/** Read on Cancel / leave — a callback so flipping dirty does not re-render. */
|
|
10686
10689
|
isDirty?: () => boolean;
|
|
10687
10690
|
/** Full-bleed AI wash on the body and the `ai` Create/Save variant. Pair with body `aiMode` (e.g. FormSectionLayout). */
|
|
@@ -10697,15 +10700,15 @@ type FocusedFormLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuff
|
|
|
10697
10700
|
declare function FocusedFormLayout(props: FocusedFormLayoutProps): JSX.Element;
|
|
10698
10701
|
|
|
10699
10702
|
/**
|
|
10700
|
-
* A `StepperLayout` step:
|
|
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.
|
|
10703
|
+
* A `StepperLayout` step: `StepperTabsStep` (minus `value`) plus page content.
|
|
10703
10704
|
*/
|
|
10704
|
-
type StepperLayoutStep = Omit<StepperTabsStep, "value"> & {
|
|
10705
|
+
type StepperLayoutStep = Omit<StepperTabsStep, "value" | "disabled"> & {
|
|
10705
10706
|
/** Rendered as the page body while this is the active step. */
|
|
10706
10707
|
content: ReactNode;
|
|
10707
|
-
/**
|
|
10708
|
-
|
|
10708
|
+
/** Tab isn't clickable. */
|
|
10709
|
+
disabled?: boolean;
|
|
10710
|
+
/** Continue/Complete is disabled. A ReactNode is shown in Beam's tooltip. */
|
|
10711
|
+
primaryDisabled?: boolean | ReactNode;
|
|
10709
10712
|
};
|
|
10710
10713
|
type StepperLayoutProps = Pick<BaseHeaderProps, "title" | "documentTitleSuffix" | "breadcrumbs"> & Pick<WorkflowActionsProps, "onCancel" | "completeLabel" | "onComplete" | "onSaveAndExit"> & {
|
|
10711
10714
|
/** 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
|
@@ -11375,7 +11375,7 @@ function MenuItemImpl(props) {
|
|
|
11375
11375
|
}
|
|
11376
11376
|
function renderMenuItem(menuItem, isSelected, isDisabled) {
|
|
11377
11377
|
return /* @__PURE__ */ jsxs27("div", { className: "df w100 aic jcsb gap2", children: [
|
|
11378
|
-
/* @__PURE__ */ jsx44("div", { className: "df aic", children: maybeWrapInLink(menuItem.onClick, isIconMenuItem(menuItem) ? /* @__PURE__ */ jsx44(IconMenuItem, { ...menuItem }) : isImageMenuItem(menuItem) ? /* @__PURE__ */ jsx44(ImageMenuItem, { ...menuItem }) : menuItem.label, isDisabled) }),
|
|
11378
|
+
/* @__PURE__ */ jsx44("div", { className: "df aic", children: maybeWrapInLink(menuItem.onClick, menuItem.ai ? /* @__PURE__ */ jsx44(AiMenuItem, { label: menuItem.label, isDisabled }) : isIconMenuItem(menuItem) ? /* @__PURE__ */ jsx44(IconMenuItem, { ...menuItem }) : isImageMenuItem(menuItem) ? /* @__PURE__ */ jsx44(ImageMenuItem, { ...menuItem }) : menuItem.label, isDisabled) }),
|
|
11379
11379
|
isSelected && /* @__PURE__ */ jsx44(Icon, { icon: "check", color: isDisabled ? "--b-text-disabled" /* TextDisabled */ : "--b-selection-indicator" /* SelectionIndicator */ })
|
|
11380
11380
|
] });
|
|
11381
11381
|
}
|
|
@@ -11391,6 +11391,21 @@ function ImageMenuItem(item) {
|
|
|
11391
11391
|
label
|
|
11392
11392
|
] });
|
|
11393
11393
|
}
|
|
11394
|
+
function AiMenuItem({
|
|
11395
|
+
label,
|
|
11396
|
+
isDisabled
|
|
11397
|
+
}) {
|
|
11398
|
+
return /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
11399
|
+
/* @__PURE__ */ jsx44("span", { className: "df aic jcc fs0 h_24px w_24px mr2", children: /* @__PURE__ */ jsx44(Icon, { icon: "aiStar", inc: 2.125 }) }),
|
|
11400
|
+
/* @__PURE__ */ jsx44("span", { ...trussProps32({
|
|
11401
|
+
...!isDisabled ? {
|
|
11402
|
+
color: ["color_var", {
|
|
11403
|
+
"--color": maybeCssVar15("rgba(124, 58, 237, 1)" /* Purple600 */)
|
|
11404
|
+
}]
|
|
11405
|
+
} : {}
|
|
11406
|
+
}), children: label })
|
|
11407
|
+
] });
|
|
11408
|
+
}
|
|
11394
11409
|
function IconMenuItem(item) {
|
|
11395
11410
|
const {
|
|
11396
11411
|
icon,
|
|
@@ -28647,7 +28662,17 @@ function WorkflowPageLayout(props) {
|
|
|
28647
28662
|
// src/layouts/Workflow/FocusedFormLayout.tsx
|
|
28648
28663
|
import { jsx as jsx240 } from "react/jsx-runtime";
|
|
28649
28664
|
function FocusedFormLayout(props) {
|
|
28650
|
-
const {
|
|
28665
|
+
const {
|
|
28666
|
+
onCancel,
|
|
28667
|
+
completeLabel,
|
|
28668
|
+
onComplete,
|
|
28669
|
+
onSaveAndExit,
|
|
28670
|
+
primaryDisabled,
|
|
28671
|
+
isDirty,
|
|
28672
|
+
aiMode,
|
|
28673
|
+
children,
|
|
28674
|
+
...headerProps
|
|
28675
|
+
} = props;
|
|
28651
28676
|
const tid = useTestIds(props, "focusedFormLayout");
|
|
28652
28677
|
return /* @__PURE__ */ jsx240(
|
|
28653
28678
|
WorkflowPageLayout,
|
|
@@ -28660,7 +28685,7 @@ function FocusedFormLayout(props) {
|
|
|
28660
28685
|
onSaveAndExit,
|
|
28661
28686
|
completeLabel,
|
|
28662
28687
|
onComplete,
|
|
28663
|
-
primaryDisabled
|
|
28688
|
+
primaryDisabled,
|
|
28664
28689
|
children
|
|
28665
28690
|
}
|
|
28666
28691
|
);
|
|
@@ -28696,7 +28721,7 @@ function StepperLayout(props) {
|
|
|
28696
28721
|
onSaveAndExit,
|
|
28697
28722
|
completeLabel,
|
|
28698
28723
|
onComplete,
|
|
28699
|
-
primaryDisabled:
|
|
28724
|
+
primaryDisabled: activeStep?.primaryDisabled,
|
|
28700
28725
|
onContinue: async () => {
|
|
28701
28726
|
const onContinue = activeStep?.onContinue;
|
|
28702
28727
|
if (onContinue) {
|