@frigade/react 2.7.4 → 2.7.6

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,11 +1,11 @@
1
1
  import * as _emotion_react_jsx_runtime from '@emotion/react/jsx-runtime';
2
+ import { JSX } from '@emotion/react/jsx-runtime';
2
3
  import * as RadixDialog from '@radix-ui/react-dialog';
3
4
  import * as React$1 from 'react';
4
5
  import React__default, { CSSProperties, SyntheticEvent, ReactNode, ForwardRefExoticComponent, RefAttributes } from 'react';
5
6
  import * as _frigade_js from '@frigade/js';
6
7
  import { Flow as Flow$1, FlowStep, PropertyPayload, StatefulFlow } from '@frigade/js';
7
8
  export { _frigade_js as FrigadeJS };
8
- import { EmotionJSX } from '@emotion/react/types/jsx-namespace';
9
9
  import * as Collapsible$1 from '@radix-ui/react-collapsible';
10
10
  import { UseFormReturn, ControllerFieldState, Message, ValidationRule } from 'react-hook-form';
11
11
  import * as Popover from '@radix-ui/react-popover';
@@ -44,14 +44,14 @@ declare const tokens: {
44
44
  };
45
45
  space: {
46
46
  0: string;
47
+ 2: string;
48
+ 1: string;
47
49
  auto: string;
48
50
  5: string;
49
51
  10: string;
50
52
  20: string;
51
53
  4: string;
52
54
  9: string;
53
- 2: string;
54
- 1: string;
55
55
  [-20]: string;
56
56
  19: string;
57
57
  [-19]: string;
@@ -228,14 +228,14 @@ declare const theme: DeepPartial<{
228
228
  };
229
229
  space: {
230
230
  0: string;
231
+ 2: string;
232
+ 1: string;
231
233
  auto: string;
232
234
  5: string;
233
235
  10: string;
234
236
  20: string;
235
237
  4: string;
236
238
  9: string;
237
- 2: string;
238
- 1: string;
239
239
  [-20]: string;
240
240
  19: string;
241
241
  [-19]: string;
@@ -639,14 +639,14 @@ declare const themedStyleProps: {
639
639
  }>;
640
640
  readonly gap: DeepPartial<{
641
641
  0: string;
642
+ 2: string;
643
+ 1: string;
642
644
  auto: string;
643
645
  5: string;
644
646
  10: string;
645
647
  20: string;
646
648
  4: string;
647
649
  9: string;
648
- 2: string;
649
- 1: string;
650
650
  [-20]: string;
651
651
  19: string;
652
652
  [-19]: string;
@@ -695,14 +695,14 @@ declare const themedStyleProps: {
695
695
  }>;
696
696
  readonly margin: DeepPartial<{
697
697
  0: string;
698
+ 2: string;
699
+ 1: string;
698
700
  auto: string;
699
701
  5: string;
700
702
  10: string;
701
703
  20: string;
702
704
  4: string;
703
705
  9: string;
704
- 2: string;
705
- 1: string;
706
706
  [-20]: string;
707
707
  19: string;
708
708
  [-19]: string;
@@ -741,14 +741,14 @@ declare const themedStyleProps: {
741
741
  }>;
742
742
  readonly marginBottom: DeepPartial<{
743
743
  0: string;
744
+ 2: string;
745
+ 1: string;
744
746
  auto: string;
745
747
  5: string;
746
748
  10: string;
747
749
  20: string;
748
750
  4: string;
749
751
  9: string;
750
- 2: string;
751
- 1: string;
752
752
  [-20]: string;
753
753
  19: string;
754
754
  [-19]: string;
@@ -787,14 +787,14 @@ declare const themedStyleProps: {
787
787
  }>;
788
788
  readonly marginLeft: DeepPartial<{
789
789
  0: string;
790
+ 2: string;
791
+ 1: string;
790
792
  auto: string;
791
793
  5: string;
792
794
  10: string;
793
795
  20: string;
794
796
  4: string;
795
797
  9: string;
796
- 2: string;
797
- 1: string;
798
798
  [-20]: string;
799
799
  19: string;
800
800
  [-19]: string;
@@ -833,14 +833,14 @@ declare const themedStyleProps: {
833
833
  }>;
834
834
  readonly marginRight: DeepPartial<{
835
835
  0: string;
836
+ 2: string;
837
+ 1: string;
836
838
  auto: string;
837
839
  5: string;
838
840
  10: string;
839
841
  20: string;
840
842
  4: string;
841
843
  9: string;
842
- 2: string;
843
- 1: string;
844
844
  [-20]: string;
845
845
  19: string;
846
846
  [-19]: string;
@@ -879,14 +879,14 @@ declare const themedStyleProps: {
879
879
  }>;
880
880
  readonly marginTop: DeepPartial<{
881
881
  0: string;
882
+ 2: string;
883
+ 1: string;
882
884
  auto: string;
883
885
  5: string;
884
886
  10: string;
885
887
  20: string;
886
888
  4: string;
887
889
  9: string;
888
- 2: string;
889
- 1: string;
890
890
  [-20]: string;
891
891
  19: string;
892
892
  [-19]: string;
@@ -925,14 +925,14 @@ declare const themedStyleProps: {
925
925
  }>;
926
926
  readonly padding: DeepPartial<{
927
927
  0: string;
928
+ 2: string;
929
+ 1: string;
928
930
  auto: string;
929
931
  5: string;
930
932
  10: string;
931
933
  20: string;
932
934
  4: string;
933
935
  9: string;
934
- 2: string;
935
- 1: string;
936
936
  [-20]: string;
937
937
  19: string;
938
938
  [-19]: string;
@@ -971,14 +971,14 @@ declare const themedStyleProps: {
971
971
  }>;
972
972
  readonly paddingBottom: DeepPartial<{
973
973
  0: string;
974
+ 2: string;
975
+ 1: string;
974
976
  auto: string;
975
977
  5: string;
976
978
  10: string;
977
979
  20: string;
978
980
  4: string;
979
981
  9: string;
980
- 2: string;
981
- 1: string;
982
982
  [-20]: string;
983
983
  19: string;
984
984
  [-19]: string;
@@ -1017,14 +1017,14 @@ declare const themedStyleProps: {
1017
1017
  }>;
1018
1018
  readonly paddingLeft: DeepPartial<{
1019
1019
  0: string;
1020
+ 2: string;
1021
+ 1: string;
1020
1022
  auto: string;
1021
1023
  5: string;
1022
1024
  10: string;
1023
1025
  20: string;
1024
1026
  4: string;
1025
1027
  9: string;
1026
- 2: string;
1027
- 1: string;
1028
1028
  [-20]: string;
1029
1029
  19: string;
1030
1030
  [-19]: string;
@@ -1063,14 +1063,14 @@ declare const themedStyleProps: {
1063
1063
  }>;
1064
1064
  readonly paddingRight: DeepPartial<{
1065
1065
  0: string;
1066
+ 2: string;
1067
+ 1: string;
1066
1068
  auto: string;
1067
1069
  5: string;
1068
1070
  10: string;
1069
1071
  20: string;
1070
1072
  4: string;
1071
1073
  9: string;
1072
- 2: string;
1073
- 1: string;
1074
1074
  [-20]: string;
1075
1075
  19: string;
1076
1076
  [-19]: string;
@@ -1109,14 +1109,14 @@ declare const themedStyleProps: {
1109
1109
  }>;
1110
1110
  readonly paddingTop: DeepPartial<{
1111
1111
  0: string;
1112
+ 2: string;
1113
+ 1: string;
1112
1114
  auto: string;
1113
1115
  5: string;
1114
1116
  10: string;
1115
1117
  20: string;
1116
1118
  4: string;
1117
1119
  9: string;
1118
- 2: string;
1119
- 1: string;
1120
1120
  [-20]: string;
1121
1121
  19: string;
1122
1122
  [-19]: string;
@@ -1481,14 +1481,14 @@ interface CardHeaderProps extends BoxProps {
1481
1481
  title?: string;
1482
1482
  }
1483
1483
  interface CardComponent extends ForwardRefExoticComponent<Omit<FlowPropsWithoutChildren, 'ref'> & RefAttributes<unknown>> {
1484
- Dismiss: (props: ButtonProps) => EmotionJSX.Element;
1485
- Header: (props: CardHeaderProps) => EmotionJSX.Element;
1486
- Footer: (props: BoxProps) => EmotionJSX.Element;
1487
- Media: (props: MediaProps) => EmotionJSX.Element;
1488
- Primary: (props: ButtonProps) => EmotionJSX.Element;
1489
- Secondary: (props: ButtonProps) => EmotionJSX.Element;
1490
- Subtitle: (props: TextProps) => EmotionJSX.Element;
1491
- Title: (props: TextProps) => EmotionJSX.Element;
1484
+ Dismiss: (props: ButtonProps) => JSX.Element;
1485
+ Header: (props: CardHeaderProps) => JSX.Element;
1486
+ Footer: (props: BoxProps) => JSX.Element;
1487
+ Media: (props: MediaProps) => JSX.Element;
1488
+ Primary: (props: ButtonProps) => JSX.Element;
1489
+ Secondary: (props: ButtonProps) => JSX.Element;
1490
+ Subtitle: (props: TextProps) => JSX.Element;
1491
+ Title: (props: TextProps) => JSX.Element;
1492
1492
  }
1493
1493
  interface CardProps extends FlowPropsWithoutChildren {
1494
1494
  children: React$1.ReactNode;
@@ -1513,7 +1513,7 @@ interface CollapsibleStepProps extends FlowChildrenProps {
1513
1513
  onOpenChange: (isOpening: boolean) => void;
1514
1514
  open: boolean;
1515
1515
  }
1516
- type StepTypes = Record<string, (props: CollapsibleStepProps) => EmotionJSX.Element>;
1516
+ type StepTypes = Record<string, (props: CollapsibleStepProps) => JSX.Element>;
1517
1517
  interface CollapsibleProps extends FlowPropsWithoutChildren {
1518
1518
  /**
1519
1519
  * Map of step types to their respective components.
@@ -1531,7 +1531,7 @@ interface CollapsibleProps extends FlowPropsWithoutChildren {
1531
1531
  */
1532
1532
  stepTypes?: StepTypes;
1533
1533
  }
1534
- declare function Collapsible({ flowId, onPrimary, onSecondary, part, stepTypes, ...props }: CollapsibleProps): EmotionJSX.Element;
1534
+ declare function Collapsible({ flowId, onPrimary, onSecondary, part, stepTypes, ...props }: CollapsibleProps): JSX.Element;
1535
1535
 
1536
1536
  declare function Content({ children }: {
1537
1537
  children: any;
@@ -1569,13 +1569,21 @@ declare namespace index$2 {
1569
1569
  };
1570
1570
  }
1571
1571
 
1572
+ declare function useClientPortal(children: React.ReactNode, container: Element | DocumentFragment | string, key?: null | string): React$1.ReactPortal;
1573
+
1574
+ interface ClientPortalProps {
1575
+ children?: React.ReactNode;
1576
+ container?: Parameters<typeof useClientPortal>[1];
1577
+ }
1578
+ declare function ClientPortal({ children, container }: ClientPortalProps): React$1.ReactPortal;
1579
+
1572
1580
  interface CollectionProps extends BoxProps {
1573
1581
  /**
1574
1582
  * The unique ID of the Collection to render. You can find the Collection ID in the Frigade dashboard.
1575
1583
  */
1576
1584
  collectionId: string;
1577
1585
  /**
1578
- * A map of variables to pass to Flows this Collection.
1586
+ * A map of variables to pass to Flows in this Collection.
1579
1587
  * Example:
1580
1588
  * ```tsx
1581
1589
  * variables={{
@@ -1586,7 +1594,7 @@ interface CollectionProps extends BoxProps {
1586
1594
  */
1587
1595
  variables?: FlowProps['variables'];
1588
1596
  }
1589
- declare function Collection({ collectionId, part, variables, ...props }: CollectionProps): EmotionJSX.Element;
1597
+ declare function Collection({ collectionId, part, variables, ...props }: CollectionProps): JSX.Element;
1590
1598
 
1591
1599
  declare const Row: React$1.ForwardRefExoticComponent<Omit<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>, "ref"> & React$1.RefAttributes<unknown>>;
1592
1600
  declare const Column: React$1.ForwardRefExoticComponent<Omit<BoxProps<React$1.ElementType<any, keyof React$1.JSX.IntrinsicElements>>, "ref"> & React$1.RefAttributes<unknown>>;
@@ -1917,13 +1925,6 @@ declare namespace Tooltip {
1917
1925
  var Title: ({ children, ...props }: TextProps) => _emotion_react_jsx_runtime.JSX.Element;
1918
1926
  }
1919
1927
 
1920
- declare function useClientPortal(children: React.ReactNode, container: Element | DocumentFragment | string, key?: null | string): React$1.ReactPortal;
1921
-
1922
- interface ClientPortalProps {
1923
- children?: React.ReactNode;
1924
- container?: Parameters<typeof useClientPortal>[1];
1925
- }
1926
-
1927
1928
  interface TourProps extends FlowPropsWithoutChildren, Omit<HintProps, 'anchor'> {
1928
1929
  /**
1929
1930
  * The alignment of the tooltip relative to the anchor.
@@ -2020,4 +2021,4 @@ declare function useGroup(): {
2020
2021
  isLoading: boolean;
2021
2022
  };
2022
2023
 
2023
- export { Announcement, AnnouncementProps, Banner, BannerProps, BaseField, Box, BoxProps, Button, ButtonProps, Card, CardHeaderProps, CardProps, index$2 as Checklist, CollapsibleProps, CollapsibleStepProps, Collection, Dialog, DialogProps, DismissHandler, FieldTypes, Flex, Flow, FlowChildrenProps, FlowConfig, FlowHandlerProp, FlowHandlerProps, FlowProps, FlowPropsWithoutChildren, Form, FormFieldData, FormFieldProps, FormProps, Hint, Image, Label, Media, NPSProps, index$1 as Progress, ProgressBadge, ProgressBadgeProps, Provider, ProviderProps, RadioField, SelectField, Spotlight, StepHandler, StepHandlerProp, StepHandlerProps, index as Survey, Text, TextField, TextProps, TextareaField, Theme, Tokens, Tooltip, TooltipProps, Tour, TourProps, Video, themeVariables, tokens, useBoundingClientRect, useFlow, useFlowHandlers, useFrigade, useGroup, useStepHandlers, useUser };
2024
+ export { Announcement, AnnouncementProps, Banner, BannerProps, BaseField, Box, BoxProps, Button, ButtonProps, Card, CardHeaderProps, CardProps, index$2 as Checklist, ClientPortal, ClientPortalProps, CollapsibleProps, CollapsibleStepProps, Collection, Dialog, DialogProps, DismissHandler, FieldTypes, Flex, Flow, FlowChildrenProps, FlowConfig, FlowHandlerProp, FlowHandlerProps, FlowProps, FlowPropsWithoutChildren, Form, FormFieldData, FormFieldProps, FormProps, Hint, Image, Label, Media, NPSProps, index$1 as Progress, ProgressBadge, ProgressBadgeProps, Provider, ProviderProps, RadioField, SelectField, Spotlight, StepHandler, StepHandlerProp, StepHandlerProps, index as Survey, Text, TextField, TextProps, TextareaField, Theme, Tokens, Tooltip, TooltipProps, Tour, TourProps, Video, themeVariables, tokens, useBoundingClientRect, useFlow, useFlowHandlers, useFrigade, useGroup, useStepHandlers, useUser };