@widergy/mobile-ui 1.32.15 → 1.33.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/CHANGELOG.md +14 -0
- package/lib/components/UTBaseInputField/components/TooltipAdornment/index.js +15 -5
- package/lib/components/UTStatusMessage/index.js +2 -2
- package/lib/components/UTTextInput/versions/V1/components/TextInputField/index.js +7 -1
- package/lib/components/UTTextInput/versions/V1/index.js +7 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.33.0](https://github.com/widergy/mobile-ui/compare/v1.32.16...v1.33.0) (2025-01-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [UGENSA-973] tooltip adornment ([#403](https://github.com/widergy/mobile-ui/issues/403)) ([bf3ac33](https://github.com/widergy/mobile-ui/commit/bf3ac3381aafae7e04197878d3e872d284ebb89b))
|
|
7
|
+
|
|
8
|
+
## [1.32.16](https://github.com/widergy/mobile-ui/compare/v1.32.15...v1.32.16) (2025-01-03)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* [UGC-1104] onPress not onClick in utstatusmessage ([#401](https://github.com/widergy/mobile-ui/issues/401)) ([2ad0aca](https://github.com/widergy/mobile-ui/commit/2ad0aca5be88ee4d4c5a1bed675a65ffa8522163))
|
|
14
|
+
|
|
1
15
|
## [1.32.15](https://github.com/widergy/mobile-ui/compare/v1.32.14...v1.32.15) (2025-01-02)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,19 +1,29 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { string } from 'prop-types';
|
|
2
|
+
import { object, shape, string } from 'prop-types';
|
|
3
3
|
|
|
4
4
|
import UTTooltip from '../../../UTTooltip';
|
|
5
5
|
import UTIcon from '../../../UTIcon';
|
|
6
6
|
import UTLabel from '../../../UTLabel';
|
|
7
7
|
|
|
8
|
-
const TooltipAdornment = ({ tooltip }) =>
|
|
9
|
-
tooltip
|
|
10
|
-
|
|
8
|
+
const TooltipAdornment = ({ tooltip, tooltipProps }) => {
|
|
9
|
+
const { tooltip: tooltipStyles, arrowTouchable, labelProps } = tooltipProps || {};
|
|
10
|
+
return tooltip ? (
|
|
11
|
+
<UTTooltip
|
|
12
|
+
styles={{ tooltip: tooltipStyles, arrow: arrowTouchable }}
|
|
13
|
+
content={<UTLabel {...labelProps}>{tooltip}</UTLabel>}
|
|
14
|
+
>
|
|
11
15
|
<UTIcon name="IconInfoCircle" colorTheme="gray" />
|
|
12
16
|
</UTTooltip>
|
|
13
17
|
) : undefined;
|
|
18
|
+
};
|
|
14
19
|
|
|
15
20
|
TooltipAdornment.propTypes = {
|
|
16
|
-
tooltip: string
|
|
21
|
+
tooltip: string,
|
|
22
|
+
tooltipProps: shape({
|
|
23
|
+
tooltip: object,
|
|
24
|
+
arrowTouchable: object,
|
|
25
|
+
labelProps: object
|
|
26
|
+
})
|
|
17
27
|
};
|
|
18
28
|
|
|
19
29
|
export default TooltipAdornment;
|
|
@@ -90,12 +90,12 @@ const UTStatusMessage = ({
|
|
|
90
90
|
{(primaryAction || secondaryAction) && (
|
|
91
91
|
<View style={ownStyles.section}>
|
|
92
92
|
{primaryAction && (
|
|
93
|
-
<UTButton
|
|
93
|
+
<UTButton onPress={primaryAction} {...primaryActionProps}>
|
|
94
94
|
{primaryActionText}
|
|
95
95
|
</UTButton>
|
|
96
96
|
)}
|
|
97
97
|
{secondaryAction && (
|
|
98
|
-
<UTButton
|
|
98
|
+
<UTButton onPress={secondaryAction} variant="text" {...secondaryActionProps}>
|
|
99
99
|
{secondaryActionText}
|
|
100
100
|
</UTButton>
|
|
101
101
|
)}
|
|
@@ -30,6 +30,7 @@ const TextInputField = ({
|
|
|
30
30
|
style,
|
|
31
31
|
suffix,
|
|
32
32
|
tooltip,
|
|
33
|
+
tooltipProps,
|
|
33
34
|
type,
|
|
34
35
|
value
|
|
35
36
|
}) => {
|
|
@@ -42,7 +43,7 @@ const TextInputField = ({
|
|
|
42
43
|
{ name: COMPONENT_KEYS.SUFFIX, props: { text: suffix } },
|
|
43
44
|
{ name: COMPONENT_KEYS.ICON, props: { Icon: RightIcon, changeOnError: true } },
|
|
44
45
|
{ name: COMPONENT_KEYS.ACTION, props: { action } },
|
|
45
|
-
{ name: COMPONENT_KEYS.TOOLTIP, props: { tooltip } }
|
|
46
|
+
{ name: COMPONENT_KEYS.TOOLTIP, props: { tooltip, tooltipProps } }
|
|
46
47
|
];
|
|
47
48
|
|
|
48
49
|
return (
|
|
@@ -106,6 +107,11 @@ TextInputField.propTypes = {
|
|
|
106
107
|
}),
|
|
107
108
|
suffix: string,
|
|
108
109
|
tooltip: string,
|
|
110
|
+
tooltipProps: shape({
|
|
111
|
+
tooltip: object,
|
|
112
|
+
arrowTouchable: object,
|
|
113
|
+
labelProps: object
|
|
114
|
+
}),
|
|
109
115
|
type: string,
|
|
110
116
|
value: string
|
|
111
117
|
};
|
|
@@ -41,6 +41,7 @@ const UTTextInput = ({
|
|
|
41
41
|
title,
|
|
42
42
|
titleVariant = 'large',
|
|
43
43
|
tooltip,
|
|
44
|
+
tooltipProps,
|
|
44
45
|
type,
|
|
45
46
|
validations,
|
|
46
47
|
value = null
|
|
@@ -85,6 +86,7 @@ const UTTextInput = ({
|
|
|
85
86
|
style={style}
|
|
86
87
|
suffix={suffix}
|
|
87
88
|
tooltip={tooltip}
|
|
89
|
+
tooltipProps={tooltipProps}
|
|
88
90
|
type={type}
|
|
89
91
|
value={value}
|
|
90
92
|
/>
|
|
@@ -136,6 +138,11 @@ export const propTypes = {
|
|
|
136
138
|
suffix: string,
|
|
137
139
|
title: string,
|
|
138
140
|
titleVariant: string,
|
|
141
|
+
tooltipProps: shape({
|
|
142
|
+
tooltip: object,
|
|
143
|
+
arrowTouchable: object,
|
|
144
|
+
labelProps: object
|
|
145
|
+
}),
|
|
139
146
|
tooltip: string,
|
|
140
147
|
type: string,
|
|
141
148
|
validations: validationDataProptypes,
|
package/package.json
CHANGED