dhre-ui-kit 0.0.388 → 0.0.391
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/lib/index.d.ts +1 -0
- package/lib/index.js +13 -22
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +13 -21
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -2
package/lib/index.mjs
CHANGED
|
@@ -7,7 +7,6 @@ import LottieView from 'lottie-react-native';
|
|
|
7
7
|
import Tooltip from 'react-native-walkthrough-tooltip';
|
|
8
8
|
import Pdf from 'react-native-pdf';
|
|
9
9
|
import * as Progress from 'react-native-progress';
|
|
10
|
-
import translate from 'google-translate-api-x';
|
|
11
10
|
import { GestureHandlerRootView, Swipeable, ScrollView as ScrollView$1 } from 'react-native-gesture-handler';
|
|
12
11
|
import DeviceInfo from 'react-native-device-info';
|
|
13
12
|
import { Calendar } from 'react-native-calendars';
|
|
@@ -3677,10 +3676,7 @@ const styles$l = StyleSheet.create({
|
|
|
3677
3676
|
flex: 1,
|
|
3678
3677
|
color: "#fff",
|
|
3679
3678
|
textAlign: "left",
|
|
3680
|
-
marginLeft: horizontalScale(8)
|
|
3681
|
-
fontSize: moderateScale(12),
|
|
3682
|
-
lineHeight: verticalScale(16.8),
|
|
3683
|
-
fontFamily: "MeraasAktiv-Regular"
|
|
3679
|
+
marginLeft: horizontalScale(8)
|
|
3684
3680
|
},
|
|
3685
3681
|
button: {
|
|
3686
3682
|
marginLeft: 9
|
|
@@ -3723,7 +3719,6 @@ const Toast = React.forwardRef(
|
|
|
3723
3719
|
);
|
|
3724
3720
|
const [subjectText, setSubjectText] = useState(null);
|
|
3725
3721
|
const [warning, setWarning] = useState(false);
|
|
3726
|
-
const [translatedText, setTranslatedText] = useState();
|
|
3727
3722
|
const bottom = useRef(new Animated.Value(-80)).current;
|
|
3728
3723
|
const showToast = (toastMessage, duration = 3e3, success = true, buttonText = null, buttonAction = null, height2 = 72, subText = null, subTextPress = null, warning2 = false) => {
|
|
3729
3724
|
setMessage(toastMessage);
|
|
@@ -3767,18 +3762,7 @@ const Toast = React.forwardRef(
|
|
|
3767
3762
|
React.useImperativeHandle(ref, () => ({
|
|
3768
3763
|
showToast
|
|
3769
3764
|
}));
|
|
3770
|
-
|
|
3771
|
-
const translateText = async () => {
|
|
3772
|
-
try {
|
|
3773
|
-
const res = await translate(message, { to: "ar" });
|
|
3774
|
-
setTranslatedText(res?.text);
|
|
3775
|
-
} catch (error) {
|
|
3776
|
-
setTranslatedText(message);
|
|
3777
|
-
}
|
|
3778
|
-
};
|
|
3779
|
-
translateText();
|
|
3780
|
-
}, [message]);
|
|
3781
|
-
return visible && translatedText?.length ? /* @__PURE__ */ React.createElement(
|
|
3765
|
+
return visible ? /* @__PURE__ */ React.createElement(
|
|
3782
3766
|
Animated.View,
|
|
3783
3767
|
{
|
|
3784
3768
|
style: [
|
|
@@ -3789,7 +3773,14 @@ const Toast = React.forwardRef(
|
|
|
3789
3773
|
],
|
|
3790
3774
|
testID: "TOAST"
|
|
3791
3775
|
},
|
|
3792
|
-
/* @__PURE__ */ React.createElement(View, { style: styles$l.toastContainer }, /* @__PURE__ */ React.createElement(View, { style: styles$l.innerContainer }, /* @__PURE__ */ React.createElement(Pressable, { onPress: hideToast }, isSuccess ? sucessIcon : warning ? warningIcon : errorIcon), /* @__PURE__ */ React.createElement(
|
|
3776
|
+
/* @__PURE__ */ React.createElement(View, { style: styles$l.toastContainer }, /* @__PURE__ */ React.createElement(View, { style: styles$l.innerContainer }, /* @__PURE__ */ React.createElement(Pressable, { onPress: hideToast }, isSuccess ? sucessIcon : warning ? warningIcon : errorIcon), /* @__PURE__ */ React.createElement(
|
|
3777
|
+
CustomTypography,
|
|
3778
|
+
{
|
|
3779
|
+
variant: "L2_REGULAR",
|
|
3780
|
+
text: message,
|
|
3781
|
+
style: styles$l.messageText
|
|
3782
|
+
}
|
|
3783
|
+
), btnText && /* @__PURE__ */ React.createElement(
|
|
3793
3784
|
Pressable,
|
|
3794
3785
|
{
|
|
3795
3786
|
style: styles$l.button,
|
|
@@ -6487,7 +6478,8 @@ const PropertyDetails = ({
|
|
|
6487
6478
|
containerStyle,
|
|
6488
6479
|
subTitleStyle,
|
|
6489
6480
|
propertyNumberStyle,
|
|
6490
|
-
onRightIconPress
|
|
6481
|
+
onRightIconPress,
|
|
6482
|
+
titleStyle
|
|
6491
6483
|
}) => {
|
|
6492
6484
|
const { theme } = useTheme();
|
|
6493
6485
|
return /* @__PURE__ */ React.createElement(
|
|
@@ -6509,7 +6501,7 @@ const PropertyDetails = ({
|
|
|
6509
6501
|
{
|
|
6510
6502
|
text: title,
|
|
6511
6503
|
variant: FontStyle.L2_REGULAR,
|
|
6512
|
-
style: { color: theme.CONTENT_PRIMARY }
|
|
6504
|
+
style: [{ color: theme.CONTENT_PRIMARY }, titleStyle]
|
|
6513
6505
|
}
|
|
6514
6506
|
), /* @__PURE__ */ React.createElement(
|
|
6515
6507
|
CustomTypography,
|