@proulr/sdui-components 0.1.71 → 0.1.73

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proulr/sdui-components",
3
- "version": "0.1.71",
3
+ "version": "0.1.73",
4
4
  "type": "module",
5
5
  "main": "./src/renderer/index.ts",
6
6
  "types": "./src/renderer/index.ts",
@@ -18,11 +18,12 @@ export function TextField(
18
18
  inputRef?: React.Ref<TextInput>;
19
19
  },
20
20
  ) {
21
- const { containerStyle, focused, inputRef, ...rest } = props;
21
+ const { containerStyle, focused, inputRef, style, multiline, ...rest } = props;
22
22
  return (
23
23
  <View
24
24
  style={[
25
25
  styles.field,
26
+ multiline && styles.fieldMultiline,
26
27
  focused && { borderColor: m3Colors.primary, borderWidth: 2 },
27
28
  containerStyle,
28
29
  ]}
@@ -30,7 +31,9 @@ export function TextField(
30
31
  <TextInput
31
32
  ref={inputRef}
32
33
  placeholderTextColor={m3Colors.onSurfaceVariant}
33
- style={styles.fieldInput}
34
+ multiline={multiline}
35
+ textAlignVertical={multiline ? 'top' : 'center'}
36
+ style={[styles.fieldInput, multiline && styles.fieldInputMultiline, style]}
34
37
  {...rest}
35
38
  />
36
39
  </View>
@@ -82,7 +85,18 @@ const styles = StyleSheet.create({
82
85
  paddingHorizontal: spacing.sm,
83
86
  justifyContent: 'center',
84
87
  },
88
+ fieldMultiline: {
89
+ minHeight: 128,
90
+ justifyContent: 'flex-start',
91
+ paddingVertical: spacing.md,
92
+ },
85
93
  fieldInput: { color: m3Colors.onSurface, fontSize: 16, fontFamily: fonts.regular },
94
+ fieldInputMultiline: {
95
+ fontSize: 18,
96
+ lineHeight: 26,
97
+ minHeight: 96,
98
+ width: '100%',
99
+ },
86
100
  passwordField: { flexDirection: 'row', alignItems: 'center', paddingRight: spacing.sm },
87
101
  passwordInput: { flex: 1 },
88
102
  passwordToggle: {