@transferwise/components 45.2.0 → 45.4.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/build/es/no-polyfill/accordion/Accordion.story.js +1 -0
- package/build/es/no-polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/no-polyfill/avatar/colors/avatarColorTestCases.json +402 -0
- package/build/es/no-polyfill/avatar/colors/colors.js +10 -0
- package/build/es/no-polyfill/avatar/colors/index.js +1 -0
- package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/es/no-polyfill/button/Button.story.js +1 -0
- package/build/es/no-polyfill/checkbox/Checkbox.story.js +1 -0
- package/build/es/no-polyfill/common/bottomSheet/BottomSheet.story.js +2 -0
- package/build/es/no-polyfill/dateInput/DateInput.story.js +1 -0
- package/build/es/no-polyfill/info/Info.story.js +1 -0
- package/build/es/no-polyfill/modal/Modal.story.js +2 -1
- package/build/es/no-polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/no-polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +8 -0
- package/build/es/no-polyfill/phoneNumberInput/utils/excludeCountries/index.js +1 -0
- package/build/es/no-polyfill/phoneNumberInput/utils/index.js +1 -1
- package/build/es/no-polyfill/select/option/Option.js +1 -1
- package/build/es/no-polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/es/polyfill/accordion/Accordion.story.js +1 -0
- package/build/es/polyfill/actionButton/ActionButton.story.js +1 -1
- package/build/es/polyfill/avatar/Avatar.js +1 -1
- package/build/es/polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/polyfill/avatar/colors/avatarColorTestCases.json +402 -0
- package/build/es/polyfill/avatar/colors/colors.js +10 -0
- package/build/es/polyfill/avatar/colors/index.js +1 -0
- package/build/es/polyfill/avatarWrapper/AvatarWrapper.js +1 -1
- package/build/es/polyfill/button/Button.story.js +1 -0
- package/build/es/polyfill/checkbox/Checkbox.story.js +1 -0
- package/build/es/polyfill/common/bottomSheet/BottomSheet.story.js +2 -0
- package/build/es/polyfill/dateInput/DateInput.story.js +1 -0
- package/build/es/polyfill/info/Info.story.js +1 -0
- package/build/es/polyfill/modal/Modal.story.js +2 -1
- package/build/es/polyfill/phoneNumberInput/PhoneNumberInput.js +1 -1
- package/build/es/polyfill/phoneNumberInput/utils/excludeCountries/excludeCountries.js +8 -0
- package/build/es/polyfill/phoneNumberInput/utils/excludeCountries/index.js +1 -0
- package/build/es/polyfill/phoneNumberInput/utils/index.js +1 -1
- package/build/es/polyfill/select/option/Option.js +1 -1
- package/build/es/polyfill/tooltip/Tooltip.story.js +1 -1
- package/build/main.css +1 -1
- package/build/styles/avatar/Avatar.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/styles/snackbar/Snackbar.css +1 -1
- package/build/types/accordion/Accordion.story.d.ts +46 -0
- package/build/types/avatar/Avatar.d.ts +18 -22
- package/build/types/avatar/Avatar.story.d.ts +2 -31
- package/build/types/avatar/colors/colors.d.ts +3 -0
- package/build/types/avatar/colors/index.d.ts +1 -0
- package/build/types/avatar/index.d.ts +2 -2
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +1 -0
- package/build/types/avatarWrapper/AvatarWrapper.story.d.ts +4 -1
- package/build/types/button/Button.story.d.ts +4586 -0
- package/build/types/checkbox/Checkbox.story.d.ts +54 -0
- package/build/types/common/bottomSheet/BottomSheet.story.d.ts +29 -0
- package/build/types/dateInput/DateInput.story.d.ts +71 -0
- package/build/types/info/Info.story.d.ts +39 -0
- package/build/types/modal/Modal.story.d.ts +20 -3
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +4 -0
- package/build/types/phoneNumberInput/utils/excludeCountries/excludeCountries.d.ts +1 -0
- package/build/types/phoneNumberInput/utils/excludeCountries/index.d.ts +1 -0
- package/build/types/phoneNumberInput/utils/index.d.ts +1 -0
- package/build/types/test-utils/VariantDecorator.d.ts +18 -0
- package/build/types/test-utils/story-config.d.ts +18 -50
- package/build/types/tooltip/Tooltip.story.d.ts +17 -9
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +4 -3
- package/scripts/generate-type-declarations.js +0 -1
- package/build/types/test-utils/GlobalsDecorator.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
.snackbar{bottom:0;left:0;position:fixed;right:0;text-align:center;z-index:1060}[dir=rtl] .snackbar{left:auto;left:0;right:0
|
|
1
|
+
.snackbar{bottom:0;left:0;position:fixed;right:0;text-align:center;z-index:1060}[dir=rtl] .snackbar{left:auto;left:0;right:0}.snackbar__text{align-items:center;background:#37517e;border-radius:2px;box-shadow:0 2px 4px rgba(0,0,0,.25);color:#fff;display:inline-flex;font-size:.875rem;font-size:var(--font-size-14);justify-content:space-between;margin:0 16px;margin:0 var(--size-16);padding:8px 16px;padding:var(--size-8) var(--size-16);text-align:left;transition:.4s cubic-bezier(.215,.61,.355,1);width:calc(100% - 32px);width:calc(100% - var(--size-32))}[dir=rtl] .snackbar__text{text-align:right}.np-theme-personal .snackbar__text{background:var(--color-contrast-theme);border-radius:10px;border-radius:var(--radius-small);box-shadow:0 2px 4px 0 rgba(69,71,69,.35);color:var(--color-contrast-overlay);position:relative}.np-theme-personal .snackbar__text:after{background-color:#86a7bd1a;background-color:var(--color-background-neutral);border-radius:inherit;content:"";display:block;height:100%;left:0;position:absolute;top:0;width:100%;z-index:-1}.np-theme-personal--dark .snackbar__text,.np-theme-personal--forest-green .snackbar__text{box-shadow:none}@media (min-width:576px){.snackbar__text{max-width:600px;width:auto}}.snackbar__text__action{color:#00b9ff;flex-shrink:0;margin-left:16px;margin-left:var(--size-16)}[dir=rtl] .snackbar__text__action{margin-left:0;margin-right:16px;margin-right:var(--size-16)}.snackbar__text-container-enter,.snackbar__text-container-exit{transform:translateY(calc(100% + 10px))}.snackbar__text-container-enter-active{transform:translateY(-16px);transform:translateY(calc(-16px - env(safe-area-inset-bottom)))}@media (min-width:576px){.snackbar__text-container-enter-active{transform:translateY(-24px)}}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { StoryObj } from '@storybook/react';
|
|
3
|
+
import Accordion from './Accordion';
|
|
4
|
+
declare const _default: {
|
|
5
|
+
component: {
|
|
6
|
+
({ items, onClick, indexOpen, theme }: {
|
|
7
|
+
items: any;
|
|
8
|
+
onClick: any;
|
|
9
|
+
indexOpen: any;
|
|
10
|
+
theme: any;
|
|
11
|
+
}): any;
|
|
12
|
+
propTypes: {
|
|
13
|
+
indexOpen: any;
|
|
14
|
+
items: any;
|
|
15
|
+
onClick: any;
|
|
16
|
+
theme: any;
|
|
17
|
+
};
|
|
18
|
+
defaultProps: {
|
|
19
|
+
indexOpen: number;
|
|
20
|
+
onClick: null;
|
|
21
|
+
theme: import("../common").Theme;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
title: string;
|
|
25
|
+
args: {
|
|
26
|
+
items: ({
|
|
27
|
+
title: string;
|
|
28
|
+
content: string;
|
|
29
|
+
id: string;
|
|
30
|
+
icon?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
title: string;
|
|
33
|
+
content: string;
|
|
34
|
+
id: string;
|
|
35
|
+
icon: JSX.Element;
|
|
36
|
+
})[];
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default _default;
|
|
40
|
+
type Story = StoryObj<typeof Accordion>;
|
|
41
|
+
export declare const Basic: Story;
|
|
42
|
+
export declare const BasicMobile: Story;
|
|
43
|
+
export declare const Variants: Story;
|
|
44
|
+
export declare const Multiple: Story;
|
|
45
|
+
export declare const InModal: Story;
|
|
46
|
+
export declare const InModalMobile: Story;
|
|
@@ -1,22 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export type AvatarTheme =
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
declare const Avatar: React.FC<AvatarProps>;
|
|
20
|
-
|
|
21
|
-
export default Avatar;
|
|
22
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
type NumericAvatarSize = 24 | 40 | 48 | 56 | 72;
|
|
3
|
+
type LegacyAvatarSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
export type AvatarSize = NumericAvatarSize | LegacyAvatarSize;
|
|
5
|
+
export type AvatarTheme = 'light' | 'dark';
|
|
6
|
+
export type AvatarType = 'thumbnail' | 'icon' | 'emoji' | 'initials';
|
|
7
|
+
export interface AvatarProps {
|
|
8
|
+
backgroundColor?: string;
|
|
9
|
+
backgroundColorSeed?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
outlined?: boolean;
|
|
13
|
+
size?: AvatarSize;
|
|
14
|
+
theme?: AvatarTheme;
|
|
15
|
+
type?: AvatarType;
|
|
16
|
+
}
|
|
17
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
18
|
+
export default Avatar;
|
|
@@ -1,37 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import
|
|
4
|
-
import Avatar, { AvatarType } from '.';
|
|
3
|
+
import Avatar from '.';
|
|
5
4
|
declare const _default: {
|
|
6
|
-
component:
|
|
7
|
-
({ backgroundColor, children, className, outlined, size, theme, type }: {
|
|
8
|
-
backgroundColor: any;
|
|
9
|
-
children: any;
|
|
10
|
-
className: any;
|
|
11
|
-
outlined: any;
|
|
12
|
-
size: any;
|
|
13
|
-
theme: any;
|
|
14
|
-
type: any;
|
|
15
|
-
}): JSX.Element;
|
|
16
|
-
propTypes: {
|
|
17
|
-
backgroundColor: any;
|
|
18
|
-
children: any;
|
|
19
|
-
className: any;
|
|
20
|
-
outlined: any;
|
|
21
|
-
size: any;
|
|
22
|
-
theme: any;
|
|
23
|
-
type: any;
|
|
24
|
-
};
|
|
25
|
-
defaultProps: {
|
|
26
|
-
backgroundColor: null;
|
|
27
|
-
children: null;
|
|
28
|
-
className: null;
|
|
29
|
-
outlined: boolean;
|
|
30
|
-
size: Size;
|
|
31
|
-
theme: Theme;
|
|
32
|
-
type: AvatarType;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
5
|
+
component: import("react").FC<import("./Avatar").AvatarProps>;
|
|
35
6
|
title: string;
|
|
36
7
|
tags: string[];
|
|
37
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './colors';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AvatarType } from
|
|
2
|
-
export { default } from
|
|
1
|
+
export { AvatarType } from './avatarTypes';
|
|
2
|
+
export { default } from './Avatar';
|
|
@@ -13,6 +13,7 @@ export interface AvatarWrapperBadgeProps {
|
|
|
13
13
|
export interface AvatarWrapperProps {
|
|
14
14
|
url?: string;
|
|
15
15
|
profileType?: AvatarWrapperProfileType;
|
|
16
|
+
profileId?: number;
|
|
16
17
|
badgeUrl?: string;
|
|
17
18
|
badgeAltText?: string;
|
|
18
19
|
badgeStatusIcon?: AvatarWrapperBadgeStatusIcon;
|
|
@@ -4,9 +4,10 @@ import { Sentiment } from '../common';
|
|
|
4
4
|
import AvatarWrapper from './AvatarWrapper';
|
|
5
5
|
declare const _default: {
|
|
6
6
|
component: {
|
|
7
|
-
({ url, profileType, badgeUrl, badgeAltText, badgeStatusIcon, name, avatarProps, badgeProps, }: {
|
|
7
|
+
({ url, profileType, profileId, badgeUrl, badgeAltText, badgeStatusIcon, name, avatarProps, badgeProps, }: {
|
|
8
8
|
url: any;
|
|
9
9
|
profileType: any;
|
|
10
|
+
profileId: any;
|
|
10
11
|
badgeUrl: any;
|
|
11
12
|
badgeAltText: any;
|
|
12
13
|
badgeStatusIcon: any;
|
|
@@ -17,6 +18,7 @@ declare const _default: {
|
|
|
17
18
|
defaultProps: {
|
|
18
19
|
url: undefined;
|
|
19
20
|
profileType: undefined;
|
|
21
|
+
profileId: undefined;
|
|
20
22
|
badgeUrl: undefined;
|
|
21
23
|
badgeAltText: undefined;
|
|
22
24
|
badgeStatusIcon: undefined;
|
|
@@ -27,6 +29,7 @@ declare const _default: {
|
|
|
27
29
|
propTypes: {
|
|
28
30
|
url: any;
|
|
29
31
|
profileType: any;
|
|
32
|
+
profileId: any;
|
|
30
33
|
badgeUrl: any;
|
|
31
34
|
badgeAltText: any;
|
|
32
35
|
badgeStatusIcon: any;
|