@umituz/react-native-subscription 2.14.50 → 2.14.52

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-subscription",
3
- "version": "2.14.50",
3
+ "version": "2.14.52",
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",
@@ -28,7 +28,7 @@ export interface BalanceCardProps {
28
28
  export const BalanceCard: React.FC<BalanceCardProps> = ({
29
29
  balance,
30
30
  translations,
31
- iconName = "Wallet",
31
+ iconName = "wallet",
32
32
  }) => {
33
33
  const tokens = useAppDesignTokens();
34
34
  const gradientColors = [
@@ -33,16 +33,16 @@ export interface TransactionItemProps {
33
33
 
34
34
  const getReasonIcon = (reason: TransactionReason): string => {
35
35
  const iconMap: Record<TransactionReason, string> = {
36
- purchase: "ShoppingCart",
37
- usage: "Zap",
38
- refund: "RotateCcw",
39
- bonus: "Gift",
40
- subscription: "Star",
41
- admin: "Shield",
42
- reward: "Award",
43
- expired: "Clock",
36
+ purchase: "shopping-cart",
37
+ usage: "zap",
38
+ refund: "rotate-ccw",
39
+ bonus: "gift",
40
+ subscription: "star",
41
+ admin: "shield",
42
+ reward: "award",
43
+ expired: "clock",
44
44
  };
45
- return iconMap[reason] || "Circle";
45
+ return iconMap[reason] || "circle";
46
46
  };
47
47
 
48
48
  const defaultDateFormatter = (timestamp: number): string => {
@@ -6,11 +6,12 @@
6
6
  */
7
7
 
8
8
  import React from "react";
9
- import { View, StyleSheet, ScrollView, ActivityIndicator } from "react-native";
9
+ import { View, StyleSheet, ScrollView } from "react-native";
10
10
  import {
11
11
  useAppDesignTokens,
12
12
  AtomicText,
13
13
  AtomicIcon,
14
+ AtomicSpinner,
14
15
  } from "@umituz/react-native-design-system";
15
16
  import type { CreditLog } from "../../domain/types/transaction.types";
16
17
  import {
@@ -50,22 +51,19 @@ export const TransactionList: React.FC<TransactionListProps> = ({
50
51
  >
51
52
  {translations.title}
52
53
  </AtomicText>
53
- <AtomicIcon name="History" size="md" color="secondary" />
54
+ <AtomicIcon name="history" size="md" color="secondary" />
54
55
  </View>
55
56
 
56
57
  {loading ? (
57
- <View style={styles.stateContainer}>
58
- <ActivityIndicator size="large" color={tokens.colors.primary} />
59
- <AtomicText
60
- type="bodyMedium"
61
- style={[styles.stateText, { color: tokens.colors.textSecondary }]}
62
- >
63
- {translations.loading}
64
- </AtomicText>
65
- </View>
58
+ <AtomicSpinner
59
+ size="lg"
60
+ color="primary"
61
+ text={translations.loading}
62
+ style={styles.stateContainer}
63
+ />
66
64
  ) : transactions.length === 0 ? (
67
65
  <View style={styles.stateContainer}>
68
- <AtomicIcon name="Package" size="xl" color="secondary" />
66
+ <AtomicIcon name="inbox" size="xl" color="secondary" />
69
67
  <AtomicText
70
68
  type="bodyMedium"
71
69
  style={[styles.stateText, { color: tokens.colors.textSecondary }]}
@@ -7,12 +7,13 @@
7
7
  */
8
8
 
9
9
  import React from "react";
10
- import { View, StyleSheet, ActivityIndicator, TouchableOpacity } from "react-native";
11
- import { useSafeAreaInsets } from "react-native-safe-area-context";
10
+ import { View, StyleSheet, TouchableOpacity } from "react-native";
12
11
  import {
12
+ useSafeAreaInsets,
13
13
  useAppDesignTokens,
14
14
  AtomicText,
15
15
  AtomicIcon,
16
+ AtomicSpinner,
16
17
  ScreenLayout,
17
18
  } from "@umituz/react-native-design-system";
18
19
  import {
@@ -61,7 +62,7 @@ export const WalletScreen: React.FC<WalletScreenProps> = ({ config }) => {
61
62
  hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
62
63
  >
63
64
  <AtomicIcon
64
- name="ArrowLeft"
65
+ name="arrow-left"
65
66
  size="lg"
66
67
  customColor={tokens.colors.textPrimary}
67
68
  />
@@ -79,15 +80,13 @@ export const WalletScreen: React.FC<WalletScreenProps> = ({ config }) => {
79
80
  const renderBalance = () => {
80
81
  if (config.balanceLoading) {
81
82
  return (
82
- <View style={styles.loadingContainer}>
83
- <ActivityIndicator size="large" color={tokens.colors.primary} />
84
- <AtomicText
85
- type="bodyMedium"
86
- style={[styles.loadingText, { color: tokens.colors.textSecondary }]}
87
- >
88
- {config.translations.loading}
89
- </AtomicText>
90
- </View>
83
+ <AtomicSpinner
84
+ size="xl"
85
+ color="primary"
86
+ text={config.translations.loading}
87
+ fullContainer
88
+ style={styles.loadingContainer}
89
+ />
91
90
  );
92
91
  }
93
92
 
@@ -135,13 +134,6 @@ const styles = StyleSheet.create({
135
134
  marginRight: 16,
136
135
  },
137
136
  loadingContainer: {
138
- padding: 40,
139
- alignItems: "center",
140
- justifyContent: "center",
141
- gap: 12,
142
- },
143
- loadingText: {
144
- fontSize: 14,
145
- fontWeight: "500",
137
+ minHeight: 200,
146
138
  },
147
139
  });