@transferwise/components 0.0.0-experimental-a6aaad9 → 0.0.0-experimental-a39eaa6

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 (38) hide show
  1. package/build/FlowNavigation/FlowNavigation.js +5 -14
  2. package/build/FlowNavigation/FlowNavigation.js.map +1 -1
  3. package/build/FlowNavigation/FlowNavigation.mjs +5 -14
  4. package/build/FlowNavigation/FlowNavigation.mjs.map +1 -1
  5. package/build/Prompt/CriticalBanner/CriticalBanner.js +1 -7
  6. package/build/Prompt/CriticalBanner/CriticalBanner.js.map +1 -1
  7. package/build/Prompt/CriticalBanner/CriticalBanner.mjs +1 -7
  8. package/build/Prompt/CriticalBanner/CriticalBanner.mjs.map +1 -1
  9. package/build/_deprecated/OverlayHeader/OverlayHeader.js +6 -41
  10. package/build/_deprecated/OverlayHeader/OverlayHeader.js.map +1 -1
  11. package/build/_deprecated/OverlayHeader/OverlayHeader.mjs +6 -41
  12. package/build/_deprecated/OverlayHeader/OverlayHeader.mjs.map +1 -1
  13. package/build/main.css +8 -61
  14. package/build/styles/FlowNavigation/FlowNavigation.css +7 -13
  15. package/build/styles/Prompt/CriticalBanner/CriticalBanner.css +0 -24
  16. package/build/styles/main.css +8 -61
  17. package/build/types/FlowNavigation/FlowNavigation.d.ts +2 -9
  18. package/build/types/FlowNavigation/FlowNavigation.d.ts.map +1 -1
  19. package/build/types/Prompt/CriticalBanner/CriticalBanner.d.ts.map +1 -1
  20. package/build/types/_deprecated/OverlayHeader/OverlayHeader.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/src/FlowNavigation/FlowNavigation.css +7 -13
  23. package/src/FlowNavigation/FlowNavigation.less +6 -15
  24. package/src/FlowNavigation/FlowNavigation.tsx +6 -27
  25. package/src/FlowNavigation/_stories/FlowNavigation.story.tsx +0 -86
  26. package/src/Prompt/CriticalBanner/CriticalBanner.css +0 -24
  27. package/src/Prompt/CriticalBanner/CriticalBanner.less +0 -32
  28. package/src/Prompt/CriticalBanner/CriticalBanner.test.tsx +3 -11
  29. package/src/Prompt/CriticalBanner/CriticalBanner.tsx +1 -5
  30. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.accessibility.docs.mdx +1 -4
  31. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.story.tsx +0 -32
  32. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +1 -22
  33. package/src/_deprecated/OverlayHeader/OverlayHeader.tsx +2 -21
  34. package/src/main.css +8 -61
  35. package/src/main.less +0 -1
  36. package/build/styles/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
  37. package/src/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
  38. package/src/_deprecated/OverlayHeader/OverlayHeader.less +0 -24
@@ -21,7 +21,6 @@ const wait = async (ms: number) =>
21
21
  });
22
22
 
23
23
  const ANIMATION_DURATION = 200; // 150ms animation + 50ms buffer
24
- const ENTRY_ANIMATION_DURATION = 450; // 400ms animation + 50ms buffer
25
24
 
26
25
  const longDescription =
27
26
  'We have detected unusual activity on your account that does not match your typical usage patterns. To protect your funds and personal information, we have temporarily restricted access. Please verify your identity to restore full access to your account.';
@@ -151,7 +150,7 @@ export const MobileVariants: Story = {
151
150
  ...withVariantConfig(['mobile']),
152
151
  };
153
152
 
154
- /** Neutral background regression test with page content scrolled under the sticky banner. */
153
+ /** Neutral background regression test with page content scrolled under the mobile overhang. */
155
154
  export const BackgroundIsNotTransparent: Story = {
156
155
  args: {
157
156
  sentiment: 'neutral',
@@ -198,7 +197,6 @@ export const BackgroundIsNotTransparent: Story = {
198
197
 
199
198
  if (scrollContainer) {
200
199
  scrollContainer.scrollTop = 250;
201
- await wait(ENTRY_ANIMATION_DURATION);
202
200
  }
203
201
  },
204
202
  ...withVariantConfig(['mobile'], {
@@ -208,25 +206,6 @@ export const BackgroundIsNotTransparent: Story = {
208
206
  }),
209
207
  };
210
208
 
211
- /** Mobile entry animation visual regression test. */
212
- export const AnimatedEntryMobile: Story = {
213
- render: function Render() {
214
- return (
215
- <CriticalBanner
216
- sentiment="negative"
217
- title="Your account is restricted."
218
- description="Review your personal details to get your account active again."
219
- action={{ label: 'Review details', onClick: fn() }}
220
- />
221
- );
222
- },
223
- ...withVariantConfig(['mobile'], {
224
- parameters: {
225
- chromatic: { pauseAnimationAtEnd: true },
226
- },
227
- }),
228
- };
229
-
230
209
  /**
231
210
  * Tests keyboard navigation and interaction:
232
211
  * - Tab focuses the first chevron toggle button
@@ -1,9 +1,5 @@
1
- import { clsx } from 'clsx';
2
-
3
- import { Size } from '../../common';
4
- import { CloseButton } from '../../common/CloseButton';
5
- import FlowHeader from '../../common/FlowHeader';
6
1
  import Logo from '../../Logo';
2
+ import FlowNavigation from '../../FlowNavigation';
7
3
 
8
4
  /**
9
5
  * @deprecated Use `FlowNavigation` component instead, with `steps={[]}`
@@ -22,20 +18,5 @@ const defaultLogo = <Logo />;
22
18
  * @deprecated Use `FlowNavigation` component instead
23
19
  */
24
20
  export default function OverlayHeader({ avatar, onClose, logo = defaultLogo }: OverlayHeaderProps) {
25
- const closeButton = onClose && <CloseButton size={Size.LARGE} onClick={onClose} />;
26
- return (
27
- <div className="np-overlay-header d-flex justify-content-center">
28
- <FlowHeader
29
- className="np-overlay-header__content p-a-3"
30
- leftContent={logo}
31
- rightContent={
32
- <div className={clsx('d-flex', 'align-items-center', 'order-2')}>
33
- {avatar}
34
- {avatar && closeButton && <span className={clsx('m-x-1')} />}
35
- {closeButton}
36
- </div>
37
- }
38
- />
39
- </div>
40
- );
21
+ return <FlowNavigation {...{ avatar, onClose, logo }} />;
41
22
  }
package/src/main.css CHANGED
@@ -29013,7 +29013,13 @@ button.np-option {
29013
29013
  justify-content: center;
29014
29014
  width: 100%;
29015
29015
  box-sizing: border-box;
29016
- min-height: 96px;
29016
+ min-height: 80px;
29017
+ }
29018
+
29019
+ @media (min-width: 320.02px) {
29020
+ .np-flow-navigation {
29021
+ min-height: 128px;
29022
+ }
29017
29023
  }
29018
29024
 
29019
29025
  .np-flow-navigation--border-bottom {
@@ -29024,7 +29030,7 @@ button.np-option {
29024
29030
  .np-flow-navigation__content {
29025
29031
  width: 100%;
29026
29032
  min-width: 320px;
29027
- max-width: calc(1160px - 36px);
29033
+ max-width: none;
29028
29034
  }
29029
29035
 
29030
29036
  .np-flow-navigation__stepper {
@@ -29101,20 +29107,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
29101
29107
  visibility: hidden;
29102
29108
  }
29103
29109
 
29104
- .np-flow-navigation--composable {
29105
- min-height: 80px;
29106
- }
29107
-
29108
- @media (min-width: 320.02px) {
29109
- .np-flow-navigation--composable {
29110
- min-height: 128px;
29111
- }
29112
- }
29113
-
29114
- .np-flow-navigation--composable .np-flow-navigation__content {
29115
- max-width: none;
29116
- }
29117
-
29118
29110
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
29119
29111
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
29120
29112
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -31650,24 +31642,6 @@ html:not([dir="rtl"]) .np-navigation-option {
31650
31642
  text-decoration: var(--nudge-link-text-decoration);
31651
31643
  }
31652
31644
 
31653
- .np-overlay-header .np-overlay-header__content {
31654
- min-height: 97px;
31655
- width: 100%;
31656
- min-width: 320px;
31657
- max-width: calc(1160px - 36px);
31658
- }
31659
-
31660
- .np-theme-personal .np-overlay-header {
31661
- border-bottom: 1px solid rgba(0,0,0,0.10196);
31662
- border-bottom: 1px solid var(--color-border-neutral);
31663
- }
31664
-
31665
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
31666
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
31667
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
31668
- fill: var(--color-interactive-primary);
31669
- }
31670
-
31671
31645
  .tw-telephone {
31672
31646
  display: flex;
31673
31647
  }
@@ -32416,28 +32390,6 @@ html:not([dir="rtl"]) .np-navigation-option {
32416
32390
  }
32417
32391
  }
32418
32392
 
32419
- .wds-critical-banner__entry-mask {
32420
- display: grid;
32421
- grid-template-rows: 0fr;
32422
- overflow: hidden;
32423
- animation: wds-critical-banner-reveal-height 400ms cubic-bezier(0.3, 0, 0.1, 1) both;
32424
- }
32425
-
32426
- .wds-critical-banner__entry-track {
32427
- min-height: 0;
32428
- }
32429
-
32430
- @keyframes wds-critical-banner-reveal-height {
32431
- from {
32432
- grid-template-rows: 0fr;
32433
- overflow: hidden;
32434
- }
32435
- to {
32436
- grid-template-rows: 1fr;
32437
- overflow: visible;
32438
- }
32439
- }
32440
-
32441
32393
  @media (prefers-reduced-motion: reduce) {
32442
32394
  .wds-critical-banner__description,
32443
32395
  .wds-critical-banner__title,
@@ -32445,11 +32397,6 @@ html:not([dir="rtl"]) .np-navigation-option {
32445
32397
  .wds-critical-banner__toggle {
32446
32398
  transition: none !important;
32447
32399
  }
32448
- .wds-critical-banner__entry-mask {
32449
- animation: none;
32450
- grid-template-rows: 1fr;
32451
- overflow: visible;
32452
- }
32453
32400
  }
32454
32401
 
32455
32402
  .wds-expander-toggle {
package/src/main.less CHANGED
@@ -63,7 +63,6 @@
63
63
  @import "./_deprecated/NavigationOption/NavigationOption.less";
64
64
  @import "./_deprecated/NavigationOptionsList/NavigationOptionsList.less";
65
65
  @import "./Nudge/Nudge.less";
66
- @import "./_deprecated/OverlayHeader/OverlayHeader.less";
67
66
  @import "./PhoneNumberInput/PhoneNumberInput.less";
68
67
  @import "./Popover/Popover.less";
69
68
  @import "./PromoCard/PromoCard.less";
@@ -1,15 +0,0 @@
1
- .np-overlay-header .np-overlay-header__content {
2
- min-height: 97px;
3
- width: 100%;
4
- min-width: 320px;
5
- max-width: calc(1160px - 36px);
6
- }
7
- .np-theme-personal .np-overlay-header {
8
- border-bottom: 1px solid rgba(0,0,0,0.10196);
9
- border-bottom: 1px solid var(--color-border-neutral);
10
- }
11
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
12
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
13
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
14
- fill: var(--color-interactive-primary);
15
- }
@@ -1,15 +0,0 @@
1
- .np-overlay-header .np-overlay-header__content {
2
- min-height: 97px;
3
- width: 100%;
4
- min-width: 320px;
5
- max-width: calc(1160px - 36px);
6
- }
7
- .np-theme-personal .np-overlay-header {
8
- border-bottom: 1px solid rgba(0,0,0,0.10196);
9
- border-bottom: 1px solid var(--color-border-neutral);
10
- }
11
- .np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
12
- .np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
13
- .np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
14
- fill: var(--color-interactive-primary);
15
- }
@@ -1,24 +0,0 @@
1
- @import (reference) "@transferwise/neptune-tokens/breakpoints.less";
2
- @import (reference) "./../../styles/less/addons/_spacing-utilities.less";
3
-
4
- .np-overlay-header {
5
- .np-overlay-header__content {
6
- // Same height and width as in FlowNavigation
7
- min-height: 97px;
8
- width: 100%;
9
- min-width: @screen-xs-min;
10
- max-width: calc(@screen-lg-min - 36px);
11
- }
12
-
13
- .np-theme-personal & {
14
- border-bottom: 1px solid var(--color-border-neutral);
15
- }
16
-
17
- .np-theme-personal--forest-green &,
18
- .np-theme-personal--bright-green &,
19
- .np-theme-personal--dark & {
20
- .np-flow-header__left path {
21
- fill: var(--color-interactive-primary);
22
- }
23
- }
24
- }