related-ui-components 1.1.6

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 (571) hide show
  1. package/README.md +200 -0
  2. package/lib/commonjs/app/_layout.js +41 -0
  3. package/lib/commonjs/app/_layout.js.map +1 -0
  4. package/lib/commonjs/app/index.js +153 -0
  5. package/lib/commonjs/app/index.js.map +1 -0
  6. package/lib/commonjs/assets/components/BannerWithDetails.png +0 -0
  7. package/lib/commonjs/assets/components/DealCard-Horizontal.png +0 -0
  8. package/lib/commonjs/assets/components/DealCard-Vertical.png +0 -0
  9. package/lib/commonjs/assets/components/DealCard-floating.png +0 -0
  10. package/lib/commonjs/assets/components/DealCard-nested.png +0 -0
  11. package/lib/commonjs/assets/components/Filters.png +0 -0
  12. package/lib/commonjs/assets/components/Popup-1.png +0 -0
  13. package/lib/commonjs/assets/components/Popup-2.png +0 -0
  14. package/lib/commonjs/assets/components/Popup-3.png +0 -0
  15. package/lib/commonjs/assets/components/RedemptionOption-Horizontal.png +0 -0
  16. package/lib/commonjs/assets/components/RedemptionOption-Vertical.png +0 -0
  17. package/lib/commonjs/assets/components/SimpleBanner.png +0 -0
  18. package/lib/commonjs/assets/components/SimpleTrendingCard.png +0 -0
  19. package/lib/commonjs/assets/components/SimpleTrendingCardV2.png +0 -0
  20. package/lib/commonjs/assets/components/UnlockRewards-1.png +0 -0
  21. package/lib/commonjs/assets/components/UnlockRewards-2.png +0 -0
  22. package/lib/commonjs/assets/fonts/SpaceMono-Regular.ttf +0 -0
  23. package/lib/commonjs/assets/images/adaptive-icon.png +0 -0
  24. package/lib/commonjs/assets/images/face.jpg +0 -0
  25. package/lib/commonjs/assets/images/favicon.png +0 -0
  26. package/lib/commonjs/assets/images/giftvoucher.jpg +0 -0
  27. package/lib/commonjs/assets/images/icon.png +0 -0
  28. package/lib/commonjs/assets/images/insta.webp +0 -0
  29. package/lib/commonjs/assets/images/muse.jpg +0 -0
  30. package/lib/commonjs/assets/images/namshi-banner.png +0 -0
  31. package/lib/commonjs/assets/images/namshi.webp +0 -0
  32. package/lib/commonjs/assets/images/partial-react-logo.png +0 -0
  33. package/lib/commonjs/assets/images/pb-logo.jpg +0 -0
  34. package/lib/commonjs/assets/images/pb.jpg +0 -0
  35. package/lib/commonjs/assets/images/react-logo.png +0 -0
  36. package/lib/commonjs/assets/images/react-logo@2x.png +0 -0
  37. package/lib/commonjs/assets/images/react-logo@3x.png +0 -0
  38. package/lib/commonjs/assets/images/scratch_foreground.png +0 -0
  39. package/lib/commonjs/assets/images/splash-icon.png +0 -0
  40. package/lib/commonjs/assets/images/upgrade.png +0 -0
  41. package/lib/commonjs/components/Badges/Badge.js +65 -0
  42. package/lib/commonjs/components/Badges/Badge.js.map +1 -0
  43. package/lib/commonjs/components/Badges/README.md +98 -0
  44. package/lib/commonjs/components/Badges/index.js +29 -0
  45. package/lib/commonjs/components/Badges/index.js.map +1 -0
  46. package/lib/commonjs/components/Banner/Banner.js +135 -0
  47. package/lib/commonjs/components/Banner/Banner.js.map +1 -0
  48. package/lib/commonjs/components/Banner/BannerWithDetails.js +118 -0
  49. package/lib/commonjs/components/Banner/BannerWithDetails.js.map +1 -0
  50. package/lib/commonjs/components/Banner/README.md +101 -0
  51. package/lib/commonjs/components/Banner/index.js +48 -0
  52. package/lib/commonjs/components/Banner/index.js.map +1 -0
  53. package/lib/commonjs/components/BrandIcon/BrandIcon.js +103 -0
  54. package/lib/commonjs/components/BrandIcon/BrandIcon.js.map +1 -0
  55. package/lib/commonjs/components/BrandIcon/index.js +29 -0
  56. package/lib/commonjs/components/BrandIcon/index.js.map +1 -0
  57. package/lib/commonjs/components/Card/Card.js +124 -0
  58. package/lib/commonjs/components/Card/Card.js.map +1 -0
  59. package/lib/commonjs/components/Card/CardContent.js +42 -0
  60. package/lib/commonjs/components/Card/CardContent.js.map +1 -0
  61. package/lib/commonjs/components/Card/CardFooter.js +34 -0
  62. package/lib/commonjs/components/Card/CardFooter.js.map +1 -0
  63. package/lib/commonjs/components/Card/CardHeader.js +77 -0
  64. package/lib/commonjs/components/Card/CardHeader.js.map +1 -0
  65. package/lib/commonjs/components/Card/CardImage.js +51 -0
  66. package/lib/commonjs/components/Card/CardImage.js.map +1 -0
  67. package/lib/commonjs/components/Card/index.js +98 -0
  68. package/lib/commonjs/components/Card/index.js.map +1 -0
  69. package/lib/commonjs/components/Card/templates/DealCard.js +188 -0
  70. package/lib/commonjs/components/Card/templates/DealCard.js.map +1 -0
  71. package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js +195 -0
  72. package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
  73. package/lib/commonjs/components/Card/templates/README.md +233 -0
  74. package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js +59 -0
  75. package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js.map +1 -0
  76. package/lib/commonjs/components/Card/types.js +6 -0
  77. package/lib/commonjs/components/Card/types.js.map +1 -0
  78. package/lib/commonjs/components/CloseIcon/CloseIcon.js +71 -0
  79. package/lib/commonjs/components/CloseIcon/CloseIcon.js.map +1 -0
  80. package/lib/commonjs/components/CloseIcon/index.js +29 -0
  81. package/lib/commonjs/components/CloseIcon/index.js.map +1 -0
  82. package/lib/commonjs/components/Filters/Filters.js +339 -0
  83. package/lib/commonjs/components/Filters/Filters.js.map +1 -0
  84. package/lib/commonjs/components/Filters/PointsRangeSelector.js +262 -0
  85. package/lib/commonjs/components/Filters/PointsRangeSelector.js.map +1 -0
  86. package/lib/commonjs/components/Filters/README.md +212 -0
  87. package/lib/commonjs/components/Filters/index.js +47 -0
  88. package/lib/commonjs/components/Filters/index.js.map +1 -0
  89. package/lib/commonjs/components/Input/Input.js +156 -0
  90. package/lib/commonjs/components/Input/Input.js.map +1 -0
  91. package/lib/commonjs/components/Input/README.md +128 -0
  92. package/lib/commonjs/components/Input/index.js +29 -0
  93. package/lib/commonjs/components/Input/index.js.map +1 -0
  94. package/lib/commonjs/components/LockOverlay/LockOverlay.js +65 -0
  95. package/lib/commonjs/components/LockOverlay/LockOverlay.js.map +1 -0
  96. package/lib/commonjs/components/LockOverlay/index.js +29 -0
  97. package/lib/commonjs/components/LockOverlay/index.js.map +1 -0
  98. package/lib/commonjs/components/Popup/Popup.js +296 -0
  99. package/lib/commonjs/components/Popup/Popup.js.map +1 -0
  100. package/lib/commonjs/components/Popup/README.md +133 -0
  101. package/lib/commonjs/components/Popup/index.js +29 -0
  102. package/lib/commonjs/components/Popup/index.js.map +1 -0
  103. package/lib/commonjs/components/ProgressBar/ProgressBar.js +121 -0
  104. package/lib/commonjs/components/ProgressBar/ProgressBar.js.map +1 -0
  105. package/lib/commonjs/components/ProgressBar/index.js +29 -0
  106. package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
  107. package/lib/commonjs/components/RedemptionOption/README.md +148 -0
  108. package/lib/commonjs/components/RedemptionOption/RedemptionOption.js +111 -0
  109. package/lib/commonjs/components/RedemptionOption/RedemptionOption.js.map +1 -0
  110. package/lib/commonjs/components/RedemptionOption/index.js +29 -0
  111. package/lib/commonjs/components/RedemptionOption/index.js.map +1 -0
  112. package/lib/commonjs/components/ScratchCard/README.md +119 -0
  113. package/lib/commonjs/components/ScratchCard/ScratchCard.js +153 -0
  114. package/lib/commonjs/components/ScratchCard/ScratchCard.js.map +1 -0
  115. package/lib/commonjs/components/ScratchCard/ScratchCardContent.js +28 -0
  116. package/lib/commonjs/components/ScratchCard/ScratchCardContent.js.map +1 -0
  117. package/lib/commonjs/components/ScratchCard/index.js +48 -0
  118. package/lib/commonjs/components/ScratchCard/index.js.map +1 -0
  119. package/lib/commonjs/components/UnlockRewards/README.md +187 -0
  120. package/lib/commonjs/components/UnlockRewards/RewardItem.js +125 -0
  121. package/lib/commonjs/components/UnlockRewards/RewardItem.js.map +1 -0
  122. package/lib/commonjs/components/UnlockRewards/UnlockRewards.js +207 -0
  123. package/lib/commonjs/components/UnlockRewards/UnlockRewards.js.map +1 -0
  124. package/lib/commonjs/components/UnlockRewards/index.js +48 -0
  125. package/lib/commonjs/components/UnlockRewards/index.js.map +1 -0
  126. package/lib/commonjs/components/Wheel/README.md +141 -0
  127. package/lib/commonjs/components/Wheel/Wheel.js +323 -0
  128. package/lib/commonjs/components/Wheel/Wheel.js.map +1 -0
  129. package/lib/commonjs/components/Wheel/index.js +29 -0
  130. package/lib/commonjs/components/Wheel/index.js.map +1 -0
  131. package/lib/commonjs/components/index.js +160 -0
  132. package/lib/commonjs/components/index.js.map +1 -0
  133. package/lib/commonjs/constants/BRANDS.js +57 -0
  134. package/lib/commonjs/constants/BRANDS.js.map +1 -0
  135. package/lib/commonjs/index.js +28 -0
  136. package/lib/commonjs/index.js.map +1 -0
  137. package/lib/commonjs/theme/Colors.js +120 -0
  138. package/lib/commonjs/theme/Colors.js.map +1 -0
  139. package/lib/commonjs/theme/ThemeContext.js +49 -0
  140. package/lib/commonjs/theme/ThemeContext.js.map +1 -0
  141. package/lib/commonjs/theme/index.js +28 -0
  142. package/lib/commonjs/theme/index.js.map +1 -0
  143. package/lib/module/app/_layout.js +36 -0
  144. package/lib/module/app/_layout.js.map +1 -0
  145. package/lib/module/app/index.js +143 -0
  146. package/lib/module/app/index.js.map +1 -0
  147. package/lib/module/assets/components/BannerWithDetails.png +0 -0
  148. package/lib/module/assets/components/DealCard-Horizontal.png +0 -0
  149. package/lib/module/assets/components/DealCard-Vertical.png +0 -0
  150. package/lib/module/assets/components/DealCard-floating.png +0 -0
  151. package/lib/module/assets/components/DealCard-nested.png +0 -0
  152. package/lib/module/assets/components/Filters.png +0 -0
  153. package/lib/module/assets/components/Popup-1.png +0 -0
  154. package/lib/module/assets/components/Popup-2.png +0 -0
  155. package/lib/module/assets/components/Popup-3.png +0 -0
  156. package/lib/module/assets/components/RedemptionOption-Horizontal.png +0 -0
  157. package/lib/module/assets/components/RedemptionOption-Vertical.png +0 -0
  158. package/lib/module/assets/components/SimpleBanner.png +0 -0
  159. package/lib/module/assets/components/SimpleTrendingCard.png +0 -0
  160. package/lib/module/assets/components/SimpleTrendingCardV2.png +0 -0
  161. package/lib/module/assets/components/UnlockRewards-1.png +0 -0
  162. package/lib/module/assets/components/UnlockRewards-2.png +0 -0
  163. package/lib/module/assets/fonts/SpaceMono-Regular.ttf +0 -0
  164. package/lib/module/assets/images/adaptive-icon.png +0 -0
  165. package/lib/module/assets/images/face.jpg +0 -0
  166. package/lib/module/assets/images/favicon.png +0 -0
  167. package/lib/module/assets/images/giftvoucher.jpg +0 -0
  168. package/lib/module/assets/images/icon.png +0 -0
  169. package/lib/module/assets/images/insta.webp +0 -0
  170. package/lib/module/assets/images/muse.jpg +0 -0
  171. package/lib/module/assets/images/namshi-banner.png +0 -0
  172. package/lib/module/assets/images/namshi.webp +0 -0
  173. package/lib/module/assets/images/partial-react-logo.png +0 -0
  174. package/lib/module/assets/images/pb-logo.jpg +0 -0
  175. package/lib/module/assets/images/pb.jpg +0 -0
  176. package/lib/module/assets/images/react-logo.png +0 -0
  177. package/lib/module/assets/images/react-logo@2x.png +0 -0
  178. package/lib/module/assets/images/react-logo@3x.png +0 -0
  179. package/lib/module/assets/images/scratch_foreground.png +0 -0
  180. package/lib/module/assets/images/splash-icon.png +0 -0
  181. package/lib/module/assets/images/upgrade.png +0 -0
  182. package/lib/module/components/Badges/Badge.js +59 -0
  183. package/lib/module/components/Badges/Badge.js.map +1 -0
  184. package/lib/module/components/Badges/README.md +98 -0
  185. package/lib/module/components/Badges/index.js +5 -0
  186. package/lib/module/components/Badges/index.js.map +1 -0
  187. package/lib/module/components/Banner/Banner.js +130 -0
  188. package/lib/module/components/Banner/Banner.js.map +1 -0
  189. package/lib/module/components/Banner/BannerWithDetails.js +111 -0
  190. package/lib/module/components/Banner/BannerWithDetails.js.map +1 -0
  191. package/lib/module/components/Banner/README.md +101 -0
  192. package/lib/module/components/Banner/index.js +7 -0
  193. package/lib/module/components/Banner/index.js.map +1 -0
  194. package/lib/module/components/BrandIcon/BrandIcon.js +98 -0
  195. package/lib/module/components/BrandIcon/BrandIcon.js.map +1 -0
  196. package/lib/module/components/BrandIcon/index.js +5 -0
  197. package/lib/module/components/BrandIcon/index.js.map +1 -0
  198. package/lib/module/components/Card/Card.js +119 -0
  199. package/lib/module/components/Card/Card.js.map +1 -0
  200. package/lib/module/components/Card/CardContent.js +37 -0
  201. package/lib/module/components/Card/CardContent.js.map +1 -0
  202. package/lib/module/components/Card/CardFooter.js +29 -0
  203. package/lib/module/components/Card/CardFooter.js.map +1 -0
  204. package/lib/module/components/Card/CardHeader.js +72 -0
  205. package/lib/module/components/Card/CardHeader.js.map +1 -0
  206. package/lib/module/components/Card/CardImage.js +46 -0
  207. package/lib/module/components/Card/CardImage.js.map +1 -0
  208. package/lib/module/components/Card/index.js +18 -0
  209. package/lib/module/components/Card/index.js.map +1 -0
  210. package/lib/module/components/Card/templates/DealCard.js +183 -0
  211. package/lib/module/components/Card/templates/DealCard.js.map +1 -0
  212. package/lib/module/components/Card/templates/DealCardWithBackgroundImage.js +188 -0
  213. package/lib/module/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
  214. package/lib/module/components/Card/templates/README.md +233 -0
  215. package/lib/module/components/Card/templates/SimpleTrendingCard.js +54 -0
  216. package/lib/module/components/Card/templates/SimpleTrendingCard.js.map +1 -0
  217. package/lib/module/components/Card/types.js +4 -0
  218. package/lib/module/components/Card/types.js.map +1 -0
  219. package/lib/module/components/CloseIcon/CloseIcon.js +63 -0
  220. package/lib/module/components/CloseIcon/CloseIcon.js.map +1 -0
  221. package/lib/module/components/CloseIcon/index.js +5 -0
  222. package/lib/module/components/CloseIcon/index.js.map +1 -0
  223. package/lib/module/components/Filters/Filters.js +330 -0
  224. package/lib/module/components/Filters/Filters.js.map +1 -0
  225. package/lib/module/components/Filters/PointsRangeSelector.js +256 -0
  226. package/lib/module/components/Filters/PointsRangeSelector.js.map +1 -0
  227. package/lib/module/components/Filters/README.md +212 -0
  228. package/lib/module/components/Filters/index.js +7 -0
  229. package/lib/module/components/Filters/index.js.map +1 -0
  230. package/lib/module/components/Input/Input.js +150 -0
  231. package/lib/module/components/Input/Input.js.map +1 -0
  232. package/lib/module/components/Input/README.md +128 -0
  233. package/lib/module/components/Input/index.js +5 -0
  234. package/lib/module/components/Input/index.js.map +1 -0
  235. package/lib/module/components/LockOverlay/LockOverlay.js +60 -0
  236. package/lib/module/components/LockOverlay/LockOverlay.js.map +1 -0
  237. package/lib/module/components/LockOverlay/index.js +5 -0
  238. package/lib/module/components/LockOverlay/index.js.map +1 -0
  239. package/lib/module/components/Popup/Popup.js +291 -0
  240. package/lib/module/components/Popup/Popup.js.map +1 -0
  241. package/lib/module/components/Popup/README.md +133 -0
  242. package/lib/module/components/Popup/index.js +5 -0
  243. package/lib/module/components/Popup/index.js.map +1 -0
  244. package/lib/module/components/ProgressBar/ProgressBar.js +116 -0
  245. package/lib/module/components/ProgressBar/ProgressBar.js.map +1 -0
  246. package/lib/module/components/ProgressBar/index.js +5 -0
  247. package/lib/module/components/ProgressBar/index.js.map +1 -0
  248. package/lib/module/components/RedemptionOption/README.md +148 -0
  249. package/lib/module/components/RedemptionOption/RedemptionOption.js +106 -0
  250. package/lib/module/components/RedemptionOption/RedemptionOption.js.map +1 -0
  251. package/lib/module/components/RedemptionOption/index.js +5 -0
  252. package/lib/module/components/RedemptionOption/index.js.map +1 -0
  253. package/lib/module/components/ScratchCard/README.md +119 -0
  254. package/lib/module/components/ScratchCard/ScratchCard.js +147 -0
  255. package/lib/module/components/ScratchCard/ScratchCard.js.map +1 -0
  256. package/lib/module/components/ScratchCard/ScratchCardContent.js +24 -0
  257. package/lib/module/components/ScratchCard/ScratchCardContent.js.map +1 -0
  258. package/lib/module/components/ScratchCard/index.js +7 -0
  259. package/lib/module/components/ScratchCard/index.js.map +1 -0
  260. package/lib/module/components/UnlockRewards/README.md +187 -0
  261. package/lib/module/components/UnlockRewards/RewardItem.js +120 -0
  262. package/lib/module/components/UnlockRewards/RewardItem.js.map +1 -0
  263. package/lib/module/components/UnlockRewards/UnlockRewards.js +200 -0
  264. package/lib/module/components/UnlockRewards/UnlockRewards.js.map +1 -0
  265. package/lib/module/components/UnlockRewards/index.js +7 -0
  266. package/lib/module/components/UnlockRewards/index.js.map +1 -0
  267. package/lib/module/components/Wheel/README.md +141 -0
  268. package/lib/module/components/Wheel/Wheel.js +317 -0
  269. package/lib/module/components/Wheel/Wheel.js.map +1 -0
  270. package/lib/module/components/Wheel/index.js +5 -0
  271. package/lib/module/components/Wheel/index.js.map +1 -0
  272. package/lib/module/components/index.js +17 -0
  273. package/lib/module/components/index.js.map +1 -0
  274. package/lib/module/constants/BRANDS.js +53 -0
  275. package/lib/module/constants/BRANDS.js.map +1 -0
  276. package/lib/module/index.js +5 -0
  277. package/lib/module/index.js.map +1 -0
  278. package/lib/module/theme/Colors.js +116 -0
  279. package/lib/module/theme/Colors.js.map +1 -0
  280. package/lib/module/theme/ThemeContext.js +41 -0
  281. package/lib/module/theme/ThemeContext.js.map +1 -0
  282. package/lib/module/theme/index.js +5 -0
  283. package/lib/module/theme/index.js.map +1 -0
  284. package/lib/typescript/commonjs/app/_layout.d.ts +3 -0
  285. package/lib/typescript/commonjs/app/_layout.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/app/index.d.ts +3 -0
  287. package/lib/typescript/commonjs/app/index.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/components/Badges/Badge.d.ts +16 -0
  289. package/lib/typescript/commonjs/components/Badges/Badge.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/components/Badges/index.d.ts +3 -0
  291. package/lib/typescript/commonjs/components/Badges/index.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/components/Banner/Banner.d.ts +26 -0
  293. package/lib/typescript/commonjs/components/Banner/Banner.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts +19 -0
  295. package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/components/Banner/index.d.ts +5 -0
  297. package/lib/typescript/commonjs/components/Banner/index.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/components/BrandIcon/BrandIcon.d.ts +20 -0
  299. package/lib/typescript/commonjs/components/BrandIcon/BrandIcon.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/components/BrandIcon/index.d.ts +3 -0
  301. package/lib/typescript/commonjs/components/BrandIcon/index.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/components/Card/Card.d.ts +5 -0
  303. package/lib/typescript/commonjs/components/Card/Card.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/components/Card/CardContent.d.ts +5 -0
  305. package/lib/typescript/commonjs/components/Card/CardContent.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/components/Card/CardFooter.d.ts +5 -0
  307. package/lib/typescript/commonjs/components/Card/CardFooter.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/components/Card/CardHeader.d.ts +5 -0
  309. package/lib/typescript/commonjs/components/Card/CardHeader.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/components/Card/CardImage.d.ts +5 -0
  311. package/lib/typescript/commonjs/components/Card/CardImage.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/components/Card/index.d.ts +11 -0
  313. package/lib/typescript/commonjs/components/Card/index.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts +33 -0
  315. package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts +38 -0
  317. package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts +14 -0
  319. package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/components/Card/types.d.ts +78 -0
  321. package/lib/typescript/commonjs/components/Card/types.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/components/CloseIcon/CloseIcon.d.ts +16 -0
  323. package/lib/typescript/commonjs/components/CloseIcon/CloseIcon.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/components/CloseIcon/index.d.ts +3 -0
  325. package/lib/typescript/commonjs/components/CloseIcon/index.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/components/Filters/Filters.d.ts +74 -0
  327. package/lib/typescript/commonjs/components/Filters/Filters.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/components/Filters/PointsRangeSelector.d.ts +29 -0
  329. package/lib/typescript/commonjs/components/Filters/PointsRangeSelector.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/components/Filters/index.d.ts +5 -0
  331. package/lib/typescript/commonjs/components/Filters/index.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/components/Input/Input.d.ts +23 -0
  333. package/lib/typescript/commonjs/components/Input/Input.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/components/Input/index.d.ts +3 -0
  335. package/lib/typescript/commonjs/components/Input/index.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/components/LockOverlay/LockOverlay.d.ts +16 -0
  337. package/lib/typescript/commonjs/components/LockOverlay/LockOverlay.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/components/LockOverlay/index.d.ts +3 -0
  339. package/lib/typescript/commonjs/components/LockOverlay/index.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/components/Popup/Popup.d.ts +38 -0
  341. package/lib/typescript/commonjs/components/Popup/Popup.d.ts.map +1 -0
  342. package/lib/typescript/commonjs/components/Popup/index.d.ts +3 -0
  343. package/lib/typescript/commonjs/components/Popup/index.d.ts.map +1 -0
  344. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +26 -0
  345. package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts.map +1 -0
  346. package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +3 -0
  347. package/lib/typescript/commonjs/components/ProgressBar/index.d.ts.map +1 -0
  348. package/lib/typescript/commonjs/components/RedemptionOption/RedemptionOption.d.ts +24 -0
  349. package/lib/typescript/commonjs/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
  350. package/lib/typescript/commonjs/components/RedemptionOption/index.d.ts +3 -0
  351. package/lib/typescript/commonjs/components/RedemptionOption/index.d.ts.map +1 -0
  352. package/lib/typescript/commonjs/components/ScratchCard/ScratchCard.d.ts +20 -0
  353. package/lib/typescript/commonjs/components/ScratchCard/ScratchCard.d.ts.map +1 -0
  354. package/lib/typescript/commonjs/components/ScratchCard/ScratchCardContent.d.ts +8 -0
  355. package/lib/typescript/commonjs/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
  356. package/lib/typescript/commonjs/components/ScratchCard/index.d.ts +5 -0
  357. package/lib/typescript/commonjs/components/ScratchCard/index.d.ts.map +1 -0
  358. package/lib/typescript/commonjs/components/UnlockRewards/RewardItem.d.ts +25 -0
  359. package/lib/typescript/commonjs/components/UnlockRewards/RewardItem.d.ts.map +1 -0
  360. package/lib/typescript/commonjs/components/UnlockRewards/UnlockRewards.d.ts +59 -0
  361. package/lib/typescript/commonjs/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
  362. package/lib/typescript/commonjs/components/UnlockRewards/index.d.ts +5 -0
  363. package/lib/typescript/commonjs/components/UnlockRewards/index.d.ts.map +1 -0
  364. package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts +34 -0
  365. package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts.map +1 -0
  366. package/lib/typescript/commonjs/components/Wheel/index.d.ts +3 -0
  367. package/lib/typescript/commonjs/components/Wheel/index.d.ts.map +1 -0
  368. package/lib/typescript/commonjs/components/index.d.ts +15 -0
  369. package/lib/typescript/commonjs/components/index.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/constants/BRANDS.d.ts +7 -0
  371. package/lib/typescript/commonjs/constants/BRANDS.d.ts.map +1 -0
  372. package/lib/typescript/commonjs/index.d.ts +3 -0
  373. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  374. package/lib/typescript/commonjs/package.json +1 -0
  375. package/lib/typescript/commonjs/theme/Colors.d.ts +28 -0
  376. package/lib/typescript/commonjs/theme/Colors.d.ts.map +1 -0
  377. package/lib/typescript/commonjs/theme/ThemeContext.d.ts +13 -0
  378. package/lib/typescript/commonjs/theme/ThemeContext.d.ts.map +1 -0
  379. package/lib/typescript/commonjs/theme/index.d.ts +3 -0
  380. package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
  381. package/lib/typescript/module/app/_layout.d.ts +3 -0
  382. package/lib/typescript/module/app/_layout.d.ts.map +1 -0
  383. package/lib/typescript/module/app/index.d.ts +3 -0
  384. package/lib/typescript/module/app/index.d.ts.map +1 -0
  385. package/lib/typescript/module/components/Badges/Badge.d.ts +16 -0
  386. package/lib/typescript/module/components/Badges/Badge.d.ts.map +1 -0
  387. package/lib/typescript/module/components/Badges/index.d.ts +3 -0
  388. package/lib/typescript/module/components/Badges/index.d.ts.map +1 -0
  389. package/lib/typescript/module/components/Banner/Banner.d.ts +26 -0
  390. package/lib/typescript/module/components/Banner/Banner.d.ts.map +1 -0
  391. package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts +19 -0
  392. package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts.map +1 -0
  393. package/lib/typescript/module/components/Banner/index.d.ts +5 -0
  394. package/lib/typescript/module/components/Banner/index.d.ts.map +1 -0
  395. package/lib/typescript/module/components/BrandIcon/BrandIcon.d.ts +20 -0
  396. package/lib/typescript/module/components/BrandIcon/BrandIcon.d.ts.map +1 -0
  397. package/lib/typescript/module/components/BrandIcon/index.d.ts +3 -0
  398. package/lib/typescript/module/components/BrandIcon/index.d.ts.map +1 -0
  399. package/lib/typescript/module/components/Card/Card.d.ts +5 -0
  400. package/lib/typescript/module/components/Card/Card.d.ts.map +1 -0
  401. package/lib/typescript/module/components/Card/CardContent.d.ts +5 -0
  402. package/lib/typescript/module/components/Card/CardContent.d.ts.map +1 -0
  403. package/lib/typescript/module/components/Card/CardFooter.d.ts +5 -0
  404. package/lib/typescript/module/components/Card/CardFooter.d.ts.map +1 -0
  405. package/lib/typescript/module/components/Card/CardHeader.d.ts +5 -0
  406. package/lib/typescript/module/components/Card/CardHeader.d.ts.map +1 -0
  407. package/lib/typescript/module/components/Card/CardImage.d.ts +5 -0
  408. package/lib/typescript/module/components/Card/CardImage.d.ts.map +1 -0
  409. package/lib/typescript/module/components/Card/index.d.ts +11 -0
  410. package/lib/typescript/module/components/Card/index.d.ts.map +1 -0
  411. package/lib/typescript/module/components/Card/templates/DealCard.d.ts +33 -0
  412. package/lib/typescript/module/components/Card/templates/DealCard.d.ts.map +1 -0
  413. package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts +38 -0
  414. package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
  415. package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts +14 -0
  416. package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
  417. package/lib/typescript/module/components/Card/types.d.ts +78 -0
  418. package/lib/typescript/module/components/Card/types.d.ts.map +1 -0
  419. package/lib/typescript/module/components/CloseIcon/CloseIcon.d.ts +16 -0
  420. package/lib/typescript/module/components/CloseIcon/CloseIcon.d.ts.map +1 -0
  421. package/lib/typescript/module/components/CloseIcon/index.d.ts +3 -0
  422. package/lib/typescript/module/components/CloseIcon/index.d.ts.map +1 -0
  423. package/lib/typescript/module/components/Filters/Filters.d.ts +74 -0
  424. package/lib/typescript/module/components/Filters/Filters.d.ts.map +1 -0
  425. package/lib/typescript/module/components/Filters/PointsRangeSelector.d.ts +29 -0
  426. package/lib/typescript/module/components/Filters/PointsRangeSelector.d.ts.map +1 -0
  427. package/lib/typescript/module/components/Filters/index.d.ts +5 -0
  428. package/lib/typescript/module/components/Filters/index.d.ts.map +1 -0
  429. package/lib/typescript/module/components/Input/Input.d.ts +23 -0
  430. package/lib/typescript/module/components/Input/Input.d.ts.map +1 -0
  431. package/lib/typescript/module/components/Input/index.d.ts +3 -0
  432. package/lib/typescript/module/components/Input/index.d.ts.map +1 -0
  433. package/lib/typescript/module/components/LockOverlay/LockOverlay.d.ts +16 -0
  434. package/lib/typescript/module/components/LockOverlay/LockOverlay.d.ts.map +1 -0
  435. package/lib/typescript/module/components/LockOverlay/index.d.ts +3 -0
  436. package/lib/typescript/module/components/LockOverlay/index.d.ts.map +1 -0
  437. package/lib/typescript/module/components/Popup/Popup.d.ts +38 -0
  438. package/lib/typescript/module/components/Popup/Popup.d.ts.map +1 -0
  439. package/lib/typescript/module/components/Popup/index.d.ts +3 -0
  440. package/lib/typescript/module/components/Popup/index.d.ts.map +1 -0
  441. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +26 -0
  442. package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts.map +1 -0
  443. package/lib/typescript/module/components/ProgressBar/index.d.ts +3 -0
  444. package/lib/typescript/module/components/ProgressBar/index.d.ts.map +1 -0
  445. package/lib/typescript/module/components/RedemptionOption/RedemptionOption.d.ts +24 -0
  446. package/lib/typescript/module/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
  447. package/lib/typescript/module/components/RedemptionOption/index.d.ts +3 -0
  448. package/lib/typescript/module/components/RedemptionOption/index.d.ts.map +1 -0
  449. package/lib/typescript/module/components/ScratchCard/ScratchCard.d.ts +20 -0
  450. package/lib/typescript/module/components/ScratchCard/ScratchCard.d.ts.map +1 -0
  451. package/lib/typescript/module/components/ScratchCard/ScratchCardContent.d.ts +8 -0
  452. package/lib/typescript/module/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
  453. package/lib/typescript/module/components/ScratchCard/index.d.ts +5 -0
  454. package/lib/typescript/module/components/ScratchCard/index.d.ts.map +1 -0
  455. package/lib/typescript/module/components/UnlockRewards/RewardItem.d.ts +25 -0
  456. package/lib/typescript/module/components/UnlockRewards/RewardItem.d.ts.map +1 -0
  457. package/lib/typescript/module/components/UnlockRewards/UnlockRewards.d.ts +59 -0
  458. package/lib/typescript/module/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
  459. package/lib/typescript/module/components/UnlockRewards/index.d.ts +5 -0
  460. package/lib/typescript/module/components/UnlockRewards/index.d.ts.map +1 -0
  461. package/lib/typescript/module/components/Wheel/Wheel.d.ts +34 -0
  462. package/lib/typescript/module/components/Wheel/Wheel.d.ts.map +1 -0
  463. package/lib/typescript/module/components/Wheel/index.d.ts +3 -0
  464. package/lib/typescript/module/components/Wheel/index.d.ts.map +1 -0
  465. package/lib/typescript/module/components/index.d.ts +15 -0
  466. package/lib/typescript/module/components/index.d.ts.map +1 -0
  467. package/lib/typescript/module/constants/BRANDS.d.ts +7 -0
  468. package/lib/typescript/module/constants/BRANDS.d.ts.map +1 -0
  469. package/lib/typescript/module/index.d.ts +3 -0
  470. package/lib/typescript/module/index.d.ts.map +1 -0
  471. package/lib/typescript/module/package.json +1 -0
  472. package/lib/typescript/module/theme/Colors.d.ts +28 -0
  473. package/lib/typescript/module/theme/Colors.d.ts.map +1 -0
  474. package/lib/typescript/module/theme/ThemeContext.d.ts +13 -0
  475. package/lib/typescript/module/theme/ThemeContext.d.ts.map +1 -0
  476. package/lib/typescript/module/theme/index.d.ts +3 -0
  477. package/lib/typescript/module/theme/index.d.ts.map +1 -0
  478. package/package.json +116 -0
  479. package/src/app/_layout.tsx +38 -0
  480. package/src/app/index.tsx +115 -0
  481. package/src/assets/components/BannerWithDetails.png +0 -0
  482. package/src/assets/components/DealCard-Horizontal.png +0 -0
  483. package/src/assets/components/DealCard-Vertical.png +0 -0
  484. package/src/assets/components/DealCard-floating.png +0 -0
  485. package/src/assets/components/DealCard-nested.png +0 -0
  486. package/src/assets/components/Filters.png +0 -0
  487. package/src/assets/components/Popup-1.png +0 -0
  488. package/src/assets/components/Popup-2.png +0 -0
  489. package/src/assets/components/Popup-3.png +0 -0
  490. package/src/assets/components/RedemptionOption-Horizontal.png +0 -0
  491. package/src/assets/components/RedemptionOption-Vertical.png +0 -0
  492. package/src/assets/components/SimpleBanner.png +0 -0
  493. package/src/assets/components/SimpleTrendingCard.png +0 -0
  494. package/src/assets/components/SimpleTrendingCardV2.png +0 -0
  495. package/src/assets/components/UnlockRewards-1.png +0 -0
  496. package/src/assets/components/UnlockRewards-2.png +0 -0
  497. package/src/assets/fonts/SpaceMono-Regular.ttf +0 -0
  498. package/src/assets/images/adaptive-icon.png +0 -0
  499. package/src/assets/images/face.jpg +0 -0
  500. package/src/assets/images/favicon.png +0 -0
  501. package/src/assets/images/giftvoucher.jpg +0 -0
  502. package/src/assets/images/icon.png +0 -0
  503. package/src/assets/images/insta.webp +0 -0
  504. package/src/assets/images/muse.jpg +0 -0
  505. package/src/assets/images/namshi-banner.png +0 -0
  506. package/src/assets/images/namshi.webp +0 -0
  507. package/src/assets/images/partial-react-logo.png +0 -0
  508. package/src/assets/images/pb-logo.jpg +0 -0
  509. package/src/assets/images/pb.jpg +0 -0
  510. package/src/assets/images/react-logo.png +0 -0
  511. package/src/assets/images/react-logo@2x.png +0 -0
  512. package/src/assets/images/react-logo@3x.png +0 -0
  513. package/src/assets/images/scratch_foreground.png +0 -0
  514. package/src/assets/images/splash-icon.png +0 -0
  515. package/src/assets/images/upgrade.png +0 -0
  516. package/src/components/Badges/Badge.tsx +81 -0
  517. package/src/components/Badges/README.md +98 -0
  518. package/src/components/Badges/index.ts +2 -0
  519. package/src/components/Banner/Banner.tsx +172 -0
  520. package/src/components/Banner/BannerWithDetails.tsx +133 -0
  521. package/src/components/Banner/README.md +101 -0
  522. package/src/components/Banner/index.ts +5 -0
  523. package/src/components/BrandIcon/BrandIcon.tsx +134 -0
  524. package/src/components/BrandIcon/index.ts +2 -0
  525. package/src/components/Card/Card.tsx +144 -0
  526. package/src/components/Card/CardContent.tsx +33 -0
  527. package/src/components/Card/CardFooter.tsx +33 -0
  528. package/src/components/Card/CardHeader.tsx +80 -0
  529. package/src/components/Card/CardImage.tsx +51 -0
  530. package/src/components/Card/index.ts +15 -0
  531. package/src/components/Card/templates/DealCard.tsx +255 -0
  532. package/src/components/Card/templates/DealCardWithBackgroundImage.tsx +273 -0
  533. package/src/components/Card/templates/README.md +233 -0
  534. package/src/components/Card/templates/SimpleTrendingCard.tsx +54 -0
  535. package/src/components/Card/types.ts +75 -0
  536. package/src/components/CloseIcon/CloseIcon.tsx +77 -0
  537. package/src/components/CloseIcon/index.ts +2 -0
  538. package/src/components/Filters/Filters.tsx +427 -0
  539. package/src/components/Filters/PointsRangeSelector.tsx +319 -0
  540. package/src/components/Filters/README.md +212 -0
  541. package/src/components/Filters/index.ts +4 -0
  542. package/src/components/Input/Input.tsx +218 -0
  543. package/src/components/Input/README.md +128 -0
  544. package/src/components/Input/index.ts +2 -0
  545. package/src/components/LockOverlay/LockOverlay.tsx +82 -0
  546. package/src/components/LockOverlay/index.ts +2 -0
  547. package/src/components/Popup/Popup.tsx +374 -0
  548. package/src/components/Popup/README.md +133 -0
  549. package/src/components/Popup/index.ts +2 -0
  550. package/src/components/ProgressBar/ProgressBar.tsx +157 -0
  551. package/src/components/ProgressBar/index.ts +2 -0
  552. package/src/components/RedemptionOption/README.md +148 -0
  553. package/src/components/RedemptionOption/RedemptionOption.tsx +158 -0
  554. package/src/components/RedemptionOption/index.ts +2 -0
  555. package/src/components/ScratchCard/README.md +119 -0
  556. package/src/components/ScratchCard/ScratchCard.tsx +190 -0
  557. package/src/components/ScratchCard/ScratchCardContent.tsx +25 -0
  558. package/src/components/ScratchCard/index.ts +4 -0
  559. package/src/components/UnlockRewards/README.md +187 -0
  560. package/src/components/UnlockRewards/RewardItem.tsx +172 -0
  561. package/src/components/UnlockRewards/UnlockRewards.tsx +293 -0
  562. package/src/components/UnlockRewards/index.ts +4 -0
  563. package/src/components/Wheel/README.md +141 -0
  564. package/src/components/Wheel/Wheel.tsx +374 -0
  565. package/src/components/Wheel/index.ts +2 -0
  566. package/src/components/index.ts +14 -0
  567. package/src/constants/BRANDS.ts +64 -0
  568. package/src/index.ts +2 -0
  569. package/src/theme/Colors.ts +107 -0
  570. package/src/theme/ThemeContext.tsx +46 -0
  571. package/src/theme/index.ts +2 -0
@@ -0,0 +1,187 @@
1
+ # UnlockRewards
2
+
3
+ ![UnlockRewards Example](../../assets/components/UnlockRewards-1.png)
4
+ ![UnlockRewards with RTL](../../assets/components/UnlockRewards-2.png)
5
+
6
+ ## UnlockRewards Documentation
7
+
8
+ The `UnlockRewards` is a comprehensive component designed for displaying user rewards, achievements, or unlockable features. It provides a customizable interface with support for background images, icons, titles, descriptions, and status indicators for each reward. The component is fully RTL-compatible and offers different variants for close button positioning.
9
+
10
+ ### Usage
11
+
12
+ ```tsx
13
+ import UnlockRewards from "@/components/UnlockRewards/UnlockRewards";
14
+ import { useTheme } from "@/theme";
15
+ import { Ionicons } from "@expo/vector-icons";
16
+
17
+ const MyComponent = () => {
18
+ const theme = useTheme();
19
+
20
+ const handleClose = () => {
21
+ // Handle close action
22
+ };
23
+
24
+ const rewardsData = [
25
+ {
26
+ icon: <Ionicons name="water-outline" size={24} color={theme.helper} />,
27
+ activeIcon: <Ionicons name="water" size={24} color={theme.primary} />,
28
+ title: "Aqua Guardian",
29
+ description:
30
+ "Maintain water usage below the community average for a month.",
31
+ isActive: false,
32
+ status: "0/1",
33
+ statusBackgroundColor: theme.disabled,
34
+ statusTextColor: theme.text,
35
+ },
36
+ {
37
+ icon: <Ionicons name="build-outline" size={24} color={theme.helper} />,
38
+ activeIcon: <Ionicons name="build" size={24} color={theme.secondary} />,
39
+ title: "Leak Detective",
40
+ description: "Successfully report and fix a water leak on your property.",
41
+ isActive: true,
42
+ status: "1/1",
43
+ statusBackgroundColor: theme.primary,
44
+ statusTextColor: theme.secondary,
45
+ },
46
+ {
47
+ icon: <Ionicons name="leaf-outline" size={24} color={theme.helper} />,
48
+ activeIcon: <Ionicons name="leaf" size={24} color={theme.primary} />,
49
+ title: "Eco-Warrior",
50
+ description:
51
+ "Implement a rainwater harvesting system or greywater recycling.",
52
+ isActive: false,
53
+ status: "0/1",
54
+ statusBackgroundColor: theme.disabled,
55
+ statusTextColor: theme.text,
56
+ },
57
+ ];
58
+
59
+ return (
60
+ <UnlockRewards
61
+ title="Your Rewards"
62
+ description="Complete tasks to unlock special benefits"
63
+ rewards={rewardsData}
64
+ onClose={handleClose}
65
+ showCloseIcon={true}
66
+ closeIconVariant="nested"
67
+ topBackgroundHeight={200}
68
+ customCloseIcon={<Ionicons name="close-circle" size={28} color={theme.primary} />}
69
+ />
70
+ );
71
+ };
72
+
73
+ export default MyComponent
74
+ ```
75
+
76
+ ### RTL Example
77
+
78
+ ```tsx
79
+ <UnlockRewards
80
+ title="المكافآت الخاصة بك"
81
+ description="أكمل المهام لفتح المزايا الخاصة"
82
+ rewards={rewardsDataArabic}
83
+ onClose={handleClose}
84
+ showCloseIcon={true}
85
+ isRTL={true}
86
+ topBackgroundColor="#f5f5f5"
87
+ />
88
+ ```
89
+
90
+ ### Props
91
+
92
+ #### Core Props
93
+
94
+ | Prop | Type | Default | Description |
95
+ |------|------|---------|-------------|
96
+ | `rewards` | `Reward[]` | Required | Array of reward objects to display |
97
+ | `title` | `string` | `undefined` | Main title text |
98
+ | `description` | `string` | `undefined` | Description text displayed below title |
99
+ | `onClose` | `() => void` | `undefined` | Function to call when close icon is pressed |
100
+ | `isRTL` | `boolean` | `false` | Whether to render in right-to-left mode |
101
+
102
+ #### Top Background Props
103
+
104
+ | Prop | Type | Default | Description |
105
+ |------|------|---------|-------------|
106
+ | `topBackgroundImage` | `ImageSourcePropType` | `undefined` | Background image for the top section |
107
+ | `topBackgroundColor` | `string` | `theme.background` | Background color for the top section |
108
+ | `topBackgroundHeight` | `number` | `250` | Height of the top background section |
109
+ | `topBackgroundImageStyle` | `StyleProp<ImageStyle>` | `undefined` | Additional styles for the background image |
110
+ | `topBackgroundStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the background container |
111
+
112
+ #### Gradient Props
113
+
114
+ | Prop | Type | Default | Description |
115
+ |------|------|---------|-------------|
116
+ | `topGradientColors` | `string[]` | `undefined` | Array of colors for creating a gradient background in the top section |
117
+ | `topGradientStart` | `{ x: number; y: number }` | `{ x: 0.5, y: 0 }` | Starting point for the gradient |
118
+ | `topGradientEnd` | `{ x: number; y: number }` | `{ x: 0.5, y: 1 }` | Ending point for the gradient |
119
+ | `topGradientLocations` | `number[]` | `undefined` | Locations for the gradient color stops |
120
+
121
+ #### Style Props
122
+
123
+ | Prop | Type | Default | Description |
124
+ |------|------|---------|-------------|
125
+ | `cardContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the main container |
126
+ | `mainTitleStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the title text |
127
+ | `subtitleStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the subtitle/description text |
128
+ | `rewardsContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the rewards container |
129
+ | `smallIconsRowStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the icons row at the top |
130
+ | `activeIconStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for active reward icons |
131
+ | `inactiveIconStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for inactive reward icons |
132
+ | `modalOverlayStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the modal overlay (if component is used in a modal) |
133
+
134
+ #### Reward Item Style Props
135
+
136
+ | Prop | Type | Default | Description |
137
+ |------|------|---------|-------------|
138
+ | `rewardItemContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for each reward item container |
139
+ | `rewardItemIconWrapperStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the reward icon wrapper |
140
+ | `rewardItemTextContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the reward text container |
141
+ | `rewardItemTitleTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the reward title text |
142
+ | `rewardItemDescriptionTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the reward description text |
143
+ | `rewardItemStatusBadgeStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the status badge |
144
+ | `rewardItemStatusTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the status text |
145
+
146
+ #### Close Button Props
147
+
148
+ | Prop | Type | Default | Description |
149
+ |------|------|---------|-------------|
150
+ | `showCloseIcon` | `boolean` | `true` | Whether to show the close icon button |
151
+ | `customCloseIcon` | `ReactNode` | `undefined` | Custom component to use as close icon |
152
+ | `closeIconVariant` | `"floating" \| "nested"` | `"nested"` | Style variant for the close icon position |
153
+ | `closeIconContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the close icon container |
154
+ | `closeIconStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the close icon |
155
+ | `closeIconColor` | `string` | `theme.helper` | Color for the default close icon |
156
+ | `closeIconSize` | `number` | `28` | Size for the default close icon |
157
+
158
+ ### Reward Object Structure
159
+
160
+ Each reward in the `rewards` array should conform to this structure:
161
+
162
+ ```typescript
163
+ type Reward = {
164
+ icon?: React.ReactNode; // Icon for inactive state
165
+ activeIcon?: React.ReactNode; // Icon for active state
166
+ title: string; // Reward title
167
+ description: string; // Reward description
168
+ isActive: boolean; // Whether the reward is active/unlocked
169
+ status: string; // Status text (e.g., "UNLOCKED", "LOCKED")
170
+ statusBackgroundColor: string; // Background color for status badge
171
+ statusTextColor: string; // Text color for status badge
172
+ };
173
+ ```
174
+
175
+ ### Close Icon Variants
176
+
177
+ - **Floating**: The close icon appears outside the card's main border, creating a floating effect
178
+ - **Nested**: The close icon appears inside the card's border in the top-right (or top-left in RTL mode)
179
+
180
+ ### Related Components
181
+
182
+ - `Badge`: Used for displaying reward icons in active/inactive states
183
+ - `RewardItem`: Used for rendering individual reward entries
184
+ - `ImageBackground`: Used when a top background image is provided
185
+ - `TouchableOpacity`: Used for the close icon
186
+ - `Text`: Used for rendering text content
187
+ - `LinearGradient`: Used for creating gradient backgrounds
@@ -0,0 +1,172 @@
1
+ import React from "react";
2
+ import {
3
+ View,
4
+ Text,
5
+ StyleSheet,
6
+ TouchableOpacity,
7
+ ViewStyle,
8
+ TextStyle,
9
+ I18nManager,
10
+ } from "react-native";
11
+ import Badge from "../Badges/Badge";
12
+ import { useTheme, ThemeType } from "../../theme";
13
+
14
+ interface RewardItemProps {
15
+ icon: React.ReactNode;
16
+ activeIcon: React.ReactNode;
17
+ isActive?: boolean;
18
+
19
+ inactiveIconStyle?: ViewStyle;
20
+ activeIconStyle?: ViewStyle;
21
+
22
+ title: string;
23
+ description: string;
24
+ status: string;
25
+ statusBgColor: string;
26
+ statusTextColor: string;
27
+
28
+ isRTL?: boolean;
29
+
30
+ containerStyle?: ViewStyle;
31
+ badgeStyle?: ViewStyle;
32
+ textContainerStyle?: ViewStyle;
33
+ titleTextStyle?: TextStyle;
34
+ descriptionTextStyle?: TextStyle;
35
+ statusBadgeStyle?: ViewStyle;
36
+ statusTextStyle?: TextStyle;
37
+ }
38
+
39
+ const RewardItem: React.FC<RewardItemProps> = ({
40
+ icon,
41
+ title,
42
+ description,
43
+ status,
44
+ statusBgColor,
45
+ statusTextColor,
46
+ activeIcon,
47
+ isActive,
48
+ inactiveIconStyle,
49
+ activeIconStyle,
50
+ isRTL = false,
51
+ containerStyle,
52
+ badgeStyle,
53
+ textContainerStyle,
54
+ titleTextStyle,
55
+ descriptionTextStyle,
56
+ statusBadgeStyle,
57
+ statusTextStyle,
58
+ }) => {
59
+ const theme = useTheme();
60
+ const styles = themedStyles(theme);
61
+
62
+ return (
63
+ <View
64
+ style={[
65
+ styles.rewardItemContainer,
66
+ { flexDirection: isRTL ? "row-reverse" : "row" },
67
+ containerStyle,
68
+ ]}
69
+ >
70
+ <Badge
71
+ style={[
72
+ styles.badgeStyle,
73
+ { marginRight: isRTL ? 0 : 15, marginLeft: isRTL ? 15 : 0 },
74
+ badgeStyle,
75
+ ]}
76
+ isActive={isActive}
77
+ icon={icon}
78
+ activeIcon={activeIcon}
79
+ inactiveStyle={inactiveIconStyle}
80
+ activeStyle={activeIconStyle}
81
+ />
82
+ <View style={[styles.rewardTextContainer, textContainerStyle]}>
83
+ <Text
84
+ style={[
85
+ styles.rewardTitle,
86
+ titleTextStyle,
87
+ isRTL && { textAlign: "right" },
88
+ ]}
89
+ >
90
+ {title}
91
+ </Text>
92
+ <Text
93
+ style={[
94
+ styles.rewardDescription,
95
+ descriptionTextStyle,
96
+ isRTL && { textAlign: "right" },
97
+ ]}
98
+ >
99
+ {description}
100
+ </Text>
101
+ </View>
102
+ <View
103
+ style={[
104
+ styles.statusBadge,
105
+ { backgroundColor: statusBgColor },
106
+ { right: isRTL ? undefined : 10, left: isRTL ? 10 : undefined },
107
+ statusBadgeStyle,
108
+ ]}
109
+ >
110
+ <Text
111
+ style={[
112
+ styles.statusText,
113
+ { color: statusTextColor },
114
+ statusTextStyle,
115
+ ]}
116
+ >
117
+ {status}
118
+ </Text>
119
+ </View>
120
+ </View>
121
+ );
122
+ };
123
+
124
+ const themedStyles = (theme: ThemeType) =>
125
+ StyleSheet.create({
126
+ rewardItemContainer: {
127
+ alignItems: "center",
128
+ backgroundColor: theme.surface,
129
+ borderRadius: 15,
130
+ padding: 15,
131
+ marginBottom: 15,
132
+ width: "100%",
133
+ borderWidth: 1,
134
+ borderColor: theme.border,
135
+ },
136
+ badgeStyle: {
137
+ borderRadius: 10,
138
+ alignItems: "center",
139
+ justifyContent: "center",
140
+ },
141
+ rewardTextContainer: {
142
+ flex: 1,
143
+ },
144
+ rewardTitle: {
145
+ fontSize: 16,
146
+ fontWeight: "bold",
147
+ color: theme.text,
148
+ marginBottom: 4,
149
+ textAlign: "left",
150
+ },
151
+ rewardDescription: {
152
+ fontSize: 13,
153
+ color: theme.helper,
154
+ lineHeight: 18,
155
+ textAlign: "left",
156
+ },
157
+ statusBadge: {
158
+ paddingVertical: 4,
159
+ paddingHorizontal: 8,
160
+ borderRadius: 8,
161
+ top: 10,
162
+ position: "absolute",
163
+ alignSelf: "flex-start",
164
+ marginTop: 4,
165
+ },
166
+ statusText: {
167
+ fontSize: 12,
168
+ fontWeight: "bold",
169
+ },
170
+ });
171
+
172
+ export default RewardItem;
@@ -0,0 +1,293 @@
1
+ import React from "react";
2
+ import {
3
+ View,
4
+ Text,
5
+ StyleSheet,
6
+ ViewStyle,
7
+ TextStyle,
8
+ ImageBackground,
9
+ ImageSourcePropType,
10
+ ImageStyle,
11
+ } from "react-native";
12
+ import RewardItem from "../UnlockRewards/RewardItem";
13
+ import Badge from "../Badges/Badge";
14
+ import { useTheme, ThemeType } from "../../theme";
15
+ import { LinearGradient } from "expo-linear-gradient";
16
+ import CloseIcon from "../CloseIcon/CloseIcon"; // Import the new component
17
+
18
+ type Reward = {
19
+ icon?: React.ReactNode;
20
+ activeIcon?: React.ReactNode;
21
+ title: string;
22
+ description: string;
23
+ isActive: boolean;
24
+ status: string;
25
+ statusBackgroundColor: string;
26
+ statusTextColor: string;
27
+ };
28
+
29
+ interface UnlockRewardsProps {
30
+ title?: string;
31
+ description?: string;
32
+ rewards: Reward[];
33
+ activeIconStyle?: ViewStyle;
34
+ inactiveIconStyle?: ViewStyle;
35
+ onClose?: () => void; // Kept for passing to CloseIcon
36
+ isRTL?: boolean;
37
+ topBackgroundImage?: ImageSourcePropType;
38
+ topBackgroundColor?: string;
39
+ topBackgroundHeight?: number;
40
+ topBackgroundImageStyle?: ImageStyle;
41
+ topBackgroundStyle?: ViewStyle;
42
+ topGradientColors?: string[];
43
+ topGradientStart?: { x: number; y: number };
44
+ topGradientEnd?: { x: number; y: number };
45
+ topGradientLocations?: number[];
46
+ modalOverlayStyle?: ViewStyle;
47
+ cardContainerStyle?: ViewStyle;
48
+ mainTitleStyle?: TextStyle;
49
+ subtitleStyle?: TextStyle;
50
+ rewardsContainerStyle?: ViewStyle;
51
+ smallIconsRowStyle?: ViewStyle;
52
+ rewardItemContainerStyle?: ViewStyle;
53
+ rewardItemIconWrapperStyle?: ViewStyle;
54
+ rewardItemTextContainerStyle?: ViewStyle;
55
+ rewardItemTitleTextStyle?: TextStyle;
56
+ rewardItemDescriptionTextStyle?: TextStyle;
57
+ rewardItemStatusBadgeStyle?: ViewStyle;
58
+ rewardItemStatusTextStyle?: TextStyle;
59
+ showCloseIcon?: boolean;
60
+ customCloseIcon?: React.ReactNode;
61
+ closeIconVariant?: "floating" | "nested";
62
+ closeIconContainerStyle?: ViewStyle;
63
+ closeIconStyle?: TextStyle;
64
+ closeIconColor?: string;
65
+ closeIconSize?: number;
66
+ }
67
+
68
+ const UnlockRewards: React.FC<UnlockRewardsProps> = ({
69
+ rewards,
70
+ title,
71
+ description,
72
+ activeIconStyle,
73
+ inactiveIconStyle,
74
+ onClose, // Keep onClose
75
+ isRTL = false,
76
+ topBackgroundImage,
77
+ topBackgroundColor: topBackgroundColorProp,
78
+ topBackgroundHeight = 250,
79
+ topBackgroundImageStyle,
80
+ topBackgroundStyle,
81
+ topGradientColors,
82
+ topGradientStart,
83
+ topGradientEnd,
84
+ topGradientLocations,
85
+ cardContainerStyle,
86
+ mainTitleStyle,
87
+ subtitleStyle,
88
+ rewardsContainerStyle,
89
+ smallIconsRowStyle,
90
+ rewardItemContainerStyle,
91
+ rewardItemIconWrapperStyle,
92
+ rewardItemTextContainerStyle,
93
+ rewardItemTitleTextStyle,
94
+ rewardItemDescriptionTextStyle,
95
+ rewardItemStatusBadgeStyle,
96
+ rewardItemStatusTextStyle,
97
+ showCloseIcon = true,
98
+ customCloseIcon,
99
+ closeIconVariant = "nested",
100
+ closeIconContainerStyle,
101
+ closeIconStyle,
102
+ closeIconColor,
103
+ closeIconSize = 28,
104
+ }) => {
105
+ const theme = useTheme();
106
+ const styles = themedStyles(theme);
107
+
108
+ const topBackgroundColor = topBackgroundColorProp ?? theme.surface;
109
+
110
+ const finalCardStyle = StyleSheet.flatten([
111
+ styles.cardContainer,
112
+ cardContainerStyle,
113
+ ]);
114
+ const cardBorderRadius = finalCardStyle.borderRadius ?? 20;
115
+
116
+ const topBackgroundBorderRadius = {
117
+ borderTopLeftRadius: cardBorderRadius,
118
+ borderTopRightRadius: cardBorderRadius,
119
+ };
120
+
121
+ const topElementBaseStyle = [
122
+ styles.topBackgroundBase,
123
+ topBackgroundBorderRadius,
124
+ topBackgroundStyle,
125
+ { height: topBackgroundHeight },
126
+ ];
127
+
128
+ return (
129
+ <View style={[styles.cardContainer, cardContainerStyle]}>
130
+ {/* --- CloseIcon component --- */}
131
+ <CloseIcon
132
+ show={showCloseIcon}
133
+ onPress={onClose}
134
+ customIcon={customCloseIcon}
135
+ variant={closeIconVariant}
136
+ containerStyle={closeIconContainerStyle}
137
+ iconStyle={closeIconStyle}
138
+ color={closeIconColor} // Pass the prop down
139
+ size={closeIconSize}
140
+ isRTL={isRTL}
141
+ />
142
+ {/* --- End CloseIcon usage --- */}
143
+
144
+ {/* --- Top Background Rendering --- */}
145
+ {topGradientColors && topGradientColors.length >= 2 ? (
146
+ <LinearGradient
147
+ colors={topGradientColors as any}
148
+ start={topGradientStart}
149
+ end={topGradientEnd}
150
+ locations={topGradientLocations as any}
151
+ style={topElementBaseStyle}
152
+ />
153
+ ) : topBackgroundImage ? (
154
+ <ImageBackground
155
+ source={topBackgroundImage}
156
+ style={topElementBaseStyle}
157
+ imageStyle={[
158
+ styles.topBackgroundImageStyle,
159
+ topBackgroundBorderRadius,
160
+ topBackgroundImageStyle,
161
+ ]}
162
+ resizeMode="cover"
163
+ />
164
+ ) : (
165
+ <View
166
+ style={[
167
+ ...topElementBaseStyle,
168
+ { backgroundColor: topBackgroundColor },
169
+ ]}
170
+ />
171
+ )}
172
+ {/* --- End Top Background Rendering --- */}
173
+
174
+ {title && <Text style={[styles.mainTitle, mainTitleStyle]}>{title}</Text>}
175
+ {description && (
176
+ <Text style={[styles.subtitle, subtitleStyle]}>{description}</Text>
177
+ )}
178
+
179
+ <View style={[styles.rewardsContainer, rewardsContainerStyle]}>
180
+ <View
181
+ style={[
182
+ styles.smallIconsRow,
183
+ smallIconsRowStyle,
184
+ isRTL && { flexDirection: "row-reverse" },
185
+ ]}
186
+ >
187
+ {rewards.map((reward, index) => (
188
+ <Badge
189
+ key={`badge-${index}`}
190
+ isActive={reward.isActive}
191
+ icon={reward.icon}
192
+ activeIcon={reward.activeIcon}
193
+ inactiveStyle={inactiveIconStyle}
194
+ activeStyle={activeIconStyle}
195
+ />
196
+ ))}
197
+ </View>
198
+ {rewards.map((reward, index) => (
199
+ <RewardItem
200
+ key={`reward-${index}`}
201
+ icon={reward.icon}
202
+ activeIcon={reward.activeIcon}
203
+ isActive={reward.isActive}
204
+ title={reward.title}
205
+ description={reward.description}
206
+ status={reward.status}
207
+ statusBgColor={reward.statusBackgroundColor}
208
+ statusTextColor={reward.statusTextColor}
209
+ activeIconStyle={activeIconStyle}
210
+ inactiveIconStyle={inactiveIconStyle}
211
+ containerStyle={rewardItemContainerStyle}
212
+ badgeStyle={rewardItemIconWrapperStyle}
213
+ textContainerStyle={rewardItemTextContainerStyle}
214
+ titleTextStyle={rewardItemTitleTextStyle}
215
+ descriptionTextStyle={rewardItemDescriptionTextStyle}
216
+ statusBadgeStyle={rewardItemStatusBadgeStyle}
217
+ statusTextStyle={rewardItemStatusTextStyle}
218
+ isRTL={isRTL}
219
+ />
220
+ ))}
221
+ </View>
222
+ </View>
223
+ );
224
+ };
225
+
226
+ const themedStyles = (theme: ThemeType) =>
227
+ StyleSheet.create({
228
+ cardContainer: {
229
+ backgroundColor: theme.surface,
230
+ borderRadius: 20,
231
+ padding: 20,
232
+ paddingTop: 40,
233
+ width: "100%",
234
+ maxWidth: 400,
235
+ alignItems: "center",
236
+ shadowColor: "#000",
237
+ shadowOffset: { width: 0, height: 2 },
238
+ shadowOpacity: 0.15,
239
+ shadowRadius: 5,
240
+ elevation: 5,
241
+ position: "relative",
242
+ borderWidth: 1,
243
+ borderColor: theme.border,
244
+ },
245
+ topBackgroundBase: {
246
+ position: "absolute",
247
+ top: 0,
248
+ left: 0,
249
+ right: 0,
250
+ zIndex: 0,
251
+ },
252
+ topBackgroundImageStyle: {},
253
+ closeIconContainer: {
254
+ position: "absolute",
255
+ zIndex: 10,
256
+ },
257
+ mainTitle: {
258
+ fontSize: 26,
259
+ fontWeight: "bold",
260
+ color: theme.text,
261
+ marginBottom: 8,
262
+ textAlign: "center",
263
+ zIndex: 1,
264
+ },
265
+ subtitle: {
266
+ fontSize: 14,
267
+ color: theme.helper,
268
+ textAlign: "center",
269
+ marginBottom: 25,
270
+ paddingHorizontal: 10,
271
+ zIndex: 1,
272
+ },
273
+ rewardsContainer: {
274
+ backgroundColor: theme.background,
275
+ padding: 20,
276
+ borderRadius: 20,
277
+ width: "100%",
278
+ zIndex: 1,
279
+ borderWidth: 1,
280
+ borderColor: theme.border,
281
+ },
282
+ smallIconsRow: {
283
+ flexDirection: "row",
284
+ justifyContent: "space-around",
285
+ alignItems: "center",
286
+ marginBottom: 30,
287
+ paddingVertical: 15,
288
+ backgroundColor: theme.surface,
289
+ borderRadius: 15,
290
+ },
291
+ });
292
+
293
+ export default UnlockRewards;
@@ -0,0 +1,4 @@
1
+ export {default as UnlockRewards} from "./UnlockRewards";
2
+ export {default as RewardItem} from "./RewardItem";
3
+ export * from "./RewardItem"
4
+ export * from "./UnlockRewards";