@factorialco/f0-react 4.9.0 → 4.10.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
@@ -5263,6 +5263,10 @@ declare type DialogWrapperContextType = {
5263
5263
  portalContainer: HTMLDivElement | null;
5264
5264
  };
5265
5265
 
5266
+ declare const DialogWrapperProvider: ({ isOpen, onClose, shownBottomSheet, position, children, portalContainer, }: DialogWrapperProviderProps) => JSX_2.Element;
5267
+ export { DialogWrapperProvider as F0DialogAlikeProvider }
5268
+ export { DialogWrapperProvider as F0DialogProvider }
5269
+
5266
5270
  /**
5267
5271
  * The props for the F0DialogProvider component.
5268
5272
  */
@@ -7323,6 +7327,14 @@ export declare type F0ButtonToggleProps = Omit<F0ButtonToggleInternalProps, (typ
7323
7327
  /**
7324
7328
  * Shared inline card rendered in the AI chat for any canvas entity.
7325
7329
  * Shows an avatar, title, optional description, and a configurable action button.
7330
+ *
7331
+ * @deprecated Being replaced by `F0CardHorizontal` (`@/experimental/F0CardHorizontal`).
7332
+ * The co-creation flow already renders these cards with `F0CardHorizontal` directly
7333
+ * (Open/Close → `primaryAction`; superseded → a faded `opacity-50 pointer-events-none`
7334
+ * wrapper). Don't add new usages; migrate the remaining one
7335
+ * (`F0AiMessagesContainer/FormCard`) once its inline `children` preview has an
7336
+ * `F0CardHorizontal`-friendly home.
7337
+ * @removeIn 5.0.0
7326
7338
  */
7327
7339
  export declare function F0CanvasCard({ avatar, title, description, isActive, action, children, }: F0CanvasCardProps): JSX_2.Element;
7328
7340
 
@@ -7330,6 +7342,10 @@ export declare namespace F0CanvasCard {
7330
7342
  var displayName: string;
7331
7343
  }
7332
7344
 
7345
+ /**
7346
+ * @deprecated Being replaced by `F0CardHorizontal`. See {@link F0CanvasCard}.
7347
+ * @removeIn 5.0.0
7348
+ */
7333
7349
  export declare type F0CanvasCardProps = {
7334
7350
  /** Avatar to display: a module icon or a file-type badge */
7335
7351
  avatar?: CanvasCardAvatar;
@@ -8245,7 +8261,10 @@ export declare interface F0DemoCardProps {
8245
8261
  }
8246
8262
 
8247
8263
  /**
8248
- * @experimental This is an experimental component use it at your own risk
8264
+ * @deprecated Use `F0Dialog` from `@/components/dialog-alike/F0Dialog` for
8265
+ * center/fullscreen dialogs, or `F0Drawer` from
8266
+ * `@/components/dialog-alike/F0Drawer` for side panels. This is a
8267
+ * backward-compatible shim that maps the legacy props onto those components.
8249
8268
  */
8250
8269
  export declare const F0Dialog: WithDataTestIdReturnType_3<FC<F0DialogInternalProps>>;
8251
8270
 
@@ -8265,8 +8284,12 @@ export declare type F0DialogActionsProps = {
8265
8284
 
8266
8285
  export declare const F0DialogAlikeContext: Context<DialogWrapperContextType>;
8267
8286
 
8268
- export declare const F0DialogAlikeProvider: ({ isOpen, onClose, shownBottomSheet, position, children, portalContainer, }: DialogWrapperProviderProps) => JSX_2.Element;
8269
-
8287
+ /**
8288
+ * The dialog-alike context, retyped under the original name so the public
8289
+ * `Context<F0DialogContextType>` signature is preserved (the runtime value is
8290
+ * the same context the dialog-alike components populate).
8291
+ * @deprecated Import `F0DialogContext` from `@/components/dialog-alike/F0Dialog`.
8292
+ */
8270
8293
  export declare const F0DialogContext: Context<F0DialogContextType>;
8271
8294
 
8272
8295
  declare type F0DialogContextType = {
@@ -8293,17 +8316,6 @@ export declare type F0DialogPrimaryAction = {
8293
8316
 
8294
8317
  export declare type F0DialogPrimaryActionItem = F0DialogActionItem;
8295
8318
 
8296
- export declare const F0DialogProvider: ({ isOpen, onClose, shownBottomSheet, position, children, portalContainer, }: F0DialogProviderProps) => JSX_2.Element;
8297
-
8298
- declare type F0DialogProviderProps = {
8299
- isOpen: boolean;
8300
- onClose: () => void;
8301
- shownBottomSheet?: boolean;
8302
- position: DialogPosition;
8303
- children: ReactNode;
8304
- portalContainer: HTMLDivElement | null;
8305
- };
8306
-
8307
8319
  export declare type F0DialogSecondaryAction = {
8308
8320
  label: string;
8309
8321
  icon?: IconType;
@@ -9414,6 +9426,11 @@ export declare interface F0FormStylingConfig {
9414
9426
  * @default false
9415
9427
  */
9416
9428
  showSectionsSidepanel?: boolean;
9429
+ /**
9430
+ * Removes the default padding around the form content.
9431
+ * @default false
9432
+ */
9433
+ noPadding?: boolean;
9417
9434
  }
9418
9435
 
9419
9436
  /**
@@ -9556,6 +9573,14 @@ export declare type F0HeadingProps = Omit<TextProps, "className" | "variant" | "
9556
9573
  as?: HeadingTags;
9557
9574
  };
9558
9575
 
9576
+ /**
9577
+ * @deprecated Being replaced by `F0CardHorizontal` (`@/experimental/F0CardHorizontal`),
9578
+ * which this component already wraps. Use `F0CardHorizontal` directly: `confirmAction` /
9579
+ * `rejectAction` for the pending state, `status` for the resolved outcome, and
9580
+ * `secondaryActions` for a single CTA. The co-creation flow no longer uses this component —
9581
+ * don't add new usages.
9582
+ * @removeIn 5.0.0
9583
+ */
9559
9584
  export declare const F0HILActionConfirmation: ({ text, description, avatar, confirmationText, onConfirm, cancelText, onCancel, stackAt, }: F0HILActionConfirmationProps) => JSX_2.Element;
9560
9585
 
9561
9586
  /**
@@ -9564,6 +9589,9 @@ export declare const F0HILActionConfirmation: ({ text, description, avatar, conf
9564
9589
  * Renders an inline approve/reject row built on `F0CardHorizontal`'s confirm/reject
9565
9590
  * variant: the prompt as the row title, with icon-only ✓ (confirm) and ✗
9566
9591
  * (reject) buttons at the trailing edge.
9592
+ *
9593
+ * @deprecated Being replaced by `F0CardHorizontal`. See {@link F0HILActionConfirmation}.
9594
+ * @removeIn 5.0.0
9567
9595
  */
9568
9596
  export declare type F0HILActionConfirmationProps = {
9569
9597
  /**
@@ -10954,7 +10982,7 @@ declare interface F0WizardFormBaseProps {
10954
10982
  onClose?: () => void;
10955
10983
  title?: string;
10956
10984
  /** @deprecated Use `size` instead. */
10957
- width?: DialogWidth;
10985
+ width?: Exclude<F0DialogSize, "fullscreen">;
10958
10986
  /** The size of the wizard dialog. Preferred over the deprecated `width`. */
10959
10987
  size?: F0DialogSize;
10960
10988
  defaultStepIndex?: number;
@@ -15057,7 +15085,7 @@ declare interface SurveyAnsweringFormDialogProps extends SurveyAnsweringFormShar
15057
15085
  inline?: false;
15058
15086
  mode: SurveyAnsweringFormMode;
15059
15087
  module: SurveyAnsweringFormModule;
15060
- position?: DialogPosition;
15088
+ position?: SurveyDialogPosition;
15061
15089
  isOpen: boolean;
15062
15090
  onClose: () => void;
15063
15091
  allowToChangeFullscreen?: boolean;
@@ -15168,6 +15196,9 @@ export declare type SurveyDataset = {
15168
15196
 
15169
15197
  export declare type SurveyDatasets = Record<string, SurveyDataset>;
15170
15198
 
15199
+ /** Where the answering dialog is anchored. */
15200
+ declare type SurveyDialogPosition = "center" | "left" | "right" | "fullscreen";
15201
+
15171
15202
  export declare const SurveyFormBuilder: WithDataTestIdReturnType_8<({ elements: elementsProp, disabled, onChange, disallowOptionalQuestions, allowedQuestionTypes, applyingChanges, useUpload, datasets, }: SurveyFormBuilderProps) => JSX_2.Element>;
15172
15203
 
15173
15204
  export declare type SurveyFormBuilderCallbacks = {
@@ -16409,6 +16440,10 @@ export declare interface UseDataSourceItemNavigationReturn<R extends RecordType>
16409
16440
  previousItemUrl: string | null;
16410
16441
  }
16411
16442
 
16443
+ declare const useDialogWrapperContext: () => DialogWrapperContextType;
16444
+ export { useDialogWrapperContext as useF0Dialog }
16445
+ export { useDialogWrapperContext as useF0DialogAlikeContext }
16446
+
16412
16447
  export declare function useDndEvents(handler: (e: {
16413
16448
  phase: "start" | "over" | "drop" | "cancel";
16414
16449
  source: DragPayload;
@@ -16437,10 +16472,6 @@ export declare const useEmojiConfetti: () => {
16437
16472
  */
16438
16473
  export declare function useF0AiFormRegistry(): F0AiFormRegistryContextValue | null;
16439
16474
 
16440
- export declare const useF0Dialog: () => F0DialogContextType;
16441
-
16442
- export declare const useF0DialogAlikeContext: () => DialogWrapperContextType;
16443
-
16444
16475
  /**
16445
16476
  * Hook to control F0Form programmatically.
16446
16477
  *