@transferwise/components 46.162.1 → 46.163.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/Calendar/DateHeader/DateHeader.js +2 -6
- package/build/Calendar/DateHeader/DateHeader.js.map +1 -1
- package/build/Calendar/DateHeader/DateHeader.mjs +3 -7
- package/build/Calendar/DateHeader/DateHeader.mjs.map +1 -1
- package/build/Carousel/Carousel.js +2 -2
- package/build/Carousel/Carousel.js.map +1 -1
- package/build/Carousel/Carousel.mjs +3 -3
- package/build/Carousel/Carousel.mjs.map +1 -1
- package/build/Chips/Chip/Chip.js +11 -4
- package/build/Chips/Chip/Chip.js.map +1 -1
- package/build/Chips/Chip/Chip.mjs +11 -4
- package/build/Chips/Chip/Chip.mjs.map +1 -1
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.js +4 -3
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +1 -1
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +4 -3
- package/build/Inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +1 -1
- package/build/ListItem/Navigation/ListItemNavigation.js +1 -1
- package/build/ListItem/Navigation/ListItemNavigation.js.map +1 -1
- package/build/ListItem/Navigation/ListItemNavigation.mjs +2 -2
- package/build/ListItem/Navigation/ListItemNavigation.mjs.map +1 -1
- package/build/PhoneNumberInput/PhoneNumberInput.js +2 -1
- package/build/PhoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/build/PhoneNumberInput/PhoneNumberInput.mjs +2 -1
- package/build/PhoneNumberInput/PhoneNumberInput.mjs.map +1 -1
- package/build/PromoCard/Indicator/PromoCardIndicator.js +1 -1
- package/build/PromoCard/Indicator/PromoCardIndicator.js.map +1 -1
- package/build/PromoCard/Indicator/PromoCardIndicator.mjs +2 -2
- package/build/PromoCard/Indicator/PromoCardIndicator.mjs.map +1 -1
- package/build/Typeahead/Typeahead.js +17 -4
- package/build/Typeahead/Typeahead.js.map +1 -1
- package/build/Typeahead/Typeahead.mjs +17 -4
- package/build/Typeahead/Typeahead.mjs.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js +2 -0
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.js.map +1 -1
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs +2 -0
- package/build/Typeahead/TypeaheadInput/TypeaheadInput.mjs.map +1 -1
- package/build/i18n/es.json +1 -0
- package/build/i18n/es.json.js +1 -0
- package/build/i18n/es.json.js.map +1 -1
- package/build/i18n/es.json.mjs +1 -0
- package/build/i18n/es.json.mjs.map +1 -1
- package/build/i18n/hu.json +1 -0
- package/build/i18n/hu.json.js +1 -0
- package/build/i18n/hu.json.js.map +1 -1
- package/build/i18n/hu.json.mjs +1 -0
- package/build/i18n/hu.json.mjs.map +1 -1
- package/build/i18n/id.json +1 -0
- package/build/i18n/id.json.js +1 -0
- package/build/i18n/id.json.js.map +1 -1
- package/build/i18n/id.json.mjs +1 -0
- package/build/i18n/id.json.mjs.map +1 -1
- package/build/i18n/it.json +1 -0
- package/build/i18n/it.json.js +1 -0
- package/build/i18n/it.json.js.map +1 -1
- package/build/i18n/it.json.mjs +1 -0
- package/build/i18n/it.json.mjs.map +1 -1
- package/build/i18n/ja.json +1 -0
- package/build/i18n/ja.json.js +1 -0
- package/build/i18n/ja.json.js.map +1 -1
- package/build/i18n/ja.json.mjs +1 -0
- package/build/i18n/ja.json.mjs.map +1 -1
- package/build/i18n/nl.json +1 -0
- package/build/i18n/nl.json.js +1 -0
- package/build/i18n/nl.json.js.map +1 -1
- package/build/i18n/nl.json.mjs +1 -0
- package/build/i18n/nl.json.mjs.map +1 -1
- package/build/i18n/pl.json +1 -0
- package/build/i18n/pl.json.js +1 -0
- package/build/i18n/pl.json.js.map +1 -1
- package/build/i18n/pl.json.mjs +1 -0
- package/build/i18n/pl.json.mjs.map +1 -1
- package/build/i18n/ro.json +1 -0
- package/build/i18n/ro.json.js +1 -0
- package/build/i18n/ro.json.js.map +1 -1
- package/build/i18n/ro.json.mjs +1 -0
- package/build/i18n/ro.json.mjs.map +1 -1
- package/build/i18n/uk.json +1 -0
- package/build/i18n/uk.json.js +1 -0
- package/build/i18n/uk.json.js.map +1 -1
- package/build/i18n/uk.json.mjs +1 -0
- package/build/i18n/uk.json.mjs.map +1 -1
- package/build/i18n/zh-HK.json +1 -0
- package/build/i18n/zh-HK.json.js +1 -0
- package/build/i18n/zh-HK.json.js.map +1 -1
- package/build/i18n/zh-HK.json.mjs +1 -0
- package/build/i18n/zh-HK.json.mjs.map +1 -1
- package/build/main.css +20 -7
- package/build/styles/Button/Button.css +0 -3
- package/build/styles/DateInput/DateInput.css +13 -0
- package/build/styles/ListItem/ListItem.css +1 -1
- package/build/styles/PhoneNumberInput/PhoneNumberInput.css +3 -0
- package/build/styles/PromoCard/PromoCard.css +0 -3
- package/build/styles/Typeahead/Typeahead.css +3 -0
- package/build/styles/main.css +20 -7
- package/build/types/Body/Body.d.ts +2 -2
- package/build/types/Chips/Chip/Chip.d.ts +3 -1
- package/build/types/Chips/Chip/Chip.d.ts.map +1 -1
- package/build/types/IconButton/IconButton.d.ts +1 -1
- package/build/types/Inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +2 -1
- package/build/types/Inputs/SelectInput/OptionContent/SelectInputOptionContent.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/PhoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/Title/Title.d.ts +2 -2
- package/build/types/Typeahead/Typeahead.d.ts +2 -0
- package/build/types/Typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts +1 -1
- package/build/types/Typeahead/TypeaheadInput/TypeaheadInput.d.ts.map +1 -1
- package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
- package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
- package/package.json +5 -5
- package/src/Button/Button.css +0 -3
- package/src/Button/Button.less +0 -16
- package/src/Button/_stories/Button.test.story.tsx +12 -12
- package/src/Calendar/DateHeader/DateHeader.tsx +3 -3
- package/src/Carousel/Carousel.tsx +3 -3
- package/src/Chips/Chip/Chip.test.tsx +34 -0
- package/src/Chips/Chip/Chip.tsx +11 -3
- package/src/DateInput/DateInput.css +13 -0
- package/src/DateInput/DateInput.less +10 -2
- package/src/DateInput/_stories/DateInput.rtl.test.story.tsx +36 -0
- package/src/DateInput/_stories/DateInput.test.story.tsx +0 -13
- package/src/ExpressiveMoneyInput/_stories/ExpressiveMoneyInput.rtl.test.story.tsx +1 -1
- package/src/InputWithDisplayFormat/_stories/InputWithDisplayFormat.test.story.tsx +52 -0
- package/src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +4 -1
- package/src/Inputs/SelectInput/SelectInput.test.tsx +74 -0
- package/src/ListItem/ListItem.css +1 -1
- package/src/ListItem/ListItem.grid.less +4 -4
- package/src/ListItem/ListItem.less +1 -1
- package/src/ListItem/Navigation/ListItemNavigation.tsx +2 -2
- package/src/PhoneNumberInput/PhoneNumberInput.css +3 -0
- package/src/PhoneNumberInput/PhoneNumberInput.less +10 -2
- package/src/PhoneNumberInput/PhoneNumberInput.tsx +1 -0
- package/src/PhoneNumberInput/_stories/PhoneNumberInput.rtl.test.story.tsx +1 -1
- package/src/PromoCard/Indicator/PromoCardIndicator.tsx +2 -2
- package/src/PromoCard/PromoCard.css +0 -3
- package/src/PromoCard/PromoCard.less +0 -5
- package/src/Prompt/CriticalBanner/_stories/CriticalBanner.test.story.tsx +1 -1
- package/src/Typeahead/Typeahead.css +3 -0
- package/src/Typeahead/Typeahead.less +4 -0
- package/src/Typeahead/Typeahead.test.tsx +73 -0
- package/src/Typeahead/Typeahead.tsx +18 -3
- package/src/Typeahead/TypeaheadInput/TypeaheadInput.tsx +6 -1
- package/src/Typeahead/_stories/Typeahead.story.tsx +1 -0
- package/src/Typeahead/_stories/Typeahead.test.story.tsx +41 -0
- package/src/i18n/en.json +1 -0
- package/src/i18n/es.json +1 -0
- package/src/i18n/hu.json +1 -0
- package/src/i18n/id.json +1 -0
- package/src/i18n/it.json +1 -0
- package/src/i18n/ja.json +1 -0
- package/src/i18n/nl.json +1 -0
- package/src/i18n/pl.json +1 -0
- package/src/i18n/ro.json +1 -0
- package/src/i18n/uk.json +1 -0
- package/src/i18n/zh-HK.json +1 -0
- package/src/main.css +20 -7
|
@@ -3,11 +3,12 @@ export interface SelectInputOptionContentProps {
|
|
|
3
3
|
note?: string;
|
|
4
4
|
description?: string;
|
|
5
5
|
icon?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* Component for rendering structured content within a SelectInput option.
|
|
9
10
|
* Supports title, optional note, description, and icon with different styling
|
|
10
11
|
* based on whether it's rendered within the trigger button or the dropdown.
|
|
11
12
|
*/
|
|
12
|
-
export declare function SelectInputOptionContent({ title, note, description, icon, }: SelectInputOptionContentProps): import("react").JSX.Element;
|
|
13
|
+
export declare function SelectInputOptionContent({ title, note, description, icon, className, }: SelectInputOptionContentProps): import("react").JSX.Element;
|
|
13
14
|
//# sourceMappingURL=SelectInputOptionContent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectInputOptionContent.d.ts","sourceRoot":"","sources":["../../../../../src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectInputOptionContent.d.ts","sourceRoot":"","sources":["../../../../../src/Inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,KAAK,EACL,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,SAAS,GACV,EAAE,6BAA6B,+BAmD/B"}
|
|
@@ -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 _default;
|
|
72
72
|
//# sourceMappingURL=MoneyInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/MoneyInput/MoneyInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAGL,SAAS,EACT,UAAU,EACV,SAAS,EAEV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAuB,wBAAwB,EAAE,MAAM,o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,CAAC;IACvD;;;OAGG;IACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAKD,QAAA,MAAM,gBAAgB,GAAI,gMAevB,qBAAqB,gCAyNvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -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
|
|
@@ -32,6 +32,8 @@ export interface TypeaheadProps<T> extends Partial<WrappedComponentProps> {
|
|
|
32
32
|
chipSeparators?: readonly string[];
|
|
33
33
|
/** @default true */
|
|
34
34
|
clearable?: boolean;
|
|
35
|
+
/** @default false */
|
|
36
|
+
disabled?: boolean;
|
|
35
37
|
footer?: ReactNode;
|
|
36
38
|
/** @default [] */
|
|
37
39
|
initialValue?: readonly TypeaheadOption<T>[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../../src/Typeahead/Typeahead.tsx"],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SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7C,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACvC,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,oBAAoB;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oBAAoB;IACpB,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC;CACtD;wBA0hBoF,CAAC,CAAC,EACrF,KAAK,EAAE,cAAc,CAAC,CAAC,CAAC,KACrB,KAAK,CAAC,YAAY;AAFvB,wBAEwB"}
|
|
@@ -12,7 +12,7 @@ export type TypeaheadInputProps<T> = {
|
|
|
12
12
|
onPaste: React.ClipboardEventHandler<HTMLInputElement>;
|
|
13
13
|
renderChip: (chip: TypeaheadOption<T>, index: number) => ReactNode;
|
|
14
14
|
ariaActivedescendant?: string;
|
|
15
|
-
} & Pick<TypeaheadProps<T>, 'id' | 'name' | 'autoFocus' | 'multiple' | 'placeholder' | 'maxHeight'>;
|
|
15
|
+
} & Pick<TypeaheadProps<T>, 'id' | 'name' | 'autoFocus' | 'disabled' | 'multiple' | 'placeholder' | 'maxHeight'>;
|
|
16
16
|
type TypeaheadInputState = {
|
|
17
17
|
inputWidth: number;
|
|
18
18
|
keyboardFocusedOptionIndex: number | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeaheadInput.d.ts","sourceRoot":"","sources":["../../../../src/Typeahead/TypeaheadInput/TypeaheadInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAM/D,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IACxC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IACvD,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;IACnE,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"TypeaheadInput.d.ts","sourceRoot":"","sources":["../../../../src/Typeahead/TypeaheadInput/Typea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iB;IAUjB,kBAAkB,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAMxD,gBAAgB,aAMd;IAEF,WAAW,GAAI,OAAO,OAAO,iCA+C3B;IAEF,MAAM;CAiCP"}
|
|
@@ -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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "46.
|
|
3
|
+
"version": "46.163.0",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@babel/preset-env": "^7.29.7",
|
|
45
45
|
"@babel/preset-react": "^7.29.7",
|
|
46
46
|
"@babel/preset-typescript": "^7.29.7",
|
|
47
|
-
"@formatjs/cli": "^6.16.
|
|
47
|
+
"@formatjs/cli": "^6.16.31",
|
|
48
48
|
"@rollup/plugin-babel": "^7.1.0",
|
|
49
49
|
"@rollup/plugin-json": "^6.1.0",
|
|
50
50
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@storybook/addon-mcp": "^0.7.0",
|
|
56
56
|
"@storybook/addon-webpack5-compiler-babel": "^4.0.1",
|
|
57
57
|
"@storybook/react-webpack5": "^10.6.0",
|
|
58
|
-
"@testing-library/dom": "^10.4.
|
|
58
|
+
"@testing-library/dom": "^10.4.2",
|
|
59
59
|
"@testing-library/jest-dom": "^6.9.1",
|
|
60
60
|
"@testing-library/react": "^16.3.3",
|
|
61
61
|
"@testing-library/user-event": "^14.6.7",
|
|
@@ -89,14 +89,14 @@
|
|
|
89
89
|
"lodash.times": "^4.3.2",
|
|
90
90
|
"react-intl": "^7.1.14",
|
|
91
91
|
"react-live": "^4.1.8",
|
|
92
|
-
"rollup": "^4.63.
|
|
92
|
+
"rollup": "^4.63.4",
|
|
93
93
|
"rollup-preserve-directives": "^1.1.3",
|
|
94
94
|
"storybook": "^10.6.0",
|
|
95
95
|
"storybook-addon-tag-badges": "^3.1.0",
|
|
96
96
|
"storybook-addon-test-codegen": "^3.0.4"
|
|
97
97
|
},
|
|
98
98
|
"peerDependencies": {
|
|
99
|
-
"@transferwise/icons": "^
|
|
99
|
+
"@transferwise/icons": "^4.5.0",
|
|
100
100
|
"@wise/art": "^2.31.1",
|
|
101
101
|
"@wise/components-theming": "^1.10.1",
|
|
102
102
|
"motion": "^12.23.26",
|
package/src/Button/Button.css
CHANGED
|
@@ -241,6 +241,3 @@
|
|
|
241
241
|
.np-theme-personal--bright-green .wds-Button--secondary-neutral .wds-Button-avatars .np-circle {
|
|
242
242
|
--circle-border-color: color-mix(in srgb, var(--Button-color) 12%, transparent);
|
|
243
243
|
}
|
|
244
|
-
[dir="rtl"] .wds-Button .tw-icon-chevron-right,[dir="rtl"] .wds-Button .tw-icon-arrow-right,[dir="rtl"] .wds-Button .tw-icon-chevron-left,[dir="rtl"] .wds-Button .tw-icon-arrow-left,[dir="rtl"] .wds-Button .tw-icon-arrow-diagonal-down,[dir="rtl"] .wds-Button .tw-icon-arrow-diagonal-up,[dir="rtl"] .wds-Button .tw-icon-list,[dir="rtl"] .wds-Button .tw-icon-activity {
|
|
245
|
-
scale: -1 1;
|
|
246
|
-
}
|
package/src/Button/Button.less
CHANGED
|
@@ -244,19 +244,3 @@
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
:dir(rtl) {
|
|
250
|
-
.wds-Button {
|
|
251
|
-
.tw-icon-chevron-right,
|
|
252
|
-
.tw-icon-arrow-right,
|
|
253
|
-
.tw-icon-chevron-left,
|
|
254
|
-
.tw-icon-arrow-left,
|
|
255
|
-
.tw-icon-arrow-diagonal-down,
|
|
256
|
-
.tw-icon-arrow-diagonal-up,
|
|
257
|
-
.tw-icon-list,
|
|
258
|
-
.tw-icon-activity {
|
|
259
|
-
scale: -1 1;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
-
import {
|
|
2
|
+
import { ArrowEnd, ChevronEnd, Freeze } from '@transferwise/icons';
|
|
3
3
|
import { Flag } from '@wise/art';
|
|
4
4
|
import { expect, userEvent, within } from 'storybook/test';
|
|
5
5
|
import Button from '../Button.resolver';
|
|
@@ -55,7 +55,7 @@ export const AllVariants: Story = {
|
|
|
55
55
|
priority={priority}
|
|
56
56
|
size={size}
|
|
57
57
|
addonStart={{ type: 'avatar', value: [{ asset: <Freeze /> }] }}
|
|
58
|
-
addonEnd={{ type: 'icon', value: <
|
|
58
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
59
59
|
block
|
|
60
60
|
>
|
|
61
61
|
{`${priority} default ${size}`}
|
|
@@ -69,7 +69,7 @@ export const AllVariants: Story = {
|
|
|
69
69
|
type: 'avatar',
|
|
70
70
|
value: [{ asset: <Freeze /> }, { asset: <Freeze /> }],
|
|
71
71
|
}}
|
|
72
|
-
addonEnd={{ type: 'icon', value: <
|
|
72
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
73
73
|
block
|
|
74
74
|
disabled
|
|
75
75
|
>
|
|
@@ -80,7 +80,7 @@ export const AllVariants: Story = {
|
|
|
80
80
|
priority={priority}
|
|
81
81
|
size={size}
|
|
82
82
|
addonStart={{ type: 'avatar', value: [{ asset: <Freeze /> }] }}
|
|
83
|
-
addonEnd={{ type: 'icon', value: <
|
|
83
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
84
84
|
block
|
|
85
85
|
loading
|
|
86
86
|
>
|
|
@@ -100,7 +100,7 @@ export const AllVariants: Story = {
|
|
|
100
100
|
sentiment="negative"
|
|
101
101
|
priority={priority as ButtonPriority}
|
|
102
102
|
size={size}
|
|
103
|
-
addonEnd={{ type: 'icon', value: <
|
|
103
|
+
addonEnd={{ type: 'icon', value: <ChevronEnd /> }}
|
|
104
104
|
addonStart={{ type: 'avatar', value: [{ asset: <Freeze /> }] }}
|
|
105
105
|
block
|
|
106
106
|
>
|
|
@@ -112,7 +112,7 @@ export const AllVariants: Story = {
|
|
|
112
112
|
sentiment="negative"
|
|
113
113
|
priority={priority as ButtonPriority}
|
|
114
114
|
size={size}
|
|
115
|
-
addonEnd={{ type: 'icon', value: <
|
|
115
|
+
addonEnd={{ type: 'icon', value: <ChevronEnd /> }}
|
|
116
116
|
addonStart={{ type: 'avatar', value: [{ asset: <Freeze /> }] }}
|
|
117
117
|
block
|
|
118
118
|
disabled
|
|
@@ -124,7 +124,7 @@ export const AllVariants: Story = {
|
|
|
124
124
|
sentiment="negative"
|
|
125
125
|
priority={priority as ButtonPriority}
|
|
126
126
|
size={size}
|
|
127
|
-
addonEnd={{ type: 'icon', value: <
|
|
127
|
+
addonEnd={{ type: 'icon', value: <ChevronEnd /> }}
|
|
128
128
|
addonStart={{ type: 'avatar', value: [{ asset: <Freeze /> }] }}
|
|
129
129
|
block
|
|
130
130
|
loading
|
|
@@ -174,7 +174,7 @@ export const RTLDiff: Story = {
|
|
|
174
174
|
Start icon
|
|
175
175
|
</Button>
|
|
176
176
|
|
|
177
|
-
<Button v2 size="md" addonEnd={{ type: 'icon', value: <
|
|
177
|
+
<Button v2 size="md" addonEnd={{ type: 'icon', value: <ArrowEnd /> }}>
|
|
178
178
|
End icon
|
|
179
179
|
</Button>
|
|
180
180
|
|
|
@@ -182,7 +182,7 @@ export const RTLDiff: Story = {
|
|
|
182
182
|
v2
|
|
183
183
|
size="md"
|
|
184
184
|
addonStart={{ type: 'icon', value: <Freeze /> }}
|
|
185
|
-
addonEnd={{ type: 'icon', value: <
|
|
185
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
186
186
|
>
|
|
187
187
|
Both icons
|
|
188
188
|
</Button>
|
|
@@ -206,7 +206,7 @@ export const RTLDiff: Story = {
|
|
|
206
206
|
Sm start icon
|
|
207
207
|
</Button>
|
|
208
208
|
|
|
209
|
-
<Button v2 size="sm" addonEnd={{ type: 'icon', value: <
|
|
209
|
+
<Button v2 size="sm" addonEnd={{ type: 'icon', value: <ArrowEnd /> }}>
|
|
210
210
|
Sm end icon
|
|
211
211
|
</Button>
|
|
212
212
|
|
|
@@ -214,12 +214,12 @@ export const RTLDiff: Story = {
|
|
|
214
214
|
v2
|
|
215
215
|
size="sm"
|
|
216
216
|
addonStart={{ type: 'icon', value: <Freeze /> }}
|
|
217
|
-
addonEnd={{ type: 'icon', value: <
|
|
217
|
+
addonEnd={{ type: 'icon', value: <ArrowEnd /> }}
|
|
218
218
|
>
|
|
219
219
|
Sm both icons
|
|
220
220
|
</Button>
|
|
221
221
|
|
|
222
|
-
<Button v2 size="md" loading addonEnd={{ type: 'icon', value: <
|
|
222
|
+
<Button v2 size="md" loading addonEnd={{ type: 'icon', value: <ArrowEnd /> }}>
|
|
223
223
|
Loading
|
|
224
224
|
</Button>
|
|
225
225
|
|
|
@@ -6,7 +6,7 @@ import { useLayout } from '../../common/hooks';
|
|
|
6
6
|
import Title from '../../Title';
|
|
7
7
|
import messages from '../Calendar.messages';
|
|
8
8
|
import Button from '../../Button/Button';
|
|
9
|
-
import { ChevronDown,
|
|
9
|
+
import { ChevronDown, ChevronStart, ChevronEnd } from '@transferwise/icons';
|
|
10
10
|
import IconButton from '../../IconButton';
|
|
11
11
|
|
|
12
12
|
interface DateHeaderProps {
|
|
@@ -41,7 +41,7 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
41
41
|
disabled={isPreviousDisabled}
|
|
42
42
|
onClick={onPreviousClick}
|
|
43
43
|
>
|
|
44
|
-
<
|
|
44
|
+
<ChevronStart />
|
|
45
45
|
</IconButton>
|
|
46
46
|
</div>
|
|
47
47
|
{label && (
|
|
@@ -69,7 +69,7 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
69
69
|
disabled={isNextDisabled}
|
|
70
70
|
onClick={onNextClick}
|
|
71
71
|
>
|
|
72
|
-
<
|
|
72
|
+
<ChevronEnd />
|
|
73
73
|
</IconButton>
|
|
74
74
|
</div>
|
|
75
75
|
</div>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChevronStart, ChevronEnd } from '@transferwise/icons';
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { type CSSProperties, type ReactNode, useEffect, useRef, useState } from 'react';
|
|
4
4
|
|
|
@@ -182,7 +182,7 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
182
182
|
data-testid="scroll-carousel-left"
|
|
183
183
|
onClick={() => scrollCarousel('backward')}
|
|
184
184
|
>
|
|
185
|
-
<
|
|
185
|
+
<ChevronStart />
|
|
186
186
|
</IconButton>
|
|
187
187
|
<IconButton
|
|
188
188
|
size={32}
|
|
@@ -194,7 +194,7 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
194
194
|
disabled={scrollIsAtEnd}
|
|
195
195
|
onClick={() => scrollCarousel('forward')}
|
|
196
196
|
>
|
|
197
|
-
<
|
|
197
|
+
<ChevronEnd />
|
|
198
198
|
</IconButton>
|
|
199
199
|
</div>
|
|
200
200
|
) : null}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { render, screen, userEvent } from '../../test-utils';
|
|
2
|
+
|
|
3
|
+
import Chip from './Chip';
|
|
4
|
+
|
|
5
|
+
describe('Chip', () => {
|
|
6
|
+
it('calls onClick when clicked', async () => {
|
|
7
|
+
const onClick = jest.fn();
|
|
8
|
+
render(<Chip label="Accounting" onClick={onClick} />);
|
|
9
|
+
|
|
10
|
+
await userEvent.click(screen.getByRole('button', { name: 'Accounting' }));
|
|
11
|
+
|
|
12
|
+
expect(onClick).toHaveBeenCalled();
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
describe('when disabled', () => {
|
|
16
|
+
it('does not call onClick when clicked', async () => {
|
|
17
|
+
const onClick = jest.fn();
|
|
18
|
+
render(<Chip label="Accounting" disabled onClick={onClick} />);
|
|
19
|
+
|
|
20
|
+
await userEvent.click(screen.getByRole('button', { name: 'Accounting' }));
|
|
21
|
+
|
|
22
|
+
expect(onClick).not.toHaveBeenCalled();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
it('marks an actionable chip as disabled and takes it out of the tab order', () => {
|
|
26
|
+
render(<Chip label="Accounting" disabled onClick={() => {}} />);
|
|
27
|
+
|
|
28
|
+
const chip = screen.getByRole('button', { name: 'Accounting' });
|
|
29
|
+
expect(chip).toHaveAttribute('aria-disabled', 'true');
|
|
30
|
+
expect(chip).toHaveAttribute('tabindex', '-1');
|
|
31
|
+
expect(chip).toHaveClass('disabled');
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
});
|
package/src/Chips/Chip/Chip.tsx
CHANGED
|
@@ -13,6 +13,8 @@ export type ChipProps<T extends ChipValue = ChipValue> = {
|
|
|
13
13
|
onRemove?: () => void;
|
|
14
14
|
onClick?: () => void;
|
|
15
15
|
onKeyPress?: () => void;
|
|
16
|
+
/** @default false */
|
|
17
|
+
disabled?: boolean;
|
|
16
18
|
closeButton?: AriaLabelProperty;
|
|
17
19
|
'aria-checked'?: boolean;
|
|
18
20
|
role?: string;
|
|
@@ -25,6 +27,7 @@ const Chip = <T extends ChipValue = ChipValue>({
|
|
|
25
27
|
onRemove,
|
|
26
28
|
onClick,
|
|
27
29
|
onKeyPress,
|
|
30
|
+
disabled = false,
|
|
28
31
|
className = undefined,
|
|
29
32
|
'aria-label': ariaLabel,
|
|
30
33
|
'aria-checked': ariaChecked,
|
|
@@ -32,8 +35,10 @@ const Chip = <T extends ChipValue = ChipValue>({
|
|
|
32
35
|
closeButton,
|
|
33
36
|
}: ChipProps<T>) => {
|
|
34
37
|
const isActionable = onClick || onKeyPress;
|
|
38
|
+
const isInteractive = isActionable && !disabled;
|
|
35
39
|
const defaultRole = isActionable ? 'button' : undefined;
|
|
36
|
-
const
|
|
40
|
+
const chipRole = role ?? defaultRole;
|
|
41
|
+
const tabIndex = isInteractive ? 0 : -1;
|
|
37
42
|
|
|
38
43
|
const closeButtonReference = useRef<HTMLButtonElement>(null);
|
|
39
44
|
const previousCloseButtonShown = useRef<boolean | undefined>(undefined);
|
|
@@ -47,19 +52,21 @@ const Chip = <T extends ChipValue = ChipValue>({
|
|
|
47
52
|
return (
|
|
48
53
|
<div
|
|
49
54
|
key={value}
|
|
50
|
-
role={
|
|
55
|
+
role={chipRole}
|
|
51
56
|
tabIndex={tabIndex}
|
|
52
57
|
aria-label={ariaLabel}
|
|
53
58
|
aria-checked={ariaChecked}
|
|
59
|
+
aria-disabled={chipRole && disabled ? true : undefined}
|
|
54
60
|
className={clsx(
|
|
55
61
|
'np-chip',
|
|
56
62
|
'd-flex',
|
|
57
63
|
'align-items-center',
|
|
58
64
|
'justify-content-between',
|
|
59
65
|
onRemove ? 'np-chip--removable' : '',
|
|
66
|
+
{ disabled },
|
|
60
67
|
className,
|
|
61
68
|
)}
|
|
62
|
-
{...(
|
|
69
|
+
{...(isInteractive && { onClick, onKeyPress })}
|
|
63
70
|
>
|
|
64
71
|
<Body aria-hidden={!!onRemove} type={Typography.BODY_DEFAULT_BOLD}>
|
|
65
72
|
{label}
|
|
@@ -71,6 +78,7 @@ const Chip = <T extends ChipValue = ChipValue>({
|
|
|
71
78
|
aria-label={closeButton?.['aria-label']}
|
|
72
79
|
size="sm"
|
|
73
80
|
filled
|
|
81
|
+
isDisabled={disabled}
|
|
74
82
|
onClick={onRemove}
|
|
75
83
|
/>
|
|
76
84
|
) : null}
|
|
@@ -9,6 +9,19 @@
|
|
|
9
9
|
.tw-date .tw-date--day {
|
|
10
10
|
margin-block-end: 0;
|
|
11
11
|
}
|
|
12
|
+
[dir="rtl"] .tw-date .np-input {
|
|
13
|
+
text-align: end;
|
|
14
|
+
}
|
|
15
|
+
[dir="rtl"] .tw-date .np-input::-moz-placeholder {
|
|
16
|
+
text-align: start;
|
|
17
|
+
}
|
|
18
|
+
[dir="rtl"] .tw-date .np-input:-moz-placeholder {
|
|
19
|
+
text-align: start;
|
|
20
|
+
}
|
|
21
|
+
[dir="rtl"] .tw-date .np-input::placeholder,
|
|
22
|
+
[dir="rtl"] .tw-date .np-input:placeholder-shown {
|
|
23
|
+
text-align: start;
|
|
24
|
+
}
|
|
12
25
|
@media (min-width: 600px) {
|
|
13
26
|
.np-theme-personal .tw-date label {
|
|
14
27
|
margin-block-end: 0;
|
|
@@ -10,7 +10,15 @@
|
|
|
10
10
|
.tw-date--year,
|
|
11
11
|
.tw-date--month,
|
|
12
12
|
.tw-date--day {
|
|
13
|
-
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
[dir="rtl"] & .np-input {
|
|
16
|
+
text-align: right;
|
|
17
|
+
|
|
18
|
+
&::placeholder,
|
|
19
|
+
&:placeholder-shown {
|
|
20
|
+
text-align: start;
|
|
21
|
+
}
|
|
14
22
|
}
|
|
15
23
|
}
|
|
16
24
|
|
|
@@ -22,4 +30,4 @@
|
|
|
22
30
|
}
|
|
23
31
|
}
|
|
24
32
|
}
|
|
25
|
-
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { fn, userEvent, within } from 'storybook/test';
|
|
3
|
+
|
|
4
|
+
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
5
|
+
import DateInput from '..';
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
component: DateInput,
|
|
9
|
+
title: 'Forms/DateInput/Tests/RTL Diff',
|
|
10
|
+
tags: ['!autodocs', '!manifest'],
|
|
11
|
+
} satisfies Meta<typeof DateInput>;
|
|
12
|
+
|
|
13
|
+
type Story = StoryObj<typeof DateInput>;
|
|
14
|
+
|
|
15
|
+
export const Sizes: Story = {
|
|
16
|
+
render: () => (
|
|
17
|
+
<>
|
|
18
|
+
<DateInput size="sm" onChange={fn()} />
|
|
19
|
+
<DateInput size="md" onChange={fn()} />
|
|
20
|
+
<DateInput size="lg" onChange={fn()} />
|
|
21
|
+
<DateInput mode="month-year" onChange={fn()} />
|
|
22
|
+
</>
|
|
23
|
+
),
|
|
24
|
+
...withRTLDiff({ renderAs: 'iframe' }),
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export const OpenDropdown: Story = {
|
|
28
|
+
render: () => <DateInput onChange={() => {}} />,
|
|
29
|
+
play: async ({ canvasElement }) => {
|
|
30
|
+
const canvas = within(canvasElement);
|
|
31
|
+
const trigger = canvas.queryByRole('combobox');
|
|
32
|
+
if (!trigger) return;
|
|
33
|
+
await userEvent.click(trigger);
|
|
34
|
+
},
|
|
35
|
+
...withRTLDiff({ renderAs: 'iframe' }),
|
|
36
|
+
};
|
|
@@ -6,7 +6,6 @@ import { lorem10 } from '../../test-utils';
|
|
|
6
6
|
|
|
7
7
|
import Provider from '../../Provider';
|
|
8
8
|
import translations from '../../i18n';
|
|
9
|
-
import { withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
10
9
|
import { withVariantConfig } from '../../../.storybook/helpers';
|
|
11
10
|
|
|
12
11
|
const meta: Meta<typeof DateInput> = {
|
|
@@ -231,15 +230,3 @@ export const InputErrorMobile: Story = {
|
|
|
231
230
|
...InputError,
|
|
232
231
|
...withVariantConfig(['mobile'], InputError),
|
|
233
232
|
};
|
|
234
|
-
|
|
235
|
-
export const RTLDiff: Story = {
|
|
236
|
-
render: () => (
|
|
237
|
-
<>
|
|
238
|
-
<DateInput size="sm" onChange={fn()} />
|
|
239
|
-
<DateInput size="md" onChange={fn()} />
|
|
240
|
-
<DateInput size="lg" onChange={fn()} />
|
|
241
|
-
<DateInput mode="month-year" onChange={fn()} />
|
|
242
|
-
</>
|
|
243
|
-
),
|
|
244
|
-
...withRTLDiff(),
|
|
245
|
-
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { userEvent, within } from 'storybook/test';
|
|
2
2
|
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
3
3
|
|
|
4
|
+
import { useRtlDiffI18n, withRTLDiff } from '../../../.storybook/decorators/RtlDiffDecorator';
|
|
4
5
|
import InputWithDisplayFormat, { InputWithDisplayFormatProps } from '..';
|
|
5
6
|
import Field, { FieldProps } from '../../Field/Field';
|
|
6
7
|
|
|
@@ -31,3 +32,54 @@ export const SecurityPinPlay: Story = {
|
|
|
31
32
|
await userEvent.type(canvas.getByPlaceholderText('*-*-*-*-*-*'), '123456');
|
|
32
33
|
},
|
|
33
34
|
};
|
|
35
|
+
|
|
36
|
+
export const RTLDiff: StoryObj<typeof InputWithDisplayFormat> = {
|
|
37
|
+
render: () => {
|
|
38
|
+
const i18n = useRtlDiffI18n();
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<>
|
|
42
|
+
<Field id="empty" label="Empty with placeholder">
|
|
43
|
+
<InputWithDisplayFormat
|
|
44
|
+
id="empty"
|
|
45
|
+
value=""
|
|
46
|
+
displayPattern="**** - **** - ****"
|
|
47
|
+
placeholder={i18n.placeholder}
|
|
48
|
+
onChange={() => {}}
|
|
49
|
+
/>
|
|
50
|
+
</Field>
|
|
51
|
+
<Field id="card-code" label="Localised pattern">
|
|
52
|
+
<InputWithDisplayFormat
|
|
53
|
+
id="card-code"
|
|
54
|
+
value={i18n.value}
|
|
55
|
+
maxLength={16}
|
|
56
|
+
displayPattern="**** - **** - ****"
|
|
57
|
+
onChange={() => {}}
|
|
58
|
+
/>
|
|
59
|
+
</Field>
|
|
60
|
+
<Field id="iban" label="IBAN (not localised)">
|
|
61
|
+
<InputWithDisplayFormat
|
|
62
|
+
id="iban"
|
|
63
|
+
value="GB29NWBK60161331926819"
|
|
64
|
+
maxLength={22}
|
|
65
|
+
displayPattern="** **** **** **** **** ****"
|
|
66
|
+
onChange={() => {}}
|
|
67
|
+
/>
|
|
68
|
+
</Field>
|
|
69
|
+
</>
|
|
70
|
+
);
|
|
71
|
+
},
|
|
72
|
+
...withRTLDiff({
|
|
73
|
+
width: 'stretch',
|
|
74
|
+
i18n: {
|
|
75
|
+
value: {
|
|
76
|
+
ltr: 'XKQMRTBWJNFL',
|
|
77
|
+
rtl: 'خكقمرتبوجنفل',
|
|
78
|
+
},
|
|
79
|
+
placeholder: {
|
|
80
|
+
ltr: 'Enter code',
|
|
81
|
+
rtl: 'أدخل الرمز',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
}),
|
|
85
|
+
};
|