@transferwise/components 0.0.0-experimental-991400c → 0.0.0-experimental-b7a6b24

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/alert/Alert.js"],"names":[],"mappings":";AA8BA,gEAiGC"}
1
+ {"version":3,"file":"Alert.d.ts","sourceRoot":"","sources":["../../../src/alert/Alert.js"],"names":[],"mappings":";AA8BA,gEAyFC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-991400c",
3
+ "version": "0.0.0-experimental-b7a6b24",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -62,13 +62,6 @@ const Alert = (props) => {
62
62
  }
63
63
  }
64
64
 
65
- function calculateAriaLive() {
66
- if ([Sentiment.NEGATIVE, Sentiment.POSITIVE, Sentiment.WARNING].includes(mappedType)) {
67
- return 'assertive';
68
- }
69
- return 'polite';
70
- }
71
-
72
65
  const handleTouchStart = () => setShouldFire(true);
73
66
  const handleTouchMove = () => setShouldFire(false);
74
67
  const handleTouchEnd = (event) => {
@@ -87,7 +80,6 @@ const Alert = (props) => {
87
80
  return (
88
81
  <div
89
82
  role="alert"
90
- aria-live={calculateAriaLive()}
91
83
  className={classNames('alert d-flex', `alert-${mappedType}`, className)}
92
84
  onTouchStart={handleTouchStart}
93
85
  onTouchEnd={handleTouchEnd}
@@ -277,15 +277,6 @@ describe('Alert', () => {
277
277
  expect(component).toHaveClass(classForType(Sentiment.WARNING));
278
278
  expect(screen.getByTestId('warning-icon')).toBeInTheDocument();
279
279
  });
280
-
281
- it('renders warning alerts with aria-live assertive', () => {
282
- component = getComponentWithType(Sentiment.WARNING);
283
- expect(component).toHaveAttribute('aria-live', 'assertive');
284
- });
285
- it('renders neutral alerts with aria-live polite', () => {
286
- component = getComponentWithType(Sentiment.NEUTRAL);
287
- expect(component).toHaveAttribute('aria-live', 'polite');
288
- });
289
280
  });
290
281
 
291
282
  describe('on touch devices', () => {
@@ -4,6 +4,8 @@ import { Flag } from '@wise/art';
4
4
  import { useState } from 'react';
5
5
 
6
6
  import { getMonthNames } from '../common/dateUtils';
7
+ import Drawer from '../drawer';
8
+ import Modal from '../modal';
7
9
 
8
10
  import { SelectInput, type SelectInputItem, SelectInputOptionContent } from './SelectInput';
9
11
 
@@ -262,3 +264,23 @@ export const Currencies: StoryObj<{
262
264
  },
263
265
  },
264
266
  };
267
+
268
+ export const WithinDrawer: StoryObj<{
269
+ onChange: (value: Currency) => void;
270
+ }> = {
271
+ ...Currencies,
272
+ decorators: [
273
+ (Story) => (
274
+ <Drawer open headerTitle="This is the title of the drawer">
275
+ <Story />
276
+ </Drawer>
277
+ ),
278
+ ],
279
+ };
280
+
281
+ export const WithinModal: StoryObj<{
282
+ onChange: (value: Currency) => void;
283
+ }> = {
284
+ ...Currencies,
285
+ decorators: [(Story) => <Modal open body={<Story />} onClose={() => {}} />],
286
+ };
@@ -1,6 +1,6 @@
1
1
  .np-bottom-sheet-v2-container {
2
2
  position: relative;
3
- z-index: 50;
3
+ z-index: 1060;
4
4
  }
5
5
 
6
6
  .np-bottom-sheet-v2-backdrop-container {
@@ -1,5 +1,5 @@
1
1
  .np-popover-v2-container {
2
- z-index: 10;
2
+ z-index: 1060;
3
3
  display: flex;
4
4
  max-height: var(--max-height);
5
5
  width: var(--width);