@transferwise/components 0.0.0-experimental-36d28a2 → 0.0.0-experimental-18e9dad

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 (72) hide show
  1. package/build/es/no-polyfill/common/closeButton/CloseButton.js +1 -1
  2. package/build/es/no-polyfill/display/Display.js +1 -1
  3. package/build/es/no-polyfill/image/Image.js +1 -1
  4. package/build/es/no-polyfill/index.js +1 -1
  5. package/build/es/no-polyfill/loader/Loader.js +1 -1
  6. package/build/es/no-polyfill/nudge/Nudge.js +1 -1
  7. package/build/es/no-polyfill/nudge/Nudge.spec.js +1 -1
  8. package/build/es/no-polyfill/nudge/Nudge.story.js +1 -1
  9. package/build/es/polyfill/common/closeButton/CloseButton.js +1 -1
  10. package/build/es/polyfill/display/Display.js +1 -1
  11. package/build/es/polyfill/image/Image.js +1 -1
  12. package/build/es/polyfill/index.js +1 -1
  13. package/build/es/polyfill/loader/Loader.js +1 -1
  14. package/build/es/polyfill/nudge/Nudge.js +1 -1
  15. package/build/es/polyfill/nudge/Nudge.spec.js +1 -1
  16. package/build/es/polyfill/nudge/Nudge.story.js +1 -1
  17. package/build/main.css +1 -1
  18. package/build/styles/main.css +1 -1
  19. package/build/types/avatar/index.d.ts +0 -1
  20. package/build/types/common/closeButton/CloseButton.d.ts +0 -4
  21. package/build/types/display/Display.d.ts +1 -1
  22. package/build/types/image/Image.d.ts +0 -1
  23. package/build/types/index.d.ts +0 -3
  24. package/build/types/nudge/Nudge.d.ts +8 -1
  25. package/build/types/nudge/Nudge.story.d.ts +1 -1
  26. package/build/umd/no-polyfill/main.js +1 -1
  27. package/build/umd/polyfill/main.js +1 -1
  28. package/package.json +1 -1
  29. package/build/es/no-polyfill/common/card/Card.js +0 -21
  30. package/build/es/no-polyfill/common/card/Card.spec.js +0 -6
  31. package/build/es/no-polyfill/common/card/Card.story.js +0 -1
  32. package/build/es/no-polyfill/common/card/index.js +0 -1
  33. package/build/es/no-polyfill/promoCard/PromoCard.js +0 -51
  34. package/build/es/no-polyfill/promoCard/PromoCard.spec.js +0 -13
  35. package/build/es/no-polyfill/promoCard/PromoCard.story.js +0 -1
  36. package/build/es/no-polyfill/promoCard/PromoCardContext.js +0 -19
  37. package/build/es/no-polyfill/promoCard/PromoCardContext.spec.js +0 -4
  38. package/build/es/no-polyfill/promoCard/PromoCardGroup.js +0 -20
  39. package/build/es/no-polyfill/promoCard/PromoCardGroup.spec.js +0 -5
  40. package/build/es/no-polyfill/promoCard/PromoCardGroup.story.js +0 -1
  41. package/build/es/no-polyfill/promoCard/PromoCardIndicator.js +0 -16
  42. package/build/es/no-polyfill/promoCard/index.js +0 -1
  43. package/build/es/polyfill/common/card/Card.js +0 -21
  44. package/build/es/polyfill/common/card/Card.spec.js +0 -6
  45. package/build/es/polyfill/common/card/Card.story.js +0 -1
  46. package/build/es/polyfill/common/card/index.js +0 -1
  47. package/build/es/polyfill/promoCard/PromoCard.js +0 -51
  48. package/build/es/polyfill/promoCard/PromoCard.spec.js +0 -13
  49. package/build/es/polyfill/promoCard/PromoCard.story.js +0 -1
  50. package/build/es/polyfill/promoCard/PromoCardContext.js +0 -19
  51. package/build/es/polyfill/promoCard/PromoCardContext.spec.js +0 -4
  52. package/build/es/polyfill/promoCard/PromoCardGroup.js +0 -20
  53. package/build/es/polyfill/promoCard/PromoCardGroup.spec.js +0 -5
  54. package/build/es/polyfill/promoCard/PromoCardGroup.story.js +0 -1
  55. package/build/es/polyfill/promoCard/PromoCardIndicator.js +0 -16
  56. package/build/es/polyfill/promoCard/index.js +0 -1
  57. package/build/styles/common/card/Card.css +0 -1
  58. package/build/styles/promoCard/PromoCard.css +0 -1
  59. package/build/types/common/card/Card.d.ts +0 -40
  60. package/build/types/common/card/Card.spec.d.ts +0 -1
  61. package/build/types/common/card/Card.story.d.ts +0 -6
  62. package/build/types/common/card/index.d.ts +0 -1
  63. package/build/types/promoCard/PromoCard.d.ts +0 -123
  64. package/build/types/promoCard/PromoCard.spec.d.ts +0 -1
  65. package/build/types/promoCard/PromoCard.story.d.ts +0 -10
  66. package/build/types/promoCard/PromoCardContext.d.ts +0 -45
  67. package/build/types/promoCard/PromoCardContext.spec.d.ts +0 -1
  68. package/build/types/promoCard/PromoCardGroup.d.ts +0 -55
  69. package/build/types/promoCard/PromoCardGroup.spec.d.ts +0 -1
  70. package/build/types/promoCard/PromoCardGroup.story.d.ts +0 -8
  71. package/build/types/promoCard/PromoCardIndicator.d.ts +0 -31
  72. package/build/types/promoCard/index.d.ts +0 -2
@@ -1,3 +1,2 @@
1
1
  export { AvatarType } from './avatarTypes';
2
- export type { AvatarProps } from './Avatar';
3
2
  export { default } from './Avatar';
@@ -3,12 +3,8 @@ import { SizeLarge, SizeMedium, SizeSmall } from '../propsValues/size';
3
3
  export type CloseButtonProps = Pick<React.ComponentPropsWithoutRef<'button'>, 'aria-label' | 'className' | 'onClick'> & {
4
4
  size?: SizeSmall | SizeMedium | SizeLarge;
5
5
  filled?: boolean;
6
- isDisabled?: boolean;
7
- testId?: string;
8
6
  };
9
7
  export declare const CloseButton: import("react").ForwardRefExoticComponent<Pick<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>>, "className" | "aria-label" | "onClick"> & {
10
8
  size?: "sm" | "md" | "lg" | undefined;
11
9
  filled?: boolean | undefined;
12
- isDisabled?: boolean | undefined;
13
- testId?: string | undefined;
14
10
  } & import("react").RefAttributes<HTMLButtonElement>>;
@@ -6,5 +6,5 @@ type Props = PropsWithChildren<{
6
6
  type?: DisplayTypes;
7
7
  className?: string;
8
8
  }>;
9
- declare function Display({ as: Heading, type, children, className, id, }: Props): JSX.Element;
9
+ declare function Display({ as: Heading, type, children, className, }: Props): JSX.Element;
10
10
  export default Display;
@@ -12,7 +12,6 @@ export interface ImageProps {
12
12
  loading?: ImageLoading;
13
13
  stretch?: boolean;
14
14
  shrink?: boolean;
15
- role?: string;
16
15
  }
17
16
 
18
17
  declare const Image: React.FC<ImageProps>;
@@ -21,7 +21,6 @@ export { default as Badge } from './badge';
21
21
  export { default as BottomSheet } from './common/bottomSheet';
22
22
  export { default as Button } from './button';
23
23
  export { default as Card } from './card';
24
- export { default as BaseCard } from './common/card';
25
24
  export { default as Checkbox } from './checkbox';
26
25
  export { default as CheckboxButton } from './checkboxButton';
27
26
  export { default as CheckboxOption } from './checkboxOption';
@@ -64,8 +63,6 @@ export { default as Popover } from './popover';
64
63
  export { default as ProcessIndicator } from './processIndicator';
65
64
  export { default as ProgressBar } from './progressBar';
66
65
  export { default as Progress } from './progress';
67
- export { default as PromoCard } from './promoCard';
68
- export { default as PromoCardGroup } from './promoCard';
69
66
  export { default as Provider, DirectionProvider, LanguageProvider } from './provider';
70
67
  export { default as Radio } from './radio';
71
68
  export { default as RadioGroup } from './radioGroup';
@@ -28,13 +28,20 @@ type BaseProps = {
28
28
  export interface OptionalId extends BaseProps {
29
29
  id?: string;
30
30
  persistDismissal?: false;
31
+ onIsPreviouslyDismissed?: undefined;
31
32
  }
32
33
  export interface RequiredPersistProps extends BaseProps {
33
34
  /** This ID should be completely unique to the page and feature as it uses a shared array which could conflict with other nudges in Wise */
34
35
  id: string;
35
36
  /** Use persist dismissal to keep the nudge dismissed using the browser's localStorage */
36
37
  persistDismissal: true;
38
+ /**
39
+ * Fired on mount for determining if nudge has been dismissed before
40
+ *
41
+ * @param {boolean} isPreviouslyDismissed - set to true if dismissed previously
42
+ */
43
+ onIsPreviouslyDismissed?: (isPreviouslyDismissed: boolean) => void;
37
44
  }
38
45
  export type Props = OptionalId | RequiredPersistProps;
39
- declare const Nudge: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, id, className, }: Props) => JSX.Element | null;
46
+ declare const Nudge: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, onIsPreviouslyDismissed, id, className, }: Props) => JSX.Element | null;
40
47
  export default Nudge;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare const _default: {
3
- component: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, id, className, }: import("./Nudge").Props) => JSX.Element | null;
3
+ component: ({ media, mediaName, title, link, href, onClick, onDismiss, persistDismissal, onIsPreviouslyDismissed, id, className, }: import("./Nudge").Props) => JSX.Element | null;
4
4
  title: string;
5
5
  };
6
6
  export default _default;