@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.mjs
CHANGED
|
@@ -5737,25 +5737,45 @@ function InputGroup({
|
|
|
5737
5737
|
className,
|
|
5738
5738
|
children
|
|
5739
5739
|
}) {
|
|
5740
|
+
const inputAttributes = useInputAttributes({
|
|
5741
|
+
nonLabelable: true
|
|
5742
|
+
});
|
|
5740
5743
|
const [paddingStart, setPaddingStart] = useState(inputPaddingInitialState(addonStart));
|
|
5741
5744
|
const [paddingEnd, setPaddingEnd] = useState(inputPaddingInitialState(addonEnd));
|
|
5742
|
-
return
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
children:
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5745
|
+
return (
|
|
5746
|
+
/*#__PURE__*/
|
|
5747
|
+
/* Prevent nested controls from being labeled redundantly */
|
|
5748
|
+
jsx(FieldLabelIdContextProvider, {
|
|
5749
|
+
value: undefined,
|
|
5750
|
+
children: /*#__PURE__*/jsx(InputIdContextProvider, {
|
|
5751
|
+
value: undefined,
|
|
5752
|
+
children: /*#__PURE__*/jsx(InputDescribedByProvider, {
|
|
5753
|
+
value: undefined,
|
|
5754
|
+
children: /*#__PURE__*/jsx(InputInvalidProvider, {
|
|
5755
|
+
value: undefined,
|
|
5756
|
+
children: /*#__PURE__*/jsx(InputPaddingStartContext.Provider, {
|
|
5757
|
+
value: useMemo(() => [paddingStart, setPaddingStart], [paddingStart]),
|
|
5758
|
+
children: /*#__PURE__*/jsx(InputPaddingEndContext.Provider, {
|
|
5759
|
+
value: useMemo(() => [paddingEnd, setPaddingEnd], [paddingEnd]),
|
|
5760
|
+
children: /*#__PURE__*/jsxs("fieldset", {
|
|
5761
|
+
...inputAttributes,
|
|
5762
|
+
disabled: disabled,
|
|
5763
|
+
className: classNames(className, 'np-input-group'),
|
|
5764
|
+
children: [addonStart != null ? /*#__PURE__*/jsx(InputAddon, {
|
|
5765
|
+
placement: "start",
|
|
5766
|
+
...addonStart
|
|
5767
|
+
}) : null, children, addonEnd != null ? /*#__PURE__*/jsx(InputAddon, {
|
|
5768
|
+
placement: "end",
|
|
5769
|
+
...addonEnd
|
|
5770
|
+
}) : null]
|
|
5771
|
+
})
|
|
5772
|
+
})
|
|
5773
|
+
})
|
|
5774
|
+
})
|
|
5775
|
+
})
|
|
5756
5776
|
})
|
|
5757
5777
|
})
|
|
5758
|
-
|
|
5778
|
+
);
|
|
5759
5779
|
}
|
|
5760
5780
|
const inputAddonContentWidthAddendByPadding = {
|
|
5761
5781
|
none: 0,
|
|
@@ -6620,6 +6640,7 @@ function SelectInput({
|
|
|
6620
6640
|
disabled,
|
|
6621
6641
|
size = 'md',
|
|
6622
6642
|
className,
|
|
6643
|
+
UNSAFE_triggerButtonProps,
|
|
6623
6644
|
onFilterChange = noop,
|
|
6624
6645
|
onChange,
|
|
6625
6646
|
onClose,
|
|
@@ -6688,6 +6709,7 @@ function SelectInput({
|
|
|
6688
6709
|
triggerRef.current = node;
|
|
6689
6710
|
},
|
|
6690
6711
|
...inputAttributes,
|
|
6712
|
+
...UNSAFE_triggerButtonProps,
|
|
6691
6713
|
id,
|
|
6692
6714
|
...mergeProps({
|
|
6693
6715
|
onClick: () => {
|