@frigade/react 1.32.86 → 1.33.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/lib/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
- import React__default, { CSSProperties, FC } from 'react';
2
+ import React__default, { CSSProperties, FC, ElementType, ReactNode, ComponentPropsWithoutRef } from 'react';
3
+ import { BorderProps, ColorProps, LayoutProps, ShadowProps, SpaceProps, TypographyProps, FontProps } from 'styled-system';
3
4
 
4
5
  type StepActionType = 'STARTED_STEP' | 'COMPLETED_STEP' | 'NOT_STARTED_STEP';
5
6
 
@@ -295,6 +296,7 @@ interface FrigadeConfig {
295
296
  * Used mostly for demo purposes.
296
297
  */
297
298
  readonly?: boolean;
299
+ theme?: Record<string, any>;
298
300
  }
299
301
  declare const FrigadeProvider: FC<FrigadeProviderProps>;
300
302
 
@@ -639,16 +641,24 @@ declare function Label({ title, required, appearance, }: {
639
641
 
640
642
  declare function TextField({ formInput, customFormTypeProps, onSaveInputData, setFormValidationErrors, inputData, }: FormInputProps): JSX.Element;
641
643
 
642
- interface ProgressRingProps {
643
- fillColor: string;
644
- size: number;
645
- bgColor?: string;
646
- percentage: number;
647
- className?: string;
648
- style?: React__default.CSSProperties;
649
- children?: React__default.ReactNode;
644
+ interface Overrides extends Record<string, Overrides | CSSProperties> {
650
645
  }
651
- declare const ProgressRing: FC<ProgressRingProps>;
646
+ type BoxProps<T extends ElementType = 'div'> = {
647
+ as?: T;
648
+ css?: Record<string, any>;
649
+ children?: ReactNode;
650
+ overrides?: Overrides;
651
+ } & BorderProps & ColorProps & Exclude<LayoutProps, 'size'> & ShadowProps & SpaceProps & TypographyProps & ComponentPropsWithoutRef<T>;
652
+
653
+ interface ButtonProps extends BoxProps {
654
+ title: string;
655
+ }
656
+ declare const Button: React.FC<ButtonProps> & {
657
+ [k: string]: {
658
+ (props: ButtonProps): JSX.Element;
659
+ displayName: string;
660
+ };
661
+ };
652
662
 
653
663
  type CheckBoxType = 'square' | 'round';
654
664
  interface CheckBoxProps {
@@ -662,4 +672,246 @@ interface CheckBoxProps {
662
672
  }
663
673
  declare const CheckBox: FC<CheckBoxProps>;
664
674
 
665
- export { Appearance, CheckBox, CustomFormTypeProps, EntityProperties, FormInputProps, FormInputType, Label as FormLabel, TextField as FormTextField, FormValidationError, FrigadeBanner, FrigadeChecklist, DefaultAppearance as FrigadeDefaultAppearance, FrigadeEmbeddedTip, FrigadeForm, FrigadeGuide, FrigadeHeroChecklist, FrigadeNPSSurvey, FrigadeProgressBadge, FrigadeProvider, FrigadeSupportWidget, BaseTheme as FrigadeTheme, FrigadeTour, ProgressRing, StepContentProps, StepData, useFlowOpens, useFlowResponses, useFlows, useOrganization, useUser };
675
+ interface ProgressRingProps {
676
+ fillColor: string;
677
+ size: number;
678
+ bgColor?: string;
679
+ percentage: number;
680
+ className?: string;
681
+ style?: React__default.CSSProperties;
682
+ children?: React__default.ReactNode;
683
+ }
684
+ declare const ProgressRing: FC<ProgressRingProps>;
685
+
686
+ declare const textVariants: {
687
+ readonly Display1: {
688
+ readonly fontSize: "5xl";
689
+ readonly fontWeight: "bold";
690
+ readonly letterSpacing: "md";
691
+ readonly lineHeight: "4xl";
692
+ };
693
+ readonly Display2: {
694
+ readonly fontSize: "4xl";
695
+ readonly fontWeight: "bold";
696
+ readonly letterSpacing: "md";
697
+ readonly lineHeight: "3xl";
698
+ };
699
+ readonly H1: {
700
+ readonly fontSize: "3xl";
701
+ readonly fontWeight: "bold";
702
+ readonly letterSpacing: "md";
703
+ readonly lineHeight: "2xl";
704
+ };
705
+ readonly H2: {
706
+ readonly fontSize: "2xl";
707
+ readonly fontWeight: "bold";
708
+ readonly letterSpacing: "md";
709
+ readonly lineHeight: "xl";
710
+ };
711
+ readonly H3: {
712
+ readonly fontSize: "xl";
713
+ readonly fontWeight: "bold";
714
+ readonly letterSpacing: "md";
715
+ readonly lineHeight: "lg";
716
+ };
717
+ readonly H4: {
718
+ readonly fontSize: "lg";
719
+ readonly fontWeight: "bold";
720
+ readonly letterSpacing: "md";
721
+ readonly lineHeight: "md";
722
+ };
723
+ readonly Body1: {
724
+ readonly fontSize: "md";
725
+ readonly fontWeight: "regular";
726
+ readonly letterSpacing: "md";
727
+ readonly lineHeight: "md";
728
+ };
729
+ readonly Body2: {
730
+ readonly fontSize: "sm";
731
+ readonly fontWeight: "regular";
732
+ readonly letterSpacing: "md";
733
+ readonly lineHeight: "md";
734
+ };
735
+ readonly Caption: {
736
+ readonly fontSize: "xs";
737
+ readonly fontWeight: "regular";
738
+ readonly letterSpacing: "md";
739
+ readonly lineHeight: "sm";
740
+ };
741
+ };
742
+
743
+ type TextVariant = keyof typeof textVariants;
744
+ interface BaseTextProps extends BoxProps, Partial<Pick<FontProps, 'fontWeight'>> {
745
+ variant?: TextVariant;
746
+ }
747
+ declare const Text: React__default.FC<BaseTextProps> & {
748
+ [k: string]: {
749
+ (props: BaseTextProps): JSX.Element;
750
+ displayName: string;
751
+ };
752
+ };
753
+
754
+ declare const tokens: {
755
+ colors: {
756
+ neutral: {
757
+ foreground: string;
758
+ };
759
+ primary: {
760
+ background: string;
761
+ foreground: string;
762
+ inverted: string;
763
+ };
764
+ negative: {
765
+ foreground: string;
766
+ };
767
+ black: string;
768
+ gray100: string;
769
+ gray200: string;
770
+ gray300: string;
771
+ gray400: string;
772
+ gray500: string;
773
+ gray600: string;
774
+ gray700: string;
775
+ gray800: string;
776
+ gray900: string;
777
+ white: string;
778
+ blue400: string;
779
+ blue500: string;
780
+ blue800: string;
781
+ blue900: string;
782
+ green400: string;
783
+ green500: string;
784
+ green800: string;
785
+ transparent: string;
786
+ red500: string;
787
+ };
788
+ fonts: {
789
+ default: string;
790
+ };
791
+ fontSizes: {
792
+ xs: string;
793
+ sm: string;
794
+ md: string;
795
+ lg: string;
796
+ xl: string;
797
+ '2xl': string;
798
+ '3xl': string;
799
+ '4xl': string;
800
+ '5xl': string;
801
+ };
802
+ fontWeights: {
803
+ regular: number;
804
+ semibold: number;
805
+ bold: number;
806
+ };
807
+ letterSpacings: {
808
+ md: string;
809
+ };
810
+ lineHeights: {
811
+ xs: string;
812
+ sm: string;
813
+ md: string;
814
+ lg: string;
815
+ xl: string;
816
+ '2xl': string;
817
+ '3xl': string;
818
+ '4xl': string;
819
+ };
820
+ radii: {
821
+ md: string;
822
+ lg: string;
823
+ round: string;
824
+ };
825
+ shadows: {
826
+ md: string;
827
+ };
828
+ space: {
829
+ [k: string]: string;
830
+ };
831
+ components: {
832
+ Button: {
833
+ readonly Primary: {
834
+ readonly backgroundColor: "primary.background";
835
+ readonly color: "primary.foreground";
836
+ readonly '&:hover': {
837
+ readonly backgroundColor: "blue400";
838
+ };
839
+ };
840
+ readonly Secondary: {
841
+ readonly backgroundColor: "white";
842
+ readonly border: "1px solid";
843
+ readonly borderColor: "gray800";
844
+ readonly color: "neutral.foreground";
845
+ readonly '&:hover': {
846
+ readonly backgroundColor: "blue900";
847
+ };
848
+ };
849
+ readonly Link: {
850
+ readonly backgroundColor: "transparent";
851
+ readonly color: "primary.inverted";
852
+ };
853
+ readonly Plain: {
854
+ readonly backgroundColor: "transparent";
855
+ readonly color: "neutral.foreground";
856
+ };
857
+ };
858
+ Text: {
859
+ readonly Display1: {
860
+ readonly fontSize: "5xl";
861
+ readonly fontWeight: "bold";
862
+ readonly letterSpacing: "md";
863
+ readonly lineHeight: "4xl";
864
+ };
865
+ readonly Display2: {
866
+ readonly fontSize: "4xl";
867
+ readonly fontWeight: "bold";
868
+ readonly letterSpacing: "md";
869
+ readonly lineHeight: "3xl";
870
+ };
871
+ readonly H1: {
872
+ readonly fontSize: "3xl";
873
+ readonly fontWeight: "bold";
874
+ readonly letterSpacing: "md";
875
+ readonly lineHeight: "2xl";
876
+ };
877
+ readonly H2: {
878
+ readonly fontSize: "2xl";
879
+ readonly fontWeight: "bold";
880
+ readonly letterSpacing: "md";
881
+ readonly lineHeight: "xl";
882
+ };
883
+ readonly H3: {
884
+ readonly fontSize: "xl";
885
+ readonly fontWeight: "bold";
886
+ readonly letterSpacing: "md";
887
+ readonly lineHeight: "lg";
888
+ };
889
+ readonly H4: {
890
+ readonly fontSize: "lg";
891
+ readonly fontWeight: "bold";
892
+ readonly letterSpacing: "md";
893
+ readonly lineHeight: "md";
894
+ };
895
+ readonly Body1: {
896
+ readonly fontSize: "md";
897
+ readonly fontWeight: "regular";
898
+ readonly letterSpacing: "md";
899
+ readonly lineHeight: "md";
900
+ };
901
+ readonly Body2: {
902
+ readonly fontSize: "sm";
903
+ readonly fontWeight: "regular";
904
+ readonly letterSpacing: "md";
905
+ readonly lineHeight: "md";
906
+ };
907
+ readonly Caption: {
908
+ readonly fontSize: "xs";
909
+ readonly fontWeight: "regular";
910
+ readonly letterSpacing: "md";
911
+ readonly lineHeight: "sm";
912
+ };
913
+ };
914
+ };
915
+ };
916
+
917
+ export { Appearance, Button, CheckBox, CustomFormTypeProps, EntityProperties, FormInputProps, FormInputType, Label as FormLabel, TextField as FormTextField, FormValidationError, FrigadeBanner, FrigadeChecklist, DefaultAppearance as FrigadeDefaultAppearance, FrigadeEmbeddedTip, FrigadeForm, FrigadeGuide, FrigadeHeroChecklist, FrigadeNPSSurvey, FrigadeProgressBadge, FrigadeProvider, FrigadeSupportWidget, BaseTheme as FrigadeTheme, FrigadeTour, ProgressRing, StepContentProps, StepData, Text, tokens, useFlowOpens, useFlowResponses, useFlows, useOrganization, useUser };