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.
- package/CHANGELOG.md +4 -0
- package/lib/commonjs/components/TextInput/TextInput.js +20 -12
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/TextInput/TextInput.js +20 -12
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/src/icons/registry.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/TextInput/TextInput.tsx +20 -12
- package/src/icons/registry.ts +1 -1
|
@@ -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-
|
|
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
|
@@ -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
|
-
|
|
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
|
-
// ⚠️
|
|
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
|
|
186
|
-
//
|
|
187
|
-
// ABOVE the glyphs
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
//
|
|
191
|
-
//
|
|
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,
|
package/src/icons/registry.ts
CHANGED