@transferwise/components 46.88.2 → 46.89.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/actionButton/ActionButton.js.map +1 -1
- package/build/actionButton/ActionButton.mjs.map +1 -1
- package/build/actionOption/ActionOption.js +19 -3
- package/build/actionOption/ActionOption.js.map +1 -1
- package/build/actionOption/ActionOption.mjs +19 -3
- package/build/actionOption/ActionOption.mjs.map +1 -1
- package/build/alert/Alert.js +23 -20
- package/build/alert/Alert.js.map +1 -1
- package/build/alert/Alert.mjs +20 -17
- package/build/alert/Alert.mjs.map +1 -1
- package/build/avatar/Avatar.js.map +1 -1
- package/build/avatar/Avatar.mjs.map +1 -1
- package/build/avatar/avatarTypes.js +3 -1
- package/build/avatar/avatarTypes.js.map +1 -1
- package/build/avatar/avatarTypes.mjs +3 -1
- package/build/avatar/avatarTypes.mjs.map +1 -1
- package/build/badge/Badge.js.map +1 -1
- package/build/badge/Badge.mjs.map +1 -1
- package/build/button/Button.js +2 -2
- package/build/button/Button.mjs +2 -2
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/carousel/Carousel.js +9 -8
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs +9 -8
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/common/action/Action.js +26 -15
- package/build/common/action/Action.js.map +1 -1
- package/build/common/action/Action.mjs +26 -15
- package/build/common/action/Action.mjs.map +1 -1
- package/build/common/closeButton/CloseButton.js +2 -1
- package/build/common/closeButton/CloseButton.js.map +1 -1
- package/build/common/closeButton/CloseButton.mjs +2 -1
- package/build/common/closeButton/CloseButton.mjs.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.js +10 -73
- package/build/criticalBanner/CriticalCommsBanner.js.map +1 -1
- package/build/criticalBanner/CriticalCommsBanner.mjs +11 -74
- package/build/criticalBanner/CriticalCommsBanner.mjs.map +1 -1
- package/build/iconButton/IconButton.js +2 -2
- package/build/iconButton/IconButton.js.map +1 -1
- package/build/iconButton/IconButton.mjs +2 -2
- package/build/iconButton/IconButton.mjs.map +1 -1
- package/build/link/Link.js +2 -2
- package/build/link/Link.mjs +2 -2
- package/build/main.css +46 -75
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.js.map +1 -0
- package/build/primitives/PrimitiveAnchor/PrimitiveAnchor.mjs.map +1 -0
- package/build/primitives/PrimitiveButton/{src/PrimitiveButton.js → PrimitiveButton.js} +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.js.map +1 -0
- package/build/primitives/PrimitiveButton/{src/PrimitiveButton.mjs → PrimitiveButton.mjs} +1 -1
- package/build/primitives/PrimitiveButton/PrimitiveButton.mjs.map +1 -0
- package/build/styles/alert/Alert.css +4 -0
- package/build/styles/carousel/Carousel.css +0 -8
- package/build/styles/common/closeButton/CloseButton.css +15 -0
- package/build/styles/criticalBanner/CriticalCommsBanner.css +33 -73
- package/build/styles/main.css +46 -75
- package/build/table/TableCell.js +7 -1
- package/build/table/TableCell.js.map +1 -1
- package/build/table/TableCell.mjs +7 -1
- package/build/table/TableCell.mjs.map +1 -1
- package/build/test-utils/assets/wise-card.svg +1 -0
- package/build/types/actionButton/ActionButton.d.ts +6 -0
- package/build/types/actionButton/ActionButton.d.ts.map +1 -1
- package/build/types/actionOption/ActionOption.d.ts +2 -1
- package/build/types/actionOption/ActionOption.d.ts.map +1 -1
- package/build/types/alert/Alert.d.ts +3 -4
- package/build/types/alert/Alert.d.ts.map +1 -1
- package/build/types/avatar/Avatar.d.ts +3 -0
- package/build/types/avatar/Avatar.d.ts.map +1 -1
- package/build/types/avatar/avatarTypes.d.ts +3 -0
- package/build/types/avatar/avatarTypes.d.ts.map +1 -1
- package/build/types/badge/Badge.d.ts +3 -0
- package/build/types/badge/Badge.d.ts.map +1 -1
- package/build/types/button/LegacyButton.d.ts +27 -0
- package/build/types/button/LegacyButton.d.ts.map +1 -1
- package/build/types/carousel/Carousel.d.ts.map +1 -1
- package/build/types/common/action/Action.d.ts +5 -2
- package/build/types/common/action/Action.d.ts.map +1 -1
- package/build/types/common/closeButton/CloseButton.d.ts +3 -3
- package/build/types/common/closeButton/CloseButton.d.ts.map +1 -1
- package/build/types/criticalBanner/CriticalCommsBanner.d.ts.map +1 -1
- package/build/types/iconButton/IconButton.d.ts +2 -2
- package/build/types/iconButton/IconButton.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.d.ts → PrimitiveAnchor.d.ts} +1 -1
- package/build/types/primitives/PrimitiveAnchor/PrimitiveAnchor.d.ts.map +1 -0
- package/build/types/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.types.d.ts → PrimitiveAnchor.types.d.ts} +1 -1
- package/build/types/primitives/PrimitiveAnchor/PrimitiveAnchor.types.d.ts.map +1 -0
- package/build/types/primitives/PrimitiveAnchor/index.d.ts +2 -2
- package/build/types/primitives/PrimitiveAnchor/index.d.ts.map +1 -1
- package/build/types/primitives/PrimitiveButton/{src/PrimitiveButton.d.ts → PrimitiveButton.d.ts} +1 -1
- package/build/types/primitives/PrimitiveButton/PrimitiveButton.d.ts.map +1 -0
- package/build/types/primitives/PrimitiveButton/{src/PrimitiveButton.types.d.ts → PrimitiveButton.types.d.ts} +1 -1
- package/build/types/primitives/PrimitiveButton/PrimitiveButton.types.d.ts.map +1 -0
- package/build/types/primitives/PrimitiveButton/index.d.ts +2 -2
- package/build/types/primitives/PrimitiveButton/index.d.ts.map +1 -1
- package/build/types/table/TableCell.d.ts +6 -3
- package/build/types/table/TableCell.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/actionButton/ActionButton.story.tsx +6 -1
- package/src/actionButton/ActionButton.tsx +6 -0
- package/src/actionOption/ActionOption.story.tsx +9 -6
- package/src/actionOption/ActionOption.tsx +29 -5
- package/src/alert/Alert.css +4 -0
- package/src/alert/Alert.less +4 -0
- package/src/alert/Alert.spec.tsx +0 -30
- package/src/alert/Alert.story.tsx +74 -2
- package/src/alert/Alert.tsx +18 -21
- package/src/avatar/Avatar.tsx +3 -0
- package/src/avatar/avatarTypes.ts +3 -1
- package/src/badge/Badge.tsx +3 -0
- package/src/button/LegacyButton.tsx +27 -0
- package/src/carousel/Carousel.css +0 -8
- package/src/carousel/Carousel.less +0 -7
- package/src/carousel/Carousel.spec.tsx +2 -2
- package/src/carousel/Carousel.tsx +11 -10
- package/src/common/action/Action.tsx +40 -22
- package/src/common/closeButton/CloseButton.css +15 -0
- package/src/common/closeButton/CloseButton.less +10 -0
- package/src/common/closeButton/CloseButton.tsx +4 -3
- package/src/criticalBanner/CriticalCommsBanner.css +33 -73
- package/src/criticalBanner/CriticalCommsBanner.less +37 -64
- package/src/criticalBanner/CriticalCommsBanner.story.tsx +26 -4
- package/src/criticalBanner/CriticalCommsBanner.tsx +8 -50
- package/src/iconButton/IconButton.tsx +4 -1
- package/src/main.css +46 -75
- package/src/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.tsx → PrimitiveAnchor.tsx} +1 -1
- package/src/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.types.ts → PrimitiveAnchor.types.ts} +1 -1
- package/src/primitives/PrimitiveAnchor/index.ts +6 -2
- package/src/primitives/PrimitiveAnchor/stories/PrimitiveAnchor.tests.story.tsx +1 -1
- package/src/primitives/PrimitiveAnchor/test/PrimitiveAnchor.spec.tsx +1 -1
- package/src/primitives/PrimitiveButton/{src/PrimitiveButton.tsx → PrimitiveButton.tsx} +2 -2
- package/src/primitives/PrimitiveButton/{src/PrimitiveButton.types.ts → PrimitiveButton.types.ts} +1 -1
- package/src/primitives/PrimitiveButton/index.ts +6 -2
- package/src/primitives/PrimitiveButton/stories/PrimitiveButton.tests.story.tsx +1 -1
- package/src/primitives/PrimitiveButton/test/PrimitiveButton.spec.tsx +1 -1
- package/src/table/Table.story.tsx +59 -1
- package/src/table/TableCell.spec.tsx +17 -0
- package/src/table/TableCell.tsx +14 -5
- package/src/test-utils/assets/wise-card.svg +1 -0
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.js.map +0 -1
- package/build/primitives/PrimitiveAnchor/src/PrimitiveAnchor.mjs.map +0 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.js.map +0 -1
- package/build/primitives/PrimitiveButton/src/PrimitiveButton.mjs.map +0 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.d.ts.map +0 -1
- package/build/types/primitives/PrimitiveAnchor/src/PrimitiveAnchor.types.d.ts.map +0 -1
- package/build/types/primitives/PrimitiveAnchor/src/index.d.ts +0 -3
- package/build/types/primitives/PrimitiveAnchor/src/index.d.ts.map +0 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.d.ts.map +0 -1
- package/build/types/primitives/PrimitiveButton/src/PrimitiveButton.types.d.ts.map +0 -1
- package/build/types/primitives/PrimitiveButton/src/index.d.ts +0 -3
- package/build/types/primitives/PrimitiveButton/src/index.d.ts.map +0 -1
- package/src/primitives/PrimitiveAnchor/src/index.ts +0 -6
- package/src/primitives/PrimitiveButton/src/index.ts +0 -6
- /package/build/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.js → PrimitiveAnchor.js} +0 -0
- /package/build/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.mjs → PrimitiveAnchor.mjs} +0 -0
|
@@ -4,6 +4,15 @@ import { ButtonReferenceType } from './Button.types';
|
|
|
4
4
|
type DeprecatedTypes = 'primary' | 'pay' | 'secondary' | 'danger' | 'link';
|
|
5
5
|
/** @deprecated */
|
|
6
6
|
type DeprecatedSizes = SizeExtraSmall;
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated use new button instead APIs
|
|
9
|
+
* @example
|
|
10
|
+
* ```
|
|
11
|
+
* import { Button, ButtonProps } from '@transferwise/components';
|
|
12
|
+
*
|
|
13
|
+
* <Button v2>...</Button>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
7
16
|
export type CommonProps = {
|
|
8
17
|
v2?: false;
|
|
9
18
|
as?: 'a' | 'button';
|
|
@@ -29,8 +38,26 @@ export type CommonProps = {
|
|
|
29
38
|
size?: SizeSmall | SizeMedium | SizeLarge | DeprecatedSizes;
|
|
30
39
|
htmlType?: 'submit' | 'reset' | 'button';
|
|
31
40
|
};
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated use new button instead APIs
|
|
43
|
+
* @example
|
|
44
|
+
* ```
|
|
45
|
+
* import { Button, ButtonProps } from '@transferwise/components';
|
|
46
|
+
*
|
|
47
|
+
* <Button v2>...</Button>
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
32
50
|
export type ButtonProps = CommonProps & Omit<React.ComponentPropsWithRef<'button'>, 'type'>;
|
|
33
51
|
type AnchorProps = CommonProps & Omit<React.ComponentPropsWithRef<'a'>, 'type'>;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated use new button instead APIs
|
|
54
|
+
* @example
|
|
55
|
+
* ```
|
|
56
|
+
* import { Button, ButtonProps } from '@transferwise/components';
|
|
57
|
+
*
|
|
58
|
+
* <Button v2>...</Button>
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
34
61
|
export type LegacyButtonProps = ButtonProps | AnchorProps;
|
|
35
62
|
/**
|
|
36
63
|
* @deprecated make sure you use new Button component via `<Button v2 .. />` and new props
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegacyButton.d.ts","sourceRoot":"","sources":["../../../src/button/LegacyButton.tsx"],"names":[],"mappings":"AAIA,OAAO,EAIL,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,UAAU,EACV,SAAS,EACV,MAAM,WAAW,CAAC;AAMnB,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,kBAAkB;AAClB,KAAK,eAAe,GAAG,SAAS,GAAG,KAAK,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE3E,kB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,aAAa,
|
|
1
|
+
{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../../src/carousel/Carousel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAA+B,MAAM,OAAO,CAAC;AAIxF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,GAAG;IACrD,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,OAAO,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG;IACnD,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC;AAErC,MAAM,MAAM,YAAY,GAAG,mBAAmB,GAAG,iBAAiB,CAAC;AACnE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAUD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoSrC,CAAC;AAYF,eAAe,QAAQ,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ButtonPriority, ButtonSentiment } from '../../button/Button.types';
|
|
1
2
|
export type ActionOptions = {
|
|
2
3
|
'aria-label'?: string;
|
|
3
4
|
href?: string;
|
|
@@ -6,10 +7,12 @@ export type ActionOptions = {
|
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
};
|
|
8
9
|
type Props = {
|
|
9
|
-
variant?: 'button' | 'action-button';
|
|
10
10
|
action: ActionOptions;
|
|
11
11
|
className?: string;
|
|
12
|
+
variant?: 'button' | 'action-button';
|
|
13
|
+
sentiment?: ButtonSentiment;
|
|
14
|
+
priority?: ButtonPriority;
|
|
12
15
|
};
|
|
13
|
-
export declare function Action({ action, className, variant }: Props): import("react").JSX.Element;
|
|
16
|
+
export declare function Action({ action, className, variant, sentiment, priority, }: Props): import("react").JSX.Element;
|
|
14
17
|
export {};
|
|
15
18
|
//# sourceMappingURL=Action.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/common/action/Action.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Action.d.ts","sourceRoot":"","sources":["../../../../src/common/action/Action.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAE5E,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,QAAQ,GAAG,eAAe,CAAC;IACrC,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,MAAM,EACN,SAAS,EACT,OAAkB,EAClB,SAAqB,EACrB,QAA6B,GAC9B,EAAE,KAAK,+BA4CP"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SizeLarge, SizeMedium, SizeSmall } from '../propsValues/size';
|
|
1
|
+
import { SizeLarge, SizeMedium, SizeSmall, SizeExtraSmall } from '../propsValues/size';
|
|
2
2
|
export type CloseButtonProps = Pick<React.ComponentPropsWithoutRef<'button'>, 'aria-label' | 'className' | 'onClick'> & {
|
|
3
|
-
size?: SizeSmall | SizeMedium | SizeLarge;
|
|
3
|
+
size?: SizeExtraSmall | SizeSmall | SizeMedium | SizeLarge;
|
|
4
4
|
filled?: boolean;
|
|
5
5
|
isDisabled?: boolean;
|
|
6
6
|
testId?: string;
|
|
@@ -9,7 +9,7 @@ export type CloseButtonProps = Pick<React.ComponentPropsWithoutRef<'button'>, 'a
|
|
|
9
9
|
* @deprecated Use `<IconButton />` component instead
|
|
10
10
|
*/
|
|
11
11
|
export declare const CloseButton: import("react").ForwardRefExoticComponent<Pick<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "className" | "aria-label" | "onClick"> & {
|
|
12
|
-
size?: SizeSmall | SizeMedium | SizeLarge;
|
|
12
|
+
size?: SizeExtraSmall | SizeSmall | SizeMedium | SizeLarge;
|
|
13
13
|
filled?: boolean;
|
|
14
14
|
isDisabled?: boolean;
|
|
15
15
|
testId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloseButton.d.ts","sourceRoot":"","sources":["../../../../src/common/closeButton/CloseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"CloseButton.d.ts","sourceRoot":"","sources":["../../../../src/common/closeButton/CloseButton.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI7F,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,KAAK,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EACxC,YAAY,GAAG,WAAW,GAAG,SAAS,CACvC,GAAG;IACF,IAAI,CAAC,EAAE,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;WATf,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS;aACjD,OAAO;iBACH,OAAO;aACX,MAAM;4DA8Cf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CriticalCommsBanner.d.ts","sourceRoot":"","sources":["../../../src/criticalBanner/CriticalCommsBanner.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CriticalCommsBanner.d.ts","sourceRoot":"","sources":["../../../src/criticalBanner/CriticalCommsBanner.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,iBAAS,mBAAmB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,wBAAwB,+BAY5F;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -4,12 +4,12 @@ export type Props = {
|
|
|
4
4
|
priority?: 'primary' | 'secondary' | 'tertiary' | 'minimal';
|
|
5
5
|
type?: 'default' | 'negative';
|
|
6
6
|
'data-testid'?: string;
|
|
7
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled'> & Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'role' | 'children' | 'aria-label'>;
|
|
7
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'onClick'> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'onClick' | 'disabled'> & Pick<HTMLAttributes<HTMLDivElement>, 'className' | 'role' | 'children' | 'aria-label' | 'tabIndex'>;
|
|
8
8
|
declare const IconButton: import("react").ForwardRefExoticComponent<{
|
|
9
9
|
size?: 16 | 24 | 32 | 40 | 48 | 56 | 72;
|
|
10
10
|
priority?: "primary" | "secondary" | "tertiary" | "minimal";
|
|
11
11
|
type?: "default" | "negative";
|
|
12
12
|
'data-testid'?: string;
|
|
13
|
-
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> & Pick<HTMLAttributes<HTMLDivElement>, "className" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
|
|
13
|
+
} & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> & Pick<HTMLAttributes<HTMLDivElement>, "className" | "tabIndex" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
|
|
14
14
|
export default IconButton;
|
|
15
15
|
//# sourceMappingURL=IconButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/iconButton/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,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AG,UAAU,GAAG,YAAY,GAAG,UAAU,CAC9D,CAAC;AAEJ,QAAA,MAAM,UAAU;WAXP,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;eAC5B,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS;WACpD,SAAS,GAAG,UAAU;oBACb,MAAM;wSA0CtB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
package/build/types/primitives/PrimitiveAnchor/{src/PrimitiveAnchor.d.ts → PrimitiveAnchor.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PrimitiveAnchorProps } from '
|
|
2
|
+
import type { PrimitiveAnchorProps } from '.';
|
|
3
3
|
/**
|
|
4
4
|
* The Primitive `PrimitiveAnchor` component is customisable link element that can be
|
|
5
5
|
* used in various parts of the Wise Design System internally. It supports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveAnchor.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveAnchor/PrimitiveAnchor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAEvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAE9C;;;;;;;;GAQG;AACH,QAAA,MAAM,eAAe,6GAkGpB,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveAnchor.types.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveAnchor/PrimitiveAnchor.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACtF,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,oBACf,SAAQ,kBAAkB,EACxB,SAAS,EACT,IAAI,CAAC,yBAAyB,EAAE,MAAM,GAAG,MAAM,CAAC;IAClD,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,wDAAwD;IACxD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE1B,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,sCAAsC;IACtC,GAAG,CAAC,EAAE,yBAAyB,CAAC;IAEhC;;OAEG;IACH,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;CACtC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default } from './
|
|
2
|
-
export
|
|
1
|
+
export { default } from './PrimitiveAnchor';
|
|
2
|
+
export type { PrimitiveAnchorProps, PrimitiveAnchorAttributes, PrimitiveAnchorElementRef, } from './PrimitiveAnchor.types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveAnchor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveAnchor/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC"}
|
package/build/types/primitives/PrimitiveButton/{src/PrimitiveButton.d.ts → PrimitiveButton.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { PrimitiveButtonProps } from '
|
|
2
|
+
import type { PrimitiveButtonProps } from '.';
|
|
3
3
|
/**
|
|
4
4
|
* The Primitive `PrimitiveButton` component can be used in various parts the Wise Design
|
|
5
5
|
* System internally. It supports different states such as disabled and loading,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveButton.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveButton/PrimitiveButton.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkC,MAAM,OAAO,CAAC;AAIvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAE9C;;;;;;;;GAQG;AACH,QAAA,MAAM,eAAe,6GAsGpB,CAAC;AAIF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PrimitiveButton.types.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveButton/PrimitiveButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC,CAAC;AACpG,MAAM,MAAM,yBAAyB,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,oBACf,SAAQ,kBAAkB,EACxB,SAAS,EACT,yBAAyB;IAC3B,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,SAAS,CAAC;IAErB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,sCAAsC;IACtC,GAAG,CAAC,EAAE,yBAAyB,CAAC;CACjC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default } from './
|
|
2
|
-
export
|
|
1
|
+
export { default } from './PrimitiveButton';
|
|
2
|
+
export type { PrimitiveButtonProps, PrimitiveButtonAttributes, PrimitiveButtonElementRef, } from './PrimitiveButton.types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,YAAY,EACV,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { ImgHTMLAttributes } from 'react';
|
|
2
2
|
import { MoneyProps } from '../money';
|
|
3
3
|
interface TableCellTypeProp {
|
|
4
|
-
type: 'leading' | 'text' | 'currency' | 'status';
|
|
4
|
+
type: 'leading' | 'text' | 'currency' | 'status' | 'media';
|
|
5
5
|
}
|
|
6
6
|
interface TableCellTextProps {
|
|
7
7
|
primaryText?: string;
|
|
@@ -10,6 +10,9 @@ interface TableCellTextProps {
|
|
|
10
10
|
interface TableCellStatusProp {
|
|
11
11
|
status?: 'error' | 'success';
|
|
12
12
|
}
|
|
13
|
+
export interface TableCellMedia extends TableCellTypeProp, TableCellTextProps {
|
|
14
|
+
media?: ImgHTMLAttributes<HTMLImageElement>;
|
|
15
|
+
}
|
|
13
16
|
export interface TableCellLeading extends TableCellTypeProp, TableCellTextProps, TableCellStatusProp {
|
|
14
17
|
avatar?: {
|
|
15
18
|
src?: string;
|
|
@@ -27,7 +30,7 @@ export interface TableCellStatus extends TableCellTypeProp, TableCellTextProps {
|
|
|
27
30
|
sentiment?: 'negative' | 'neutral' | 'positive' | 'warning' | 'pending';
|
|
28
31
|
}
|
|
29
32
|
export interface TableCellType {
|
|
30
|
-
cell?: TableCellLeading & TableCellText & TableCellCurrency & TableCellStatus;
|
|
33
|
+
cell?: TableCellLeading & TableCellText & TableCellCurrency & TableCellStatus & TableCellMedia;
|
|
31
34
|
alignment?: 'left' | 'right';
|
|
32
35
|
}
|
|
33
36
|
export interface TableCellProps extends TableCellType {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../src/table/TableCell.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TableCell.d.ts","sourceRoot":"","sources":["../../../src/table/TableCell.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGjD,OAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAG7C,UAAU,iBAAiB;IACzB,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC;CAC5D;AAGD,UAAU,kBAAkB;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,UAAU,mBAAmB;IAC3B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B;AAED,MAAM,WAAW,cAAe,SAAQ,iBAAiB,EAAE,kBAAkB;IAC3E,KAAK,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,gBACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,mBAAmB;IACrB,MAAM,CAAC,EAAE;QACP,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,mBAAmB;IAC3E,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB,EAAE,mBAAmB;IAC/E,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,iBAAiB,CAAC,EAAE,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,eAAgB,SAAQ,iBAAiB,EAAE,kBAAkB;IAC5E,SAAS,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;CACzE;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,gBAAgB,GAAG,aAAa,GAAG,iBAAiB,GAAG,eAAe,GAAG,cAAc,CAAC;IAC/F,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC9B;AAGD,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,SAAS,sDAAgE,cAAc,sBA4F5F,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.89.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"rollup-preserve-directives": "^1.1.1",
|
|
93
93
|
"storybook": "^8.2.2",
|
|
94
94
|
"@transferwise/less-config": "3.1.0",
|
|
95
|
-
"@transferwise/neptune-css": "14.21.
|
|
95
|
+
"@transferwise/neptune-css": "14.21.1",
|
|
96
96
|
"@wise/components-theming": "1.6.1"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
@@ -5,9 +5,14 @@ import { storyConfig } from '../test-utils/story-config';
|
|
|
5
5
|
|
|
6
6
|
import ActionButton from './ActionButton';
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* This component is deprecated please use new [Button](?path=/docs/actions-button--docs).
|
|
10
|
+
*
|
|
11
|
+
* For more details please refer to the [release notes](https://transferwise.atlassian.net/wiki/spaces/DS/pages/3542158737/Button+Updates+New+sizes+Loader+and+Cue) and the [design spec](https://wise.design/components/button).
|
|
12
|
+
*/
|
|
8
13
|
export default {
|
|
9
14
|
component: ActionButton,
|
|
10
|
-
title: 'Actions/ActionButton',
|
|
15
|
+
title: 'Actions/ActionButton (Deprecated)',
|
|
11
16
|
tags: ['autodocs'],
|
|
12
17
|
} satisfies Meta<typeof ActionButton>;
|
|
13
18
|
|
|
@@ -3,6 +3,9 @@ import { ButtonHTMLAttributes, forwardRef } from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Priority, PriorityPrimary, PrioritySecondary, PriorityTertiary } from '../common';
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated use `<Button />` component instead with `ButtonProps`
|
|
8
|
+
*/
|
|
6
9
|
export type ActionButtonProps = {
|
|
7
10
|
priority?: PriorityPrimary | PrioritySecondary | PriorityTertiary;
|
|
8
11
|
/**
|
|
@@ -11,6 +14,9 @@ export type ActionButtonProps = {
|
|
|
11
14
|
text?: string;
|
|
12
15
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
16
|
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated use `<Button v2 size="sm" priority={'primary' / 'secondary-neutral' / 'tertiary'} .. />` component instead
|
|
19
|
+
*/
|
|
14
20
|
const ActionButton = forwardRef<HTMLButtonElement, ActionButtonProps>(
|
|
15
21
|
(
|
|
16
22
|
{
|
|
@@ -25,12 +25,15 @@ export const Basic: Story = {
|
|
|
25
25
|
render: (args) => <ActionOption {...args} />,
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
export const
|
|
29
|
-
render: (args) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
export const Variants: Story = {
|
|
29
|
+
render: (args) => (
|
|
30
|
+
<>
|
|
31
|
+
<ActionOption priority="primary" {...args} title="priority = primary" />
|
|
32
|
+
<ActionOption priority="secondary" {...args} title="priority = secondary" />
|
|
33
|
+
<ActionOption priority="secondary-send" {...args} title="priority = secondary-send" />
|
|
34
|
+
<ActionOption priority="tertiary" {...args} title="priority = tertiary" />
|
|
35
|
+
</>
|
|
36
|
+
),
|
|
34
37
|
};
|
|
35
38
|
|
|
36
39
|
export const WithContainerContent: Story = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import Button from '../button';
|
|
4
4
|
import {
|
|
5
5
|
CommonProps,
|
|
6
6
|
Priority,
|
|
@@ -9,6 +9,13 @@ import {
|
|
|
9
9
|
PriorityTertiary,
|
|
10
10
|
} from '../common';
|
|
11
11
|
import Option from '../common/Option';
|
|
12
|
+
import { ButtonPriority } from '../button/Button.types';
|
|
13
|
+
|
|
14
|
+
type ActionOptionPriority =
|
|
15
|
+
| PriorityPrimary
|
|
16
|
+
| PrioritySecondary
|
|
17
|
+
| PriorityTertiary
|
|
18
|
+
| 'secondary-send';
|
|
12
19
|
|
|
13
20
|
export type ActionOptionProps = {
|
|
14
21
|
complex?: boolean;
|
|
@@ -19,7 +26,7 @@ export type ActionOptionProps = {
|
|
|
19
26
|
onClick: () => void;
|
|
20
27
|
title: React.ReactNode;
|
|
21
28
|
action: React.ReactNode;
|
|
22
|
-
priority?:
|
|
29
|
+
priority?: ActionOptionPriority;
|
|
23
30
|
showMediaCircle?: boolean;
|
|
24
31
|
isContainerAligned?: boolean;
|
|
25
32
|
as?: React.ElementType;
|
|
@@ -67,18 +74,35 @@ const ActionOption = ({
|
|
|
67
74
|
return labels.join(', ') || undefined;
|
|
68
75
|
};
|
|
69
76
|
|
|
77
|
+
const mapPriority = (priority: ActionOptionPriority): ButtonPriority => {
|
|
78
|
+
switch (priority) {
|
|
79
|
+
case 'primary':
|
|
80
|
+
return 'primary';
|
|
81
|
+
case 'secondary':
|
|
82
|
+
return 'secondary-neutral';
|
|
83
|
+
case 'tertiary':
|
|
84
|
+
return 'tertiary';
|
|
85
|
+
case 'secondary-send':
|
|
86
|
+
return 'secondary';
|
|
87
|
+
default:
|
|
88
|
+
return 'primary';
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
70
92
|
return (
|
|
71
93
|
<Option
|
|
72
94
|
{...sharedProps}
|
|
73
95
|
button={
|
|
74
|
-
<
|
|
75
|
-
|
|
96
|
+
<Button
|
|
97
|
+
v2
|
|
98
|
+
size="sm"
|
|
99
|
+
priority={mapPriority(priority)}
|
|
76
100
|
disabled={disabled}
|
|
77
101
|
aria-label={getAriaLabel()}
|
|
78
102
|
onClick={onClick}
|
|
79
103
|
>
|
|
80
104
|
{action}
|
|
81
|
-
</
|
|
105
|
+
</Button>
|
|
82
106
|
}
|
|
83
107
|
/>
|
|
84
108
|
);
|
package/src/alert/Alert.css
CHANGED
package/src/alert/Alert.less
CHANGED
package/src/alert/Alert.spec.tsx
CHANGED
|
@@ -445,36 +445,6 @@ describe('Alert', () => {
|
|
|
445
445
|
});
|
|
446
446
|
|
|
447
447
|
describe('with personal theme', () => {
|
|
448
|
-
it('renders mobile variant if passed in', () => {
|
|
449
|
-
render(
|
|
450
|
-
<ThemeProvider theme={Theme.PERSONAL}>
|
|
451
|
-
<Alert message={message} variant={Variant.MOBILE} />
|
|
452
|
-
</ThemeProvider>,
|
|
453
|
-
);
|
|
454
|
-
|
|
455
|
-
expect(screen.getByTestId('mobile')).toBeInTheDocument();
|
|
456
|
-
});
|
|
457
|
-
|
|
458
|
-
it('renders desktop variant if passed in', () => {
|
|
459
|
-
render(
|
|
460
|
-
<ThemeProvider theme={Theme.PERSONAL}>
|
|
461
|
-
<Alert message={message} variant={Variant.DESKTOP} />
|
|
462
|
-
</ThemeProvider>,
|
|
463
|
-
);
|
|
464
|
-
|
|
465
|
-
expect(screen.getByTestId('desktop')).toBeInTheDocument();
|
|
466
|
-
});
|
|
467
|
-
|
|
468
|
-
it('renders desktop variant by default', () => {
|
|
469
|
-
render(
|
|
470
|
-
<ThemeProvider theme={Theme.PERSONAL}>
|
|
471
|
-
<Alert message={message} />
|
|
472
|
-
</ThemeProvider>,
|
|
473
|
-
);
|
|
474
|
-
|
|
475
|
-
expect(screen.getByTestId('desktop')).toBeInTheDocument();
|
|
476
|
-
});
|
|
477
|
-
|
|
478
448
|
it('renders StatusIcon for Personal theme', () => {
|
|
479
449
|
render(
|
|
480
450
|
<ThemeProvider theme={Theme.PERSONAL}>
|
|
@@ -3,6 +3,7 @@ import { Meta, StoryObj } from '@storybook/react';
|
|
|
3
3
|
import { action } from '@storybook/addon-actions';
|
|
4
4
|
import { ClockBorderless } from '@transferwise/icons';
|
|
5
5
|
|
|
6
|
+
import { lorem40 } from '../test-utils';
|
|
6
7
|
import { Sentiment } from '../common';
|
|
7
8
|
import { Button, Field, SelectInput } from '..';
|
|
8
9
|
import Alert, { AlertArrowPosition, type AlertProps as FullAlertProps } from './Alert';
|
|
@@ -43,6 +44,46 @@ type Story = StoryObj<typeof Alert>;
|
|
|
43
44
|
|
|
44
45
|
export const Basic: Story = {};
|
|
45
46
|
|
|
47
|
+
export const Variants: Story = {
|
|
48
|
+
render: ({ message }) => {
|
|
49
|
+
const variants = [
|
|
50
|
+
{ type: Sentiment.POSITIVE, title: 'Positive Title' },
|
|
51
|
+
{ type: Sentiment.NEGATIVE, title: 'Negative Title' },
|
|
52
|
+
{ type: Sentiment.NEUTRAL, title: 'Neutral Title' },
|
|
53
|
+
{ type: Sentiment.WARNING, title: 'Warning Title' },
|
|
54
|
+
{ type: Sentiment.PENDING, title: 'Pending Title' },
|
|
55
|
+
];
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<>
|
|
59
|
+
{variants.map((variant) => (
|
|
60
|
+
<Alert
|
|
61
|
+
key={variant.type}
|
|
62
|
+
type={variant.type}
|
|
63
|
+
title={variant.title}
|
|
64
|
+
message={message}
|
|
65
|
+
action={
|
|
66
|
+
variant.type === Sentiment.NEUTRAL
|
|
67
|
+
? { href: '#', text: 'Read more' }
|
|
68
|
+
: { onClick: action('alert action clicked'), text: 'Open' }
|
|
69
|
+
}
|
|
70
|
+
onDismiss={variant.type === Sentiment.NEUTRAL ? action('alert dismissed') : undefined}
|
|
71
|
+
/>
|
|
72
|
+
))}
|
|
73
|
+
</>
|
|
74
|
+
);
|
|
75
|
+
},
|
|
76
|
+
args: {
|
|
77
|
+
message: 'This message can be changed using controls',
|
|
78
|
+
},
|
|
79
|
+
parameters: {
|
|
80
|
+
controls: { exclude: /^(?!message$).*/ },
|
|
81
|
+
},
|
|
82
|
+
argTypes: {
|
|
83
|
+
message: { control: 'text' },
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
46
87
|
export const WithLinkAction: Story = {
|
|
47
88
|
args: {
|
|
48
89
|
action: {
|
|
@@ -84,7 +125,7 @@ const CustomIcon = () => {
|
|
|
84
125
|
justifyContent: 'center',
|
|
85
126
|
}}
|
|
86
127
|
>
|
|
87
|
-
<ClockBorderless size="
|
|
128
|
+
<ClockBorderless size="24" />
|
|
88
129
|
</div>
|
|
89
130
|
);
|
|
90
131
|
};
|
|
@@ -96,11 +137,42 @@ export const WithCustomIcon: Story = {
|
|
|
96
137
|
},
|
|
97
138
|
};
|
|
98
139
|
|
|
99
|
-
export const
|
|
140
|
+
export const WithTitleAndButtonAction: Story = {
|
|
100
141
|
args: {
|
|
101
142
|
type: Sentiment.NEUTRAL,
|
|
102
143
|
title: 'We’re reviewing your information.',
|
|
144
|
+
message:
|
|
145
|
+
'Payments sent to your bank details **today** might not arrive in time for the holidays.',
|
|
103
146
|
onDismiss: () => {},
|
|
147
|
+
action: {
|
|
148
|
+
onClick: action('alert action clicked'),
|
|
149
|
+
text: 'Open',
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
};
|
|
153
|
+
export const WithTitleAndButtonActionAndLongBody: Story = {
|
|
154
|
+
args: {
|
|
155
|
+
type: Sentiment.NEUTRAL,
|
|
156
|
+
title: 'We’re reviewing your information.',
|
|
157
|
+
message: lorem40,
|
|
158
|
+
onDismiss: () => {},
|
|
159
|
+
action: {
|
|
160
|
+
onClick: action('alert action clicked'),
|
|
161
|
+
text: 'Open',
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export const WithTitleAndLinkActionAndLongBody: Story = {
|
|
167
|
+
args: {
|
|
168
|
+
type: Sentiment.NEUTRAL,
|
|
169
|
+
title: 'We’re reviewing your information.',
|
|
170
|
+
message: lorem40,
|
|
171
|
+
onDismiss: () => {},
|
|
172
|
+
action: {
|
|
173
|
+
href: '/',
|
|
174
|
+
text: 'Open',
|
|
175
|
+
},
|
|
104
176
|
},
|
|
105
177
|
};
|
|
106
178
|
|