@scripso-homepad/ui 0.4.19 → 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.
@@ -28650,12 +28650,16 @@ var buttonTypography = {
28650
28650
  };
28651
28651
 
28652
28652
  // src/theme/input.ts
28653
- var INPUT_HEIGHT = 52;
28653
+ var INPUT_HEIGHT = 56;
28654
28654
  var INPUT_ICON_SIZE = 20;
28655
28655
  var INPUT_ICON_GAP = 10;
28656
28656
  var INPUT_OUTLINE_WIDTH = 2;
28657
- var INPUT_TEXT_LINE_HEIGHT = 19;
28657
+ var INPUT_TEXT_LINE_HEIGHT = 20;
28658
28658
  var INPUT_WEB_VERTICAL_PADDING = 14;
28659
+ var INPUT_VERTICAL_PADDING = 14;
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;
28659
28663
  function resolveInputVisualState({
28660
28664
  focused = false,
28661
28665
  error = false,
@@ -28674,8 +28678,7 @@ function createOutlineStyle(ringColor) {
28674
28678
  padding: 0,
28675
28679
  backgroundColor: colors.transparent,
28676
28680
  width: "100%",
28677
- alignSelf: "stretch",
28678
- ...reactNative.Platform.OS !== "web" ? { overflow: "hidden" } : null
28681
+ alignSelf: "stretch"
28679
28682
  };
28680
28683
  }
28681
28684
  var defaultOutline = {
@@ -28685,13 +28688,11 @@ var defaultOutline = {
28685
28688
  padding: 0,
28686
28689
  backgroundColor: colors.transparent,
28687
28690
  width: "100%",
28688
- alignSelf: "stretch",
28689
- ...reactNative.Platform.OS !== "web" ? { overflow: "hidden" } : null
28691
+ alignSelf: "stretch"
28690
28692
  };
28691
28693
  function getInputFieldStyles(state) {
28692
28694
  const containerBase = {
28693
- borderRadius: radii.lg,
28694
- ...reactNative.Platform.OS !== "web" ? { overflow: "hidden" } : null
28695
+ borderRadius: radii.lg
28695
28696
  };
28696
28697
  switch (state) {
28697
28698
  case "disabled":
@@ -28749,19 +28750,35 @@ function getInputFieldStyles(state) {
28749
28750
  }
28750
28751
  }
28751
28752
  var inputFieldMetrics = reactNative.StyleSheet.create({
28752
- container: {
28753
+ containerBase: {
28753
28754
  flexDirection: "row",
28754
- alignItems: "center",
28755
- height: INPUT_HEIGHT,
28756
28755
  borderRadius: radii.lg,
28757
- padding: 16,
28756
+ paddingHorizontal: INPUT_HORIZONTAL_PADDING,
28757
+ paddingVertical: INPUT_VERTICAL_PADDING,
28758
28758
  gap: INPUT_ICON_GAP,
28759
28759
  ...reactNative.Platform.OS === "web" ? {
28760
28760
  boxSizing: "border-box",
28761
28761
  paddingVertical: INPUT_WEB_VERTICAL_PADDING,
28762
- paddingHorizontal: 16
28762
+ paddingHorizontal: INPUT_HORIZONTAL_PADDING
28763
28763
  } : null
28764
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
+ },
28765
28782
  input: {
28766
28783
  flex: 1,
28767
28784
  minWidth: 0,
@@ -28774,8 +28791,7 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
28774
28791
  margin: 0,
28775
28792
  borderWidth: 0,
28776
28793
  backgroundColor: colors.transparent,
28777
- ...reactNative.Platform.OS === "android" ? { includeFontPadding: false } : null,
28778
- ...reactNative.Platform.OS === "ios" ? { lineHeight: INPUT_TEXT_LINE_HEIGHT, paddingVertical: 2 } : null,
28794
+ // Leave lineHeight unset so platform font metrics keep placeholder tops visible.
28779
28795
  ...reactNative.Platform.OS === "web" ? {
28780
28796
  alignSelf: "center",
28781
28797
  outlineStyle: "none",
@@ -28786,7 +28802,21 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
28786
28802
  },
28787
28803
  /** Single-line: avoid Android lineHeight jump between placeholder and typed text. */
28788
28804
  inputSingleLine: {
28789
- ...reactNative.Platform.OS === "android" ? { textAlignVertical: "center" } : null
28805
+ ...reactNative.Platform.OS === "android" ? { textAlignVertical: "center", includeFontPadding: false } : null
28806
+ },
28807
+ /**
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.
28810
+ */
28811
+ inputMultiline: {
28812
+ flexGrow: 1,
28813
+ flexShrink: 1,
28814
+ flexBasis: "auto",
28815
+ width: "100%",
28816
+ minHeight: INPUT_MULTILINE_INNER_MIN_HEIGHT,
28817
+ alignSelf: "stretch",
28818
+ textAlignVertical: "top",
28819
+ ...reactNative.Platform.OS === "android" ? { includeFontPadding: false } : null
28790
28820
  }
28791
28821
  });
28792
28822
  function hasClassList(node) {
@@ -28919,6 +28949,7 @@ function Input({
28919
28949
  onChangeText,
28920
28950
  keyboardType,
28921
28951
  multiline,
28952
+ textAlign = "left",
28922
28953
  textAlignVertical,
28923
28954
  ...props
28924
28955
  }) {
@@ -28990,7 +29021,12 @@ function Input({
28990
29021
  reactNative.View,
28991
29022
  {
28992
29023
  ref: fieldRef,
28993
- style: [inputFieldMetrics.container, fieldStyles.container, fieldStyle],
29024
+ style: [
29025
+ inputFieldMetrics.containerBase,
29026
+ multiline ? inputFieldMetrics.containerMultiline : inputFieldMetrics.container,
29027
+ fieldStyles.container,
29028
+ fieldStyle
29029
+ ],
28994
29030
  children: [
28995
29031
  leftIcon ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles2.iconSlot, children: renderInputIcon(leftIcon, iconColor) }) : null,
28996
29032
  /* @__PURE__ */ jsxRuntime.jsx(
@@ -28999,7 +29035,7 @@ function Input({
28999
29035
  ref: inputRef,
29000
29036
  style: [
29001
29037
  inputFieldMetrics.input,
29002
- !multiline ? inputFieldMetrics.inputSingleLine : null,
29038
+ multiline ? inputFieldMetrics.inputMultiline : inputFieldMetrics.inputSingleLine,
29003
29039
  fieldStyles.text,
29004
29040
  style
29005
29041
  ],
@@ -29007,9 +29043,11 @@ function Input({
29007
29043
  editable,
29008
29044
  keyboardType,
29009
29045
  multiline,
29046
+ scrollEnabled: multiline ? true : void 0,
29010
29047
  secureTextEntry: effectiveSecureTextEntry,
29011
- textAlign: "left",
29048
+ textAlign,
29012
29049
  textAlignVertical: resolvedTextAlignVertical,
29050
+ underlineColorAndroid: "transparent",
29013
29051
  onFocus: handleFocus,
29014
29052
  onBlur: handleBlur,
29015
29053
  accessibilityState: { disabled: isDisabled },