@transferwise/components 0.0.0-experimental-0e3fbf6 → 0.0.0-experimental-f13f3a7
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 +5 -21
- package/build/index.esm.js.map +1 -1
- package/build/index.js +5 -21
- 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/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 +0 -7
- 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 = [];
|
|
@@ -15182,7 +15166,7 @@ exports.CheckboxOption = CheckboxOption;
|
|
|
15182
15166
|
exports.Chevron = Chevron;
|
|
15183
15167
|
exports.Chip = Chip;
|
|
15184
15168
|
exports.Chips = Chips;
|
|
15185
|
-
exports.CircularButton = CircularButton
|
|
15169
|
+
exports.CircularButton = CircularButton;
|
|
15186
15170
|
exports.CriticalCommsBanner = CriticalCommsBanner;
|
|
15187
15171
|
exports.DEFAULT_LANG = DEFAULT_LANG;
|
|
15188
15172
|
exports.DEFAULT_LOCALE = DEFAULT_LOCALE;
|