@widergy/mobile-ui 1.28.0 → 1.28.2

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.28.2](https://github.com/widergy/mobile-ui/compare/v1.28.1...v1.28.2) (2024-10-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * colors in radio button selected and others ([#370](https://github.com/widergy/mobile-ui/issues/370)) ([1cc52c0](https://github.com/widergy/mobile-ui/commit/1cc52c02641cae9c8fb7a04c33072ed0c865c58b))
7
+
8
+ ## [1.28.1](https://github.com/widergy/mobile-ui/compare/v1.28.0...v1.28.1) (2024-10-15)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * [UGC-934] text area fix ([#368](https://github.com/widergy/mobile-ui/issues/368)) ([32bcffc](https://github.com/widergy/mobile-ui/commit/32bcffc0e4b91e5c049fc548f3596bc7599a90ce))
14
+
1
15
  # [1.28.0](https://github.com/widergy/mobile-ui/compare/v1.27.1...v1.28.0) (2024-10-15)
2
16
 
3
17
 
@@ -94,7 +94,11 @@ class Loading extends Component {
94
94
  <Animated.View style={getAnimatedContainerStyle(size, fade)}>
95
95
  {layers.map(this.renderLayers)}
96
96
  </Animated.View>
97
- {!!message && <UTLabel style={[getMessageStyle(size), messageStyle]}>{message}</UTLabel>}
97
+ {!!message && (
98
+ <UTLabel variant="small" style={[getMessageStyle(size), messageStyle]}>
99
+ {message}
100
+ </UTLabel>
101
+ )}
98
102
  </View>
99
103
  );
100
104
  }
@@ -56,11 +56,7 @@ class RadioButton extends Component {
56
56
  <View style={styles.labelsContainer}>
57
57
  <View>
58
58
  <View style={[styles.label, labelComponent && styles.labelComponent]}>
59
- <UTLabel
60
- colorTheme={status ? 'accent' : 'dark'}
61
- variant="body"
62
- weight={status ? 'bold' : 'regular'}
63
- >
59
+ <UTLabel variant="xsmall" weight={status ? 'bold' : 'regular'}>
64
60
  {label}
65
61
  </UTLabel>
66
62
  {labelComponent}
@@ -40,7 +40,7 @@ class RadioGroup extends Component {
40
40
  return (
41
41
  <View style={styles.container}>
42
42
  {title && (
43
- <UTLabel variant="body" {...titleProps}>
43
+ <UTLabel variant="medium" {...titleProps}>
44
44
  {title}
45
45
  </UTLabel>
46
46
  )}
@@ -17,7 +17,7 @@ import UTLabel from '../UTLabel';
17
17
  import { COMPONENTS_MAPPER, DEBOUNCE_CONFIG, DEBOUNCE_DELAY } from './constants';
18
18
  import { defaultProps, propTypes } from './proptypes';
19
19
  import { getPropsByType } from './utils';
20
- import { LINE_HEIGHT, retrieveStyle } from './theme';
20
+ import { CONTAINER, LINE_HEIGHT, retrieveStyle } from './theme';
21
21
 
22
22
  const UTBaseInputField = forwardRef(
23
23
  (
@@ -170,7 +170,8 @@ const UTBaseInputField = forwardRef(
170
170
  const minHeight =
171
171
  containerStyle.borderWidth * 2 +
172
172
  containerStyle.paddingVertical * 2 +
173
- (inputStyle.lineHeight || LINE_HEIGHT) * maxRows;
173
+ (inputStyle.lineHeight || LINE_HEIGHT) * maxRows +
174
+ (maxLength && showCharacterCount ? LINE_HEIGHT + CONTAINER.ROW_GAP : 0);
174
175
 
175
176
  return (
176
177
  <View style={[containerStyle, { minHeight }]}>
@@ -179,6 +180,7 @@ const UTBaseInputField = forwardRef(
179
180
  <TextInput
180
181
  autoCapitalize={autoCapitalize}
181
182
  autoCorrect={false}
183
+ cursorColor={inputStyle.cursorColor}
182
184
  defaultValue={value}
183
185
  editable={!disabled && !readOnly && editable}
184
186
  id={id ? `${id}` : undefined}
@@ -4,7 +4,7 @@ import { SIZES, VARIANT } from './constants';
4
4
 
5
5
  export const LINE_HEIGHT = 22;
6
6
 
7
- const CONTAINER = {
7
+ export const CONTAINER = {
8
8
  PADDING: {
9
9
  HORIZONTAL: 16,
10
10
  VERTICAL: 12
@@ -37,9 +37,10 @@ const COLORS = {
37
37
  READ_ONLY: 'transparent'
38
38
  },
39
39
  TEXT: {
40
+ CURSOR: theme => theme.Palette.accent['04'],
40
41
  INPUT: theme => theme.Palette.dark['05'],
41
42
  PLACEHOLDER: theme => theme.Palette.gray['02'],
42
- SELECTION: theme => theme.Palette.accent['04']
43
+ SELECTION: theme => theme.Palette.accent['02']
43
44
  }
44
45
  };
45
46
 
@@ -75,6 +76,7 @@ const baseTextInputTheme = theme => ({
75
76
  textAlignVertical: 'center',
76
77
  zIndex: 4
77
78
  },
79
+ cursorColor: COLORS.TEXT.CURSOR(theme),
78
80
  placeholderTextColor: COLORS.TEXT.PLACEHOLDER(theme),
79
81
  selectionColor: COLORS.TEXT.SELECTION(theme)
80
82
  },
@@ -117,8 +119,8 @@ const conditionalContainerStyle = (disabled, error, focused, inputSize, readOnly
117
119
  borderColor: COLORS.BORDER.READ_ONLY
118
120
  }),
119
121
  ...(inputSize === SIZES.SMALL && {
120
- paddingHorizontal: SMALL_INPUT_PADDING.HORIZONTAL,
121
- paddingVertical: SMALL_INPUT_PADDING.VERTICAL
122
+ paddingHorizontal: SMALL_INPUT_PADDING.HORIZONTAL - (focused ? 1 : 0),
123
+ paddingVertical: SMALL_INPUT_PADDING.VERTICAL - (focused ? 1 : 0)
122
124
  })
123
125
  });
124
126
 
@@ -155,6 +157,7 @@ export const retrieveStyle = ({
155
157
  ...conditionalInputStyle(maxRows, multiline),
156
158
  ...style.input
157
159
  },
160
+ cursorColor: baseTheme.input.cursorColor,
158
161
  placeholderTextColor: baseTheme.input.placeholderTextColor,
159
162
  selectionColor: baseTheme.input.selectionColor
160
163
  };
@@ -97,7 +97,7 @@ const BaseInput = forwardRef(
97
97
  ]}
98
98
  id={props?.id ? `${props.id}` : undefined}
99
99
  />
100
- {RightIcon && (
100
+ {(RightIcon || hiddenInput) && (
101
101
  <Touchable
102
102
  borderless
103
103
  onPress={hiddenInput ? toggleShowInput : onRightIconPress}
@@ -81,7 +81,7 @@ const OutlinedInput = ({
81
81
  : focused
82
82
  ? 2
83
83
  : disabled
84
- ? themeStyles?.inactive?.disabledBorderWidth ?? 1
84
+ ? (themeStyles?.inactive?.disabledBorderWidth ?? 1)
85
85
  : 1,
86
86
  borderColor: active ? activeColor : inactiveColor
87
87
  },
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.28.0",
5
+ "version": "1.28.2",
6
6
  "repository": "https://github.com/widergy/mobile-ui.git",
7
7
  "main": "lib/index.js",
8
8
  "files": [