@transferwise/components 46.100.1 → 46.100.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 (153) hide show
  1. package/build/avatarLayout/AvatarLayout.js +1 -1
  2. package/build/avatarLayout/AvatarLayout.js.map +1 -1
  3. package/build/avatarLayout/AvatarLayout.mjs +1 -1
  4. package/build/avatarLayout/AvatarLayout.mjs.map +1 -1
  5. package/build/dateLookup/DateLookup.js +3 -2
  6. package/build/dateLookup/DateLookup.js.map +1 -1
  7. package/build/dateLookup/DateLookup.mjs +3 -2
  8. package/build/dateLookup/DateLookup.mjs.map +1 -1
  9. package/build/main.css +4 -94
  10. package/build/styles/accordion/Accordion.css +27 -16
  11. package/build/styles/avatar/Avatar.css +95 -50
  12. package/build/styles/inputs/Input.css +37 -21
  13. package/build/styles/inputs/TextArea.css +35 -20
  14. package/build/styles/loader/Loader.css +4 -90
  15. package/build/styles/main.css +4 -94
  16. package/build/styles/popover/Popover.css +19 -12
  17. package/build/styles/select/Select.css +131 -68
  18. package/build/styles/switch/Switch.css +27 -16
  19. package/build/styles/tile/Tile.css +31 -18
  20. package/build/types/dateLookup/DateLookup.d.ts +2 -2
  21. package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
  22. package/build/types/test-utils/story-config.d.ts +2 -3
  23. package/build/types/test-utils/story-config.d.ts.map +1 -1
  24. package/package.json +20 -28
  25. package/src/accordion/Accordion.css +27 -16
  26. package/src/accordion/Accordion.story.tsx +1 -1
  27. package/src/actionButton/ActionButton.story.tsx +3 -2
  28. package/src/actionOption/ActionOption.story.tsx +2 -2
  29. package/src/alert/Alert.story.tsx +2 -2
  30. package/src/alert/Alert.tests.story.tsx +2 -2
  31. package/src/avatar/Avatar.css +95 -50
  32. package/src/avatar/Avatar.spec.tsx +1 -1
  33. package/src/avatar/Avatar.story.tsx +3 -2
  34. package/src/avatarLayout/AvatarLayout.story.tsx +1 -1
  35. package/src/avatarLayout/AvatarLayout.tsx +1 -1
  36. package/src/avatarView/AvatarView.story.tsx +1 -1
  37. package/src/avatarWrapper/AvatarWrapper.story.tsx +3 -2
  38. package/src/badge/Badge.story.tsx +49 -28
  39. package/src/button/Button.accessibility.docs.mdx +1 -1
  40. package/src/button/Button.story.tsx +2 -2
  41. package/src/button/Button.tests.story.tsx +2 -2
  42. package/src/button/LegacyButton.story.tsx +3 -2
  43. package/src/card/Card.story.tsx +2 -2
  44. package/src/carousel/Carousel.story.tsx +1 -1
  45. package/src/checkbox/Checkbox.story.tsx +2 -2
  46. package/src/checkboxButton/CheckboxButton.story.tsx +2 -2
  47. package/src/checkboxOption/CheckboxOption.story.tsx +35 -29
  48. package/src/chevron/Chevron.story.tsx +1 -1
  49. package/src/chips/Chips.story.tsx +1 -1
  50. package/src/circularButton/CircularButton.story.tsx +1 -1
  51. package/src/circularButton/CircularButton.tests.story.tsx +1 -1
  52. package/src/common/bottomSheet/BottomSheet.story.tsx +2 -2
  53. package/src/common/card/Card.story.tsx +1 -1
  54. package/src/common/circle/Circle.story.tsx +2 -2
  55. package/src/common/locale/index.spec.ts +28 -16
  56. package/src/common/responsivePanel/ResponsivePanel.spec.js +8 -29
  57. package/src/criticalBanner/CriticalCommsBanner.story.tsx +1 -1
  58. package/src/dateInput/DateInput.story.tsx +2 -2
  59. package/src/dateInput/DateInput.tests.story.tsx +2 -2
  60. package/src/dateLookup/DateLookup.spec.tsx +5 -5
  61. package/src/dateLookup/DateLookup.story.tsx +43 -71
  62. package/src/dateLookup/DateLookup.tests.story.tsx +3 -3
  63. package/src/dateLookup/DateLookup.tsx +4 -1
  64. package/src/decision/Decision.story.tsx +24 -49
  65. package/src/definitionList/DefinitionList.story.tsx +1 -1
  66. package/src/dimmer/Dimmer.story.tsx +2 -2
  67. package/src/divider/Divider.accessibility.docs.mdx +1 -1
  68. package/src/divider/Divider.story.tsx +1 -1
  69. package/src/drawer/Drawer.story.tsx +13 -7
  70. package/src/dropFade/DropFade.story.tsx +1 -1
  71. package/src/emphasis/Emphasis.spec.tsx +8 -8
  72. package/src/emphasis/Emphasis.story.tsx +1 -1
  73. package/src/field/Field.story.tsx +3 -3
  74. package/src/flowNavigation/FlowNavigation.story.tsx +305 -260
  75. package/src/iconButton/IconButton.story.tsx +2 -2
  76. package/src/image/Image.story.tsx +27 -54
  77. package/src/info/Info.story.tsx +2 -2
  78. package/src/inlineAlert/InlineAlert.story.tsx +1 -1
  79. package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.tsx +2 -2
  80. package/src/inputs/Input.css +37 -21
  81. package/src/inputs/InputGroup.story.tsx +1 -1
  82. package/src/inputs/SearchInput.story.tsx +1 -1
  83. package/src/inputs/SelectInput.docs.mdx +1 -1
  84. package/src/inputs/SelectInput.story.tsx +2 -2
  85. package/src/inputs/TextArea.css +35 -20
  86. package/src/instructionsList/InstructionsList.story.tsx +2 -2
  87. package/src/legacylistItem/LegacyListItem.story.tsx +1 -1
  88. package/src/loader/Loader.css +4 -90
  89. package/src/loader/Loader.story.tsx +1 -1
  90. package/src/logo/Logo.story.tsx +1 -1
  91. package/src/main.css +4 -94
  92. package/src/markdown/Markdown.story.tsx +1 -1
  93. package/src/modal/Modal.story.tsx +2 -2
  94. package/src/money/Money.story.tsx +1 -1
  95. package/src/moneyInput/MoneyInput.docs.mdx +1 -1
  96. package/src/moneyInput/MoneyInput.spec.tsx +8 -5
  97. package/src/moneyInput/MoneyInput.story.tsx +2 -2
  98. package/src/moneyInput/currencyFormatting.spec.ts +1 -1
  99. package/src/navigationOption/NavigationOption.story.tsx +265 -226
  100. package/src/nudge/Nudge.story.tsx +1 -1
  101. package/src/overlayHeader/OverlayHeader.story.tsx +32 -24
  102. package/src/phoneNumberInput/PhoneNumberInput.story.tsx +1 -1
  103. package/src/phoneNumberInput/utils/setDefaultPrefix/setDefaultPrefix.spec.ts +6 -3
  104. package/src/popover/Popover.css +19 -12
  105. package/src/popover/Popover.story.tsx +2 -2
  106. package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.story.tsx +2 -2
  107. package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.tests.story.tsx +2 -2
  108. package/src/primitives/PrimitiveButton/stories/PrimitiveButton.story.tsx +2 -2
  109. package/src/primitives/PrimitiveButton/stories/PrimitiveButton.tests.story.tsx +2 -2
  110. package/src/processIndicator/ProcessIndicator.story.tsx +1 -1
  111. package/src/progress/Progress.story.tsx +1 -1
  112. package/src/progressBar/ProgressBar.story.tsx +1 -1
  113. package/src/promoCard/PromoCard.story.tsx +1 -1
  114. package/src/promoCard/PromoCardGroup.story.tsx +1 -1
  115. package/src/provider/Provider.spec.tsx +2 -2
  116. package/src/provider/Provider.story.tsx +1 -1
  117. package/src/provider/direction/DirectionProvider.spec.tsx +1 -1
  118. package/src/provider/language/LanguageProvider.spec.tsx +1 -1
  119. package/src/provider/theme/ThemeProvider.story.tsx +1 -1
  120. package/src/radio/Radio.story.tsx +59 -42
  121. package/src/radioGroup/RadioGroup.story.tsx +2 -2
  122. package/src/radioOption/RadioOption.story.tsx +73 -38
  123. package/src/segmentedControl/SegmentedControl.story.tsx +1 -1
  124. package/src/select/Select.css +131 -68
  125. package/src/select/Select.story.tsx +385 -397
  126. package/src/slidingPanel/SlidingPanel.story.tsx +30 -13
  127. package/src/snackbar/Snackbar.story.tsx +50 -36
  128. package/src/snackbar/Snackbar.tests.story.tsx +3 -2
  129. package/src/statusIcon/StatusIcon.docs.mdx +1 -1
  130. package/src/statusIcon/StatusIcon.spec.tsx +8 -5
  131. package/src/statusIcon/StatusIcon.story.tsx +1 -1
  132. package/src/stepper/Stepper.story.tsx +2 -2
  133. package/src/stepper/Stepper.tests.story.tsx +2 -2
  134. package/src/sticky/Sticky.story.tsx +1 -1
  135. package/src/summary/Summary.story.tsx +18 -17
  136. package/src/switch/Switch.css +27 -16
  137. package/src/switch/Switch.story.tsx +2 -2
  138. package/src/switchOption/SwitchOption.story.tsx +1 -1
  139. package/src/table/Table.story.tsx +1 -1
  140. package/src/test-utils/story-config.ts +9 -6
  141. package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +2 -2
  142. package/src/tile/Tile.css +31 -18
  143. package/src/tile/Tile.story.tsx +43 -43
  144. package/src/tooltip/Tooltip.story.tsx +2 -2
  145. package/src/typeahead/Typeahead.story.tsx +2 -2
  146. package/src/upload/Upload.story.tsx +2 -2
  147. package/src/upload/Upload.tests.story.tsx +2 -2
  148. package/src/upload/utils/isTypeValid/isTypeValid.spec.ts +3 -1
  149. package/src/uploadInput/UploadInput.story.tsx +1 -1
  150. package/src/uploadInput/UploadInput.tests.story.tsx +3 -3
  151. package/src/withId/withId.docs.mdx +1 -1
  152. package/src/withId/withId.story.tsx +1 -1
  153. package/src/common/responsivePanel/__snapshots__/ResponsivePanel.spec.js.snap +0 -21
@@ -1,5 +1,5 @@
1
- import { Meta, StoryObj } from '@storybook/react';
2
- import { userEvent, within } from '@storybook/test';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { userEvent, within } from 'storybook/test';
3
3
 
4
4
  import Button from '../button';
5
5
  import { storyConfig } from '../test-utils';
@@ -1,6 +1,6 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { Search as SearchIcon } from '@transferwise/icons';
3
- import { userEvent, within, fn } from '@storybook/test';
3
+ import { userEvent, within, fn } from 'storybook/test';
4
4
 
5
5
  import Typeahead, { type TypeaheadOption } from './Typeahead';
6
6
  import { Size } from '../common';
@@ -1,5 +1,5 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { fn } from '@storybook/test';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { fn } from 'storybook/test';
3
3
 
4
4
  import Upload from '.';
5
5
  import { MAX_SIZE_DEFAULT } from './Upload';
@@ -1,5 +1,5 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { fn } from '@storybook/test';
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { fn } from 'storybook/test';
3
3
 
4
4
  import Upload from '.';
5
5
  import { MAX_SIZE_DEFAULT } from './Upload';
@@ -12,7 +12,9 @@ const data64Img = 'data:image/png;something';
12
12
 
13
13
  describe('isTypeValid', () => {
14
14
  describe('when type is provided', () => {
15
- it.each([pdfFile, pngFile])('returns true for wildcard rule %s', (file) => {
15
+ const files = [pdfFile, pngFile] as const;
16
+
17
+ it.each(files)('returns true for wildcard rule %s', (file: (typeof files)[number]) => {
16
18
  expect(isTypeValid(file, '*')).toBe(true);
17
19
  });
18
20
 
@@ -1,4 +1,4 @@
1
- import { StoryFn, Meta } from '@storybook/react';
1
+ import { StoryFn, Meta } from '@storybook/react-webpack5';
2
2
 
3
3
  import { Field } from '../field/Field';
4
4
 
@@ -1,10 +1,10 @@
1
- import { action } from '@storybook/addon-actions';
2
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { action } from 'storybook/actions';
2
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
3
3
 
4
4
  import { Status } from '../common';
5
5
  import UploadInput, { UploadInputProps } from './UploadInput';
6
6
  import { UploadedFile, UploadResponse } from './types';
7
- import { userEvent } from '@storybook/test';
7
+ import { userEvent } from 'storybook/test';
8
8
 
9
9
  const meta: Meta<typeof UploadInput> = {
10
10
  title: 'Forms/UploadInput/Tests',
@@ -1,4 +1,4 @@
1
- import { Meta, Canvas, Source } from '@storybook/blocks';
1
+ import { Meta, Canvas, Source } from '@storybook/addon-docs/blocks';
2
2
  import { WithoutId, WithCustomId, WithEmptyId } from './withId.story';
3
3
  import { withIdSource } from './story/source';
4
4
 
@@ -1,4 +1,4 @@
1
- import { Meta, StoryObj } from '@storybook/react';
1
+ import { Meta, StoryObj } from '@storybook/react-webpack5';
2
2
  import { Button, withId, type WithIdProps } from '..';
3
3
 
4
4
  type Story = StoryObj<typeof withId>;
@@ -1,21 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ResponsivePanel on desktop renders Panel 1`] = `
4
- <div>
5
- <div
6
- class="np-panel np-panel--open"
7
- >
8
- children
9
- </div>
10
- </div>
11
- `;
12
-
13
- exports[`ResponsivePanel on mobile renders bottomSheet 1`] = `
14
- <div>
15
- <div
16
- class="np-bottom-sheet"
17
- >
18
- children
19
- </div>
20
- </div>
21
- `;