sapo-components-ui-rn 1.0.44 → 1.0.46
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/components/Checkbox/index.d.ts +1 -1
- package/dist/components/RadioButton/index.d.ts +1 -1
- package/dist/index.esm.js +14 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/RadioButton/index.tsx +1 -1
- package/src/components/SearchInput/index.tsx +1 -0
- package/src/components/TextInput/TextInputDefault.tsx +15 -11
|
@@ -3,7 +3,7 @@ import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
|
3
3
|
interface CheckboxProps {
|
|
4
4
|
style?: StyleProp<ViewStyle>;
|
|
5
5
|
content: string;
|
|
6
|
-
onPress?: (
|
|
6
|
+
onPress?: () => void;
|
|
7
7
|
textStyle?: StyleProp<TextStyle>;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
leftIcon?: React.ReactNode;
|
|
@@ -3,7 +3,7 @@ import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
|
3
3
|
interface RadioButtonProps {
|
|
4
4
|
style?: StyleProp<ViewStyle>;
|
|
5
5
|
content: string;
|
|
6
|
-
onPress?: (
|
|
6
|
+
onPress?: () => void;
|
|
7
7
|
textStyle?: StyleProp<TextStyle>;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
leftIcon?: React.ReactNode;
|
package/dist/index.esm.js
CHANGED
|
@@ -5625,6 +5625,15 @@ var TextInputDefault = function (_a) {
|
|
|
5625
5625
|
}
|
|
5626
5626
|
return React$3.createElement(View, null);
|
|
5627
5627
|
};
|
|
5628
|
+
var getPaddingTopValue = function () {
|
|
5629
|
+
if (multiline) {
|
|
5630
|
+
if (Platform.OS === "ios") {
|
|
5631
|
+
return CONSTANTS.SPACE_4;
|
|
5632
|
+
}
|
|
5633
|
+
return CONSTANTS.SPACE_2;
|
|
5634
|
+
}
|
|
5635
|
+
return 0;
|
|
5636
|
+
};
|
|
5628
5637
|
return (React$3.createElement(View, { style: viewStyle },
|
|
5629
5638
|
React$3.createElement(View, { row: true,
|
|
5630
5639
|
// full
|
|
@@ -5645,8 +5654,7 @@ var TextInputDefault = function (_a) {
|
|
|
5645
5654
|
left && React$3.createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
|
|
5646
5655
|
React$3.createElement(View, { full: true, style: [
|
|
5647
5656
|
{
|
|
5648
|
-
height: height ||
|
|
5649
|
-
minHeight: height || 48,
|
|
5657
|
+
height: height || 44,
|
|
5650
5658
|
},
|
|
5651
5659
|
] },
|
|
5652
5660
|
multiline && renderLabel(), render === null || render === void 0 ? void 0 :
|
|
@@ -5660,11 +5668,7 @@ var TextInputDefault = function (_a) {
|
|
|
5660
5668
|
? textAlign
|
|
5661
5669
|
: I18nManager.getConstants().isRTL
|
|
5662
5670
|
? "right"
|
|
5663
|
-
: "left", height: height ? height :
|
|
5664
|
-
? multiline
|
|
5665
|
-
? CONSTANTS.SPACE_2
|
|
5666
|
-
: CONSTANTS.SPACE_8
|
|
5667
|
-
: CONSTANTS.SPACE_4, paddingBottom: multiline ? CONSTANTS.SPACE_4 : 0 }),
|
|
5671
|
+
: "left", height: height ? height : 44, paddingTop: getPaddingTopValue(), paddingBottom: multiline ? CONSTANTS.SPACE_4 : 0 }),
|
|
5668
5672
|
contentStyle,
|
|
5669
5673
|
] }))),
|
|
5670
5674
|
!disabled && clearButton && inputValue ? (React$3.createElement(TouchableOpacity, { onPress: handleClear, style: multiline ? styles$b.clearButtonMultiline : styles$b.clearButton },
|
|
@@ -5676,9 +5680,9 @@ var styles$b = StyleSheet.create({
|
|
|
5676
5680
|
input: {
|
|
5677
5681
|
margin: 0,
|
|
5678
5682
|
flex: 1,
|
|
5679
|
-
height:
|
|
5683
|
+
height: 44,
|
|
5680
5684
|
paddingLeft: 0,
|
|
5681
|
-
paddingTop: Platform.OS === "ios" ? CONSTANTS.SPACE_4 : CONSTANTS.SPACE_2,
|
|
5685
|
+
// paddingTop: Platform.OS === "ios" ? CONSTANTS.SPACE_4 : CONSTANTS.SPACE_2,
|
|
5682
5686
|
},
|
|
5683
5687
|
clearButtonMultiline: {
|
|
5684
5688
|
paddingRight: CONSTANTS.SPACE_12,
|
|
@@ -6850,6 +6854,7 @@ var SearchInput = function (_a) {
|
|
|
6850
6854
|
], contentStyle: [
|
|
6851
6855
|
{
|
|
6852
6856
|
backgroundColor: colors.surfaceSecondaryDefault,
|
|
6857
|
+
paddingTop: 0,
|
|
6853
6858
|
},
|
|
6854
6859
|
style,
|
|
6855
6860
|
] }));
|