@widergy/mobile-ui 1.36.5 → 1.36.6

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,10 @@
1
+ ## [1.36.6](https://github.com/widergy/mobile-ui/compare/v1.36.5...v1.36.6) (2025-03-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * [UGENSA-1022] visual errors radio buttons ([#414](https://github.com/widergy/mobile-ui/issues/414)) ([5b81686](https://github.com/widergy/mobile-ui/commit/5b81686a83685a5aa817eb7e312a319c7ebac43e))
7
+
1
8
  ## [1.36.5](https://github.com/widergy/mobile-ui/compare/v1.36.4...v1.36.5) (2025-02-25)
2
9
 
3
10
 
@@ -28,6 +28,7 @@ class RadioButton extends Component {
28
28
  sublabel,
29
29
  theme,
30
30
  labelComponent,
31
+ labelContainerStyles = { title: {}, subtitle: {} },
31
32
  descriptionComponent,
32
33
  showSeparatorBar,
33
34
  disabled
@@ -52,17 +53,27 @@ class RadioButton extends Component {
52
53
  name={status ? RADIO_CHECKED_ICON : RADIO_UNCHECKED_ICON}
53
54
  color={status ? theme.colors.primary : theme.colors.disabled}
54
55
  style={styles.iconSpacing}
56
+ size={20}
55
57
  />
56
58
  <View style={styles.labelsContainer}>
57
59
  <View>
58
60
  <View style={[styles.label, labelComponent && styles.labelComponent]}>
59
- <UTLabel variant="xsmall" weight={status ? 'bold' : 'regular'}>
61
+ <UTLabel
62
+ variant="xsmall"
63
+ weight={status ? 'bold' : 'regular'}
64
+ {...labelContainerStyles.title}
65
+ >
60
66
  {label}
61
67
  </UTLabel>
62
68
  {labelComponent}
63
69
  </View>
64
70
  {(sublabel || sublabel === 0) && (
65
- <UTLabel colorTheme="gray" variant="xsmall" weight={status ? 'bold' : 'regular'}>
71
+ <UTLabel
72
+ colorTheme="gray"
73
+ variant="xsmall"
74
+ weight={status ? 'bold' : 'regular'}
75
+ {...labelContainerStyles.subtitle}
76
+ >
66
77
  {sublabel}
67
78
  </UTLabel>
68
79
  )}
@@ -100,6 +111,10 @@ RadioButton.propTypes = {
100
111
  }),
101
112
  theme: themeType,
102
113
  labelComponent: PropTypes.node,
114
+ labelContainerStyles: PropTypes.shape({
115
+ title: PropTypes.object,
116
+ subtitle: PropTypes.object
117
+ }),
103
118
  descriptionComponent: PropTypes.node,
104
119
  showSeparatorBar: PropTypes.bool,
105
120
  disabled: PropTypes.bool
@@ -1,6 +1,6 @@
1
1
  import { StyleSheet } from 'react-native';
2
2
 
3
- import { verticalScale, moderateHorizontalScale } from '../../../../utils/scaleUtils';
3
+ import { verticalScale } from '../../../../utils/scaleUtils';
4
4
 
5
5
  export default StyleSheet.create({
6
6
  container: {
@@ -10,12 +10,13 @@ export default StyleSheet.create({
10
10
  width: '95%'
11
11
  },
12
12
  iconSpacing: {
13
- marginRight: moderateHorizontalScale(10)
13
+ margin: 6
14
14
  },
15
15
  labelsContainer: {
16
16
  flex: 1,
17
17
  flexDirection: 'row',
18
- justifyContent: 'space-between'
18
+ justifyContent: 'space-between',
19
+ marginLeft: 16
19
20
  },
20
21
  label: {
21
22
  flexDirection: 'row',
@@ -40,9 +40,11 @@ class RadioGroup extends Component {
40
40
  return (
41
41
  <View style={styles.container}>
42
42
  {title && (
43
- <UTLabel variant="medium" {...titleProps}>
44
- {title}
45
- </UTLabel>
43
+ <View style={styles.titleContainer}>
44
+ <UTLabel variant="medium" {...titleProps}>
45
+ {title}
46
+ </UTLabel>
47
+ </View>
46
48
  )}
47
49
  {options.map(this.renderOptions)}
48
50
  <UTLabel colorTheme="error" shade="05" variant="body">
@@ -68,11 +70,15 @@ RadioGroup.propTypes = {
68
70
  selectedOption: PropTypes.string,
69
71
  radioProps: PropTypes.shape({
70
72
  label: PropTypes.string,
71
- sublabel: PropTypes.string,
73
+ labelContainerStyles: PropTypes.shape({
74
+ title: PropTypes.object,
75
+ subtitle: PropTypes.object
76
+ }),
77
+ leftButton: PropTypes.bool,
72
78
  onPress: PropTypes.func,
73
79
  status: PropTypes.bool,
74
80
  style: ViewPropTypes.style,
75
- leftButton: PropTypes.bool
81
+ sublabel: PropTypes.string
76
82
  }),
77
83
  titleProps: PropTypes.instanceOf(Object),
78
84
  keyField: PropTypes.string,
@@ -6,6 +6,9 @@ export default StyleSheet.create({
6
6
  container: {
7
7
  margin: moderateVerticalScale(10)
8
8
  },
9
+ titleContainer: {
10
+ marginBottom: moderateVerticalScale(12)
11
+ },
9
12
  radio: {
10
13
  marginLeft: moderateVerticalScale(15)
11
14
  }
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.36.5",
5
+ "version": "1.36.6",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [