sapo-components-ui-rn 1.1.82 → 1.1.84
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/.DS_Store +0 -0
- package/dist/assets/images/index.d.ts +1 -0
- package/dist/assets/images/index.ts +1 -0
- package/dist/components/Tag/index.d.ts +3 -3
- package/dist/image_default.png +0 -0
- package/dist/index.esm.js +7 -5
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
- package/src/.DS_Store +0 -0
- package/src/assets/images/index.ts +1 -0
- package/src/components/Image/index.tsx +3 -2
- package/src/components/Tag/index.tsx +12 -12
package/dist/.DS_Store
ADDED
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const IMAGE_DEFAULT: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const IMAGE_DEFAULT = require('./image_default.png');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { StyleProp, ViewStyle, TextStyle } from
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
3
|
interface TagProps {
|
|
4
4
|
style?: StyleProp<ViewStyle>;
|
|
5
5
|
title: string;
|
|
@@ -10,7 +10,7 @@ interface TagProps {
|
|
|
10
10
|
leftIcon?: React.ReactNode;
|
|
11
11
|
rightIcon?: React.ReactNode;
|
|
12
12
|
checked?: boolean;
|
|
13
|
-
ellipsizeMode?:
|
|
13
|
+
ellipsizeMode?: "head" | "middle" | "tail" | "clip";
|
|
14
14
|
numberOfLines?: number;
|
|
15
15
|
hideRightIcon?: boolean;
|
|
16
16
|
height?: number;
|
|
Binary file
|
package/dist/index.esm.js
CHANGED
|
@@ -3093,7 +3093,7 @@ var _setCacheAdd = setCacheAdd$1;
|
|
|
3093
3093
|
* @name has
|
|
3094
3094
|
* @memberOf SetCache
|
|
3095
3095
|
* @param {*} value The value to search for.
|
|
3096
|
-
* @returns {
|
|
3096
|
+
* @returns {number} Returns `true` if `value` is found, else `false`.
|
|
3097
3097
|
*/
|
|
3098
3098
|
|
|
3099
3099
|
function setCacheHas$1(value) {
|
|
@@ -6673,6 +6673,8 @@ var styles$9 = StyleSheet.create({
|
|
|
6673
6673
|
},
|
|
6674
6674
|
});
|
|
6675
6675
|
|
|
6676
|
+
var IMAGE_DEFAULT = require('./image_default.png');
|
|
6677
|
+
|
|
6676
6678
|
var getSource = function (source) {
|
|
6677
6679
|
var newSource = source;
|
|
6678
6680
|
if (typeof source === 'string') {
|
|
@@ -6688,8 +6690,8 @@ var Image = function (props) {
|
|
|
6688
6690
|
var image = getSource(disableDefaultImage
|
|
6689
6691
|
? source
|
|
6690
6692
|
: hasError
|
|
6691
|
-
?
|
|
6692
|
-
: source ||
|
|
6693
|
+
? IMAGE_DEFAULT
|
|
6694
|
+
: source || IMAGE_DEFAULT);
|
|
6693
6695
|
var ImageComponent = children ? ImageBackground : Image$2;
|
|
6694
6696
|
// const getUriImage = (uri: string) => {
|
|
6695
6697
|
// return uri !== null &&
|
|
@@ -7227,7 +7229,7 @@ var SearchInput = function (_a) {
|
|
|
7227
7229
|
};
|
|
7228
7230
|
|
|
7229
7231
|
var Tag = function (_a) {
|
|
7230
|
-
var style = _a.style, _b = _a.borderRadius, borderRadius = _b === void 0 ? CONSTANTS.BORDER_RADIUS_ROUNDED : _b, _c = _a.title, title = _c === void 0 ?
|
|
7232
|
+
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;
|
|
7231
7233
|
var theme = useInternalTheme();
|
|
7232
7234
|
var colors = theme.colors;
|
|
7233
7235
|
var handlePressTag = useCallback(function () {
|
|
@@ -7255,7 +7257,7 @@ var Tag = function (_a) {
|
|
|
7255
7257
|
textStyle,
|
|
7256
7258
|
] }, title)),
|
|
7257
7259
|
rightIcon ? (React__default.createElement(View, { paddingLeft: CONSTANTS.SPACE_4 }, rightIcon)) : hideRightIcon ? (React__default.createElement(View, null)) : (React__default.createElement(View, { paddingLeft: CONSTANTS.SPACE_4 },
|
|
7258
|
-
React__default.createElement(SvgIcon, { name:
|
|
7260
|
+
React__default.createElement(SvgIcon, { name: "IconClose", width: 20, height: 20, color: colors.iconBrandDefault })))));
|
|
7259
7261
|
};
|
|
7260
7262
|
var styles$1 = StyleSheet.create(__assign({}, containerStyles));
|
|
7261
7263
|
|