@transferwise/components 46.18.0 → 46.19.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 +12 -24
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -24
- package/build/index.js.map +1 -1
- package/build/types/actionButton/ActionButton.d.ts +1 -1
- package/build/types/circularButton/CircularButton.d.ts +16 -20
- package/build/types/circularButton/CircularButton.d.ts.map +1 -1
- package/build/types/circularButton/index.d.ts +2 -1
- package/build/types/circularButton/index.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts +2 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/summary/Summary.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +1 -1
- package/package.json +1 -1
- package/src/circularButton/{CircularButton.story.js → CircularButton.story.tsx} +2 -2
- package/src/circularButton/CircularButton.tsx +51 -0
- package/src/circularButton/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/phoneNumberInput/PhoneNumberInput.rtl.spec.tsx +22 -0
- package/src/phoneNumberInput/PhoneNumberInput.tsx +3 -1
- package/src/summary/Summary.tsx +7 -1
- package/src/typeahead/Typeahead.spec.js +9 -0
- package/src/typeahead/Typeahead.tsx +1 -1
- package/src/typeahead/typeaheadInput/TypeaheadInput.tsx +3 -3
- package/src/circularButton/CircularButton.js +0 -57
- package/src/circularButton/index.js +0 -1
- /package/src/circularButton/{CircularButton.spec.js → CircularButton.spec.tsx} +0 -0
- /package/src/circularButton/__snapshots__/{CircularButton.spec.js.snap → CircularButton.spec.tsx.snap} +0 -0
package/build/index.js
CHANGED
|
@@ -2689,16 +2689,16 @@ const CircularButton = ({
|
|
|
2689
2689
|
children,
|
|
2690
2690
|
disabled,
|
|
2691
2691
|
icon,
|
|
2692
|
-
priority,
|
|
2693
|
-
type,
|
|
2692
|
+
priority = exports.Priority.PRIMARY,
|
|
2693
|
+
type = exports.ControlType.ACCENT,
|
|
2694
2694
|
...rest
|
|
2695
2695
|
}) => {
|
|
2696
2696
|
const classes = classNames__default.default('btn np-btn', typeClassMap$1[type], priorityClassMap[priority]);
|
|
2697
|
-
const iconElement = icon.props.size !== 24 ? /*#__PURE__*/React.cloneElement(icon, {
|
|
2697
|
+
const iconElement = Number(icon.props.size) !== 24 ? /*#__PURE__*/React.cloneElement(icon, {
|
|
2698
2698
|
size: 24
|
|
2699
2699
|
}) : icon;
|
|
2700
2700
|
return /*#__PURE__*/jsxRuntime.jsxs("label", {
|
|
2701
|
-
className: classNames__default.default('np-circular-btn', priority, type, disabled
|
|
2701
|
+
className: classNames__default.default('np-circular-btn', priority, type, disabled && 'disabled', className),
|
|
2702
2702
|
children: [/*#__PURE__*/jsxRuntime.jsx("input", {
|
|
2703
2703
|
type: "button",
|
|
2704
2704
|
"aria-label": children,
|
|
@@ -2713,22 +2713,6 @@ const CircularButton = ({
|
|
|
2713
2713
|
})]
|
|
2714
2714
|
});
|
|
2715
2715
|
};
|
|
2716
|
-
CircularButton.propTypes = {
|
|
2717
|
-
className: PropTypes__default.default.string,
|
|
2718
|
-
children: PropTypes__default.default.string.isRequired,
|
|
2719
|
-
disabled: PropTypes__default.default.bool,
|
|
2720
|
-
icon: PropTypes__default.default.element.isRequired,
|
|
2721
|
-
onClick: PropTypes__default.default.func,
|
|
2722
|
-
priority: PropTypes__default.default.oneOf(['primary', 'secondary']),
|
|
2723
|
-
type: PropTypes__default.default.oneOf(['accent', 'positive', 'negative'])
|
|
2724
|
-
};
|
|
2725
|
-
CircularButton.defaultProps = {
|
|
2726
|
-
className: undefined,
|
|
2727
|
-
disabled: false,
|
|
2728
|
-
priority: exports.Priority.PRIMARY,
|
|
2729
|
-
type: exports.ControlType.ACCENT
|
|
2730
|
-
};
|
|
2731
|
-
var CircularButton$1 = CircularButton;
|
|
2732
2716
|
|
|
2733
2717
|
function getDayNames(locale, format = 'short') {
|
|
2734
2718
|
const days = [];
|
|
@@ -9435,6 +9419,7 @@ const defaultSelectProps = {};
|
|
|
9435
9419
|
const defaultDisabledCountries = [];
|
|
9436
9420
|
const PhoneNumberInput = ({
|
|
9437
9421
|
id,
|
|
9422
|
+
'aria-labelledby': ariaLabelledBy,
|
|
9438
9423
|
required,
|
|
9439
9424
|
disabled,
|
|
9440
9425
|
initialValue,
|
|
@@ -9497,6 +9482,7 @@ const PhoneNumberInput = ({
|
|
|
9497
9482
|
setBroadcastedValue(internalValue);
|
|
9498
9483
|
}, [onChange, broadcastedValue, internalValue]);
|
|
9499
9484
|
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
9485
|
+
"aria-labelledby": ariaLabelledBy,
|
|
9500
9486
|
className: "tw-telephone",
|
|
9501
9487
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
9502
9488
|
className: "tw-telephone__country-select",
|
|
@@ -11123,6 +11109,8 @@ const Summary = ({
|
|
|
11123
11109
|
className: "np-summary__title d-flex",
|
|
11124
11110
|
children: [/*#__PURE__*/jsxRuntime.jsx(Body, {
|
|
11125
11111
|
as: "span",
|
|
11112
|
+
role: "heading",
|
|
11113
|
+
"aria-level": 4,
|
|
11126
11114
|
type: exports.Typography.BODY_LARGE_BOLD,
|
|
11127
11115
|
className: "text-primary m-b-1",
|
|
11128
11116
|
children: title
|
|
@@ -11986,7 +11974,7 @@ class TypeaheadInput extends React.Component {
|
|
|
11986
11974
|
autoFocus,
|
|
11987
11975
|
multiple,
|
|
11988
11976
|
name,
|
|
11989
|
-
|
|
11977
|
+
dropdownOpen,
|
|
11990
11978
|
placeholder,
|
|
11991
11979
|
selected,
|
|
11992
11980
|
value,
|
|
@@ -12008,7 +11996,7 @@ class TypeaheadInput extends React.Component {
|
|
|
12008
11996
|
autoFocus: autoFocus,
|
|
12009
11997
|
placeholder: hasPlaceholder ? placeholder : '',
|
|
12010
11998
|
"aria-autocomplete": "list",
|
|
12011
|
-
"aria-expanded":
|
|
11999
|
+
"aria-expanded": dropdownOpen,
|
|
12012
12000
|
"aria-haspopup": "listbox",
|
|
12013
12001
|
"aria-controls": `menu-${typeaheadId}`,
|
|
12014
12002
|
autoComplete: autoComplete,
|
|
@@ -12510,7 +12498,7 @@ class Typeahead extends React.Component {
|
|
|
12510
12498
|
}), /*#__PURE__*/jsxRuntime.jsx(TypeaheadInput, {
|
|
12511
12499
|
autoFocus,
|
|
12512
12500
|
multiple,
|
|
12513
|
-
|
|
12501
|
+
dropdownOpen,
|
|
12514
12502
|
placeholder,
|
|
12515
12503
|
selected,
|
|
12516
12504
|
maxHeight,
|
|
@@ -15180,7 +15168,7 @@ exports.CheckboxOption = CheckboxOption;
|
|
|
15180
15168
|
exports.Chevron = Chevron;
|
|
15181
15169
|
exports.Chip = Chip;
|
|
15182
15170
|
exports.Chips = Chips;
|
|
15183
|
-
exports.CircularButton = CircularButton
|
|
15171
|
+
exports.CircularButton = CircularButton;
|
|
15184
15172
|
exports.CriticalCommsBanner = CriticalCommsBanner;
|
|
15185
15173
|
exports.DEFAULT_LANG = DEFAULT_LANG;
|
|
15186
15174
|
exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
|