@klyftig/mobile-ui 1.4.0 → 1.5.0

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": "@klyftig/mobile-ui",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "scripts": {
5
5
  "sync": "bash scripts/sync-to-kaelo.sh",
6
6
  "pack-install": "npm pack && mv klyftig-mobile-ui-*.tgz /tmp/klyftig-mobile-ui-local.tgz && cd ../kaelo/mobile && npm install /tmp/klyftig-mobile-ui-local.tgz"
@@ -1,6 +1,6 @@
1
1
  import React, { useState, useCallback, memo } from 'react';
2
2
  import { View, TextInput as RNTextInput, Text, TouchableOpacity, StyleSheet } from 'react-native';
3
- import type { NativeSyntheticEvent, TextInputContentSizeChangeEventData } from 'react-native';
3
+ import type { NativeSyntheticEvent, StyleProp, TextInputContentSizeChangeEventData, ViewStyle } from 'react-native';
4
4
  import { MaterialCommunityIcons as Icon } from '@expo/vector-icons';
5
5
  import { useTheme } from '../hooks/useTheme';
6
6
  import { colors } from '../theme/colors';
@@ -35,6 +35,10 @@ interface GlassInputProps {
35
35
  onFocus?: () => void;
36
36
  onBlur?: () => void;
37
37
  selectTextOnFocus?: boolean;
38
+ // Overrides the outer container (label + field). Its default `marginBottom: 16`
39
+ // suits stacked forms; screens with their own section rhythm pass
40
+ // `{ marginBottom: 0 }` so spacing is owned by the layout, not the input.
41
+ containerStyle?: StyleProp<ViewStyle>;
38
42
  }
39
43
 
40
44
  // When a single-line input is not focused, anchor the selection to the start so
@@ -73,6 +77,7 @@ const GlassInputComponent: React.FC<GlassInputProps> = ({
73
77
  multiline = false,
74
78
  numberOfLines,
75
79
  autoGrow = false,
80
+ containerStyle,
76
81
  }) => {
77
82
  const { colors } = useTheme();
78
83
  const [isSecure, setIsSecure] = useState(secureTextEntry);
@@ -106,7 +111,7 @@ const GlassInputComponent: React.FC<GlassInputProps> = ({
106
111
  }, []);
107
112
 
108
113
  return (
109
- <View style={styles.container}>
114
+ <View style={[styles.container, containerStyle]}>
110
115
  {label ? (
111
116
  <Text style={[styles.label, { color: colors.text.primary }]}>{label}</Text>
112
117
  ) : null}