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.mjs
CHANGED
|
@@ -658,7 +658,18 @@ const styles$z = StyleSheet.create({
|
|
|
658
658
|
},
|
|
659
659
|
title: { flex: 1, color: "#fff", textAlign: "left" },
|
|
660
660
|
leftIconStyle: { marginRight: 8 },
|
|
661
|
-
|
|
661
|
+
rightTitle: {
|
|
662
|
+
color: "#fff",
|
|
663
|
+
textAlign: "right",
|
|
664
|
+
marginRight: moderateScale(16)
|
|
665
|
+
},
|
|
666
|
+
rightIconStyle: {
|
|
667
|
+
marginLeft: 0
|
|
668
|
+
},
|
|
669
|
+
rightSideStyle: {
|
|
670
|
+
flexDirection: "row",
|
|
671
|
+
alignItems: "center"
|
|
672
|
+
}
|
|
662
673
|
});
|
|
663
674
|
|
|
664
675
|
const isIos = () => Platform.OS === "ios" /* ios */;
|
|
@@ -688,7 +699,10 @@ const BottomDrawer = ({
|
|
|
688
699
|
backdropOpacity = 0.9,
|
|
689
700
|
footer,
|
|
690
701
|
propagateSwipe = true,
|
|
691
|
-
swipeDirection = "down"
|
|
702
|
+
swipeDirection = "down",
|
|
703
|
+
rightTitleVariant = "B2_REGULAR",
|
|
704
|
+
rightTitle,
|
|
705
|
+
rightTitleStyle
|
|
692
706
|
}) => {
|
|
693
707
|
return /* @__PURE__ */ React.createElement(
|
|
694
708
|
Modal,
|
|
@@ -708,7 +722,7 @@ const BottomDrawer = ({
|
|
|
708
722
|
behavior: isIos() ? "padding" : "height",
|
|
709
723
|
style: { flex: 1 }
|
|
710
724
|
},
|
|
711
|
-
/* @__PURE__ */ React.createElement(View, { style: [styles$z.mainContainer, style], testID }, /* @__PURE__ */ React.createElement(View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React.createElement(Pressable, { onPress: () => swipeDirection === "" && toggleModal() }, showSeparator && /* @__PURE__ */ React.createElement(View, { style: styles$z.separator }), /* @__PURE__ */ React.createElement(View, { style: styles$z.headerContainer }, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
725
|
+
/* @__PURE__ */ React.createElement(View, { style: [styles$z.mainContainer, style], testID }, /* @__PURE__ */ React.createElement(View, { style: [styles$z.modalContainer, modalContainerStyle] }, showHeader && /* @__PURE__ */ React.createElement(Pressable, { onPress: () => swipeDirection === "" && toggleModal() }, showSeparator && /* @__PURE__ */ React.createElement(View, { style: styles$z.separator }), /* @__PURE__ */ React.createElement(View, { style: styles$z.headerContainer }, /* @__PURE__ */ React.createElement(View, null, showLeftIcon && leftIcon ? React.cloneElement(leftIcon, {
|
|
712
726
|
width: moderateScale(24),
|
|
713
727
|
height: moderateScale(24),
|
|
714
728
|
style: styles$z.leftIconStyle,
|
|
@@ -720,12 +734,19 @@ const BottomDrawer = ({
|
|
|
720
734
|
text: title,
|
|
721
735
|
style: { ...styles$z.title, ...titleStyle }
|
|
722
736
|
}
|
|
723
|
-
),
|
|
737
|
+
)), /* @__PURE__ */ React.createElement(View, { style: rightTitle?.length ? styles$z.rightSideStyle : {} }, rightTitle?.length ? /* @__PURE__ */ React.createElement(
|
|
738
|
+
CustomTypography,
|
|
739
|
+
{
|
|
740
|
+
variant: rightTitleVariant,
|
|
741
|
+
text: rightTitle,
|
|
742
|
+
style: { ...styles$z.rightTitle, ...rightTitleStyle }
|
|
743
|
+
}
|
|
744
|
+
) : null, showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
724
745
|
width: moderateScale(24),
|
|
725
746
|
height: moderateScale(24),
|
|
726
747
|
style: styles$z.rightIconStyle,
|
|
727
748
|
onPress: toggleModal
|
|
728
|
-
}) : null)), children))
|
|
749
|
+
}) : null))), children))
|
|
729
750
|
),
|
|
730
751
|
footer ? /* @__PURE__ */ React.createElement(React.Fragment, null, footer) : null
|
|
731
752
|
);
|
|
@@ -747,8 +768,6 @@ const createStyles$3 = (theme) => {
|
|
|
747
768
|
backgroundColor: "rgba(0, 0, 0, 0.3)"
|
|
748
769
|
},
|
|
749
770
|
box: {
|
|
750
|
-
width: horizontalScale(100),
|
|
751
|
-
paddingVertical: 12,
|
|
752
771
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
753
772
|
borderRadius: 16,
|
|
754
773
|
justifyContent: "center",
|
|
@@ -2338,25 +2357,40 @@ const CustomLoader = ({
|
|
|
2338
2357
|
}) => {
|
|
2339
2358
|
const { theme, mode } = useTheme();
|
|
2340
2359
|
const styles = createStyles$3(theme);
|
|
2360
|
+
const isDP = brandName === "DP";
|
|
2341
2361
|
if (!loading) return null;
|
|
2342
2362
|
else {
|
|
2343
|
-
return /* @__PURE__ */ React.createElement(View, { style: [styles.container, customeContainer] }, /* @__PURE__ */ React.createElement(View, { style: [styles.backdrop, customeBackDrop] }, /* @__PURE__ */ React.createElement(
|
|
2344
|
-
|
|
2345
|
-
{
|
|
2346
|
-
style: styles.loader,
|
|
2347
|
-
source: brandName === "DP" ? DEFAULT_LOADER : mode === "dark" ? LOADER_LIGHT : LOADER_DARK,
|
|
2348
|
-
autoPlay: true,
|
|
2349
|
-
loop: true
|
|
2350
|
-
}
|
|
2351
|
-
)), loadingText && /* @__PURE__ */ React.createElement(
|
|
2352
|
-
CustomText$1,
|
|
2363
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles.container, customeContainer] }, /* @__PURE__ */ React.createElement(View, { style: [styles.backdrop, customeBackDrop] }, /* @__PURE__ */ React.createElement(
|
|
2364
|
+
View,
|
|
2353
2365
|
{
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2366
|
+
style: [
|
|
2367
|
+
styles.box,
|
|
2368
|
+
{
|
|
2369
|
+
width: horizontalScale(isDP ? 100 : 148),
|
|
2370
|
+
paddingVertical: isDP ? 12 : 24
|
|
2371
|
+
},
|
|
2372
|
+
customeBox
|
|
2373
|
+
]
|
|
2374
|
+
},
|
|
2375
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.loader }, /* @__PURE__ */ React.createElement(
|
|
2376
|
+
LottieView,
|
|
2377
|
+
{
|
|
2378
|
+
style: styles.loader,
|
|
2379
|
+
source: isDP ? DEFAULT_LOADER : mode === "dark" ? LOADER_LIGHT : LOADER_DARK,
|
|
2380
|
+
autoPlay: true,
|
|
2381
|
+
loop: true
|
|
2382
|
+
}
|
|
2383
|
+
)),
|
|
2384
|
+
loadingText && /* @__PURE__ */ React.createElement(
|
|
2385
|
+
CustomText$1,
|
|
2386
|
+
{
|
|
2387
|
+
text: loadingText,
|
|
2388
|
+
style: styles.text,
|
|
2389
|
+
variant: FontStyle.B4_REGULAR,
|
|
2390
|
+
textColor: "#000000"
|
|
2391
|
+
}
|
|
2392
|
+
)
|
|
2393
|
+
)));
|
|
2360
2394
|
}
|
|
2361
2395
|
};
|
|
2362
2396
|
var CustomLoader$1 = withThemeProvider(CustomLoader);
|