@transferwise/components 0.0.0-experimental-99bbbb3 → 0.0.0-experimental-20085a3

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 (88) hide show
  1. package/build/i18n/id.json +0 -5
  2. package/build/i18n/id.json.js +0 -5
  3. package/build/i18n/id.json.js.map +1 -1
  4. package/build/i18n/id.json.mjs +0 -5
  5. package/build/i18n/id.json.mjs.map +1 -1
  6. package/build/types/Body/Body.d.ts +2 -2
  7. package/build/types/IconButton/IconButton.d.ts +1 -1
  8. package/build/types/ListItem/_stories/variants/helpers.d.ts.map +1 -1
  9. package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
  10. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  11. package/build/types/Title/Title.d.ts +2 -2
  12. package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
  13. package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/src/Accordion/_stories/Accordion.rtl.test.story.tsx +71 -0
  16. package/src/AvatarLayout/_stories/AvatarLayout.rtl.test.story.tsx +77 -0
  17. package/src/AvatarView/_stories/AvatarView.rtl.test.story.tsx +162 -0
  18. package/src/Button/LegacyButton/_stories/LegacyButton.rtl.test.story.tsx +32 -0
  19. package/src/Button/_stories/Button.rtl.test.story.tsx +87 -0
  20. package/src/Calendar/_stories/Calendar.rtl.test.story.tsx +52 -0
  21. package/src/Calendar/_stories/Calendar.test.story.tsx +28 -24
  22. package/src/Carousel/_stories/Carousel.rtl.test.story.tsx +61 -0
  23. package/src/Checkbox/_stories/Checkbox.rtl.test.story.tsx +31 -0
  24. package/src/CheckboxButton/_stories/CheckboxButton.rtl.test.story.tsx +27 -0
  25. package/src/CheckboxButton/_stories/CheckboxButton.test.story.tsx +0 -37
  26. package/src/Chevron/_stories/Chevron.rtl.test.story.tsx +26 -0
  27. package/src/Chips/_stories/Chips.rtl.test.story.tsx +49 -0
  28. package/src/Chips/_stories/Chips.test.story.tsx +0 -34
  29. package/src/CircularButton/_stories/CircularButton.test.story.tsx +0 -68
  30. package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +25 -0
  31. package/src/DateLookup/_stories/DateLookup.rtl.test.story.tsx +88 -0
  32. package/src/Decision/_stories/Decision.rtl.test.story.tsx +79 -0
  33. package/src/DefinitionList/_stories/DefinitionList.rtl.test.story.tsx +63 -0
  34. package/src/Drawer/_stories/Drawer.rtl.test.story.tsx +58 -0
  35. package/src/ExpressiveMoneyInput/_stories/ExpressiveMoneyInput.rtl.test.story.tsx +118 -0
  36. package/src/Field/_stories/Field.rtl.test.story.tsx +58 -0
  37. package/src/FlowNavigation/_stories/FlowNavigation.rtl.test.story.tsx +70 -0
  38. package/src/Header/_stories/Header.rtl.test.story.tsx +37 -0
  39. package/src/Info/_stories/Info.rtl.test.story.tsx +64 -0
  40. package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +135 -0
  41. package/src/Inputs/_stories/InputGroup.rtl.test.story.tsx +69 -0
  42. package/src/Inputs/_stories/SearchInput.rtl.test.story.tsx +32 -0
  43. package/src/Inputs/_stories/TextArea.rtl.test.story.tsx +38 -0
  44. package/src/InstructionsList/_stories/InstructionsList.rtl.test.story.tsx +30 -0
  45. package/src/Label/_stories/Label.rtl.test.story.tsx +36 -0
  46. package/src/Link/_stories/Link.rtl.test.story.tsx +26 -0
  47. package/src/ListItem/_stories/{variants/ListItem.rtl.test.story.tsx → ListItem.rtl.test.story.tsx} +6 -10
  48. package/src/ListItem/_stories/variants/helpers.tsx +2 -6
  49. package/src/Logo/_stories/Logo.rtl.test.story.tsx +56 -0
  50. package/src/Modal/_stories/Modal.rtl.test.story.tsx +59 -0
  51. package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +88 -0
  52. package/src/Nudge/_stories/Nudge.rtl.test.story.tsx +37 -0
  53. package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +44 -0
  54. package/src/Popover/_stories/Popover.rtl.test.story.tsx +96 -0
  55. package/src/Progress/_stories/Progress.rtl.test.story.tsx +27 -0
  56. package/src/ProgressBar/_stories/ProgressBar.rtl.test.story.tsx +33 -0
  57. package/src/PromoCard/_stories/PromoCard.rtl.test.story.tsx +42 -0
  58. package/src/PromoCard/_stories/PromoCardGroup.rtl.test.story.tsx +51 -0
  59. package/src/Prompt/ActionPrompt/_stories/ActionPrompt.rtl.test.story.tsx +53 -0
  60. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.rtl.test.story.tsx +46 -0
  61. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +0 -30
  62. package/src/Prompt/InfoPrompt/_stories/InfoPrompt.rtl.test.story.tsx +36 -0
  63. package/src/Prompt/InlinePrompt/_stories/InlinePrompt.rtl.test.story.tsx +38 -0
  64. package/src/Radio/_stories/Radio.rtl.test.story.tsx +61 -0
  65. package/src/RadioGroup/_stories/RadioGroup.rtl.test.story.tsx +66 -0
  66. package/src/Section/_stories/Section.rtl.test.story.tsx +29 -0
  67. package/src/SegmentedControl/_stories/SegmentedControl.rtl.test.story.tsx +45 -0
  68. package/src/SlidingPanel/_stories/SlidingPanel.rtl.test.story.tsx +70 -0
  69. package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +45 -0
  70. package/src/Snackbar/_stories/Snackbar.test.story.tsx +0 -31
  71. package/src/Stepper/_stories/Stepper.rtl.test.story.tsx +24 -0
  72. package/src/Switch/_stories/Switch.rtl.test.story.tsx +32 -0
  73. package/src/Switch/_stories/Switch.test.story.tsx +0 -26
  74. package/src/Table/_stories/Table.rtl.test.story.tsx +104 -0
  75. package/src/Tabs/_stories/Tabs.rtl.test.story.tsx +72 -0
  76. package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.rtl.test.story.tsx +48 -0
  77. package/src/Tooltip/_stories/Tooltip.rtl.test.story.tsx +79 -0
  78. package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +90 -0
  79. package/src/Upload/_stories/Upload.rtl.test.story.tsx +53 -0
  80. package/src/UploadInput/_stories/UploadInput.rtl.test.story.tsx +59 -0
  81. package/src/_deprecated/Alert/_stories/Alert.rtl.test.story.tsx +37 -0
  82. package/src/_deprecated/Card/_stories/Card.rtl.test.story.tsx +38 -0
  83. package/src/_deprecated/CriticalBanner/_stories/CriticalCommsBanner.rtl.test.story.tsx +28 -0
  84. package/src/_deprecated/InlineAlert/_stories/InlineAlert.rtl.test.story.tsx +26 -0
  85. package/src/_deprecated/OverlayHeader/_stories/OverlayHeader.rtl.test.story.tsx +42 -0
  86. package/src/_deprecated/Select/_stories/Select.rtl.test.story.tsx +71 -0
  87. package/src/common/BottomSheet/_stories/BottomSheet.rtl.test.story.tsx +39 -0
  88. package/src/i18n/id.json +0 -5
@@ -0,0 +1,28 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
3
+ import CriticalCommsBanner from '..';
4
+
5
+ export default {
6
+ component: CriticalCommsBanner,
7
+ title: 'Prompts/CriticalCommsBanner/Tests',
8
+ tags: ['!autodocs', '!manifest'],
9
+ } satisfies Meta<typeof CriticalCommsBanner>;
10
+
11
+ type Story = StoryObj<typeof CriticalCommsBanner>;
12
+
13
+ export const RTLDiff: Story = {
14
+ render: () => (
15
+ <>
16
+ <CriticalCommsBanner
17
+ title="Your account is overdrawn"
18
+ subtitle="Add money within the next 30 days"
19
+ action={{ label: 'Take action', href: 'https://wise.com' }}
20
+ />
21
+ <CriticalCommsBanner
22
+ title="Your account is overdrawn"
23
+ subtitle="Add money within the next 30 days"
24
+ />
25
+ </>
26
+ ),
27
+ ...withRTLDiff(),
28
+ };
@@ -0,0 +1,26 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+
3
+ import { withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
4
+ import InlineAlert from '..';
5
+
6
+ export default {
7
+ component: InlineAlert,
8
+ title: 'Prompts/InlineAlert/Tests',
9
+ tags: ['!autodocs', '!manifest'],
10
+ } satisfies Meta<typeof InlineAlert>;
11
+
12
+ type Story = StoryObj<typeof InlineAlert>;
13
+
14
+ export const RTLDiff: Story = {
15
+ render: () => (
16
+ <>
17
+ <InlineAlert type="neutral">Neutral alert without icon</InlineAlert>
18
+ <InlineAlert type="warning">Warning alert with icon</InlineAlert>
19
+ <InlineAlert type="negative">Negative alert with icon</InlineAlert>
20
+ <InlineAlert type="positive">
21
+ Positive alert with icon and longer content that may wrap to multiple lines
22
+ </InlineAlert>
23
+ </>
24
+ ),
25
+ ...withRTLDiff(),
26
+ };
@@ -0,0 +1,42 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { Person } from '@transferwise/icons';
3
+
4
+ import { withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
5
+ import AvatarView from '../../../AvatarView';
6
+ import Logo from '../../../Logo';
7
+ import OverlayHeader from '..';
8
+
9
+ export default {
10
+ component: OverlayHeader,
11
+ title: 'Navigation/OverlayHeader/Tests',
12
+ tags: ['!autodocs', '!manifest'],
13
+ } satisfies Meta<typeof OverlayHeader>;
14
+
15
+ type Story = StoryObj<typeof OverlayHeader>;
16
+
17
+ export const RTLDiff: Story = {
18
+ render: () => (
19
+ <>
20
+ <OverlayHeader logo={<Logo />} onClose={() => {}} />
21
+ <OverlayHeader
22
+ logo={<Logo />}
23
+ avatar={
24
+ <AvatarView>
25
+ <Person size="24" />
26
+ </AvatarView>
27
+ }
28
+ onClose={() => {}}
29
+ />
30
+ <OverlayHeader
31
+ logo={<Logo />}
32
+ avatar={
33
+ <AvatarView>
34
+ <Person size="24" />
35
+ </AvatarView>
36
+ }
37
+ />
38
+ <OverlayHeader logo={<Logo />} />
39
+ </>
40
+ ),
41
+ ...withRTLDiff(),
42
+ };
@@ -0,0 +1,71 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { userEvent, within } from 'storybook/test';
3
+ import { Person } from '@transferwise/icons';
4
+
5
+ import { withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
6
+ import Select from '..';
7
+
8
+ export default {
9
+ component: Select,
10
+ title: 'Forms/Select/Tests/RTL Diff',
11
+ tags: ['!autodocs', '!manifest'],
12
+ } satisfies Meta<typeof Select>;
13
+
14
+ type Story = StoryObj<typeof Select>;
15
+
16
+ const options = [
17
+ { header: 'Popular' },
18
+ { value: 'gbp', label: 'British pound', currency: 'gbp', icon: <Person /> },
19
+ { value: 'eur', label: 'Euro', currency: 'eur', icon: <Person /> },
20
+ { value: 'usd', label: 'US Dollar', currency: 'usd', note: 'United States dollar' },
21
+ { separator: true },
22
+ { header: 'Other' },
23
+ { value: 'cad', label: 'Canadian dollar', currency: 'cad' },
24
+ { value: 'aud', label: 'Australian dollar', currency: 'aud' },
25
+ ];
26
+
27
+ const selected = { value: 'gbp', label: 'British pound', currency: 'gbp', icon: <Person /> };
28
+
29
+ export const TriggerVariants: Story = {
30
+ render: () => (
31
+ <>
32
+ <Select
33
+ size="lg"
34
+ placeholder="Select currency"
35
+ selected={selected}
36
+ options={options}
37
+ onChange={() => {}}
38
+ />
39
+ <Select
40
+ size="md"
41
+ placeholder="Select currency"
42
+ selected={selected}
43
+ options={options}
44
+ onChange={() => {}}
45
+ />
46
+ <Select size="sm" placeholder="Select currency" options={options} onChange={() => {}} />
47
+ </>
48
+ ),
49
+ ...withRTLDiff(),
50
+ };
51
+
52
+ export const OpenDropdown: Story = {
53
+ render: () => (
54
+ <Select
55
+ size="lg"
56
+ search
57
+ searchPlaceholder="Type a currency"
58
+ placeholder="Select currency"
59
+ selected={selected}
60
+ options={options}
61
+ onChange={() => {}}
62
+ />
63
+ ),
64
+ play: async ({ canvasElement }) => {
65
+ const canvas = within(canvasElement);
66
+ const trigger = canvas.queryByRole('button');
67
+ if (!trigger) return;
68
+ await userEvent.click(trigger);
69
+ },
70
+ ...withRTLDiff({ renderAs: 'iframe', width: '80%' }),
71
+ };
@@ -0,0 +1,39 @@
1
+ import type { Meta, StoryObj } from '@storybook/react-webpack5';
2
+ import { FastFlag } from '@transferwise/icons';
3
+
4
+ import { withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
5
+ import { lorem10 } from '../../../test-utils';
6
+ import ListItem from '../../../ListItem';
7
+ import Title from '../../../Title/Title';
8
+ import { Typography } from '../../PropsValues/typography';
9
+ import BottomSheet from '../BottomSheet';
10
+
11
+ export default {
12
+ component: BottomSheet,
13
+ title: 'Dialogs/BottomSheet/Tests',
14
+ tags: ['!autodocs', '!manifest'],
15
+ } satisfies Meta<typeof BottomSheet>;
16
+
17
+ type Story = StoryObj<typeof BottomSheet>;
18
+
19
+ export const RTLDiff: Story = {
20
+ render: () => (
21
+ <BottomSheet open aria-label="Manage your card">
22
+ <Title type={Typography.TITLE_SECTION}>Money without borders</Title>
23
+ {lorem10}
24
+ <br />
25
+ <br />
26
+ <ListItem
27
+ title="List item"
28
+ subtitle="Button and icon are vertically centered."
29
+ control={<ListItem.Navigation href="#" />}
30
+ media={
31
+ <ListItem.AvatarView>
32
+ <FastFlag />
33
+ </ListItem.AvatarView>
34
+ }
35
+ />
36
+ </BottomSheet>
37
+ ),
38
+ ...withRTLDiff({ renderAs: 'iframe' }),
39
+ };
package/src/i18n/id.json CHANGED
@@ -12,10 +12,6 @@
12
12
  "neptune.DateLookup.goTo20YearView": "Lihat tampilan 20 tahun",
13
13
  "neptune.DateLookup.month": "bulan",
14
14
  "neptune.DateLookup.next": "berikutnya",
15
- "neptune.DateLookup.notAvailable": "tidak tersedia",
16
- "neptune.DateLookup.outOfRangeAfter": "Silakan masukkan {min} atau tanggal yang lebih nanti.",
17
- "neptune.DateLookup.outOfRangeBefore": "Silakan masukkan {max} atau tanggal yang lebih awal.",
18
- "neptune.DateLookup.outOfRangeBetween": "Silakan pilih tanggal antara {min} dan {max}.",
19
15
  "neptune.DateLookup.previous": "sebelumnya",
20
16
  "neptune.DateLookup.selected": "terpilih",
21
17
  "neptune.DateLookup.twentyYears": "20 tahun",
@@ -50,7 +46,6 @@
50
46
  "neptune.Table.loaded": "Data tabel telah dimuat",
51
47
  "neptune.Table.loading": "Data tabel sedang dimuat",
52
48
  "neptune.Table.refreshPage": "Muat ulang halaman",
53
- "neptune.Typeahead.suggestionsLabel": "Saran",
54
49
  "neptune.Upload.csButtonText": "Unggah file lainnya?",
55
50
  "neptune.Upload.csFailureText": "Unggahan gagal. Silakan coba lagi",
56
51
  "neptune.Upload.csSuccessText": "Pengunggahan selesai!",