@transferwise/components 40.7.0 → 40.8.2-beta-2d42507700.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 +24 -0
- package/build/es/no-polyfill/dimmer/dimmerManager/DimmerManager.js +2 -2
- package/build/es/no-polyfill/emphasis/EmphasisHtmlTransformer.js +1 -1
- package/build/es/no-polyfill/header/Header.js +2 -2
- package/build/es/no-polyfill/header/Header.story.js +1 -1
- package/build/es/no-polyfill/index.js +1 -1
- package/build/es/no-polyfill/navigationOption/NavigationOption.js +1 -1
- package/build/es/no-polyfill/progress/Progress.js +1 -0
- package/build/es/no-polyfill/progress/index.js +1 -0
- package/build/es/no-polyfill/progressBar/ProgressBar.js +1 -0
- package/build/es/no-polyfill/progressBar/index.js +1 -0
- package/build/es/no-polyfill/provider/Provider.spec.js +1 -1
- package/build/es/no-polyfill/upload/Upload.js +1 -1
- package/build/es/polyfill/dimmer/dimmerManager/DimmerManager.js +2 -2
- package/build/es/polyfill/emphasis/EmphasisHtmlTransformer.js +1 -1
- package/build/es/polyfill/header/Header.js +2 -2
- package/build/es/polyfill/header/Header.story.js +1 -1
- package/build/es/polyfill/index.js +1 -1
- package/build/es/polyfill/navigationOption/NavigationOption.js +1 -1
- package/build/es/polyfill/progress/Progress.js +1 -0
- package/build/es/polyfill/progress/index.js +1 -0
- package/build/es/polyfill/progressBar/ProgressBar.js +1 -0
- package/build/es/polyfill/progressBar/index.js +1 -0
- package/build/es/polyfill/provider/Provider.spec.js +1 -1
- package/build/es/polyfill/upload/Upload.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/accordion/Accordion.css +1 -1
- package/build/styles/actionButton/ActionButton.css +1 -1
- package/build/styles/avatar/Avatar.css +1 -1
- package/build/styles/badge/Badge.css +1 -1
- package/build/styles/button/Button.css +1 -1
- package/build/styles/card/Card.css +1 -1
- package/build/styles/checkboxButton/CheckboxButton.css +1 -1
- package/build/styles/chips/Chip.css +1 -1
- package/build/styles/circularButton/CircularButton.css +1 -1
- package/build/styles/common/Option/Option.css +1 -1
- package/build/styles/common/RadioButton/RadioButton.css +1 -1
- package/build/styles/common/bottomSheet/BottomSheet.css +1 -1
- package/build/styles/common/closeButton/CloseButton.css +1 -1
- package/build/styles/common/panel/Panel.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/dateLookup/dateTrigger/DateTrigger.css +1 -1
- package/build/styles/decision/Decision.css +1 -1
- package/build/styles/definitionList/DefinitionList.css +1 -1
- package/build/styles/dimmer/Dimmer.css +1 -1
- package/build/styles/drawer/Drawer.css +1 -1
- package/build/styles/dropFade/DropFade.css +1 -1
- package/build/styles/dynamicFieldDefinitionList/FormattedValue/FormattedValue.css +1 -1
- package/build/styles/emphasis/Emphasis.css +1 -1
- package/build/styles/flowNavigation/FlowNavigation.css +1 -1
- package/build/styles/flowNavigation/animatedLabel/AnimatedLabel.css +1 -1
- package/build/styles/header/Header.css +1 -1
- package/build/styles/image/Image.css +1 -1
- package/build/styles/info/Info.css +1 -1
- package/build/styles/lab/mobileNav/MobileNav.css +1 -1
- package/build/styles/lab/pagination/Pagination.css +1 -1
- package/build/styles/link/Link.css +1 -1
- package/build/styles/loader/Loader.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/modal/Modal.css +1 -1
- package/build/styles/moneyInput/MoneyInput.css +1 -1
- package/build/styles/navigationOption/NavigationOption.css +1 -1
- package/build/styles/navigationOptionsList/NavigationOptionsList.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/styles/overlayHeader/OverlayHeader.css +1 -1
- package/build/styles/phoneNumberInput/PhoneNumberInput.css +1 -1
- package/build/styles/popover/Popover.css +1 -1
- package/build/styles/progress/Progress.css +1 -0
- package/build/styles/progressBar/ProgressBar.css +1 -0
- package/build/styles/section/Section.css +1 -1
- package/build/styles/slidingPanel/SlidingPanel.css +1 -1
- package/build/styles/snackbar/Snackbar.css +1 -1
- package/build/styles/stepper/Stepper.css +1 -1
- package/build/styles/summary/Summary.css +1 -1
- package/build/styles/switch/Switch.css +1 -1
- package/build/styles/tabs/Tabs.css +1 -1
- package/build/styles/tile/Tile.css +1 -1
- package/build/styles/tooltip/Tooltip.css +1 -1
- package/build/styles/typeahead/Typeahead.css +1 -1
- package/build/styles/typeahead/typeaheadOption/TypeaheadOption.css +1 -1
- package/build/styles/uploadInput/uploadButton/UploadButton.css +1 -1
- package/build/styles/uploadInput/uploadItem/UploadItem.css +1 -1
- package/build/types/actionButton/ActionButton.d.ts +6 -0
- package/build/types/common/commonProps.d.ts +0 -3
- package/build/types/common/historyNavigator/historyNavigator.d.ts +2 -2
- package/build/types/common/hooks/useConditionalListener/useConditionalListener.d.ts +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts +1 -0
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +1 -0
- package/build/types/header/Header.d.ts +3 -3
- package/build/types/index.d.ts +2 -0
- package/build/types/modal/Modal.story.d.ts +1 -1
- package/build/types/progress/Progress.d.ts +11 -0
- package/build/types/progress/index.d.ts +1 -0
- package/build/types/progressBar/ProgressBar.d.ts +14 -0
- package/build/types/progressBar/index.d.ts +1 -0
- package/build/types/tooltip/Tooltip.story.d.ts +1 -1
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +6 -0
- package/build/types/upload/steps/uploadImageStep/uploadImageStep.d.ts +1 -0
- package/build/types/utilities/deprecatedProperty/deprecatedProperty.d.ts +2 -2
- package/build/types/withDisplayFormat/WithDisplayFormat.d.ts +9 -0
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +7 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
.np-upload-button{
|
|
1
|
+
.np-upload-button{border:0!important;letter-spacing:normal!important;padding:12px 16px;padding:var(--size-12,12px) var(--size-16,16px);text-decoration:none!important;width:100%}.np-upload-button.np-upload-accent{color:#00a2dd;color:var(--color-interactive-accent,#00a2dd)}label.np-upload-button:not(.disabled):active,label.np-upload-button:not(.disabled):focus,label.np-upload-button:not(.disabled):hover{background-color:#86a7bd1a;background-color:var(--color-background-neutral,#86a7bd1a)}.np-upload-button .np-upload-icon{align-items:center;display:flex}.np-upload-button .np-upload-description{font-weight:400;white-space:normal}.np-upload-button-container.droppable{border:0}.np-upload-button-container .droppable-card-content{display:flex}.np-upload-button-container input[type=file]{opacity:0;position:absolute;z-index:-1}.np-upload-button-container input[type=file]:focus+label{background-color:#86a7bd1a;background-color:var(--color-background-neutral,#86a7bd1a)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.np-upload-item:not(:last-child):after{
|
|
1
|
+
.np-upload-item:not(:last-child):after{border-bottom:1px solid #0000001a;border-bottom:1px solid var(--color-border-neutral,#0000001a);content:" ";display:block;margin:0 16px;margin:0 var(--size-16,16px);position:relative}.np-upload-item__link a{flex:1;font-weight:500;font-weight:var(--font-weight-regular,500);outline:none;text-decoration:none}.np-upload-item__link a:active,.np-upload-item__link a:focus,.np-upload-item__link a:hover{background-color:#86a7bd1a;background-color:var(--color-background-neutral,#86a7bd1a);text-decoration:none}.np-upload-item__link a:active~.np-upload-item__remove-button,.np-upload-item__link a:focus~.np-upload-item__remove-button,.np-upload-item__link a:hover~.np-upload-item__remove-button{background-color:#86a7bd1a;background-color:var(--color-background-neutral,#86a7bd1a)}.np-upload-item__body{align-items:center;display:flex;justify-content:space-between}.np-upload-item__remove-button{align-self:stretch;background:transparent;color:#c9cbce;color:var(--color-interactive-secondary,#c9cbce);flex-shrink:0;padding:12px 16px;padding:var(--size-12,12px) var(--size-16,16px)}.np-upload-item__remove-button:focus,.np-upload-item__remove-button:hover{color:#d03238!important;color:var(--color-interactive-negative-hover,#d03238)!important}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, MouseEvent } from 'react';
|
|
2
|
+
export declare type ActionButtonProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
text: string;
|
|
6
|
+
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
7
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
2
8
|
declare const ActionButton: import("react").ForwardRefExoticComponent<{
|
|
3
9
|
className?: string | undefined;
|
|
4
10
|
disabled?: boolean | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default HistoryNavigator;
|
|
2
2
|
declare class HistoryNavigator {
|
|
3
|
-
constructor(history?: any[], historyLimit?:
|
|
3
|
+
constructor(history?: any[], historyLimit?: null);
|
|
4
4
|
history: any[];
|
|
5
5
|
currIndex: number;
|
|
6
|
-
historyLimit:
|
|
6
|
+
historyLimit: number | null;
|
|
7
7
|
reset: (newHistory?: string[], historyLimit?: number) => void;
|
|
8
8
|
add: (element: any) => void;
|
|
9
9
|
redo: () => any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export function useConditionalListener({ attachListener, callback, eventType, parent }:
|
|
1
|
+
export function useConditionalListener({ attachListener, callback, eventType, parent }: bool): void;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ActionButtonProps } from '../actionButton/ActionButton';
|
|
3
|
+
import { AriaLabelProperty, CommonProps, Heading, LinkProps } from '../common';
|
|
3
4
|
declare type ActionProps = AriaLabelProperty & {
|
|
4
5
|
text: string;
|
|
5
6
|
};
|
|
6
|
-
declare type ButtonActionProps = ActionProps & OnClickHandler;
|
|
7
7
|
declare type LinkActionProps = ActionProps & LinkProps;
|
|
8
8
|
export declare type HeaderProps = CommonProps & {
|
|
9
9
|
/**
|
|
10
10
|
* When the `href` property is provided to the `action`, we will render a `Link` instead of a `Button`.
|
|
11
11
|
*
|
|
12
12
|
*/
|
|
13
|
-
action?:
|
|
13
|
+
action?: ActionButtonProps | LinkActionProps;
|
|
14
14
|
/**
|
|
15
15
|
* Override the heading element rendered for the title, useful to specify the semantics of your header.
|
|
16
16
|
*
|
package/build/types/index.d.ts
CHANGED
|
@@ -53,6 +53,8 @@ export { default as OverlayHeader } from './overlayHeader';
|
|
|
53
53
|
export { default as PhoneNumberInput } from './phoneNumberInput';
|
|
54
54
|
export { default as Popover } from './popover';
|
|
55
55
|
export { default as ProcessIndicator } from './processIndicator';
|
|
56
|
+
export { default as ProgressBar } from './progressBar';
|
|
57
|
+
export { default as Progress } from './progress';
|
|
56
58
|
export { default as Provider, DirectionProvider } from './provider';
|
|
57
59
|
export { default as Radio } from './radio';
|
|
58
60
|
export { default as RadioGroup } from './radioGroup';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
declare type ProgressProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
id: string;
|
|
5
|
+
progress: {
|
|
6
|
+
value: number;
|
|
7
|
+
max: number;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare const Progress: ({ className, id, progress }: ProgressProps) => ReactElement | null;
|
|
11
|
+
export default Progress;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Progress';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
declare type ProgressBarProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
progress: {
|
|
8
|
+
value: number;
|
|
9
|
+
max: number;
|
|
10
|
+
};
|
|
11
|
+
textEnd: string;
|
|
12
|
+
};
|
|
13
|
+
declare const ProgressBar: ({ className, description, id, title, progress, textEnd, }: ProgressBarProps) => ReactElement | null;
|
|
14
|
+
export default ProgressBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ProgressBar';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const _default: {
|
|
3
3
|
component: ({ position, children, label, className, }: {
|
|
4
|
-
position?: "
|
|
4
|
+
position?: "top" | "bottom" | "left" | "right" | undefined;
|
|
5
5
|
label: import("react").ReactNode;
|
|
6
6
|
} & {
|
|
7
7
|
children?: import("react").ReactNode;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
declare class TypeaheadInput extends Component<any, any, any> {
|
|
2
2
|
constructor();
|
|
3
|
+
state: {
|
|
4
|
+
inputWidth: number;
|
|
5
|
+
};
|
|
6
|
+
componentDidMount(): void;
|
|
7
|
+
componentDidUpdate(previousProps: any): void;
|
|
3
8
|
recalculateWidth: () => void;
|
|
4
9
|
renderInput: () => JSX.Element;
|
|
5
10
|
inputRef: HTMLInputElement | null | undefined;
|
|
11
|
+
render(): JSX.Element;
|
|
6
12
|
sizerRef: HTMLDivElement | null | undefined;
|
|
7
13
|
}
|
|
8
14
|
declare namespace TypeaheadInput {
|
|
@@ -2,6 +2,6 @@ export default deprecated;
|
|
|
2
2
|
declare function deprecated(validator: any, { component, message, newProp: newProperty, expiryDate }: {
|
|
3
3
|
component: any;
|
|
4
4
|
message?: string | undefined;
|
|
5
|
-
newProp?:
|
|
6
|
-
expiryDate?:
|
|
5
|
+
newProp?: null | undefined;
|
|
6
|
+
expiryDate?: null | undefined;
|
|
7
7
|
}): (props: any, propertyName: any, ...rest: any[]) => any;
|
|
@@ -8,6 +8,13 @@ declare class WithDisplayFormat extends Component<any, any, any> {
|
|
|
8
8
|
pastedLength: number;
|
|
9
9
|
} | null;
|
|
10
10
|
constructor(props: any);
|
|
11
|
+
state: {
|
|
12
|
+
value: any;
|
|
13
|
+
historyNavigator: HistoryNavigator;
|
|
14
|
+
prevDisplayPattern: any;
|
|
15
|
+
triggerType: null;
|
|
16
|
+
triggerEvent: null;
|
|
17
|
+
};
|
|
11
18
|
getUserAction: (unformattedValue: any) => any;
|
|
12
19
|
resetEvent: () => void;
|
|
13
20
|
detectUndoRedo: (event: any) => "Redo" | "Undo" | null;
|
|
@@ -20,6 +27,7 @@ declare class WithDisplayFormat extends Component<any, any, any> {
|
|
|
20
27
|
handleOnFocus: (event: any) => void;
|
|
21
28
|
handleDelete: (unformattedValue: any, action: any) => string;
|
|
22
29
|
handleCursorPositioning: (action: any) => void;
|
|
30
|
+
render(): any;
|
|
23
31
|
}
|
|
24
32
|
declare namespace WithDisplayFormat {
|
|
25
33
|
namespace propTypes {
|
|
@@ -78,4 +86,5 @@ declare namespace WithDisplayFormat {
|
|
|
78
86
|
}
|
|
79
87
|
}
|
|
80
88
|
import { Component } from "react";
|
|
89
|
+
import { HistoryNavigator } from "../common";
|
|
81
90
|
import PropTypes from "prop-types";
|