sapo-components-ui-rn 1.0.11 → 1.0.13
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/Button/index.d.ts +2 -1
- package/dist/index.esm.js +8 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Button/index.tsx +9 -7
- package/src/components/SelectionField/index.tsx +3 -3
package/dist/index.js
CHANGED
|
@@ -5927,7 +5927,7 @@ var ScaleButton = function (_a) {
|
|
|
5927
5927
|
var ScaleButton$1 = React__default["default"].memo(ScaleButton);
|
|
5928
5928
|
|
|
5929
5929
|
var Button = function (_a) {
|
|
5930
|
-
var style = _a.style, title = _a.title; _a.border; var borderColor = _a.borderColor, isLoading = _a.isLoading, left = _a.left, right = _a.right, small = _a.small; _a.margin; var textStyle = _a.textStyle, textProps = _a.textProps, onPress = _a.onPress, disabled = _a.disabled, backgroundColor = _a.backgroundColor, textColor = _a.textColor, _b = _a.bold, bold = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 16 : _c, _d = _a.medium, medium = _d === void 0 ? false : _d, _e = _a.mode, mode = _e === void 0 ? "contained" : _e; _a.transparent; _a.theme; var props = __rest(_a, ["style", "title", "border", "borderColor", "isLoading", "left", "right", "small", "margin", "textStyle", "textProps", "onPress", "disabled", "backgroundColor", "textColor", "bold", "size", "medium", "mode", "transparent", "theme"]);
|
|
5930
|
+
var style = _a.style, title = _a.title; _a.border; var borderColor = _a.borderColor, isLoading = _a.isLoading, left = _a.left, right = _a.right, small = _a.small; _a.margin; var textStyle = _a.textStyle, textProps = _a.textProps, onPress = _a.onPress, disabled = _a.disabled, backgroundColor = _a.backgroundColor, textColor = _a.textColor, _b = _a.bold, bold = _b === void 0 ? true : _b, _c = _a.size, size = _c === void 0 ? 16 : _c, _d = _a.medium, medium = _d === void 0 ? false : _d, _e = _a.mode, mode = _e === void 0 ? "contained" : _e; _a.transparent; var _g = _a.full, full = _g === void 0 ? false : _g; _a.theme; var props = __rest(_a, ["style", "title", "border", "borderColor", "isLoading", "left", "right", "small", "margin", "textStyle", "textProps", "onPress", "disabled", "backgroundColor", "textColor", "bold", "size", "medium", "mode", "transparent", "full", "theme"]);
|
|
5931
5931
|
var theme = useInternalTheme();
|
|
5932
5932
|
var colors = theme.colors;
|
|
5933
5933
|
var disabledTextStyle = {
|
|
@@ -5956,7 +5956,9 @@ var Button = function (_a) {
|
|
|
5956
5956
|
return colors.textBrandDefault;
|
|
5957
5957
|
}
|
|
5958
5958
|
};
|
|
5959
|
-
return (React__default["default"].createElement(View, { style:
|
|
5959
|
+
return (React__default["default"].createElement(View, { style: {
|
|
5960
|
+
flexDirection: full ? "column" : "row",
|
|
5961
|
+
} },
|
|
5960
5962
|
React__default["default"].createElement(ScaleButton$1, __assign({ activeOpacity: 0.8, onPress: onPress }, props, { disabled: disabled || false }),
|
|
5961
5963
|
React__default["default"].createElement(View, { style: [
|
|
5962
5964
|
styles$9.button,
|
|
@@ -5983,21 +5985,19 @@ var Button = function (_a) {
|
|
|
5983
5985
|
React__default["default"].createElement(Spacer, { width: left ? CONSTANTS.SPACE_12 : CONSTANTS.SPACE_16 }),
|
|
5984
5986
|
!isLoading && left,
|
|
5985
5987
|
left && React__default["default"].createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
|
|
5986
|
-
isLoading ? (React__default["default"].createElement(reactNative.ActivityIndicator, { color: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.color) ||
|
|
5988
|
+
isLoading ? (React__default["default"].createElement(reactNative.ActivityIndicator, { color: (textStyle === null || textStyle === void 0 ? void 0 : textStyle.color) || renderTextColor() })) : (React__default["default"].createElement(Text$1, __assign({ numberOfLines: 1, color: textColor || renderTextColor(), size: size, bold: bold, medium: medium, style: [disabled && disabledTextStyle, textStyle] }, textProps), title)),
|
|
5987
5989
|
right && React__default["default"].createElement(Spacer, { width: CONSTANTS.SPACE_8 }),
|
|
5988
5990
|
!isLoading && right,
|
|
5989
5991
|
React__default["default"].createElement(Spacer, { width: right ? CONSTANTS.SPACE_12 : CONSTANTS.SPACE_16 })))));
|
|
5990
5992
|
};
|
|
5991
5993
|
var styles$9 = reactNative.StyleSheet.create({
|
|
5992
|
-
container: {
|
|
5993
|
-
flexDirection: "row",
|
|
5994
|
-
},
|
|
5995
5994
|
disabled: { opacity: 0.6 },
|
|
5996
5995
|
button: {
|
|
5997
5996
|
height: CONSTANTS.BUTTON_HEIGHT,
|
|
5998
5997
|
flexDirection: "row",
|
|
5999
5998
|
alignItems: "center",
|
|
6000
5999
|
justifyContent: "space-between",
|
|
6000
|
+
minWidth: CONSTANTS.DEVICE_WIDTH / 4.5,
|
|
6001
6001
|
},
|
|
6002
6002
|
border: {
|
|
6003
6003
|
borderWidth: CONSTANTS.BORDER_WIDTH_1,
|
|
@@ -6812,11 +6812,10 @@ var SelectionField = function (_a) {
|
|
|
6812
6812
|
},
|
|
6813
6813
|
] },
|
|
6814
6814
|
label,
|
|
6815
|
-
" ",
|
|
6816
|
-
required && React__default["default"].createElement(Text$1, { color: colors.textErrorDefault }, "*"))),
|
|
6815
|
+
required && React__default["default"].createElement(Text$1, { color: colors.textErrorDefault }, " *"))),
|
|
6817
6816
|
React__default["default"].createElement(Text$1, __assign({ numberOfLines: 1, color: getColor(), size: size, style: [disabled && disabledTextStyle, textStyle] }, textProps),
|
|
6818
6817
|
content.toString() === "" ? label : content,
|
|
6819
|
-
required && content.toString() === "" && (React__default["default"].createElement(Text$1, { color: colors.textErrorDefault }, "*")))),
|
|
6818
|
+
required && content.toString() === "" && (React__default["default"].createElement(Text$1, { color: colors.textErrorDefault }, " *")))),
|
|
6820
6819
|
right || React__default["default"].createElement(Icon$1, { name: "IconArrowDown", type: "Svg", size: 24 }),
|
|
6821
6820
|
React__default["default"].createElement(Spacer, { width: SPACE_12 }))),
|
|
6822
6821
|
error.length > 0 && (React__default["default"].createElement(View, { paddingHorizontal: SPACE_12, paddingVertical: SPACE_4 },
|