sapo-components-ui-rn 1.0.12 → 1.0.14

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 CHANGED
@@ -5525,13 +5525,13 @@ var Text$1 = memoDeepEqual(Text);
5525
5525
 
5526
5526
  var TextInputDefault = function (_a) {
5527
5527
  var _b;
5528
- 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; _a.forceFocus; var onBlur = _a.onBlur, onChangeText = _a.onChangeText; _a.onLayout; var left = _a.left, right = _a.right, placeholderTextColor = _a.placeholderTextColor, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, contentStyle = _a.contentStyle, value = _a.value, 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", "placeholderTextColor", "clearButton", "contentStyle", "value"]);
5528
+ 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; _a.forceFocus; var onBlur = _a.onBlur, onChangeText = _a.onChangeText; _a.onLayout; var left = _a.left, right = _a.right, placeholderTextColor = _a.placeholderTextColor, _h = _a.clearButton, clearButton = _h === void 0 ? false : _h, contentStyle = _a.contentStyle, _j = _a.value, value = _j === void 0 ? "" : _j, 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", "placeholderTextColor", "clearButton", "contentStyle", "value"]);
5529
5529
  var colors = theme.colors;
5530
5530
  var font = theme.fonts.bodyLarge;
5531
- var _j = (StyleSheet.flatten(style) || {}), fontSizeStyle = _j.fontSize, fontWeight = _j.fontWeight, lineHeightStyle = _j.lineHeight, height = _j.height, _k = _j.backgroundColor; _k === void 0 ? colors === null || colors === void 0 ? void 0 : colors.backgroundPrimary : _k; var textAlign = _j.textAlign, viewStyle = __rest(_j, ["fontSize", "fontWeight", "lineHeight", "height", "backgroundColor", "textAlign"]);
5531
+ 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, viewStyle = __rest(_k, ["fontSize", "fontWeight", "lineHeight", "height", "backgroundColor", "textAlign"]);
5532
5532
  var fontSize = fontSizeStyle || MAXIMIZED_LABEL_FONT_SIZE;
5533
5533
  var lineHeight = lineHeightStyle || (Platform.OS === "web" ? fontSize * 1.2 : undefined);
5534
- var _l = getOutlinedInputColors({
5534
+ var _m = getOutlinedInputColors({
5535
5535
  activeOutlineColor: activeOutlineColor,
5536
5536
  customOutlineColor: customOutlineColor,
5537
5537
  customSelectionColor: customSelectionColor,
@@ -5539,8 +5539,8 @@ var TextInputDefault = function (_a) {
5539
5539
  disabled: disabled,
5540
5540
  error: error,
5541
5541
  theme: theme,
5542
- }), inputTextColor = _l.inputTextColor, activeColor = _l.activeColor, selectionColor = _l.selectionColor;
5543
- var _m = React$3.useState(value || ""), inputValue = _m[0], setInputValue = _m[1];
5542
+ }), inputTextColor = _m.inputTextColor, activeColor = _m.activeColor, selectionColor = _m.selectionColor;
5543
+ var _o = React$3.useState(value || ""), inputValue = _o[0], setInputValue = _o[1];
5544
5544
  React$3.useEffect(function () {
5545
5545
  setInputValue(value || "");
5546
5546
  }, [value]);
@@ -5580,7 +5580,8 @@ var TextInputDefault = function (_a) {
5580
5580
  };
5581
5581
  var renderLabel = function () {
5582
5582
  var _a;
5583
- if (parentState.focused || ((_a = parentState.value) === null || _a === void 0 ? void 0 : _a.toString()) !== "") {
5583
+ if (parentState.focused ||
5584
+ (parentState.value !== undefined && ((_a = parentState.value) === null || _a === void 0 ? void 0 : _a.toString()) !== "")) {
5584
5585
  return (React$3.createElement(View, { paddingTop: CONSTANTS.SPACE_4 },
5585
5586
  React$3.createElement(Text$1, { color: getLabelColor(), size: MINIMIZED_LABEL_FONT_SIZE }, label)));
5586
5587
  }
@@ -5625,11 +5626,13 @@ var styles$a = StyleSheet.create({
5625
5626
  margin: 0,
5626
5627
  flex: 1,
5627
5628
  height: 48,
5629
+ paddingLeft: 0,
5630
+ paddingTop: Platform.OS === "ios" ? CONSTANTS.SPACE_4 : CONSTANTS.SPACE_2,
5628
5631
  },
5629
5632
  clearButton: {
5630
- padding: CONSTANTS.SPACE_8,
5633
+ paddingRight: CONSTANTS.SPACE_12,
5631
5634
  height: "100%",
5632
- paddingTop: CONSTANTS.SPACE_16,
5635
+ paddingTop: CONSTANTS.SPACE_12,
5633
5636
  },
5634
5637
  });
5635
5638