jfs-components 0.1.57 → 0.1.58

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.
@@ -4,7 +4,7 @@
4
4
  * Auto-generated from SVG files in src/icons/
5
5
  * DO NOT EDIT MANUALLY - Run "npm run icons:generate" to regenerate
6
6
  *
7
- * Generated: 2026-07-27T20:45:13.986Z
7
+ * Generated: 2026-07-27T21:47:09.131Z
8
8
  */
9
9
  export declare const iconRegistry: Record<string, {
10
10
  path: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jfs-components",
3
- "version": "0.1.57",
3
+ "version": "0.1.58",
4
4
  "description": "React Native Jio Finance Components Library",
5
5
  "author": "sunshuaiqi@gmail.com",
6
6
  "license": "MIT",
@@ -162,6 +162,14 @@ const TextInputBase = forwardRef<RNTextInput, TextInputProps>(function TextInput
162
162
  // Convert radius to React Native format (if 99999, use a large value for fully rounded)
163
163
  const borderRadius = radius === 99999 ? 99999 : radius
164
164
 
165
+ // Row height from tokens: vertical padding above/below the text line.
166
+ // Applied as container `minHeight` (FormField pattern) — NOT as TextInput
167
+ // `lineHeight` / `minHeight`, which breaks iOS vertical centering.
168
+ const padV = typeof paddingVertical === 'number' ? paddingVertical : 0
169
+ const textLine = typeof lineHeight === 'number' ? lineHeight : 0
170
+ const iconH = typeof iconSize === 'number' ? iconSize : 0
171
+ const rowMinHeight = padV * 2 + Math.max(textLine, iconH)
172
+
165
173
  const containerStyle: ViewStyle = {
166
174
  flexDirection: 'row',
167
175
  alignItems: 'center',
@@ -171,25 +179,25 @@ const TextInputBase = forwardRef<RNTextInput, TextInputProps>(function TextInput
171
179
  borderStyle: 'solid' as const,
172
180
  borderRadius,
173
181
  paddingHorizontal,
174
- paddingVertical,
182
+ // Same as FormField / SuggestiveSearch: the ROW owns height via minHeight;
183
+ // paddingVertical on the row would fight that and let the field stretch.
184
+ paddingVertical: 0,
185
+ minHeight: rowMinHeight > 0 ? rowMinHeight : undefined,
175
186
  gap: 8,
176
187
  }
177
188
 
178
189
  const hoverStyle: ViewStyle = isHovered ? { opacity: 0.95 } : {}
179
190
  const focusContainerStyle: ViewStyle = isFocused ? { borderColor: '#222', borderWidth: 1 } : {}
180
191
 
181
- // ⚠️ DO NOT change to an unconditional `lineHeight`, and do NOT put
182
- // `minHeight: lineHeight` on this single-line input on iOS. Same contract as
183
- // FormField / SuggestiveSearch — read before "simplifying".
192
+ // ⚠️ Same contract as FormField / SuggestiveSearch do not "simplify".
184
193
  //
185
- // facebook/react-native#39145 / #28012: on iOS, a single-line RN TextInput
186
- // (UITextField) with `lineHeight` > font metrics puts ALL the extra space
187
- // ABOVE the glyphs, so placeholder/value sink. Android/Web distribute evenly.
188
- // RN's documented workaround (#39145) and #56774: omit `lineHeight` on
189
- // single-line iOS inputs UITextField centers natively — and let the
190
- // wrapper (`alignItems: 'center'` + padding/icon) own vertical layout.
191
- // Pinning `lineHeight` to `fontSize` is NOT a substitute; it clips custom
192
- // font metrics and floats typed text above center.
194
+ // facebook/react-native#39145 / #28012 / #56774:
195
+ // Single-line iOS UITextField + `lineHeight` (or a tall field box) puts ALL
196
+ // extra space ABOVE the glyphs placeholder/value sink. Documented fix:
197
+ // omit `lineHeight` on the single-line input; let the wrapper
198
+ // (`alignItems: 'center'` + `minHeight`) center it. UITextField centers
199
+ // natively when it is only as tall as its font. Do NOT pin lineHeight to
200
+ // fontSize (clips custom fonts / floats typed text).
193
201
  const textInputStyle: TextStyle = {
194
202
  flex: 1,
195
203
  color: textColor,
@@ -4,7 +4,7 @@
4
4
  * Auto-generated from SVG files in src/icons/
5
5
  * DO NOT EDIT MANUALLY - Run "npm run icons:generate" to regenerate
6
6
  *
7
- * Generated: 2026-07-27T20:45:13.986Z
7
+ * Generated: 2026-07-27T21:47:09.131Z
8
8
  */
9
9
 
10
10
  // Icon name to SVG data mapping