@trackunit/react-components 0.0.136 → 0.0.138
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/components/BaseInput/BaseInput.d.ts +9 -9
- package/index.js +2 -1
- package/package.json +1 -1
|
@@ -4,31 +4,31 @@ declare type FilteredInputProps = Omit<React.InputHTMLAttributes<HTMLInputElemen
|
|
|
4
4
|
declare type FieldSize = "small" | "medium";
|
|
5
5
|
export interface BaseInputProps extends FilteredInputProps, CommonProps {
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* A React element to render before the text in the input.
|
|
8
8
|
* This is typically used to render an icon.
|
|
9
|
-
* For other
|
|
9
|
+
* For elements other than icons, please consider using the addonBefore prop.
|
|
10
10
|
*/
|
|
11
11
|
prefix?: React.ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* A React element to render after the text in the input.
|
|
14
14
|
* This is typically used to render an icon.
|
|
15
|
-
* For other elements than icons, please
|
|
15
|
+
* For other elements than icons, please consider using the addonAfter prop.
|
|
16
16
|
*/
|
|
17
17
|
suffix?: React.ReactNode;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* A React element to render in a separate container before the text in the input.
|
|
20
20
|
* This is typically used to render text.
|
|
21
|
-
* For icons, please
|
|
21
|
+
* For icons, please consider using the prefix prop.
|
|
22
22
|
*/
|
|
23
23
|
addonBefore?: React.ReactNode;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* A React element to render in a separate container after the text in the input.
|
|
26
26
|
* This is typically used to render text.
|
|
27
|
-
* For icons, please
|
|
27
|
+
* For icons, please consider using the suffix prop.
|
|
28
28
|
*/
|
|
29
29
|
addonAfter?: React.ReactNode;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* A ReactNode to render at the end of the input field before the addonAfter.
|
|
32
32
|
* Mainly meant for the icon button actions for special input types.
|
|
33
33
|
*/
|
|
34
34
|
actions?: React.ReactNode;
|
package/index.js
CHANGED
|
@@ -1012,7 +1012,7 @@ const BaseInput = React.forwardRef((_a, ref) => {
|
|
|
1012
1012
|
"data-testid": `${dataTestId}-suffix`
|
|
1013
1013
|
}, {
|
|
1014
1014
|
children: suffix
|
|
1015
|
-
})) : null, actions !== null && addonBefore !== actions ? actions : null, addonAfter !== null && addonBefore !== addonAfter ? jsx(AddonAfter, Object.assign({
|
|
1015
|
+
})) : null, actions !== null && addonBefore !== actions ? actions : null, addonAfter !== null && addonAfter !== undefined && addonBefore !== addonAfter ? jsx(AddonAfter, Object.assign({
|
|
1016
1016
|
"data-testid": `${dataTestId}-addonAfter`
|
|
1017
1017
|
}, {
|
|
1018
1018
|
children: addonAfter
|
|
@@ -1655,6 +1655,7 @@ const Checkbox = React.forwardRef((_a, ref) => {
|
|
|
1655
1655
|
}, {
|
|
1656
1656
|
children: icon
|
|
1657
1657
|
})), label && jsx(Label$3, Object.assign({
|
|
1658
|
+
className: tws`cursor-pointer`,
|
|
1658
1659
|
htmlFor: uuid,
|
|
1659
1660
|
disabled: isReadonly,
|
|
1660
1661
|
isInvalid: isReadonly ? false : isInvalid,
|