@transferwise/components 0.0.0-experimental-47ae02a → 0.0.0-experimental-da6dbbf

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 (89) hide show
  1. package/build/index.js +940 -642
  2. package/build/index.js.map +1 -1
  3. package/build/index.mjs +930 -633
  4. package/build/index.mjs.map +1 -1
  5. package/build/main.css +135 -0
  6. package/build/styles/carousel/Carousel.css +135 -0
  7. package/build/styles/main.css +135 -0
  8. package/build/types/accordion/AccordionItem/AccordionItem.d.ts.map +1 -1
  9. package/build/types/carousel/Carousel.d.ts +26 -0
  10. package/build/types/carousel/Carousel.d.ts.map +1 -0
  11. package/build/types/carousel/index.d.ts +3 -0
  12. package/build/types/carousel/index.d.ts.map +1 -0
  13. package/build/types/common/card/Card.d.ts +2 -2
  14. package/build/types/common/card/Card.d.ts.map +1 -1
  15. package/build/types/common/hooks/useMedia.d.ts.map +1 -1
  16. package/build/types/common/panel/Panel.d.ts.map +1 -1
  17. package/build/types/common/responsivePanel/ResponsivePanel.d.ts.map +1 -1
  18. package/build/types/dimmer/Dimmer.d.ts +11 -1
  19. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  20. package/build/types/drawer/Drawer.d.ts +4 -4
  21. package/build/types/index.d.ts +4 -3
  22. package/build/types/index.d.ts.map +1 -1
  23. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts +1 -2
  24. package/build/types/inputWithDisplayFormat/InputWithDisplayFormat.d.ts.map +1 -1
  25. package/build/types/inputs/SelectInput.d.ts.map +1 -1
  26. package/build/types/modal/Modal.d.ts.map +1 -1
  27. package/build/types/processIndicator/ProcessIndicator.d.ts +19 -36
  28. package/build/types/processIndicator/ProcessIndicator.d.ts.map +1 -1
  29. package/build/types/processIndicator/index.d.ts +2 -2
  30. package/build/types/processIndicator/index.d.ts.map +1 -1
  31. package/build/types/promoCard/PromoCard.d.ts +16 -5
  32. package/build/types/promoCard/PromoCard.d.ts.map +1 -1
  33. package/build/types/select/searchBox/SearchBox.d.ts +1 -1
  34. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts +1 -2
  35. package/build/types/textareaWithDisplayFormat/TextareaWithDisplayFormat.d.ts.map +1 -1
  36. package/build/types/tooltip/Tooltip.d.ts +1 -1
  37. package/build/types/tooltip/Tooltip.d.ts.map +1 -1
  38. package/build/types/uploadInput/uploadItem/UploadItem.d.ts.map +1 -1
  39. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +14 -14
  40. package/build/types/withDisplayFormat/WithDisplayFormat.d.ts.map +1 -1
  41. package/package.json +11 -7
  42. package/src/accordion/AccordionItem/AccordionItem.tsx +4 -2
  43. package/src/avatarWrapper/AvatarWrapper.story.tsx +3 -1
  44. package/src/button/Button.tsx +1 -1
  45. package/src/carousel/Carousel.css +135 -0
  46. package/src/carousel/Carousel.less +133 -0
  47. package/src/carousel/Carousel.spec.tsx +221 -0
  48. package/src/carousel/Carousel.story.tsx +63 -0
  49. package/src/carousel/Carousel.tsx +345 -0
  50. package/src/carousel/index.ts +3 -0
  51. package/src/common/card/Card.tsx +51 -43
  52. package/src/common/hooks/useConditionalListener/useConditionalListener.spec.js +1 -1
  53. package/src/common/hooks/useHasIntersected/useHasIntersected.spec.js +3 -3
  54. package/src/common/hooks/useMedia.spec.ts +1 -1
  55. package/src/common/hooks/useMedia.ts +2 -1
  56. package/src/common/panel/Panel.tsx +92 -90
  57. package/src/common/responsivePanel/ResponsivePanel.tsx +38 -34
  58. package/src/dateLookup/DateLookup.keyboardEvents.spec.js +180 -0
  59. package/src/dateLookup/DateLookup.rtl.spec.tsx +5 -181
  60. package/src/dateLookup/DateLookup.testingLibrary.spec.js +124 -171
  61. package/src/drawer/Drawer.js +3 -3
  62. package/src/field/Field.tsx +3 -3
  63. package/src/index.ts +4 -3
  64. package/src/inputWithDisplayFormat/InputWithDisplayFormat.tsx +1 -2
  65. package/src/inputs/SelectInput.story.tsx +0 -1
  66. package/src/inputs/SelectInput.tsx +2 -10
  67. package/src/main.css +135 -0
  68. package/src/main.less +1 -0
  69. package/src/modal/Modal.tsx +2 -1
  70. package/src/processIndicator/ProcessIndicator.js +117 -0
  71. package/src/processIndicator/ProcessIndicator.spec.js +101 -0
  72. package/src/promoCard/PromoCard.story.tsx +2 -2
  73. package/src/promoCard/PromoCard.tsx +31 -9
  74. package/src/radio/__snapshots__/Radio.rtl.spec.tsx.snap +1 -0
  75. package/src/snackbar/Snackbar.spec.js +1 -4
  76. package/src/tabs/Tabs.spec.js +27 -46
  77. package/src/test-utils/index.js +7 -5
  78. package/src/test-utils/jest.setup.js +3 -9
  79. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.tsx +1 -2
  80. package/src/tooltip/Tooltip.tsx +46 -44
  81. package/src/tooltip/__snapshots__/Tooltip.spec.tsx.snap +2 -2
  82. package/src/upload/Upload.spec.js +13 -34
  83. package/src/uploadInput/UploadInput.spec.tsx +23 -21
  84. package/src/uploadInput/uploadItem/UploadItem.tsx +3 -1
  85. package/src/withDisplayFormat/WithDisplayFormat.spec.js +32 -63
  86. package/src/withDisplayFormat/WithDisplayFormat.tsx +28 -28
  87. package/src/processIndicator/ProcessIndicator.rtl.spec.tsx +0 -45
  88. package/src/processIndicator/ProcessIndicator.tsx +0 -110
  89. /package/src/processIndicator/{index.ts → index.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAiB,MAAM,OAAO,CAAC;AAGjD,OAAO,EAGL,WAAW,EACX,cAAc,EAEd,WAAW,EACX,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EAEf,MAAM,WAAW,CAAC;AASnB,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;IACxC,QAAQ,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,KAAK,wHAYR,UAAU,gCAmHZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/modal/Modal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAG1C,OAAO,EAGL,WAAW,EACX,cAAc,EAEd,WAAW,EACX,SAAS,EACT,UAAU,EACV,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EAEf,MAAM,WAAW,CAAC;AASnB,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG;IACrC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,cAAc,CAAC;IAC3D,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,aAAa,GAAG,cAAc,CAAC;IACxC,QAAQ,CAAC,EAAE,WAAW,GAAG,cAAc,CAAC;IACxC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,CAAC;AAEF,QAAA,MAAM,KAAK,wHAYR,UAAU,gCAmHZ,CAAC;AAEF,eAAe,KAAK,CAAC"}
@@ -1,36 +1,19 @@
1
- import { Component } from 'react';
2
- import { Status, Size } from '../common';
3
- type ProcessIndicatorStatus = `${Status.PROCESSING | Status.FAILED | Status.SUCCEEDED | Status.HIDDEN}`;
4
- export interface ProcessIndicatorProps {
5
- status?: ProcessIndicatorStatus;
6
- size?: 'xxs' | `${Size.EXTRA_SMALL | Size.SMALL | Size.EXTRA_LARGE}`;
7
- className?: string;
8
- 'data-testid'?: string;
9
- onAnimationCompleted?: (status: ProcessIndicatorStatus) => void;
10
- }
11
- type ProcessIndicatorState = Required<Pick<ProcessIndicatorProps, 'status' | 'size'>>;
12
- export default class ProcessIndicator extends Component<ProcessIndicatorProps, ProcessIndicatorState> {
13
- props: ProcessIndicatorProps & Required<Pick<ProcessIndicatorProps, keyof typeof ProcessIndicator.defaultProps>>;
14
- static defaultProps: {
15
- status: "processing";
16
- size: "sm";
17
- };
18
- interval: number;
19
- timeout: number;
20
- constructor(props: ProcessIndicator['props']);
21
- /**
22
- * Create interval for animation duration (1500ms)
23
- * Update state only at the end of every interval
24
- * (end of animation loop) if props changed before end of animation
25
- */
26
- componentDidMount(): void;
27
- /**
28
- * Only trigger render if comopnent's state got
29
- * updated from interval callback
30
- */
31
- shouldComponentUpdate(nextProps: ProcessIndicator['props'], nextState: ProcessIndicatorState): boolean;
32
- componentWillUnmount(): void;
33
- render(): import("react").JSX.Element;
34
- }
35
- export {};
36
- //# sourceMappingURL=ProcessIndicator.d.ts.map
1
+ import * as React from 'react';
2
+
3
+ export type ProcessIndicatorStatus = "processing" | "failed" | "succeeded" | "hidden";
4
+
5
+ export type ProcessIndicatorSize = "xxs" | "xs" | "sm" | "xl";
6
+
7
+ export interface ProcessIndicatorProps {
8
+ status?: ProcessIndicatorStatus;
9
+ size?: ProcessIndicatorSize;
10
+ onAnimationCompleted?: (...args: any[])=>any;
11
+ className?: string;
12
+ "data-testid"?: string;
13
+ }
14
+
15
+ export default class ProcessIndicator extends React.Component<ProcessIndicatorProps, any> {
16
+ render(): JSX.Element;
17
+
18
+ }
19
+
@@ -1 +1 @@
1
- {"version":3,"file":"ProcessIndicator.d.ts","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qBP"}
1
+ {"version":3,"file":"ProcessIndicator.d.ts","sourceRoot":"","sources":["../../../src/processIndicator/ProcessIndicator.js"],"names":[],"mappings":"AAOA,4CAA6C;;AAE7C;IACE,wBAQC;IANC;;;MAGC;IACD,gCAAoB;IACpB,aAAmB;IAGrB;;;;OAIG;IACH,0BAgBC;IAED;;;;;;OAMG;IACH,+DAKC;IAGD,6BAGC;IAED,4CAOE;IAJE,qCAE4B;IAIhC,sCA0BC;CACF"}
@@ -1,3 +1,3 @@
1
- export { default } from './ProcessIndicator';
2
- export * from './ProcessIndicator';
1
+ export { default } from "./ProcessIndicator";
2
+ export * from "./ProcessIndicator";
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processIndicator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processIndicator/index.js"],"names":[],"mappings":""}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { CardProps } from '../common/card';
3
- import { PromoCardIndicatorProps } from './PromoCardIndicator';
4
- export type ReferenceType = React.Ref<HTMLInputElement>;
2
+ import { type CardProps } from '../common/card';
3
+ import { type PromoCardIndicatorProps } from './PromoCardIndicator';
4
+ export type ReferenceType = React.Ref<HTMLInputElement> | React.Ref<HTMLDivElement>;
5
5
  export type RelatedTypes = '' | 'alternate' | 'author' | 'bookmark' | 'external' | 'help' | 'license' | 'next' | 'nofollow' | 'noreferrer' | 'noopener' | 'prev' | 'search' | 'tag';
6
6
  export interface PromoCardCommonProps {
7
7
  /** Optional prop to specify classNames onto the PromoCard */
@@ -30,12 +30,15 @@ export interface PromoCardCommonProps {
30
30
  isDisabled?: boolean;
31
31
  /** Specify an onClick event handler */
32
32
  onClick?: () => void;
33
+ /** Specify an onKeyDown event handler */
34
+ onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
33
35
  /** Optional prop to specify the ID used for testing */
34
36
  testId?: string;
35
37
  /** Required prop to specify the title text of the PromoCard */
36
38
  title: string;
37
39
  /** Set to false to use body font style for the title */
38
40
  useDisplayFont?: boolean;
41
+ ref?: ReferenceType;
39
42
  }
40
43
  export interface PromoCardLinkProps extends PromoCardCommonProps, Omit<CardProps, 'children'> {
41
44
  /**
@@ -47,6 +50,12 @@ export interface PromoCardLinkProps extends PromoCardCommonProps, Omit<CardProps
47
50
  href?: string;
48
51
  /** Optionally specify the language of the linked URL */
49
52
  hrefLang?: string;
53
+ /** Optional property that can be pass a ref for the anchor. */
54
+ anchorRef?: React.Ref<HTMLAnchorElement>;
55
+ /**
56
+ * Optional prop to specify the ID of the anchor element which can be useful when using a ref.
57
+ */
58
+ anchorId?: string;
50
59
  /**
51
60
  * Relationship between the PromoCard href URL and the current page. See
52
61
  * [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel).
@@ -59,7 +68,7 @@ export interface PromoCardLinkProps extends PromoCardCommonProps, Omit<CardProps
59
68
  isChecked?: never;
60
69
  tabIndex?: never;
61
70
  type?: never;
62
- reference?: never;
71
+ ref?: ReferenceType;
63
72
  value?: never;
64
73
  }
65
74
  export interface PromoCardCheckedProps extends PromoCardCommonProps, Omit<CardProps, 'children'> {
@@ -70,7 +79,7 @@ export interface PromoCardCheckedProps extends PromoCardCommonProps, Omit<CardPr
70
79
  /** Optional prop to specify the tabIndex of the PromoCard */
71
80
  tabIndex?: number;
72
81
  /** Optional property to provide component Ref */
73
- reference?: ReferenceType;
82
+ ref?: ReferenceType;
74
83
  /** Optional prop to specify the input type of the PromoCard */
75
84
  type?: 'checkbox' | 'radio';
76
85
  /** Specify the value attribute of the PromoCard if Checkbox or Radio */
@@ -78,6 +87,8 @@ export interface PromoCardCheckedProps extends PromoCardCommonProps, Omit<CardPr
78
87
  /** Only applies to <a />s */
79
88
  download?: never;
80
89
  href?: never;
90
+ anchorRef?: never;
91
+ anchorId?: never;
81
92
  hrefLang?: never;
82
93
  rel?: never;
83
94
  target?: never;
@@ -1 +1 @@
1
- {"version":3,"file":"PromoCard.d.ts","sourceRoot":"","sources":["../../../src/promoCard/PromoCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoE,MAAM,OAAO,CAAC;AAIzF,OAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAMjD,OAA2B,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEnF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;AACxD,MAAM,MAAM,YAAY,GACpB,EAAE,GACF,WAAW,GACX,QAAQ,GACR,UAAU,GACV,UAAU,GACV,MAAM,GACN,SAAS,GACT,MAAM,GACN,UAAU,GACV,YAAY,GACZ,UAAU,GACV,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,WAAW,oBAAoB;IACnC,6DAA6D;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uDAAuD;IACvD,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,sEAAsE;IACtE,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,YAAY,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAEzC,6EAA6E;IAC7E,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB,gFAAgF;IAChF,aAAa,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IAEhD,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,wDAAwD;IACxD,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,uCAAuC;IACvC,OAAO,CAAC,EAAE,MAAM,IAAI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;IACb,GAAG,CAAC,EAAE,aAAa,CAAC;IACpB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,WAAW,qBAAsB,SAAQ,oBAAoB,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC;IAC9F,6DAA6D;IAC7D,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,uDAAuD;IACvD,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,iDAAiD;IACjD,GAAG,CAAC,EAAE,aAAa,CAAC;IAEpB,gEAAgE;IAChE,IAAI,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAE5B,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,GAAG,CAAC,EAAE,KAAK,CAAC;IACZ,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAExE,MAAM,MAAM,oBAAoB,GAAG,CACjC,KAAK,EAAE,kBAAkB,GAAG,qBAAqB,KAC9C,GAAG,CAAC,OAAO,CAAC;;AA6OjB,wBAAqC"}
@@ -3,6 +3,6 @@ declare const SearchBox: import("react").ForwardRefExoticComponent<{
3
3
  id?: string | undefined;
4
4
  classNames?: Record<string, string> | undefined;
5
5
  focusedOptionId?: string | undefined;
6
- } & Pick<InputHTMLAttributes<HTMLInputElement>, "onChange" | "onClick" | "value" | "placeholder"> & import("react").RefAttributes<HTMLInputElement>>;
6
+ } & Pick<InputHTMLAttributes<HTMLInputElement>, "placeholder" | "onChange" | "onClick" | "value"> & import("react").RefAttributes<HTMLInputElement>>;
7
7
  export default SearchBox;
8
8
  //# sourceMappingURL=SearchBox.d.ts.map
@@ -1,7 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { type TextAreaProps } from '../inputs/TextArea';
3
2
  import { type WithDisplayFormatProps } from '../withDisplayFormat';
4
- export interface TextareaWithDisplayFormatProps extends Omit<WithDisplayFormatProps<TextAreaProps>, 'render'> {
3
+ export interface TextareaWithDisplayFormatProps extends Omit<WithDisplayFormatProps, 'render'> {
5
4
  }
6
5
  declare const TextareaWithDisplayFormat: (props: TextareaWithDisplayFormatProps) => import("react").JSX.Element;
7
6
  export default TextareaWithDisplayFormat;
@@ -1 +1 @@
1
- {"version":3,"file":"TextareaWithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/textareaWithDisplayFormat/TextareaWithDisplayFormat.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAA0B,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,MAAM,WAAW,8BACf,SAAQ,IAAI,CAAC,sBAAsB,CAAC,aAAa,CAAC,EAAE,QAAQ,CAAC;CAAG;AAElE,QAAA,MAAM,yBAAyB,UAAW,8BAA8B,gCAKvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
1
+ {"version":3,"file":"TextareaWithDisplayFormat.d.ts","sourceRoot":"","sources":["../../../src/textareaWithDisplayFormat/TextareaWithDisplayFormat.tsx"],"names":[],"mappings":";AACA,OAA0B,EAAE,KAAK,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,MAAM,WAAW,8BAA+B,SAAQ,IAAI,CAAC,sBAAsB,EAAE,QAAQ,CAAC;CAAG;AAEjG,QAAA,MAAM,yBAAyB,UAAW,8BAA8B,gCAKvE,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren, ReactNode } from 'react';
1
+ import { ReactNode, PropsWithChildren } from 'react';
2
2
  import { CommonProps } from '../common';
3
3
  import { PositionBottom, PositionLeft, PositionRight, PositionTop } from '../common/propsValues/position';
4
4
  export type TooltipProps = PropsWithChildren<{
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EAEjB,SAAS,EAMV,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,WAAW,EAAY,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,gCAAgC,CAAC;AAExC,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;IAC3C,QAAQ,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,YAAY,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC,GACA,WAAW,CAAC;AAEd,QAAA,MAAM,OAAO,kDAMV,YAAY,gCAoFd,CAAC;AAEF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../src/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAGA,OAAO,EAKL,SAAS,EAET,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,WAAW,EAAY,MAAM,WAAW,CAAC;AAClD,OAAO,EACL,cAAc,EACd,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,gCAAgC,CAAC;AAExC,MAAM,MAAM,YAAY,GAAG,iBAAiB,CAAC;IAC3C,QAAQ,CAAC,EAAE,WAAW,GAAG,aAAa,GAAG,cAAc,GAAG,YAAY,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC,GACA,WAAW,CAAC;AAEd,QAAA,MAAM,OAAO,kDAMV,YAAY,gCAsFd,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"UploadItem.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadItem/UploadItem.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAKxC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG;IACtD,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,QAAA,MAAM,UAAU,iEAMb,eAAe,gCAmHjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"UploadItem.d.ts","sourceRoot":"","sources":["../../../../src/uploadInput/uploadItem/UploadItem.tsx"],"names":[],"mappings":";AAUA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAKxC,MAAM,MAAM,eAAe,GAAG,GAAG,CAAC,mBAAmB,GAAG;IACtD,IAAI,EAAE,YAAY,CAAC;IACnB;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3C,CAAC;AAEF,oBAAY,QAAQ;IAClB,UAAU,eAAe;IACzB,SAAS,cAAc;CACxB;AAED,QAAA,MAAM,UAAU,iEAMb,eAAe,gCAqHjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -5,17 +5,17 @@ import { TextAreaProps } from '../inputs/TextArea';
5
5
  type HTMLTextElement = HTMLInputElement | HTMLTextAreaElement;
6
6
  type TextElementProps = InputProps | TextAreaProps;
7
7
  export type EventType = 'KeyDown' | 'Paste' | 'Cut' | 'Undo' | 'Redo' | 'Backspace' | 'Delete' | 'Initial';
8
- interface WithDisplayFormatState<T extends HTMLTextElement> {
8
+ interface WithDisplayFormatState {
9
9
  value: string;
10
10
  historyNavigator: HistoryNavigator;
11
11
  prevDisplayPattern: string;
12
12
  triggerType: EventType;
13
- triggerEvent: React.KeyboardEvent<T> | null;
13
+ triggerEvent: React.KeyboardEvent<HTMLTextElement> | null;
14
14
  pastedLength: number;
15
15
  selectionStart: number;
16
16
  selectionEnd: number;
17
17
  }
18
- export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps> extends Pick<T, 'className' | 'disabled' | 'id' | 'maxLength' | 'minLength' | 'name' | 'placeholder' | 'readOnly' | 'required' | 'inputMode'> {
18
+ export interface WithDisplayFormatProps<T extends TextElementProps = TextElementProps> extends Pick<TextElementProps, 'className' | 'disabled' | 'id' | 'maxLength' | 'minLength' | 'name' | 'placeholder' | 'readOnly' | 'required' | 'inputMode'> {
19
19
  value?: string;
20
20
  displayPattern: string;
21
21
  /**
@@ -29,15 +29,15 @@ export interface WithDisplayFormatProps<T extends TextElementProps = TextElement
29
29
  onFocus?: (value: string) => void;
30
30
  render: (renderProps: T) => JSX.Element;
31
31
  }
32
- declare class WithDisplayFormat<T extends TextElementProps = TextElementProps, U extends HTMLTextElement = HTMLTextElement> extends Component<WithDisplayFormatProps<T>, WithDisplayFormatState<U>> {
33
- props: WithDisplayFormatProps<T> & Required<Pick<WithDisplayFormatProps<T>, keyof (typeof WithDisplayFormat<T, U>)['defaultProps']>>;
32
+ declare class WithDisplayFormat<T extends TextElementProps> extends Component<WithDisplayFormatProps<T>, WithDisplayFormatState> {
33
+ props: WithDisplayFormatProps<T> & Required<Pick<WithDisplayFormatProps<T>, keyof typeof WithDisplayFormat.defaultProps>>;
34
34
  static defaultProps: {
35
35
  autoComplete: string;
36
36
  displayPattern: string;
37
37
  value: string;
38
38
  };
39
- constructor(props: WithDisplayFormat<T, U>['props']);
40
- static getDerivedStateFromProps({ displayPattern }: WithDisplayFormat['props'], { prevDisplayPattern, value, historyNavigator }: WithDisplayFormat['state']): {
39
+ constructor(props: WithDisplayFormatProps);
40
+ static getDerivedStateFromProps({ displayPattern }: WithDisplayFormatProps, { prevDisplayPattern, value, historyNavigator }: WithDisplayFormatState): {
41
41
  prevDisplayPattern: string;
42
42
  value: string;
43
43
  triggerType: null;
@@ -46,14 +46,14 @@ declare class WithDisplayFormat<T extends TextElementProps = TextElementProps, U
46
46
  } | null;
47
47
  getUserAction: (unformattedValue: string) => EventType | string;
48
48
  resetEvent: () => void;
49
- detectUndoRedo: (event: React.KeyboardEvent<U>) => "Undo" | "Redo" | null;
50
- handleOnKeyDown: React.KeyboardEventHandler<U>;
51
- handleOnPaste: React.ClipboardEventHandler<U>;
52
- handleOnCut: React.ClipboardEventHandler<U>;
49
+ detectUndoRedo: (event: React.KeyboardEvent<HTMLTextElement>) => "Undo" | "Redo" | null;
50
+ handleOnKeyDown: React.KeyboardEventHandler<HTMLTextElement>;
51
+ handleOnPaste: React.ClipboardEventHandler<HTMLTextElement>;
52
+ handleOnCut: React.ClipboardEventHandler<HTMLTextElement>;
53
53
  isKeyAllowed: (action: EventType | string) => boolean;
54
- handleOnChange: React.ChangeEventHandler<U>;
55
- handleOnBlur: React.FocusEventHandler<U>;
56
- handleOnFocus: React.FocusEventHandler<U>;
54
+ handleOnChange: React.ChangeEventHandler<HTMLTextElement>;
55
+ handleOnBlur: React.FocusEventHandler<HTMLTextElement>;
56
+ handleOnFocus: React.FocusEventHandler<HTMLTextElement>;
57
57
  handleDelete: (unformattedValue: string, action: EventType) => string;
58
58
  handleCursorPositioning: (action: string) => void;
59
59
  render(): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"WithDisplayFormat.d.ts","s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CAAC,4BAM3D;IAEF,eAAe,EAAE,KAAK,CAAC,oBAAoB,CAAC,eAAe,CAAC,CAuB1D;IAEF,aAAa,EAAE,KAAK,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAQzD;IAEF,WAAW,EAAE,KAAK,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAEvD;IAEF,YAAY,WAAY,SAAS,GAAG,MAAM,aAKxC;IAEF,cAAc,EAAE,KAAK,CAAC,kBAAkB,CAAC,eAAe,CAAC,CA0BvD;IAEF,YAAY,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAEpD;IAEF,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAMrD;IAEF,YAAY,qBAAsB,MAAM,UAAU,SAAS,YAuBzD;IAEF,uBAAuB,WAAY,MAAM,UAkBvC;IAEF,MAAM;CAqCP;AAED,eAAe,iBAAiB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-47ae02a",
3
+ "version": "0.0.0-experimental-da6dbbf",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -43,7 +43,6 @@
43
43
  "@babel/preset-env": "^7.24.5",
44
44
  "@babel/preset-react": "^7.24.1",
45
45
  "@babel/preset-typescript": "^7.24.1",
46
- "@cfaester/enzyme-adapter-react-18": "0.8.0",
47
46
  "@formatjs/cli": "^6.2.10",
48
47
  "@rollup/plugin-babel": "^6.0.4",
49
48
  "@rollup/plugin-json": "^6.1.0",
@@ -66,9 +65,10 @@
66
65
  "@storybook/test": "^7.6.19",
67
66
  "@storybook/theming": "^7.6.19",
68
67
  "@storybook/types": "^7.6.19",
69
- "@testing-library/dom": "^8.20.1",
68
+ "@testing-library/dom": "^7.31.2",
70
69
  "@testing-library/jest-dom": "^5.17.0",
71
- "@testing-library/react": "^13.4.0",
70
+ "@testing-library/react": "^12.1.5",
71
+ "@testing-library/react-hooks": "^8.0.1",
72
72
  "@testing-library/user-event": "^13.5.0",
73
73
  "@transferwise/icons": "^3.7.0",
74
74
  "@transferwise/neptune-tokens": "^8.9.2",
@@ -79,11 +79,13 @@
79
79
  "@types/lodash": "4.17.1",
80
80
  "@types/lodash.clamp": "^4.0.9",
81
81
  "@types/lodash.debounce": "^4.0.9",
82
- "@types/react": "^18.3.3",
83
- "@types/react-dom": "^18.3.0",
82
+ "@types/react": "^17.0.80",
83
+ "@types/react-dom": "^17.0.25",
84
84
  "@types/react-transition-group": "4.4.10",
85
85
  "@types/testing-library__jest-dom": "^5.14.9",
86
+ "@types/use-sync-external-store": "^0.0.6",
86
87
  "@wise/art": "^2.7.0",
88
+ "@wojtekmaj/enzyme-adapter-react-17": "^0.6.3",
87
89
  "babel-plugin-formatjs": "^10.5.14",
88
90
  "babel-plugin-inline-react-svg": "^2.0.2",
89
91
  "enzyme": "^3.11.0",
@@ -113,6 +115,7 @@
113
115
  "@formatjs/intl-locale": "^3.4.5",
114
116
  "@headlessui/react": "^1.7.19",
115
117
  "@popperjs/core": "^2.11.8",
118
+ "@radix-ui/react-id": "^1.0.1",
116
119
  "@react-aria/focus": "^3.17.0",
117
120
  "@react-aria/overlays": "^3.22.0",
118
121
  "@react-spring/web": "~9.7.3",
@@ -128,7 +131,8 @@
128
131
  "prop-types": "^15.8.1",
129
132
  "react-popper": "^2.3.0",
130
133
  "react-required-if": "^1.0.3",
131
- "react-transition-group": "^4.4.5"
134
+ "react-transition-group": "^4.4.5",
135
+ "use-sync-external-store": "^1.2.2"
132
136
  },
133
137
  "publishConfig": {
134
138
  "access": "public"
@@ -1,5 +1,7 @@
1
+ import { useId } from '@radix-ui/react-id';
2
+ import { useTheme } from '@wise/components-theming';
1
3
  import classNames from 'classnames';
2
- import { cloneElement, FC, useId, ReactNode } from 'react';
4
+ import { cloneElement, FC, ReactNode } from 'react';
3
5
 
4
6
  import Body from '../../body';
5
7
  import Chevron from '../../chevron';
@@ -73,7 +75,7 @@ const AccordionItem: FC<AccordionItemProps> = ({
73
75
  icon,
74
76
  theme = 'light',
75
77
  }) => {
76
- const iconElement = icon ? cloneElement(icon as React.ReactElement, { size: 24 }) : null;
78
+ const iconElement = icon ? cloneElement(icon as React.ReactElement<any>, { size: 24 }) : null;
77
79
  const fallbackId = useId();
78
80
  const accordionId = id ?? fallbackId;
79
81
 
@@ -1,5 +1,7 @@
1
1
  import { Meta, StoryObj } from '@storybook/react';
2
+ import { ComponentProps } from 'react';
2
3
 
4
+ import Avatar from '../avatar/Avatar';
3
5
  import { ProfileType, Sentiment } from '../common';
4
6
 
5
7
  import AvatarWrapper from './AvatarWrapper';
@@ -16,7 +18,7 @@ export const All: Story = {
16
18
  avatarProps: { outlined: true },
17
19
  },
18
20
  render: (args) => {
19
- const { avatarProps } = args;
21
+ const avatarProps = args.avatarProps as ComponentProps<typeof Avatar>;
20
22
  const badgeUrl = 'https://wise.com/public-resources/assets/brand/fast_flag_badge_personal.svg';
21
23
 
22
24
  return (
@@ -98,7 +98,7 @@ const Button = forwardRef<ButtonReferenceType, Props>(
98
98
  className,
99
99
  );
100
100
 
101
- function processIndicatorSize() {
101
+ function processIndicatorSize(): string {
102
102
  return ['sm', 'xs'].includes(size) ? 'xxs' : 'xs';
103
103
  }
104
104
 
@@ -0,0 +1,135 @@
1
+ .carousel-wrapper {
2
+ overflow: hidden;
3
+ }
4
+ .carousel {
5
+ display: flex;
6
+ align-items: center;
7
+ overflow-x: scroll;
8
+ overflow-y: hidden;
9
+ scroll-snap-type: x mandatory;
10
+ scroll-behavior: smooth;
11
+ gap: 16px;
12
+ gap: var(--size-16);
13
+ padding: 8px;
14
+ padding: var(--size-8);
15
+ margin: 8px;
16
+ margin: var(--size-8);
17
+ }
18
+ @media (max-width: 767px) {
19
+ .carousel {
20
+ gap: 8px;
21
+ gap: var(--size-8);
22
+ }
23
+ }
24
+ .carousel__header {
25
+ display: flex;
26
+ align-items: center;
27
+ overflow: hidden;
28
+ min-height: 32px;
29
+ min-height: var(--size-32);
30
+ padding-bottom: 16px;
31
+ padding-bottom: var(--size-16);
32
+ }
33
+ .carousel__card,
34
+ .carousel__card:hover,
35
+ .carousel__card:focus,
36
+ .carousel__card:focus-within {
37
+ -webkit-text-decoration: none;
38
+ text-decoration: none;
39
+ transition: none !important;
40
+ box-shadow: none !important;
41
+ }
42
+ .carousel__card {
43
+ display: block;
44
+ position: relative;
45
+ text-align: left;
46
+ border: none;
47
+ overflow: hidden;
48
+ background: rgba(134,167,189,0.10196);
49
+ background: var(--color-background-neutral);
50
+ border-radius: 32px;
51
+ border-radius: var(--size-32);
52
+ scroll-snap-align: center;
53
+ -webkit-scroll-snap-align: center;
54
+ transition: all 0.4s !important;
55
+ }
56
+ @media (min-width: 1200px) {
57
+ .carousel__card {
58
+ min-width: 280px;
59
+ width: 280px;
60
+ height: 280px;
61
+ }
62
+ }
63
+ @media (max-width: 1199px) {
64
+ .carousel__card {
65
+ min-width: 242px;
66
+ width: 242px;
67
+ height: 242px;
68
+ }
69
+ }
70
+ @media (max-width: 767px) {
71
+ .carousel__card {
72
+ min-width: 336px;
73
+ width: 336px;
74
+ height: 336px;
75
+ scroll-snap-stop: always;
76
+ }
77
+ }
78
+ .carousel__card:focus,
79
+ .carousel__card:has(:focus-visible) {
80
+ outline: var(--ring-outline-color) solid var(--ring-outline-width) !important;
81
+ outline-offset: var(--ring-outline-offset) !important;
82
+ }
83
+ .carousel__card:hover {
84
+ background-color: var(--color-background-neutral-hover);
85
+ }
86
+ .carousel__card:focus {
87
+ background-color: var(--color-background-neutral-hover);
88
+ }
89
+ .carousel__card-content {
90
+ height: 100%;
91
+ font-weight: normal;
92
+ padding: 24px;
93
+ padding: var(--size-24);
94
+ }
95
+ .carousel__scroll-button {
96
+ width: 32px;
97
+ width: var(--size-32);
98
+ height: 32px;
99
+ height: var(--size-32);
100
+ align-items: center;
101
+ justify-content: center;
102
+ }
103
+ .carousel__indicators {
104
+ display: flex;
105
+ justify-content: center;
106
+ padding-top: 8px;
107
+ padding-top: var(--size-8);
108
+ gap: 8px;
109
+ gap: var(--size-8);
110
+ }
111
+ .carousel__indicator {
112
+ width: 12px;
113
+ width: var(--size-12);
114
+ height: 12px;
115
+ height: var(--size-12);
116
+ border-radius: 8px;
117
+ border-radius: var(--size-8);
118
+ background: #c9cbce;
119
+ background: var(--color-interactive-secondary);
120
+ border: none;
121
+ -webkit-appearance: none;
122
+ -moz-appearance: none;
123
+ appearance: none;
124
+ transition: all 0.1s;
125
+ }
126
+ .carousel__indicator:hover {
127
+ width: 16px;
128
+ width: var(--size-16);
129
+ }
130
+ .carousel__indicator--selected,
131
+ .carousel__indicator--selected:hover {
132
+ background: var(--color-interactive-primary);
133
+ width: 24px;
134
+ width: var(--size-24);
135
+ }