@adiraku/react-native-ui 1.2.9-canary-7 → 1.2.9-canary-9

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 (137) hide show
  1. package/lib/commonjs/components/Banner/banner.component.js +55 -0
  2. package/lib/commonjs/components/Banner/banner.component.js.map +1 -0
  3. package/lib/commonjs/components/Banner/banner.style.js +30 -0
  4. package/lib/commonjs/components/Banner/banner.style.js.map +1 -0
  5. package/lib/commonjs/components/Banner/banner.type.js +6 -0
  6. package/lib/commonjs/components/Banner/banner.type.js.map +1 -0
  7. package/lib/commonjs/components/BudgetCard/budget-card.component.js +26 -0
  8. package/lib/commonjs/components/BudgetCard/budget-card.component.js.map +1 -0
  9. package/lib/commonjs/components/BudgetCard/budget-card.style.js +38 -0
  10. package/lib/commonjs/components/BudgetCard/budget-card.style.js.map +1 -0
  11. package/lib/commonjs/components/BudgetCard/budget-card.type.js +6 -0
  12. package/lib/commonjs/components/BudgetCard/budget-card.type.js.map +1 -0
  13. package/lib/commonjs/components/Chips/Chips.component.js +10 -3
  14. package/lib/commonjs/components/Chips/Chips.component.js.map +1 -1
  15. package/lib/commonjs/components/DashboardBalanceCard/CardWallet.component.js +104 -0
  16. package/lib/commonjs/components/DashboardBalanceCard/CardWallet.component.js.map +1 -0
  17. package/lib/commonjs/components/DashboardBalanceCard/DashboardBalanceCard.component.js +514 -0
  18. package/lib/commonjs/components/DashboardBalanceCard/DashboardBalanceCard.component.js.map +1 -0
  19. package/lib/commonjs/components/FilterList/FilterList.component.js +57 -0
  20. package/lib/commonjs/components/FilterList/FilterList.component.js.map +1 -0
  21. package/lib/commonjs/components/FilterList/FilterList.style.js +56 -0
  22. package/lib/commonjs/components/FilterList/FilterList.style.js.map +1 -0
  23. package/lib/commonjs/components/FilterList/FilterList.type.js +6 -0
  24. package/lib/commonjs/components/FilterList/FilterList.type.js.map +1 -0
  25. package/lib/commonjs/components/Pagination/pagination.component.js +39 -0
  26. package/lib/commonjs/components/Pagination/pagination.component.js.map +1 -0
  27. package/lib/commonjs/components/Pagination/pagination.style.js +26 -0
  28. package/lib/commonjs/components/Pagination/pagination.style.js.map +1 -0
  29. package/lib/commonjs/components/Pagination/pagination.type.js +2 -0
  30. package/lib/commonjs/components/Pagination/pagination.type.js.map +1 -0
  31. package/lib/commonjs/components/StickyBar/StickyBar.component.js +67 -0
  32. package/lib/commonjs/components/StickyBar/StickyBar.component.js.map +1 -0
  33. package/lib/commonjs/components/StickyBar/StickyBar.style.js +64 -0
  34. package/lib/commonjs/components/StickyBar/StickyBar.style.js.map +1 -0
  35. package/lib/commonjs/components/StickyBar/StickyBar.type.js +6 -0
  36. package/lib/commonjs/components/StickyBar/StickyBar.type.js.map +1 -0
  37. package/lib/commonjs/components/index.js +35 -0
  38. package/lib/commonjs/components/index.js.map +1 -1
  39. package/lib/module/components/Banner/banner.component.js +47 -0
  40. package/lib/module/components/Banner/banner.component.js.map +1 -0
  41. package/lib/module/components/Banner/banner.style.js +23 -0
  42. package/lib/module/components/Banner/banner.style.js.map +1 -0
  43. package/lib/module/components/Banner/banner.type.js +2 -0
  44. package/lib/module/components/Banner/banner.type.js.map +1 -0
  45. package/lib/module/components/BudgetCard/budget-card.component.js +18 -0
  46. package/lib/module/components/BudgetCard/budget-card.component.js.map +1 -0
  47. package/lib/module/components/BudgetCard/budget-card.style.js +31 -0
  48. package/lib/module/components/BudgetCard/budget-card.style.js.map +1 -0
  49. package/lib/module/components/BudgetCard/budget-card.type.js +2 -0
  50. package/lib/module/components/BudgetCard/budget-card.type.js.map +1 -0
  51. package/lib/module/components/Chips/Chips.component.js +11 -4
  52. package/lib/module/components/Chips/Chips.component.js.map +1 -1
  53. package/lib/module/components/DashboardBalanceCard/CardWallet.component.js +98 -0
  54. package/lib/module/components/DashboardBalanceCard/CardWallet.component.js.map +1 -0
  55. package/lib/module/components/DashboardBalanceCard/DashboardBalanceCard.component.js +508 -0
  56. package/lib/module/components/DashboardBalanceCard/DashboardBalanceCard.component.js.map +1 -0
  57. package/lib/module/components/FilterList/FilterList.component.js +50 -0
  58. package/lib/module/components/FilterList/FilterList.component.js.map +1 -0
  59. package/lib/module/components/FilterList/FilterList.style.js +49 -0
  60. package/lib/module/components/FilterList/FilterList.style.js.map +1 -0
  61. package/lib/module/components/FilterList/FilterList.type.js +2 -0
  62. package/lib/module/components/FilterList/FilterList.type.js.map +1 -0
  63. package/lib/module/components/Pagination/pagination.component.js +31 -0
  64. package/lib/module/components/Pagination/pagination.component.js.map +1 -0
  65. package/lib/module/components/Pagination/pagination.style.js +20 -0
  66. package/lib/module/components/Pagination/pagination.style.js.map +1 -0
  67. package/lib/module/components/Pagination/pagination.type.js +2 -0
  68. package/lib/module/components/Pagination/pagination.type.js.map +1 -0
  69. package/lib/module/components/StickyBar/StickyBar.component.js +60 -0
  70. package/lib/module/components/StickyBar/StickyBar.component.js.map +1 -0
  71. package/lib/module/components/StickyBar/StickyBar.style.js +57 -0
  72. package/lib/module/components/StickyBar/StickyBar.style.js.map +1 -0
  73. package/lib/module/components/StickyBar/StickyBar.type.js +2 -0
  74. package/lib/module/components/StickyBar/StickyBar.type.js.map +1 -0
  75. package/lib/module/components/index.js +5 -0
  76. package/lib/module/components/index.js.map +1 -1
  77. package/lib/typescript/components/Banner/banner.component.d.ts +4 -0
  78. package/lib/typescript/components/Banner/banner.component.d.ts.map +1 -0
  79. package/lib/typescript/components/Banner/banner.style.d.ts +9 -0
  80. package/lib/typescript/components/Banner/banner.style.d.ts.map +1 -0
  81. package/lib/typescript/components/Banner/banner.type.d.ts +16 -0
  82. package/lib/typescript/components/Banner/banner.type.d.ts.map +1 -0
  83. package/lib/typescript/components/BudgetCard/budget-card.component.d.ts +5 -0
  84. package/lib/typescript/components/BudgetCard/budget-card.component.d.ts.map +1 -0
  85. package/lib/typescript/components/BudgetCard/budget-card.style.d.ts +24 -0
  86. package/lib/typescript/components/BudgetCard/budget-card.style.d.ts.map +1 -0
  87. package/lib/typescript/components/BudgetCard/budget-card.type.d.ts +16 -0
  88. package/lib/typescript/components/BudgetCard/budget-card.type.d.ts.map +1 -0
  89. package/lib/typescript/components/Chips/Chips.component.d.ts +1 -1
  90. package/lib/typescript/components/Chips/Chips.component.d.ts.map +1 -1
  91. package/lib/typescript/components/Chips/Chips.type.d.ts +12 -0
  92. package/lib/typescript/components/Chips/Chips.type.d.ts.map +1 -1
  93. package/lib/typescript/components/DashboardBalanceCard/CardWallet.component.d.ts +9 -0
  94. package/lib/typescript/components/DashboardBalanceCard/CardWallet.component.d.ts.map +1 -0
  95. package/lib/typescript/components/DashboardBalanceCard/DashboardBalanceCard.component.d.ts +16 -0
  96. package/lib/typescript/components/DashboardBalanceCard/DashboardBalanceCard.component.d.ts.map +1 -0
  97. package/lib/typescript/components/FilterList/FilterList.component.d.ts +5 -0
  98. package/lib/typescript/components/FilterList/FilterList.component.d.ts.map +1 -0
  99. package/lib/typescript/components/FilterList/FilterList.style.d.ts +14 -0
  100. package/lib/typescript/components/FilterList/FilterList.style.d.ts.map +1 -0
  101. package/lib/typescript/components/FilterList/FilterList.type.d.ts +32 -0
  102. package/lib/typescript/components/FilterList/FilterList.type.d.ts.map +1 -0
  103. package/lib/typescript/components/Pagination/pagination.component.d.ts +5 -0
  104. package/lib/typescript/components/Pagination/pagination.component.d.ts.map +1 -0
  105. package/lib/typescript/components/Pagination/pagination.style.d.ts +19 -0
  106. package/lib/typescript/components/Pagination/pagination.style.d.ts.map +1 -0
  107. package/lib/typescript/components/Pagination/pagination.type.d.ts +15 -0
  108. package/lib/typescript/components/Pagination/pagination.type.d.ts.map +1 -0
  109. package/lib/typescript/components/StickyBar/StickyBar.component.d.ts +5 -0
  110. package/lib/typescript/components/StickyBar/StickyBar.component.d.ts.map +1 -0
  111. package/lib/typescript/components/StickyBar/StickyBar.style.d.ts +15 -0
  112. package/lib/typescript/components/StickyBar/StickyBar.style.d.ts.map +1 -0
  113. package/lib/typescript/components/StickyBar/StickyBar.type.d.ts +30 -0
  114. package/lib/typescript/components/StickyBar/StickyBar.type.d.ts.map +1 -0
  115. package/lib/typescript/components/index.d.ts +6 -0
  116. package/lib/typescript/components/index.d.ts.map +1 -1
  117. package/package.json +3 -1
  118. package/src/components/Banner/banner.component.tsx +43 -0
  119. package/src/components/Banner/banner.style.tsx +33 -0
  120. package/src/components/Banner/banner.type.ts +18 -0
  121. package/src/components/BudgetCard/budget-card.component.tsx +18 -0
  122. package/src/components/BudgetCard/budget-card.style.tsx +26 -0
  123. package/src/components/BudgetCard/budget-card.type.ts +18 -0
  124. package/src/components/Chips/Chips.component.tsx +12 -4
  125. package/src/components/Chips/Chips.type.ts +12 -0
  126. package/src/components/DashboardBalanceCard/CardWallet.component.tsx +121 -0
  127. package/src/components/DashboardBalanceCard/DashboardBalanceCard.component.tsx +578 -0
  128. package/src/components/FilterList/FilterList.component.tsx +60 -0
  129. package/src/components/FilterList/FilterList.style.tsx +64 -0
  130. package/src/components/FilterList/FilterList.type.tsx +36 -0
  131. package/src/components/Pagination/pagination.component.tsx +29 -0
  132. package/src/components/Pagination/pagination.style.tsx +20 -0
  133. package/src/components/Pagination/pagination.type.ts +16 -0
  134. package/src/components/StickyBar/StickyBar.component.tsx +74 -0
  135. package/src/components/StickyBar/StickyBar.style.tsx +79 -0
  136. package/src/components/StickyBar/StickyBar.type.ts +35 -0
  137. package/src/components/index.ts +6 -0
@@ -0,0 +1,578 @@
1
+ import React from 'react';
2
+ import { View, Image, ScrollView, TouchableOpacity } from 'react-native';
3
+ import { Typography } from '../typography/typography.component';
4
+ import { Divider } from '../Divider/Divider.component';
5
+ import { Shadow } from '../../themes';
6
+ import { Radius } from '../../themes';
7
+
8
+ interface Wallet {
9
+ adirapoin: string;
10
+ points: number;
11
+ payment: string;
12
+ balance: string;
13
+ }
14
+
15
+ interface DashboardBalanceCardProps {
16
+ variant: 'single' | 'singleDisable' | 'multiple' | 'multipleDisable';
17
+ wallets: Wallet[];
18
+ showInstallmentLimit: boolean;
19
+ installmentLimit?: string;
20
+ }
21
+
22
+ const DashboardBalanceCard: React.FC<DashboardBalanceCardProps> = ({
23
+ variant,
24
+ wallets,
25
+ showInstallmentLimit,
26
+ installmentLimit,
27
+ }) => {
28
+ return (
29
+ <View style={{ flex: 1 }}>
30
+ {variant === 'single' ? (
31
+ <View style={{ flex: 1 }}>
32
+ <View
33
+ style={{
34
+ width: 360,
35
+ height: 89,
36
+ flexDirection: 'row',
37
+ alignItems: 'center',
38
+ ...Shadow['shadow-elevation-1'],
39
+ }}
40
+ >
41
+ <Image
42
+ style={{
43
+ width: 20,
44
+ height: 20,
45
+ margin: 8,
46
+ marginLeft: 20,
47
+ }}
48
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconAdirapoin.png')}
49
+ />
50
+ <View>
51
+ <View style={{ flexDirection: 'row' }}>
52
+ <Typography variant="caption">
53
+ {wallets[0]?.adirapoin}
54
+ </Typography>
55
+ <Image
56
+ style={{
57
+ width: 16,
58
+ height: 16,
59
+ marginLeft: 10,
60
+ marginRight: 50,
61
+ }}
62
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
63
+ />
64
+ </View>
65
+ <Typography variant="button-small">
66
+ {wallets[0]?.points} poin
67
+ </Typography>
68
+ </View>
69
+ <Divider
70
+ orientation="vertical"
71
+ style={{ marginHorizontal: 10, height: 38 }}
72
+ />
73
+ <Image
74
+ style={{
75
+ width: 20,
76
+ height: 20,
77
+ margin: 8,
78
+ }}
79
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconAdirapay.png')}
80
+ />
81
+ <View>
82
+ <View style={{ flexDirection: 'row' }}>
83
+ <Typography variant="caption">{wallets[0]?.payment}</Typography>
84
+ <Image
85
+ style={{
86
+ width: 16,
87
+ height: 16,
88
+ marginLeft: 10,
89
+ }}
90
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
91
+ />
92
+ </View>
93
+ <Typography variant="button-small">
94
+ {wallets[0]?.balance}
95
+ {'\n'}
96
+ </Typography>
97
+ </View>
98
+ </View>
99
+ {showInstallmentLimit && (
100
+ <View
101
+ style={{
102
+ flexDirection: 'row',
103
+ backgroundColor: '#FFF9C1',
104
+ width: 360,
105
+ height: 37,
106
+ }}
107
+ >
108
+ <Image
109
+ style={{
110
+ width: 21,
111
+ height: 21,
112
+ margin: 8,
113
+ }}
114
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/CreditLimit.png')}
115
+ />
116
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
117
+ <Typography variant="caption">Limit angsuran: </Typography>
118
+ <Typography variant="button-small">
119
+ {installmentLimit}
120
+ </Typography>
121
+ <Typography variant="caption"> / bulan</Typography>
122
+ <Image
123
+ style={{
124
+ width: 21,
125
+ height: 21,
126
+ marginLeft: 70,
127
+ }}
128
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
129
+ />
130
+ </View>
131
+ </View>
132
+ )}
133
+ </View>
134
+ ) : variant === 'singleDisable' ? (
135
+ <View style={{ flex: 1 }}>
136
+ <View
137
+ style={{
138
+ width: 360,
139
+ height: 89,
140
+ flexDirection: 'row',
141
+ alignItems: 'center',
142
+ ...Shadow['shadow-elevation-1'],
143
+ }}
144
+ >
145
+ <Image
146
+ style={{
147
+ width: 20,
148
+ height: 20,
149
+ margin: 8,
150
+ marginLeft: 20,
151
+ }}
152
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconAdirapoin.png')}
153
+ />
154
+ <View>
155
+ <View style={{ flexDirection: 'row' }}>
156
+ <Typography variant="caption">
157
+ {wallets[0]?.adirapoin}
158
+ </Typography>
159
+ <Image
160
+ style={{
161
+ width: 16,
162
+ height: 16,
163
+ marginLeft: 10,
164
+ marginRight: 50,
165
+ }}
166
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
167
+ />
168
+ </View>
169
+ <Typography variant="button-small">
170
+ {wallets[0]?.points} poin
171
+ </Typography>
172
+ </View>
173
+ <Divider
174
+ orientation="vertical"
175
+ style={{ marginHorizontal: 10, height: 38 }}
176
+ />
177
+ <View
178
+ style={{
179
+ width: 140,
180
+ height: 57,
181
+ backgroundColor: '#EEF0F2',
182
+ borderRadius: Radius[12],
183
+ flexDirection: 'row',
184
+ alignItems: 'center',
185
+ }}
186
+ >
187
+ <Image
188
+ style={{
189
+ width: 20,
190
+ height: 20,
191
+ margin: 8,
192
+ }}
193
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconDwallet.png')}
194
+ />
195
+ <View>
196
+ <View style={{ flexDirection: 'row' }}>
197
+ <Typography variant="caption">
198
+ {wallets[0]?.payment}
199
+ </Typography>
200
+ <Image
201
+ style={{
202
+ width: 16,
203
+ height: 16,
204
+ marginLeft: 10,
205
+ }}
206
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
207
+ />
208
+ </View>
209
+ <Typography variant="button-small">
210
+ {wallets[0]?.balance}
211
+ {'\n'}
212
+ </Typography>
213
+ </View>
214
+ </View>
215
+ </View>
216
+ {showInstallmentLimit && (
217
+ <View
218
+ style={{
219
+ flexDirection: 'row',
220
+ backgroundColor: '#FFF9C1',
221
+ width: 360,
222
+ height: 37,
223
+ }}
224
+ >
225
+ <Image
226
+ style={{
227
+ width: 21,
228
+ height: 21,
229
+ margin: 8,
230
+ }}
231
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/CreditLimit.png')}
232
+ />
233
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
234
+ <Typography variant="caption">Limit angsuran: </Typography>
235
+ <Typography variant="button-small">
236
+ {installmentLimit}
237
+ </Typography>
238
+ <Typography variant="caption"> / bulan</Typography>
239
+ <Image
240
+ style={{
241
+ width: 21,
242
+ height: 21,
243
+ marginLeft: 70,
244
+ }}
245
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
246
+ />
247
+ </View>
248
+ </View>
249
+ )}
250
+ </View>
251
+ ) : variant === 'multiple' ? (
252
+ <View style={{ flex: 1 }}>
253
+ <View
254
+ style={{
255
+ width: 360,
256
+ height: 89,
257
+ flexDirection: 'row',
258
+ alignItems: 'center',
259
+ ...Shadow['shadow-elevation-1'],
260
+ }}
261
+ >
262
+ <Image
263
+ style={{
264
+ width: 20,
265
+ height: 20,
266
+ margin: 8,
267
+ marginLeft: 20,
268
+ }}
269
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconAdirapoin.png')}
270
+ />
271
+ <View>
272
+ <View style={{ flexDirection: 'row' }}>
273
+ <Typography variant="caption">
274
+ {wallets[0]?.adirapoin}
275
+ </Typography>
276
+ <Image
277
+ style={{
278
+ width: 16,
279
+ height: 16,
280
+ marginLeft: 10,
281
+ marginRight: 50,
282
+ }}
283
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
284
+ />
285
+ </View>
286
+ <Typography variant="button-small">
287
+ {wallets[0]?.points} poin
288
+ </Typography>
289
+ </View>
290
+ <Divider
291
+ orientation="vertical"
292
+ style={{ marginHorizontal: 10, height: 38 }}
293
+ />
294
+ <ScrollView>
295
+ <View style={{ flexDirection: 'row', height: 59 }}>
296
+ <TouchableOpacity
297
+ style={{
298
+ width: 140,
299
+ height: 57,
300
+ ...Shadow['shadow-elevation-1'],
301
+ borderRadius: Radius[12],
302
+ flexDirection: 'row',
303
+ alignItems: 'center',
304
+ marginRight: 7,
305
+ }}
306
+ >
307
+ <Image
308
+ style={{
309
+ width: 20,
310
+ height: 20,
311
+ margin: 8,
312
+ }}
313
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconDwallet.png')}
314
+ />
315
+ <View>
316
+ <View style={{ flexDirection: 'row' }}>
317
+ <Typography variant="caption">
318
+ {wallets[0]?.payment}
319
+ </Typography>
320
+ <Image
321
+ style={{
322
+ width: 16,
323
+ height: 16,
324
+ marginLeft: 10,
325
+ }}
326
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
327
+ />
328
+ </View>
329
+ <Typography variant="button-small">
330
+ {wallets[0]?.balance}
331
+ {'\n'}
332
+ </Typography>
333
+ </View>
334
+ </TouchableOpacity>
335
+ <TouchableOpacity
336
+ style={{
337
+ width: 140,
338
+ height: 57,
339
+ ...Shadow['shadow-elevation-1'],
340
+ borderRadius: Radius[12],
341
+ flexDirection: 'row',
342
+ alignItems: 'center',
343
+ }}
344
+ >
345
+ <Image
346
+ style={{
347
+ width: 20,
348
+ height: 20,
349
+ margin: 8,
350
+ }}
351
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconDwallet.png')}
352
+ />
353
+ <View>
354
+ <View style={{ flexDirection: 'row' }}>
355
+ <Typography variant="caption">
356
+ {wallets[0]?.payment}
357
+ </Typography>
358
+ <Image
359
+ style={{
360
+ width: 16,
361
+ height: 16,
362
+ marginLeft: 10,
363
+ }}
364
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
365
+ />
366
+ </View>
367
+ <Typography variant="button-small">
368
+ {wallets[0]?.balance}
369
+ {'\n'}
370
+ </Typography>
371
+ </View>
372
+ </TouchableOpacity>
373
+ </View>
374
+ </ScrollView>
375
+ </View>
376
+ {showInstallmentLimit && (
377
+ <View
378
+ style={{
379
+ flexDirection: 'row',
380
+ backgroundColor: '#FFF9C1',
381
+ width: 360,
382
+ height: 37,
383
+ }}
384
+ >
385
+ <Image
386
+ style={{
387
+ width: 21,
388
+ height: 21,
389
+ margin: 8,
390
+ }}
391
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/CreditLimit.png')}
392
+ />
393
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
394
+ <Typography variant="caption">Limit angsuran: </Typography>
395
+ <Typography variant="button-small">
396
+ {installmentLimit}
397
+ </Typography>
398
+ <Typography variant="caption"> / bulan</Typography>
399
+ <Image
400
+ style={{
401
+ width: 21,
402
+ height: 21,
403
+ marginLeft: 70,
404
+ }}
405
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
406
+ />
407
+ </View>
408
+ </View>
409
+ )}
410
+ </View>
411
+ ) : (
412
+ <View style={{ flex: 1 }}>
413
+ <View
414
+ style={{
415
+ width: 360,
416
+ height: 89,
417
+ flexDirection: 'row',
418
+ alignItems: 'center',
419
+ ...Shadow['shadow-elevation-1'],
420
+ }}
421
+ >
422
+ <Image
423
+ style={{
424
+ width: 20,
425
+ height: 20,
426
+ margin: 8,
427
+ marginLeft: 20,
428
+ }}
429
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconAdirapoin.png')}
430
+ />
431
+ <View>
432
+ <View style={{ flexDirection: 'row' }}>
433
+ <Typography variant="caption">
434
+ {wallets[0]?.adirapoin}
435
+ </Typography>
436
+ <Image
437
+ style={{
438
+ width: 16,
439
+ height: 16,
440
+ marginLeft: 10,
441
+ marginRight: 50,
442
+ }}
443
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
444
+ />
445
+ </View>
446
+ <Typography variant="button-small">
447
+ {wallets[0]?.points} poin
448
+ </Typography>
449
+ </View>
450
+ <Divider
451
+ orientation="vertical"
452
+ style={{ marginHorizontal: 10, height: 38 }}
453
+ />
454
+ <ScrollView>
455
+ <View style={{ flexDirection: 'row', height: 59 }}>
456
+ <TouchableOpacity
457
+ style={{
458
+ width: 140,
459
+ height: 57,
460
+ ...Shadow['shadow-elevation-1'],
461
+ borderRadius: Radius[12],
462
+ flexDirection: 'row',
463
+ alignItems: 'center',
464
+ backgroundColor: '#EEF0F2',
465
+ marginRight: 7,
466
+ }}
467
+ >
468
+ <Image
469
+ style={{
470
+ width: 20,
471
+ height: 20,
472
+ margin: 8,
473
+ }}
474
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconDwallet.png')}
475
+ />
476
+ <View>
477
+ <View style={{ flexDirection: 'row' }}>
478
+ <Typography variant="caption">
479
+ {wallets[0]?.payment}
480
+ </Typography>
481
+ <Image
482
+ style={{
483
+ width: 16,
484
+ height: 16,
485
+ marginLeft: 10,
486
+ }}
487
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
488
+ />
489
+ </View>
490
+ <Typography variant="button-small">
491
+ {wallets[0]?.balance}
492
+ {'\n'}
493
+ </Typography>
494
+ </View>
495
+ </TouchableOpacity>
496
+ <TouchableOpacity
497
+ style={{
498
+ width: 140,
499
+ height: 57,
500
+ ...Shadow['shadow-elevation-1'],
501
+ borderRadius: Radius[12],
502
+ flexDirection: 'row',
503
+ backgroundColor: '#EEF0F2',
504
+ alignItems: 'center',
505
+ }}
506
+ >
507
+ <Image
508
+ style={{
509
+ width: 20,
510
+ height: 20,
511
+ margin: 8,
512
+ }}
513
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/IconDwallet.png')}
514
+ />
515
+ <View>
516
+ <View style={{ flexDirection: 'row' }}>
517
+ <Typography variant="caption">
518
+ {wallets[0]?.payment}
519
+ </Typography>
520
+ <Image
521
+ style={{
522
+ width: 16,
523
+ height: 16,
524
+ marginLeft: 10,
525
+ }}
526
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
527
+ />
528
+ </View>
529
+ <Typography variant="button-small">
530
+ {wallets[0]?.balance}
531
+ {'\n'}
532
+ </Typography>
533
+ </View>
534
+ </TouchableOpacity>
535
+ </View>
536
+ </ScrollView>
537
+ </View>
538
+ {showInstallmentLimit && (
539
+ <View
540
+ style={{
541
+ flexDirection: 'row',
542
+ backgroundColor: '#FFF9C1',
543
+ width: 360,
544
+ height: 37,
545
+ }}
546
+ >
547
+ <Image
548
+ style={{
549
+ width: 21,
550
+ height: 21,
551
+ margin: 8,
552
+ }}
553
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/CreditLimit.png')}
554
+ />
555
+ <View style={{ flexDirection: 'row', alignItems: 'center' }}>
556
+ <Typography variant="caption">Limit angsuran: </Typography>
557
+ <Typography variant="button-small">
558
+ {installmentLimit}
559
+ </Typography>
560
+ <Typography variant="caption"> / bulan</Typography>
561
+ <Image
562
+ style={{
563
+ width: 21,
564
+ height: 21,
565
+ marginLeft: 70,
566
+ }}
567
+ source={require('../../../storybookwebpreview/assets/images/DashboardBalanceCard/Navigation.png')}
568
+ />
569
+ </View>
570
+ </View>
571
+ )}
572
+ </View>
573
+ )}
574
+ </View>
575
+ );
576
+ };
577
+
578
+ export default DashboardBalanceCard;
@@ -0,0 +1,60 @@
1
+ import React from 'react';
2
+ import { View, TouchableHighlight } from 'react-native';
3
+
4
+ import { Typography } from '../typography/typography.component';
5
+ import { getStyle } from './FilterList.style';
6
+
7
+ import type { FilterListProps } from './FilterList.type';
8
+ import { Palettes } from '../../themes';
9
+
10
+ const FilterList: React.FC<FilterListProps> = (props) => {
11
+ const {
12
+ onPress = () => {},
13
+ title,
14
+ description,
15
+ textStyles,
16
+ disabled = false,
17
+ leadingComponent,
18
+ trailingComponent,
19
+ containerStyle,
20
+ ...rest
21
+ } = props;
22
+
23
+ const computedStyle = getStyle({
24
+ ...props,
25
+ });
26
+
27
+ return (
28
+ <TouchableHighlight
29
+ onPress={onPress}
30
+ disabled={disabled}
31
+ {...rest}
32
+ underlayColor={Palettes.grey[50]}
33
+ >
34
+ <View style={[computedStyle.container, containerStyle]}>
35
+ {leadingComponent && (
36
+ <View style={computedStyle.leadingWrapper}>{leadingComponent}</View>
37
+ )}
38
+ <View style={computedStyle.textContainer}>
39
+ <Typography
40
+ variant={'subtitle2'}
41
+ textStyles={{ ...computedStyle.title, ...textStyles }}
42
+ >
43
+ {title}
44
+ </Typography>
45
+ <Typography
46
+ variant={'body2'}
47
+ textStyles={{ ...computedStyle.description, ...textStyles }}
48
+ >
49
+ {description}
50
+ </Typography>
51
+ </View>
52
+ {trailingComponent && (
53
+ <View style={computedStyle.trailingWrapper}>{trailingComponent}</View>
54
+ )}
55
+ </View>
56
+ </TouchableHighlight>
57
+ );
58
+ };
59
+
60
+ export { FilterList };
@@ -0,0 +1,64 @@
1
+ import type { TextStyle } from 'react-native';
2
+ import type { ViewStyle } from 'react-native';
3
+ import { StyleSheet } from 'react-native';
4
+ import { Palettes, Spacing } from '../../themes';
5
+ import type { FilterListProps } from './FilterList.type';
6
+
7
+ interface ComputedStyleProps {
8
+ container?: ViewStyle;
9
+ title?: TextStyle;
10
+ description?: TextStyle;
11
+ textContainer?: TextStyle;
12
+ leadingWrapper?: ViewStyle;
13
+ trailingWrapper?: ViewStyle;
14
+ }
15
+
16
+ export const getStyle = (props: FilterListProps) => {
17
+ const { disabled, isLast } = props;
18
+
19
+ const computedStyle: ComputedStyleProps = {};
20
+
21
+ computedStyle.container = {
22
+ paddingVertical: 16,
23
+ paddingHorizontal: disabled ? 16 : 0,
24
+ borderBottomColor: Palettes.grey[50],
25
+ borderBottomWidth: disabled || isLast ? 0 : 6,
26
+ backgroundColor: disabled ? Palettes.grey[50] : 'transparent',
27
+ flexDirection: 'row',
28
+ justifyContent: 'flex-start',
29
+ alignItems: 'center',
30
+ width: '100%',
31
+ minWidth: 350,
32
+ };
33
+ computedStyle.title = {
34
+ fontWeight: '600',
35
+ fontSize: 14,
36
+ lineHeight: 21,
37
+ color: disabled ? Palettes.grey[500] : Palettes.black[900],
38
+ };
39
+ computedStyle.description = {
40
+ fontWeight: '400',
41
+ fontSize: 14,
42
+ lineHeight: 21,
43
+ color: disabled ? Palettes.grey[500] : Palettes.black[900],
44
+ };
45
+
46
+ computedStyle.textContainer = {
47
+ alignItems: 'flex-start',
48
+ flex: 1,
49
+ };
50
+
51
+ computedStyle.leadingWrapper = {
52
+ marginRight: Spacing[16],
53
+ justifyContent: 'center',
54
+ alignItems: 'center',
55
+ };
56
+
57
+ computedStyle.trailingWrapper = {
58
+ marginLeft: Spacing[16],
59
+ justifyContent: 'center',
60
+ alignItems: 'center',
61
+ };
62
+
63
+ return StyleSheet.create(computedStyle);
64
+ };