@transferwise/components 38.3.1 → 38.5.0
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/CHANGELOG.md +33 -0
- package/build/es/no-polyfill/common/focusBoundary/FocusBoundary.js +1 -1
- package/build/es/no-polyfill/dimmer/Dimmer.js +4 -3
- package/build/es/no-polyfill/dimmer/Dimmer.story.js +1 -0
- package/build/es/no-polyfill/section/Section.js +1 -1
- package/build/es/no-polyfill/section/Section.story.js +1 -1
- package/build/es/no-polyfill/uploadInput/UploadInput.js +5 -4
- package/build/es/no-polyfill/uploadInput/UploadInput.spec.js +1 -1
- package/build/es/no-polyfill/uploadInput/UploadInput.story.js +1 -1
- package/build/es/polyfill/common/focusBoundary/FocusBoundary.js +1 -1
- package/build/es/polyfill/dimmer/Dimmer.js +4 -3
- package/build/es/polyfill/dimmer/Dimmer.story.js +1 -0
- package/build/es/polyfill/section/Section.js +1 -1
- package/build/es/polyfill/section/Section.story.js +1 -1
- package/build/es/polyfill/uploadInput/UploadInput.js +5 -4
- package/build/es/polyfill/uploadInput/UploadInput.spec.js +1 -1
- package/build/es/polyfill/uploadInput/UploadInput.story.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/accordion/Accordion.css +1 -1
- package/build/styles/card/Card.css +1 -1
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/dimmer/Dimmer.css +1 -1
- package/build/styles/header/Header.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/modal/Modal.css +1 -1
- package/build/styles/section/Section.css +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts +2 -2
- package/build/types/dimmer/Dimmer.d.ts +31 -19
- package/build/types/dimmer/Dimmer.story.d.ts +16 -0
- package/build/types/section/Section.d.ts +4 -2
- package/build/types/section/Section.story.d.ts +3 -2
- package/build/types/uploadInput/UploadInput.d.ts +7 -1
- package/build/types/uploadInput/UploadInput.story.d.ts +1 -0
- package/build/types/withNextPortal/withNextPortal.d.ts +2 -1
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +5 -4
|
@@ -4,7 +4,7 @@ declare function FocusBoundary({ children }: {
|
|
|
4
4
|
}): JSX.Element;
|
|
5
5
|
declare namespace FocusBoundary {
|
|
6
6
|
namespace propTypes {
|
|
7
|
-
const children:
|
|
7
|
+
const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
import
|
|
10
|
+
import PropTypes from "prop-types";
|
|
@@ -1,19 +1,31 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
disableClickToClose?: boolean;
|
|
7
|
-
fadeContentOnEnter?: boolean;
|
|
8
|
-
fadeContentOnExit?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { MouseEvent, ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { CommonProps } from '../common';
|
|
3
|
+
export declare const EXIT_ANIMATION = 350;
|
|
4
|
+
declare type DimmerProps = CommonProps & {
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
disableClickToClose?: boolean;
|
|
7
|
+
fadeContentOnEnter?: boolean;
|
|
8
|
+
fadeContentOnExit?: boolean;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
scrollable?: boolean;
|
|
11
|
+
transparent?: boolean;
|
|
12
|
+
onClose?: (event: KeyboardEvent | MouseEvent) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const handleTouchMove: (event: Event) => void;
|
|
15
|
+
declare const Dimmer: ({ children, className, disableClickToClose, fadeContentOnEnter, fadeContentOnExit, open, scrollable, transparent, onClose, }: DimmerProps) => JSX.Element;
|
|
16
|
+
export declare const DimmerContentWrapper: ({ children, scrollBody, }: {
|
|
17
|
+
children: ReactElement;
|
|
18
|
+
scrollBody: boolean;
|
|
19
|
+
}) => ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
20
|
+
export { Dimmer };
|
|
21
|
+
declare const _default: (props: CommonProps & {
|
|
22
|
+
children?: ReactNode;
|
|
23
|
+
disableClickToClose?: boolean | undefined;
|
|
24
|
+
fadeContentOnEnter?: boolean | undefined;
|
|
25
|
+
fadeContentOnExit?: boolean | undefined;
|
|
26
|
+
open?: boolean | undefined;
|
|
27
|
+
scrollable?: boolean | undefined;
|
|
28
|
+
transparent?: boolean | undefined;
|
|
29
|
+
onClose?: ((event: KeyboardEvent | MouseEvent<Element, globalThis.MouseEvent>) => void) | undefined;
|
|
30
|
+
}) => import("react").ReactPortal | null;
|
|
31
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
component: (props: import("../common").CommonProps & {
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
disableClickToClose?: boolean | undefined;
|
|
6
|
+
fadeContentOnEnter?: boolean | undefined;
|
|
7
|
+
fadeContentOnExit?: boolean | undefined;
|
|
8
|
+
open?: boolean | undefined;
|
|
9
|
+
scrollable?: boolean | undefined;
|
|
10
|
+
transparent?: boolean | undefined;
|
|
11
|
+
onClose?: ((event: KeyboardEvent | import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
12
|
+
}) => import("react").ReactPortal | null;
|
|
13
|
+
title: string;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
export declare const Basic: () => JSX.Element;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { CommonProps } from '../common';
|
|
3
|
-
declare type SectionProps = PropsWithChildren<CommonProps
|
|
3
|
+
declare type SectionProps = PropsWithChildren<CommonProps & {
|
|
4
|
+
withHorizontalPadding?: boolean;
|
|
5
|
+
}>;
|
|
4
6
|
/**
|
|
5
7
|
*
|
|
6
8
|
* Neptune Web: https://transferwise.github.io/neptune-web/components/content/Section
|
|
7
9
|
*
|
|
8
10
|
*/
|
|
9
|
-
declare const Section: ({ children, className }: SectionProps) => JSX.Element;
|
|
11
|
+
declare const Section: ({ children, className, withHorizontalPadding }: SectionProps) => JSX.Element;
|
|
10
12
|
export default Section;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const _default: {
|
|
3
|
-
component: ({ children, className }: import("../common").CommonProps & {
|
|
3
|
+
component: ({ children, className, withHorizontalPadding }: import("../common").CommonProps & {
|
|
4
|
+
withHorizontalPadding?: boolean | undefined;
|
|
5
|
+
} & {
|
|
4
6
|
children?: import("react").ReactNode;
|
|
5
7
|
}) => JSX.Element;
|
|
6
8
|
title: string;
|
|
@@ -11,4 +13,3 @@ export declare const WithHeader: () => JSX.Element;
|
|
|
11
13
|
export declare const withAccordion: () => JSX.Element;
|
|
12
14
|
export declare const WithCards: () => JSX.Element;
|
|
13
15
|
export declare const WithNavigationOptions: () => JSX.Element;
|
|
14
|
-
export declare const WithNavigationOptionsList: () => JSX.Element;
|
|
@@ -31,6 +31,12 @@ export declare type UploadInputProps = {
|
|
|
31
31
|
* @param file
|
|
32
32
|
*/
|
|
33
33
|
onValidationError?: (file: UploadedFile) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Provide a callback to trigger on change whenever the files are updated
|
|
36
|
+
*
|
|
37
|
+
* @param files
|
|
38
|
+
*/
|
|
39
|
+
onFilesChange?: (files: UploadedFile[]) => void;
|
|
34
40
|
/**
|
|
35
41
|
* Confirmation modal displayed on delete
|
|
36
42
|
*/
|
|
@@ -53,5 +59,5 @@ export declare type UploadInputProps = {
|
|
|
53
59
|
cancelText?: string;
|
|
54
60
|
};
|
|
55
61
|
} & Pick<UploadButtonProps, 'disabled' | 'multiple' | 'fileTypes' | 'sizeLimit'> & Pick<UploadItemProps, 'onDownload'> & CommonProps;
|
|
56
|
-
declare const UploadInput: ({ files, fileInputName, className, deleteConfirm, disabled, multiple, fileTypes, sizeLimit, onUploadFile, onDeleteFile, onValidationError, onDownload, }: UploadInputProps) => ReactElement;
|
|
62
|
+
declare const UploadInput: ({ files, fileInputName, className, deleteConfirm, disabled, multiple, fileTypes, sizeLimit, onUploadFile, onDeleteFile, onValidationError, onFilesChange, onDownload, }: UploadInputProps) => ReactElement;
|
|
57
63
|
export default UploadInput;
|
|
@@ -13,3 +13,4 @@ export declare const WithUploadFailed: Story<UploadInputProps>;
|
|
|
13
13
|
export declare const WithDeleteFailed: Story<UploadInputProps>;
|
|
14
14
|
export declare const CustomConfirmMessage: Story<UploadInputProps>;
|
|
15
15
|
export declare const withManualDownloadHandler: Story<UploadInputProps>;
|
|
16
|
+
export declare const withFilesChangeHandler: Story<UploadInputProps>;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentType } from 'react';
|
|
2
|
+
export default function withNextPortalWrapper<T>(Component: ComponentType<T>): (props: T) => import("react").ReactPortal | null;
|