@transferwise/components 46.93.1 → 46.93.2
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.
- package/build/button/LegacyButton.js +0 -2
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +0 -2
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/carousel/Carousel.js +1 -3
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs +1 -3
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js +1 -1
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs +1 -1
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.js +3 -3
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.mjs +3 -3
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -1
- package/build/common/panel/Panel.js +3 -8
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +3 -8
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -1
- package/build/dropFade/DropFade.js.map +1 -1
- package/build/dropFade/DropFade.mjs.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -1
- package/build/inputs/Input.js +1 -3
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs +1 -3
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/SelectInput.js +1 -3
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +1 -3
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/_ButtonInput.js +1 -3
- package/build/inputs/_ButtonInput.js.map +1 -1
- package/build/inputs/_ButtonInput.mjs +1 -3
- package/build/inputs/_ButtonInput.mjs.map +1 -1
- package/build/inputs/_Popover.js +1 -3
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +1 -3
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/moneyInput/currencyFormatting.js +2 -2
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs +2 -2
- package/build/moneyInput/currencyFormatting.mjs.map +1 -1
- package/build/nudge/Nudge.js +0 -2
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +0 -2
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/promoCard/PromoCardContext.js +0 -1
- package/build/promoCard/PromoCardContext.js.map +1 -1
- package/build/promoCard/PromoCardContext.mjs +0 -1
- package/build/promoCard/PromoCardContext.mjs.map +1 -1
- package/build/promoCard/PromoCardGroup.js +0 -1
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardGroup.mjs +0 -1
- package/build/promoCard/PromoCardGroup.mjs.map +1 -1
- package/build/select/Select.js +19 -25
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +19 -25
- package/build/select/Select.mjs.map +1 -1
- package/build/table/Table.js +1 -3
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.mjs +1 -3
- package/build/table/Table.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +2 -6
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +2 -6
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/types/button/LegacyButton.d.ts.map +1 -1
- package/build/types/carousel/Carousel.d.ts.map +1 -1
- package/build/types/checkbox/Checkbox.d.ts.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +1 -2
- package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/dimmer/dimmerManager/DimmerManager.d.ts +1 -1
- package/build/types/dimmer/dimmerManager/DimmerManager.d.ts.map +1 -1
- package/build/types/dropFade/DropFade.d.ts.map +1 -1
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +2 -2
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardContext.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardGroup.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/table/Table.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/withId/story/source.d.ts +1 -1
- package/build/types/withId/story/source.d.ts.map +1 -1
- package/build/upload/steps/completeStep/completeStep.js +1 -0
- package/build/upload/steps/completeStep/completeStep.js.map +1 -1
- package/build/upload/steps/completeStep/completeStep.mjs +1 -0
- package/build/upload/steps/completeStep/completeStep.mjs.map +1 -1
- package/build/upload/steps/processingStep/processingStep.js +1 -0
- package/build/upload/steps/processingStep/processingStep.js.map +1 -1
- package/build/upload/steps/processingStep/processingStep.mjs +1 -0
- package/build/upload/steps/processingStep/processingStep.mjs.map +1 -1
- package/package.json +6 -3
- package/src/accordion/Accordion.story.tsx +2 -2
- package/src/alert/Alert.story.tsx +4 -4
- package/src/alert/Alert.tests.story.tsx +3 -3
- package/src/button/LegacyButton.tsx +0 -2
- package/src/carousel/Carousel.spec.tsx +0 -4
- package/src/carousel/Carousel.tsx +0 -1
- package/src/checkbox/Checkbox.tsx +0 -1
- package/src/checkboxButton/CheckboxButton.story.tsx +0 -2
- package/src/checkboxButton/CheckboxButton.tsx +1 -1
- package/src/checkboxOption/CheckboxOption.tsx +1 -2
- package/src/common/bottomSheet/BottomSheet.spec.tsx +0 -1
- package/src/common/bottomSheet/BottomSheet.story.tsx +1 -1
- package/src/common/bottomSheet/BottomSheet.tsx +0 -1
- package/src/common/dateUtils/isDateValid/isDateValid.ts +5 -3
- package/src/common/hooks/useHasIntersected/useHasIntersected.spec.js +0 -2
- package/src/common/panel/Panel.tsx +2 -13
- package/src/dimmer/Dimmer.spec.tsx +3 -1
- package/src/dimmer/Dimmer.story.tsx +3 -2
- package/src/dimmer/dimmerManager/DimmerManager.ts +1 -1
- package/src/display/Display.story.tsx +0 -2
- package/src/drawer/Drawer.story.tsx +6 -4
- package/src/dropFade/DropFade.story.tsx +1 -2
- package/src/dropFade/DropFade.tsx +0 -1
- package/src/emphasis/EmphasisHtmlTransformer.spec.tsx +4 -4
- package/src/emphasis/EmphasisHtmlTransformer.ts +2 -2
- package/src/flowNavigation/FlowNavigation.story.tsx +6 -1
- package/src/inputs/Input.tsx +0 -1
- package/src/inputs/SelectInput.story.tsx +6 -2
- package/src/inputs/SelectInput.tsx +1 -7
- package/src/inputs/_ButtonInput.tsx +0 -1
- package/src/inputs/_Popover.tsx +0 -1
- package/src/link/Link.story.tsx +0 -1
- package/src/listItem/ListItem.story.tsx +0 -2
- package/src/markdown/Markdown.spec.tsx +0 -1
- package/src/modal/Modal.story.tsx +14 -4
- package/src/moneyInput/currencyFormatting.ts +3 -3
- package/src/nudge/Nudge.tsx +0 -2
- package/src/popover/Popover.story.tsx +10 -2
- package/src/promoCard/PromoCardContext.tsx +0 -1
- package/src/promoCard/PromoCardGroup.story.tsx +3 -15
- package/src/promoCard/PromoCardGroup.tsx +0 -1
- package/src/provider/theme/ThemeProvider.story.tsx +3 -5
- package/src/select/Select.spec.tsx +0 -1
- package/src/select/Select.tsx +0 -3
- package/src/select/option/Option.spec.js +2 -2
- package/src/selectOption/SelectOption.story.tsx +1 -2
- package/src/slidingPanel/SlidingPanel.story.tsx +1 -1
- package/src/table/Table.tsx +0 -1
- package/src/test-utils/jest.setup.ts +0 -1
- package/src/tooltip/Tooltip.tsx +0 -2
- package/src/upload/Upload.events.spec.js +4 -4
- package/src/upload/steps/completeStep/completeStep.tsx +1 -1
- package/src/upload/steps/processingStep/processingStep.tsx +1 -1
- package/src/withId/story/source.tsx +1 -1
- package/src/withId/withId.story.tsx +3 -1
|
@@ -12,10 +12,8 @@ type Story = StoryObj<typeof ThemeProvider>;
|
|
|
12
12
|
|
|
13
13
|
export const PlatformTheme: Story = {
|
|
14
14
|
render: () => (
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
</ThemeProvider>
|
|
19
|
-
</>
|
|
15
|
+
<ThemeProvider theme="platform">
|
|
16
|
+
<Button>Button</Button>
|
|
17
|
+
</ThemeProvider>
|
|
20
18
|
),
|
|
21
19
|
};
|
|
@@ -31,7 +31,6 @@ describe('Select', () => {
|
|
|
31
31
|
beforeEach(() => {
|
|
32
32
|
global.requestAnimationFrame = (callback) => setTimeout(callback, 16);
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line jest/prefer-spy-on
|
|
35
34
|
Element.prototype.scrollIntoView = mockScrollIntoView;
|
|
36
35
|
|
|
37
36
|
enableDesktopScreen();
|
package/src/select/Select.tsx
CHANGED
|
@@ -448,12 +448,10 @@ export default function Select({
|
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
// eslint-disable-next-line react/prop-types
|
|
452
451
|
function SeparatorOption() {
|
|
453
452
|
return <li className={s('np-separator')} aria-hidden />;
|
|
454
453
|
}
|
|
455
454
|
|
|
456
|
-
// eslint-disable-next-line react/prop-types
|
|
457
455
|
function HeaderOption({ children }: { children?: React.ReactNode }) {
|
|
458
456
|
return (
|
|
459
457
|
<li // eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
|
|
@@ -500,7 +498,6 @@ export default function Select({
|
|
|
500
498
|
: createSelectHandlerForOption(selectOption);
|
|
501
499
|
|
|
502
500
|
return (
|
|
503
|
-
/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
|
|
504
501
|
<li
|
|
505
502
|
ref={isFocusedWithKeyboard ? keyboardFocusedReference : undefined}
|
|
506
503
|
key={index}
|
|
@@ -17,12 +17,12 @@ describe('option', () => {
|
|
|
17
17
|
|
|
18
18
|
it('renders the given small note', () => {
|
|
19
19
|
component.setProps({ note: 'whadup' });
|
|
20
|
-
expect(component.find(Body).last().props().children).
|
|
20
|
+
expect(component.find(Body).last().props().children).toBe('whadup');
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
it('renders the given secondary text in a separate line', () => {
|
|
24
24
|
component.setProps({ secondary: 'secondary text' });
|
|
25
|
-
expect(component.find(Body).last().props().children).
|
|
25
|
+
expect(component.find(Body).last().props().children).toBe('secondary text');
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
it('renders a given icon', () => {
|
|
@@ -175,8 +175,8 @@ export const Basic: Story = {
|
|
|
175
175
|
options: balances,
|
|
176
176
|
},
|
|
177
177
|
render: (args: SelectOptionProps) => {
|
|
178
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
179
178
|
const [selected, setSelected] = useState<SelectOptionValue | undefined>(undefined);
|
|
179
|
+
|
|
180
180
|
function onChange(value: SelectOptionValue): void {
|
|
181
181
|
setSelected(value);
|
|
182
182
|
}
|
|
@@ -194,7 +194,6 @@ export const Basic: Story = {
|
|
|
194
194
|
|
|
195
195
|
export const Variants: Story = {
|
|
196
196
|
render: () => {
|
|
197
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
198
197
|
const [selected, setSelected] = useState<SelectOptionValue<CustomData>>({
|
|
199
198
|
...paymentMethods[1].options[1],
|
|
200
199
|
content: null,
|
|
@@ -17,7 +17,7 @@ export const Basic = () => {
|
|
|
17
17
|
|
|
18
18
|
return (
|
|
19
19
|
<>
|
|
20
|
-
<Button style={{ marginTop: 80 }} onClick={() => setOpen(!open)}>
|
|
20
|
+
<Button v2 style={{ marginTop: 80 }} onClick={() => setOpen(!open)}>
|
|
21
21
|
Open Sliding Panel
|
|
22
22
|
</Button>
|
|
23
23
|
<SlidingPanel open={open} position={position}>
|
package/src/table/Table.tsx
CHANGED
|
@@ -113,7 +113,6 @@ const Table = ({
|
|
|
113
113
|
'np-table-outer-container--center': !fullWidth,
|
|
114
114
|
'np-table-outer-container--full-width': fullWidth,
|
|
115
115
|
})}
|
|
116
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
117
116
|
tabIndex={0}
|
|
118
117
|
data-testid="np-table-outer-container"
|
|
119
118
|
>
|
|
@@ -7,7 +7,6 @@ import fetchMock from 'jest-fetch-mock';
|
|
|
7
7
|
|
|
8
8
|
global.fetch = fetchMock as unknown as typeof global.fetch;
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
11
10
|
Enzyme.configure({ adapter: new Adapter() });
|
|
12
11
|
|
|
13
12
|
global.requestAnimationFrame = (callback: (time: number) => void): number => {
|
package/src/tooltip/Tooltip.tsx
CHANGED
|
@@ -98,7 +98,6 @@ const Tooltip = ({
|
|
|
98
98
|
open ? `np-panel--open np-tooltip--open` : null,
|
|
99
99
|
className,
|
|
100
100
|
)}
|
|
101
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
102
101
|
style={{ ...styles.popper }}
|
|
103
102
|
{...attributes.popper}
|
|
104
103
|
aria-hidden={!open}
|
|
@@ -111,7 +110,6 @@ const Tooltip = ({
|
|
|
111
110
|
// @ts-expect-error
|
|
112
111
|
ref={setArrowElement}
|
|
113
112
|
className={clsx('np-panel__arrow')}
|
|
114
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
115
113
|
style={styles.arrow}
|
|
116
114
|
/>
|
|
117
115
|
</div>
|
|
@@ -31,19 +31,19 @@ describe('Upload (events)', () => {
|
|
|
31
31
|
|
|
32
32
|
it('increments dragCounter on dragenter', () => {
|
|
33
33
|
component.find('.droppable').simulate('dragenter', new Event('event'));
|
|
34
|
-
expect(component.instance().dragCounter).
|
|
34
|
+
expect(component.instance().dragCounter).toBe(1);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
it('decrements dragCounter on dragleave', () => {
|
|
38
38
|
component.find('.droppable').simulate('dragleave', new Event('event'));
|
|
39
|
-
expect(component.instance().dragCounter).
|
|
39
|
+
expect(component.instance().dragCounter).toBe(-1);
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
it('reset dragCounter on drop', () => {
|
|
43
43
|
component.find('.droppable').simulate('dragenter', new Event('event'));
|
|
44
|
-
expect(component.instance().dragCounter).
|
|
44
|
+
expect(component.instance().dragCounter).toBe(1);
|
|
45
45
|
component.find('.droppable').simulate('drop', new Event('event'));
|
|
46
|
-
expect(component.instance().dragCounter).
|
|
46
|
+
expect(component.instance().dragCounter).toBe(0);
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
});
|
|
@@ -7,7 +7,7 @@ type DescribedButtonWithIdProps = WithIdProps<DescribedButtonProps>;
|
|
|
7
7
|
function DescribedButton({ id }: DescribedButtonWithIdProps) {
|
|
8
8
|
return (
|
|
9
9
|
<>
|
|
10
|
-
<Button aria-describedby={id}>Continue</Button>
|
|
10
|
+
<Button v2 aria-describedby={id}>Continue</Button>
|
|
11
11
|
|
|
12
12
|
<p id={id} className="text-xs-center m-t-2">
|
|
13
13
|
Enter an amount in either GBP or PLN
|
|
@@ -9,7 +9,9 @@ type DescribedButtonWithIdProps = WithIdProps<DescribedButtonProps>;
|
|
|
9
9
|
function CustomButton({ id }: DescribedButtonWithIdProps) {
|
|
10
10
|
return (
|
|
11
11
|
<>
|
|
12
|
-
<Button aria-describedby={id}>
|
|
12
|
+
<Button v2 aria-describedby={id}>
|
|
13
|
+
Continue
|
|
14
|
+
</Button>
|
|
13
15
|
|
|
14
16
|
<p id={id} className="text-xs-center m-t-2">
|
|
15
17
|
Enter an amount in either GBP or PLN
|