sapo-components-ui-rn 1.1.11 → 1.1.12

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.
@@ -14,6 +14,7 @@ interface SearchInputProps {
14
14
  onChangeText?: (text: string) => void;
15
15
  height?: number;
16
16
  debounceTime?: number;
17
+ autoFocus?: boolean;
17
18
  }
18
- declare const SearchInput: ({ value, disabled, rightIcon, clearButton, placeholder, onFocus, onBlur, onChangeText, style, height, debounceTime, }: SearchInputProps) => React.JSX.Element;
19
+ declare const SearchInput: ({ value, disabled, rightIcon, clearButton, placeholder, onFocus, onBlur, onChangeText, style, height, debounceTime, autoFocus, }: SearchInputProps) => React.JSX.Element;
19
20
  export default SearchInput;
package/dist/index.esm.js CHANGED
@@ -7249,14 +7249,14 @@ var styles$2 = StyleSheet.create(__assign(__assign({}, containerStyles), { disab
7249
7249
  var index$1 = React__default.memo(SelectionField);
7250
7250
 
7251
7251
  var SearchInput = function (_a) {
7252
- 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, _f = _a.debounceTime, debounceTime = _f === void 0 ? 500 : _f;
7252
+ 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, _f = _a.debounceTime, debounceTime = _f === void 0 ? 500 : _f, _g = _a.autoFocus, autoFocus = _g === void 0 ? false : _g;
7253
7253
  var theme = useInternalTheme();
7254
7254
  var colors = theme.colors;
7255
7255
  var debouncedOnChangeText = useDebouncedCallback(function (text) {
7256
7256
  onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(text);
7257
7257
  }, debounceTime);
7258
7258
  return (React__default.createElement(TextInput, { left: React__default.createElement(View, null,
7259
- React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 18 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, placeholderTextColor: colors.textPlaceholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: debouncedOnChangeText, style: [
7259
+ React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 18 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, placeholderTextColor: colors.textPlaceholder, right: rightIcon, onFocus: onFocus, autoFocus: autoFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: debouncedOnChangeText, style: [
7260
7260
  {
7261
7261
  height: height || 36,
7262
7262
  },
@@ -7269,7 +7269,6 @@ var SearchInput = function (_a) {
7269
7269
  style,
7270
7270
  ] }));
7271
7271
  };
7272
- StyleSheet.create(__assign({}, containerStyles));
7273
7272
 
7274
7273
  var Tag = function (_a) {
7275
7274
  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.checked, checked = _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, _j = _a.height, height = _j === void 0 ? 32 : _j;