sapo-components-ui-rn 1.0.37 → 1.0.38
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/SearchInput/index.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +1 -0
- package/dist/index.esm.js +5 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +5 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SearchInput/index.tsx +2 -5
- package/src/components/Tag/index.tsx +7 -1
- package/src/components/TextInput/TextInput.tsx +3 -1
|
@@ -14,5 +14,5 @@ interface SearchInputProps {
|
|
|
14
14
|
onChangeText?: (text: string) => void;
|
|
15
15
|
height?: number;
|
|
16
16
|
}
|
|
17
|
-
declare const SearchInput: ({ value, disabled, rightIcon, clearButton, placeholder, onFocus, onBlur, onChangeText, style, height, }: SearchInputProps) => React.JSX.Element;
|
|
17
|
+
declare const SearchInput: ({ value, disabled, rightIcon, clearButton, placeholder, onFocus, onBlur, onChangeText, style, height, textStyle, }: SearchInputProps) => React.JSX.Element;
|
|
18
18
|
export default SearchInput;
|
|
@@ -143,6 +143,7 @@ export type Props = React.ComponentPropsWithRef<typeof NativeTextInput> & {
|
|
|
143
143
|
underlineStyle?: StyleProp<ViewStyle>;
|
|
144
144
|
minHeight?: number;
|
|
145
145
|
clearButton?: boolean;
|
|
146
|
+
textStyle?: StyleProp<TextStyle>;
|
|
146
147
|
};
|
|
147
148
|
interface CompoundedComponent extends React.ForwardRefExoticComponent<Props & React.RefAttributes<TextInputHandles>> {
|
|
148
149
|
Affix: React.FunctionComponent<Partial<TextInputAffixProps>>;
|
package/dist/index.esm.js
CHANGED
|
@@ -5703,7 +5703,7 @@ var DefaultRenderer = function (props) { return React__default.createElement(Tex
|
|
|
5703
5703
|
* @extends TextInput props https://reactnative.dev/docs/textinput#props
|
|
5704
5704
|
*/
|
|
5705
5705
|
var TextInput = forwardRef(function (_a, ref) {
|
|
5706
|
-
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
|
+
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, textStyle = _a.textStyle, rest = __rest(_a, ["mode", "dense", "disabled", "error", "multiline", "editable", "contentStyle", "render", "theme", "placeholderTextColor", "clearButton", "textStyle"]);
|
|
5707
5707
|
var theme = useInternalTheme();
|
|
5708
5708
|
var isControlled = rest.value !== undefined;
|
|
5709
5709
|
var validInputValue = isControlled ? rest.value : rest.defaultValue;
|
|
@@ -5902,7 +5902,7 @@ var TextInput = forwardRef(function (_a, ref) {
|
|
|
5902
5902
|
inputContainerLayout: inputContainerLayout,
|
|
5903
5903
|
}, innerRef: function (ref) {
|
|
5904
5904
|
root.current = ref;
|
|
5905
|
-
}, 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
|
+
}, onFocus: handleFocus, forceFocus: forceFocus, onBlur: handleBlur, allowFontScaling: false, onChangeText: handleChangeText, onLayoutAnimatedText: handleLayoutAnimatedText, onInputLayout: handleInputContainerLayout, onLabelTextLayout: handleLabelTextLayout, onLeftAffixLayoutChange: onLeftAffixLayoutChange, onRightAffixLayoutChange: onRightAffixLayoutChange, maxFontSizeMultiplier: maxFontSizeMultiplier, contentStyle: [contentStyle, textStyle], scaledLabel: scaledLabel })));
|
|
5906
5906
|
}
|
|
5907
5907
|
return (React__default.createElement(TextInputFlat, __assign({ dense: dense, disabled: disabled, error: errorProp, editable: editable, clearButton: clearButton, render: render }, rest, { theme: theme, value: value, parentState: {
|
|
5908
5908
|
labeled: labeled,
|
|
@@ -6817,11 +6817,11 @@ var styles$1 = StyleSheet.create(__assign(__assign({}, containerStyles), { disab
|
|
|
6817
6817
|
var index = React__default.memo(SelectionField);
|
|
6818
6818
|
|
|
6819
6819
|
var SearchInput = function (_a) {
|
|
6820
|
-
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
|
+
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, textStyle = _a.textStyle;
|
|
6821
6821
|
var theme = useInternalTheme();
|
|
6822
6822
|
var colors = theme.colors;
|
|
6823
6823
|
return (React__default.createElement(TextInput, { left: React__default.createElement(View, { center: true },
|
|
6824
|
-
React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 18 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: onChangeText, style: [
|
|
6824
|
+
React__default.createElement(Icon$1, { name: "IconSearch", type: "Svg", size: 18 })), disabled: disabled, value: value, clearButton: clearButton, mode: "default", label: placeholder, placeholder: placeholder, right: rightIcon, onFocus: onFocus, onBlur: onBlur, allowFontScaling: false, onChangeText: onChangeText, textStyle: textStyle, style: [
|
|
6825
6825
|
{
|
|
6826
6826
|
height: height || 40,
|
|
6827
6827
|
},
|
|
@@ -6833,7 +6833,6 @@ var SearchInput = function (_a) {
|
|
|
6833
6833
|
style,
|
|
6834
6834
|
] }));
|
|
6835
6835
|
};
|
|
6836
|
-
StyleSheet.create(__assign({}, containerStyles));
|
|
6837
6836
|
|
|
6838
6837
|
var Tag = function (_a) {
|
|
6839
6838
|
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, _j = _a.height, height = _j === void 0 ? 32 : _j;
|
|
@@ -6867,7 +6866,7 @@ var Tag = function (_a) {
|
|
|
6867
6866
|
textStyle,
|
|
6868
6867
|
] }, title)),
|
|
6869
6868
|
rightIcon ? (React__default.createElement(View, { paddingLeft: CONSTANTS.SPACE_4 }, rightIcon)) : hideRightIcon ? (React__default.createElement(View, null)) : (React__default.createElement(View, { paddingLeft: CONSTANTS.SPACE_4 },
|
|
6870
|
-
React__default.createElement(
|
|
6869
|
+
React__default.createElement(Icon$1, { name: "IconClose", type: "Svg", size: 24, color: colors.iconBrandDefault }))))));
|
|
6871
6870
|
};
|
|
6872
6871
|
var styles = StyleSheet.create(__assign({}, containerStyles));
|
|
6873
6872
|
|