@transferwise/components 46.14.0 → 46.16.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/index.esm.js +97 -196
- package/build/index.esm.js.map +1 -1
- package/build/index.js +100 -199
- package/build/index.js.map +1 -1
- package/build/types/actionButton/ActionButton.d.ts +1 -1
- package/build/types/common/Option/Option.d.ts.map +1 -1
- package/build/types/common/RadioButton/RadioButton.d.ts +10 -34
- package/build/types/common/RadioButton/RadioButton.d.ts.map +1 -1
- package/build/types/common/RadioButton/index.d.ts +1 -1
- package/build/types/common/RadioButton/index.d.ts.map +1 -1
- package/build/types/index.d.ts +4 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/instructionsList/InstructionsList.d.ts +4 -2
- package/build/types/instructionsList/InstructionsList.d.ts.map +1 -1
- package/build/types/instructionsList/index.d.ts +2 -2
- package/build/types/instructionsList/index.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts +1 -0
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/radio/Radio.d.ts +10 -21
- package/build/types/radio/Radio.d.ts.map +1 -1
- package/build/types/radio/index.d.ts +2 -2
- package/build/types/radio/index.d.ts.map +1 -1
- package/build/types/radioGroup/RadioGroup.d.ts +10 -26
- package/build/types/radioGroup/RadioGroup.d.ts.map +1 -1
- package/build/types/radioGroup/index.d.ts +2 -1
- package/build/types/radioGroup/index.d.ts.map +1 -1
- package/build/types/radioOption/RadioOption.d.ts +15 -23
- package/build/types/radioOption/RadioOption.d.ts.map +1 -1
- package/build/types/radioOption/index.d.ts +2 -1
- package/build/types/radioOption/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/Option/Option.tsx +0 -1
- package/src/common/RadioButton/RadioButton.tsx +43 -0
- package/src/index.ts +4 -0
- package/src/instructionsList/InstructionsList.spec.tsx +14 -0
- package/src/instructionsList/{InstructionList.story.tsx → InstructionsList.story.tsx} +14 -2
- package/src/instructionsList/InstructionsList.tsx +31 -17
- package/src/instructionsList/index.ts +3 -0
- package/src/moneyInput/MoneyInput.rtl.spec.tsx +12 -0
- package/src/moneyInput/MoneyInput.tsx +12 -2
- package/src/radio/{Radio.story.js → Radio.story.tsx} +0 -3
- package/src/radio/{Radio.js → Radio.tsx} +18 -28
- package/src/radio/index.ts +2 -0
- package/src/radioGroup/RadioGroup.spec.js +24 -26
- package/src/radioGroup/{RadioGroup.story.js → RadioGroup.story.tsx} +0 -3
- package/src/radioGroup/RadioGroup.tsx +39 -0
- package/src/radioGroup/index.ts +2 -0
- package/src/radioOption/RadioOption.spec.js +4 -4
- package/src/radioOption/{RadioOption.story.js → RadioOption.story.tsx} +4 -4
- package/src/radioOption/RadioOption.tsx +60 -0
- package/src/radioOption/index.ts +2 -0
- package/src/common/RadioButton/RadioButton.js +0 -41
- package/src/instructionsList/index.js +0 -3
- package/src/radio/index.js +0 -3
- package/src/radioGroup/RadioGroup.js +0 -66
- package/src/radioGroup/index.js +0 -1
- package/src/radioOption/RadioOption.js +0 -81
- package/src/radioOption/index.js +0 -1
- /package/src/common/RadioButton/{RadioButton.spec.js → RadioButton.spec.tsx} +0 -0
- /package/src/common/RadioButton/__snapshots__/{RadioButton.spec.js.snap → RadioButton.spec.tsx.snap} +0 -0
- /package/src/common/RadioButton/{index.js → index.ts} +0 -0
- /package/src/radio/{Radio.rtl.spec.js → Radio.rtl.spec.tsx} +0 -0
- /package/src/radio/__snapshots__/{Radio.rtl.spec.js.snap → Radio.rtl.spec.tsx.snap} +0 -0
|
@@ -8,7 +8,7 @@ export type ActionButtonProps = {
|
|
|
8
8
|
text?: string;
|
|
9
9
|
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
10
10
|
declare const ActionButton: import("react").ForwardRefExoticComponent<{
|
|
11
|
-
priority?: "
|
|
11
|
+
priority?: "secondary" | "primary" | undefined;
|
|
12
12
|
/**
|
|
13
13
|
* @deprecated use `children` instead
|
|
14
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../../src/common/Option/Option.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAc,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGvF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Option.d.ts","sourceRoot":"","sources":["../../../../src/common/Option/Option.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAc,cAAc,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAGvF,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IACnD,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,UAAU,iBAAkB,SAAQ,eAAe,EAAE,SAAS;IAC5D,EAAE,EAAE,GAAG,CAAC;CACT;AAED,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,iBAAiB,CAAC;AAE9D,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,iBAAiB,CAAC;AAE5D,QAAA,MAAM,MAAM,uGA4DX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,36 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
id
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
readOnly
|
|
10
|
-
}): import("react").JSX.Element;
|
|
11
|
-
declare namespace RadioButton {
|
|
12
|
-
namespace propTypes {
|
|
13
|
-
const id: any;
|
|
14
|
-
const name: any;
|
|
15
|
-
const checked: any;
|
|
16
|
-
const onChange: any;
|
|
17
|
-
const disabled: any;
|
|
18
|
-
const value: any;
|
|
19
|
-
const readOnly: any;
|
|
20
|
-
}
|
|
21
|
-
namespace defaultProps {
|
|
22
|
-
const checked_1: boolean;
|
|
23
|
-
export { checked_1 as checked };
|
|
24
|
-
export function onChange_1(): void;
|
|
25
|
-
export { onChange_1 as onChange };
|
|
26
|
-
const disabled_1: boolean;
|
|
27
|
-
export { disabled_1 as disabled };
|
|
28
|
-
const id_1: null;
|
|
29
|
-
export { id_1 as id };
|
|
30
|
-
const value_1: string;
|
|
31
|
-
export { value_1 as value };
|
|
32
|
-
const readOnly_1: boolean;
|
|
33
|
-
export { readOnly_1 as readOnly };
|
|
34
|
-
}
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface RadioButtonProps<T extends string | number = string> {
|
|
3
|
+
id?: string;
|
|
4
|
+
name: string;
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onChange?: (value: T | '') => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
value?: T | '';
|
|
9
|
+
readOnly?: boolean;
|
|
35
10
|
}
|
|
11
|
+
export default function RadioButton<T extends string | number = string>({ id, value, name, checked, onChange, disabled, readOnly, }: RadioButtonProps<T>): import("react").JSX.Element;
|
|
36
12
|
//# sourceMappingURL=RadioButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../../src/common/RadioButton/RadioButton.
|
|
1
|
+
{"version":3,"file":"RadioButton.d.ts","sourceRoot":"","sources":["../../../../src/common/RadioButton/RadioButton.tsx"],"names":[],"mappings":";AAEA,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM;IAClE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,KAAK,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EACtE,EAAE,EACF,KAAU,EACV,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,gBAAgB,CAAC,CAAC,CAAC,+BAsBrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from
|
|
1
|
+
export { default } from './RadioButton';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/RadioButton/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/RadioButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|
package/build/types/index.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export type { SearchInputProps } from './inputs/SearchInput';
|
|
|
10
10
|
export type { SelectInputGroupItem, SelectInputItem, SelectInputOptionContentProps, SelectInputOptionItem, SelectInputProps, SelectInputSeparatorItem, SelectInputTriggerButtonProps, } from './inputs/SelectInput';
|
|
11
11
|
export type { TextAreaProps } from './inputs/TextArea';
|
|
12
12
|
export type { PhoneNumberInputProps } from './phoneNumberInput/PhoneNumberInput';
|
|
13
|
+
export type { RadioProps } from './radio';
|
|
14
|
+
export type { RadioGroupProps } from './radioGroup';
|
|
15
|
+
export type { RadioOptionProps } from './radioOption';
|
|
13
16
|
export type { SnackbarProps } from './snackbar/Snackbar';
|
|
14
17
|
export type { SnackbarContextType } from './snackbar/SnackbarContext';
|
|
15
18
|
export type { TextareaWithDisplayFormatProps } from './textareaWithDisplayFormat';
|
|
@@ -19,6 +22,7 @@ export type { CurrencyHeaderItem, CurrencyItem, CurrencyOptionItem, MoneyInputPr
|
|
|
19
22
|
export type { LayoutDirection, TypographyTypes, TitleTypes, BodyTypes, LinkTypes, DisplayTypes, } from './common';
|
|
20
23
|
export type { SegmentedControlProps } from './segmentedControl';
|
|
21
24
|
export type { TypeaheadProps, TypeaheadOption } from './typeahead';
|
|
25
|
+
export type { InstructionsListProps } from './instructionsList';
|
|
22
26
|
/**
|
|
23
27
|
* Components
|
|
24
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAA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,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -4,13 +4,15 @@ type InstructionNode = {
|
|
|
4
4
|
content: ReactNode;
|
|
5
5
|
['aria-label']: string;
|
|
6
6
|
};
|
|
7
|
-
type
|
|
7
|
+
export type InstructionsListProps = CommonProps & ({
|
|
8
8
|
dos?: ReactNode[];
|
|
9
9
|
donts?: ReactNode[];
|
|
10
|
+
sort?: 'dosFirst' | 'dontsFirst';
|
|
10
11
|
} | {
|
|
11
12
|
dos?: InstructionNode[];
|
|
12
13
|
donts?: InstructionNode[];
|
|
14
|
+
sort?: 'dosFirst' | 'dontsFirst';
|
|
13
15
|
});
|
|
14
|
-
declare const InstructionsList: ({ dos, donts }:
|
|
16
|
+
declare const InstructionsList: ({ dos, donts, sort }: InstructionsListProps) => import("react").JSX.Element;
|
|
15
17
|
export default InstructionsList;
|
|
16
18
|
//# sourceMappingURL=InstructionsList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstructionsList.d.ts","sourceRoot":"","sources":["../../../src/instructionsList/InstructionsList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"InstructionsList.d.ts","sourceRoot":"","sources":["../../../src/instructionsList/InstructionsList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAc,WAAW,EAAE,MAAM,WAAW,CAAC;AAEpD,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAC7C,CACI;IACE,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC;IAClB,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CAClC,GACD;IACE,GAAG,CAAC,EAAE,eAAe,EAAE,CAAC;IACxB,KAAK,CAAC,EAAE,eAAe,EAAE,CAAC;IAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CAClC,CACJ,CAAC;AAEJ,QAAA,MAAM,gBAAgB,yBAAuC,qBAAqB,gCA2BjF,CAAC;AAsBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default InstructionsList;
|
|
2
|
-
|
|
1
|
+
export { default } from './InstructionsList';
|
|
2
|
+
export * from './InstructionsList';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructionsList/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/instructionsList/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,cAAc,oBAAoB,CAAC"}
|
|
@@ -16,6 +16,7 @@ export interface CurrencyHeaderItem {
|
|
|
16
16
|
export type CurrencyItem = CurrencyOptionItem | CurrencyHeaderItem;
|
|
17
17
|
export interface MoneyInputProps extends WrappedComponentProps {
|
|
18
18
|
id?: string;
|
|
19
|
+
'aria-labelledby'?: string;
|
|
19
20
|
currencies: readonly CurrencyItem[];
|
|
20
21
|
selectedCurrency: CurrencyOptionItem;
|
|
21
22
|
onCurrencyChange?: (value: CurrencyOptionItem) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/moneyInput/MoneyInput.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAc,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAG/D,OAAO,EAAQ,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEpF,OAAO,EAKL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AChD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI,CAAC;IAC3F,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACpC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAC5D,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;;;;AA8YD,wBAAsC"}
|
|
@@ -1,21 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
name: string;
|
|
12
|
-
onChange: (...args: any[])=>any;
|
|
13
|
-
secondary?: string;
|
|
14
|
-
value?: RadioValue;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
declare const Radio: React.FC<RadioProps>;
|
|
19
|
-
|
|
20
|
-
export default Radio;
|
|
21
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RadioButtonProps } from '../common/RadioButton/RadioButton';
|
|
3
|
+
export interface RadioProps<T extends string | number = string> extends RadioButtonProps<T> {
|
|
4
|
+
avatar?: React.ReactNode;
|
|
5
|
+
label: string;
|
|
6
|
+
secondary?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export default function Radio<T extends string | number = string>({ label, id, disabled, className, avatar, secondary, ...otherProps }: RadioProps<T>): import("react").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/radio/Radio.
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/radio/Radio.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IACzF,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EAChE,KAAK,EACL,EAAE,EACF,QAAQ,EACR,SAAS,EACT,MAAM,EACN,SAAS,EACT,GAAG,UAAU,EACd,EAAE,UAAU,CAAC,CAAC,CAAC,+BAiCf"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default Radio;
|
|
2
|
-
|
|
1
|
+
export { default } from './Radio';
|
|
2
|
+
export type { RadioProps } from './Radio';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radio/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1,26 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type RadioGroupSelectedValue = number | string;
|
|
14
|
-
|
|
15
|
-
export interface RadioGroupProps {
|
|
16
|
-
radios: RadioGroupRadios[];
|
|
17
|
-
onChange: (...args: any[])=>any;
|
|
18
|
-
selectedValue?: RadioGroupSelectedValue;
|
|
19
|
-
name: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export default class RadioGroup extends React.Component<RadioGroupProps, any> {
|
|
23
|
-
render(): JSX.Element;
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RadioProps } from '../radio/Radio';
|
|
3
|
+
export interface RadioGroupProps<T extends string | number = string> {
|
|
4
|
+
name: string;
|
|
5
|
+
radios: Omit<RadioProps<T>, 'name' | 'checked' | 'onChange' | 'className'>[];
|
|
6
|
+
selectedValue?: T | '';
|
|
7
|
+
onChange: NonNullable<RadioProps<T>['onChange']>;
|
|
8
|
+
}
|
|
9
|
+
export default function RadioGroup<T extends string | number = string>({ name, radios, selectedValue: controlledValue, onChange, }: RadioGroupProps<T>): import("react").JSX.Element | null;
|
|
10
|
+
//# sourceMappingURL=RadioGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/radioGroup/RadioGroup.
|
|
1
|
+
{"version":3,"file":"RadioGroup.d.ts","sourceRoot":"","sources":["../../../src/radioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM;IACjE,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC,EAAE,CAAC;IAC7E,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC;IACvB,QAAQ,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EACrE,IAAI,EACJ,MAAM,EACN,aAAa,EAAE,eAAe,EAC9B,QAAQ,GACT,EAAE,eAAe,CAAC,CAAC,CAAC,sCAqBpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radioGroup/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radioGroup/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface RadioOptionProps {
|
|
4
|
-
|
|
5
|
-
media?: React.ReactNode;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
showMediaAtAllSizes?: boolean;
|
|
17
|
-
isContainerAligned?: boolean;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
declare const RadioOption: React.FC<RadioOptionProps>;
|
|
21
|
-
|
|
22
|
-
export default RadioOption;
|
|
23
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RadioButtonProps } from '../common/RadioButton/RadioButton';
|
|
3
|
+
export interface RadioOptionProps<T extends string | number = string> extends Required<Pick<RadioButtonProps<T>, 'id' | 'name' | 'onChange'>>, Omit<RadioButtonProps<T>, 'readOnly' | 'id' | 'name' | 'onChange'> {
|
|
4
|
+
'aria-label'?: string;
|
|
5
|
+
media?: React.ReactNode;
|
|
6
|
+
title: React.ReactNode;
|
|
7
|
+
content?: React.ReactNode;
|
|
8
|
+
complex?: boolean;
|
|
9
|
+
showMediaCircle?: boolean;
|
|
10
|
+
showMediaAtAllSizes?: boolean;
|
|
11
|
+
isContainerAligned?: boolean;
|
|
12
|
+
}
|
|
13
|
+
declare function RadioOption<T extends string | number = string>({ 'aria-label': ariaLabel, media, title, content, id, name, checked, onChange, complex, disabled, value, showMediaCircle, showMediaAtAllSizes, isContainerAligned, }: RadioOptionProps<T>): import("react").JSX.Element;
|
|
14
|
+
export default RadioOption;
|
|
15
|
+
//# sourceMappingURL=RadioOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioOption.d.ts","sourceRoot":"","sources":["../../../src/radioOption/RadioOption.
|
|
1
|
+
{"version":3,"file":"RadioOption.d.ts","sourceRoot":"","sources":["../../../src/radioOption/RadioOption.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,MAAM,WAAW,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAClE,SAAQ,QAAQ,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC,CAAC,EACrE,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,iBAAS,WAAW,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,EACvD,YAAY,EAAE,SAAS,EACvB,KAAK,EACL,KAAK,EACL,OAAO,EACP,EAAE,EACF,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,KAAK,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,GACnB,EAAE,gBAAgB,CAAC,CAAC,CAAC,+BAyBrB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radioOption/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/radioOption/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,6 @@ import { MouseEvent, forwardRef, HTMLAttributes, ReactNode, ElementType } from '
|
|
|
3
3
|
|
|
4
4
|
import Body from '../../body';
|
|
5
5
|
import { LinkProps } from '../commonProps';
|
|
6
|
-
import { Typography } from '../propsValues/typography';
|
|
7
6
|
|
|
8
7
|
export interface BaseOptionProps extends Omit<HTMLAttributes<HTMLElement>, 'title' | 'content'> {
|
|
9
8
|
'aria-label'?: string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import classNames from 'classnames';
|
|
2
|
+
|
|
3
|
+
export interface RadioButtonProps<T extends string | number = string> {
|
|
4
|
+
id?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
onChange?: (value: T | '') => void;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
value?: T | '';
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default function RadioButton<T extends string | number = string>({
|
|
14
|
+
id,
|
|
15
|
+
value = '',
|
|
16
|
+
name,
|
|
17
|
+
checked,
|
|
18
|
+
onChange,
|
|
19
|
+
disabled,
|
|
20
|
+
readOnly,
|
|
21
|
+
}: RadioButtonProps<T>) {
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
<input
|
|
25
|
+
type="radio"
|
|
26
|
+
className="sr-only"
|
|
27
|
+
id={id}
|
|
28
|
+
value={value}
|
|
29
|
+
name={name}
|
|
30
|
+
checked={checked}
|
|
31
|
+
disabled={disabled || readOnly}
|
|
32
|
+
onChange={() => {
|
|
33
|
+
if (!checked) {
|
|
34
|
+
onChange?.(value);
|
|
35
|
+
}
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
<span className={classNames('tw-radio-button', { checked, disabled: disabled || readOnly })}>
|
|
39
|
+
<span className="tw-radio-check" />
|
|
40
|
+
</span>
|
|
41
|
+
</>
|
|
42
|
+
);
|
|
43
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -18,6 +18,9 @@ export type {
|
|
|
18
18
|
} from './inputs/SelectInput';
|
|
19
19
|
export type { TextAreaProps } from './inputs/TextArea';
|
|
20
20
|
export type { PhoneNumberInputProps } from './phoneNumberInput/PhoneNumberInput';
|
|
21
|
+
export type { RadioProps } from './radio';
|
|
22
|
+
export type { RadioGroupProps } from './radioGroup';
|
|
23
|
+
export type { RadioOptionProps } from './radioOption';
|
|
21
24
|
export type { SnackbarProps } from './snackbar/Snackbar';
|
|
22
25
|
export type { SnackbarContextType } from './snackbar/SnackbarContext';
|
|
23
26
|
export type { TextareaWithDisplayFormatProps } from './textareaWithDisplayFormat';
|
|
@@ -39,6 +42,7 @@ export type {
|
|
|
39
42
|
} from './common';
|
|
40
43
|
export type { SegmentedControlProps } from './segmentedControl';
|
|
41
44
|
export type { TypeaheadProps, TypeaheadOption } from './typeahead';
|
|
45
|
+
export type { InstructionsListProps } from './instructionsList';
|
|
42
46
|
|
|
43
47
|
/**
|
|
44
48
|
* Components
|
|
@@ -32,4 +32,18 @@ describe('InstructionsList', () => {
|
|
|
32
32
|
expect(instructions[0]).toHaveAttribute('aria-label', dos[0]['aria-label']);
|
|
33
33
|
expect(instructions[1]).toHaveAttribute('aria-label', donts[0]['aria-label']);
|
|
34
34
|
});
|
|
35
|
+
|
|
36
|
+
it('should render donts first when sort is set to `dontsFirst`', () => {
|
|
37
|
+
const dos = [{ content: 'Card validation', 'aria-label': 'Provides card validation' }];
|
|
38
|
+
const donts = [{ content: 'ID verification', 'aria-label': 'No ID verification' }];
|
|
39
|
+
|
|
40
|
+
const { container } = render(<InstructionsList dos={dos} donts={donts} sort="dontsFirst" />);
|
|
41
|
+
expect(screen.getByText(dos[0].content)).toBeInTheDocument();
|
|
42
|
+
expect(screen.getByText(donts[0].content)).toBeInTheDocument();
|
|
43
|
+
|
|
44
|
+
const instructions = container.querySelectorAll('.instruction');
|
|
45
|
+
expect(instructions).toHaveLength(2);
|
|
46
|
+
expect(instructions[0]).toHaveAttribute('aria-label', donts[0]['aria-label']);
|
|
47
|
+
expect(instructions[1]).toHaveAttribute('aria-label', dos[0]['aria-label']);
|
|
48
|
+
});
|
|
35
49
|
});
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { StoryFn } from '@storybook/react';
|
|
2
|
+
|
|
1
3
|
import Link from '../link';
|
|
2
4
|
|
|
3
|
-
import InstructionsList from './InstructionsList';
|
|
5
|
+
import InstructionsList, { InstructionsListProps } from './InstructionsList';
|
|
4
6
|
|
|
5
7
|
export default {
|
|
6
8
|
component: InstructionsList,
|
|
7
9
|
title: 'Typography/InstructionsList',
|
|
8
10
|
};
|
|
9
11
|
|
|
10
|
-
export const
|
|
12
|
+
export const Template: StoryFn = (args: InstructionsListProps) => {
|
|
11
13
|
return (
|
|
12
14
|
<>
|
|
13
15
|
<InstructionsList
|
|
@@ -23,7 +25,9 @@ export const Basic = () => {
|
|
|
23
25
|
</span>,
|
|
24
26
|
]}
|
|
25
27
|
donts={['Paying extra hidden fees for transfers', 'Use bad exchange rate']}
|
|
28
|
+
sort={args.sort}
|
|
26
29
|
/>
|
|
30
|
+
<hr />
|
|
27
31
|
<InstructionsList
|
|
28
32
|
dos={[
|
|
29
33
|
{ content: 'Multiple currencies', 'aria-label': 'Supports multiple currencies' },
|
|
@@ -33,7 +37,15 @@ export const Basic = () => {
|
|
|
33
37
|
{ content: 'Create recipients', 'aria-label': "Doesn't support creating recipients" },
|
|
34
38
|
{ content: 'Edit recipients', 'aria-label': "Doesn't support editing recipients" },
|
|
35
39
|
]}
|
|
40
|
+
sort={args.sort}
|
|
36
41
|
/>
|
|
37
42
|
</>
|
|
38
43
|
);
|
|
39
44
|
};
|
|
45
|
+
|
|
46
|
+
export const Basic = {
|
|
47
|
+
render: Template,
|
|
48
|
+
args: {
|
|
49
|
+
sort: 'dosFirst',
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CrossCircleFill as DontIcon, CheckCircleFill as DoIcon } from '@transferwise/icons';
|
|
2
|
-
import { ReactNode
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
import Body from '../body/Body';
|
|
5
5
|
import { Typography, CommonProps } from '../common';
|
|
@@ -9,33 +9,47 @@ type InstructionNode = {
|
|
|
9
9
|
['aria-label']: string;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
type
|
|
12
|
+
export type InstructionsListProps = CommonProps &
|
|
13
13
|
(
|
|
14
14
|
| {
|
|
15
15
|
dos?: ReactNode[];
|
|
16
16
|
donts?: ReactNode[];
|
|
17
|
+
sort?: 'dosFirst' | 'dontsFirst';
|
|
17
18
|
}
|
|
18
19
|
| {
|
|
19
20
|
dos?: InstructionNode[];
|
|
20
21
|
donts?: InstructionNode[];
|
|
22
|
+
sort?: 'dosFirst' | 'dontsFirst';
|
|
21
23
|
}
|
|
22
24
|
);
|
|
23
25
|
|
|
24
|
-
const InstructionsList = ({ dos, donts }:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
26
|
+
const InstructionsList = ({ dos, donts, sort = 'dosFirst' }: InstructionsListProps) => {
|
|
27
|
+
const dosInstructions =
|
|
28
|
+
dos?.map((doThis, index) => (
|
|
29
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
30
|
+
<Instruction key={index} item={doThis} type="do" />
|
|
31
|
+
)) ?? null;
|
|
32
|
+
|
|
33
|
+
const dontsInstructions =
|
|
34
|
+
donts?.map((dont, index) => (
|
|
35
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
36
|
+
<Instruction key={index} item={dont} type="dont" />
|
|
37
|
+
)) ?? null;
|
|
38
|
+
|
|
39
|
+
const orderedInstructions =
|
|
40
|
+
sort === 'dosFirst' ? (
|
|
41
|
+
<>
|
|
42
|
+
{dosInstructions}
|
|
43
|
+
{dontsInstructions}
|
|
44
|
+
</>
|
|
45
|
+
) : (
|
|
46
|
+
<>
|
|
47
|
+
{dontsInstructions}
|
|
48
|
+
{dosInstructions}
|
|
49
|
+
</>
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
return <div className="tw-instructions">{orderedInstructions}</div>;
|
|
39
53
|
};
|
|
40
54
|
|
|
41
55
|
function Instruction({ item, type }: { item: ReactNode | InstructionNode; type: 'do' | 'dont' }) {
|
|
@@ -68,4 +68,16 @@ describe('MoneyInput', () => {
|
|
|
68
68
|
userEvent.type(input, testValue);
|
|
69
69
|
expect(input).toHaveValue(expectedValue);
|
|
70
70
|
});
|
|
71
|
+
|
|
72
|
+
it('supports custom `aria-labelledby` attribute', () => {
|
|
73
|
+
render(
|
|
74
|
+
<>
|
|
75
|
+
{/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
|
|
76
|
+
<label id="prioritized-label">Prioritized label</label>
|
|
77
|
+
<MoneyInput {...props} aria-labelledby="prioritized-label" />
|
|
78
|
+
</>,
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
expect(screen.getByLabelText('Prioritized label')).toHaveClass('input-group');
|
|
82
|
+
});
|
|
71
83
|
});
|