sapo-components-ui-rn 1.1.76 → 1.1.77
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/TextInput/TextInput.d.ts +0 -4
- package/dist/index.esm.js +6 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TextInput/TextInput.tsx +1 -11
- package/src/components/TextInput/TextInputDefault.tsx +2 -1
- package/src/components/TextInput/TextInputFlat.tsx +1 -1
- package/src/components/TextInput/TextInputNumber.tsx +1 -1
|
@@ -15,10 +15,6 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
15
15
|
type?: "integer" | "float";
|
|
16
16
|
formatDecimal?: 1 | 2 | 3;
|
|
17
17
|
required?: boolean;
|
|
18
|
-
labelScaleValue?: number;
|
|
19
|
-
labelStyle?: StyleProp<TextStyle>;
|
|
20
|
-
textErrorStyle?: StyleProp<TextStyle>;
|
|
21
|
-
height?: number;
|
|
22
18
|
/**
|
|
23
19
|
* If true, user won't be able to interact with the component.
|
|
24
20
|
*/
|
package/dist/index.esm.js
CHANGED
|
@@ -5026,7 +5026,7 @@ var TextInputFlat = function (_a) {
|
|
|
5026
5026
|
}
|
|
5027
5027
|
return false;
|
|
5028
5028
|
};
|
|
5029
|
-
return (React$3.createElement(View$1,
|
|
5029
|
+
return (React$3.createElement(View$1, null,
|
|
5030
5030
|
React$3.createElement(View$1, { style: {
|
|
5031
5031
|
flexDirection: "row",
|
|
5032
5032
|
alignItems: "center",
|
|
@@ -5281,7 +5281,7 @@ var TextInputDefault = function (_a) {
|
|
|
5281
5281
|
}
|
|
5282
5282
|
return false;
|
|
5283
5283
|
};
|
|
5284
|
-
return (React$3.createElement(View, { style:
|
|
5284
|
+
return (React$3.createElement(View, { style: viewStyle },
|
|
5285
5285
|
React$3.createElement(View, { row: true, alignCenter: !multiline, justifyCenter: true, style: [
|
|
5286
5286
|
{
|
|
5287
5287
|
borderRadius: CONSTANTS.BORDER_RADIUS_6,
|
|
@@ -5354,6 +5354,7 @@ var styles$d = StyleSheet.create({
|
|
|
5354
5354
|
clearButton: {
|
|
5355
5355
|
justifyContent: "center",
|
|
5356
5356
|
paddingHorizontal: CONSTANTS.SPACE_8,
|
|
5357
|
+
// alignItems: "center",
|
|
5357
5358
|
},
|
|
5358
5359
|
vError: {
|
|
5359
5360
|
paddingTop: CONSTANTS.SPACE_4,
|
|
@@ -5756,7 +5757,7 @@ var TextInputNumber = function (_a) {
|
|
|
5756
5757
|
setInputValue((value === null || value === void 0 ? void 0 : value.toString()) || "");
|
|
5757
5758
|
}, 300);
|
|
5758
5759
|
};
|
|
5759
|
-
return (React__default.createElement(View,
|
|
5760
|
+
return (React__default.createElement(View, null,
|
|
5760
5761
|
React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onShowModalKeyboard }, props, { disabled: disabled || false }),
|
|
5761
5762
|
React__default.createElement(View, { style: [
|
|
5762
5763
|
styles$c.container,
|
|
@@ -5974,7 +5975,7 @@ var DefaultRenderer = function (props) { return React__default.createElement(Tex
|
|
|
5974
5975
|
* @extends TextInput props https://reactnative.dev/docs/textinput#props
|
|
5975
5976
|
*/
|
|
5976
5977
|
var TextInput = forwardRef(function (_a, ref) {
|
|
5977
|
-
var _b = _a.mode, mode = _b === void 0 ? "flat" : _b, _c = _a.dense, dense = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.error, errorProp = _e === void 0 ? false : _e, _f = _a.multiline, multiline = _f === void 0 ? false : _f, _g = _a.editable, editable = _g === void 0 ? true : _g, contentStyle = _a.contentStyle, _h = _a.render, render = _h === void 0 ? DefaultRenderer : _h; _a.theme; var placeholderTextColor = _a.placeholderTextColor, clearButton = _a.clearButton, textError = _a.textError, prefix = _a.prefix, suffix = _a.suffix, maxValue = _a.maxValue, minValue = _a.minValue, type = _a.type, _j = _a.required, required = _j === void 0 ? false : _j,
|
|
5978
|
+
var _b = _a.mode, mode = _b === void 0 ? "flat" : _b, _c = _a.dense, dense = _c === void 0 ? false : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.error, errorProp = _e === void 0 ? false : _e, _f = _a.multiline, multiline = _f === void 0 ? false : _f, _g = _a.editable, editable = _g === void 0 ? true : _g, contentStyle = _a.contentStyle, _h = _a.render, render = _h === void 0 ? DefaultRenderer : _h; _a.theme; var placeholderTextColor = _a.placeholderTextColor, clearButton = _a.clearButton, textError = _a.textError, prefix = _a.prefix, suffix = _a.suffix, maxValue = _a.maxValue, minValue = _a.minValue, type = _a.type, _j = _a.required, required = _j === void 0 ? false : _j, rest = __rest(_a, ["mode", "dense", "disabled", "error", "multiline", "editable", "contentStyle", "render", "theme", "placeholderTextColor", "clearButton", "textError", "prefix", "suffix", "maxValue", "minValue", "type", "required"]);
|
|
5978
5979
|
var theme = useInternalTheme();
|
|
5979
5980
|
var isControlled = rest.value !== undefined;
|
|
5980
5981
|
var validInputValue = isControlled ? rest.value : rest.defaultValue;
|
|
@@ -6176,7 +6177,7 @@ var TextInput = forwardRef(function (_a, ref) {
|
|
|
6176
6177
|
}, onFocus: handleFocus, forceFocus: forceFocus, onBlur: handleBlur, allowFontScaling: false, onChangeText: handleChangeText, onLayoutAnimatedText: handleLayoutAnimatedText, onInputLayout: handleInputContainerLayout, onLabelTextLayout: handleLabelTextLayout, onLeftAffixLayoutChange: onLeftAffixLayoutChange, onRightAffixLayoutChange: onRightAffixLayoutChange, maxFontSizeMultiplier: maxFontSizeMultiplier, contentStyle: contentStyle, scaledLabel: scaledLabel })));
|
|
6177
6178
|
}
|
|
6178
6179
|
if (mode === "number") {
|
|
6179
|
-
return (React__default.createElement(TextInputNumber$1, { textError: textError, disabled: disabled, prefix: prefix, suffix: suffix, value: value, right: rest.right, left: rest.left, required: required, label: rest.label, clearButton: clearButton, onChangeText: handleChangeText, maxValue: maxValue, minValue: minValue, formatDecimal: rest.formatDecimal, type: type
|
|
6180
|
+
return (React__default.createElement(TextInputNumber$1, { textError: textError, disabled: disabled, prefix: prefix, suffix: suffix, value: value, right: rest.right, left: rest.left, required: required, label: rest.label, clearButton: clearButton, onChangeText: handleChangeText, maxValue: maxValue, minValue: minValue, formatDecimal: rest.formatDecimal, type: type }));
|
|
6180
6181
|
}
|
|
6181
6182
|
return (React__default.createElement(TextInputFlat, __assign({ dense: dense, disabled: disabled, error: errorProp, textError: textError, editable: editable, prefix: prefix, suffix: suffix, clearButton: clearButton, required: required, render: render }, rest, { theme: theme, value: value, parentState: {
|
|
6182
6183
|
labeled: labeled,
|