@widergy/mobile-ui 1.32.2 → 1.32.4
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/theme.js +1 -1
- package/lib/components/UTCheckBox/README.md +1 -1
- package/lib/components/UTCheckBox/constants.js +1 -1
- package/lib/components/UTCheckBox/proptypes.js +1 -1
- package/lib/components/UTCheckBox/theme.js +2 -2
- package/lib/components/UTCheckList/README.MD +1 -1
- package/lib/components/UTCheckList/constants.js +1 -1
- package/lib/components/UTCheckList/proptypes.js +2 -2
- package/lib/components/UTCheckList/styles.js +3 -3
- package/lib/components/UTModal/index.js +17 -16
- package/lib/components/UTModal/styles.js +9 -5
- package/lib/components/UTSearchField/index.js +6 -2
- package/lib/components/UTSearchField/theme.js +3 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [1.32.4](https://github.com/widergy/mobile-ui/compare/v1.32.3...v1.32.4) (2024-12-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add theme in UTSearch, change value L to M ([#385](https://github.com/widergy/mobile-ui/issues/385)) ([fa0e514](https://github.com/widergy/mobile-ui/commit/fa0e51448147caaab3b92de669bf04a581292692))
|
|
7
|
+
|
|
8
|
+
## [1.32.3](https://github.com/widergy/mobile-ui/compare/v1.32.2...v1.32.3) (2024-11-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* [UGENSA-801] align title ([#393](https://github.com/widergy/mobile-ui/issues/393)) ([6117550](https://github.com/widergy/mobile-ui/commit/61175507ef1a7e9af89b058e4385ca62d65ee0cc))
|
|
14
|
+
|
|
1
15
|
## [1.32.2](https://github.com/widergy/mobile-ui/compare/v1.32.1...v1.32.2) (2024-11-15)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -162,7 +162,7 @@ export const retrieveStyle = ({
|
|
|
162
162
|
...style.input
|
|
163
163
|
},
|
|
164
164
|
cursorColor: baseTheme.input.cursorColor,
|
|
165
|
-
placeholderTextColor: baseTheme.input.placeholderTextColor,
|
|
165
|
+
placeholderTextColor: style.input?.placeholderTextColor || baseTheme.input.placeholderTextColor,
|
|
166
166
|
selectionColor: baseTheme.input.selectionColor
|
|
167
167
|
};
|
|
168
168
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
| onPress | func | | Function to call when the checkbox is pressed. |
|
|
16
16
|
| required | bool | false | Indicates if the checkbox is required. |
|
|
17
17
|
| reversed | bool | false | If true, reverses the order of title and checkbox. |
|
|
18
|
-
| spacing | string |
|
|
18
|
+
| spacing | string | medium | If "small", reduces the column gap from 16 to 8. |
|
|
19
19
|
| style | shape | {} | Custom styles to apply to the checkbox container. Can contain root or title |
|
|
20
20
|
| title | string | | Title to display next to the checkbox. |
|
|
21
21
|
| variant | string | | The variant to use for styling the checkbox. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BUTTON_VARIANT, SPACING } from './constants';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const MEDIUM_SPACING = 16;
|
|
4
4
|
const SMALL_SPACING = 8;
|
|
5
5
|
|
|
6
6
|
const baseCheckBoxTheme = theme => ({
|
|
@@ -35,7 +35,7 @@ const conditionalStyles = ({
|
|
|
35
35
|
pressed,
|
|
36
36
|
theme
|
|
37
37
|
}) => {
|
|
38
|
-
const spacingValue = spacing === SPACING.SMALL ? SMALL_SPACING :
|
|
38
|
+
const spacingValue = spacing === SPACING.SMALL ? SMALL_SPACING : MEDIUM_SPACING;
|
|
39
39
|
|
|
40
40
|
const pressable =
|
|
41
41
|
variant === BUTTON_VARIANT
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
| style | shape | {} | Custom styles to apply to the checklist. Can contain `root`, `header`, `checkboxesContainer`, `item`, and `selectAll`. |
|
|
21
21
|
| value | arrayOf(string) | [] | Array of selected values. |
|
|
22
22
|
| variant | string | | Variant style for the checklist. |
|
|
23
|
-
| verticalSpacing | string |
|
|
23
|
+
| verticalSpacing | string | medium | Spacing between the checkbox items vertically. |
|
|
24
24
|
|
|
25
25
|
### Option Object
|
|
26
26
|
|
|
@@ -3,13 +3,13 @@ import { arrayOf, bool, func, object, shape, string } from 'prop-types';
|
|
|
3
3
|
import { SPACING } from './constants';
|
|
4
4
|
|
|
5
5
|
export const defaultProps = {
|
|
6
|
-
horizontalSpacing: SPACING.
|
|
6
|
+
horizontalSpacing: SPACING.MEDIUM,
|
|
7
7
|
isSimple: false,
|
|
8
8
|
onChange: () => {},
|
|
9
9
|
showSelectAll: true,
|
|
10
10
|
style: {},
|
|
11
11
|
value: null,
|
|
12
|
-
verticalSpacing: SPACING.
|
|
12
|
+
verticalSpacing: SPACING.MEDIUM
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
export const propTypes = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
3
|
const SPACING = {
|
|
4
|
-
|
|
4
|
+
MEDIUM: 16,
|
|
5
5
|
SMALL: 8
|
|
6
6
|
};
|
|
7
7
|
|
|
@@ -11,11 +11,11 @@ export default StyleSheet.create({
|
|
|
11
11
|
},
|
|
12
12
|
checkboxesContainer: {
|
|
13
13
|
alignSelf: 'flex-start',
|
|
14
|
-
rowGap: SPACING.
|
|
14
|
+
rowGap: SPACING.MEDIUM,
|
|
15
15
|
width: '100%'
|
|
16
16
|
},
|
|
17
17
|
container: {
|
|
18
|
-
rowGap: SPACING.
|
|
18
|
+
rowGap: SPACING.MEDIUM
|
|
19
19
|
},
|
|
20
20
|
headerContainer: {
|
|
21
21
|
rowGap: 8
|
|
@@ -78,23 +78,24 @@ const UTModal = ({
|
|
|
78
78
|
</View>
|
|
79
79
|
)}
|
|
80
80
|
<View style={styles.content}>
|
|
81
|
-
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
81
|
+
<View style={[styles.headerContainer, !!title && styles.closeButtonContainer]}>
|
|
82
|
+
{!!title && (
|
|
83
|
+
<UTLabel variant="title3" weight="medium">
|
|
84
|
+
{title}
|
|
85
|
+
</UTLabel>
|
|
86
|
+
)}
|
|
87
|
+
{!backgroundImg && !imageComponent && !hideCloseButton && (
|
|
88
|
+
<UTButton
|
|
89
|
+
colorTheme={closeButtonColorTheme}
|
|
90
|
+
Icon="IconX"
|
|
91
|
+
onPress={onRequestClose}
|
|
92
|
+
style={{ root: styles.closeButton }}
|
|
93
|
+
variant="text"
|
|
94
|
+
/>
|
|
95
|
+
)}
|
|
96
|
+
</View>
|
|
96
97
|
{!!subtitle && (
|
|
97
|
-
<UTLabel colorTheme="gray" {...subtitleProps}
|
|
98
|
+
<UTLabel colorTheme="gray" {...subtitleProps}>
|
|
98
99
|
{subtitle}
|
|
99
100
|
</UTLabel>
|
|
100
101
|
)}
|
|
@@ -34,15 +34,19 @@ export default StyleSheet.create({
|
|
|
34
34
|
height: WINDOW_HEIGHT * 0.3,
|
|
35
35
|
justifyContent: 'center'
|
|
36
36
|
},
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
headerContainer: {
|
|
38
|
+
alignItems: 'center',
|
|
39
|
+
display: 'flex',
|
|
40
|
+
flexDirection: 'row',
|
|
41
|
+
justifyContent: 'flex-end'
|
|
39
42
|
},
|
|
40
|
-
|
|
41
|
-
|
|
43
|
+
closeButtonContainer: {
|
|
44
|
+
justifyContent: 'space-between'
|
|
42
45
|
},
|
|
43
46
|
content: {
|
|
44
47
|
padding: 16,
|
|
45
|
-
paddingBottom: 5
|
|
48
|
+
paddingBottom: 5,
|
|
49
|
+
gap: 12
|
|
46
50
|
},
|
|
47
51
|
closeButton: {
|
|
48
52
|
alignSelf: 'flex-end'
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import { COMPONENT_KEYS } from '../UTBaseInputField/constants';
|
|
4
4
|
import UTBaseInputField from '../UTBaseInputField';
|
|
5
|
+
import { useTheme } from '../../theming';
|
|
5
6
|
|
|
6
7
|
import { defaultProps, propTypes } from './proptypes';
|
|
8
|
+
import { retrieveStyle } from './theme';
|
|
7
9
|
|
|
8
10
|
const UTSearchField = ({
|
|
9
11
|
disabled,
|
|
@@ -20,6 +22,8 @@ const UTSearchField = ({
|
|
|
20
22
|
value,
|
|
21
23
|
variant
|
|
22
24
|
}) => {
|
|
25
|
+
const theme = useTheme();
|
|
26
|
+
const { input } = useMemo(() => retrieveStyle({ theme }), [theme]);
|
|
23
27
|
const clearText = () => {
|
|
24
28
|
onChange('');
|
|
25
29
|
};
|
|
@@ -46,7 +50,7 @@ const UTSearchField = ({
|
|
|
46
50
|
ref={inputRef}
|
|
47
51
|
returnKeyType={returnKeyType}
|
|
48
52
|
rightAdornments={rightAdornments}
|
|
49
|
-
style={{ container: style }}
|
|
53
|
+
style={{ container: style, input }}
|
|
50
54
|
type={type}
|
|
51
55
|
value={value}
|
|
52
56
|
variant={variant}
|
package/package.json
CHANGED