@transferwise/components 0.0.0-experimental-a1b5585 → 0.0.0-experimental-999c033

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 (74) hide show
  1. package/build/ProcessIndicator/ProcessIndicator.js +1 -1
  2. package/build/ProcessIndicator/ProcessIndicator.js.map +1 -1
  3. package/build/ProcessIndicator/ProcessIndicator.mjs +1 -1
  4. package/build/ProcessIndicator/ProcessIndicator.mjs.map +1 -1
  5. package/build/main.css +64 -56
  6. package/build/styles/AvatarView/AvatarView.css +0 -8
  7. package/build/styles/AvatarView/Dot/Dot.css +0 -8
  8. package/build/styles/CheckboxButton/CheckboxButton.css +0 -3
  9. package/build/styles/Nudge/Nudge.css +38 -4
  10. package/build/styles/SlidingPanel/SlidingPanel.css +0 -8
  11. package/build/styles/UploadInput/UploadItem/UploadItem.css +5 -4
  12. package/build/styles/_deprecated/Badge/Badge.css +2 -4
  13. package/build/styles/css/accordion.css +0 -3
  14. package/build/styles/css/buttons.css +7 -1
  15. package/build/styles/css/chevron.css +0 -3
  16. package/build/styles/css/neptune.css +19 -25
  17. package/build/styles/css/process.css +9 -15
  18. package/build/styles/css/tick.css +3 -6
  19. package/build/styles/main.css +64 -56
  20. package/build/styles/styles/less/accordion.css +0 -3
  21. package/build/styles/styles/less/buttons.css +7 -1
  22. package/build/styles/styles/less/chevron.css +0 -3
  23. package/build/styles/styles/less/neptune.css +19 -25
  24. package/build/styles/styles/less/process.css +9 -15
  25. package/build/styles/styles/less/tick.css +3 -6
  26. package/package.json +2 -2
  27. package/src/AvatarView/AvatarView.css +0 -8
  28. package/src/AvatarView/Dot/Dot.css +0 -8
  29. package/src/AvatarView/Dot/Dot.less +1 -7
  30. package/src/Button/_stories/Button.test.story.tsx +1 -1
  31. package/src/Checkbox/_stories/Checkbox.story.tsx +1 -1
  32. package/src/Checkbox/_stories/Checkbox.test.story.tsx +2 -3
  33. package/src/CheckboxButton/CheckboxButton.css +0 -3
  34. package/src/CheckboxButton/CheckboxButton.less +0 -4
  35. package/src/Chevron/_stories/Chevron.test.story.tsx +2 -2
  36. package/src/Header/_stories/Header.test.story.tsx +1 -1
  37. package/src/Info/_stories/Info.rtl.test.story.tsx +10 -35
  38. package/src/Info/_stories/Info.story.tsx +1 -1
  39. package/src/Inputs/SelectInput/_stories/SelectInput.test.story.tsx +1 -1
  40. package/src/ListItem/_stories/subcomponents.tsx +1 -1
  41. package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +1 -1
  42. package/src/Nudge/Nudge.css +38 -4
  43. package/src/Nudge/Nudge.less +4 -4
  44. package/src/Nudge/_stories/Nudge.test.story.tsx +12 -29
  45. package/src/PhoneNumberInput/_stories/{PhoneNumberInput.rtl.test.story.tsx → PhoneNumberInput.test.story.tsx} +10 -18
  46. package/src/ProcessIndicator/ProcessIndicator.tsx +1 -1
  47. package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +19 -33
  48. package/src/SlidingPanel/SlidingPanel.css +0 -8
  49. package/src/SlidingPanel/SlidingPanel.less +0 -8
  50. package/src/SlidingPanel/_stories/SlidingPanel.rtl.test.story.tsx +3 -4
  51. package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +16 -14
  52. package/src/Snackbar/_stories/Snackbar.story.tsx +1 -1
  53. package/src/Snackbar/_stories/Snackbar.test.story.tsx +1 -1
  54. package/src/StatusIcon/_stories/StatusIcon.test.story.tsx +4 -12
  55. package/src/UploadInput/UploadItem/UploadItem.css +5 -4
  56. package/src/UploadInput/UploadItem/UploadItem.less +6 -7
  57. package/src/UploadInput/_stories/UploadInput.test.story.tsx +1 -1
  58. package/src/_deprecated/Badge/Badge.css +2 -4
  59. package/src/_deprecated/Badge/Badge.less +14 -7
  60. package/src/_deprecated/CriticalBanner/_stories/CriticalCommsBanner.test.story.tsx +16 -0
  61. package/src/_deprecated/OverlayHeader/_stories/OverlayHeader.test.story.tsx +0 -15
  62. package/src/main.css +64 -56
  63. package/src/styles/less/accordion.css +0 -3
  64. package/src/styles/less/buttons.css +7 -1
  65. package/src/styles/less/buttons.less +11 -3
  66. package/src/styles/less/chevron.css +0 -3
  67. package/src/styles/less/chevron.less +0 -4
  68. package/src/styles/less/neptune.css +19 -25
  69. package/src/styles/less/process.css +9 -15
  70. package/src/styles/less/process.less +6 -13
  71. package/src/styles/less/tick.css +3 -6
  72. package/src/styles/less/tick.less +3 -7
  73. package/src/Loader/_stories/Loader.test.story.tsx +0 -23
  74. package/src/ProcessIndicator/_stories/ProcessIndicator.test.story.tsx +0 -32
@@ -5350,9 +5350,6 @@ tbody.collapse.in {
5350
5350
  .tw-chevron.top {
5351
5351
  transform: rotate(0deg);
5352
5352
  }
5353
- [dir="rtl"] .tw-chevron.top {
5354
- transform: rotate(360deg);
5355
- }
5356
5353
  .tw-chevron.right {
5357
5354
  transform: rotate(90deg);
5358
5355
  }
@@ -7496,11 +7493,17 @@ input[type="button"].btn-block {
7496
7493
  display: inline-flex;
7497
7494
  align-items: center;
7498
7495
  }
7499
- .btn-loading:not(.btn-block) .btn-loader[class] {
7496
+ .btn-loading:not(.btn-block) .btn-loader {
7500
7497
  margin-block-end: 0;
7498
+ }
7499
+ :not([dir="rtl"]) .btn-loading:not(.btn-block) .btn-loader {
7501
7500
  margin-inline-start: 16px;
7502
7501
  margin-inline-end: 0;
7503
7502
  }
7503
+ [dir="rtl"] .btn-loading:not(.btn-block) .btn-loader {
7504
+ margin-inline-start: 0 !important;
7505
+ margin-inline-end: 16px !important;
7506
+ }
7504
7507
  .btn-loading.btn-block .btn-loader {
7505
7508
  inset-block-start: 0;
7506
7509
  inset-block-end: 0;
@@ -16957,9 +16960,6 @@ button.popover-close {
16957
16960
  inset-inline-start: 25%;
16958
16961
  inset-block-start: 25%;
16959
16962
  }
16960
- [dir="rtl"] .process-icon-container {
16961
- transform: rotate(45deg) scaleX(-1);
16962
- }
16963
16963
  .process-icon-horizontal,
16964
16964
  .process-icon-vertical {
16965
16965
  position: absolute;
@@ -17039,37 +17039,37 @@ button.popover-close {
17039
17039
  .process-stopped .process-icon-container {
17040
17040
  display: none;
17041
17041
  }
17042
- .process-xxs {
17042
+ .process-xs {
17043
17043
  inline-size: 12px;
17044
17044
  block-size: 12px;
17045
17045
  }
17046
- .process-xxs .process-circle {
17046
+ .process-xs .process-circle {
17047
17047
  /* Hide before animation to prevent glitching */
17048
17048
  stroke-dashoffset: 31.41592654px;
17049
17049
  stroke-dasharray: 31.41592654px;
17050
17050
  stroke-width: 1.5px;
17051
17051
  }
17052
- .process-xxs.process-danger .process-icon-horizontal {
17052
+ .process-xs.process-danger .process-icon-horizontal {
17053
17053
  inset-block-start: 2.5px;
17054
17054
  block-size: 1px;
17055
17055
  }
17056
- .process-xxs.process-danger .process-icon-vertical {
17056
+ .process-xs.process-danger .process-icon-vertical {
17057
17057
  inset-inline-start: 2.5px;
17058
17058
  inline-size: 1px;
17059
17059
  }
17060
- .process-xxs .process-icon-horizontal,
17061
- .process-xxs .process-icon-vertical {
17060
+ .process-xs .process-icon-horizontal,
17061
+ .process-xs .process-icon-vertical {
17062
17062
  border-radius: 0.5px;
17063
17063
  }
17064
- .process-xxs.process-success .process-icon-container {
17064
+ .process-xs.process-success .process-icon-container {
17065
17065
  inline-size: 2.5px;
17066
17066
  block-size: 5px;
17067
17067
  inset-inline-start: 4.5px;
17068
17068
  }
17069
- .process-xxs.process-success .process-icon-horizontal {
17069
+ .process-xs.process-success .process-icon-horizontal {
17070
17070
  block-size: 1px;
17071
17071
  }
17072
- .process-xxs.process-success .process-icon-vertical {
17072
+ .process-xs.process-success .process-icon-vertical {
17073
17073
  inline-size: 1px;
17074
17074
  }
17075
17075
  .process-xs {
@@ -17171,9 +17171,6 @@ button.popover-close {
17171
17171
  .process-xl.process-success .process-icon-vertical {
17172
17172
  inline-size: 8px;
17173
17173
  }
17174
- .process-xxs .process-icon-container {
17175
- display: none;
17176
- }
17177
17174
  .process-xxs .process-circle {
17178
17175
  animation-name: process-chase-circle-xxs;
17179
17176
  }
@@ -18814,13 +18811,10 @@ a[data-toggle="tooltip"] {
18814
18811
  position: absolute;
18815
18812
  background: #ffffff;
18816
18813
  background: var(--color-background-screen);
18817
- transform: translateX(-1.5px) rotate(-45deg);
18814
+ transform: translateX(0.5px) rotate(-45deg);
18818
18815
  transform-origin: left bottom;
18819
- }
18820
- [dir="rtl"] .tw-checkbox-check::before,
18821
- [dir="rtl"] .tw-checkbox-check::after {
18822
- transform: translateX(-1.5px) rotate(-45deg) scaleX(-1);
18823
- transform-origin: right bottom;
18816
+ inset-inline-start: 8px;
18817
+ inset-inline-start: var(--size-8);
18824
18818
  }
18825
18819
  .tw-checkbox-check .has-error::before,
18826
18820
  .tw-checkbox-check .has-error::after {
@@ -55,9 +55,6 @@
55
55
  inset-inline-start: 25%;
56
56
  inset-block-start: 25%;
57
57
  }
58
- [dir="rtl"] .process-icon-container {
59
- transform: rotate(45deg) scaleX(-1);
60
- }
61
58
  .process-icon-horizontal,
62
59
  .process-icon-vertical {
63
60
  position: absolute;
@@ -137,37 +134,37 @@
137
134
  .process-stopped .process-icon-container {
138
135
  display: none;
139
136
  }
140
- .process-xxs {
137
+ .process-xs {
141
138
  inline-size: 12px;
142
139
  block-size: 12px;
143
140
  }
144
- .process-xxs .process-circle {
141
+ .process-xs .process-circle {
145
142
  /* Hide before animation to prevent glitching */
146
143
  stroke-dashoffset: 31.41592654px;
147
144
  stroke-dasharray: 31.41592654px;
148
145
  stroke-width: 1.5px;
149
146
  }
150
- .process-xxs.process-danger .process-icon-horizontal {
147
+ .process-xs.process-danger .process-icon-horizontal {
151
148
  inset-block-start: 2.5px;
152
149
  block-size: 1px;
153
150
  }
154
- .process-xxs.process-danger .process-icon-vertical {
151
+ .process-xs.process-danger .process-icon-vertical {
155
152
  inset-inline-start: 2.5px;
156
153
  inline-size: 1px;
157
154
  }
158
- .process-xxs .process-icon-horizontal,
159
- .process-xxs .process-icon-vertical {
155
+ .process-xs .process-icon-horizontal,
156
+ .process-xs .process-icon-vertical {
160
157
  border-radius: 0.5px;
161
158
  }
162
- .process-xxs.process-success .process-icon-container {
159
+ .process-xs.process-success .process-icon-container {
163
160
  inline-size: 2.5px;
164
161
  block-size: 5px;
165
162
  inset-inline-start: 4.5px;
166
163
  }
167
- .process-xxs.process-success .process-icon-horizontal {
164
+ .process-xs.process-success .process-icon-horizontal {
168
165
  block-size: 1px;
169
166
  }
170
- .process-xxs.process-success .process-icon-vertical {
167
+ .process-xs.process-success .process-icon-vertical {
171
168
  inline-size: 1px;
172
169
  }
173
170
  .process-xs {
@@ -269,9 +266,6 @@
269
266
  .process-xl.process-success .process-icon-vertical {
270
267
  inline-size: 8px;
271
268
  }
272
- .process-xxs .process-icon-container {
273
- display: none;
274
- }
275
269
  .process-xxs .process-circle {
276
270
  animation-name: process-chase-circle-xxs;
277
271
  }
@@ -10,13 +10,10 @@
10
10
  position: absolute;
11
11
  background: #ffffff;
12
12
  background: var(--color-background-screen);
13
- transform: translateX(-1.5px) rotate(-45deg);
13
+ transform: translateX(0.5px) rotate(-45deg);
14
14
  transform-origin: left bottom;
15
- }
16
- [dir="rtl"] .tw-checkbox-check::before,
17
- [dir="rtl"] .tw-checkbox-check::after {
18
- transform: translateX(-1.5px) rotate(-45deg) scaleX(-1);
19
- transform-origin: right bottom;
15
+ inset-inline-start: 8px;
16
+ inset-inline-start: var(--size-8);
20
17
  }
21
18
  .tw-checkbox-check .has-error::before,
22
19
  .tw-checkbox-check .has-error::after {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-a1b5585",
3
+ "version": "0.0.0-experimental-999c033",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -71,7 +71,7 @@
71
71
  "@types/react-dom": "^18.3.7",
72
72
  "@types/react-transition-group": "4.4.12",
73
73
  "@monaco-editor/react": "^4.7.0",
74
- "monaco-editor": "^0.55.1",
74
+ "monaco-editor": "^0.56.0",
75
75
  "monaco-editor-webpack-plugin": "^7.1.1",
76
76
  "@wise/art": "^2.32.0",
77
77
  "@wise/eslint-config": "^14.2.1",
@@ -4,18 +4,10 @@
4
4
  display: inline-block;
5
5
  }
6
6
  .np-dot-mask {
7
- --np-dot-h-side: left;
8
7
  -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
9
8
  mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
10
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
11
- mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
12
9
  -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
13
10
  mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
14
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
15
- mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
16
- }
17
- [dir="rtl"] .np-dot-mask {
18
- --np-dot-h-side: right;
19
11
  }
20
12
  .np-dot-badge {
21
13
  position: absolute;
@@ -4,18 +4,10 @@
4
4
  display: inline-block;
5
5
  }
6
6
  .np-dot-mask {
7
- --np-dot-h-side: left;
8
7
  -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
9
8
  mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) left calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
10
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
11
- mask-image: radial-gradient(circle at bottom calc(100% - (var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - (var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
12
9
  -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
13
10
  mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
14
- -webkit-mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
15
- mask-image: radial-gradient(circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side) calc(100% - calc(var(--np-dot-size) / 2)), transparent 0, transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)), black calc(var(--np-dot-size) / 2 + var(--np-dot-offset) + 0.5px));
16
- }
17
- [dir="rtl"] .np-dot-mask {
18
- --np-dot-h-side: right;
19
11
  }
20
12
  .np-dot-badge {
21
13
  position: absolute;
@@ -4,14 +4,8 @@
4
4
  display: inline-block;
5
5
 
6
6
  &-mask {
7
- --np-dot-h-side: left;
8
-
9
- [dir="rtl"] & {
10
- --np-dot-h-side: right;
11
- }
12
-
13
7
  mask-image: radial-gradient(
14
- circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) var(--np-dot-h-side)
8
+ circle at bottom calc(100% - calc(var(--np-dot-size) / 2)) left
15
9
  calc(100% - calc(var(--np-dot-size) / 2)),
16
10
  transparent 0,
17
11
  transparent calc(var(--np-dot-size) / 2 + var(--np-dot-offset)),
@@ -34,7 +34,7 @@ const buttonPriorities = ['primary', 'secondary', 'secondary-neutral', 'tertiary
34
34
  const buttonSizes = ['sm', 'md', 'lg'] as const;
35
35
  export const AllVariants: Story = {
36
36
  tags: ['!autodocs'],
37
- ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green'], {
37
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green', 'rtl'], {
38
38
  parameters: {
39
39
  padding: '0',
40
40
  },
@@ -52,7 +52,7 @@ export const Multiple: Story = {
52
52
  </>
53
53
  );
54
54
  },
55
- ...withVariantConfig(['default', 'dark']),
55
+ ...withVariantConfig(['default', 'dark', 'rtl']),
56
56
  };
57
57
 
58
58
  export const WithinField = {
@@ -30,7 +30,7 @@ export const MultipleMobile: Story = {
30
30
  </>
31
31
  );
32
32
  },
33
- ...withVariantConfig(['default', 'dark', 'mobile']),
33
+ ...withVariantConfig(['default', 'dark', 'rtl', 'mobile']),
34
34
  };
35
35
 
36
36
  /**
@@ -41,9 +41,8 @@ export const MultipleMobile: Story = {
41
41
  export const RTLDiff: Story = {
42
42
  render: () => (
43
43
  <>
44
- <Checkbox checked label="Label only" onChange={() => {}} />
44
+ <Checkbox label="Label only" onChange={() => {}} />
45
45
  <Checkbox
46
- checked
47
46
  label="Label with secondary"
48
47
  secondary="Secondary description text"
49
48
  onChange={() => {}}
@@ -32,9 +32,6 @@
32
32
  background: var(--color-background-screen);
33
33
  transform: translate(-50%, -50%);
34
34
  }
35
- [dir="rtl"] .np-tw-checkbox-indeterminate::after {
36
- transform: translate(50%, -50%);
37
- }
38
35
  .np-tw-checkbox-indeterminate .has-error::after {
39
36
  background-color: #e74848;
40
37
  background-color: var(--color-interactive-negative);
@@ -40,10 +40,6 @@
40
40
  left: 50%;
41
41
  background: var(--color-background-screen);
42
42
  transform: translate(-50%, -50%);
43
-
44
- [dir="rtl"] & {
45
- transform: translate(50%, -50%);
46
- }
47
43
  }
48
44
 
49
45
  .has-error {
@@ -17,10 +17,10 @@ type Story = StoryObj<typeof Chevron>;
17
17
  */
18
18
  export const RTLDiff: Story = {
19
19
  render: () => (
20
- <>
20
+ <div style={{ display: 'flex', gap: '16px', alignItems: 'center' }}>
21
21
  <Chevron orientation="left" size="md" />
22
22
  <Chevron orientation="right" size="md" />
23
- </>
23
+ </div>
24
24
  ),
25
25
  ...withRTLDiff(),
26
26
  };
@@ -86,7 +86,7 @@ export const SectionTrailingSpaceWithAction: Story = {
86
86
  };
87
87
 
88
88
  export const AllVariants: Story = {
89
- ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green'], {
89
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green', 'rtl'], {
90
90
  parameters: {
91
91
  padding: '0',
92
92
  },
@@ -12,6 +12,8 @@ export default {
12
12
 
13
13
  type Story = StoryObj<typeof Info>;
14
14
 
15
+ const iframeDiff = withRTLDiff({ renderAs: 'iframe' });
16
+
15
17
  const openInfo = async ({ canvasElement }: { canvasElement: HTMLElement }) => {
16
18
  const canvas = within(canvasElement);
17
19
  const button = canvas.queryByRole('button');
@@ -19,60 +21,32 @@ const openInfo = async ({ canvasElement }: { canvasElement: HTMLElement }) => {
19
21
  await userEvent.click(button);
20
22
  };
21
23
 
22
- export const PlacementTop: Story = {
23
- render: () => (
24
- <Info
25
- aria-label="Info trigger"
26
- title="Information"
27
- content="This is some descriptive content inside the info component."
28
- presentation="POPOVER"
29
- preferredPlacement="top"
30
- />
31
- ),
32
- play: openInfo,
33
- ...withRTLDiff({ renderAs: 'iframe', hAlign: 'center', vAlign: 'bottom' }),
34
- };
35
-
36
- export const PlacementRight: Story = {
37
- render: () => (
38
- <Info
39
- aria-label="Info trigger"
40
- title="Information"
41
- content="This is some descriptive content inside the info component."
42
- presentation="POPOVER"
43
- preferredPlacement="right"
44
- />
45
- ),
46
- play: openInfo,
47
- ...withRTLDiff({ renderAs: 'iframe', hAlign: 'left', vAlign: 'center' }),
48
- };
49
-
50
- export const PlacementBottom: Story = {
24
+ export const Popover: Story = {
51
25
  render: () => (
52
26
  <Info
53
27
  aria-label="Info trigger"
54
28
  title="Information"
55
29
  content="This is some descriptive content inside the info component."
56
30
  presentation="POPOVER"
57
- preferredPlacement="bottom"
31
+ size="sm"
58
32
  />
59
33
  ),
60
34
  play: openInfo,
61
- ...withRTLDiff({ renderAs: 'iframe', hAlign: 'center' }),
35
+ ...iframeDiff,
62
36
  };
63
37
 
64
- export const PlacementLeft: Story = {
38
+ export const PopoverLarge: Story = {
65
39
  render: () => (
66
40
  <Info
67
41
  aria-label="Info trigger"
68
42
  title="Information"
69
43
  content="This is some descriptive content inside the info component."
70
44
  presentation="POPOVER"
71
- preferredPlacement="left"
45
+ size="lg"
72
46
  />
73
47
  ),
74
48
  play: openInfo,
75
- ...withRTLDiff({ renderAs: 'iframe', hAlign: 'right', vAlign: 'center' }),
49
+ ...iframeDiff,
76
50
  };
77
51
 
78
52
  export const Modal: Story = {
@@ -82,8 +56,9 @@ export const Modal: Story = {
82
56
  title="Information"
83
57
  content="This is some descriptive content inside the info component."
84
58
  presentation="MODAL"
59
+ size="sm"
85
60
  />
86
61
  ),
87
62
  play: openInfo,
88
- ...withRTLDiff({ renderAs: 'iframe', hAlign: 'center', vAlign: 'center' }),
63
+ ...iframeDiff,
89
64
  };
@@ -36,5 +36,5 @@ export const Sandbox = createSandboxStory({
36
36
  });
37
37
 
38
38
  export const Basic: Story = {
39
- ...withVariantConfig(['default', 'dark']),
39
+ ...withVariantConfig(['default', 'dark', 'rtl']),
40
40
  };
@@ -166,7 +166,7 @@ export const Variants: Story<TestCurrency> = {
166
166
  </div>
167
167
  );
168
168
  },
169
- ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green']),
169
+ ...withVariantConfig(['default', 'dark', 'bright-green', 'forest-green', 'rtl']),
170
170
  };
171
171
 
172
172
  /**
@@ -60,7 +60,7 @@ export const SB_LIST_ITEM_CONTROLS: Record<SB_ListItem_ControlType, ReactNode> =
60
60
  ),
61
61
  navigation: <ListItem.Navigation href="https://wise.com" />,
62
62
  navigationAsButton: <ListItem.Navigation onClick={fn()} />,
63
- checkbox: <ListItem.Checkbox checked onChange={() => {}} />,
63
+ checkbox: <ListItem.Checkbox onChange={() => {}} />,
64
64
  radio: <ListItem.Radio name="radio" value={Math.random().toString()} onChange={() => {}} />,
65
65
  switch: <ListItem.Switch onClick={() => {}} />,
66
66
  iconButton: (
@@ -84,5 +84,5 @@ export const OpenDropdown: Story = {
84
84
  if (!trigger) return;
85
85
  await userEvent.click(trigger);
86
86
  },
87
- ...withRTLDiff({ renderAs: 'iframe', width: '40%' }),
87
+ ...withRTLDiff({ renderAs: 'iframe', width: '80%' }),
88
88
  };
@@ -41,10 +41,7 @@
41
41
  inline-size: 161px;
42
42
  }
43
43
  [dir="rtl"] .wds-nudge-media-globe {
44
- margin-inline-start: -63px;
45
- margin-block-start: -15px;
46
- position: absolute;
47
- inline-size: 161px;
44
+ transform: scaleX(-1);
48
45
  }
49
46
  .wds-nudge-media-lock {
50
47
  margin-inline-start: -11px;
@@ -53,24 +50,36 @@
53
50
  inline-size: 104px;
54
51
  transform: rotate(-14.86deg);
55
52
  }
53
+ [dir="rtl"] .wds-nudge-media-lock {
54
+ transform: scaleX(-1);
55
+ }
56
56
  .wds-nudge-media-wallet {
57
57
  margin-inline-start: -15px;
58
58
  margin-block-start: 18px;
59
59
  position: absolute;
60
60
  inline-size: 107px;
61
61
  }
62
+ [dir="rtl"] .wds-nudge-media-wallet {
63
+ transform: scaleX(-1);
64
+ }
62
65
  .wds-nudge-media-gear {
63
66
  margin-inline-start: -18px;
64
67
  margin-block-start: 19px;
65
68
  position: absolute;
66
69
  inline-size: 111px;
67
70
  }
71
+ [dir="rtl"] .wds-nudge-media-gear {
72
+ transform: scaleX(-1);
73
+ }
68
74
  .wds-nudge-media-invite-letter {
69
75
  margin-inline-start: -17px;
70
76
  margin-block-start: -2px;
71
77
  position: absolute;
72
78
  inline-size: 105px;
73
79
  }
80
+ [dir="rtl"] .wds-nudge-media-invite-letter {
81
+ transform: scaleX(-1);
82
+ }
74
83
  .wds-nudge-media-personal-card,
75
84
  .wds-nudge-media-business-card {
76
85
  margin-inline-start: -15px;
@@ -78,48 +87,73 @@
78
87
  position: absolute;
79
88
  inline-size: 104px;
80
89
  }
90
+ [dir="rtl"] .wds-nudge-media-personal-card,
91
+ [dir="rtl"] .wds-nudge-media-business-card {
92
+ transform: scaleX(-1);
93
+ }
81
94
  .wds-nudge-media-heart {
82
95
  margin-inline-start: -7px;
83
96
  margin-block-start: 11px;
84
97
  position: absolute;
85
98
  inline-size: 95px;
86
99
  }
100
+ [dir="rtl"] .wds-nudge-media-heart {
101
+ transform: scaleX(-1);
102
+ }
87
103
  .wds-nudge-media-multi-currency {
88
104
  margin-inline-start: -30px;
89
105
  margin-block-start: 1px;
90
106
  position: absolute;
91
107
  inline-size: 131px;
92
108
  }
109
+ [dir="rtl"] .wds-nudge-media-multi-currency {
110
+ transform: scaleX(-1);
111
+ }
93
112
  .wds-nudge-media-shopping-bag {
94
113
  margin-inline-start: -9px;
95
114
  margin-block-start: 14px;
96
115
  position: absolute;
97
116
  inline-size: 116px;
98
117
  }
118
+ [dir="rtl"] .wds-nudge-media-shopping-bag {
119
+ transform: scaleX(-1);
120
+ }
99
121
  .wds-nudge-media-flower {
100
122
  margin-inline-start: -24px;
101
123
  margin-block-start: 11px;
102
124
  position: absolute;
103
125
  inline-size: 156px;
104
126
  }
127
+ [dir="rtl"] .wds-nudge-media-flower {
128
+ transform: scaleX(-1);
129
+ }
105
130
  .wds-nudge-media-backpack {
106
131
  margin-inline-start: -16px;
107
132
  margin-block-start: 6px;
108
133
  position: absolute;
109
134
  inline-size: 123px;
110
135
  }
136
+ [dir="rtl"] .wds-nudge-media-backpack {
137
+ transform: scaleX(-1);
138
+ }
111
139
  .wds-nudge-media-gift-box {
112
140
  margin-inline-start: -22px;
113
141
  margin-block-start: 6px;
114
142
  position: absolute;
115
143
  inline-size: 129px;
116
144
  }
145
+ [dir="rtl"] .wds-nudge-media-gift-box {
146
+ transform: scaleX(-1);
147
+ }
117
148
  .wds-nudge-media-documents {
118
149
  margin-inline-start: -8px;
119
150
  margin-block-start: 8px;
120
151
  position: absolute;
121
152
  inline-size: 120px;
122
153
  }
154
+ [dir="rtl"] .wds-nudge-media-documents {
155
+ transform: scaleX(-1);
156
+ }
123
157
  .wds-nudge-container {
124
158
  align-items: stretch;
125
159
  display: flex;
@@ -32,10 +32,6 @@
32
32
 
33
33
  &-globe {
34
34
  .media-position(161px, -76px, -5px);
35
-
36
- [dir="rtl"] & {
37
- .media-position(161px, -63px, -15px);
38
- }
39
35
  }
40
36
 
41
37
  &-lock {
@@ -133,4 +129,8 @@
133
129
  margin-top: @margin-top;
134
130
  position: absolute;
135
131
  width: @size;
132
+
133
+ [dir="rtl"] & {
134
+ transform: scaleX(-1);
135
+ }
136
136
  }