@transferwise/components 46.165.0 → 46.165.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/build/Snackbar/Snackbar.js +98 -101
- package/build/Snackbar/Snackbar.js.map +1 -1
- package/build/Snackbar/Snackbar.mjs +99 -102
- package/build/Snackbar/Snackbar.mjs.map +1 -1
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/Carousel/_stories/constants.d.ts +25 -0
- package/build/types/Carousel/_stories/constants.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/ListItem/_stories/variants/helpers.d.ts +38 -1
- package/build/types/ListItem/_stories/variants/helpers.d.ts.map +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
- package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/Snackbar/Snackbar.d.ts +1 -15
- package/build/types/Snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/package.json +1 -1
- package/src/Accordion/_stories/Accordion.test.story.tsx +74 -48
- package/src/AvatarLayout/_stories/AvatarLayout.test.story.tsx +46 -30
- package/src/Button/LegacyButton/_stories/LegacyButton.test.story.tsx +29 -19
- package/src/Button/_stories/Button.test.story.tsx +96 -62
- package/src/Calendar/_stories/Calendar.test.story.tsx +34 -21
- package/src/Carousel/_stories/Carousel.test.story.tsx +18 -8
- package/src/Carousel/_stories/constants.tsx +29 -4
- package/src/Checkbox/_stories/Checkbox.test.story.tsx +22 -13
- package/src/CheckboxButton/_stories/CheckboxButton.test.story.tsx +23 -14
- package/src/Chips/_stories/Chips.test.story.tsx +51 -36
- package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +62 -12
- package/src/DateLookup/_stories/DateLookup.rtl.test.story.tsx +2 -2
- package/src/Decision/_stories/Decision.test.story.tsx +74 -58
- package/src/DefinitionList/_stories/DefinitionList.test.story.tsx +58 -42
- package/src/Drawer/_stories/Drawer.rtl.test.story.tsx +65 -38
- package/src/ExpressiveMoneyInput/_stories/ExpressiveMoneyInput.rtl.test.story.tsx +107 -74
- package/src/Field/_stories/Field.test.story.tsx +18 -18
- package/src/FlowNavigation/_stories/FlowNavigation.rtl.test.story.tsx +81 -51
- package/src/Header/_stories/Header.test.story.tsx +30 -18
- package/src/Info/_stories/Info.rtl.test.story.tsx +124 -50
- package/src/InputWithDisplayFormat/_stories/InputWithDisplayFormat.test.story.tsx +4 -4
- package/src/Inputs/InputGroup/_stories/InputGroup.test.story.tsx +9 -8
- package/src/Inputs/SearchInput/_stories/SearchInput.test.story.tsx +5 -3
- package/src/Inputs/SelectInput/_stories/SelectInput.rtl.test.story.tsx +108 -79
- package/src/Inputs/TextArea/_stories/TextArea.test.story.tsx +10 -10
- package/src/InstructionsList/_stories/InstructionsList.test.story.tsx +43 -16
- package/src/Label/_stories/Label.test.story.tsx +7 -7
- package/src/Link/_stories/Link.test.story.tsx +27 -13
- package/src/ListItem/_stories/ListItem.rtl.test.story.tsx +126 -6
- package/src/ListItem/_stories/variants/helpers.tsx +174 -126
- package/src/Loader/_stories/Loader.test.story.tsx +17 -10
- package/src/Modal/_stories/Modal.rtl.test.story.tsx +58 -39
- package/src/MoneyInput/_stories/MoneyInput.rtl.test.story.tsx +21 -3
- package/src/Nudge/_stories/Nudge.test.story.tsx +70 -21
- package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +1 -1
- package/src/Popover/_stories/Popover.rtl.test.story.tsx +92 -49
- package/src/ProgressBar/_stories/ProgressBar.test.story.tsx +6 -6
- package/src/PromoCard/_stories/PromoCard.test.story.tsx +53 -29
- package/src/PromoCard/_stories/PromoCardGroup.test.story.tsx +60 -36
- package/src/Prompt/ActionPrompt/_stories/ActionPrompt.test.story.tsx +74 -38
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +68 -31
- package/src/Prompt/InfoPrompt/_stories/InfoPrompt.test.story.tsx +52 -22
- package/src/Prompt/InlinePrompt/_stories/InlinePrompt.test.story.tsx +36 -21
- package/src/Radio/_stories/Radio.test.story.tsx +60 -46
- package/src/RadioGroup/_stories/RadioGroup.test.story.tsx +70 -51
- package/src/Section/_stories/Section.test.story.tsx +30 -14
- package/src/SegmentedControl/_stories/SegmentedControl.test.story.tsx +38 -15
- package/src/SlidingPanel/_stories/SlidingPanel.rtl.test.story.tsx +58 -34
- package/src/Snackbar/Snackbar.test.tsx +16 -0
- package/src/Snackbar/Snackbar.tsx +91 -88
- package/src/Snackbar/_stories/Snackbar.rtl.test.story.tsx +24 -12
- package/src/Stepper/_stories/Stepper.test.story.tsx +27 -9
- package/src/Switch/_stories/Switch.test.story.tsx +20 -12
- package/src/Table/_stories/Table.test.story.tsx +107 -86
- package/src/Tabs/_stories/Tabs.test.story.tsx +92 -52
- package/src/Tag/_stories/Tag.test.story.tsx +27 -16
- package/src/TextareaWithDisplayFormat/_stories/TextareaWithDisplayFormat.test.story.tsx +4 -4
- package/src/Tooltip/_stories/Tooltip.rtl.test.story.tsx +68 -25
- package/src/Typeahead/_stories/Typeahead.rtl.test.story.tsx +4 -4
- package/src/Upload/_stories/Upload.rtl.test.story.tsx +49 -26
- package/src/UploadInput/_stories/UploadInput.test.story.tsx +63 -41
- package/src/_deprecated/Alert/_stories/Alert.test.story.tsx +45 -24
- package/src/_deprecated/Card/_stories/Card.test.story.tsx +47 -23
- package/src/_deprecated/CriticalBanner/_stories/CriticalCommsBanner.test.story.tsx +21 -15
- package/src/_deprecated/InlineAlert/_stories/InlineAlert.test.story.tsx +23 -12
- package/src/_deprecated/Select/_stories/Select.rtl.test.story.tsx +78 -42
- package/src/common/BottomSheet/_stories/BottomSheet.test.story.tsx +38 -20
- package/src/common/Panel/_stories/Panel.rtl.test.story.tsx +135 -51
|
@@ -1,10 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { StoryObj } from '@storybook/react-webpack5';
|
|
3
|
+
import { type ListItemProps } from '../../ListItem';
|
|
2
4
|
import { SB_ListItem_ControlType as ControlType } from '../subcomponents';
|
|
5
|
+
type VariantPartial = {
|
|
6
|
+
title: string;
|
|
7
|
+
} & Partial<ListItemProps>;
|
|
3
8
|
type Variant = 'default' | 'dark' | 'rtl' | 'forest-green' | 'bright-green' | 'mobile' | '400%';
|
|
4
|
-
type
|
|
9
|
+
export type VariantText = {
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
valueTitle: string;
|
|
13
|
+
valueSubtitle: string;
|
|
14
|
+
longTitle: string;
|
|
15
|
+
longSubtitle: string;
|
|
16
|
+
longValueTitle: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Every piece of copy and every slot the instance matrix is built from. Extracted so a story can
|
|
20
|
+
* render the same matrix with different content — the RTL diff swaps in localised versions.
|
|
21
|
+
*/
|
|
22
|
+
export type VariantContent = {
|
|
23
|
+
text: VariantText;
|
|
24
|
+
media: ReactNode;
|
|
25
|
+
additionalInfo: {
|
|
26
|
+
interactive: ReactNode;
|
|
27
|
+
nonInteractive: ReactNode;
|
|
28
|
+
};
|
|
29
|
+
prompt: {
|
|
30
|
+
interactive: ReactNode;
|
|
31
|
+
nonInteractive: ReactNode;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
export declare const DEFAULT_VARIANT_CONTENT: VariantContent;
|
|
35
|
+
export declare const getVariantInstances: (controlType: ControlType, { text, media, additionalInfo: info, prompt: prompts }: VariantContent) => VariantPartial[];
|
|
36
|
+
export type VariantStoryProps = {
|
|
5
37
|
controlType: ControlType;
|
|
6
38
|
variant?: Variant;
|
|
7
39
|
};
|
|
40
|
+
type VariantListProps = VariantStoryProps & {
|
|
41
|
+
content?: VariantContent;
|
|
42
|
+
controls?: Record<ControlType, ReactNode>;
|
|
43
|
+
};
|
|
44
|
+
export declare const VariantList: ({ controlType, variant, content, controls, }: VariantListProps) => import("react").JSX.Element;
|
|
8
45
|
type VariantStory = StoryObj<VariantStoryProps>;
|
|
9
46
|
export declare const VariantStory: VariantStory;
|
|
10
47
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/ListItem/_stories/variants/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/ListItem/_stories/variants/helpers.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAErD,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAML,uBAAuB,IAAI,WAAW,EACvC,MAAM,kBAAkB,CAAC;AAE1B,KAAK,cAAc,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AACjE,KAAK,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,KAAK,GAAG,cAAc,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC;AAShG,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,SAAS,CAAC;IACjB,cAAc,EAAE;QAAE,WAAW,EAAE,SAAS,CAAC;QAAC,cAAc,EAAE,SAAS,CAAA;KAAE,CAAC;IACtE,MAAM,EAAE;QAAE,WAAW,EAAE,SAAS,CAAC;QAAC,cAAc,EAAE,SAAS,CAAA;KAAE,CAAC;CAC/D,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,cAKrC,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,aAAa,WAAW,EACxB,wDAAwD,cAAc,KACrE,cAAc,EA8GhB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,KAAK,gBAAgB,GAAG,iBAAiB,GAAG;IAC1C,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,8CAKzB,gBAAgB,gCAUlB,CAAC;AAEF,KAAK,YAAY,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,YAAY,EAAE,YAK1B,CAAC"}
|
|
@@ -55,6 +55,7 @@ declare const _default: import("react").FC<{
|
|
|
55
55
|
selectProps?: Partial<SelectInputProps<CurrencyOptionItem>> | undefined;
|
|
56
56
|
amount: number | null;
|
|
57
57
|
searchPlaceholder?: string | undefined;
|
|
58
|
+
decimals?: number | undefined;
|
|
58
59
|
currencies: readonly CurrencyItem[];
|
|
59
60
|
selectedCurrency: CurrencyOptionItem;
|
|
60
61
|
onCurrencyChange?: ((value: CurrencyOptionItem) => void) | undefined;
|
|
@@ -66,7 +67,6 @@ declare const _default: import("react").FC<{
|
|
|
66
67
|
}) => void) | undefined;
|
|
67
68
|
customActionLabel?: import("react").ReactNode;
|
|
68
69
|
onCustomAction?: (() => void) | undefined;
|
|
69
|
-
decimals?: number | undefined;
|
|
70
70
|
}>;
|
|
71
71
|
export default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ACpC,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC5D;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,MAAM,kCAAkC,GAAG,eAAe,GAC9D,OAAO,CAAC,wBAAwB,CAAC,CAAC;;SA5B7B,MAAM;wBACS,MAAM;YAMnB,SAAS,GAAG,UAAU,GAAG,SAAS;kBAF3B,MAAM;iBAYP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;kBACrB,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YAZnD,MAAM,GAAG,IAAI;wBAID,MAAM;eAcf,MAAM;gBAtBL,SAAS,YAAY,EAAE;sBACjB,kBAAkB;wBACjB,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI;sBAIrC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;sBAM9B,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI;;sBAEzE,MAAM,IAAI;;AAkb7B,wBAA2F"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
2
1
|
import type { ThemeDark, ThemeLight } from '../common';
|
|
3
2
|
export interface SnackbarProps {
|
|
4
3
|
action?: {
|
|
@@ -11,20 +10,7 @@ export interface SnackbarProps {
|
|
|
11
10
|
timeout: number;
|
|
12
11
|
timestamp: number;
|
|
13
12
|
}
|
|
14
|
-
|
|
15
|
-
visible: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare class Snackbar extends Component<SnackbarProps, SnackbarState> {
|
|
18
|
-
bodyRef: import("react").RefObject<HTMLSpanElement>;
|
|
19
|
-
timeout: number;
|
|
20
|
-
transitionTimeout: number;
|
|
21
|
-
constructor(props: SnackbarProps);
|
|
22
|
-
componentWillUnmount(): void;
|
|
23
|
-
shouldComponentUpdate(nextProps: SnackbarProps, nextState: SnackbarState): boolean;
|
|
24
|
-
setLeaveTimeout: () => void;
|
|
25
|
-
componentDidUpdate(previousProps: SnackbarProps): void;
|
|
26
|
-
render(): import("react").JSX.Element;
|
|
27
|
-
}
|
|
13
|
+
export declare const Snackbar: (props: SnackbarProps) => import("react").JSX.Element;
|
|
28
14
|
declare const _default: (props: SnackbarProps) => import("react").ReactPortal | null;
|
|
29
15
|
export default _default;
|
|
30
16
|
//# sourceMappingURL=Snackbar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../src/Snackbar/Snackbar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../src/Snackbar/Snackbar.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAKvD,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE;QACP,KAAK,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;KACtD,CAAC;IACF,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,kBAAkB;IAClB,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB;AAMD,eAAO,MAAM,QAAQ,GAAI,OAAO,aAAa,gCAoG5C,CAAC;;AAEF,wBAAwC"}
|
|
@@ -10,7 +10,7 @@ export type TitleProps = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElemen
|
|
|
10
10
|
*/
|
|
11
11
|
type?: TitleTypes;
|
|
12
12
|
};
|
|
13
|
-
declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<
|
|
13
|
+
declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLSpanElement> & React.LiHTMLAttributes<HTMLLIElement> & {
|
|
14
14
|
/**
|
|
15
15
|
* Default value will based one `type` prop
|
|
16
16
|
*/
|
|
@@ -19,6 +19,6 @@ declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<H
|
|
|
19
19
|
* Default value: {@link DEFAULT_TYPE}
|
|
20
20
|
*/
|
|
21
21
|
type?: TitleTypes;
|
|
22
|
-
} & React.RefAttributes<
|
|
22
|
+
} & React.RefAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLSpanElement>>;
|
|
23
23
|
export default Title;
|
|
24
24
|
//# sourceMappingURL=Title.d.ts.map
|
|
@@ -15,7 +15,7 @@ export default class UploadImageStep extends PureComponent<UploadImageStepProps>
|
|
|
15
15
|
uploadInputRef: import("react").RefObject<HTMLInputElement>;
|
|
16
16
|
onManualUpload: () => void;
|
|
17
17
|
onKeyDown: (event: React.KeyboardEvent<HTMLLabelElement>) => void;
|
|
18
|
-
getImage: () => number | true | import("react").
|
|
18
|
+
getImage: () => number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
|
|
19
19
|
render(): import("react").JSX.Element;
|
|
20
20
|
}
|
|
21
21
|
//# sourceMappingURL=UploadImageStep.d.ts.map
|
|
@@ -5,5 +5,5 @@ export declare const UploadItemLink: import("react").ForwardRefExoticComponent<{
|
|
|
5
5
|
singleFileUpload: boolean;
|
|
6
6
|
} & {
|
|
7
7
|
children?: import("react").ReactNode | undefined;
|
|
8
|
-
} & import("react").RefAttributes<
|
|
8
|
+
} & import("react").RefAttributes<HTMLAnchorElement | HTMLDivElement>>;
|
|
9
9
|
//# sourceMappingURL=UploadItemLink.d.ts.map
|
package/package.json
CHANGED
|
@@ -2,54 +2,13 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import { userEvent, within } from 'storybook/test';
|
|
3
3
|
import { FastFlag as FastFlagIcon } from '@transferwise/icons';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
forEachColumn,
|
|
7
|
+
useRtlDiffI18n,
|
|
8
|
+
withRTLDiff,
|
|
9
|
+
} from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
6
10
|
import Accordion from '../Accordion';
|
|
7
11
|
|
|
8
|
-
const items = [
|
|
9
|
-
{
|
|
10
|
-
title: 'Item with icon',
|
|
11
|
-
subtitle: 'Subtitle text',
|
|
12
|
-
content: 'Content for item with icon.',
|
|
13
|
-
id: 'icon',
|
|
14
|
-
icon: <FastFlagIcon size={24} />,
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
title: 'Plain item without icon',
|
|
18
|
-
content: 'Content for item without icon.',
|
|
19
|
-
id: 'no-icon',
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
title: 'Media with circle',
|
|
23
|
-
subtitle: 'Shows media in a circle',
|
|
24
|
-
content: 'Expanded content with media circle.',
|
|
25
|
-
id: 'media-circle',
|
|
26
|
-
media: (
|
|
27
|
-
<img
|
|
28
|
-
src="https://wise.com/public-resources/assets/spend/card/asset//digital_card_2023.png"
|
|
29
|
-
alt=""
|
|
30
|
-
/>
|
|
31
|
-
),
|
|
32
|
-
showMediaCircle: true,
|
|
33
|
-
showMediaAtAllSizes: true,
|
|
34
|
-
isContainerAligned: true,
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
title: 'Media without circle',
|
|
38
|
-
subtitle: 'Not container aligned',
|
|
39
|
-
content: 'Expanded content with plain media.',
|
|
40
|
-
id: 'media-no-circle',
|
|
41
|
-
media: (
|
|
42
|
-
<img
|
|
43
|
-
src="https://wise.com/public-resources/assets/spend/card/asset//digital_card_2023.png"
|
|
44
|
-
alt=""
|
|
45
|
-
/>
|
|
46
|
-
),
|
|
47
|
-
showMediaCircle: false,
|
|
48
|
-
showMediaAtAllSizes: false,
|
|
49
|
-
isContainerAligned: false,
|
|
50
|
-
},
|
|
51
|
-
];
|
|
52
|
-
|
|
53
12
|
export default {
|
|
54
13
|
component: Accordion,
|
|
55
14
|
title: 'Content/Accordion/Tests',
|
|
@@ -59,7 +18,54 @@ export default {
|
|
|
59
18
|
type Story = StoryObj<typeof Accordion>;
|
|
60
19
|
|
|
61
20
|
export const RTLDiff: Story = {
|
|
62
|
-
render: () =>
|
|
21
|
+
render: () => {
|
|
22
|
+
const i18n = useRtlDiffI18n();
|
|
23
|
+
const items = [
|
|
24
|
+
{
|
|
25
|
+
title: i18n.withIconTitle,
|
|
26
|
+
subtitle: i18n.withIconSubtitle,
|
|
27
|
+
content: i18n.withIconContent,
|
|
28
|
+
id: 'icon',
|
|
29
|
+
icon: <FastFlagIcon size={24} />,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
title: i18n.noIconTitle,
|
|
33
|
+
content: i18n.noIconContent,
|
|
34
|
+
id: 'no-icon',
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
title: i18n.mediaCircleTitle,
|
|
38
|
+
subtitle: i18n.mediaCircleSubtitle,
|
|
39
|
+
content: i18n.mediaCircleContent,
|
|
40
|
+
id: 'media-circle',
|
|
41
|
+
media: (
|
|
42
|
+
<img
|
|
43
|
+
src="https://wise.com/public-resources/assets/spend/card/asset//digital_card_2023.png"
|
|
44
|
+
alt=""
|
|
45
|
+
/>
|
|
46
|
+
),
|
|
47
|
+
showMediaCircle: true,
|
|
48
|
+
showMediaAtAllSizes: true,
|
|
49
|
+
isContainerAligned: true,
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
title: i18n.mediaNoCircleTitle,
|
|
53
|
+
subtitle: i18n.mediaNoCircleSubtitle,
|
|
54
|
+
content: i18n.mediaNoCircleContent,
|
|
55
|
+
id: 'media-no-circle',
|
|
56
|
+
media: (
|
|
57
|
+
<img
|
|
58
|
+
src="https://wise.com/public-resources/assets/spend/card/asset//digital_card_2023.png"
|
|
59
|
+
alt=""
|
|
60
|
+
/>
|
|
61
|
+
),
|
|
62
|
+
showMediaCircle: false,
|
|
63
|
+
showMediaAtAllSizes: false,
|
|
64
|
+
isContainerAligned: false,
|
|
65
|
+
},
|
|
66
|
+
];
|
|
67
|
+
return <Accordion items={items} indexOpen={0} />;
|
|
68
|
+
},
|
|
63
69
|
play: async ({ canvasElement }) => {
|
|
64
70
|
await forEachColumn(canvasElement, async (column) => {
|
|
65
71
|
const scope = within(column);
|
|
@@ -67,5 +73,25 @@ export const RTLDiff: Story = {
|
|
|
67
73
|
await userEvent.click(buttons[1]);
|
|
68
74
|
});
|
|
69
75
|
},
|
|
70
|
-
...withRTLDiff(
|
|
76
|
+
...withRTLDiff({
|
|
77
|
+
i18n: {
|
|
78
|
+
withIconTitle: { en: 'Item with icon', ar: 'عنصر مع أيقونة' },
|
|
79
|
+
withIconSubtitle: { en: 'Subtitle text', ar: 'نص العنوان الفرعي' },
|
|
80
|
+
withIconContent: { en: 'Content for item with icon.', ar: 'محتوى العنصر ذي الأيقونة.' },
|
|
81
|
+
noIconTitle: { en: 'Plain item without icon', ar: 'عنصر عادي بدون أيقونة' },
|
|
82
|
+
noIconContent: { en: 'Content for item without icon.', ar: 'محتوى العنصر بدون أيقونة.' },
|
|
83
|
+
mediaCircleTitle: { en: 'Media with circle', ar: 'وسائط داخل دائرة' },
|
|
84
|
+
mediaCircleSubtitle: { en: 'Shows media in a circle', ar: 'يعرض الوسائط داخل دائرة' },
|
|
85
|
+
mediaCircleContent: {
|
|
86
|
+
en: 'Expanded content with media circle.',
|
|
87
|
+
ar: 'محتوى موسَّع مع وسائط داخل دائرة.',
|
|
88
|
+
},
|
|
89
|
+
mediaNoCircleTitle: { en: 'Media without circle', ar: 'وسائط بدون دائرة' },
|
|
90
|
+
mediaNoCircleSubtitle: { en: 'Not container aligned', ar: 'غير محاذٍ للحاوية' },
|
|
91
|
+
mediaNoCircleContent: {
|
|
92
|
+
en: 'Expanded content with plain media.',
|
|
93
|
+
ar: 'محتوى موسَّع مع وسائط عادية.',
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
71
97
|
};
|
|
@@ -2,7 +2,7 @@ import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
|
2
2
|
import AvatarLayout from '..';
|
|
3
3
|
import { Freeze, Plane } from '@transferwise/icons';
|
|
4
4
|
import { Flag } from '@wise/art';
|
|
5
|
-
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
5
|
+
import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof AvatarLayout> = {
|
|
8
8
|
component: AvatarLayout,
|
|
@@ -124,33 +124,49 @@ const rowStyle = { display: 'flex', alignItems: 'center', gap: '16px', flexWrap:
|
|
|
124
124
|
const twoAvatars = [{ asset: <Plane /> }, { asset: <Plane /> }] as const;
|
|
125
125
|
|
|
126
126
|
export const RTLDiff: Story = {
|
|
127
|
-
render: () =>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
127
|
+
render: () => {
|
|
128
|
+
const i18n = useRtlDiffI18n();
|
|
129
|
+
return (
|
|
130
|
+
<>
|
|
131
|
+
<div style={rowStyle}>
|
|
132
|
+
{horizontalSizes.map((size) => (
|
|
133
|
+
<AvatarLayout
|
|
134
|
+
key={size}
|
|
135
|
+
orientation="horizontal"
|
|
136
|
+
size={size}
|
|
137
|
+
avatars={[...twoAvatars]}
|
|
138
|
+
/>
|
|
139
|
+
))}
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<div style={rowStyle}>
|
|
143
|
+
{diagonalSizes.map((size) => (
|
|
144
|
+
<AvatarLayout key={size} orientation="diagonal" size={size} avatars={[...twoAvatars]} />
|
|
145
|
+
))}
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<AvatarLayout
|
|
149
|
+
orientation="horizontal"
|
|
150
|
+
size={48}
|
|
151
|
+
interactive
|
|
152
|
+
avatars={[
|
|
153
|
+
{ asset: <Flag code="gb" /> },
|
|
154
|
+
{ asset: <Flag code="br" /> },
|
|
155
|
+
{ asset: i18n.overflowCount },
|
|
156
|
+
]}
|
|
157
|
+
/>
|
|
158
|
+
|
|
159
|
+
<AvatarLayout
|
|
160
|
+
orientation="horizontal"
|
|
161
|
+
size={72}
|
|
162
|
+
avatars={[{ asset: <Plane /> }, { asset: <Plane /> }, { asset: <Plane /> }]}
|
|
163
|
+
/>
|
|
164
|
+
</>
|
|
165
|
+
);
|
|
166
|
+
},
|
|
167
|
+
...withRTLDiff({
|
|
168
|
+
i18n: {
|
|
169
|
+
overflowCount: { en: '3+', ar: '+٣' },
|
|
170
|
+
},
|
|
171
|
+
}),
|
|
156
172
|
};
|
|
@@ -4,7 +4,7 @@ import { useState } from 'react';
|
|
|
4
4
|
|
|
5
5
|
import Button from '../..';
|
|
6
6
|
import LegacyButton from '../LegacyButton';
|
|
7
|
-
import { withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
|
|
7
|
+
import { useRtlDiffI18n, withRTLDiff } from '../../../../.storybook/decorators/RtlDiffDecorator';
|
|
8
8
|
|
|
9
9
|
LegacyButton.displayName = 'Button';
|
|
10
10
|
|
|
@@ -38,22 +38,32 @@ export const Focused: Story = {
|
|
|
38
38
|
};
|
|
39
39
|
|
|
40
40
|
export const RTLDiff: Story = {
|
|
41
|
-
render: () =>
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
41
|
+
render: () => {
|
|
42
|
+
const i18n = useRtlDiffI18n();
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
{/* default (inline) layout */}
|
|
46
|
+
<LegacyButton>{i18n.defaultButton}</LegacyButton>
|
|
47
|
+
|
|
48
|
+
{/* block layout — full width */}
|
|
49
|
+
<LegacyButton block>{i18n.blockButton}</LegacyButton>
|
|
50
|
+
|
|
51
|
+
{/* loading state — appends ProcessIndicator inside button */}
|
|
52
|
+
<LegacyButton loading>{i18n.loadingButton}</LegacyButton>
|
|
53
|
+
|
|
54
|
+
{/* loading + block combined */}
|
|
55
|
+
<LegacyButton loading block>
|
|
56
|
+
{i18n.loadingBlockButton}
|
|
57
|
+
</LegacyButton>
|
|
58
|
+
</>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
...withRTLDiff({
|
|
62
|
+
i18n: {
|
|
63
|
+
defaultButton: { en: 'Default button', ar: 'زر افتراضي' },
|
|
64
|
+
blockButton: { en: 'Block button', ar: 'زر بعرض كامل' },
|
|
65
|
+
loadingButton: { en: 'Loading button', ar: 'زر قيد التحميل' },
|
|
66
|
+
loadingBlockButton: { en: 'Loading block button', ar: 'زر بعرض كامل قيد التحميل' },
|
|
67
|
+
},
|
|
68
|
+
}),
|
|
59
69
|
};
|
|
@@ -5,7 +5,7 @@ import { expect, userEvent, within } from 'storybook/test';
|
|
|
5
5
|
import Button from '../Button.resolver';
|
|
6
6
|
import { ButtonPriority } from '../Button.types';
|
|
7
7
|
import { withVariantConfig } from '../../../.storybook/helpers';
|
|
8
|
-
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
8
|
+
import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
9
9
|
|
|
10
10
|
const meta: Meta<typeof Button> = {
|
|
11
11
|
component: Button,
|
|
@@ -167,66 +167,100 @@ export const AccessibilityAddons: Story = {
|
|
|
167
167
|
},
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
+
type RTLDiffLabels = {
|
|
171
|
+
startIcon: string;
|
|
172
|
+
endIcon: string;
|
|
173
|
+
bothIcons: string;
|
|
174
|
+
avatarStart: string;
|
|
175
|
+
doubleAvatar: string;
|
|
176
|
+
smStartIcon: string;
|
|
177
|
+
smEndIcon: string;
|
|
178
|
+
smBothIcons: string;
|
|
179
|
+
loading: string;
|
|
180
|
+
blockWithStartIcon: string;
|
|
181
|
+
};
|
|
182
|
+
|
|
170
183
|
export const RTLDiff: Story = {
|
|
171
|
-
render: () =>
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
184
|
+
render: () => {
|
|
185
|
+
const i18n = useRtlDiffI18n<RTLDiffLabels>();
|
|
186
|
+
|
|
187
|
+
return (
|
|
188
|
+
<>
|
|
189
|
+
<Button v2 size="md" addonStart={{ type: 'icon', value: <Freeze /> }}>
|
|
190
|
+
{i18n.startIcon}
|
|
191
|
+
</Button>
|
|
192
|
+
|
|
193
|
+
<Button v2 size="md" addonEnd={{ type: 'icon', value: <ArrowEnd /> }}>
|
|
194
|
+
{i18n.endIcon}
|
|
195
|
+
</Button>
|
|
196
|
+
|
|
197
|
+
<Button
|
|
198
|
+
v2
|
|
199
|
+
size="md"
|
|
200
|
+
addonStart={{ type: 'icon', value: <Freeze /> }}
|
|
201
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
202
|
+
>
|
|
203
|
+
{i18n.bothIcons}
|
|
204
|
+
</Button>
|
|
205
|
+
|
|
206
|
+
<Button
|
|
207
|
+
v2
|
|
208
|
+
size="md"
|
|
209
|
+
addonStart={{ type: 'avatar', value: [{ asset: <Flag code="pl" /> }] }}
|
|
210
|
+
>
|
|
211
|
+
{i18n.avatarStart}
|
|
212
|
+
</Button>
|
|
213
|
+
|
|
214
|
+
<Button
|
|
215
|
+
v2
|
|
216
|
+
size="md"
|
|
217
|
+
addonStart={{
|
|
218
|
+
type: 'avatar',
|
|
219
|
+
value: [{ asset: <Flag code="gb" /> }, { asset: <Flag code="br" /> }],
|
|
220
|
+
}}
|
|
221
|
+
>
|
|
222
|
+
{i18n.doubleAvatar}
|
|
223
|
+
</Button>
|
|
224
|
+
|
|
225
|
+
<Button v2 size="sm" addonStart={{ type: 'icon', value: <Freeze /> }}>
|
|
226
|
+
{i18n.smStartIcon}
|
|
227
|
+
</Button>
|
|
228
|
+
|
|
229
|
+
<Button v2 size="sm" addonEnd={{ type: 'icon', value: <ArrowEnd /> }}>
|
|
230
|
+
{i18n.smEndIcon}
|
|
231
|
+
</Button>
|
|
232
|
+
|
|
233
|
+
<Button
|
|
234
|
+
v2
|
|
235
|
+
size="sm"
|
|
236
|
+
addonStart={{ type: 'icon', value: <Freeze /> }}
|
|
237
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
238
|
+
>
|
|
239
|
+
{i18n.smBothIcons}
|
|
240
|
+
</Button>
|
|
241
|
+
|
|
242
|
+
<Button v2 size="md" loading addonEnd={{ type: 'icon', value: <ArrowEnd /> }}>
|
|
243
|
+
{i18n.loading}
|
|
244
|
+
</Button>
|
|
245
|
+
|
|
246
|
+
<Button v2 size="md" block addonStart={{ type: 'icon', value: <Freeze /> }}>
|
|
247
|
+
{i18n.blockWithStartIcon}
|
|
248
|
+
</Button>
|
|
249
|
+
</>
|
|
250
|
+
);
|
|
251
|
+
},
|
|
252
|
+
...withRTLDiff({
|
|
253
|
+
i18n: {
|
|
254
|
+
startIcon: { en: 'Start icon', ar: 'أيقونة البداية' },
|
|
255
|
+
endIcon: { en: 'End icon', ar: 'أيقونة النهاية' },
|
|
256
|
+
bothIcons: { en: 'Both icons', ar: 'كلتا الأيقونتين' },
|
|
257
|
+
avatarStart: { en: 'Avatar start', ar: 'صورة رمزية في البداية' },
|
|
258
|
+
doubleAvatar: { en: 'Double avatar', ar: 'صورتان رمزيتان' },
|
|
259
|
+
smStartIcon: { en: 'Sm start icon', ar: 'أيقونة بداية صغيرة' },
|
|
260
|
+
smEndIcon: { en: 'Sm end icon', ar: 'أيقونة نهاية صغيرة' },
|
|
261
|
+
smBothIcons: { en: 'Sm both icons', ar: 'كلتا الأيقونتين صغيرة' },
|
|
262
|
+
loading: { en: 'Loading', ar: 'جارٍ التحميل' },
|
|
263
|
+
blockWithStartIcon: { en: 'Block with start icon', ar: 'زر بعرض كامل مع أيقونة البداية' },
|
|
264
|
+
},
|
|
265
|
+
}),
|
|
232
266
|
};
|