@transferwise/components 46.29.1 → 46.29.2

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 (83) hide show
  1. package/build/index.js +4722 -4672
  2. package/build/index.js.map +1 -1
  3. package/build/index.mjs +3484 -3434
  4. package/build/index.mjs.map +1 -1
  5. package/build/mocks.js.map +1 -1
  6. package/build/mocks.mjs.map +1 -1
  7. package/build/types/common/DOMOperations/DOMOperations.d.ts +10 -2
  8. package/build/types/common/DOMOperations/DOMOperations.d.ts.map +1 -1
  9. package/build/types/common/DOMOperations/index.d.ts +1 -3
  10. package/build/types/common/DOMOperations/index.d.ts.map +1 -1
  11. package/build/types/common/bottomSheet/BottomSheet.d.ts +2 -2
  12. package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
  13. package/build/types/common/bottomSheet/index.d.ts +2 -1
  14. package/build/types/common/bottomSheet/index.d.ts.map +1 -1
  15. package/build/types/common/closeButton/CloseButton.messages.d.ts +7 -7
  16. package/build/types/common/closeButton/CloseButton.messages.d.ts.map +1 -1
  17. package/build/types/common/closeButton/index.d.ts +0 -1
  18. package/build/types/common/closeButton/index.d.ts.map +1 -1
  19. package/build/types/common/deviceDetection/deviceDetection.d.ts +1 -1
  20. package/build/types/common/deviceDetection/deviceDetection.d.ts.map +1 -1
  21. package/build/types/common/deviceDetection/index.d.ts +1 -1
  22. package/build/types/common/deviceDetection/index.d.ts.map +1 -1
  23. package/build/types/common/domHelpers/documentIosClick.d.ts +7 -2
  24. package/build/types/common/domHelpers/documentIosClick.d.ts.map +1 -1
  25. package/build/types/common/domHelpers/index.d.ts +1 -6
  26. package/build/types/common/domHelpers/index.d.ts.map +1 -1
  27. package/build/types/common/flowHeader/index.d.ts +2 -0
  28. package/build/types/common/flowHeader/index.d.ts.map +1 -0
  29. package/build/types/common/focusBoundary/index.d.ts +1 -1
  30. package/build/types/common/focusBoundary/index.d.ts.map +1 -1
  31. package/build/types/common/historyNavigator/historyNavigator.d.ts +8 -8
  32. package/build/types/common/historyNavigator/historyNavigator.d.ts.map +1 -1
  33. package/build/types/common/historyNavigator/index.d.ts +1 -1
  34. package/build/types/common/historyNavigator/index.d.ts.map +1 -1
  35. package/build/types/common/panel/Panel.d.ts +1 -1
  36. package/build/types/common/panel/Panel.d.ts.map +1 -1
  37. package/build/types/common/panel/index.d.ts +1 -1
  38. package/build/types/common/panel/index.d.ts.map +1 -1
  39. package/build/types/dimmer/Dimmer.d.ts +1 -1
  40. package/build/types/dimmer/Dimmer.d.ts.map +1 -1
  41. package/build/types/dimmer/index.d.ts +2 -1
  42. package/build/types/dimmer/index.d.ts.map +1 -1
  43. package/build/types/flowNavigation/FlowNavigation.d.ts.map +1 -1
  44. package/build/types/index.d.ts +42 -41
  45. package/build/types/index.d.ts.map +1 -1
  46. package/package.json +56 -57
  47. package/src/common/DOMOperations/index.ts +1 -0
  48. package/src/common/bottomSheet/BottomSheet.tsx +6 -3
  49. package/src/common/bottomSheet/index.ts +2 -0
  50. package/src/common/closeButton/{CloseButton.spec.js → CloseButton.spec.tsx} +1 -0
  51. package/src/common/closeButton/index.ts +0 -1
  52. package/src/common/deviceDetection/{deviceDetection.spec.js → deviceDetection.spec.ts} +1 -1
  53. package/src/common/deviceDetection/deviceDetection.ts +7 -0
  54. package/src/common/domHelpers/{documentIosClick.spec.js → documentIosClick.spec.ts} +7 -13
  55. package/src/common/domHelpers/{documentIosClick.js → documentIosClick.ts} +23 -0
  56. package/src/common/domHelpers/index.ts +4 -23
  57. package/src/common/flowHeader/{FlowHeader.spec.js → FlowHeader.spec.tsx} +2 -1
  58. package/src/common/flowHeader/index.ts +1 -0
  59. package/src/common/historyNavigator/{historyNavigator.js → historyNavigator.ts} +9 -5
  60. package/src/common/panel/{Panel.spec.js → Panel.spec.tsx} +14 -9
  61. package/src/common/panel/Panel.tsx +3 -3
  62. package/src/common/responsivePanel/ResponsivePanel.tsx +1 -1
  63. package/src/dimmer/Dimmer.tsx +1 -1
  64. package/src/dimmer/index.ts +2 -0
  65. package/src/flowNavigation/FlowNavigation.tsx +1 -2
  66. package/src/index.ts +68 -66
  67. package/src/overlayHeader/OverlayHeader.js +1 -1
  68. package/src/withDisplayFormat/WithDisplayFormat.tsx +2 -2
  69. package/src/common/DOMOperations/index.js +0 -3
  70. package/src/common/bottomSheet/index.js +0 -1
  71. package/src/common/deviceDetection/deviceDetection.js +0 -7
  72. package/src/dimmer/index.js +0 -1
  73. /package/src/common/DOMOperations/{DOMOperations.spec.js → DOMOperations.spec.tsx} +0 -0
  74. /package/src/common/DOMOperations/{DOMOperations.js → DOMOperations.ts} +0 -0
  75. /package/src/common/closeButton/{CloseButton.messages.js → CloseButton.messages.ts} +0 -0
  76. /package/src/common/closeButton/__snapshots__/{CloseButton.spec.js.snap → CloseButton.spec.tsx.snap} +0 -0
  77. /package/src/common/deviceDetection/{index.js → index.ts} +0 -0
  78. /package/src/common/flowHeader/__snapshots__/{FlowHeader.spec.js.snap → FlowHeader.spec.tsx.snap} +0 -0
  79. /package/src/common/focusBoundary/{index.js → index.ts} +0 -0
  80. /package/src/common/historyNavigator/{historyNavigator.spec.js → historyNavigator.spec.ts} +0 -0
  81. /package/src/common/historyNavigator/{index.js → index.ts} +0 -0
  82. /package/src/common/panel/__snapshots__/{Panel.spec.js.snap → Panel.spec.tsx.snap} +0 -0
  83. /package/src/common/panel/{index.js → index.ts} +0 -0
package/src/index.ts CHANGED
@@ -1,23 +1,30 @@
1
1
  /**
2
2
  * Types
3
3
  */
4
- export type { AccordionProps, AccordionItem } from './accordion';
5
- export type { AvatarProps } from './avatar';
4
+ export type { AccordionItem, AccordionProps } from './accordion';
6
5
  export type { ActionOptionProps } from './actionOption';
7
- export type { AlertProps, AlertAction, AlertArrowPosition, AlertType } from './alert';
6
+ export type { AlertAction, AlertProps, AlertType } from './alert';
7
+ export type { AvatarProps } from './avatar';
8
8
  export type { BadgeProps } from './badge';
9
9
  export type { CircularButtonProps } from './circularButton';
10
+ export type {
11
+ BodyTypes,
12
+ DisplayTypes,
13
+ LayoutDirection,
14
+ LinkTypes,
15
+ TitleTypes,
16
+ TypographyTypes,
17
+ } from './common';
18
+ export type { BottomSheetProps } from './common/bottomSheet';
19
+ export type { DateInputProps } from './dateInput';
20
+ export type { DateLookupProps } from './dateLookup';
10
21
  export type { DecisionProps } from './decision/Decision';
22
+ export type { DimmerProps } from './dimmer';
11
23
  export type { EmphasisProps } from './emphasis';
12
24
  export type { InfoProps } from './info';
13
- export type { SummaryProps } from './summary';
14
- export type { InputProps } from './inputs/Input';
15
- export type { DateInputProps } from './dateInput';
16
- export type { DateLookupProps } from './dateLookup';
17
25
  export type { InputWithDisplayFormatProps } from './inputWithDisplayFormat';
26
+ export type { InputProps } from './inputs/Input';
18
27
  export type { InputGroupProps } from './inputs/InputGroup';
19
- export type { LoaderProps } from './loader';
20
- export type { NavigationOptionListProps } from './navigationOptionsList';
21
28
  export type { SearchInputProps } from './inputs/SearchInput';
22
29
  export type {
23
30
  SelectInputGroupItem,
@@ -29,50 +36,43 @@ export type {
29
36
  SelectInputTriggerButtonProps,
30
37
  } from './inputs/SelectInput';
31
38
  export type { TextAreaProps } from './inputs/TextArea';
39
+ export type { InstructionsListProps } from './instructionsList';
40
+ export type { LoaderProps } from './loader';
41
+ export type { MarkdownProps } from './markdown';
42
+ export type { ModalProps } from './modal';
43
+ export type { MoneyProps } from './money';
44
+ export type {
45
+ CurrencyHeaderItem,
46
+ CurrencyItem,
47
+ CurrencyOptionItem,
48
+ MoneyInputProps,
49
+ } from './moneyInput';
50
+ export type { NavigationOptionListProps } from './navigationOptionsList';
32
51
  export type { PhoneNumberInputProps } from './phoneNumberInput/PhoneNumberInput';
33
52
  export type { PopoverProps } from './popover';
34
53
  export type { ProgressProps } from './progress';
35
54
  export type { ProgressBarProps } from './progressBar';
36
- export type { ProviderProps, DirectionProviderProps, LanguageProviderProps } from './provider';
55
+ export type { DirectionProviderProps, LanguageProviderProps, ProviderProps } from './provider';
37
56
  export type { RadioProps } from './radio';
38
57
  export type { RadioGroupProps, RadioGroupRadio } from './radioGroup';
39
58
  export type { RadioOptionProps } from './radioOption';
59
+ export type { SegmentedControlProps } from './segmentedControl';
60
+ export type { SlidingPanelProps } from './slidingPanel';
40
61
  export type { SnackbarProps } from './snackbar/Snackbar';
41
62
  export type { SnackbarContextType } from './snackbar/SnackbarContext';
42
63
  export type { StatusIconProps } from './statusIcon';
43
64
  export type { StickyProps } from './sticky';
65
+ export type { SummaryProps } from './summary';
44
66
  export type { SwitchProps } from './switch';
45
67
  export type { SwitchOptionProps } from './switchOption';
46
68
  export type { TextareaWithDisplayFormatProps } from './textareaWithDisplayFormat';
47
69
  export type { TooltipProps } from './tooltip';
48
- export type { UploadedFile, UploadError, UploadResponse } from './uploadInput/types';
49
- export type { MarkdownProps } from './markdown';
50
- export type { ModalProps } from './modal';
51
- export type { MoneyProps } from './money';
52
- export type {
53
- CurrencyHeaderItem,
54
- CurrencyItem,
55
- CurrencyOptionItem,
56
- MoneyInputProps,
57
- } from './moneyInput';
58
- export type { SlidingPanelProps } from './slidingPanel';
59
- export type {
60
- LayoutDirection,
61
- TypographyTypes,
62
- TitleTypes,
63
- BodyTypes,
64
- LinkTypes,
65
- DisplayTypes,
66
- } from './common';
67
- export type { SegmentedControlProps } from './segmentedControl';
68
- export type { TypeaheadProps, TypeaheadOption } from './typeahead';
69
- export type { InstructionsListProps } from './instructionsList';
70
+ export type { TypeaheadOption, TypeaheadProps } from './typeahead';
71
+ export type { UploadError, UploadResponse, UploadedFile } from './uploadInput/types';
70
72
 
71
73
  /**
72
74
  * Components
73
75
  */
74
- export { default as Title } from './title';
75
- export { default as Body } from './body';
76
76
  export { default as Accordion } from './accordion';
77
77
  export { default as ActionButton } from './actionButton';
78
78
  export { default as ActionOption } from './actionOption';
@@ -80,16 +80,19 @@ export { default as Alert } from './alert';
80
80
  export { default as Avatar } from './avatar';
81
81
  export { default as AvatarWrapper } from './avatarWrapper';
82
82
  export { default as Badge } from './badge';
83
- export { default as BottomSheet } from './common/bottomSheet';
83
+ export { default as Body } from './body';
84
84
  export { default as Button } from './button';
85
85
  export { default as Card } from './card';
86
- export { default as BaseCard } from './common/card';
87
86
  export { default as Checkbox } from './checkbox';
88
87
  export { default as CheckboxButton } from './checkboxButton';
89
88
  export { default as CheckboxOption } from './checkboxOption';
90
89
  export { default as Chevron } from './chevron';
91
- export { default as Chips, Chip } from './chips';
90
+ export { Chip, default as Chips } from './chips';
92
91
  export { default as CircularButton } from './circularButton';
92
+ export { default as Option } from './common/Option';
93
+ export { default as BottomSheet } from './common/bottomSheet';
94
+ export { default as BaseCard } from './common/card';
95
+ export { default as CriticalCommsBanner } from './criticalBanner';
93
96
  export { default as DateInput } from './dateInput';
94
97
  export { default as DateLookup } from './dateLookup';
95
98
  export { default as Decision } from './decision';
@@ -104,6 +107,7 @@ export { default as Header } from './header';
104
107
  export { default as Image } from './image';
105
108
  export { default as Info } from './info';
106
109
  export { default as InlineAlert } from './inlineAlert';
110
+ export { default as InputWithDisplayFormat } from './inputWithDisplayFormat';
107
111
  export { Input } from './inputs/Input';
108
112
  export { InputGroup } from './inputs/InputGroup';
109
113
  export { SearchInput } from './inputs/SearchInput';
@@ -113,9 +117,9 @@ export {
113
117
  SelectInputTriggerButton,
114
118
  } from './inputs/SelectInput';
115
119
  export { TextArea } from './inputs/TextArea';
116
- export { default as InputWithDisplayFormat } from './inputWithDisplayFormat';
117
120
  export { default as InstructionsList } from './instructionsList';
118
121
  export { default as Link } from './link';
122
+ export { default as ListItem } from './listItem';
119
123
  export { default as Loader } from './loader';
120
124
  export { default as Logo } from './logo';
121
125
  export { default as Markdown } from './markdown';
@@ -125,24 +129,23 @@ export { default as MoneyInput } from './moneyInput';
125
129
  export { default as NavigationOption } from './navigationOption';
126
130
  export { default as NavigationOptionsList } from './navigationOptionsList';
127
131
  export { default as Nudge } from './nudge';
128
- export { default as Option } from './common/Option';
129
132
  export { default as OverlayHeader } from './overlayHeader';
130
133
  export { default as PhoneNumberInput } from './phoneNumberInput';
131
134
  export { default as Popover } from './popover';
132
135
  export { default as ProcessIndicator } from './processIndicator';
133
- export { default as ProgressBar } from './progressBar';
134
136
  export { default as Progress } from './progress';
135
- export { default as PromoCard } from './promoCard';
136
- export { default as PromoCardGroup } from './promoCard';
137
- export { default as Provider, DirectionProvider, LanguageProvider } from './provider';
137
+ export { default as ProgressBar } from './progressBar';
138
+ export { PromoCardGroup, default as PromoCard } from './promoCard';
139
+ export { DirectionProvider, LanguageProvider, default as Provider } from './provider';
138
140
  export { default as Radio } from './radio';
139
141
  export { default as RadioGroup } from './radioGroup';
140
142
  export { default as RadioOption } from './radioOption';
141
143
  export { default as Section } from './section';
142
- export { default as Select } from './select';
143
144
  export { default as SegmentedControl } from './segmentedControl';
145
+ export { default as Select } from './select';
144
146
  export { default as SlidingPanel } from './slidingPanel';
145
147
  export { default as SnackbarPortal } from './snackbar/Snackbar';
148
+ export { SnackbarConsumer, SnackbarContext } from './snackbar/SnackbarContext';
146
149
  export { default as SnackbarProvider } from './snackbar/SnackbarProvider';
147
150
  export { default as StatusIcon } from './statusIcon/StatusIcon';
148
151
  export { default as Stepper } from './stepper/Stepper';
@@ -152,66 +155,65 @@ export { default as Switch } from './switch';
152
155
  export { default as SwitchOption } from './switchOption';
153
156
  export { default as Tabs } from './tabs';
154
157
  export { default as TextareaWithDisplayFormat } from './textareaWithDisplayFormat';
158
+ export { default as Title } from './title';
155
159
  export { default as Tooltip } from './tooltip';
156
160
  export { default as Typeahead } from './typeahead';
157
161
  export { default as Upload } from './upload';
158
162
  export { default as UploadInput } from './uploadInput';
159
- export { SnackbarConsumer, SnackbarContext } from './snackbar/SnackbarContext';
160
- export { default as CriticalCommsBanner } from './criticalBanner';
161
- export { default as ListItem } from './listItem';
162
163
 
163
164
  /**
164
165
  * Hooks
165
166
  */
166
- export { default as useSnackbar } from './snackbar/useSnackbar';
167
167
  export { useDirection, useLayout } from './common/hooks';
168
168
  export { useScreenSize } from './common/hooks/useScreenSize';
169
+ export { default as useSnackbar } from './snackbar/useSnackbar';
169
170
 
170
171
  /**
171
172
  * Enums
172
173
  */
174
+ export { AlertArrowPosition } from './alert/Alert';
175
+ export { AvatarType } from './avatar';
173
176
  export {
174
- Direction,
175
- Size,
176
- Width,
177
- Sentiment,
178
- Priority,
177
+ Breakpoint,
179
178
  ControlType,
180
- Type,
181
- Theme,
182
179
  DateMode,
180
+ Direction,
181
+ FileType,
182
+ Layout,
183
+ MarkdownNodeType,
183
184
  MonthFormat,
184
185
  Position,
185
- Scroll,
186
+ Priority,
186
187
  ProfileType,
187
- Breakpoint,
188
- Layout,
188
+ Scroll,
189
+ Sentiment,
190
+ Size,
189
191
  Status,
190
- MarkdownNodeType,
192
+ Theme,
193
+ Type,
191
194
  Typography,
192
195
  Variant,
196
+ Width,
193
197
  } from './common';
194
- export { AvatarType } from './avatar';
195
- export { InfoPresentation } from './info';
196
- export { UploadStep } from './upload';
197
198
  export { DecisionPresentation, DecisionType } from './decision';
199
+ export { InfoPresentation } from './info';
198
200
  export { LogoType } from './logo';
199
- export { FileType } from './common';
201
+ export { UploadStep } from './upload';
200
202
 
201
203
  /**
202
204
  * Utils
203
205
  */
204
206
  export {
205
- adjustLocale,
206
207
  DEFAULT_LANG,
207
208
  DEFAULT_LOCALE,
209
+ RTL_LANGUAGES,
210
+ SUPPORTED_LANGUAGES,
211
+ adjustLocale,
208
212
  getCountryFromLocale,
209
213
  getDirectionFromLocale,
210
214
  getLangFromLocale,
211
215
  isBrowser,
212
216
  isServerSide,
213
- RTL_LANGUAGES,
214
- SUPPORTED_LANGUAGES,
215
217
  } from './common';
216
218
 
217
219
  /**
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
 
4
4
  import { Size } from '../common';
5
5
  import { CloseButton } from '../common/closeButton';
6
- import FlowHeader from '../common/flowHeader/FlowHeader';
6
+ import FlowHeader from '../common/flowHeader';
7
7
  import Logo from '../logo';
8
8
 
9
9
  const OverlayHeader = ({ avatar, onClose, logo }) => {
@@ -169,10 +169,10 @@ class WithDisplayFormat<T extends TextElementProps> extends Component<
169
169
  let newFormattedValue = '';
170
170
 
171
171
  if (this.detectUndoRedo(event) === 'Undo') {
172
- newFormattedValue = formatWithPattern(historyNavigator.undo(), displayPattern);
172
+ newFormattedValue = formatWithPattern(historyNavigator.undo().toString(), displayPattern);
173
173
  this.setState({ value: newFormattedValue, triggerType: 'Undo' });
174
174
  } else if (this.detectUndoRedo(event) === 'Redo') {
175
- newFormattedValue = formatWithPattern(historyNavigator.redo(), displayPattern);
175
+ newFormattedValue = formatWithPattern(historyNavigator.redo().toString(), displayPattern);
176
176
  this.setState({ value: newFormattedValue, triggerType: 'Redo' });
177
177
  } else {
178
178
  this.setState({
@@ -1,3 +0,0 @@
1
- import { addNoScrollClass, removeNoScrollClass } from './DOMOperations';
2
-
3
- export { addNoScrollClass, removeNoScrollClass };
@@ -1 +0,0 @@
1
- export { default } from './BottomSheet';
@@ -1,7 +0,0 @@
1
- export function isIosDevice() {
2
- const sampleTouchDevices = ['iphone', 'ipad', 'ipod'];
3
- const matchString = sampleTouchDevices.map((device) => `(${device})`).join('|');
4
- const regex = new RegExp(matchString, 'gi');
5
-
6
- return typeof navigator !== 'undefined' && !!navigator.userAgent.match(regex);
7
- }
@@ -1 +0,0 @@
1
- export { default } from './Dimmer';
File without changes
File without changes