sapo-components-ui-rn 1.1.75 → 1.1.76
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/index.esm.js +11 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +11 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TextInput/TextInputDefault.tsx +13 -4
- package/src/components/TextInput/TextInputFlat.tsx +1 -1
- package/src/components/TextInput/TextInputNumber.tsx +2 -1
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, { style: { flex: 1 } },
|
|
5030
5030
|
React$3.createElement(View$1, { style: {
|
|
5031
5031
|
flexDirection: "row",
|
|
5032
5032
|
alignItems: "center",
|
|
@@ -5131,7 +5131,7 @@ var styles$e = StyleSheet.create({
|
|
|
5131
5131
|
|
|
5132
5132
|
var TextInputDefault = function (_a) {
|
|
5133
5133
|
var _b;
|
|
5134
|
-
var _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.editable, editable = _d === void 0 ? true : _d, label = _a.label, _e = _a.error, error = _e === void 0 ? false : _e, customSelectionColor = _a.selectionColor, cursorColor = _a.cursorColor, customOutlineColor = _a.outlineColor, activeOutlineColor = _a.activeOutlineColor; _a.outlineStyle; var textColor = _a.textColor; _a.dense; var style = _a.style, theme = _a.theme, _f = _a.render, render = _f === void 0 ? function (props) { return React$3.createElement(TextInput$1, __assign({}, props)); } : _f, _g = _a.multiline, multiline = _g === void 0 ? false : _g, parentState = _a.parentState, innerRef = _a.innerRef, onFocus = _a.onFocus
|
|
5134
|
+
var _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.editable, editable = _d === void 0 ? true : _d, label = _a.label, _e = _a.error, error = _e === void 0 ? false : _e, customSelectionColor = _a.selectionColor, cursorColor = _a.cursorColor, customOutlineColor = _a.outlineColor, activeOutlineColor = _a.activeOutlineColor; _a.outlineStyle; var textColor = _a.textColor; _a.dense; var style = _a.style, theme = _a.theme, _f = _a.render, render = _f === void 0 ? function (props) { return React$3.createElement(TextInput$1, __assign({}, props)); } : _f, _g = _a.multiline, multiline = _g === void 0 ? false : _g, parentState = _a.parentState, innerRef = _a.innerRef, onFocus = _a.onFocus, forceFocus = _a.forceFocus, onBlur = _a.onBlur, onChangeText = _a.onChangeText; _a.onLayout; var left = _a.left, right = _a.right, prefix = _a.prefix, suffix = _a.suffix, placeholderTextColor = _a.placeholderTextColor, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, contentStyle = _a.contentStyle, _j = _a.value, value = _j === void 0 ? "" : _j, textError = _a.textError, required = _a.required, rest = __rest(_a, ["disabled", "editable", "label", "error", "selectionColor", "cursorColor", "outlineColor", "activeOutlineColor", "outlineStyle", "textColor", "dense", "style", "theme", "render", "multiline", "parentState", "innerRef", "onFocus", "forceFocus", "onBlur", "onChangeText", "onLayout", "left", "right", "prefix", "suffix", "placeholderTextColor", "clearButton", "contentStyle", "value", "textError", "required"]);
|
|
5135
5135
|
var colors = theme.colors;
|
|
5136
5136
|
var font = theme.fonts.bodyLarge;
|
|
5137
5137
|
var _k = (StyleSheet.flatten(style) || {}), fontSizeStyle = _k.fontSize, fontWeight = _k.fontWeight, lineHeightStyle = _k.lineHeight, height = _k.height, _l = _k.backgroundColor; _l === void 0 ? colors === null || colors === void 0 ? void 0 : colors.backgroundPrimary : _l; var textAlign = _k.textAlign; _k.minHeight; var viewStyle = __rest(_k, ["fontSize", "fontWeight", "lineHeight", "height", "backgroundColor", "textAlign", "minHeight"]);
|
|
@@ -5197,13 +5197,17 @@ var TextInputDefault = function (_a) {
|
|
|
5197
5197
|
var _a, _b;
|
|
5198
5198
|
if (parentState.focused ||
|
|
5199
5199
|
(parentState.value !== undefined && ((_a = parentState.value) === null || _a === void 0 ? void 0 : _a.toString()) !== "")) {
|
|
5200
|
-
return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_6
|
|
5200
|
+
return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_6, onPress: function () {
|
|
5201
|
+
forceFocus();
|
|
5202
|
+
} },
|
|
5201
5203
|
React$3.createElement(Text$1, { color: getLabelColor(), size: MINIMIZED_LABEL_FONT_SIZE },
|
|
5202
5204
|
label,
|
|
5203
5205
|
required && React$3.createElement(Text$1, { color: theme.colors.textErrorDefault }, " *"))));
|
|
5204
5206
|
}
|
|
5205
5207
|
else if (((_b = parentState.value) === null || _b === void 0 ? void 0 : _b.toString()) == "") {
|
|
5206
|
-
return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_12
|
|
5208
|
+
return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_12, onPress: function () {
|
|
5209
|
+
forceFocus();
|
|
5210
|
+
} },
|
|
5207
5211
|
React$3.createElement(Text$1, { color: getLabelColor(), style: [contentStyle] },
|
|
5208
5212
|
label,
|
|
5209
5213
|
required && (React$3.createElement(Text$1, { style: [contentStyle], color: theme.colors.textErrorDefault },
|
|
@@ -5277,7 +5281,7 @@ var TextInputDefault = function (_a) {
|
|
|
5277
5281
|
}
|
|
5278
5282
|
return false;
|
|
5279
5283
|
};
|
|
5280
|
-
return (React$3.createElement(View, { style: viewStyle },
|
|
5284
|
+
return (React$3.createElement(View, { style: [{ flex: 1 }, viewStyle] },
|
|
5281
5285
|
React$3.createElement(View, { row: true, alignCenter: !multiline, justifyCenter: true, style: [
|
|
5282
5286
|
{
|
|
5283
5287
|
borderRadius: CONSTANTS.BORDER_RADIUS_6,
|
|
@@ -5350,7 +5354,6 @@ var styles$d = StyleSheet.create({
|
|
|
5350
5354
|
clearButton: {
|
|
5351
5355
|
justifyContent: "center",
|
|
5352
5356
|
paddingHorizontal: CONSTANTS.SPACE_8,
|
|
5353
|
-
// alignItems: "center",
|
|
5354
5357
|
},
|
|
5355
5358
|
vError: {
|
|
5356
5359
|
paddingTop: CONSTANTS.SPACE_4,
|
|
@@ -5753,7 +5756,7 @@ var TextInputNumber = function (_a) {
|
|
|
5753
5756
|
setInputValue((value === null || value === void 0 ? void 0 : value.toString()) || "");
|
|
5754
5757
|
}, 300);
|
|
5755
5758
|
};
|
|
5756
|
-
return (React__default.createElement(View,
|
|
5759
|
+
return (React__default.createElement(View, { style: { flex: 1 } },
|
|
5757
5760
|
React__default.createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onShowModalKeyboard }, props, { disabled: disabled || false }),
|
|
5758
5761
|
React__default.createElement(View, { style: [
|
|
5759
5762
|
styles$c.container,
|
|
@@ -5793,7 +5796,7 @@ var TextInputNumber = function (_a) {
|
|
|
5793
5796
|
left && (React__default.createElement(View, { center: true, paddingRight: SPACE_8, height: "100%" }, left)),
|
|
5794
5797
|
React__default.createElement(View, { full: true, paddingRight: SPACE_4 },
|
|
5795
5798
|
!checkValueEmpty() && !checkLabelEmpty() && (React__default.createElement(View, null,
|
|
5796
|
-
React__default.createElement(Text$1, { size: 14, color: colors.textSecondary, style: [
|
|
5799
|
+
React__default.createElement(Text$1, { numberOfLines: 1, size: 14, color: colors.textSecondary, style: [
|
|
5797
5800
|
labelStyle,
|
|
5798
5801
|
disabled && {
|
|
5799
5802
|
color: colors.textPlaceholder,
|