@mycause/ui 1.1.11 → 1.2.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.
Files changed (35) hide show
  1. package/README.md +0 -1
  2. package/dist/components/charity-tags-filter-button/charity-tags-filter-button.stories.d.ts +2 -1
  3. package/dist/components/cropper/cropper.stories.d.ts +2 -1
  4. package/dist/components/donation-form/donation-form.stories.d.ts +33 -7
  5. package/dist/components/featured-campaign-card/featured-campaign-card.d.ts +2 -2
  6. package/dist/components/icon/material-icon.d.ts +0 -5
  7. package/dist/components/info-represent-campaign/info-represent-campaign.stories.d.ts +2 -1
  8. package/dist/components/input/input.stories.d.ts +2 -1
  9. package/dist/components/input-social/input-social.stories.d.ts +2 -1
  10. package/dist/components/layout/box.d.ts +0 -1
  11. package/dist/components/layout/flex.d.ts +0 -9
  12. package/dist/components/layout/flex.stories.d.ts +36 -8
  13. package/dist/components/layout/stack.d.ts +1 -8
  14. package/dist/components/my-account-frp-closed/my-account-frp-closed.stories.d.ts +2 -1
  15. package/dist/components/my-account-frp-preview/my-account-frp-preview.stories.d.ts +2 -1
  16. package/dist/components/my-account-sidebar/my-account-sidebar.stories.d.ts +1 -1
  17. package/dist/components/my-account-stats-donated/my-account-stats-donated.stories.d.ts +2 -1
  18. package/dist/components/my-account-stats-raised/my-account-stats-raised.stories.d.ts +2 -1
  19. package/dist/components/partner-chart-stats/partner-chart-stats.stories.d.ts +2 -1
  20. package/dist/components/partner-monthly-donations/partner-monthly-donations.stories.d.ts +2 -1
  21. package/dist/components/partner-monthly-stats/partner-monthly-stats.stories.d.ts +2 -1
  22. package/dist/components/partner-toggle-button/partner-toggle-button-block.stories.d.ts +2 -1
  23. package/dist/components/phone-number-input/phone-number-input.stories.d.ts +22 -24
  24. package/dist/components/select/select.stories.d.ts +93 -13
  25. package/dist/components/switch/switch.d.ts +4 -1
  26. package/dist/components/table/partner-monthly-table.stories.d.ts +2 -1
  27. package/dist/components/text/text.stories.d.ts +55 -8
  28. package/dist/components/text-field/text-field.stories.d.ts +6 -14
  29. package/dist/components/this-month-card/this-month-card.stories.d.ts +2 -1
  30. package/dist/components/toast/toast.stories.d.ts +2 -1
  31. package/dist/donation.esm.js +13 -27
  32. package/dist/donation.js +17 -31
  33. package/dist/index.esm.js +19 -33
  34. package/dist/index.js +23 -37
  35. package/package.json +21 -14
package/README.md CHANGED
@@ -196,7 +196,6 @@ npm publish --access public
196
196
  Using git commands
197
197
 
198
198
  ```
199
- # need push code to master before push code to tag.
200
199
  git tag <version>
201
200
  git push origin <version>
202
201
  ```
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const CharityTagsFilterButtonStories: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const CropperStory: {
@@ -1,15 +1,41 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
- };
6
- export default _default;
7
- export declare const DonationFormStories: {
8
- (): React.JSX.Element;
9
- story: {
10
- name: string;
5
+ decorators: (typeof CenterDecorator)[];
6
+ argTypes: {
7
+ prefix: {
8
+ control: string;
9
+ defaultValue: string;
10
+ };
11
+ currency: {
12
+ control: string;
13
+ defaultValue: string;
14
+ };
15
+ control: {
16
+ control: string;
17
+ defaultValue: boolean;
18
+ };
19
+ hasCard: {
20
+ control: string;
21
+ defaultValue: boolean;
22
+ };
23
+ hasError: {
24
+ control: string;
25
+ defaultValue: boolean;
26
+ };
27
+ noContianer: {
28
+ control: string;
29
+ defaultValue: boolean;
30
+ };
31
+ maxWidth: {
32
+ control: string;
33
+ defaultValue: string;
34
+ };
11
35
  };
12
36
  };
37
+ export default _default;
38
+ export declare const DonationFormStories: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
13
39
  export declare const DonationCampaignFormStories: {
14
40
  (): React.JSX.Element;
15
41
  story: {
@@ -7,8 +7,8 @@ export interface FeaturedCampaignCardProps {
7
7
  completed?: number;
8
8
  maxWidth?: number;
9
9
  donation?: number;
10
- raised?: number;
11
- goal?: number;
10
+ raised?: number | string;
11
+ goal?: number | string;
12
12
  onClick: () => void;
13
13
  fundraisingText: string;
14
14
  handleImageError?: () => void;
@@ -6,9 +6,4 @@ export interface MaterialIconProps extends Omit<React.HTMLProps<HTMLOrSVGElement
6
6
  size?: string;
7
7
  }
8
8
  declare function MaterialIcon({ icon, iconSet, className, size, ...rest }: MaterialIconProps): React.JSX.Element;
9
- declare namespace MaterialIcon {
10
- var defaultProps: {
11
- iconSet: string;
12
- };
13
- }
14
9
  export default MaterialIcon;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const InforRepresentCampaignStories: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const InputExample: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const InputExample: {
@@ -382,7 +382,6 @@ declare function Box({ as, ma, mv, mh, mt, mr, mb, ml, pa, pv, ph, pt, pb, pl, p
382
382
  onAnimationIterationCapture?: React.AnimationEventHandler<HTMLElement> | undefined;
383
383
  onTransitionEnd?: React.TransitionEventHandler<HTMLElement> | undefined;
384
384
  onTransitionEndCapture?: React.TransitionEventHandler<HTMLElement> | undefined;
385
- css?: import("@emotion/core").InterpolationWithTheme<any>;
386
385
  ref?: React.LegacyRef<HTMLElement> | undefined;
387
386
  key?: React.Key | null | undefined;
388
387
  className: string;
@@ -13,13 +13,4 @@ export interface FlexProps extends Omit<BoxProps, "wrap"> {
13
13
  children?: React.ReactNode;
14
14
  }
15
15
  declare function Flex({ direction, justify, align, reverse, wrap, center, className, children, ...rest }: FlexProps): React.JSX.Element;
16
- declare namespace Flex {
17
- var defaultProps: {
18
- direction: string;
19
- justify: string;
20
- align: string;
21
- reverse: boolean;
22
- wrap: boolean;
23
- };
24
- }
25
16
  export default Flex;
@@ -1,14 +1,42 @@
1
- import React from "react";
2
1
  import CenterDecorator from "../../utils/center-decorator";
3
2
  declare const _default: {
4
3
  title: string;
5
4
  decorators: (typeof CenterDecorator)[];
6
- };
7
- export default _default;
8
- export declare const FlexStory: {
9
- (): React.JSX.Element;
10
- story: {
11
- name: string;
12
- decorators: ((...args: any) => any)[];
5
+ argTypes: {
6
+ number: {
7
+ control: string;
8
+ defaultValue: number;
9
+ };
10
+ reverse: {
11
+ control: string;
12
+ defaultValue: boolean;
13
+ };
14
+ wrap: {
15
+ control: string;
16
+ defaultValue: boolean;
17
+ };
18
+ align: {
19
+ control: {
20
+ type: string;
21
+ options: string[];
22
+ };
23
+ defaultValue: string;
24
+ };
25
+ direction: {
26
+ control: {
27
+ type: string;
28
+ options: string[];
29
+ };
30
+ defaultValue: string;
31
+ };
32
+ justify: {
33
+ control: {
34
+ type: string;
35
+ options: string[];
36
+ };
37
+ defaultValue: string;
38
+ };
13
39
  };
14
40
  };
41
+ export default _default;
42
+ export declare const FlexStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
@@ -3,14 +3,7 @@ import { FlexProps } from "./flex";
3
3
  interface StackProps extends FlexProps {
4
4
  horizontal?: boolean;
5
5
  vertical?: boolean;
6
- gap: string;
6
+ gap?: string;
7
7
  }
8
8
  declare function Stack({ gap, direction, reverse, className, children, ...rest }: StackProps): React.JSX.Element;
9
- declare namespace Stack {
10
- var defaultProps: {
11
- gap: string;
12
- direction: string;
13
- reverse: boolean;
14
- };
15
- }
16
9
  export default Stack;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const MyAccountFrpCloseStory: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const MyAccountFrpPreviewStory: {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  declare const _default: {
3
3
  title: string;
4
- decorators: ((...args: any) => any)[];
4
+ decorators: never[];
5
5
  };
6
6
  export default _default;
7
7
  export declare const MyAccountSidebarStory: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const MyAccountStatsDonatedStory: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const MyAccountStatsRaisedStory: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const PartnerChartStatsActive: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const PartnerMonthlyStatsStories: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const PartnerMonthlyStatsStories: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const PartnerToggleButtonBlockStory: {
@@ -3,20 +3,28 @@ import CenterDecorator from "../../utils/center-decorator";
3
3
  declare const _default: {
4
4
  title: string;
5
5
  decorators: (typeof CenterDecorator)[];
6
- };
7
- export default _default;
8
- export declare const PhoneNumberInputStory: {
9
- (): React.JSX.Element;
10
- story: {
11
- name: string;
12
- };
13
- };
14
- export declare const PhoneNumberInputDisableStory: {
15
- (): React.JSX.Element;
16
- story: {
17
- name: string;
6
+ argTypes: {
7
+ label: {
8
+ control: string;
9
+ defaultValue: string;
10
+ };
11
+ required: {
12
+ control: string;
13
+ defaultValue: boolean;
14
+ };
15
+ helperText: {
16
+ control: string;
17
+ defaultValue: string;
18
+ };
19
+ error: {
20
+ control: string;
21
+ defaultValue: string;
22
+ };
18
23
  };
19
24
  };
25
+ export default _default;
26
+ export declare const PhoneNumberInputStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
27
+ export declare const PhoneNumberInputDisableStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
20
28
  export declare const PhoneInputStory: {
21
29
  (): React.JSX.Element;
22
30
  story: {
@@ -29,15 +37,5 @@ export declare const PhoneNumberInputV2: {
29
37
  name: string;
30
38
  };
31
39
  };
32
- export declare const PhoneNumberInputStoryV1: {
33
- (): React.JSX.Element;
34
- story: {
35
- name: string;
36
- };
37
- };
38
- export declare const PhoneNumberInputIsDisableCountriesStoryV1: {
39
- (): React.JSX.Element;
40
- story: {
41
- name: string;
42
- };
43
- };
40
+ export declare const PhoneNumberInputStoryV1: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
41
+ export declare const PhoneNumberInputIsDisableCountriesStoryV1: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
@@ -1,24 +1,104 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
- };
6
- export default _default;
7
- export declare const SelectStory: {
8
- (): React.JSX.Element;
9
- story: {
10
- name: string;
5
+ decorators: (typeof CenterDecorator)[];
6
+ argTypes: {
7
+ large: {
8
+ control: string;
9
+ defaultValue: boolean;
10
+ };
11
+ label: {
12
+ control: string;
13
+ defaultValue: string;
14
+ };
15
+ labelKind: {
16
+ control: {
17
+ type: string;
18
+ options: {
19
+ External: string;
20
+ Floating: string;
21
+ };
22
+ };
23
+ defaultValue: string;
24
+ };
25
+ required: {
26
+ control: string;
27
+ defaultValue: boolean;
28
+ };
29
+ helperText: {
30
+ control: string;
31
+ defaultValue: string;
32
+ };
33
+ persistent: {
34
+ control: string;
35
+ defaultValue: boolean;
36
+ };
37
+ leadingIcon: {
38
+ control: string;
39
+ defaultValue: boolean;
40
+ };
41
+ arrow: {
42
+ control: string;
43
+ defaultValue: boolean;
44
+ };
45
+ error: {
46
+ control: string;
47
+ defaultValue: string;
48
+ };
11
49
  };
12
50
  };
51
+ export default _default;
52
+ export declare const SelectStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
13
53
  export declare const SelectStoryV2: {
14
54
  (): React.JSX.Element;
15
55
  story: {
16
56
  name: string;
57
+ decorators: (typeof CenterDecorator)[];
58
+ argTypes: {
59
+ large: {
60
+ control: string;
61
+ defaultValue: boolean;
62
+ };
63
+ label: {
64
+ control: string;
65
+ defaultValue: string;
66
+ };
67
+ labelKind: {
68
+ control: {
69
+ type: string;
70
+ options: {
71
+ External: string;
72
+ Floating: string;
73
+ };
74
+ };
75
+ defaultValue: string;
76
+ };
77
+ required: {
78
+ control: string;
79
+ defaultValue: boolean;
80
+ };
81
+ helperText: {
82
+ control: string;
83
+ defaultValue: string;
84
+ };
85
+ persistent: {
86
+ control: string;
87
+ defaultValue: boolean;
88
+ };
89
+ leadingIcon: {
90
+ control: string;
91
+ defaultValue: boolean;
92
+ };
93
+ arrow: {
94
+ control: string;
95
+ defaultValue: boolean;
96
+ };
97
+ error: {
98
+ control: string;
99
+ defaultValue: string;
100
+ };
101
+ };
17
102
  };
18
103
  };
19
- export declare const SelectEnhancedStory: {
20
- (): React.JSX.Element;
21
- story: {
22
- name: string;
23
- };
24
- };
104
+ export declare const SelectEnhancedStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
@@ -10,5 +10,8 @@ export interface SwitchProps extends Omit<MDCSwitchProps, "ref" | "color"> {
10
10
  disabled?: boolean;
11
11
  onChange?: (e: React.FormEvent<HTMLInputElement>) => void;
12
12
  }
13
- declare const Switch: ({ id, label, color, className, ...rest }: SwitchProps) => React.JSX.Element;
13
+ declare const Switch: {
14
+ ({ id, label, color, className, ...rest }: SwitchProps): React.JSX.Element;
15
+ displayName: string;
16
+ };
14
17
  export default Switch;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const PartnerMonthlyTableStories: {
@@ -2,16 +2,63 @@ import React from "react";
2
2
  import CenterDecorator from "../../utils/center-decorator";
3
3
  declare const _default: {
4
4
  title: string;
5
- decorators: ((...args: any) => any)[];
6
- };
7
- export default _default;
8
- export declare const TextStory: {
9
- (): React.JSX.Element;
10
- story: {
11
- name: string;
12
- decorators: (typeof CenterDecorator)[];
5
+ decorators: (typeof CenterDecorator)[];
6
+ argTypes: {
7
+ contents: {
8
+ control: string;
9
+ defaultValue: string;
10
+ };
11
+ elem: {
12
+ control: {
13
+ type: string;
14
+ options: {
15
+ Span: string;
16
+ "Heading 1": string;
17
+ "Heading 2": string;
18
+ "Heading 3": string;
19
+ "Heading 4": string;
20
+ "Heading 5": string;
21
+ "Heading 6": string;
22
+ Paragraph: string;
23
+ Small: string;
24
+ };
25
+ };
26
+ defaultValue: string;
27
+ };
28
+ kind: {
29
+ control: {
30
+ type: string;
31
+ options: string[];
32
+ };
33
+ defaultValue: string;
34
+ };
35
+ align: {
36
+ control: {
37
+ type: string;
38
+ options: string[];
39
+ };
40
+ defaultValue: string;
41
+ };
42
+ underline: {
43
+ control: string;
44
+ defaultValue: boolean;
45
+ };
46
+ strike: {
47
+ control: string;
48
+ defaultValue: boolean;
49
+ };
50
+ bold: {
51
+ control: string;
52
+ defaultValue: boolean;
53
+ };
54
+ italic: {
55
+ control: string;
56
+ defaultValue: boolean;
57
+ };
13
58
  };
14
59
  };
60
+ export default _default;
61
+ export declare const TextStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
15
62
  export declare const kinds: {
16
63
  (): React.JSX.Element;
17
64
  story: {
@@ -1,18 +1,10 @@
1
- import React from "react";
1
+ import { StoryFn } from "@storybook/react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ tags: string[];
6
+ decorators: (typeof CenterDecorator)[];
5
7
  };
6
8
  export default _default;
7
- export declare const TextFieldStory: {
8
- (): React.JSX.Element;
9
- story: {
10
- name: string;
11
- };
12
- };
13
- export declare const TextFieldSearchStory: {
14
- (): React.JSX.Element;
15
- story: {
16
- name: string;
17
- };
18
- };
9
+ export declare const TextFieldStory: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0fc72a6d").R, import("@storybook/types").Args>;
10
+ export declare const TextFieldSearchStory: StoryFn;
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const ThisMonthCardStories: {
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
+ import CenterDecorator from "../../utils/center-decorator";
2
3
  declare const _default: {
3
4
  title: string;
4
- decorators: ((...args: any) => any)[];
5
+ decorators: (typeof CenterDecorator)[];
5
6
  };
6
7
  export default _default;
7
8
  export declare const SwitchDefault: {