@widergy/mobile-ui 1.26.3 → 1.26.5

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.26.5](https://github.com/widergy/mobile-ui/compare/v1.26.4...v1.26.5) (2024-10-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * visual fixes ([#367](https://github.com/widergy/mobile-ui/issues/367)) ([b916b9b](https://github.com/widergy/mobile-ui/commit/b916b9b641c2fbff90b8b5ab2efb8b6b8ae447b6))
7
+
8
+ ## [1.26.4](https://github.com/widergy/mobile-ui/compare/v1.26.3...v1.26.4) (2024-10-01)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * utselect options update ([#362](https://github.com/widergy/mobile-ui/issues/362)) ([e6ccae1](https://github.com/widergy/mobile-ui/commit/e6ccae11b2e78183d426ef42af09bf2636a83fc0))
14
+
1
15
  ## [1.26.3](https://github.com/widergy/mobile-ui/compare/v1.26.2...v1.26.3) (2024-09-30)
2
16
 
3
17
 
@@ -58,7 +58,7 @@ class RadioButton extends Component {
58
58
  <View style={[styles.label, labelComponent && styles.labelComponent]}>
59
59
  <UTLabel
60
60
  colorTheme={status ? 'accent' : 'dark'}
61
- variant="small"
61
+ variant="body"
62
62
  weight={status ? 'bold' : 'regular'}
63
63
  >
64
64
  {label}
@@ -3,7 +3,7 @@ import { ViewPropTypes } from 'deprecated-react-native-prop-types';
3
3
  import { View } from 'react-native';
4
4
  import PropTypes from 'prop-types';
5
5
 
6
- import Label from '../Label';
6
+ import UTLabel from '../UTLabel';
7
7
 
8
8
  import RadioButton from './components/RadioButton';
9
9
  import { DEFAULT_KEY_FIELD } from './constants';
@@ -40,14 +40,14 @@ class RadioGroup extends Component {
40
40
  return (
41
41
  <View style={styles.container}>
42
42
  {title && (
43
- <Label medium primary {...titleProps}>
43
+ <UTLabel variant="body" {...titleProps}>
44
44
  {title}
45
- </Label>
45
+ </UTLabel>
46
46
  )}
47
47
  {options.map(this.renderOptions)}
48
- <Label error small>
48
+ <UTLabel colorTheme="error" shade="05" variant="body">
49
49
  {error}
50
- </Label>
50
+ </UTLabel>
51
51
  </View>
52
52
  );
53
53
  }
@@ -1,9 +1,9 @@
1
1
  export const VARIANTS_SIZES = {
2
- title1: 30,
3
- title2: 24,
4
- title3: 22,
5
- subtitle1: 18,
6
- subtitle2: 16,
2
+ title1: 24,
3
+ title2: 22,
4
+ title3: 18,
5
+ subtitle1: 16,
6
+ subtitle2: 14,
7
7
  body: 16,
8
8
  small: 14,
9
9
  xsmall: 11,
@@ -38,6 +38,8 @@ const UTSelect = ({
38
38
  suffix,
39
39
  title,
40
40
  value,
41
+ onChangeSearchTerm,
42
+ disableFilterOptions,
41
43
  withAutoReset
42
44
  }) => {
43
45
  const [bottomSheetVisible, setBottomSheetVisible] = useState(false);
@@ -47,6 +49,15 @@ const UTSelect = ({
47
49
 
48
50
  const validationData = useMemo(() => error && formatErrorToValidation(error), [error]);
49
51
 
52
+ const handleOnChangeSearchTerm = newSearchTerm => {
53
+ onChangeSearchTerm?.(newSearchTerm);
54
+ setSearchTerm(newSearchTerm);
55
+ };
56
+
57
+ useEffect(() => {
58
+ setSortedOptions(options);
59
+ }, [options]);
60
+
50
61
  const sortOptions = useCallback(() => {
51
62
  const selectedOptionsList = [];
52
63
  const unselectedOptionsList = [];
@@ -99,8 +110,11 @@ const UTSelect = ({
99
110
  }, [value, options, multiple]);
100
111
 
101
112
  const filteredOptions = useMemo(
102
- () => sortedOptions.filter(option => option.label.toLowerCase().includes(searchTerm.toLowerCase())),
103
- [sortedOptions, searchTerm]
113
+ () =>
114
+ disableFilterOptions
115
+ ? sortedOptions
116
+ : sortedOptions.filter(option => option.label.toLowerCase().includes(searchTerm.toLowerCase())),
117
+ [sortedOptions, searchTerm, disableFilterOptions]
104
118
  );
105
119
 
106
120
  const clearAction = {
@@ -165,7 +179,7 @@ const UTSelect = ({
165
179
  >
166
180
  <View style={styles.bottomSheetBodyContainer}>
167
181
  <UTSearchField
168
- onChange={setSearchTerm}
182
+ onChange={handleOnChangeSearchTerm}
169
183
  placeholder={searchPlaceholder}
170
184
  value={searchTerm}
171
185
  variant="gray"
@@ -38,7 +38,7 @@ const UTWorkflowContainer = ({
38
38
  const Title = React.isValidElement(title) ? (
39
39
  title
40
40
  ) : (
41
- <Label big bold {...titleProps} style={themedStyles.title}>
41
+ <Label big {...titleProps} style={themedStyles.title}>
42
42
  {title}
43
43
  </Label>
44
44
  );
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@widergy/mobile-ui",
3
3
  "description": "Widergy Mobile Components",
4
4
  "author": "widergy",
5
- "version": "1.26.3",
5
+ "version": "1.26.5",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [