@frigade/react 1.37.22 → 1.38.1

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.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { CSSProperties, FC, ElementType, ReactNode, ComponentPropsWithoutRef } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
3
  import { BorderProps, ColorProps, LayoutProps, ShadowProps, SpaceProps, TypographyProps, FontProps } from 'styled-system';
5
4
 
6
5
  type StepActionType = 'STARTED_STEP' | 'COMPLETED_STEP' | 'NOT_STARTED_STEP';
@@ -159,7 +158,7 @@ interface DefaultFrigadeFlowProps {
159
158
  * @param index
160
159
  * @param cta
161
160
  */
162
- onButtonClick?: (step: StepData, index?: number, cta?: 'primary' | 'secondary' | 'link', nextStep?: StepData) => boolean;
161
+ onButtonClick?: (step: StepData, index?: number, cta?: 'primary' | 'secondary' | 'link' | 'back', nextStep?: StepData) => boolean;
163
162
  onDismiss?: () => void;
164
163
  onComplete?: () => void;
165
164
  }
@@ -243,7 +242,7 @@ declare function useFlows(): {
243
242
  markFlowNotStarted: (flowId: string, data?: any) => Promise<void>;
244
243
  markFlowStarted: (flowId: string, data?: any) => Promise<void>;
245
244
  markFlowCompleted: (flowId: string, data?: any) => Promise<void>;
246
- markFlowAborted: (flowId: string, data?: any) => Promise<void>;
245
+ markFlowSkipped: (flowId: string, data?: any) => Promise<void>;
247
246
  markStepNotStarted: (flowId: string, stepId: string, data?: any) => Promise<void>;
248
247
  getFlowStatus: (flowId: string) => "COMPLETED_FLOW" | "STARTED_FLOW" | "NOT_STARTED_FLOW";
249
248
  getNumberOfStepsCompleted: (flowId: string) => number;
@@ -520,6 +519,7 @@ interface FrigadeFormProps extends DefaultFrigadeFlowProps {
520
519
  showPagination?: boolean;
521
520
  /**
522
521
  * Whether to allow the user to navigate back to previous steps. Default is false.
522
+ * The title of the button can be controlled by the `backButtonTitle` prop on the step.
523
523
  */
524
524
  allowBackNavigation?: boolean;
525
525
  /**
@@ -634,10 +634,10 @@ interface FrigadeTourProps extends Omit<DefaultFrigadeFlowProps, 'flowId'> {
634
634
  */
635
635
  showStepCount?: boolean;
636
636
  /**
637
- * `complete-flow` (default): Completes the entire flow/tour when a single tooltip is dismissed.
638
- * `complete-step`: Completes the current step when a tooltip is dismissed.
637
+ * `skip-flow` (default): Completes the entire flow/tour when a single tooltip is dismissed.
638
+ * `complete-step`: Completes the current step when a tooltip is dismissed. The user can continue in the tour.
639
639
  */
640
- dismissBehavior?: 'complete-flow' | 'complete-step';
640
+ dismissBehavior?: 'skip-flow' | 'complete-step';
641
641
  /**
642
642
  * @ignore
643
643
  */
@@ -701,6 +701,15 @@ interface FrigadeAnnouncementProps extends DefaultFrigadeFlowProps {
701
701
  * Indicates the position of the modal if the form type is a modal. Default is center.
702
702
  */
703
703
  modalPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center' | 'inline';
704
+ /**
705
+ * Show a pagination indicator at the bottom of the announcement when using more than 1 page. Default is true.
706
+ */
707
+ showPagination?: boolean;
708
+ /**
709
+ * Whether to allow the user to navigate back to previous steps. Default is false.
710
+ * The title of the button can be controlled by the `backButtonTitle` prop on the step.
711
+ */
712
+ allowBackNavigation?: boolean;
704
713
  }
705
714
  declare const FrigadeAnnouncement: React__default.FC<FrigadeAnnouncementProps>;
706
715
 
@@ -744,6 +753,7 @@ declare function useUserFlowStates(): {
744
753
  isLoadingUserFlowStateData: boolean;
745
754
  mutateUserFlowState: () => any;
746
755
  optimisticallyMarkFlowCompleted: (flowId: string) => void;
756
+ optimisticallyMarkFlowSkipped: (flowId: string) => void;
747
757
  optimisticallyMarkFlowNotStarted: (flowId: string) => void;
748
758
  optimisticallyMarkStepCompleted: (flowId: string, stepId: string, flowResponse: FlowResponse) => void;
749
759
  optimisticallyMarkStepNotStarted: (flowId: string, stepId: string, flowResponse: FlowResponse) => void;
@@ -755,9 +765,9 @@ declare function Label({ title, required, appearance, }: {
755
765
  title?: string;
756
766
  required: boolean;
757
767
  appearance?: Appearance;
758
- }): react_jsx_runtime.JSX.Element;
768
+ }): React__default.JSX.Element;
759
769
 
760
- declare function TextField({ formInput, customFormTypeProps, onSaveInputData, setFormValidationErrors, inputData, }: FormInputProps): react_jsx_runtime.JSX.Element;
770
+ declare function TextField({ formInput, customFormTypeProps, onSaveInputData, setFormValidationErrors, inputData, }: FormInputProps): React__default.JSX.Element;
761
771
 
762
772
  interface Overrides extends Record<string, Overrides | CSSProperties> {
763
773
  }
@@ -767,14 +777,14 @@ type BoxProps<T extends ElementType = 'div'> = {
767
777
  children?: ReactNode;
768
778
  overrides?: Overrides;
769
779
  } & BorderProps & ColorProps & Exclude<LayoutProps, 'size'> & ShadowProps & SpaceProps & TypographyProps & ComponentPropsWithoutRef<T>;
770
- declare const Box: <T extends React__default.ElementType<any> = "div">({ as, children, overrides, ...rest }: any) => react_jsx_runtime.JSX.Element;
780
+ declare const Box: <T extends React__default.ElementType<any> = "div">({ as, children, overrides, ...rest }: any) => React__default.JSX.Element;
771
781
 
772
782
  interface ButtonProps extends BoxProps {
773
783
  title: string;
774
784
  }
775
785
  declare const Button: React.FC<ButtonProps> & {
776
786
  [k: string]: {
777
- (props: ButtonProps): react_jsx_runtime.JSX.Element;
787
+ (props: ButtonProps): React.JSX.Element;
778
788
  displayName: string;
779
789
  };
780
790
  };
@@ -865,7 +875,7 @@ interface BaseTextProps extends BoxProps, Partial<Pick<FontProps, 'fontWeight'>>
865
875
  }
866
876
  declare const Text: React__default.FC<BaseTextProps> & {
867
877
  [k: string]: {
868
- (props: BaseTextProps): react_jsx_runtime.JSX.Element;
878
+ (props: BaseTextProps): React__default.JSX.Element;
869
879
  displayName: string;
870
880
  };
871
881
  };
@@ -879,7 +889,7 @@ declare const ProgressBar: ({ count, total, display, textLocation, style, textSt
879
889
  style?: CSSProperties;
880
890
  textStyle?: CSSProperties;
881
891
  appearance?: Appearance;
882
- }) => react_jsx_runtime.JSX.Element;
892
+ }) => React__default.JSX.Element;
883
893
 
884
894
  declare const tokens: {
885
895
  colors: {