@atlure/ui 0.12.4 → 0.12.5
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": "@atlure/ui",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.5",
|
|
4
4
|
"description": "Atlure React Native component library: NativeWind primitives built on @atlure/tokens, shipped as untranspiled TypeScript source",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "David Moreira",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"class-variance-authority": "0.7.1",
|
|
38
38
|
"clsx": "2.1.1",
|
|
39
39
|
"tailwind-merge": "2.6.0",
|
|
40
|
-
"@atlure/icons": "0.12.
|
|
41
|
-
"@atlure/tokens": "0.12.
|
|
42
|
-
"@atlure/types": "0.12.
|
|
40
|
+
"@atlure/icons": "0.12.5",
|
|
41
|
+
"@atlure/tokens": "0.12.5",
|
|
42
|
+
"@atlure/types": "0.12.5"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"nativewind": "^4.2.6",
|
|
@@ -22,10 +22,22 @@ export interface InputProps extends Omit<TextInputProps, "editable" | "multiline
|
|
|
22
22
|
ref?: Ref<ComponentRef<typeof TextInput>>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// `text-base` in the tailwind preset expands to `{ fontSize: 16, lineHeight:
|
|
26
|
+
// 24 }`. On Android that 24px line box is centered inside the fixed control
|
|
27
|
+
// height via gravity, but the visible glyph is drawn at the baseline INSIDE
|
|
28
|
+
// that line box, which biases it below the geometric middle of the input.
|
|
29
|
+
// Tighten the line height to just above the glyph height (fontSize × 1.15,
|
|
30
|
+
// enough room for descenders) so the line box is roughly equal to the glyph
|
|
31
|
+
// itself and the center of the line box IS the visible center of the text.
|
|
25
32
|
const TEXT_INPUT_RESET =
|
|
26
33
|
Platform.OS === "android"
|
|
27
|
-
? {
|
|
28
|
-
|
|
34
|
+
? {
|
|
35
|
+
paddingTop: 0,
|
|
36
|
+
paddingBottom: 0,
|
|
37
|
+
includeFontPadding: false as const,
|
|
38
|
+
lineHeight: 18,
|
|
39
|
+
}
|
|
40
|
+
: { paddingTop: 0, paddingBottom: 0, lineHeight: 18 };
|
|
29
41
|
|
|
30
42
|
export function Input({
|
|
31
43
|
size = "md",
|