sapo-components-ui-rn 1.0.28 → 1.0.30

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.
@@ -134,6 +134,12 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
134
134
  * Overrides style when mode is set to `outlined`
135
135
  * Example: `borderRadius`, `borderColor`
136
136
  */
137
+ outlineStyle?: StyleProp<ViewStyle>;
138
+ /**
139
+ * Pass style to override the default style of underlined wrapper.
140
+ * Overrides style when mode is set to `flat`
141
+ * Example: `borderRadius`, `borderColor`
142
+ */
137
143
  underlineStyle?: StyleProp<ViewStyle>;
138
144
  minHeight?: number;
139
145
  clearButton?: boolean;
package/dist/index.esm.js CHANGED
@@ -2993,7 +2993,7 @@ var TextInputFlat = function (_a) {
2993
2993
  label ? (React$3.createElement(InputLabel$1, __assign({ labeled: parentState.labeled, error: parentState.error, focused: parentState.focused, scaledLabel: scaledLabel, wiggle: Boolean(parentState.value && labelProps.labelError), labelLayoutMeasured: parentState.labelLayout.measured, labelLayoutWidth: parentState.labelLayout.width, labelLayoutHeight: parentState.labelLayout.height }, labelProps))) : null, render === null || render === void 0 ? void 0 :
2994
2994
  render(__assign(__assign({}, rest), { ref: innerRef, onChangeText: handleChangeText, value: inputValue, placeholder: rest.placeholder, editable: !disabled && editable, selectionColor: selectionColor, cursorColor: typeof cursorColor === "undefined" ? activeColor : cursorColor, placeholderTextColor: placeholderTextColorBasedOnState, onFocus: onFocus, onBlur: onBlur, underlineColorAndroid: "transparent", multiline: multiline, style: [
2995
2995
  styles$c.input,
2996
- __assign(__assign({ paddingLeft: paddingLeft, paddingRight: paddingRight, paddingTop: parentState.focused || parentState.value ? SPACE_12 : 0 }, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", textAlign: textAlign
2996
+ __assign(__assign({ paddingLeft: paddingLeft, paddingRight: paddingRight, paddingTop: SPACE_12 }, font), { fontSize: fontSize, lineHeight: lineHeight, fontWeight: fontWeight, color: inputTextColor, textAlignVertical: multiline ? "top" : "center", textAlign: textAlign
2997
2997
  ? textAlign
2998
2998
  : I18nManager.getConstants().isRTL
2999
2999
  ? "right"
@@ -5642,7 +5642,7 @@ var TextInputDefault = function (_a) {
5642
5642
  ? multiline
5643
5643
  ? CONSTANTS.SPACE_2
5644
5644
  : CONSTANTS.SPACE_8
5645
- : 0 }),
5645
+ : CONSTANTS.SPACE_4 }),
5646
5646
  contentStyle,
5647
5647
  ] }))),
5648
5648
  !disabled && clearButton && inputValue ? (React$3.createElement(TouchableOpacity, { onPress: handleClear, style: multiline ? styles$b.clearButtonMultiline : styles$b.clearButton },
@@ -5702,7 +5702,7 @@ var DefaultRenderer = function (props) { return React__default.createElement(Tex
5702
5702
  * @extends TextInput props https://reactnative.dev/docs/textinput#props
5703
5703
  */
5704
5704
  var TextInput = forwardRef(function (_a, ref) {
5705
- var _b = _a.mode, mode = _b === void 0 ? "default" : _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, rest = __rest(_a, ["mode", "dense", "disabled", "error", "multiline", "editable", "contentStyle", "render", "theme", "placeholderTextColor", "clearButton"]);
5705
+ 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, rest = __rest(_a, ["mode", "dense", "disabled", "error", "multiline", "editable", "contentStyle", "render", "theme", "placeholderTextColor", "clearButton"]);
5706
5706
  var theme = useInternalTheme();
5707
5707
  var isControlled = rest.value !== undefined;
5708
5708
  var validInputValue = isControlled ? rest.value : rest.defaultValue;
@@ -5903,7 +5903,7 @@ var TextInput = forwardRef(function (_a, ref) {
5903
5903
  root.current = ref;
5904
5904
  }, 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 })));
5905
5905
  }
5906
- return (React__default.createElement(TextInputFlat, __assign({ dense: dense, disabled: disabled, error: errorProp, multiline: false, editable: editable, clearButton: clearButton, render: render }, rest, { theme: theme, value: value, parentState: {
5906
+ return (React__default.createElement(TextInputFlat, __assign({ dense: dense, disabled: disabled, error: errorProp, editable: editable, clearButton: clearButton, render: render }, rest, { theme: theme, value: value, parentState: {
5907
5907
  labeled: labeled,
5908
5908
  error: error,
5909
5909
  focused: focused,
@@ -6817,15 +6817,14 @@ var index = React__default.memo(SelectionField);
6817
6817
 
6818
6818
  var SearchInput = function (_a) {
6819
6819
  var _b = _a.value, value = _b === void 0 ? "" : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, rightIcon = _a.rightIcon, _d = _a.clearButton, clearButton = _d === void 0 ? false : _d, _e = _a.placeholder, placeholder = _e === void 0 ? "Tìm kiếm" : _e, onFocus = _a.onFocus, onBlur = _a.onBlur, onChangeText = _a.onChangeText, style = _a.style, height = _a.height;
6820
- return (React__default.createElement(TextInput, { left: React__default.createElement(View, { paddingRight: SPACE_8 },
6821
- React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 24 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: onChangeText, style: [
6820
+ return (React__default.createElement(TextInput, { left: React__default.createElement(View, null,
6821
+ React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 20 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: onChangeText, style: [
6822
6822
  {
6823
6823
  height: height || 40,
6824
6824
  },
6825
6825
  style,
6826
6826
  ] }));
6827
6827
  };
6828
- StyleSheet.create(__assign({}, containerStyles));
6829
6828
 
6830
6829
  var Tag = function (_a) {
6831
6830
  var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ? "content" : _c, textStyle = _a.textStyle, onPress = _a.onPress, _d = _a.disabled, disabled = _d === void 0 ? false : _d, leftIcon = _a.leftIcon, rightIcon = _a.rightIcon, _e = _a.isActive, isActive = _e === void 0 ? false : _e, _f = _a.ellipsizeMode, ellipsizeMode = _f === void 0 ? "tail" : _f, _g = _a.numberOfLines, numberOfLines = _g === void 0 ? 1 : _g, _h = _a.hideRightIcon, hideRightIcon = _h === void 0 ? false : _h;