dhre-ui-kit 0.0.368 → 0.0.370
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 +3 -0
- package/lib/index.js +57 -23
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +57 -23
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.d.ts
CHANGED
|
@@ -55,6 +55,9 @@ interface BottomDrawerProps {
|
|
|
55
55
|
propagateSwipe?: boolean;
|
|
56
56
|
swipeDirection?: string;
|
|
57
57
|
footer?: React.ReactNode;
|
|
58
|
+
rightTitleVariant?: string;
|
|
59
|
+
rightTitle?: string;
|
|
60
|
+
rightTitleStyle?: TextStyle;
|
|
58
61
|
}
|
|
59
62
|
|
|
60
63
|
declare const BottomDrawer: React$1.FC<BottomDrawerProps>;
|
package/lib/index.js
CHANGED
|
@@ -694,7 +694,18 @@ const styles$z = reactNative.StyleSheet.create({
|
|
|
694
694
|
},
|
|
695
695
|
title: { flex: 1, color: "#fff", textAlign: "left" },
|
|
696
696
|
leftIconStyle: { marginRight: 8 },
|
|
697
|
-
|
|
697
|
+
rightTitle: {
|
|
698
|
+
color: "#fff",
|
|
699
|
+
textAlign: "right",
|
|
700
|
+
marginRight: moderateScale(16)
|
|
701
|
+
},
|
|
702
|
+
rightIconStyle: {
|
|
703
|
+
marginLeft: 0
|
|
704
|
+
},
|
|
705
|
+
rightSideStyle: {
|
|
706
|
+
flexDirection: "row",
|
|
707
|
+
alignItems: "center"
|
|
708
|
+
}
|
|
698
709
|
});
|
|
699
710
|
|
|
700
711
|
const isIos = () => reactNative.Platform.OS === "ios" /* ios */;
|
|
@@ -724,7 +735,10 @@ const BottomDrawer = ({
|
|
|
724
735
|
backdropOpacity = 0.9,
|
|
725
736
|
footer,
|
|
726
737
|
propagateSwipe = true,
|
|
727
|
-
swipeDirection = "down"
|
|
738
|
+
swipeDirection = "down",
|
|
739
|
+
rightTitleVariant = "B2_REGULAR",
|
|
740
|
+
rightTitle,
|
|
741
|
+
rightTitleStyle
|
|
728
742
|
}) => {
|
|
729
743
|
return /* @__PURE__ */ React__default["default"].createElement(
|
|
730
744
|
Modal__default["default"],
|
|
@@ -744,7 +758,7 @@ const BottomDrawer = ({
|
|
|
744
758
|
behavior: isIos() ? "padding" : "height",
|
|
745
759
|
style: { flex: 1 }
|
|
746
760
|
},
|
|
747
|
-
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.mainContainer, style], testID }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: () => swipeDirection === "" && toggleModal() }, showSeparator && /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.separator }), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.headerContainer }, showLeftIcon && leftIcon ? React__default["default"].cloneElement(leftIcon, {
|
|
761
|
+
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.mainContainer, style], testID }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React__default["default"].createElement(reactNative.Pressable, { onPress: () => swipeDirection === "" && toggleModal() }, showSeparator && /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.separator }), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles$z.headerContainer }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, null, showLeftIcon && leftIcon ? React__default["default"].cloneElement(leftIcon, {
|
|
748
762
|
width: moderateScale(24),
|
|
749
763
|
height: moderateScale(24),
|
|
750
764
|
style: styles$z.leftIconStyle,
|
|
@@ -756,12 +770,19 @@ const BottomDrawer = ({
|
|
|
756
770
|
text: title,
|
|
757
771
|
style: { ...styles$z.title, ...titleStyle }
|
|
758
772
|
}
|
|
759
|
-
),
|
|
773
|
+
)), /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: rightTitle?.length ? styles$z.rightSideStyle : {} }, rightTitle?.length ? /* @__PURE__ */ React__default["default"].createElement(
|
|
774
|
+
CustomTypography,
|
|
775
|
+
{
|
|
776
|
+
variant: rightTitleVariant,
|
|
777
|
+
text: rightTitle,
|
|
778
|
+
style: { ...styles$z.rightTitle, ...rightTitleStyle }
|
|
779
|
+
}
|
|
780
|
+
) : null, showRightIcon && rightIcon ? React__default["default"].cloneElement(rightIcon, {
|
|
760
781
|
width: moderateScale(24),
|
|
761
782
|
height: moderateScale(24),
|
|
762
783
|
style: styles$z.rightIconStyle,
|
|
763
784
|
onPress: toggleModal
|
|
764
|
-
}) : null)), children))
|
|
785
|
+
}) : null))), children))
|
|
765
786
|
),
|
|
766
787
|
footer ? /* @__PURE__ */ React__default["default"].createElement(React__default["default"].Fragment, null, footer) : null
|
|
767
788
|
);
|
|
@@ -783,8 +804,6 @@ const createStyles$3 = (theme) => {
|
|
|
783
804
|
backgroundColor: "rgba(0, 0, 0, 0.3)"
|
|
784
805
|
},
|
|
785
806
|
box: {
|
|
786
|
-
width: horizontalScale(100),
|
|
787
|
-
paddingVertical: 12,
|
|
788
807
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
789
808
|
borderRadius: 16,
|
|
790
809
|
justifyContent: "center",
|
|
@@ -2374,25 +2393,40 @@ const CustomLoader = ({
|
|
|
2374
2393
|
}) => {
|
|
2375
2394
|
const { theme, mode } = useTheme();
|
|
2376
2395
|
const styles = createStyles$3(theme);
|
|
2396
|
+
const isDP = brandName === "DP";
|
|
2377
2397
|
if (!loading) return null;
|
|
2378
2398
|
else {
|
|
2379
|
-
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles.container, customeContainer] }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles.backdrop, customeBackDrop] }, /* @__PURE__ */ React__default["default"].createElement(
|
|
2380
|
-
|
|
2381
|
-
{
|
|
2382
|
-
style: styles.loader,
|
|
2383
|
-
source: brandName === "DP" ? DEFAULT_LOADER : mode === "dark" ? LOADER_LIGHT : LOADER_DARK,
|
|
2384
|
-
autoPlay: true,
|
|
2385
|
-
loop: true
|
|
2386
|
-
}
|
|
2387
|
-
)), loadingText && /* @__PURE__ */ React__default["default"].createElement(
|
|
2388
|
-
CustomText$1,
|
|
2399
|
+
return /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles.container, customeContainer] }, /* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: [styles.backdrop, customeBackDrop] }, /* @__PURE__ */ React__default["default"].createElement(
|
|
2400
|
+
reactNative.View,
|
|
2389
2401
|
{
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2402
|
+
style: [
|
|
2403
|
+
styles.box,
|
|
2404
|
+
{
|
|
2405
|
+
width: horizontalScale(isDP ? 100 : 148),
|
|
2406
|
+
paddingVertical: isDP ? 12 : 24
|
|
2407
|
+
},
|
|
2408
|
+
customeBox
|
|
2409
|
+
]
|
|
2410
|
+
},
|
|
2411
|
+
/* @__PURE__ */ React__default["default"].createElement(reactNative.View, { style: styles.loader }, /* @__PURE__ */ React__default["default"].createElement(
|
|
2412
|
+
LottieView__default["default"],
|
|
2413
|
+
{
|
|
2414
|
+
style: styles.loader,
|
|
2415
|
+
source: isDP ? DEFAULT_LOADER : mode === "dark" ? LOADER_LIGHT : LOADER_DARK,
|
|
2416
|
+
autoPlay: true,
|
|
2417
|
+
loop: true
|
|
2418
|
+
}
|
|
2419
|
+
)),
|
|
2420
|
+
loadingText && /* @__PURE__ */ React__default["default"].createElement(
|
|
2421
|
+
CustomText$1,
|
|
2422
|
+
{
|
|
2423
|
+
text: loadingText,
|
|
2424
|
+
style: styles.text,
|
|
2425
|
+
variant: FontStyle.B4_REGULAR,
|
|
2426
|
+
textColor: "#000000"
|
|
2427
|
+
}
|
|
2428
|
+
)
|
|
2429
|
+
)));
|
|
2396
2430
|
}
|
|
2397
2431
|
};
|
|
2398
2432
|
var CustomLoader$1 = withThemeProvider(CustomLoader);
|