@transferwise/components 0.0.0-experimental-8b6ee2a → 0.0.0-experimental-335b83d

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 (71) hide show
  1. package/build/index.esm.js +669 -13
  2. package/build/index.esm.js.map +1 -1
  3. package/build/index.js +672 -13
  4. package/build/index.js.map +1 -1
  5. package/build/main.css +1 -1
  6. package/build/styles/inputs/Input.css +1 -1
  7. package/build/styles/inputs/InputGroup.css +1 -1
  8. package/build/styles/inputs/SelectInput.css +1 -0
  9. package/build/styles/inputs/TextArea.css +1 -1
  10. package/build/styles/main.css +1 -1
  11. package/build/types/common/hooks/useMedia.d.ts +2 -0
  12. package/build/types/common/hooks/useMedia.d.ts.map +1 -0
  13. package/build/types/common/hooks/useScreenSize.d.ts +3 -0
  14. package/build/types/common/hooks/useScreenSize.d.ts.map +1 -0
  15. package/build/types/common/preventScroll/PreventScroll.d.ts +2 -0
  16. package/build/types/common/preventScroll/PreventScroll.d.ts.map +1 -0
  17. package/build/types/dateLookup/dateTrigger/DateTrigger.messages.d.ts +7 -7
  18. package/build/types/dateLookup/dateTrigger/DateTrigger.messages.d.ts.map +1 -1
  19. package/build/types/index.d.ts +4 -0
  20. package/build/types/index.d.ts.map +1 -1
  21. package/build/types/inputs/Input.d.ts +1 -0
  22. package/build/types/inputs/Input.d.ts.map +1 -1
  23. package/build/types/inputs/SearchInput.d.ts +10 -0
  24. package/build/types/inputs/SearchInput.d.ts.map +1 -0
  25. package/build/types/inputs/SelectInput.d.ts +41 -0
  26. package/build/types/inputs/SelectInput.d.ts.map +1 -0
  27. package/build/types/inputs/_BottomSheet.d.ts +17 -0
  28. package/build/types/inputs/_BottomSheet.d.ts.map +1 -0
  29. package/build/types/inputs/_ButtonInput.d.ts +6 -0
  30. package/build/types/inputs/_ButtonInput.d.ts.map +1 -0
  31. package/build/types/inputs/_Popover.d.ts +18 -0
  32. package/build/types/inputs/_Popover.d.ts.map +1 -0
  33. package/build/types/inputs/_common.d.ts.map +1 -1
  34. package/build/types/utilities/wrapInFragment.d.ts +3 -0
  35. package/build/types/utilities/wrapInFragment.d.ts.map +1 -0
  36. package/package.json +27 -21
  37. package/src/avatar/Avatar.story.tsx +14 -16
  38. package/src/common/hooks/useMedia.ts +15 -0
  39. package/src/common/hooks/useScreenSize.ts +7 -0
  40. package/src/common/preventScroll/PreventScroll.tsx +6 -0
  41. package/src/index.ts +8 -0
  42. package/src/inputs/Input.css +1 -1
  43. package/src/inputs/Input.less +14 -0
  44. package/src/inputs/Input.tsx +6 -2
  45. package/src/inputs/InputGroup.css +1 -1
  46. package/src/inputs/InputGroup.less +6 -1
  47. package/src/inputs/SearchInput.story.tsx +40 -0
  48. package/src/inputs/SearchInput.tsx +35 -0
  49. package/src/inputs/SelectInput.css +1 -0
  50. package/src/inputs/SelectInput.less +183 -0
  51. package/src/inputs/SelectInput.story.tsx +259 -0
  52. package/src/inputs/SelectInput.tsx +565 -0
  53. package/src/inputs/TextArea.css +1 -1
  54. package/src/inputs/TextArea.less +5 -0
  55. package/src/inputs/_BottomSheet.less +107 -0
  56. package/src/inputs/_BottomSheet.tsx +128 -0
  57. package/src/inputs/_ButtonInput.less +7 -0
  58. package/src/inputs/_ButtonInput.tsx +27 -0
  59. package/src/inputs/_Popover.less +38 -0
  60. package/src/inputs/_Popover.tsx +118 -0
  61. package/src/inputs/_common.less +0 -4
  62. package/src/inputs/_common.ts +0 -1
  63. package/src/main.css +1 -1
  64. package/src/main.less +4 -0
  65. package/src/navigationOption/NavigationOption.story.js +5 -3
  66. package/src/radio/Radio.story.js +2 -3
  67. package/src/radioGroup/RadioGroup.story.js +1 -2
  68. package/src/select/searchBox/__snapshots__/SearchBox.spec.js.snap +1 -1
  69. package/src/ssr.spec.js +7 -0
  70. package/src/utilities/wrapInFragment.tsx +3 -0
  71. /package/src/dateLookup/dateTrigger/{DateTrigger.messages.js → DateTrigger.messages.ts} +0 -0
package/src/main.less CHANGED
@@ -30,8 +30,12 @@
30
30
  @import "./header/Header.less";
31
31
  @import "./image/Image.less";
32
32
  @import "./info/Info.less";
33
+ @import "./inputs/_BottomSheet.less";
34
+ @import "./inputs/_ButtonInput.less";
35
+ @import "./inputs/_Popover.less";
33
36
  @import "./inputs/Input.less";
34
37
  @import "./inputs/InputGroup.less";
38
+ @import "./inputs/SelectInput.less";
35
39
  @import "./inputs/TextArea.less";
36
40
  @import "./instructionsList/InstructionsList.less";
37
41
  @import "./link/Link.less";
@@ -7,7 +7,7 @@ import {
7
7
  Profile,
8
8
  UpwardGraph as UpwardGraphIcon,
9
9
  } from '@transferwise/icons';
10
- import { Illustration, Assets, Flag } from '@wise/art';
10
+ import { Illustration, Assets } from '@wise/art';
11
11
 
12
12
  import { Badge, Nudge, Avatar, Header } from '..';
13
13
 
@@ -203,7 +203,7 @@ export const BalanceContent = () => (
203
203
  showMediaCircle={false}
204
204
  media={
205
205
  <Avatar type="icon">
206
- <Flag code="GBP" />
206
+ <img src="https://wise.com/web-art/assets/flags/gbp.svg" alt="" />
207
207
  </Avatar>
208
208
  }
209
209
  />
@@ -229,7 +229,9 @@ export const ExistingContactContent = () => (
229
229
  content="EUR account ending in 1111"
230
230
  showMediaCircle={false}
231
231
  media={
232
- <Badge badge={<Flag code="EUR" />}>
232
+ <Badge
233
+ badge={<img src="https://wise.com/public-resources/assets/flags/square/eur.svg" alt="" />}
234
+ >
233
235
  <Avatar type="initials" size="md">
234
236
  <span aria-hidden>WS</span>
235
237
  </Avatar>
@@ -1,6 +1,5 @@
1
1
  import { boolean, text } from '@storybook/addon-knobs';
2
2
  import { Check } from '@transferwise/icons';
3
- import { Flag } from '@wise/art';
4
3
  import { useState } from 'react';
5
4
 
6
5
  import Avatar, { AvatarType } from '../avatar';
@@ -34,7 +33,7 @@ export const Basic = () => {
34
33
  avatar={
35
34
  showAvatar ? (
36
35
  <Avatar type={AvatarType.THUMBNAIL}>
37
- <Flag code="IMP" />
36
+ <img src="https://wise.com/web-art/assets/flags/imp.svg" alt="" />
38
37
  </Avatar>
39
38
  ) : null
40
39
  }
@@ -52,7 +51,7 @@ export const Basic = () => {
52
51
  avatar={
53
52
  showAvatar ? (
54
53
  <Avatar type={AvatarType.THUMBNAIL}>
55
- <Flag code="KES" />
54
+ <img src="https://wise.com/web-art/assets/flags/kes.svg" alt="" />
56
55
  </Avatar>
57
56
  ) : null
58
57
  }
@@ -1,6 +1,5 @@
1
1
  import { action } from '@storybook/addon-actions';
2
2
  import { boolean } from '@storybook/addon-knobs';
3
- import { Flag } from '@wise/art';
4
3
 
5
4
  import Avatar, { AvatarType } from '../avatar';
6
5
 
@@ -17,7 +16,7 @@ export const Basic = () => {
17
16
 
18
17
  const avatar = showAvatars ? (
19
18
  <Avatar type={AvatarType.THUMBNAIL}>
20
- <Flag code="NZD" />
19
+ <img src="https://wise.com/web-art/assets/flags/nzd.svg" alt="" />
21
20
  </Avatar>
22
21
  ) : undefined;
23
22
 
@@ -34,7 +34,7 @@ exports[`SearchBox renders 1`] = `
34
34
  </span>
35
35
  </span>
36
36
  <input
37
- class="np-select-filter form-control np-form-control np-form-control--size-auto np-text-body-large np-form-control--shape-rectangle"
37
+ class="np-select-filter form-control np-form-control np-form-control--size-auto np-text-body-large np-input np-input--shape-rectangle"
38
38
  placeholder="placeholder"
39
39
  spellcheck="false"
40
40
  value="value"
package/src/ssr.spec.js CHANGED
@@ -48,6 +48,10 @@ const excluded = new Set([
48
48
  'Typography',
49
49
 
50
50
  // types
51
+ 'SearchInputProps',
52
+ 'SelectInputItem',
53
+ 'SelectInputOptionContentProps',
54
+ 'SelectInputProps',
51
55
  'UploadedFile',
52
56
  'UploadError',
53
57
  'UploadResponse',
@@ -179,6 +183,9 @@ describe('Server side rendering', () => {
179
183
  Input: {
180
184
  children: undefined,
181
185
  },
186
+ SearchInput: {
187
+ children: undefined,
188
+ },
182
189
  TextArea: {
183
190
  children: undefined,
184
191
  },
@@ -0,0 +1,3 @@
1
+ export function wrapInFragment(value: unknown) {
2
+ return <>{value}</>;
3
+ }