@transferwise/components 0.0.0-experimental-cb72e72 → 0.0.0-experimental-c482369
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/avatar/Avatar.js +1 -1
- package/build/es/no-polyfill/avatar/Avatar.story.js +1 -1
- package/build/es/no-polyfill/avatarWrapper/AvatarWrapper.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/avatarWrapper/AvatarWrapper.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/avatar/Avatar.d.ts +22 -18
- package/build/types/avatar/Avatar.story.d.ts +34 -3
- package/build/types/avatar/index.d.ts +2 -2
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +0 -1
- package/build/types/avatarWrapper/AvatarWrapper.story.d.ts +1 -4
- package/build/umd/no-polyfill/main.js +1 -1
- package/build/umd/polyfill/main.js +1 -1
- package/package.json +3 -3
- package/scripts/generate-type-declarations.js +1 -0
- package/build/es/no-polyfill/avatar/colors/avatarColorTestCases.json +0 -402
- package/build/es/no-polyfill/avatar/colors/colors.js +0 -10
- package/build/es/no-polyfill/avatar/colors/index.js +0 -1
- package/build/es/polyfill/avatar/colors/avatarColorTestCases.json +0 -402
- package/build/es/polyfill/avatar/colors/colors.js +0 -10
- package/build/es/polyfill/avatar/colors/index.js +0 -1
- package/build/types/avatar/colors/colors.d.ts +0 -3
- package/build/types/avatar/colors/index.d.ts +0 -1
|
@@ -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)}}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
type
|
|
4
|
-
|
|
5
|
-
export type AvatarTheme =
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
export type AvatarSize = "sm" | "md" | "lg" | 40 | 56;
|
|
4
|
+
|
|
5
|
+
export type AvatarTheme = "light" | "dark";
|
|
6
|
+
|
|
7
|
+
export type AvatarType = "thumbnail" | "icon" | "emoji" | "initials";
|
|
8
|
+
|
|
9
|
+
export interface AvatarProps {
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
outlined?: boolean;
|
|
14
|
+
size?: AvatarSize;
|
|
15
|
+
theme?: AvatarTheme;
|
|
16
|
+
type?: AvatarType;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const Avatar: React.FC<AvatarProps>;
|
|
20
|
+
|
|
21
|
+
export default Avatar;
|
|
22
|
+
|
|
@@ -1,11 +1,42 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { StoryObj } from '@storybook/react';
|
|
3
|
-
import
|
|
3
|
+
import { Size, Theme } from '../common';
|
|
4
|
+
import Avatar, { AvatarType } from '.';
|
|
4
5
|
declare const _default: {
|
|
5
|
-
component:
|
|
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
|
+
};
|
|
6
35
|
title: string;
|
|
7
36
|
tags: string[];
|
|
8
37
|
};
|
|
9
38
|
export default _default;
|
|
10
39
|
type Story = StoryObj<typeof Avatar>;
|
|
11
|
-
export declare const
|
|
40
|
+
export declare const Emoji: Story;
|
|
41
|
+
export declare const Flag: Story;
|
|
42
|
+
export declare const Table: Story;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { AvatarType } from
|
|
2
|
-
export { default } from
|
|
1
|
+
export { AvatarType } from "./avatarTypes";
|
|
2
|
+
export { default } from "./Avatar";
|
|
@@ -13,7 +13,6 @@ export interface AvatarWrapperBadgeProps {
|
|
|
13
13
|
export interface AvatarWrapperProps {
|
|
14
14
|
url?: string;
|
|
15
15
|
profileType?: AvatarWrapperProfileType;
|
|
16
|
-
profileId?: number;
|
|
17
16
|
badgeUrl?: string;
|
|
18
17
|
badgeAltText?: string;
|
|
19
18
|
badgeStatusIcon?: AvatarWrapperBadgeStatusIcon;
|
|
@@ -4,10 +4,9 @@ import { Sentiment } from '../common';
|
|
|
4
4
|
import AvatarWrapper from './AvatarWrapper';
|
|
5
5
|
declare const _default: {
|
|
6
6
|
component: {
|
|
7
|
-
({ url, profileType,
|
|
7
|
+
({ url, profileType, badgeUrl, badgeAltText, badgeStatusIcon, name, avatarProps, badgeProps, }: {
|
|
8
8
|
url: any;
|
|
9
9
|
profileType: any;
|
|
10
|
-
profileId: any;
|
|
11
10
|
badgeUrl: any;
|
|
12
11
|
badgeAltText: any;
|
|
13
12
|
badgeStatusIcon: any;
|
|
@@ -18,7 +17,6 @@ declare const _default: {
|
|
|
18
17
|
defaultProps: {
|
|
19
18
|
url: undefined;
|
|
20
19
|
profileType: undefined;
|
|
21
|
-
profileId: undefined;
|
|
22
20
|
badgeUrl: undefined;
|
|
23
21
|
badgeAltText: undefined;
|
|
24
22
|
badgeStatusIcon: undefined;
|
|
@@ -29,7 +27,6 @@ declare const _default: {
|
|
|
29
27
|
propTypes: {
|
|
30
28
|
url: any;
|
|
31
29
|
profileType: any;
|
|
32
|
-
profileId: any;
|
|
33
30
|
badgeUrl: any;
|
|
34
31
|
badgeAltText: any;
|
|
35
32
|
badgeStatusIcon: any;
|