@rahmatsaputra-my-id/react-js-library 0.0.91 → 0.0.93
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/index.es.js +3 -3
- package/dist/index.js +3 -3
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1068,7 +1068,7 @@ var styles$g = {
|
|
|
1068
1068
|
};
|
|
1069
1069
|
|
|
1070
1070
|
var Button = function (_a) {
|
|
1071
|
-
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j,
|
|
1071
|
+
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j, _k = _a.onPress, onPress = _k === void 0 ? function () { } : _k, _l = _a.padding, padding = _l === void 0 ? 16 : _l, _m = _a.right, right = _m === void 0 ? 0 : _m, _o = _a.size, size = _o === void 0 ? 16 : _o, _p = _a.style, style = _p === void 0 ? {} : _p, _q = _a.top, top = _q === void 0 ? 0 : _q, _r = _a.transparent, transparent = _r === void 0 ? false : _r, _s = _a.outlineColor, outlineColor = _s === void 0 ? false : _s, props = __rest(_a, ["backgroundColor", "bold", "borderRadius", "bottom", "center", "disabled", "isLoading", "label", "left", "onPress", "padding", "right", "size", "style", "top", "transparent", "outlineColor"]);
|
|
1072
1072
|
var isDisabled = disabled || isLoading;
|
|
1073
1073
|
var isOutline = Boolean(outlineColor);
|
|
1074
1074
|
var computedBackgroundColor = (function () {
|
|
@@ -1080,7 +1080,7 @@ var Button = function (_a) {
|
|
|
1080
1080
|
return colors.white;
|
|
1081
1081
|
return backgroundColor;
|
|
1082
1082
|
})();
|
|
1083
|
-
var buttonStyle = __assign(__assign(
|
|
1083
|
+
var buttonStyle = __assign(__assign({ backgroundColor: computedBackgroundColor, border: isOutline ? "1px solid ".concat(outlineColor) : 'none', borderRadius: borderRadius, color: isOutline ? outlineColor : colors.white, fontSize: size, fontWeight: bold ? 'bold' : 'normal', marginTop: top, marginRight: right, marginBottom: bottom, marginLeft: left, outline: !outlineColor && 'none', padding: padding, textAlign: center ? 'center' : 'left' }, style), styles$g.content);
|
|
1084
1084
|
return (jsx("button", __assign({ type: "submit", disabled: isDisabled, onClick: onPress, style: buttonStyle }, props, { children: isLoading ? jsx(LoadingSpinner, { loadingType: 'section-s' }) : label })));
|
|
1085
1085
|
};
|
|
1086
1086
|
|
|
@@ -156722,7 +156722,7 @@ var ImageSlider = function (_a) {
|
|
|
156722
156722
|
var currentTarget = _a.currentTarget;
|
|
156723
156723
|
currentTarget.onerror = null;
|
|
156724
156724
|
currentTarget.src = images.image_not_available;
|
|
156725
|
-
} }), showIndicator && (jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] })))] }))) : (jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
|
|
156725
|
+
} }), showIndicator && (images$1 === null || images$1 === void 0 ? void 0 : images$1.length) > 0 && (jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] })))] }))) : (jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
|
|
156726
156726
|
? (_c = images$1 === null || images$1 === void 0 ? void 0 : images$1[currentIndex]) === null || _c === void 0 ? void 0 : _c.file
|
|
156727
156727
|
: images.image_not_available })] }));
|
|
156728
156728
|
};
|
package/dist/index.js
CHANGED
|
@@ -1077,7 +1077,7 @@ var styles$g = {
|
|
|
1077
1077
|
};
|
|
1078
1078
|
|
|
1079
1079
|
var Button = function (_a) {
|
|
1080
|
-
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j,
|
|
1080
|
+
var _b = _a.backgroundColor, backgroundColor = _b === void 0 ? colors.black : _b, _c = _a.bold, bold = _c === void 0 ? false : _c, _d = _a.borderRadius, borderRadius = _d === void 0 ? 8 : _d, _e = _a.bottom, bottom = _e === void 0 ? 0 : _e, _f = _a.center, center = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g, _h = _a.isLoading, isLoading = _h === void 0 ? false : _h, label = _a.label, _j = _a.left, left = _j === void 0 ? 0 : _j, _k = _a.onPress, onPress = _k === void 0 ? function () { } : _k, _l = _a.padding, padding = _l === void 0 ? 16 : _l, _m = _a.right, right = _m === void 0 ? 0 : _m, _o = _a.size, size = _o === void 0 ? 16 : _o, _p = _a.style, style = _p === void 0 ? {} : _p, _q = _a.top, top = _q === void 0 ? 0 : _q, _r = _a.transparent, transparent = _r === void 0 ? false : _r, _s = _a.outlineColor, outlineColor = _s === void 0 ? false : _s, props = __rest(_a, ["backgroundColor", "bold", "borderRadius", "bottom", "center", "disabled", "isLoading", "label", "left", "onPress", "padding", "right", "size", "style", "top", "transparent", "outlineColor"]);
|
|
1081
1081
|
var isDisabled = disabled || isLoading;
|
|
1082
1082
|
var isOutline = Boolean(outlineColor);
|
|
1083
1083
|
var computedBackgroundColor = (function () {
|
|
@@ -1089,7 +1089,7 @@ var Button = function (_a) {
|
|
|
1089
1089
|
return colors.white;
|
|
1090
1090
|
return backgroundColor;
|
|
1091
1091
|
})();
|
|
1092
|
-
var buttonStyle = __assign(__assign(
|
|
1092
|
+
var buttonStyle = __assign(__assign({ backgroundColor: computedBackgroundColor, border: isOutline ? "1px solid ".concat(outlineColor) : 'none', borderRadius: borderRadius, color: isOutline ? outlineColor : colors.white, fontSize: size, fontWeight: bold ? 'bold' : 'normal', marginTop: top, marginRight: right, marginBottom: bottom, marginLeft: left, outline: !outlineColor && 'none', padding: padding, textAlign: center ? 'center' : 'left' }, style), styles$g.content);
|
|
1093
1093
|
return (jsxRuntime.jsx("button", __assign({ type: "submit", disabled: isDisabled, onClick: onPress, style: buttonStyle }, props, { children: isLoading ? jsxRuntime.jsx(LoadingSpinner, { loadingType: 'section-s' }) : label })));
|
|
1094
1094
|
};
|
|
1095
1095
|
|
|
@@ -156731,7 +156731,7 @@ var ImageSlider = function (_a) {
|
|
|
156731
156731
|
var currentTarget = _a.currentTarget;
|
|
156732
156732
|
currentTarget.onerror = null;
|
|
156733
156733
|
currentTarget.src = images.image_not_available;
|
|
156734
|
-
} }), showIndicator && (jsxRuntime.jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] })))] }))) : (jsxRuntime.jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsxRuntime.jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
|
|
156734
|
+
} }), showIndicator && (images$1 === null || images$1 === void 0 ? void 0 : images$1.length) > 0 && (jsxRuntime.jsxs("div", __assign({ style: styles$8.counter }, { children: [currentIndex + 1, " / ", images$1.length] })))] }))) : (jsxRuntime.jsx(Images, { src: '', style: __assign(__assign({}, styles$8.imageNotAvailable), style) })), jsxRuntime.jsx(PhotoPreviewModal, { visible: isPreviewVisible, onDismiss: function () { return setIsPreviewVisible(false); }, imageUrl: images$1.length > 0
|
|
156735
156735
|
? (_c = images$1 === null || images$1 === void 0 ? void 0 : images$1[currentIndex]) === null || _c === void 0 ? void 0 : _c.file
|
|
156736
156736
|
: images.image_not_available })] }));
|
|
156737
156737
|
};
|