@widergy/mobile-ui 1.48.1 → 1.49.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/UTProductItem/components/Status/index.js +2 -6
- package/lib/components/UTStatus/README.md +2 -2
- package/lib/components/UTStatus/constants.js +0 -6
- package/lib/components/UTStatus/index.js +6 -6
- package/lib/components/UTStatus/theme.js +3 -3
- package/lib/components/UTTooltip/index.js +2 -1
- package/lib/components/UTWizard/index.js +8 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.49.0](https://github.com/widergy/mobile-ui/compare/v1.48.2...v1.49.0) (2025-06-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* [UGEE-272] OnBoarding mobile ([#438](https://github.com/widergy/mobile-ui/issues/438)) ([5f0d6de](https://github.com/widergy/mobile-ui/commit/5f0d6defd4afbbffa81575802f21da68017b449d))
|
|
7
|
+
|
|
8
|
+
## [1.48.2](https://github.com/widergy/mobile-ui/compare/v1.48.1...v1.48.2) (2025-06-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* [UGC-1544] utstatus fixes ([#440](https://github.com/widergy/mobile-ui/issues/440)) ([3eae576](https://github.com/widergy/mobile-ui/commit/3eae5762502ac9c57935ac290510fa0d2cd3534b))
|
|
14
|
+
|
|
1
15
|
## [1.48.1](https://github.com/widergy/mobile-ui/compare/v1.48.0...v1.48.1) (2025-06-09)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -5,16 +5,12 @@ import { bool, object, shape, string } from 'prop-types';
|
|
|
5
5
|
import UTStatus from '../../../UTStatus';
|
|
6
6
|
|
|
7
7
|
const Status = ({ shouldUseGap, statusProps, themedStyles }) => {
|
|
8
|
-
const {
|
|
8
|
+
const { label } = statusProps;
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<UTStatus
|
|
12
|
-
Icon={Icon}
|
|
13
|
-
labelProps={labelProps}
|
|
14
12
|
style={{ container: [shouldUseGap ? themedStyles.gap : '', themedStyles.status] }}
|
|
15
|
-
|
|
16
|
-
variant={variant}
|
|
17
|
-
withoutIcon={withoutIcon}
|
|
13
|
+
{...statusProps}
|
|
18
14
|
>
|
|
19
15
|
{label}
|
|
20
16
|
</UTStatus>
|
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
| Icon | string | - | Allows display for a custom icon. If omitted, a default Icon for the variant will be used. |
|
|
12
12
|
| labelProps | object | {} | Props to pass down to the internal UTLabel component. |
|
|
13
13
|
| style | object | - | Custom styles to apply to the component. |
|
|
14
|
-
|
|
|
14
|
+
| shade | string | '01' | Shade to apply to the palette variant specified |
|
|
15
15
|
| variant | string | 'success' | The variant will defined the default icon that the component will render, as well as the background color for the status container. |
|
|
16
16
|
| withoutIcon | bool | false | if `true`, no icon will be rendered. |
|
|
17
17
|
|
|
18
18
|
## Example
|
|
19
19
|
|
|
20
20
|
```jsx
|
|
21
|
-
<UTStatus variant="error"
|
|
21
|
+
<UTStatus variant="error" shade="03" labelProps={{ withMarkdown: true }}>
|
|
22
22
|
Error con Markdown
|
|
23
23
|
</UTStatus>
|
|
24
24
|
```
|
|
@@ -8,29 +8,29 @@ import { mergeMultipleStyles } from '../../utils/styleUtils';
|
|
|
8
8
|
import { useTheme } from '../../theming';
|
|
9
9
|
|
|
10
10
|
import { defaultIconMapper, ownStyles, getVariantStyles } from './theme';
|
|
11
|
-
import {
|
|
11
|
+
import { VARIANTS } from './constants';
|
|
12
12
|
|
|
13
13
|
const UTStatus = ({
|
|
14
14
|
children,
|
|
15
15
|
Icon,
|
|
16
16
|
labelProps = {},
|
|
17
|
+
shade = '01',
|
|
17
18
|
style,
|
|
18
|
-
type = TYPES.dark,
|
|
19
19
|
variant = VARIANTS.success,
|
|
20
20
|
withoutIcon
|
|
21
21
|
}) => {
|
|
22
22
|
const theme = useTheme();
|
|
23
23
|
const themedStyles = mergeMultipleStyles(
|
|
24
24
|
ownStyles,
|
|
25
|
-
getVariantStyles(theme)({ variant,
|
|
25
|
+
getVariantStyles(theme)({ variant, shade }),
|
|
26
26
|
theme?.UTStatus,
|
|
27
27
|
style
|
|
28
28
|
);
|
|
29
29
|
const StatusIcon = Icon ?? defaultIconMapper(variant);
|
|
30
30
|
return (
|
|
31
31
|
<View style={themedStyles.container}>
|
|
32
|
-
{withoutIcon ? null : <UTIcon colorTheme={
|
|
33
|
-
<UTLabel colorTheme={
|
|
32
|
+
{withoutIcon ? null : <UTIcon colorTheme={variant} name={StatusIcon} />}
|
|
33
|
+
<UTLabel colorTheme={variant} {...labelProps}>
|
|
34
34
|
{children}
|
|
35
35
|
</UTLabel>
|
|
36
36
|
</View>
|
|
@@ -40,7 +40,7 @@ const UTStatus = ({
|
|
|
40
40
|
UTStatus.propTypes = {
|
|
41
41
|
Icon: string,
|
|
42
42
|
labelProps: object,
|
|
43
|
-
|
|
43
|
+
shade: string,
|
|
44
44
|
variant: string,
|
|
45
45
|
withoutIcon: bool
|
|
46
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VARIANTS } from './constants';
|
|
2
2
|
|
|
3
3
|
export const defaultIconMapper = variant =>
|
|
4
4
|
({
|
|
@@ -23,8 +23,8 @@ export const ownStyles = {
|
|
|
23
23
|
|
|
24
24
|
export const getVariantStyles =
|
|
25
25
|
theme =>
|
|
26
|
-
({ variant,
|
|
26
|
+
({ variant, shade }) => ({
|
|
27
27
|
container: {
|
|
28
|
-
backgroundColor: theme.Palette[variant]?.[
|
|
28
|
+
backgroundColor: theme.Palette[variant]?.[shade]
|
|
29
29
|
}
|
|
30
30
|
});
|
|
@@ -11,6 +11,7 @@ const UTTooltip = ({
|
|
|
11
11
|
onClose,
|
|
12
12
|
children,
|
|
13
13
|
dataTestId,
|
|
14
|
+
forceVisible = false,
|
|
14
15
|
onOpen,
|
|
15
16
|
offset = 5,
|
|
16
17
|
disabled,
|
|
@@ -103,7 +104,7 @@ const UTTooltip = ({
|
|
|
103
104
|
<View ref={anchorRef} onLayout={handleAnchorLayout}>
|
|
104
105
|
{children}
|
|
105
106
|
</View>
|
|
106
|
-
<Modal animationType="fade" transparent visible={isOpen}>
|
|
107
|
+
<Modal animationType="fade" transparent visible={forceVisible || isOpen}>
|
|
107
108
|
<TouchableOpacity onPress={closeTooltip} style={styles.overlayTouchable}>
|
|
108
109
|
<View style={styles.overlay} />
|
|
109
110
|
</TouchableOpacity>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useReducer, useEffect } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import PropTypes, { string, number, objectOf, arrayOf, shape } from 'prop-types';
|
|
3
|
+
import PropTypes, { string, number, objectOf, arrayOf, shape, func } from 'prop-types';
|
|
4
4
|
|
|
5
5
|
import UTLabel from '../UTLabel';
|
|
6
6
|
import UTButton from '../UTButton';
|
|
@@ -12,6 +12,7 @@ import { ACTIONS, COLOR_THEMES } from './constants';
|
|
|
12
12
|
import stylesheet from './styles';
|
|
13
13
|
|
|
14
14
|
const UTWizard = ({
|
|
15
|
+
onCloseCallback,
|
|
15
16
|
images,
|
|
16
17
|
steps,
|
|
17
18
|
variant,
|
|
@@ -22,7 +23,10 @@ const UTWizard = ({
|
|
|
22
23
|
const hasSteps = steps.length > 1;
|
|
23
24
|
const [isOpen, setIsOpen] = useState(true);
|
|
24
25
|
const [isClosed, setIsClosed] = useState(false);
|
|
25
|
-
|
|
26
|
+
const handleClose = () => {
|
|
27
|
+
setIsClosed(true);
|
|
28
|
+
if (onCloseCallback) onCloseCallback();
|
|
29
|
+
};
|
|
26
30
|
const [currentSubstep, updateSubstep] = useReducer((state, action) => {
|
|
27
31
|
switch (action) {
|
|
28
32
|
case ACTIONS.RESET:
|
|
@@ -60,7 +64,7 @@ const UTWizard = ({
|
|
|
60
64
|
<UTButton
|
|
61
65
|
colorTheme={getButtonTheme(variant)}
|
|
62
66
|
Icon="IconX"
|
|
63
|
-
onPress={
|
|
67
|
+
onPress={handleClose}
|
|
64
68
|
size="small"
|
|
65
69
|
variant="text"
|
|
66
70
|
/>
|
|
@@ -120,6 +124,7 @@ const UTWizard = ({
|
|
|
120
124
|
};
|
|
121
125
|
|
|
122
126
|
UTWizard.propTypes = {
|
|
127
|
+
onCloseCallback: func,
|
|
123
128
|
images: objectOf(number),
|
|
124
129
|
steps: arrayOf(
|
|
125
130
|
shape({
|
package/package.json
CHANGED