@scripso-homepad/ui 0.4.19 → 0.4.20
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-THZ3HYMF.js → chunk-F7NV3HPU.js} +30 -16
- package/dist/chunk-F7NV3HPU.js.map +1 -0
- package/dist/index.cjs +28 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/web/index.cjs +28 -14
- 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 +3 -2
- package/src/components/Select.tsx +2 -1
- package/src/theme/input.ts +23 -13
- package/dist/chunk-THZ3HYMF.js.map +0 -1
package/dist/web/index.cjs
CHANGED
|
@@ -28650,12 +28650,14 @@ var buttonTypography = {
|
|
|
28650
28650
|
};
|
|
28651
28651
|
|
|
28652
28652
|
// src/theme/input.ts
|
|
28653
|
-
var INPUT_HEIGHT =
|
|
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 =
|
|
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;
|
|
28659
28661
|
function resolveInputVisualState({
|
|
28660
28662
|
focused = false,
|
|
28661
28663
|
error = false,
|
|
@@ -28674,8 +28676,7 @@ function createOutlineStyle(ringColor) {
|
|
|
28674
28676
|
padding: 0,
|
|
28675
28677
|
backgroundColor: colors.transparent,
|
|
28676
28678
|
width: "100%",
|
|
28677
|
-
alignSelf: "stretch"
|
|
28678
|
-
...reactNative.Platform.OS !== "web" ? { overflow: "hidden" } : null
|
|
28679
|
+
alignSelf: "stretch"
|
|
28679
28680
|
};
|
|
28680
28681
|
}
|
|
28681
28682
|
var defaultOutline = {
|
|
@@ -28685,13 +28686,11 @@ var defaultOutline = {
|
|
|
28685
28686
|
padding: 0,
|
|
28686
28687
|
backgroundColor: colors.transparent,
|
|
28687
28688
|
width: "100%",
|
|
28688
|
-
alignSelf: "stretch"
|
|
28689
|
-
...reactNative.Platform.OS !== "web" ? { overflow: "hidden" } : null
|
|
28689
|
+
alignSelf: "stretch"
|
|
28690
28690
|
};
|
|
28691
28691
|
function getInputFieldStyles(state) {
|
|
28692
28692
|
const containerBase = {
|
|
28693
|
-
borderRadius: radii.lg
|
|
28694
|
-
...reactNative.Platform.OS !== "web" ? { overflow: "hidden" } : null
|
|
28693
|
+
borderRadius: radii.lg
|
|
28695
28694
|
};
|
|
28696
28695
|
switch (state) {
|
|
28697
28696
|
case "disabled":
|
|
@@ -28754,12 +28753,15 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
|
|
|
28754
28753
|
alignItems: "center",
|
|
28755
28754
|
height: INPUT_HEIGHT,
|
|
28756
28755
|
borderRadius: radii.lg,
|
|
28757
|
-
|
|
28756
|
+
paddingHorizontal: INPUT_HORIZONTAL_PADDING,
|
|
28757
|
+
paddingVertical: INPUT_VERTICAL_PADDING,
|
|
28758
28758
|
gap: INPUT_ICON_GAP,
|
|
28759
|
+
// Do not clip glyph ascenders (Armenian / tall fonts).
|
|
28760
|
+
overflow: "visible",
|
|
28759
28761
|
...reactNative.Platform.OS === "web" ? {
|
|
28760
28762
|
boxSizing: "border-box",
|
|
28761
28763
|
paddingVertical: INPUT_WEB_VERTICAL_PADDING,
|
|
28762
|
-
paddingHorizontal:
|
|
28764
|
+
paddingHorizontal: INPUT_HORIZONTAL_PADDING
|
|
28763
28765
|
} : null
|
|
28764
28766
|
},
|
|
28765
28767
|
input: {
|
|
@@ -28774,8 +28776,7 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
|
|
|
28774
28776
|
margin: 0,
|
|
28775
28777
|
borderWidth: 0,
|
|
28776
28778
|
backgroundColor: colors.transparent,
|
|
28777
|
-
|
|
28778
|
-
...reactNative.Platform.OS === "ios" ? { lineHeight: INPUT_TEXT_LINE_HEIGHT, paddingVertical: 2 } : null,
|
|
28779
|
+
// Leave lineHeight unset so platform font metrics keep placeholder tops visible.
|
|
28779
28780
|
...reactNative.Platform.OS === "web" ? {
|
|
28780
28781
|
alignSelf: "center",
|
|
28781
28782
|
outlineStyle: "none",
|
|
@@ -28787,6 +28788,18 @@ var inputFieldMetrics = reactNative.StyleSheet.create({
|
|
|
28787
28788
|
/** Single-line: avoid Android lineHeight jump between placeholder and typed text. */
|
|
28788
28789
|
inputSingleLine: {
|
|
28789
28790
|
...reactNative.Platform.OS === "android" ? { textAlignVertical: "center" } : null
|
|
28791
|
+
},
|
|
28792
|
+
/**
|
|
28793
|
+
* Multiline fields should not flex-fill the container — on iOS a tall TextInput
|
|
28794
|
+
* vertically centers the placeholder.
|
|
28795
|
+
*/
|
|
28796
|
+
inputMultiline: {
|
|
28797
|
+
flexGrow: 0,
|
|
28798
|
+
flexShrink: 1,
|
|
28799
|
+
flexBasis: "auto",
|
|
28800
|
+
width: "100%",
|
|
28801
|
+
alignSelf: "stretch",
|
|
28802
|
+
textAlignVertical: "top"
|
|
28790
28803
|
}
|
|
28791
28804
|
});
|
|
28792
28805
|
function hasClassList(node) {
|
|
@@ -28919,6 +28932,7 @@ function Input({
|
|
|
28919
28932
|
onChangeText,
|
|
28920
28933
|
keyboardType,
|
|
28921
28934
|
multiline,
|
|
28935
|
+
textAlign = "left",
|
|
28922
28936
|
textAlignVertical,
|
|
28923
28937
|
...props
|
|
28924
28938
|
}) {
|
|
@@ -28999,7 +29013,7 @@ function Input({
|
|
|
28999
29013
|
ref: inputRef,
|
|
29000
29014
|
style: [
|
|
29001
29015
|
inputFieldMetrics.input,
|
|
29002
|
-
|
|
29016
|
+
multiline ? inputFieldMetrics.inputMultiline : inputFieldMetrics.inputSingleLine,
|
|
29003
29017
|
fieldStyles.text,
|
|
29004
29018
|
style
|
|
29005
29019
|
],
|
|
@@ -29008,7 +29022,7 @@ function Input({
|
|
|
29008
29022
|
keyboardType,
|
|
29009
29023
|
multiline,
|
|
29010
29024
|
secureTextEntry: effectiveSecureTextEntry,
|
|
29011
|
-
textAlign
|
|
29025
|
+
textAlign,
|
|
29012
29026
|
textAlignVertical: resolvedTextAlignVertical,
|
|
29013
29027
|
onFocus: handleFocus,
|
|
29014
29028
|
onBlur: handleBlur,
|