@transferwise/components 46.42.1 → 46.43.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.js +37 -15
- package/build/index.js.map +1 -1
- package/build/index.mjs +37 -15
- package/build/index.mjs.map +1 -1
- package/build/types/inputs/InputGroup.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +3 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/inputs/InputGroup.spec.tsx +26 -0
- package/src/inputs/InputGroup.tsx +35 -13
- package/src/inputs/SearchInput.spec.tsx +16 -0
- package/src/inputs/SelectInput.spec.tsx +1 -1
- package/src/inputs/SelectInput.tsx +4 -1
package/build/index.js
CHANGED
|
@@ -5766,25 +5766,45 @@ function InputGroup({
|
|
|
5766
5766
|
className,
|
|
5767
5767
|
children
|
|
5768
5768
|
}) {
|
|
5769
|
+
const inputAttributes = useInputAttributes({
|
|
5770
|
+
nonLabelable: true
|
|
5771
|
+
});
|
|
5769
5772
|
const [paddingStart, setPaddingStart] = React.useState(inputPaddingInitialState(addonStart));
|
|
5770
5773
|
const [paddingEnd, setPaddingEnd] = React.useState(inputPaddingInitialState(addonEnd));
|
|
5771
|
-
return
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
children:
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5774
|
+
return (
|
|
5775
|
+
/*#__PURE__*/
|
|
5776
|
+
/* Prevent nested controls from being labeled redundantly */
|
|
5777
|
+
jsxRuntime.jsx(FieldLabelIdContextProvider, {
|
|
5778
|
+
value: undefined,
|
|
5779
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputIdContextProvider, {
|
|
5780
|
+
value: undefined,
|
|
5781
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputDescribedByProvider, {
|
|
5782
|
+
value: undefined,
|
|
5783
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputInvalidProvider, {
|
|
5784
|
+
value: undefined,
|
|
5785
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputPaddingStartContext.Provider, {
|
|
5786
|
+
value: React.useMemo(() => [paddingStart, setPaddingStart], [paddingStart]),
|
|
5787
|
+
children: /*#__PURE__*/jsxRuntime.jsx(InputPaddingEndContext.Provider, {
|
|
5788
|
+
value: React.useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd]),
|
|
5789
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("fieldset", {
|
|
5790
|
+
...inputAttributes,
|
|
5791
|
+
disabled: disabled,
|
|
5792
|
+
className: classNames__default.default(className, 'np-input-group'),
|
|
5793
|
+
children: [addonStart != null ? /*#__PURE__*/jsxRuntime.jsx(InputAddon, {
|
|
5794
|
+
placement: "start",
|
|
5795
|
+
...addonStart
|
|
5796
|
+
}) : null, children, addonEnd != null ? /*#__PURE__*/jsxRuntime.jsx(InputAddon, {
|
|
5797
|
+
placement: "end",
|
|
5798
|
+
...addonEnd
|
|
5799
|
+
}) : null]
|
|
5800
|
+
})
|
|
5801
|
+
})
|
|
5802
|
+
})
|
|
5803
|
+
})
|
|
5804
|
+
})
|
|
5785
5805
|
})
|
|
5786
5806
|
})
|
|
5787
|
-
|
|
5807
|
+
);
|
|
5788
5808
|
}
|
|
5789
5809
|
const inputAddonContentWidthAddendByPadding = {
|
|
5790
5810
|
none: 0,
|
|
@@ -6649,6 +6669,7 @@ function SelectInput({
|
|
|
6649
6669
|
disabled,
|
|
6650
6670
|
size = 'md',
|
|
6651
6671
|
className,
|
|
6672
|
+
UNSAFE_triggerButtonProps,
|
|
6652
6673
|
onFilterChange = noop,
|
|
6653
6674
|
onChange,
|
|
6654
6675
|
onClose,
|
|
@@ -6717,6 +6738,7 @@ function SelectInput({
|
|
|
6717
6738
|
triggerRef.current = node;
|
|
6718
6739
|
},
|
|
6719
6740
|
...inputAttributes,
|
|
6741
|
+
...UNSAFE_triggerButtonProps,
|
|
6720
6742
|
id,
|
|
6721
6743
|
...mergeProps__default.default({
|
|
6722
6744
|
onClick: () => {
|