@umituz/react-native-subscription 2.11.28 → 2.12.1
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/package.json +3 -3
- package/src/presentation/components/details/CreditRow.tsx +10 -16
- package/src/presentation/components/details/DetailRow.tsx +11 -17
- package/src/presentation/components/details/PremiumStatusBadge.tsx +4 -5
- package/src/presentation/components/paywall/CreditsTabContent.tsx +6 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@umituz/react-native-subscription",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.12.1",
|
|
4
4
|
"description": "Complete subscription management with RevenueCat, paywall UI, and credits system for React Native apps",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"types": "./src/index.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@tanstack/react-query": "^5.0.0",
|
|
49
49
|
"@types/react": "~19.1.10",
|
|
50
|
-
"@umituz/react-native-design-system": "^2.
|
|
50
|
+
"@umituz/react-native-design-system": "^2.2.0",
|
|
51
51
|
"@umituz/react-native-firebase": "*",
|
|
52
52
|
"@umituz/react-native-legal": "*",
|
|
53
53
|
"@umituz/react-native-localization": "*",
|
|
@@ -70,4 +70,4 @@
|
|
|
70
70
|
"LICENSE"
|
|
71
71
|
],
|
|
72
72
|
"dependencies": {}
|
|
73
|
-
}
|
|
73
|
+
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
export interface CreditRowProps {
|
|
11
11
|
label: string;
|
|
@@ -27,17 +27,17 @@ export const CreditRow: React.FC<CreditRowProps> = ({
|
|
|
27
27
|
return (
|
|
28
28
|
<View style={styles.container}>
|
|
29
29
|
<View style={styles.header}>
|
|
30
|
-
<
|
|
30
|
+
<AtomicText type="bodySmall" style={{ color: tokens.colors.text }}>
|
|
31
31
|
{label}
|
|
32
|
-
</
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
</AtomicText>
|
|
33
|
+
<AtomicText
|
|
34
|
+
type="bodySmall"
|
|
35
|
+
style={{
|
|
36
|
+
color: isLow ? tokens.colors.warning : tokens.colors.textSecondary,
|
|
37
|
+
}}
|
|
38
38
|
>
|
|
39
39
|
{current} / {total} {remainingLabel}
|
|
40
|
-
</
|
|
40
|
+
</AtomicText>
|
|
41
41
|
</View>
|
|
42
42
|
<View
|
|
43
43
|
style={[styles.progressBar, { backgroundColor: tokens.colors.surfaceSecondary }]}
|
|
@@ -65,12 +65,6 @@ const styles = StyleSheet.create({
|
|
|
65
65
|
justifyContent: "space-between",
|
|
66
66
|
alignItems: "center",
|
|
67
67
|
},
|
|
68
|
-
label: {
|
|
69
|
-
fontSize: 13,
|
|
70
|
-
},
|
|
71
|
-
count: {
|
|
72
|
-
fontSize: 12,
|
|
73
|
-
},
|
|
74
68
|
progressBar: {
|
|
75
69
|
height: 6,
|
|
76
70
|
borderRadius: 3,
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
|
|
10
10
|
export interface DetailRowProps {
|
|
11
11
|
label: string;
|
|
@@ -22,17 +22,18 @@ export const DetailRow: React.FC<DetailRowProps> = ({
|
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<View style={styles.container}>
|
|
25
|
-
<
|
|
25
|
+
<AtomicText type="bodyMedium" style={{ color: tokens.colors.textSecondary }}>
|
|
26
26
|
{label}
|
|
27
|
-
</
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
</AtomicText>
|
|
28
|
+
<AtomicText
|
|
29
|
+
type="bodyMedium"
|
|
30
|
+
style={{
|
|
31
|
+
color: highlight ? tokens.colors.warning : tokens.colors.text,
|
|
32
|
+
fontWeight: "500",
|
|
33
|
+
}}
|
|
33
34
|
>
|
|
34
35
|
{value}
|
|
35
|
-
</
|
|
36
|
+
</AtomicText>
|
|
36
37
|
</View>
|
|
37
38
|
);
|
|
38
39
|
};
|
|
@@ -43,11 +44,4 @@ const styles = StyleSheet.create({
|
|
|
43
44
|
justifyContent: "space-between",
|
|
44
45
|
alignItems: "center",
|
|
45
46
|
},
|
|
46
|
-
label: {
|
|
47
|
-
fontSize: 14,
|
|
48
|
-
},
|
|
49
|
-
value: {
|
|
50
|
-
fontSize: 14,
|
|
51
|
-
fontWeight: "500",
|
|
52
|
-
},
|
|
53
47
|
});
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
|
-
import { View,
|
|
8
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
7
|
+
import { View, StyleSheet } from "react-native";
|
|
8
|
+
import { useAppDesignTokens, AtomicText } from "@umituz/react-native-design-system";
|
|
9
9
|
import { SubscriptionStatusType } from "../../../domain/entities/SubscriptionStatus";
|
|
10
10
|
export type { SubscriptionStatusType };
|
|
11
11
|
|
|
@@ -48,9 +48,9 @@ export const PremiumStatusBadge: React.FC<PremiumStatusBadgeProps> = ({
|
|
|
48
48
|
|
|
49
49
|
return (
|
|
50
50
|
<View style={[styles.badge, { backgroundColor }]}>
|
|
51
|
-
<
|
|
51
|
+
<AtomicText type="labelSmall" style={[styles.badgeText, { color: tokens.colors.onPrimary }]}>
|
|
52
52
|
{label}
|
|
53
|
-
</
|
|
53
|
+
</AtomicText>
|
|
54
54
|
</View>
|
|
55
55
|
);
|
|
56
56
|
};
|
|
@@ -62,7 +62,6 @@ const styles = StyleSheet.create({
|
|
|
62
62
|
borderRadius: 4,
|
|
63
63
|
},
|
|
64
64
|
badgeText: {
|
|
65
|
-
fontSize: 12,
|
|
66
65
|
fontWeight: "600",
|
|
67
66
|
},
|
|
68
67
|
});
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import React from "react";
|
|
7
7
|
import { View, StyleSheet, ScrollView } from "react-native";
|
|
8
|
-
import { AtomicText, AtomicButton } from "@umituz/react-native-design-system";
|
|
9
|
-
import { useAppDesignTokens } from "@umituz/react-native-design-system";
|
|
8
|
+
import { AtomicText, AtomicButton, Grid, useResponsiveDesignTokens } from "@umituz/react-native-design-system";
|
|
10
9
|
import { useLocalization } from "@umituz/react-native-localization";
|
|
11
10
|
import { CreditsPackageCard } from "./CreditsPackageCard";
|
|
12
11
|
import { PaywallLegalFooter } from "./PaywallLegalFooter";
|
|
@@ -38,7 +37,7 @@ export const CreditsTabContent: React.FC<CreditsTabContentProps> = React.memo(
|
|
|
38
37
|
creditsInfoText,
|
|
39
38
|
processingText,
|
|
40
39
|
}) => {
|
|
41
|
-
const tokens =
|
|
40
|
+
const tokens = useResponsiveDesignTokens();
|
|
42
41
|
const { t } = useLocalization();
|
|
43
42
|
|
|
44
43
|
const needsCredits = requiredCredits && requiredCredits > currentCredits;
|
|
@@ -72,10 +71,10 @@ export const CreditsTabContent: React.FC<CreditsTabContentProps> = React.memo(
|
|
|
72
71
|
|
|
73
72
|
<ScrollView
|
|
74
73
|
style={styles.scrollView}
|
|
75
|
-
contentContainerStyle={styles.scrollContent}
|
|
74
|
+
contentContainerStyle={[styles.scrollContent, { paddingHorizontal: tokens.spacing.lg, paddingBottom: tokens.spacing.md }]}
|
|
76
75
|
showsVerticalScrollIndicator={false}
|
|
77
76
|
>
|
|
78
|
-
<
|
|
77
|
+
<Grid mobileColumns={1} tabletColumns={2} gap={tokens.spacing.sm}>
|
|
79
78
|
{packages.map((pkg) => (
|
|
80
79
|
<CreditsPackageCard
|
|
81
80
|
key={pkg.id}
|
|
@@ -84,7 +83,7 @@ export const CreditsTabContent: React.FC<CreditsTabContentProps> = React.memo(
|
|
|
84
83
|
onSelect={() => onSelectPackage(pkg.id)}
|
|
85
84
|
/>
|
|
86
85
|
))}
|
|
87
|
-
</
|
|
86
|
+
</Grid>
|
|
88
87
|
</ScrollView>
|
|
89
88
|
|
|
90
89
|
<View style={styles.footer}>
|
|
@@ -116,13 +115,7 @@ const styles = StyleSheet.create({
|
|
|
116
115
|
scrollView: {
|
|
117
116
|
flex: 1,
|
|
118
117
|
},
|
|
119
|
-
scrollContent: {
|
|
120
|
-
paddingHorizontal: 24,
|
|
121
|
-
paddingBottom: 16,
|
|
122
|
-
},
|
|
123
|
-
packagesContainer: {
|
|
124
|
-
gap: 12,
|
|
125
|
-
},
|
|
118
|
+
scrollContent: {},
|
|
126
119
|
footer: {
|
|
127
120
|
padding: 24,
|
|
128
121
|
paddingTop: 16,
|