dhre-ui-kit 0.0.368 → 0.0.369
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 +47 -23
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +47 -23
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -658,7 +658,8 @@ const styles$z = StyleSheet.create({
|
|
|
658
658
|
},
|
|
659
659
|
title: { flex: 1, color: "#fff", textAlign: "left" },
|
|
660
660
|
leftIconStyle: { marginRight: 8 },
|
|
661
|
-
rightIconStyle: { marginLeft: 8 }
|
|
661
|
+
rightIconStyle: { marginLeft: 8 },
|
|
662
|
+
rightTitle: { flex: 1, color: "#fff", textAlign: "right", marginRight: verticalScale(16) }
|
|
662
663
|
});
|
|
663
664
|
|
|
664
665
|
const isIos = () => Platform.OS === "ios" /* ios */;
|
|
@@ -688,7 +689,10 @@ const BottomDrawer = ({
|
|
|
688
689
|
backdropOpacity = 0.9,
|
|
689
690
|
footer,
|
|
690
691
|
propagateSwipe = true,
|
|
691
|
-
swipeDirection = "down"
|
|
692
|
+
swipeDirection = "down",
|
|
693
|
+
rightTitleVariant = "B2_REGULAR",
|
|
694
|
+
rightTitle,
|
|
695
|
+
rightTitleStyle
|
|
692
696
|
}) => {
|
|
693
697
|
return /* @__PURE__ */ React.createElement(
|
|
694
698
|
Modal,
|
|
@@ -708,7 +712,7 @@ const BottomDrawer = ({
|
|
|
708
712
|
behavior: isIos() ? "padding" : "height",
|
|
709
713
|
style: { flex: 1 }
|
|
710
714
|
},
|
|
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, {
|
|
715
|
+
/* @__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
716
|
width: moderateScale(24),
|
|
713
717
|
height: moderateScale(24),
|
|
714
718
|
style: styles$z.leftIconStyle,
|
|
@@ -720,12 +724,19 @@ const BottomDrawer = ({
|
|
|
720
724
|
text: title,
|
|
721
725
|
style: { ...styles$z.title, ...titleStyle }
|
|
722
726
|
}
|
|
723
|
-
),
|
|
727
|
+
)), /* @__PURE__ */ React.createElement(View, null, rightTitle ? /* @__PURE__ */ React.createElement(
|
|
728
|
+
CustomTypography,
|
|
729
|
+
{
|
|
730
|
+
variant: rightTitleVariant,
|
|
731
|
+
text: rightTitle,
|
|
732
|
+
style: { ...styles$z.rightTitle, ...rightTitleStyle }
|
|
733
|
+
}
|
|
734
|
+
) : null, showRightIcon && rightIcon ? React.cloneElement(rightIcon, {
|
|
724
735
|
width: moderateScale(24),
|
|
725
736
|
height: moderateScale(24),
|
|
726
737
|
style: styles$z.rightIconStyle,
|
|
727
738
|
onPress: toggleModal
|
|
728
|
-
}) : null)), children))
|
|
739
|
+
}) : null))), children))
|
|
729
740
|
),
|
|
730
741
|
footer ? /* @__PURE__ */ React.createElement(React.Fragment, null, footer) : null
|
|
731
742
|
);
|
|
@@ -747,8 +758,6 @@ const createStyles$3 = (theme) => {
|
|
|
747
758
|
backgroundColor: "rgba(0, 0, 0, 0.3)"
|
|
748
759
|
},
|
|
749
760
|
box: {
|
|
750
|
-
width: horizontalScale(100),
|
|
751
|
-
paddingVertical: 12,
|
|
752
761
|
backgroundColor: theme.SURFACE_PRIMARY,
|
|
753
762
|
borderRadius: 16,
|
|
754
763
|
justifyContent: "center",
|
|
@@ -2338,25 +2347,40 @@ const CustomLoader = ({
|
|
|
2338
2347
|
}) => {
|
|
2339
2348
|
const { theme, mode } = useTheme();
|
|
2340
2349
|
const styles = createStyles$3(theme);
|
|
2350
|
+
const isDP = brandName === "DP";
|
|
2341
2351
|
if (!loading) return null;
|
|
2342
2352
|
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,
|
|
2353
|
+
return /* @__PURE__ */ React.createElement(View, { style: [styles.container, customeContainer] }, /* @__PURE__ */ React.createElement(View, { style: [styles.backdrop, customeBackDrop] }, /* @__PURE__ */ React.createElement(
|
|
2354
|
+
View,
|
|
2353
2355
|
{
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2356
|
+
style: [
|
|
2357
|
+
styles.box,
|
|
2358
|
+
{
|
|
2359
|
+
width: horizontalScale(isDP ? 100 : 148),
|
|
2360
|
+
paddingVertical: isDP ? 12 : 24
|
|
2361
|
+
},
|
|
2362
|
+
customeBox
|
|
2363
|
+
]
|
|
2364
|
+
},
|
|
2365
|
+
/* @__PURE__ */ React.createElement(View, { style: styles.loader }, /* @__PURE__ */ React.createElement(
|
|
2366
|
+
LottieView,
|
|
2367
|
+
{
|
|
2368
|
+
style: styles.loader,
|
|
2369
|
+
source: isDP ? DEFAULT_LOADER : mode === "dark" ? LOADER_LIGHT : LOADER_DARK,
|
|
2370
|
+
autoPlay: true,
|
|
2371
|
+
loop: true
|
|
2372
|
+
}
|
|
2373
|
+
)),
|
|
2374
|
+
loadingText && /* @__PURE__ */ React.createElement(
|
|
2375
|
+
CustomText$1,
|
|
2376
|
+
{
|
|
2377
|
+
text: loadingText,
|
|
2378
|
+
style: styles.text,
|
|
2379
|
+
variant: FontStyle.B4_REGULAR,
|
|
2380
|
+
textColor: "#000000"
|
|
2381
|
+
}
|
|
2382
|
+
)
|
|
2383
|
+
)));
|
|
2360
2384
|
}
|
|
2361
2385
|
};
|
|
2362
2386
|
var CustomLoader$1 = withThemeProvider(CustomLoader);
|