@scripso-homepad/ui 0.4.20 → 0.4.21
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/dist/{chunk-F7NV3HPU.js → chunk-KJYQA5OY.js} +37 -13
- package/dist/chunk-KJYQA5OY.js.map +1 -0
- package/dist/index.cjs +36 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +35 -11
- package/dist/web/index.cjs.map +1 -1
- package/dist/web/index.js +1 -1
- package/package.json +1 -1
- package/src/components/Input.tsx +13 -2
- package/src/components/PhoneInput.tsx +1 -0
- package/src/theme/input.ts +30 -9
- package/dist/chunk-F7NV3HPU.js.map +0 -1
package/dist/web/index.cjs
CHANGED
|
@@ -28658,6 +28658,8 @@ var INPUT_TEXT_LINE_HEIGHT = 20;
|
|
|
28658
28658
|
var INPUT_WEB_VERTICAL_PADDING = 14;
|
|
28659
28659
|
var INPUT_VERTICAL_PADDING = 14;
|
|
28660
28660
|
var INPUT_HORIZONTAL_PADDING = 16;
|
|
28661
|
+
var INPUT_MULTILINE_MIN_HEIGHT = 120;
|
|
28662
|
+
var INPUT_MULTILINE_INNER_MIN_HEIGHT = INPUT_MULTILINE_MIN_HEIGHT - INPUT_VERTICAL_PADDING * 2;
|
|
28661
28663
|
function resolveInputVisualState({
|
|
28662
28664
|
focused = false,
|
|
28663
28665
|
error = false,
|
|
@@ -28748,22 +28750,35 @@ function getInputFieldStyles(state) {
|
|
|
28748
28750
|
}
|
|
28749
28751
|
}
|
|
28750
28752
|
var inputFieldMetrics = reactNative.StyleSheet.create({
|
|
28751
|
-
|
|
28753
|
+
containerBase: {
|
|
28752
28754
|
flexDirection: "row",
|
|
28753
|
-
alignItems: "center",
|
|
28754
|
-
height: INPUT_HEIGHT,
|
|
28755
28755
|
borderRadius: radii.lg,
|
|
28756
28756
|
paddingHorizontal: INPUT_HORIZONTAL_PADDING,
|
|
28757
28757
|
paddingVertical: INPUT_VERTICAL_PADDING,
|
|
28758
28758
|
gap: INPUT_ICON_GAP,
|
|
28759
|
-
// Do not clip glyph ascenders (Armenian / tall fonts).
|
|
28760
|
-
overflow: "visible",
|
|
28761
28759
|
...reactNative.Platform.OS === "web" ? {
|
|
28762
28760
|
boxSizing: "border-box",
|
|
28763
28761
|
paddingVertical: INPUT_WEB_VERTICAL_PADDING,
|
|
28764
28762
|
paddingHorizontal: INPUT_HORIZONTAL_PADDING
|
|
28765
28763
|
} : null
|
|
28766
28764
|
},
|
|
28765
|
+
container: {
|
|
28766
|
+
alignItems: "center",
|
|
28767
|
+
height: INPUT_HEIGHT,
|
|
28768
|
+
// Do not clip glyph ascenders on single-line fields (Armenian / tall fonts).
|
|
28769
|
+
overflow: "visible"
|
|
28770
|
+
},
|
|
28771
|
+
/**
|
|
28772
|
+
* Column layout + explicit minHeight so the TextInput hit target matches the
|
|
28773
|
+
* visible box on Android release builds (row + flexGrow:0 collapsed taps).
|
|
28774
|
+
*/
|
|
28775
|
+
containerMultiline: {
|
|
28776
|
+
flexDirection: "column",
|
|
28777
|
+
alignItems: "stretch",
|
|
28778
|
+
justifyContent: "flex-start",
|
|
28779
|
+
minHeight: INPUT_MULTILINE_MIN_HEIGHT,
|
|
28780
|
+
overflow: "hidden"
|
|
28781
|
+
},
|
|
28767
28782
|
input: {
|
|
28768
28783
|
flex: 1,
|
|
28769
28784
|
minWidth: 0,
|
|
@@ -28787,19 +28802,21 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
|
|
|
28787
28802
|
},
|
|
28788
28803
|
/** Single-line: avoid Android lineHeight jump between placeholder and typed text. */
|
|
28789
28804
|
inputSingleLine: {
|
|
28790
|
-
...reactNative.Platform.OS === "android" ? { textAlignVertical: "center" } : null
|
|
28805
|
+
...reactNative.Platform.OS === "android" ? { textAlignVertical: "center", includeFontPadding: false } : null
|
|
28791
28806
|
},
|
|
28792
28807
|
/**
|
|
28793
|
-
*
|
|
28794
|
-
*
|
|
28808
|
+
* Fill the column container so the whole field is tappable in release APKs.
|
|
28809
|
+
* `textAlignVertical: "top"` keeps typed text (and Android placeholder) at the top.
|
|
28795
28810
|
*/
|
|
28796
28811
|
inputMultiline: {
|
|
28797
|
-
flexGrow:
|
|
28812
|
+
flexGrow: 1,
|
|
28798
28813
|
flexShrink: 1,
|
|
28799
28814
|
flexBasis: "auto",
|
|
28800
28815
|
width: "100%",
|
|
28816
|
+
minHeight: INPUT_MULTILINE_INNER_MIN_HEIGHT,
|
|
28801
28817
|
alignSelf: "stretch",
|
|
28802
|
-
textAlignVertical: "top"
|
|
28818
|
+
textAlignVertical: "top",
|
|
28819
|
+
...reactNative.Platform.OS === "android" ? { includeFontPadding: false } : null
|
|
28803
28820
|
}
|
|
28804
28821
|
});
|
|
28805
28822
|
function hasClassList(node) {
|
|
@@ -29004,7 +29021,12 @@ function Input({
|
|
|
29004
29021
|
reactNative.View,
|
|
29005
29022
|
{
|
|
29006
29023
|
ref: fieldRef,
|
|
29007
|
-
style: [
|
|
29024
|
+
style: [
|
|
29025
|
+
inputFieldMetrics.containerBase,
|
|
29026
|
+
multiline ? inputFieldMetrics.containerMultiline : inputFieldMetrics.container,
|
|
29027
|
+
fieldStyles.container,
|
|
29028
|
+
fieldStyle
|
|
29029
|
+
],
|
|
29008
29030
|
children: [
|
|
29009
29031
|
leftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles2.iconSlot, children: renderInputIcon(leftIcon, iconColor) }) : null,
|
|
29010
29032
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -29021,9 +29043,11 @@ function Input({
|
|
|
29021
29043
|
editable,
|
|
29022
29044
|
keyboardType,
|
|
29023
29045
|
multiline,
|
|
29046
|
+
scrollEnabled: multiline ? true : void 0,
|
|
29024
29047
|
secureTextEntry: effectiveSecureTextEntry,
|
|
29025
29048
|
textAlign,
|
|
29026
29049
|
textAlignVertical: resolvedTextAlignVertical,
|
|
29050
|
+
underlineColorAndroid: "transparent",
|
|
29027
29051
|
onFocus: handleFocus,
|
|
29028
29052
|
onBlur: handleBlur,
|
|
29029
29053
|
accessibilityState: { disabled: isDisabled },
|