@factorialco/f0-react 2.32.2 → 2.34.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/f0.d.ts CHANGED
@@ -59,6 +59,7 @@ import { F0FormDefinition as F0FormDefinition_2 } from './f0';
59
59
  import { F0FormDefinitionPerSection as F0FormDefinitionPerSection_2 } from './f0';
60
60
  import { F0FormDefinitionSingleSchema as F0FormDefinitionSingleSchema_2 } from './f0';
61
61
  import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
62
+ import { F0NumberInputProps as F0NumberInputProps_2 } from './F0NumberInput';
62
63
  import { F0SelectProps as F0SelectProps_2 } from './types';
63
64
  import { F0TagBalanceProps } from './types';
64
65
  import { F0TagCompanyProps } from './types';
@@ -67,6 +68,8 @@ import { F0TagPersonProps as F0TagPersonProps_2 } from './types';
67
68
  import { F0TagRawProps } from './types';
68
69
  import { F0TagStatusProps } from './types';
69
70
  import { F0TagTeamProps } from './types';
71
+ import { F0TextAreaInputProps as F0TextAreaInputProps_2 } from './F0TextAreaInput';
72
+ import { F0TextInputProps as F0TextInputProps_2 } from './F0TextInput';
70
73
  import { F0TimelineRowProps as F0TimelineRowProps_2 } from './types';
71
74
  import { f1Colors } from '@factorialco/f0-core';
72
75
  import { FC } from 'react';
@@ -86,9 +89,11 @@ import { GroupMasonryProps } from './groups/GroupMasonry';
86
89
  import { HourDistributionCellValue as HourDistributionCellValue_2 } from './types/hourDistribution';
87
90
  import { HTMLAttributeAnchorTarget } from 'react';
88
91
  import { HTMLAttributes } from 'react';
92
+ import { HTMLInputTypeAttribute } from 'react';
89
93
  import { IconCellValue } from './types/icon';
90
94
  import { ImgHTMLAttributes } from 'react';
91
95
  import { InFilterOptions } from './InFilter/types';
96
+ import { InputFieldProps as InputFieldProps_2 } from './f0';
92
97
  import { internalAvatarColors as internalAvatarColors_2 } from './f0';
93
98
  import { internalAvatarSizes as internalAvatarSizes_2 } from './f0';
94
99
  import { internalAvatarTypes as internalAvatarTypes_2 } from './f0';
@@ -147,6 +152,7 @@ import { TagVariant as TagVariant_2 } from './F0Tag';
147
152
  import { TeamCellValue } from './f0';
148
153
  import { TeamCellValue as TeamCellValue_2 } from './types/team';
149
154
  import { TeamItemProps } from './types';
155
+ import { TextareaHTMLAttributes } from 'react';
150
156
  import { TextCellValue } from './f0';
151
157
  import { TextCellValue as TextCellValue_2 } from './types/text';
152
158
  import { TrackReferenceOrPlaceholder } from '@livekit/components-react';
@@ -5788,7 +5794,7 @@ export declare type F0AiInsightCardProps = {
5788
5794
  onAskOne?: () => void;
5789
5795
  } & AiInsightCardContent;
5790
5796
 
5791
- declare type F0AiInsightCardPublicProps = Omit<CardInternalProps_2, (typeof privateProps_5)[number]>;
5797
+ declare type F0AiInsightCardPublicProps = Omit<CardInternalProps_2, (typeof privateProps_7)[number]>;
5792
5798
 
5793
5799
  export declare class F0AiMask {
5794
5800
  readonly element: HTMLElement;
@@ -6800,10 +6806,16 @@ displayName: string;
6800
6806
  * callbacks) lives in `clarifyingQuestion`. No coupling to `useAiChat`
6801
6807
  * — embedders can construct a state object themselves.
6802
6808
  */
6803
- export declare const F0ClarifyingPanel: ({ clarifyingQuestion, }: F0ClarifyingPanelProps) => JSX_2.Element;
6809
+ export declare const F0ClarifyingPanel: ({ clarifyingQuestion, isSubmitDisabled, }: F0ClarifyingPanelProps) => JSX_2.Element;
6804
6810
 
6805
6811
  declare interface F0ClarifyingPanelProps {
6806
6812
  clarifyingQuestion: ClarifyingQuestionState;
6813
+ /**
6814
+ * Disables submitting the final step (confirm button, Enter on the custom
6815
+ * answer input, and Skip) — e.g. while the assistant is still streaming a
6816
+ * response. Step navigation and option selection stay interactive.
6817
+ */
6818
+ isSubmitDisabled?: boolean;
6807
6819
  }
6808
6820
 
6809
6821
  /**
@@ -8901,6 +8913,15 @@ export declare type F0NumberField = F0BaseField & F0NumberConfig & {
8901
8913
  */
8902
8914
  export declare type F0NumberFieldConfig<R extends Record<string, unknown> = Record<string, unknown>> = F0NumberInputConfig | F0NumberMoneyConfig | F0NumberSelectConfig<R> | F0DurationFieldConfig;
8903
8915
 
8916
+ /**
8917
+ * @experimental This is an experimental component, use it at your own risk.
8918
+ *
8919
+ * F0NumberInput is the writable numeric field for forms — a box where the
8920
+ * user types a number. For arbitrary text use F0TextInput; for durations
8921
+ * (hours/minutes) use F0DurationInput.
8922
+ */
8923
+ export declare const F0NumberInput: (props: F0NumberInputProps) => JSX_2.Element;
8924
+
8904
8925
  /**
8905
8926
  * Config for number fields - number input
8906
8927
  */
@@ -8908,6 +8929,8 @@ declare type F0NumberInputConfig = F0BaseConfig & F0NumberConfig & {
8908
8929
  fieldType?: "number" | "percentage";
8909
8930
  };
8910
8931
 
8932
+ export declare type F0NumberInputProps = Omit<NumberInputInternalProps, (typeof privateProps_4)[number]>;
8933
+
8911
8934
  /**
8912
8935
  * Config for money fields - number input with currency suffix
8913
8936
  */
@@ -9176,6 +9199,27 @@ export declare type F0RichTextFieldConfig = F0BaseConfig & F0RichTextConfig & {
9176
9199
  fieldType: "richtext";
9177
9200
  };
9178
9201
 
9202
+ /**
9203
+ * @experimental This is an experimental component, use it at your own risk.
9204
+ *
9205
+ * F0SearchInput is the writable search field — a single-line text input
9206
+ * pre-configured with a search icon, `role="searchbox"`, debouncing, and
9207
+ * an optional minimum-length threshold before emitting changes.
9208
+ */
9209
+ export declare const F0SearchInput: ForwardRefExoticComponent< {
9210
+ value?: string;
9211
+ threshold?: number;
9212
+ debounceTime?: number;
9213
+ autoFocus?: boolean;
9214
+ } & Pick<InputFieldProps<string>, "onChange" | "name" | "size" | "onFocus" | "onBlur" | "loading" | "disabled" | "placeholder" | "clearable"> & RefAttributes<HTMLInputElement>>;
9215
+
9216
+ export declare type F0SearchInputProps = {
9217
+ value?: string;
9218
+ threshold?: number;
9219
+ debounceTime?: number;
9220
+ autoFocus?: boolean;
9221
+ } & Pick<InputFieldProps<string>, "size" | "loading" | "clearable" | "placeholder" | "disabled" | "onBlur" | "onFocus" | "onChange" | "name">;
9222
+
9179
9223
  /**
9180
9224
  * Action button configuration for a section.
9181
9225
  * Provide either onClick for a button action or href for a link.
@@ -9599,6 +9643,17 @@ export declare type F0TextareaField = F0BaseField & F0TextareaConfig & {
9599
9643
  renderIf?: TextareaFieldRenderIf;
9600
9644
  };
9601
9645
 
9646
+ /**
9647
+ * @experimental This is an experimental component, use it at your own risk.
9648
+ *
9649
+ * F0TextAreaInput is the writable multi-line text field for forms — a box
9650
+ * where the user types longer text spanning multiple lines. For a single
9651
+ * line of text use F0TextInput.
9652
+ */
9653
+ export declare const F0TextAreaInput: FC<F0TextAreaInputProps>;
9654
+
9655
+ export declare type F0TextAreaInputProps = Pick<ComponentProps<typeof Textarea_2>, "disabled" | "onChange" | "value" | "placeholder" | "rows" | "cols" | "label" | "labelIcon" | "icon" | "hideLabel" | "maxLength" | "clearable" | "onBlur" | "onFocus" | "name" | "status" | "hint" | "error" | "size" | "loading" | "required" | "maxHeight">;
9656
+
9602
9657
  /**
9603
9658
  * F0 config options specific to text fields
9604
9659
  */
@@ -9618,6 +9673,18 @@ export declare type F0TextField = F0BaseField & F0TextConfig & {
9618
9673
  renderIf?: TextFieldRenderIf;
9619
9674
  };
9620
9675
 
9676
+ /**
9677
+ * @experimental This is an experimental component, use it at your own risk.
9678
+ *
9679
+ * F0TextInput is the writable text field for forms — a box where the user
9680
+ * types text, numbers (as text), passwords, emails, etc. It is the canonical
9681
+ * "text input" of F0. For numeric or duration data prefer F0NumberInput or
9682
+ * F0DurationInput respectively.
9683
+ */
9684
+ export declare const F0TextInput: <T extends string>(props: F0TextInputProps<T>) => JSX_2.Element;
9685
+
9686
+ export declare type F0TextInputProps<T extends string> = Omit<InputInternalProps<T>, (typeof privateProps_5)[number]>;
9687
+
9621
9688
  export declare type F0TextProps = Omit<TextProps, "className" | "variant" | "as"> & {
9622
9689
  variant?: (typeof _allowedVariants_2)[number];
9623
9690
  as?: TextTags;
@@ -9924,6 +9991,24 @@ export declare interface F0ZodType<T extends ZodTypeAny = ZodTypeAny> {
9924
9991
  _innerSchema: T;
9925
9992
  }
9926
9993
 
9994
+ /**
9995
+ * @deprecated Renamed to `F0SearchInput` to match the F0 input vocabulary
9996
+ * (any component where the user types in a box has the `Input` suffix and
9997
+ * lives under the `Inputs/` group). The `F1` prefix was also legacy. Will
9998
+ * be removed once consumers have migrated.
9999
+ *
10000
+ * - import { F1SearchBox } from "@factorialco/f0-react"
10001
+ * + import { F0SearchInput } from "@factorialco/f0-react"
10002
+ *
10003
+ * @removeIn 2.0.0
10004
+ */
10005
+ export declare const F1SearchBox: ForwardRefExoticComponent< {
10006
+ value?: string;
10007
+ threshold?: number;
10008
+ debounceTime?: number;
10009
+ autoFocus?: boolean;
10010
+ } & Pick<InputFieldProps_2<string>, "onChange" | "name" | "size" | "onFocus" | "onBlur" | "loading" | "disabled" | "placeholder" | "clearable"> & RefAttributes<HTMLInputElement>>;
10011
+
9927
10012
  export declare type FeedbackConfig = {
9928
10013
  threadId: string;
9929
10014
  onThumbsUp: (msg: AIMessage, ctx: {
@@ -10908,6 +10993,21 @@ export declare interface InitialFile {
10908
10993
  */
10909
10994
  export declare function injectSectionEnds(items: FlatFormItem[], inSectionQuestionIds: Set<string>): FlatFormItem[];
10910
10995
 
10996
+ /**
10997
+ * @deprecated Renamed to `F0TextInput` to match the F0 input vocabulary
10998
+ * (any component where the user types text in a box has the `Input` suffix
10999
+ * and lives under the `Inputs/` group). Will be removed once consumers have
11000
+ * migrated. Update your imports:
11001
+ *
11002
+ * - import { Input } from "@factorialco/f0-react"
11003
+ * + import { F0TextInput } from "@factorialco/f0-react"
11004
+ *
11005
+ * @removeIn 2.0.0
11006
+ */
11007
+ export declare const Input: <T extends string>(props: F0TextInputProps_2<T>) => JSX_2.Element;
11008
+
11009
+ declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "error" | "append" | "hideLabel" | "hint" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "isEmpty" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle"> & React_2.RefAttributes<HTMLInputElement>>;
11010
+
10911
11011
  declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
10912
11012
 
10913
11013
  declare type InputFieldInheritedProps = (typeof inputFieldInheritedProps)[number];
@@ -11001,6 +11101,17 @@ declare const inputFieldStatus: readonly ["default", "warning", "info", "error"]
11001
11101
 
11002
11102
  declare type InputFieldStatusType = (typeof inputFieldStatus)[number];
11003
11103
 
11104
+ declare type InputInternalProps<T extends string> = Pick<ComponentProps<typeof Input_2>, "ref" | "id" | "aria-describedby" | "aria-invalid"> & Pick<InputFieldProps<T>, "autoFocus" | "required" | "disabled" | "size" | "onChange" | "value" | "placeholder" | "clearable" | "maxLength" | "label" | "labelIcon" | "icon" | "hideLabel" | "name" | "error" | "status" | "hint" | "autocomplete" | "buttonToggle" | "hideMaxLength" | "loading" | "transparent" | "onBlur" | "readonly"> & {
11105
+ type?: Exclude<HTMLInputTypeAttribute, "number">;
11106
+ onPressEnter?: () => void;
11107
+ };
11108
+
11109
+ /**
11110
+ * @deprecated Renamed to `F0TextInputProps`. See the `Input` deprecation note.
11111
+ * @removeIn 2.0.0
11112
+ */
11113
+ export declare type InputProps<T extends string> = F0TextInputProps_2<T>;
11114
+
11004
11115
  declare interface InsertAfterNotesTextEditorPageDocumentPatch {
11005
11116
  type: "insert_after";
11006
11117
  targetId: string;
@@ -11746,6 +11857,55 @@ declare type NumberFilterValue = {
11746
11857
  };
11747
11858
  } | undefined;
11748
11859
 
11860
+ /**
11861
+ * @deprecated Renamed to `F0NumberInput` to match the F0 input vocabulary
11862
+ * (any component where the user types in a box has the `Input` suffix and
11863
+ * lives under the `Inputs/` group). Will be removed once consumers have
11864
+ * migrated.
11865
+ *
11866
+ * - import { NumberInput } from "@factorialco/f0-react"
11867
+ * + import { F0NumberInput } from "@factorialco/f0-react"
11868
+ *
11869
+ * @removeIn 2.0.0
11870
+ */
11871
+ export declare const NumberInput: (props: F0NumberInputProps_2) => JSX_2.Element;
11872
+
11873
+ declare type NumberInputInternalProps = Omit<InputInternalProps<string>, "value" | "type" | "onChange"> & {
11874
+ locale: string;
11875
+ value?: number | null;
11876
+ step?: number;
11877
+ min?: number;
11878
+ max?: number;
11879
+ maxDecimals?: number;
11880
+ onChange?: (value: number | null) => void;
11881
+ units?: string;
11882
+ extraContent?: ReactNode;
11883
+ inputWidth?: string;
11884
+ popover?: NumberInputPopoverConfig;
11885
+ };
11886
+
11887
+ export declare interface NumberInputPopoverConfig {
11888
+ icon?: IconType;
11889
+ side?: "top" | "bottom" | "left" | "right";
11890
+ align?: "start" | "center" | "end";
11891
+ open?: boolean;
11892
+ onOpenChange?: (open: boolean) => void;
11893
+ triggerLabel?: string;
11894
+ commitMode?: "immediate" | "deferred";
11895
+ apply?: {
11896
+ label?: string;
11897
+ icon?: IconType;
11898
+ closeOnApply?: boolean;
11899
+ };
11900
+ }
11901
+
11902
+ /**
11903
+ * @deprecated Renamed to `F0NumberInputProps`. See the `NumberInput`
11904
+ * deprecation note.
11905
+ * @removeIn 2.0.0
11906
+ */
11907
+ export declare type NumberInputProps = F0NumberInputProps_2;
11908
+
11749
11909
  /**
11750
11910
  * Base for number-specific conditions
11751
11911
  */
@@ -11998,7 +12158,7 @@ export declare interface OneCalendarInternalProps {
11998
12158
  weekStartsOn?: WeekStartsOn;
11999
12159
  }
12000
12160
 
12001
- export declare type OneCalendarProps = Omit<OneCalendarInternalProps, (typeof privateProps_4)[number]>;
12161
+ export declare type OneCalendarProps = Omit<OneCalendarInternalProps, (typeof privateProps_6)[number]>;
12002
12162
 
12003
12163
  export declare const OneEllipsis: default_2.ForwardRefExoticComponent<OneEllipsisProps & default_2.RefAttributes<HTMLElement>>;
12004
12164
 
@@ -12407,9 +12567,13 @@ declare const privateProps_2: readonly ["withBorder"];
12407
12567
 
12408
12568
  declare const privateProps_3: readonly ["forceVerticalMetadata", "disableOverlayLink"];
12409
12569
 
12410
- declare const privateProps_4: readonly ["compact"];
12570
+ declare const privateProps_4: readonly ["buttonToggle"];
12571
+
12572
+ declare const privateProps_5: readonly ["buttonToggle"];
12573
+
12574
+ declare const privateProps_6: readonly ["compact"];
12411
12575
 
12412
- declare const privateProps_5: readonly ["className"];
12576
+ declare const privateProps_7: readonly ["className"];
12413
12577
 
12414
12578
  export declare const ProductBlankslate: WithDataTestIdReturnType_4<ForwardRefExoticComponent<ProductBlankslateProps & RefAttributes<HTMLDivElement>>>;
12415
12579
 
@@ -13901,11 +14065,37 @@ export declare type TeamAvatarVariant = Extract<AvatarVariant, {
13901
14065
 
13902
14066
  declare type TeamTagProps = ComponentProps<typeof F0TagTeam>;
13903
14067
 
14068
+ /**
14069
+ * @deprecated Renamed to `F0TextAreaInput` to match the F0 input vocabulary
14070
+ * (any component where the user types in a box has the `Input` suffix and
14071
+ * lives under the `Inputs/` group). Will be removed once consumers have
14072
+ * migrated.
14073
+ *
14074
+ * - import { Textarea } from "@factorialco/f0-react"
14075
+ * + import { F0TextAreaInput } from "@factorialco/f0-react"
14076
+ *
14077
+ * @removeIn 2.0.0
14078
+ */
14079
+ export declare const Textarea: FC<F0TextAreaInputProps_2>;
14080
+
14081
+ declare const Textarea_2: ForwardRefExoticComponent<Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, "value" | "onChange" | "onFocus" | "onBlur"> & {
14082
+ value?: string;
14083
+ /** Maximum height in pixels. When set, the textarea scrolls beyond this height instead of growing. */
14084
+ maxHeight?: number;
14085
+ } & Pick<InputFieldProps<string>, "label" | "value" | "onChange" | "size" | "icon" | "onFocus" | "onBlur" | "onKeyDown" | "status" | "loading" | "maxLength" | "placeholder" | "required" | "error" | "hideLabel" | "hint" | "labelIcon" | "clearable" | "onClear"> & RefAttributes<HTMLTextAreaElement>>;
14086
+
13904
14087
  /**
13905
14088
  * All valid renderIf conditions for textarea fields
13906
14089
  */
13907
14090
  declare type TextareaFieldRenderIf = TextRenderIfCondition | CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
13908
14091
 
14092
+ /**
14093
+ * @deprecated Renamed to `F0TextAreaInputProps`. See the `Textarea`
14094
+ * deprecation note.
14095
+ * @removeIn 2.0.0
14096
+ */
14097
+ export declare type TextareaProps = F0TextAreaInputProps_2;
14098
+
13909
14099
  /**
13910
14100
  * All valid renderIf conditions for text fields
13911
14101
  */
@@ -15218,8 +15408,9 @@ declare module "@tiptap/core" {
15218
15408
 
15219
15409
  declare module "@tiptap/core" {
15220
15410
  interface Commands<ReturnType> {
15221
- moodTracker: {
15222
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
15411
+ enhanceHighlight: {
15412
+ setEnhanceHighlight: (from: number, to: number) => ReturnType;
15413
+ clearEnhanceHighlight: () => ReturnType;
15223
15414
  };
15224
15415
  }
15225
15416
  }
@@ -15227,9 +15418,8 @@ declare module "@tiptap/core" {
15227
15418
 
15228
15419
  declare module "@tiptap/core" {
15229
15420
  interface Commands<ReturnType> {
15230
- enhanceHighlight: {
15231
- setEnhanceHighlight: (from: number, to: number) => ReturnType;
15232
- clearEnhanceHighlight: () => ReturnType;
15421
+ moodTracker: {
15422
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
15233
15423
  };
15234
15424
  }
15235
15425
  }