@transferwise/components 0.0.0-experimental-0e3fbf6 → 0.0.0-experimental-44982e0
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 +8 -24
- package/build/index.esm.js.map +1 -1
- package/build/index.js +8 -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/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 +0 -7
- package/src/typeahead/Typeahead.spec.js +0 -9
- 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 = [];
|
|
@@ -11988,7 +11972,7 @@ class TypeaheadInput extends React.Component {
|
|
|
11988
11972
|
autoFocus,
|
|
11989
11973
|
multiple,
|
|
11990
11974
|
name,
|
|
11991
|
-
|
|
11975
|
+
optionsShown,
|
|
11992
11976
|
placeholder,
|
|
11993
11977
|
selected,
|
|
11994
11978
|
value,
|
|
@@ -12010,7 +11994,7 @@ class TypeaheadInput extends React.Component {
|
|
|
12010
11994
|
autoFocus: autoFocus,
|
|
12011
11995
|
placeholder: hasPlaceholder ? placeholder : '',
|
|
12012
11996
|
"aria-autocomplete": "list",
|
|
12013
|
-
"aria-expanded":
|
|
11997
|
+
"aria-expanded": optionsShown,
|
|
12014
11998
|
"aria-haspopup": "listbox",
|
|
12015
11999
|
"aria-controls": `menu-${typeaheadId}`,
|
|
12016
12000
|
autoComplete: autoComplete,
|
|
@@ -12512,7 +12496,7 @@ class Typeahead extends React.Component {
|
|
|
12512
12496
|
}), /*#__PURE__*/jsxRuntime.jsx(TypeaheadInput, {
|
|
12513
12497
|
autoFocus,
|
|
12514
12498
|
multiple,
|
|
12515
|
-
|
|
12499
|
+
optionsShown,
|
|
12516
12500
|
placeholder,
|
|
12517
12501
|
selected,
|
|
12518
12502
|
maxHeight,
|
|
@@ -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;
|