@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
@@ -155,25 +155,6 @@
155
155
  mask: var(--critical-banner-overhang-mask);
156
156
  }
157
157
  }
158
- .wds-critical-banner__entry-mask {
159
- display: grid;
160
- grid-template-rows: 0fr;
161
- overflow: hidden;
162
- animation: wds-critical-banner-reveal-height 400ms cubic-bezier(0.3, 0, 0.1, 1) both;
163
- }
164
- .wds-critical-banner__entry-track {
165
- min-height: 0;
166
- }
167
- @keyframes wds-critical-banner-reveal-height {
168
- from {
169
- grid-template-rows: 0fr;
170
- overflow: hidden;
171
- }
172
- to {
173
- grid-template-rows: 1fr;
174
- overflow: visible;
175
- }
176
- }
177
158
  @media (prefers-reduced-motion: reduce) {
178
159
  .wds-critical-banner__description,
179
160
  .wds-critical-banner__title,
@@ -181,9 +162,4 @@
181
162
  .wds-critical-banner__toggle {
182
163
  transition: none !important;
183
164
  }
184
- .wds-critical-banner__entry-mask {
185
- animation: none;
186
- grid-template-rows: 1fr;
187
- overflow: visible;
188
- }
189
165
  }
@@ -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 {
@@ -8,24 +8,17 @@ export interface FlowNavigationProps {
8
8
  /** @default false */
9
9
  done?: boolean;
10
10
  /** Called when the close button is clicked. If not provided the close button won't show */
11
- onClose?: () => void;
11
+ onClose?: (() => void) | React.MouseEventHandler<HTMLButtonElement>;
12
12
  /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */
13
13
  onGoBack?: () => void;
14
14
  /** Steps to be displayed in stepper. If not provided, the stepper won't show. */
15
15
  steps?: readonly Step[];
16
- /**
17
- * When true, renders in composable mode using a fluid Container.
18
- * This allows the FlowNavigation to be used within custom layout containers.
19
- * @default false
20
- */
21
- composable?: boolean;
22
16
  /**
23
17
  * Controls whether the bottom border is displayed.
24
- * Only applies to the composable variant. Non-composable variant always uses the done state.
25
18
  * @default true
26
19
  */
27
20
  showBottomBorder?: boolean;
28
21
  }
29
- declare const FlowNavigation: ({ activeStep, avatar, logo, done, onClose, onGoBack, steps, composable, showBottomBorder, }: FlowNavigationProps) => import("react").JSX.Element;
22
+ declare const FlowNavigation: ({ activeStep, avatar, logo, done, onClose, onGoBack, steps, showBottomBorder, }: FlowNavigationProps) => import("react").JSX.Element;
30
23
  export default FlowNavigation;
31
24
  //# sourceMappingURL=FlowNavigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FlowNavigation.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/FlowNavigation.tsx"],"names":[],"mappings":"AAQA,OAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAWxD,MAAM,WAAW,mBAAmB;IAClC,iBAAiB;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,wBAAwB;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,qBAAqB;IACrB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,2FAA2F;IAC3F,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,sIAAsI;IACtI,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,iFAAiF;IACjF,KAAK,CAAC,EAAE,SAAS,IAAI,EAAE,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,QAAA,MAAM,cAAc,GAAI,6FAUrB,mBAAmB,gCAsFrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"FlowNavigation.d.ts","sourceRoot":"","sources":["../../../src/FlowNavigation/FlowNavigation.tsx"],"names":[],"mappings":"AAQA,OAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAWx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WAAW,CAAC,UAAU,CAAC,CAAC;KAChC,CAAC;IACF,SAAS,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,WAAW,CAAC,EAAE,aAAa,CAAC,CAAC;IACtE;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB,GAAG,IAAI,CAAC,oBAAoB,EAAE,IAAI,GAAG,WAAW,GAAG,aAAa,CAAC,CAAC;AAEnE;;;;;GAKG;AACH,eAAO,MAAM,cAAc,GAAI,4IAY5B,mBAAmB,gCA4HrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"OverlayHeader.d.ts","sourceRoot":"","sources":["../../../../src/_deprecated/OverlayHeader/OverlayHeader.tsx"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAID;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAkB,EAAE,EAAE,kBAAkB,+BAiBhG"}
1
+ {"version":3,"file":"OverlayHeader.d.ts","sourceRoot":"","sources":["../../../../src/_deprecated/OverlayHeader/OverlayHeader.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,gBAAgB;IAChB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;CACtD;AAID;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,IAAkB,EAAE,EAAE,kBAAkB,+BAEhG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-a6aaad9",
3
+ "version": "0.0.0-experimental-a39eaa6",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -4,7 +4,12 @@
4
4
  justify-content: center;
5
5
  width: 100%;
6
6
  box-sizing: border-box;
7
- min-height: 96px;
7
+ min-height: 80px;
8
+ }
9
+ @media (min-width: 320.02px) {
10
+ .np-flow-navigation {
11
+ min-height: 128px;
12
+ }
8
13
  }
9
14
  .np-flow-navigation--border-bottom {
10
15
  border-bottom: 1px solid rgba(0,0,0,0.10196);
@@ -13,7 +18,7 @@
13
18
  .np-flow-navigation__content {
14
19
  width: 100%;
15
20
  min-width: 320px;
16
- max-width: calc(1160px - 36px);
21
+ max-width: none;
17
22
  }
18
23
  .np-flow-navigation__stepper {
19
24
  padding-bottom: 0 !important;
@@ -72,17 +77,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
72
77
  .np-flow-navigation--hidden {
73
78
  visibility: hidden;
74
79
  }
75
- .np-flow-navigation--composable {
76
- min-height: 80px;
77
- }
78
- @media (min-width: 320.02px) {
79
- .np-flow-navigation--composable {
80
- min-height: 128px;
81
- }
82
- }
83
- .np-flow-navigation--composable .np-flow-navigation__content {
84
- max-width: none;
85
- }
86
80
  .np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
87
81
  .np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
88
82
  .np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
@@ -9,7 +9,11 @@
9
9
  box-sizing: border-box;
10
10
 
11
11
  // This is the natural height of FlowNavigation when the Avatar is displayed.
12
- min-height: 96px;
12
+ min-height: 80px;
13
+
14
+ @media (--screen-xs) {
15
+ min-height: 128px;
16
+ }
13
17
 
14
18
  &--border-bottom {
15
19
  border-bottom: 1px solid var(--color-border-neutral);
@@ -18,7 +22,7 @@
18
22
  &__content {
19
23
  width: 100%;
20
24
  min-width: 320px;
21
- max-width: calc(@screen-lg-min - 36px);
25
+ max-width: none;
22
26
  }
23
27
 
24
28
  &__stepper {
@@ -69,19 +73,6 @@
69
73
  visibility: hidden;
70
74
  }
71
75
 
72
- &--composable {
73
- min-height: 80px;
74
-
75
- @media (--screen-xs) {
76
- min-height: 128px;
77
- }
78
-
79
- .np-flow-navigation__content {
80
- // Remove max-width constraint for fluid layout
81
- max-width: none;
82
- }
83
- }
84
-
85
76
  .np-theme-personal--forest-green &,
86
77
  .np-theme-personal--bright-green &,
87
78
  .np-theme-personal--dark & {
@@ -26,20 +26,13 @@ export interface FlowNavigationProps {
26
26
  /** @default false */
27
27
  done?: boolean;
28
28
  /** Called when the close button is clicked. If not provided the close button won't show */
29
- onClose?: () => void;
29
+ onClose?: (() => void) | React.MouseEventHandler<HTMLButtonElement>;
30
30
  /** Called when the back button is clicked. If not provided the back button won't show. The back button only shows on small screens */
31
31
  onGoBack?: () => void;
32
32
  /** Steps to be displayed in stepper. If not provided, the stepper won't show. */
33
33
  steps?: readonly Step[];
34
- /**
35
- * When true, renders in composable mode using a fluid Container.
36
- * This allows the FlowNavigation to be used within custom layout containers.
37
- * @default false
38
- */
39
- composable?: boolean;
40
34
  /**
41
35
  * Controls whether the bottom border is displayed.
42
- * Only applies to the composable variant. Non-composable variant always uses the done state.
43
36
  * @default true
44
37
  */
45
38
  showBottomBorder?: boolean;
@@ -53,7 +46,6 @@ const FlowNavigation = ({
53
46
  onClose,
54
47
  onGoBack,
55
48
  steps,
56
- composable = false,
57
49
  showBottomBorder = true,
58
50
  }: FlowNavigationProps) => {
59
51
  const intl = useIntl();
@@ -69,7 +61,6 @@ const FlowNavigation = ({
69
61
  <FlowHeader
70
62
  className={clsx(
71
63
  'np-flow-navigation__content',
72
- !composable && 'p-x-3',
73
64
  screenSm == null
74
65
  ? 'np-flow-navigation--hidden'
75
66
  : {
@@ -119,27 +110,15 @@ const FlowNavigation = ({
119
110
  />
120
111
  );
121
112
 
122
- if (composable) {
123
- return (
124
- <Container
125
- size="fluid"
126
- className={clsx('np-flow-navigation np-flow-navigation--composable', {
127
- 'np-flow-navigation--border-bottom': showBottomBorder,
128
- })}
129
- >
130
- {flowHeaderContent}
131
- </Container>
132
- );
133
- }
134
-
135
113
  return (
136
- <div
137
- className={clsx('np-flow-navigation p-y-3', {
138
- 'np-flow-navigation--border-bottom': !done,
114
+ <Container
115
+ size="fluid"
116
+ className={clsx('np-flow-navigation', {
117
+ 'np-flow-navigation--border-bottom': showBottomBorder,
139
118
  })}
140
119
  >
141
120
  {flowHeaderContent}
142
- </div>
121
+ </Container>
143
122
  );
144
123
  };
145
124
 
@@ -384,89 +384,6 @@ export const WithOverlayHeaderComparison: Story = {
384
384
  },
385
385
  };
386
386
 
387
- export const ComposableVariant: Story = {
388
- args: {
389
- profileType: ProfileType.PERSONAL,
390
- showCloseButton: true,
391
- showMobileBackButton: true,
392
- done: false,
393
- avatarURL: '../tapestry-01.png',
394
- },
395
- parameters: {
396
- padding: '0',
397
- chromatic: {
398
- viewports,
399
- },
400
- },
401
- render: (args) => {
402
- const [activeStep, setActiveStep] = useState(2);
403
- const steps = [
404
- {
405
- label: 'Recipient',
406
- onClick: () => setActiveStep(0),
407
- },
408
- {
409
- label: 'Amount',
410
- hoverLabel: (
411
- <>
412
- You send 100 GBP <br />
413
- You get 99.39 GBP{' '}
414
- </>
415
- ),
416
- ...(activeStep > 1 && { onClick: () => setActiveStep(1) }),
417
- },
418
- {
419
- label: 'Review',
420
- ...(activeStep > 2 && { onClick: () => setActiveStep(2) }),
421
- },
422
- {
423
- label: 'Pay',
424
- ...(activeStep > 3 && { onClick: () => setActiveStep(3) }),
425
- },
426
- ];
427
- return (
428
- <>
429
- <FlowNavigation
430
- composable
431
- avatar={<AvatarView profileType={args.profileType} />}
432
- logo={<Logo />}
433
- activeStep={activeStep}
434
- steps={steps}
435
- onClose={args.showCloseButton ? () => alert('close') : undefined}
436
- onGoBack={
437
- args.showMobileBackButton
438
- ? () => setActiveStep(activeStep > 0 ? activeStep - 1 : 0)
439
- : undefined
440
- }
441
- />
442
- <Container size="narrow">
443
- <Body className="m-a-3">
444
- <Display type={Typography.DISPLAY_SMALL}>{steps[activeStep].label} Step</Display>
445
- <br />
446
- {lorem10}
447
- </Body>
448
- </Container>
449
-
450
- <Sticky>
451
- <Container
452
- size="narrow"
453
- className="d-flex justify-content-center align-items-center p-y-3"
454
- >
455
- <Button
456
- v2
457
- disabled={activeStep === 3}
458
- block
459
- onClick={() => setActiveStep(activeStep + 1)}
460
- >
461
- Continue
462
- </Button>
463
- </Container>
464
- </Sticky>
465
- </>
466
- );
467
- },
468
- };
469
-
470
387
  export const WithoutStepper: Story = {
471
388
  args: {
472
389
  profileType: ProfileType.PERSONAL,
@@ -575,7 +492,6 @@ export const BorderControl: Story = {
575
492
 
576
493
  {/* Composable: showBottomBorder=true, done=false - SHOWS BORDER */}
577
494
  <FlowNavigation
578
- composable
579
495
  avatar={<AvatarView profileType={args.profileType} />}
580
496
  logo={<Logo />}
581
497
  activeStep={activeStep}
@@ -591,7 +507,6 @@ export const BorderControl: Story = {
591
507
 
592
508
  {/* Composable: showBottomBorder=true, done=true - SHOWS BORDER */}
593
509
  <FlowNavigation
594
- composable
595
510
  avatar={<AvatarView profileType={args.profileType} />}
596
511
  logo={<Logo />}
597
512
  activeStep={activeStep}
@@ -607,7 +522,6 @@ export const BorderControl: Story = {
607
522
 
608
523
  {/* Composable: showBottomBorder=false, done=false - HIDES BORDER */}
609
524
  <FlowNavigation
610
- composable
611
525
  avatar={<AvatarView profileType={args.profileType} />}
612
526
  logo={<Logo />}
613
527
  activeStep={activeStep}
@@ -155,25 +155,6 @@
155
155
  mask: var(--critical-banner-overhang-mask);
156
156
  }
157
157
  }
158
- .wds-critical-banner__entry-mask {
159
- display: grid;
160
- grid-template-rows: 0fr;
161
- overflow: hidden;
162
- animation: wds-critical-banner-reveal-height 400ms cubic-bezier(0.3, 0, 0.1, 1) both;
163
- }
164
- .wds-critical-banner__entry-track {
165
- min-height: 0;
166
- }
167
- @keyframes wds-critical-banner-reveal-height {
168
- from {
169
- grid-template-rows: 0fr;
170
- overflow: hidden;
171
- }
172
- to {
173
- grid-template-rows: 1fr;
174
- overflow: visible;
175
- }
176
- }
177
158
  @media (prefers-reduced-motion: reduce) {
178
159
  .wds-critical-banner__description,
179
160
  .wds-critical-banner__title,
@@ -181,9 +162,4 @@
181
162
  .wds-critical-banner__toggle {
182
163
  transition: none !important;
183
164
  }
184
- .wds-critical-banner__entry-mask {
185
- animation: none;
186
- grid-template-rows: 1fr;
187
- overflow: visible;
188
- }
189
165
  }
@@ -193,32 +193,6 @@
193
193
  }
194
194
  }
195
195
 
196
- // Entry animation: immediately reveal the already-positioned banner over 400ms.
197
- // The mask clips only during the reveal, then becomes visible so actions are not
198
- // clipped after the animation.
199
- .wds-critical-banner__entry-mask {
200
- display: grid;
201
- grid-template-rows: 0fr;
202
- overflow: hidden;
203
- animation: wds-critical-banner-reveal-height 400ms cubic-bezier(0.3, 0, 0.1, 1) both;
204
- }
205
-
206
- .wds-critical-banner__entry-track {
207
- min-height: 0;
208
- }
209
-
210
- @keyframes wds-critical-banner-reveal-height {
211
- from {
212
- grid-template-rows: 0fr;
213
- overflow: hidden;
214
- }
215
-
216
- to {
217
- grid-template-rows: 1fr;
218
- overflow: visible;
219
- }
220
- }
221
-
222
196
  // Reduced motion support
223
197
  @media (prefers-reduced-motion: reduce) {
224
198
  .wds-critical-banner__description,
@@ -227,10 +201,4 @@
227
201
  .wds-critical-banner__toggle {
228
202
  transition: none !important;
229
203
  }
230
-
231
- .wds-critical-banner__entry-mask {
232
- animation: none;
233
- grid-template-rows: 1fr;
234
- overflow: visible;
235
- }
236
204
  }
@@ -15,7 +15,7 @@ describe('CriticalBanner', () => {
15
15
  resetLiveRegionAnnouncementQueue();
16
16
  });
17
17
 
18
- it('applies mobile overhang classes by default', () => {
18
+ it('renders mobile overhang markup without entry animation markup', () => {
19
19
  const { container } = render(
20
20
  <CriticalBanner {...defaultProps} data-testid="critical-banner" />,
21
21
  );
@@ -23,15 +23,7 @@ describe('CriticalBanner', () => {
23
23
  expect(screen.getByTestId('critical-banner')).toBeInTheDocument();
24
24
  expect(container.querySelector('.wds-critical-banner-overhang')).toBeInTheDocument();
25
25
  expect(container.querySelector('.wds-critical-banner-overhang-query')).toBeInTheDocument();
26
- });
27
-
28
- it('wraps the banner in the css entry animation structure', () => {
29
- const { container } = render(
30
- <CriticalBanner {...defaultProps} data-testid="critical-banner" />,
31
- );
32
-
33
- expect(screen.getByTestId('critical-banner')).toBeInTheDocument();
34
- expect(container.querySelector('.wds-critical-banner__entry-mask')).toBeInTheDocument();
35
- expect(container.querySelector('.wds-critical-banner__entry-track')).toBeInTheDocument();
26
+ expect(container.querySelector('.wds-critical-banner__entry-mask')).not.toBeInTheDocument();
27
+ expect(container.querySelector('.wds-critical-banner__entry-track')).not.toBeInTheDocument();
36
28
  });
37
29
  });
@@ -179,11 +179,7 @@ export const CriticalBanner = ({
179
179
  actionSecondaryLabel: actionSecondary?.label,
180
180
  })}
181
181
  >
182
- <div className="wds-critical-banner-overhang-query">
183
- <div className="wds-critical-banner__entry-mask">
184
- <div className="wds-critical-banner__entry-track">{bannerSurface}</div>
185
- </div>
186
- </div>
182
+ <div className="wds-critical-banner-overhang-query">{bannerSurface}</div>
187
183
  </LiveRegion>
188
184
  );
189
185
  };
@@ -66,10 +66,7 @@ Screen readers announce the banner content whenever:
66
66
 
67
67
  ## Reduced Motion
68
68
 
69
- `CriticalBanner` respects the user's reduced motion preference. When reduced motion is on, the component does not show:
70
-
71
- - the entry animation that reveals the banner from above when it first appears
72
- - the collapse and expand animation used when the user toggles the banner content
69
+ `CriticalBanner` respects the user's reduced motion preference. When reduced motion is on, the component does not show the collapse and expand animation used when the user toggles the banner content.
73
70
 
74
71
  The same content is still rendered and announced. Reduced motion only removes the visual movement.
75
72
 
@@ -137,21 +137,6 @@ const hiddenArgTypes = {
137
137
  'data-testid': { table: { disable: true } },
138
138
  } as const;
139
139
 
140
- const AnimatedEntryPreview = (args: CriticalBannerProps) => {
141
- const [bannerInstance, setBannerInstance] = useState(0);
142
-
143
- return (
144
- <>
145
- <CriticalBanner key={bannerInstance} {...args} />
146
- <div className="p-t-3">
147
- <Button block v2 onClick={() => setBannerInstance((current) => current + 1)}>
148
- Replay
149
- </Button>
150
- </div>
151
- </>
152
- );
153
- };
154
-
155
140
  /** Renders children inside an iframe that inherits the parent page's stylesheets. */
156
141
  function IframeContainer({ width, children }: { width: number; children: ReactNode }) {
157
142
  const iframeRef = useRef<HTMLIFrameElement>(null);
@@ -600,23 +585,6 @@ export const MobileOverhang: Story = {
600
585
  },
601
586
  };
602
587
 
603
- /** The banner reveals from above immediately when it enters the page. */
604
- export const AnimatedEntry: Story = {
605
- args: {
606
- title: 'Your account is restricted.',
607
- description: 'Review your personal details to get your account active again.',
608
- action: { label: 'Review details', onClick: fn() },
609
- },
610
- argTypes: hiddenArgTypes,
611
- render: (args) => <AnimatedEntryPreview {...args} />,
612
- parameters: {
613
- layout: 'fullscreen',
614
- docs: {
615
- canvas: { sourceState: 'hidden' },
616
- },
617
- },
618
- };
619
-
620
588
  /**
621
589
  * The text container is capped at 480px for optimal readability, even though
622
590
  * the banner itself stretches to the full available width.