@adiraku/react-native-ui 1.2.11-canary-5 → 1.2.11

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.
Files changed (61) hide show
  1. package/lib/commonjs/components/InputPIN/InputPIN.component.js +6 -1
  2. package/lib/commonjs/components/InputPIN/InputPIN.component.js.map +1 -1
  3. package/lib/commonjs/components/InputPIN/InputPIN.style.js +2 -4
  4. package/lib/commonjs/components/InputPIN/InputPIN.style.js.map +1 -1
  5. package/lib/commonjs/components/SingleBalanceCard/SingleBalanceCard.component.js +82 -0
  6. package/lib/commonjs/components/SingleBalanceCard/SingleBalanceCard.component.js.map +1 -0
  7. package/lib/commonjs/components/SingleBalanceCard/SingleBalanceCard.styles.js +112 -0
  8. package/lib/commonjs/components/SingleBalanceCard/SingleBalanceCard.styles.js.map +1 -0
  9. package/lib/commonjs/components/SingleBalanceCard/SingleBalanceCard.type.js +6 -0
  10. package/lib/commonjs/components/SingleBalanceCard/SingleBalanceCard.type.js.map +1 -0
  11. package/lib/commonjs/components/TopUpCard/TopUpCard.component.js +45 -0
  12. package/lib/commonjs/components/TopUpCard/TopUpCard.component.js.map +1 -0
  13. package/lib/commonjs/components/TopUpCard/TopUpCard.style.js +74 -0
  14. package/lib/commonjs/components/TopUpCard/TopUpCard.style.js.map +1 -0
  15. package/lib/commonjs/components/TopUpCard/TopUpCard.type.js +6 -0
  16. package/lib/commonjs/components/TopUpCard/TopUpCard.type.js.map +1 -0
  17. package/lib/commonjs/components/index.js +14 -0
  18. package/lib/commonjs/components/index.js.map +1 -1
  19. package/lib/module/components/InputPIN/InputPIN.component.js +6 -1
  20. package/lib/module/components/InputPIN/InputPIN.component.js.map +1 -1
  21. package/lib/module/components/InputPIN/InputPIN.style.js +2 -4
  22. package/lib/module/components/InputPIN/InputPIN.style.js.map +1 -1
  23. package/lib/module/components/SingleBalanceCard/SingleBalanceCard.component.js +73 -0
  24. package/lib/module/components/SingleBalanceCard/SingleBalanceCard.component.js.map +1 -0
  25. package/lib/module/components/SingleBalanceCard/SingleBalanceCard.styles.js +106 -0
  26. package/lib/module/components/SingleBalanceCard/SingleBalanceCard.styles.js.map +1 -0
  27. package/lib/module/components/SingleBalanceCard/SingleBalanceCard.type.js +2 -0
  28. package/lib/module/components/SingleBalanceCard/SingleBalanceCard.type.js.map +1 -0
  29. package/lib/module/components/TopUpCard/TopUpCard.component.js +37 -0
  30. package/lib/module/components/TopUpCard/TopUpCard.component.js.map +1 -0
  31. package/lib/module/components/TopUpCard/TopUpCard.style.js +67 -0
  32. package/lib/module/components/TopUpCard/TopUpCard.style.js.map +1 -0
  33. package/lib/module/components/TopUpCard/TopUpCard.type.js +2 -0
  34. package/lib/module/components/TopUpCard/TopUpCard.type.js.map +1 -0
  35. package/lib/module/components/index.js +2 -0
  36. package/lib/module/components/index.js.map +1 -1
  37. package/lib/typescript/components/InputPIN/InputPIN.style.d.ts.map +1 -1
  38. package/lib/typescript/components/SingleBalanceCard/SingleBalanceCard.component.d.ts +4 -0
  39. package/lib/typescript/components/SingleBalanceCard/SingleBalanceCard.component.d.ts.map +1 -0
  40. package/lib/typescript/components/SingleBalanceCard/SingleBalanceCard.styles.d.ts +183 -0
  41. package/lib/typescript/components/SingleBalanceCard/SingleBalanceCard.styles.d.ts.map +1 -0
  42. package/lib/typescript/components/SingleBalanceCard/SingleBalanceCard.type.d.ts +17 -0
  43. package/lib/typescript/components/SingleBalanceCard/SingleBalanceCard.type.d.ts.map +1 -0
  44. package/lib/typescript/components/TopUpCard/TopUpCard.component.d.ts +5 -0
  45. package/lib/typescript/components/TopUpCard/TopUpCard.component.d.ts.map +1 -0
  46. package/lib/typescript/components/TopUpCard/TopUpCard.style.d.ts +62 -0
  47. package/lib/typescript/components/TopUpCard/TopUpCard.style.d.ts.map +1 -0
  48. package/lib/typescript/components/TopUpCard/TopUpCard.type.d.ts +32 -0
  49. package/lib/typescript/components/TopUpCard/TopUpCard.type.d.ts.map +1 -0
  50. package/lib/typescript/components/index.d.ts +3 -0
  51. package/lib/typescript/components/index.d.ts.map +1 -1
  52. package/package.json +1 -1
  53. package/src/components/InputPIN/InputPIN.component.tsx +1 -1
  54. package/src/components/InputPIN/InputPIN.style.tsx +1 -3
  55. package/src/components/SingleBalanceCard/SingleBalanceCard.component.tsx +120 -0
  56. package/src/components/SingleBalanceCard/SingleBalanceCard.styles.tsx +123 -0
  57. package/src/components/SingleBalanceCard/SingleBalanceCard.type.tsx +17 -0
  58. package/src/components/TopUpCard/TopUpCard.component.tsx +48 -0
  59. package/src/components/TopUpCard/TopUpCard.style.tsx +64 -0
  60. package/src/components/TopUpCard/TopUpCard.type.ts +38 -0
  61. package/src/components/index.ts +3 -0
@@ -0,0 +1,62 @@
1
+ export declare const getStyle: (variant: 'unselected' | 'selected') => {
2
+ cardContainer: {
3
+ width: number;
4
+ height: number;
5
+ borderRadius: number;
6
+ backgroundColor: string;
7
+ borderWidth: number;
8
+ borderColor: string;
9
+ position: "relative";
10
+ flexDirection: "column";
11
+ justifyContent: "center";
12
+ alignItems: "flex-start";
13
+ paddingHorizontal: number;
14
+ gap: number;
15
+ shadowColor: string;
16
+ shadowOpacity: number;
17
+ shadowRadius: number;
18
+ shadowOffset: {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ elevation: number;
23
+ };
24
+ text: {
25
+ fontSize: number;
26
+ fontWeight: "700";
27
+ color: string;
28
+ textAlign: "left";
29
+ };
30
+ price: {
31
+ marginTop: number;
32
+ fontSize: number;
33
+ color: string;
34
+ textAlign: "left";
35
+ };
36
+ badge: {
37
+ position: "absolute";
38
+ top: number;
39
+ right: number;
40
+ width: number;
41
+ height: number;
42
+ backgroundColor: string;
43
+ borderRadius: number;
44
+ justifyContent: "center";
45
+ alignItems: "center";
46
+ paddingVertical: number;
47
+ paddingHorizontal: number;
48
+ flexDirection: "row";
49
+ zIndex: number;
50
+ };
51
+ badgeText: {
52
+ fontSize: number;
53
+ lineHeight: number;
54
+ fontWeight: "600";
55
+ color: string;
56
+ };
57
+ contentContainer: {
58
+ width: string;
59
+ alignItems: "flex-start";
60
+ };
61
+ };
62
+ //# sourceMappingURL=TopUpCard.style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopUpCard.style.d.ts","sourceRoot":"","sources":["../../../../src/components/TopUpCard/TopUpCard.style.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,QAAQ,YAAa,YAAY,GAAG,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4D1D,CAAC"}
@@ -0,0 +1,32 @@
1
+ import { ViewStyle } from 'react-native';
2
+ export interface TopUpCardProps {
3
+ /**
4
+ * The text amount to display on the top up card.
5
+ */
6
+ amount: string;
7
+ /**
8
+ * The variant of the top up card (unselected or selected).
9
+ */
10
+ variant: 'unselected' | 'selected';
11
+ /**
12
+ * Optional container style for customization.
13
+ */
14
+ containerStyle?: ViewStyle;
15
+ /**
16
+ * Optional price to show under amount.
17
+ */
18
+ price?: string;
19
+ /**
20
+ * Optional points to show badge
21
+ */
22
+ points?: number;
23
+ /**
24
+ * Type of card (basic or with points)
25
+ */
26
+ type?: 'basic' | 'with-points';
27
+ /**
28
+ * Callback when card is pressed
29
+ */
30
+ onPress?: () => void;
31
+ }
32
+ //# sourceMappingURL=TopUpCard.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopUpCard.type.d.ts","sourceRoot":"","sources":["../../../../src/components/TopUpCard/TopUpCard.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,YAAY,GAAG,UAAU,CAAC;IAEnC;;OAEG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAE3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,aAAa,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB"}
@@ -35,6 +35,8 @@ export { Loader } from './Loader/loader.component';
35
35
  export { Notification } from './Notification/notification.component';
36
36
  export { Pagination } from './Pagination/pagination.component';
37
37
  export { BudgetCard } from './BudgetCard/budget-card.component';
38
+ export { TopUpCards } from './TopUpCard/TopUpCard.component';
39
+ export type { TopUpCardProps } from './TopUpCard/TopUpCard.type';
38
40
  export { Banner } from './Banner/banner.component';
39
41
  export { FilterList } from './FilterList/FilterList.component';
40
42
  export { BasicTab } from './BasicTab/BasicTab.component';
@@ -47,6 +49,7 @@ export { Ribbon } from './Ribbon/Ribbon.component';
47
49
  export { StickyBar } from './StickyBar/StickyBar.component';
48
50
  export { LimitAngsuranCard } from './LimitAngsuranCard/LimitAngsuranCard.component';
49
51
  export { ToolTip } from './ToolTip/tooltip.component';
52
+ export { SingleBalanceCard } from './SingleBalanceCard/SingleBalanceCard.component';
50
53
  export type { ActionListProps } from './ActionList/ActionList.type';
51
54
  export type { BadgesIconProps, BadgesIlustrationProps, BadgesIlustrationRakuProps, BadgesProps, BadgesImageProps, BadgesInitialProps, BadgesStepProps, BadgesLogoProps, } from './Badge/Badge.type';
52
55
  export type { CategoryCardProps } from './CategoryCard/CategoryCard.type';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,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AM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,YAAY,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,wCAAwC,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACzF,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adiraku/react-native-ui",
3
- "version": "1.2.11-canary-5",
3
+ "version": "1.2.11",
4
4
  "description": "UI library for Adiraku apps",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -68,7 +68,7 @@ const InputPIN = React.forwardRef<InputPinRefHandle, InputPINProps>((props, ref)
68
68
  showForgetPin && <TextLink testID="buttonLupaPin" containerStyles={computedStyle.forgetPinContainer} label="Lupa PIN" onPress={onPressForgetPin} />
69
69
  }
70
70
  </View>
71
- <View>
71
+ <View style={{ flex: 1, justifyContent: 'space-evenly' }}>
72
72
  <View style={computedStyle.numberContainerStyle}>
73
73
  <NumberButton number="1" />
74
74
  <NumberButton number="2" />
@@ -22,7 +22,6 @@ export const getStyle = () => {
22
22
  flex: 1,
23
23
  backgroundColor: Palettes.whiteDark[50],
24
24
  justifyContent: 'space-between',
25
- marginTop: Spacing[48],
26
25
  };
27
26
 
28
27
  computedStyle.dotContainerStyle = {
@@ -34,6 +33,7 @@ export const getStyle = () => {
34
33
 
35
34
  computedStyle.numberContainerStyle = {
36
35
  flexDirection: 'row',
36
+ flex: 1,
37
37
  justifyContent: 'space-between',
38
38
  marginHorizontal: Spacing[32],
39
39
  };
@@ -54,12 +54,10 @@ export const getStyle = () => {
54
54
  };
55
55
 
56
56
  computedStyle.numberPadStyle = {
57
- padding: Spacing[24],
58
57
  margin: Spacing[8],
59
58
  justifyContent: 'center',
60
59
  alignItems: 'center',
61
60
  flex: 1,
62
- // backgroundColor: 'blue'
63
61
  };
64
62
 
65
63
  computedStyle.errorMessage = {
@@ -0,0 +1,120 @@
1
+ import React, { useState } from 'react';
2
+ import { View, TouchableOpacity } from 'react-native';
3
+ import { Typography } from '../typography/typography.component';
4
+ import { IconSeeShow, IconCopy, IconInfo } from '../../icons';
5
+ import { styles } from './SingleBalanceCard.styles';
6
+ import { SingleBalanceCardProps } from './SingleBalanceCard.type';
7
+
8
+ export const SingleBalanceCard = ({
9
+ title,
10
+ balance,
11
+ leadingComponent,
12
+ information,
13
+ footerComponent,
14
+ actionComponent,
15
+ hasDividerOnAction = false,
16
+ variant = 'basic',
17
+ defaultMasked = false,
18
+ }: SingleBalanceCardProps) => {
19
+ const [isBalanceVisible, setIsBalanceVisible] = useState(defaultMasked);
20
+
21
+ const isNonSliding = !!actionComponent && variant === 'basic';
22
+
23
+ return (
24
+ <View style={styles.cardContainer}>
25
+ {isNonSliding ? (
26
+ <View style={styles.nonSlidingRow}>
27
+ <View style={styles.nonSlidingLeft}>
28
+ <View style={styles.headerRow}>
29
+ {leadingComponent && (
30
+ <View style={styles.leading}> {leadingComponent} </View>
31
+ )}
32
+ <Typography style={styles.title}> {title} </Typography>
33
+ <TouchableOpacity activeOpacity={0.6}>
34
+ <IconInfo />
35
+ </TouchableOpacity>
36
+ </View>
37
+ <Typography style={styles.balance}>
38
+ {isBalanceVisible ? balance : '••••••••••••'}
39
+ </Typography>
40
+ </View>
41
+
42
+ <View
43
+ style={[
44
+ styles.nonSlidingRight,
45
+ hasDividerOnAction && styles.trailingWithDivider,
46
+ ]}
47
+ >
48
+ {actionComponent}
49
+ </View>
50
+ </View>
51
+ ) : (
52
+ <>
53
+ <View style={styles.headerRow}>
54
+ <View style={styles.headerLeft}>
55
+ {leadingComponent && (
56
+ <View style={styles.leading}> {leadingComponent} </View>
57
+ )}
58
+ <Typography style={styles.title}> {title} </Typography>
59
+ <TouchableOpacity activeOpacity={0.6}>
60
+ <IconInfo />
61
+ </TouchableOpacity>
62
+ </View>
63
+ </View>
64
+
65
+ <View style={styles.balanceRow}>
66
+ <Typography style={styles.balance}>
67
+ {isBalanceVisible ? balance : '••••••••••••'}
68
+ </Typography>
69
+
70
+ <View style={styles.trailing}>
71
+ {actionComponent && (
72
+ <View
73
+ style={
74
+ hasDividerOnAction ? styles.trailingWithDivider : undefined
75
+ }
76
+ >
77
+ {actionComponent}
78
+ </View>
79
+ )}
80
+ {variant === 'with-information' && (
81
+ <TouchableOpacity
82
+ onPress={() => setIsBalanceVisible((prev) => !prev)}
83
+ >
84
+ <IconSeeShow />
85
+ </TouchableOpacity>
86
+ )}
87
+ </View>
88
+ </View>
89
+
90
+ {variant === 'with-information' && information && (
91
+ <>
92
+ <View style={styles.divider} />
93
+ <View style={styles.infoRow}>
94
+ <Typography style={styles.infoLabel}>
95
+ {' '}
96
+ {information.label}{' '}
97
+ </Typography>
98
+ <View style={styles.infoRight}>
99
+ <Typography style={styles.noVA}>
100
+ {' '}
101
+ {information.value}{' '}
102
+ </Typography>
103
+ {information.onCopy && (
104
+ <TouchableOpacity onPress={information.onCopy}>
105
+ <IconCopy />
106
+ </TouchableOpacity>
107
+ )}
108
+ </View>
109
+ </View>
110
+ </>
111
+ )}
112
+ </>
113
+ )}
114
+
115
+ {footerComponent && (
116
+ <View style={styles.footer}> {footerComponent} </View>
117
+ )}
118
+ </View>
119
+ );
120
+ };
@@ -0,0 +1,123 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { Palettes, Radius, Shadow } from '../../themes';
3
+
4
+ export const styles = StyleSheet.create({
5
+ cardContainer: {
6
+ backgroundColor: Palettes.white[50],
7
+ borderRadius: Radius[8],
8
+ ...Shadow['shadow-elevation-2'],
9
+ marginVertical: 8,
10
+ borderWidth: 1,
11
+ borderColor: Palettes.grey[100],
12
+ paddingLeft: 16,
13
+ paddingRight: 8,
14
+ paddingVertical: 12,
15
+ alignSelf: 'center',
16
+ maxWidth: 340,
17
+ width: '90%',
18
+ },
19
+
20
+ headerRow: {
21
+ flexDirection: 'row',
22
+ alignItems: 'center',
23
+ justifyContent: 'flex-start',
24
+ marginBottom: 12,
25
+ },
26
+
27
+ headerLeft: {
28
+ flexDirection: 'row',
29
+ alignItems: 'center',
30
+ },
31
+
32
+ leading: {
33
+ marginRight: 8,
34
+ },
35
+
36
+ title: {
37
+ fontSize: 12,
38
+ fontWeight: 'bold',
39
+ color: Palettes.black[900],
40
+ marginRight: 4,
41
+ },
42
+
43
+ balanceRow: {
44
+ flexDirection: 'row',
45
+ alignItems: 'center',
46
+ justifyContent: 'space-between',
47
+ marginBottom: 8,
48
+ },
49
+
50
+ balance: {
51
+ fontSize: 24,
52
+ fontWeight: 'bold',
53
+ color: Palettes.black[900],
54
+ minWidth: 140,
55
+ },
56
+
57
+ trailing: {
58
+ flexDirection: 'row',
59
+ alignItems: 'center',
60
+ gap: 8,
61
+ marginRight: 0,
62
+ },
63
+
64
+ trailingWithDivider: {
65
+ justifyContent: 'center',
66
+ alignItems: 'center',
67
+ marginLeft: 12,
68
+ paddingLeft: 12,
69
+ borderLeftWidth: 2,
70
+ borderLeftColor: Palettes.grey[100],
71
+ },
72
+
73
+ divider: {
74
+ borderBottomWidth: 1,
75
+ borderBottomColor: Palettes.grey[100],
76
+ marginVertical: 8,
77
+ },
78
+
79
+ infoRow: {
80
+ flexDirection: 'row',
81
+ alignItems: 'center',
82
+ justifyContent: 'space-between',
83
+ },
84
+
85
+ infoLabel: {
86
+ fontSize: 14,
87
+ color: Palettes.black[700],
88
+ },
89
+
90
+ infoRight: {
91
+ flexDirection: 'row',
92
+ alignItems: 'center',
93
+ gap: 4,
94
+ marginRight: 0,
95
+ },
96
+
97
+ noVA: {
98
+ fontSize: 14,
99
+ fontWeight: '600',
100
+ color: Palettes.blue[600],
101
+ marginRight: 2,
102
+ },
103
+
104
+ footer: {
105
+ marginTop: 12,
106
+ },
107
+
108
+ nonSlidingRow: {
109
+ flexDirection: 'row',
110
+ justifyContent: 'space-between',
111
+ alignItems: 'center',
112
+ },
113
+
114
+ nonSlidingLeft: {
115
+ flex: 1,
116
+ },
117
+
118
+ nonSlidingRight: {
119
+ justifyContent: 'center',
120
+ alignItems: 'center',
121
+ paddingLeft: 12,
122
+ },
123
+ });
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export type SingleBalanceCardProps = {
4
+ title: string;
5
+ balance: string;
6
+ leadingComponent?: ReactNode;
7
+ actionComponent?: ReactNode;
8
+ information?: {
9
+ label: string;
10
+ value: string;
11
+ onCopy?: () => void;
12
+ };
13
+ footerComponent?: ReactNode;
14
+ variant?: 'basic' | 'with-information';
15
+ hasDividerOnAction?: boolean;
16
+ defaultMasked?: boolean;
17
+ };
@@ -0,0 +1,48 @@
1
+ import * as React from 'react';
2
+ import { TouchableOpacity, View } from 'react-native';
3
+ import { getStyle } from './TopUpCard.style';
4
+ import type { TopUpCardProps } from './TopUpCard.type';
5
+ import { Typography } from './../typography/typography.component';
6
+
7
+ const TopUpCards: React.FC<TopUpCardProps> = (props) => {
8
+ const {
9
+ amount,
10
+ variant,
11
+ containerStyle,
12
+ price,
13
+ points,
14
+ type = 'basic',
15
+ onPress,
16
+ } = props;
17
+
18
+ const styles = getStyle(variant);
19
+
20
+ const renderContent = () => (
21
+ <View style= {styles.contentContainer} >
22
+ <Typography variant = "text-heading-h6-bold">
23
+ {amount}
24
+ </Typography>
25
+ {price && (
26
+ <Typography variant="text-body-tertiary-regular">
27
+ {price}
28
+ </Typography>
29
+ )}
30
+ </View>
31
+ );
32
+
33
+ return (
34
+ <TouchableOpacity style= {[styles.cardContainer, containerStyle]} onPress = { onPress } activeOpacity = { 0.7}>
35
+ {/* Points Badge */ }
36
+ {type === 'with-points' && points !== undefined && (
37
+ <View style={styles.badge}>
38
+ <Typography variant = "text-subtitle-primary-semibold" style = { styles.badgeText } numberOfLines = { 1} ellipsizeMode = "tail">
39
+ {`+ ${points} poin`}
40
+ </Typography>
41
+ </View>
42
+ )}
43
+ {renderContent()}
44
+ </TouchableOpacity>
45
+ );
46
+ };
47
+
48
+ export { TopUpCards };
@@ -0,0 +1,64 @@
1
+ import { StyleSheet } from 'react-native';
2
+ import { Palettes, Radius } from '../../themes';
3
+
4
+ export const getStyle = (variant: 'unselected' | 'selected') => {
5
+ const isSelected = variant === 'selected';
6
+ return StyleSheet.create({
7
+ cardContainer: {
8
+ width: 156,
9
+ height: 101,
10
+ borderRadius: 8,
11
+ backgroundColor: Palettes.white[50],
12
+ borderWidth: isSelected ? 2 : 1,
13
+ borderColor: isSelected ? Palettes.yellow[600] : '#E0E0E0',
14
+ position: 'relative' as const,
15
+ flexDirection: 'column',
16
+ justifyContent: 'center',
17
+ alignItems: 'flex-start',
18
+ paddingHorizontal: 16,
19
+ gap: 4,
20
+ shadowColor: '#000000',
21
+ shadowOpacity: isSelected ? 0.2 : 0.1,
22
+ shadowRadius: isSelected ? 8 : 4,
23
+ shadowOffset: { width: 0, height: isSelected ? 4 : 2 },
24
+ elevation: isSelected ? 4 : 2,
25
+ },
26
+ text: {
27
+ fontSize: 20,
28
+ fontWeight: '700',
29
+ color: Palettes.black[900],
30
+ textAlign: 'left',
31
+ },
32
+ price: {
33
+ marginTop: 4,
34
+ fontSize: 12,
35
+ color: Palettes.black[900],
36
+ textAlign: 'left',
37
+ },
38
+ badge: {
39
+ position: 'absolute',
40
+ top: -7,
41
+ right: 12,
42
+ width: 84,
43
+ height: 28,
44
+ backgroundColor: Palettes.yellow[600],
45
+ borderRadius: Radius[8],
46
+ justifyContent: 'center',
47
+ alignItems: 'center',
48
+ paddingVertical: 4,
49
+ paddingHorizontal: 8,
50
+ flexDirection: 'row',
51
+ zIndex: 1,
52
+ },
53
+ badgeText: {
54
+ fontSize: 12,
55
+ lineHeight: 12,
56
+ fontWeight: '600',
57
+ color: Palettes.black[900],
58
+ },
59
+ contentContainer: {
60
+ width: '100%',
61
+ alignItems: 'flex-start',
62
+ },
63
+ });
64
+ };
@@ -0,0 +1,38 @@
1
+ import { ViewStyle } from 'react-native';
2
+
3
+ export interface TopUpCardProps {
4
+ /**
5
+ * The text amount to display on the top up card.
6
+ */
7
+ amount: string;
8
+
9
+ /**
10
+ * The variant of the top up card (unselected or selected).
11
+ */
12
+ variant: 'unselected' | 'selected';
13
+
14
+ /**
15
+ * Optional container style for customization.
16
+ */
17
+ containerStyle?: ViewStyle;
18
+
19
+ /**
20
+ * Optional price to show under amount.
21
+ */
22
+ price?: string;
23
+
24
+ /**
25
+ * Optional points to show badge
26
+ */
27
+ points?: number;
28
+
29
+ /**
30
+ * Type of card (basic or with points)
31
+ */
32
+ type?: 'basic' | 'with-points';
33
+
34
+ /**
35
+ * Callback when card is pressed
36
+ */
37
+ onPress?: () => void;
38
+ }
@@ -42,6 +42,8 @@ export { Loader } from './Loader/loader.component';
42
42
  export { Notification } from './Notification/notification.component';
43
43
  export { Pagination } from './Pagination/pagination.component';
44
44
  export { BudgetCard } from './BudgetCard/budget-card.component';
45
+ export { TopUpCards } from './TopUpCard/TopUpCard.component';
46
+ export type { TopUpCardProps } from './TopUpCard/TopUpCard.type';
45
47
  export { Banner } from './Banner/banner.component';
46
48
  export { FilterList } from './FilterList/FilterList.component';
47
49
  export { BasicTab } from './BasicTab/BasicTab.component';
@@ -64,6 +66,7 @@ export { Ribbon } from './Ribbon/Ribbon.component';
64
66
  export { StickyBar } from './StickyBar/StickyBar.component';
65
67
  export { LimitAngsuranCard } from './LimitAngsuranCard/LimitAngsuranCard.component';
66
68
  export { ToolTip } from './ToolTip/tooltip.component';
69
+ export { SingleBalanceCard } from './SingleBalanceCard/SingleBalanceCard.component';
67
70
 
68
71
  export type { ActionListProps } from './ActionList/ActionList.type';
69
72
  export type {