@transferwise/components 43.2.3 → 43.6.1
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 +106 -0
- package/build/es/no-polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/no-polyfill/actionOption/ActionOption.story.js +1 -1
- package/build/es/no-polyfill/alert/Alert.js +1 -1
- package/build/es/no-polyfill/body/Body.story.js +1 -1
- package/build/es/no-polyfill/checkboxOption/CheckboxOption.story.js +1 -1
- package/build/es/no-polyfill/chips/Chips.story.js +1 -1
- package/build/es/no-polyfill/common/propsValues/typography.js +1 -1
- package/build/es/no-polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
- package/build/es/no-polyfill/dimmer/Dimmer.story.js +1 -1
- package/build/es/no-polyfill/display/Display.js +1 -0
- package/build/es/no-polyfill/display/Display.story.js +1 -1
- package/build/es/no-polyfill/display/index.js +1 -0
- package/build/es/no-polyfill/dropFade/DropFade.story.js +1 -1
- 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/link/Link.story.js +1 -1
- package/build/es/no-polyfill/modal/Modal.story.js +1 -1
- package/build/es/no-polyfill/nudge/Nudge.js +1 -1
- package/build/es/no-polyfill/provider/Provider.js +1 -1
- package/build/es/no-polyfill/provider/Provider.story.js +1 -1
- package/build/es/no-polyfill/provider/index.js +1 -1
- package/build/es/no-polyfill/provider/language/LanguageProvider.js +1 -0
- package/build/es/no-polyfill/provider/language/LanguageProvider.spec.js +1 -0
- package/build/es/no-polyfill/provider/language/index.js +1 -0
- package/build/es/no-polyfill/section/Section.story.js +1 -1
- package/build/es/no-polyfill/statusIcon/StatusIcon.js +1 -1
- package/build/es/no-polyfill/switch/Switch.story.js +1 -1
- package/build/es/no-polyfill/switchOption/SwitchOption.story.js +1 -1
- package/build/es/no-polyfill/title/Title.story.js +1 -1
- package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/es/polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/polyfill/actionOption/ActionOption.story.js +1 -1
- package/build/es/polyfill/alert/Alert.js +1 -1
- package/build/es/polyfill/body/Body.story.js +1 -1
- package/build/es/polyfill/checkboxOption/CheckboxOption.story.js +1 -1
- package/build/es/polyfill/chips/Chips.story.js +1 -1
- package/build/es/polyfill/common/propsValues/typography.js +1 -1
- package/build/es/polyfill/criticalBanner/CriticalCommsBanner.story.js +1 -1
- package/build/es/polyfill/dimmer/Dimmer.story.js +1 -1
- package/build/es/polyfill/display/Display.js +1 -0
- package/build/es/polyfill/display/Display.story.js +1 -1
- package/build/es/polyfill/display/index.js +1 -0
- package/build/es/polyfill/dropFade/DropFade.story.js +1 -1
- package/build/es/polyfill/header/Header.story.js +1 -1
- package/build/es/polyfill/index.js +1 -1
- package/build/es/polyfill/link/Link.story.js +1 -1
- package/build/es/polyfill/modal/Modal.story.js +1 -1
- package/build/es/polyfill/nudge/Nudge.js +1 -1
- package/build/es/polyfill/provider/Provider.js +1 -1
- package/build/es/polyfill/provider/Provider.story.js +1 -1
- package/build/es/polyfill/provider/index.js +1 -1
- package/build/es/polyfill/provider/language/LanguageProvider.js +1 -0
- package/build/es/polyfill/provider/language/LanguageProvider.spec.js +1 -0
- package/build/es/polyfill/provider/language/index.js +1 -0
- package/build/es/polyfill/section/Section.story.js +1 -1
- package/build/es/polyfill/statusIcon/StatusIcon.js +1 -1
- package/build/es/polyfill/switch/Switch.story.js +1 -1
- package/build/es/polyfill/switchOption/SwitchOption.story.js +1 -1
- package/build/es/polyfill/title/Title.story.js +1 -1
- package/build/es/polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/lab/mobileNav/MobileNav.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/nudge/Nudge.css +1 -1
- package/build/styles/popover/Popover.css +1 -1
- package/build/styles/statusIcon/StatusIcon.css +1 -1
- package/build/types/actionButton/ActionButton.d.ts +1 -1
- package/build/types/actionOption/ActionOption.d.ts +1 -1
- package/build/types/badge/Badge.d.ts +1 -1
- package/build/types/body/Body.d.ts +1 -1
- package/build/types/button/Button.d.ts +7 -7
- package/build/types/checkboxButton/CheckboxButton.d.ts +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +1 -1
- package/build/types/chips/Chip.d.ts +2 -2
- package/build/types/chips/Chips.d.ts +3 -3
- package/build/types/common/Option/Option.d.ts +2 -2
- package/build/types/common/bottomSheet/BottomSheet.d.ts +1 -1
- package/build/types/common/commonProps.d.ts +5 -5
- package/build/types/common/direction.d.ts +1 -1
- package/build/types/common/hooks/useConditionalListener/useConditionalListener.d.ts +1 -1
- package/build/types/common/panel/Panel.d.ts +1 -1
- package/build/types/common/propsValues/control.d.ts +6 -6
- package/build/types/common/propsValues/position.d.ts +5 -5
- package/build/types/common/propsValues/scroll.d.ts +2 -2
- package/build/types/common/propsValues/size.d.ts +5 -5
- package/build/types/common/propsValues/typography.d.ts +24 -15
- package/build/types/common/theme.d.ts +5 -5
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts +1 -1
- package/build/types/dimmer/Dimmer.d.ts +1 -1
- package/build/types/display/Display.d.ts +9 -0
- package/build/types/display/Display.story.d.ts +1 -0
- package/build/types/display/index.d.ts +1 -0
- package/build/types/emphasis/Emphasis.d.ts +1 -1
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +1 -1
- package/build/types/header/Header.d.ts +4 -4
- package/build/types/index.d.ts +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +1 -1
- package/build/types/link/Link.d.ts +1 -1
- package/build/types/loader/Loader.d.ts +2 -2
- package/build/types/modal/Modal.d.ts +1 -1
- package/build/types/nudge/Nudge.d.ts +2 -1
- package/build/types/progress/Progress.d.ts +1 -1
- package/build/types/progressBar/ProgressBar.d.ts +1 -1
- package/build/types/provider/direction/DirectionProvider.d.ts +1 -1
- package/build/types/provider/index.d.ts +1 -0
- package/build/types/provider/language/LanguageProvider.d.ts +7 -0
- package/build/types/provider/language/LanguageProvider.spec.d.ts +1 -0
- package/build/types/provider/language/index.d.ts +1 -0
- package/build/types/section/Section.d.ts +1 -1
- package/build/types/select/option/Option.d.ts +1 -1
- package/build/types/statusIcon/StatusIcon.d.ts +4 -4
- package/build/types/switch/Switch.d.ts +1 -1
- package/build/types/switchOption/SwitchOption.d.ts +1 -1
- package/build/types/title/Title.d.ts +1 -1
- package/build/types/tooltip/Tooltip.d.ts +1 -1
- package/build/types/uploadInput/UploadInput.d.ts +1 -1
- package/build/types/uploadInput/types.d.ts +3 -3
- package/build/types/uploadInput/uploadButton/UploadButton.d.ts +2 -2
- package/build/types/uploadInput/uploadItem/UploadItem.d.ts +1 -1
- package/build/types/uploadInput/uploadItem/UploadItemBody.d.ts +1 -1
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +12 -10
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType } from 'react';
|
|
2
2
|
import { ControlTypeAccent, ControlTypeNegative, ControlTypePositive, PriorityPrimary, PrioritySecondary, PriorityTertiary, SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge, LinkProps } from '../common';
|
|
3
3
|
/** @deprecated */
|
|
4
|
-
|
|
4
|
+
type DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';
|
|
5
5
|
/** @deprecated */
|
|
6
|
-
|
|
7
|
-
export
|
|
6
|
+
type DeprecatedSizes = SizeExtraSmall;
|
|
7
|
+
export type CommonProps = {
|
|
8
8
|
as?: ElementType;
|
|
9
9
|
block?: boolean;
|
|
10
10
|
disabled?: boolean;
|
|
@@ -13,15 +13,15 @@ export declare type CommonProps = {
|
|
|
13
13
|
priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary;
|
|
14
14
|
size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type ButtonProps = CommonProps & Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type'> & {
|
|
17
17
|
as?: 'button';
|
|
18
18
|
htmlType?: 'submit' | 'reset' | 'button';
|
|
19
19
|
};
|
|
20
|
-
export
|
|
20
|
+
export type AnchorProps = CommonProps & AnchorHTMLAttributes<HTMLAnchorElement> & Omit<LinkProps, 'href'> & {
|
|
21
21
|
as?: 'a';
|
|
22
22
|
href?: string;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
25
|
-
export
|
|
24
|
+
export type Props = ButtonProps | AnchorProps;
|
|
25
|
+
export type ButtonReferenceType = HTMLButtonElement | HTMLAnchorElement;
|
|
26
26
|
declare const Button: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<ButtonReferenceType>>;
|
|
27
27
|
export default Button;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
|
-
export
|
|
2
|
+
export type CheckboxButtonProps = InputHTMLAttributes<HTMLInputElement>;
|
|
3
3
|
declare const CheckboxButton: import("react").ForwardRefExoticComponent<CheckboxButtonProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
4
4
|
export default CheckboxButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ReferenceType } from '../common/Option/Option';
|
|
3
3
|
import { BaseOptionProps } from '../common/Option/Option';
|
|
4
|
-
export
|
|
4
|
+
export type CheckboxOptionProps = Omit<BaseOptionProps, 'onChange'> & {
|
|
5
5
|
/**
|
|
6
6
|
* The checked state of the checkbox.
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { AriaLabelProperty, CommonProps } from '../common';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ChipValue = string | number;
|
|
4
|
+
export type Props = {
|
|
5
5
|
value?: ChipValue;
|
|
6
6
|
label: string;
|
|
7
7
|
onRemove?: () => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { CommonProps, AriaLabelProperty } from '../common';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ChipValue = string | number;
|
|
4
|
+
export type Chip = {
|
|
5
5
|
value: ChipValue;
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type ChipsProps = CommonProps & AriaLabelProperty & {
|
|
9
9
|
/** List of chips with string labels and string/number values */
|
|
10
10
|
chips: Chip[];
|
|
11
11
|
/** Callback which is invoked when a chip is selected or deselected */
|
|
@@ -21,7 +21,7 @@ export interface BaseOptionProps extends Omit<HTMLAttributes<HTMLElement>, 'titl
|
|
|
21
21
|
interface AnchorOptionProps extends BaseOptionProps, LinkProps {
|
|
22
22
|
as: 'a';
|
|
23
23
|
}
|
|
24
|
-
export
|
|
25
|
-
export
|
|
24
|
+
export type OptionProps = BaseOptionProps | AnchorOptionProps;
|
|
25
|
+
export type ReferenceType = HTMLElement | HTMLAnchorElement;
|
|
26
26
|
declare const Option: import("react").ForwardRefExoticComponent<OptionProps & import("react").RefAttributes<ReferenceType>>;
|
|
27
27
|
export default Option;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement, PropsWithChildren, SyntheticEvent } from 'react';
|
|
2
2
|
import { CommonProps } from '../commonProps';
|
|
3
|
-
|
|
3
|
+
type Props = PropsWithChildren<{
|
|
4
4
|
onClose?: (event: Event | SyntheticEvent) => void;
|
|
5
5
|
open: boolean;
|
|
6
6
|
} & CommonProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type CommonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Space-separated list of the case-sensitive CSS classes,
|
|
5
5
|
* most would be applied to outermost element inside the component
|
|
@@ -8,13 +8,13 @@ export declare type CommonProps = {
|
|
|
8
8
|
*/
|
|
9
9
|
className?: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type AriaLabelProperty = {
|
|
12
12
|
'aria-label'?: string;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type LinkProps = {
|
|
15
15
|
href: string;
|
|
16
16
|
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
17
17
|
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
export
|
|
19
|
+
export type Heading = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
20
|
+
export type ParentElement = HTMLElement | Window | Document;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren, RefObject, SyntheticEvent, HTMLAttributes } from 'react';
|
|
2
2
|
import { PositionBottom, PositionLeft, PositionRight, PositionTop } from '..';
|
|
3
|
-
export
|
|
3
|
+
export type Props = PropsWithChildren<{
|
|
4
4
|
arrow?: boolean;
|
|
5
5
|
flip?: boolean;
|
|
6
6
|
altAxis?: boolean;
|
|
@@ -3,14 +3,14 @@ export declare enum ControlType {
|
|
|
3
3
|
POSITIVE = "positive",
|
|
4
4
|
NEGATIVE = "negative"
|
|
5
5
|
}
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
6
|
+
export type ControlTypeAccent = 'accent';
|
|
7
|
+
export type ControlTypePositive = 'positive';
|
|
8
|
+
export type ControlTypeNegative = 'negative';
|
|
9
9
|
export declare enum Priority {
|
|
10
10
|
PRIMARY = "primary",
|
|
11
11
|
SECONDARY = "secondary",
|
|
12
12
|
TERTIARY = "tertiary"
|
|
13
13
|
}
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
14
|
+
export type PriorityPrimary = 'primary';
|
|
15
|
+
export type PrioritySecondary = 'secondary';
|
|
16
|
+
export type PriorityTertiary = 'tertiary';
|
|
@@ -9,8 +9,8 @@ export declare enum Position {
|
|
|
9
9
|
RIGHT_TOP = "right-top",
|
|
10
10
|
TOP = "top"
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
12
|
+
export type PositionCenter = 'center';
|
|
13
|
+
export type PositionTop = 'top';
|
|
14
|
+
export type PositionRight = 'right';
|
|
15
|
+
export type PositionBottom = 'bottom';
|
|
16
|
+
export type PositionLeft = 'left';
|
|
@@ -5,8 +5,8 @@ export declare enum Size {
|
|
|
5
5
|
LARGE = "lg",
|
|
6
6
|
EXTRA_LARGE = "xl"
|
|
7
7
|
}
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
8
|
+
export type SizeExtraSmall = 'xs';
|
|
9
|
+
export type SizeSmall = 'sm';
|
|
10
|
+
export type SizeMedium = 'md';
|
|
11
|
+
export type SizeLarge = 'lg';
|
|
12
|
+
export type SizeExtraLarge = 'xl';
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
export declare enum Typography {
|
|
2
|
+
DISPLAY_EXTRA_LARGE = "display-extra-large",
|
|
3
|
+
DISPLAY_LARGE = "display-large",
|
|
4
|
+
DISPLAY_MEDIUM = "display-medium",
|
|
5
|
+
DISPLAY_SMALL = "display-small",
|
|
2
6
|
TITLE_SCREEN = "title-screen",
|
|
3
7
|
TITLE_SECTION = "title-section",
|
|
4
8
|
TITLE_SUBSECTION = "title-subsection",
|
|
@@ -11,18 +15,23 @@ export declare enum Typography {
|
|
|
11
15
|
LINK_LARGE = "link-large",
|
|
12
16
|
LINK_DEFAULT = "link-default"
|
|
13
17
|
}
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
export
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
25
|
-
export
|
|
26
|
-
export
|
|
27
|
-
export
|
|
28
|
-
export
|
|
18
|
+
export type DisplayExtraLarge = 'display-extra-large';
|
|
19
|
+
export type DisplayLarge = 'display-large';
|
|
20
|
+
export type DisplayMedium = 'display-medium';
|
|
21
|
+
export type DisplaySmall = 'display-small';
|
|
22
|
+
export type DisplayTypes = DisplayExtraLarge | DisplayLarge | DisplayMedium | DisplaySmall;
|
|
23
|
+
export type TitleScreen = 'title-screen';
|
|
24
|
+
export type TitleSection = 'title-section';
|
|
25
|
+
export type TitleSubsection = 'title-subsection';
|
|
26
|
+
export type TitleBody = 'title-body';
|
|
27
|
+
export type TitleGroup = 'title-group';
|
|
28
|
+
export type TitleTypes = TitleScreen | TitleSection | TitleSubsection | TitleBody | TitleGroup;
|
|
29
|
+
export type BodyDefault = 'body-default';
|
|
30
|
+
export type BodyLargeBold = 'body-large-bold';
|
|
31
|
+
export type BodyDefaultBold = 'body-default-bold';
|
|
32
|
+
export type BodyLarge = 'body-large';
|
|
33
|
+
export type BodyTypes = BodyLargeBold | BodyDefault | BodyLarge | BodyDefaultBold;
|
|
34
|
+
export type LinkDefault = 'link-default';
|
|
35
|
+
export type LinkLarge = 'link-large';
|
|
36
|
+
export type LinkTypes = LinkDefault | LinkLarge;
|
|
37
|
+
export type TypographyTypes = TitleScreen | TitleSection | TitleSubsection | TitleBody | TitleGroup | BodyDefault | BodyLargeBold | BodyDefaultBold | BodyLarge | LinkDefault | LinkLarge;
|
|
@@ -4,10 +4,10 @@ export declare enum Theme {
|
|
|
4
4
|
NAVY = "navy",
|
|
5
5
|
PERSONAL = "personal"
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
7
|
+
export type ThemeLight = 'light';
|
|
8
|
+
export type ThemeDark = 'dark';
|
|
9
|
+
export type ThemeNavy = 'navy';
|
|
10
|
+
export type ThemePersonal = 'personal';
|
|
11
|
+
export type ThemeType = ThemeLight | ThemeDark | ThemeNavy | ThemePersonal;
|
|
12
12
|
export declare const modernThemes: Set<ThemeType>;
|
|
13
13
|
export declare const getThemeClassName: (theme: ThemeType) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import { CommonProps } from '../common';
|
|
3
3
|
export declare const EXIT_ANIMATION = 350;
|
|
4
|
-
|
|
4
|
+
type DimmerProps = CommonProps & {
|
|
5
5
|
children?: ReactNode;
|
|
6
6
|
disableClickToClose?: boolean;
|
|
7
7
|
fadeContentOnEnter?: boolean;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { DisplayTypes } from '../common';
|
|
3
|
+
type Props = PropsWithChildren<{
|
|
4
|
+
id?: string;
|
|
5
|
+
type?: DisplayTypes;
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
8
|
+
declare function Display({ type, children, className }: Props): JSX.Element;
|
|
9
|
+
export default Display;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Display';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ActionButtonProps } from '../actionButton/ActionButton';
|
|
3
3
|
import { AriaLabelProperty, CommonProps, Heading, LinkProps } from '../common';
|
|
4
|
-
|
|
4
|
+
type ActionProps = AriaLabelProperty & {
|
|
5
5
|
text: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export
|
|
7
|
+
type ButtonActionProps = ActionProps & ActionButtonProps;
|
|
8
|
+
type LinkActionProps = ActionProps & LinkProps;
|
|
9
|
+
export type HeaderProps = CommonProps & {
|
|
10
10
|
/**
|
|
11
11
|
* When the `href` property is provided to the `action`, we will render a `Link` instead of a `ActionButton`.
|
|
12
12
|
*/
|
package/build/types/index.d.ts
CHANGED
|
@@ -58,7 +58,7 @@ export { default as Popover } from './popover';
|
|
|
58
58
|
export { default as ProcessIndicator } from './processIndicator';
|
|
59
59
|
export { default as ProgressBar } from './progressBar';
|
|
60
60
|
export { default as Progress } from './progress';
|
|
61
|
-
export { default as Provider, DirectionProvider } from './provider';
|
|
61
|
+
export { default as Provider, DirectionProvider, LanguageProvider } from './provider';
|
|
62
62
|
export { default as Radio } from './radio';
|
|
63
63
|
export { default as RadioGroup } from './radioGroup';
|
|
64
64
|
export { default as RadioOption } from './radioOption';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes } from 'react';
|
|
2
2
|
import { LinkLarge, LinkDefault } from '../common';
|
|
3
|
-
|
|
3
|
+
type Props = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
4
4
|
type?: LinkLarge | LinkDefault;
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { SizeExtraSmall, SizeSmall, SizeMedium, SizeLarge, SizeExtraLarge } from '../common';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type SizeType = SizeExtraSmall | SizeSmall | SizeMedium | SizeLarge | SizeExtraLarge;
|
|
4
|
+
type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* @deprecated use `size` instead
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { PositionTop, PositionCenter, CommonProps, SizeSmall, SizeMedium, SizeLarge, SizeExtraLarge, ScrollContent, ScrollViewport } from '../common';
|
|
3
|
-
export
|
|
3
|
+
export type ModalProps = CommonProps & {
|
|
4
4
|
title?: ReactNode;
|
|
5
5
|
body: ReactNode;
|
|
6
6
|
footer?: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactElement, PropsWithChildren } from 'react';
|
|
2
2
|
import { LayoutDirection } from '../../common/direction';
|
|
3
3
|
export declare const DirectionContext: import("react").Context<LayoutDirection>;
|
|
4
|
-
|
|
4
|
+
type Props = PropsWithChildren<{
|
|
5
5
|
direction: LayoutDirection;
|
|
6
6
|
}>;
|
|
7
7
|
export declare const DirectionProvider: ({ direction, children }: Props) => ReactElement;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement, PropsWithChildren } from 'react';
|
|
2
|
+
export declare const LanguageContext: import("react").Context<string>;
|
|
3
|
+
type Props = PropsWithChildren<{
|
|
4
|
+
locale: string;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const LanguageProvider: ({ locale, children }: Props) => ReactElement;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LanguageProvider } from "./LanguageProvider";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import { Sentiment } from '../common';
|
|
3
|
-
|
|
2
|
+
import { SizeSmall, SizeMedium, SizeLarge, Sentiment } from '../common';
|
|
3
|
+
type Props = {
|
|
4
4
|
sentiment: Sentiment;
|
|
5
|
-
|
|
5
|
+
size: SizeSmall | SizeMedium | SizeLarge;
|
|
6
6
|
};
|
|
7
|
-
declare const StatusIcon: ({ sentiment,
|
|
7
|
+
declare const StatusIcon: ({ sentiment, size }: Props) => ReactElement;
|
|
8
8
|
export default StatusIcon;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MouseEvent, ReactElement } from 'react';
|
|
2
2
|
import { CommonProps } from '../common';
|
|
3
|
-
|
|
3
|
+
type Props = CommonProps & {
|
|
4
4
|
/** Used to describe the purpose of the switch. To be used if there is no external label (i.e. aria-labelledby is null) */
|
|
5
5
|
'aria-label'?: string;
|
|
6
6
|
/** A reference to a label that describes the purpose of the switch. Ignored if aria-label is provided */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LabelHTMLAttributes, LiHTMLAttributes } from 'react';
|
|
2
2
|
import { TitleTypes, Heading } from '../common';
|
|
3
|
-
|
|
3
|
+
type Props = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElement | HTMLLabelElement> & LiHTMLAttributes<HTMLLIElement> & {
|
|
4
4
|
/**
|
|
5
5
|
* Default value will based one `type` prop
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, ReactElement, PropsWithChildren } from 'react';
|
|
2
2
|
import { CommonProps } from '../common';
|
|
3
3
|
import { PositionBottom, PositionLeft, PositionRight, PositionTop } from '../common/propsValues/position';
|
|
4
|
-
|
|
4
|
+
type Props = PropsWithChildren<{
|
|
5
5
|
position?: PositionTop | PositionRight | PositionBottom | PositionLeft;
|
|
6
6
|
label: ReactNode;
|
|
7
7
|
}> & CommonProps;
|
|
@@ -3,7 +3,7 @@ import { CommonProps } from '../common';
|
|
|
3
3
|
import { UploadedFile, UploadResponse } from './types';
|
|
4
4
|
import { UploadButtonProps } from './uploadButton/UploadButton';
|
|
5
5
|
import { UploadItemProps } from './uploadItem/UploadItem';
|
|
6
|
-
export
|
|
6
|
+
export type UploadInputProps = {
|
|
7
7
|
/**
|
|
8
8
|
* List of already existing, failed or in progress files
|
|
9
9
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Status } from '../common';
|
|
2
|
-
export
|
|
2
|
+
export type UploadError = {
|
|
3
3
|
message: string;
|
|
4
4
|
[key: string]: any;
|
|
5
5
|
} | string;
|
|
6
|
-
export
|
|
6
|
+
export type UploadResponse = {
|
|
7
7
|
/**
|
|
8
8
|
* Response must include a unique file id (used for deletion/identification)
|
|
9
9
|
*/
|
|
@@ -18,7 +18,7 @@ export declare type UploadResponse = {
|
|
|
18
18
|
error?: UploadError;
|
|
19
19
|
[key: string]: any;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type UploadedFile = {
|
|
22
22
|
/**
|
|
23
23
|
* A unique id that is used for deleting the file and as a key
|
|
24
24
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FileType } from '../../common';
|
|
3
|
-
|
|
4
|
-
export
|
|
3
|
+
type AllowedFileTypes = string | string[] | FileType[];
|
|
4
|
+
export type UploadButtonProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Disable the upload button if your app is not yet ready to accept uploads
|
|
7
7
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { UploadedFile } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type UploadItemProps = JSX.IntrinsicAttributes & {
|
|
4
4
|
file: UploadedFile;
|
|
5
5
|
canDelete: boolean;
|
|
6
6
|
onDelete: () => void;
|