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
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ All notable changes to this project are documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [0.1.58] - 2026-07-27
|
|
8
|
+
|
|
9
|
+
- `TextInput` / `InputSearch` — restore iOS single-line vertical centering (FormField pattern): row owns height via `minHeight` + `paddingVertical: 0`; omit `lineHeight` on the field on iOS so placeholder and typed text stay centered (RN #39145 / #56774).
|
|
10
|
+
|
|
7
11
|
## [0.1.57] - 2026-07-27
|
|
8
12
|
|
|
9
13
|
- `Carousel` — fix infinite-tall slides: equal-height no longer uses unbounded `alignItems:'stretch'` / `height:'100%'` in a horizontal ScrollView; it measures intrinsic slide heights then locks slots to the tallest.
|
|
@@ -149,6 +149,14 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
|
|
|
149
149
|
|
|
150
150
|
// Convert radius to React Native format (if 99999, use a large value for fully rounded)
|
|
151
151
|
const borderRadius = radius === 99999 ? 99999 : radius;
|
|
152
|
+
|
|
153
|
+
// Row height from tokens: vertical padding above/below the text line.
|
|
154
|
+
// Applied as container `minHeight` (FormField pattern) — NOT as TextInput
|
|
155
|
+
// `lineHeight` / `minHeight`, which breaks iOS vertical centering.
|
|
156
|
+
const padV = typeof paddingVertical === 'number' ? paddingVertical : 0;
|
|
157
|
+
const textLine = typeof lineHeight === 'number' ? lineHeight : 0;
|
|
158
|
+
const iconH = typeof iconSize === 'number' ? iconSize : 0;
|
|
159
|
+
const rowMinHeight = padV * 2 + Math.max(textLine, iconH);
|
|
152
160
|
const containerStyle = {
|
|
153
161
|
flexDirection: 'row',
|
|
154
162
|
alignItems: 'center',
|
|
@@ -158,7 +166,10 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
|
|
|
158
166
|
borderStyle: 'solid',
|
|
159
167
|
borderRadius,
|
|
160
168
|
paddingHorizontal,
|
|
161
|
-
|
|
169
|
+
// Same as FormField / SuggestiveSearch: the ROW owns height via minHeight;
|
|
170
|
+
// paddingVertical on the row would fight that and let the field stretch.
|
|
171
|
+
paddingVertical: 0,
|
|
172
|
+
minHeight: rowMinHeight > 0 ? rowMinHeight : undefined,
|
|
162
173
|
gap: 8
|
|
163
174
|
};
|
|
164
175
|
const hoverStyle = isHovered ? {
|
|
@@ -169,18 +180,15 @@ const TextInputBase = /*#__PURE__*/(0, _react.forwardRef)(function TextInput({
|
|
|
169
180
|
borderWidth: 1
|
|
170
181
|
} : {};
|
|
171
182
|
|
|
172
|
-
// ⚠️
|
|
173
|
-
// `minHeight: lineHeight` on this single-line input on iOS. Same contract as
|
|
174
|
-
// FormField / SuggestiveSearch — read before "simplifying".
|
|
183
|
+
// ⚠️ Same contract as FormField / SuggestiveSearch — do not "simplify".
|
|
175
184
|
//
|
|
176
|
-
// facebook/react-native#39145 / #28012
|
|
177
|
-
//
|
|
178
|
-
// ABOVE the glyphs
|
|
179
|
-
//
|
|
180
|
-
//
|
|
181
|
-
//
|
|
182
|
-
//
|
|
183
|
-
// font metrics and floats typed text above center.
|
|
185
|
+
// facebook/react-native#39145 / #28012 / #56774:
|
|
186
|
+
// Single-line iOS UITextField + `lineHeight` (or a tall field box) puts ALL
|
|
187
|
+
// extra space ABOVE the glyphs → placeholder/value sink. Documented fix:
|
|
188
|
+
// omit `lineHeight` on the single-line input; let the wrapper
|
|
189
|
+
// (`alignItems: 'center'` + `minHeight`) center it. UITextField centers
|
|
190
|
+
// natively when it is only as tall as its font. Do NOT pin lineHeight to
|
|
191
|
+
// fontSize (clips custom fonts / floats typed text).
|
|
184
192
|
const textInputStyle = {
|
|
185
193
|
flex: 1,
|
|
186
194
|
color: textColor,
|