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,374 @@
1
+ import { useTheme, ThemeType } from "../../theme";
2
+ import React, { FC, ReactNode } from "react";
3
+ import {
4
+ Modal,
5
+ View,
6
+ Text,
7
+ TouchableOpacity,
8
+ StyleSheet,
9
+ ImageBackground,
10
+ ImageSourcePropType,
11
+ Dimensions,
12
+ TouchableWithoutFeedback,
13
+ Platform,
14
+ StatusBar,
15
+ Image,
16
+ TextStyle,
17
+ ViewStyle,
18
+ ImageStyle,
19
+ } from "react-native";
20
+ import CloseIcon from "../CloseIcon/CloseIcon";
21
+
22
+ interface PopupProps {
23
+ visible: boolean;
24
+ onClose: () => void;
25
+ backgroundImage?: ImageSourcePropType;
26
+ title?: string;
27
+ content?: string;
28
+ subtitle?: string;
29
+ children?: ReactNode;
30
+ primaryButtonText?: string;
31
+ onPrimaryButtonPress?: () => void;
32
+ secondaryButtonText?: string;
33
+ onSecondaryButtonPress?: () => void;
34
+ closeOnBackdropPress?: boolean;
35
+ showCloseIcon?: boolean;
36
+ closeIconVariant?: "floating" | "nested";
37
+ customCloseIcon?: ReactNode;
38
+ closeIconContainerStyle?: ViewStyle;
39
+ closeIconStyle?: TextStyle;
40
+ closeIconColor?: string;
41
+ illustrationImage?: ImageSourcePropType;
42
+ illustrationStyle?: ImageStyle;
43
+ containerStyle?: ViewStyle;
44
+ contentContainerStyle?: ViewStyle;
45
+ titleStyle?: TextStyle;
46
+ subtitleStyle?: TextStyle;
47
+ contentStyle?: TextStyle;
48
+ primaryButtonStyle?: ViewStyle;
49
+ primaryButtonTextStyle?: TextStyle;
50
+ secondaryButtonStyle?: ViewStyle;
51
+ secondaryButtonTextStyle?: TextStyle;
52
+ isRTL?: boolean;
53
+ closeIconSize?: number;
54
+ }
55
+
56
+ const Popup: FC<PopupProps> = ({
57
+ visible,
58
+ onClose,
59
+ backgroundImage,
60
+ title,
61
+ content,
62
+ subtitle,
63
+ primaryButtonText,
64
+ onPrimaryButtonPress,
65
+ secondaryButtonText,
66
+ onSecondaryButtonPress,
67
+ closeOnBackdropPress = true,
68
+ showCloseIcon = false,
69
+ customCloseIcon,
70
+ illustrationImage,
71
+ illustrationStyle,
72
+ containerStyle,
73
+ titleStyle,
74
+ contentStyle,
75
+ primaryButtonStyle,
76
+ primaryButtonTextStyle,
77
+ secondaryButtonStyle,
78
+ secondaryButtonTextStyle,
79
+ contentContainerStyle,
80
+ closeIconContainerStyle,
81
+ closeIconStyle,
82
+ closeIconVariant = "floating",
83
+ subtitleStyle,
84
+ isRTL = false,
85
+ closeIconColor,
86
+ closeIconSize = 28
87
+ }) => {
88
+ const theme = useTheme();
89
+ const styles = createStyles(theme); // Create styles using theme
90
+
91
+ const PopupContent = () => (
92
+ <View
93
+ style={[
94
+ styles.popupContainer,
95
+ { backgroundColor: theme.surface }, // Use surface for popup background
96
+ containerStyle,
97
+ ]}
98
+ >
99
+ <CloseIcon
100
+ show={showCloseIcon}
101
+ onPress={onClose}
102
+ customIcon={customCloseIcon}
103
+ variant={closeIconVariant}
104
+ containerStyle={closeIconContainerStyle}
105
+ iconStyle={closeIconStyle}
106
+ color={closeIconColor}
107
+ size={closeIconSize}
108
+ isRTL={isRTL}
109
+ />
110
+ {backgroundImage ? (
111
+ <ImageBackground
112
+ source={backgroundImage}
113
+ style={styles.backgroundImage}
114
+ imageStyle={styles.backgroundImageStyle}
115
+ >
116
+ <PopupInnerContent />
117
+ </ImageBackground>
118
+ ) : (
119
+ <PopupInnerContent />
120
+ )}
121
+ </View>
122
+ );
123
+
124
+ const PopupInnerContent = () => (
125
+ <View style={[styles.contentContainer, contentContainerStyle]}>
126
+ {illustrationImage && (
127
+ <View style={styles.illustrationContainer}>
128
+ <Image
129
+ source={illustrationImage}
130
+ style={[styles.illustrationImage, illustrationStyle]}
131
+ resizeMode="contain"
132
+ />
133
+ </View>
134
+ )}
135
+
136
+ {title && (
137
+ <Text
138
+ style={[
139
+ styles.title,
140
+ { color: theme.text, textAlign: "center" }, // Keep text color
141
+ titleStyle,
142
+ ]}
143
+ >
144
+ {title}
145
+ </Text>
146
+ )}
147
+
148
+ {subtitle && (
149
+ <Text
150
+ style={[
151
+ styles.subtitle,
152
+ { color: theme.text, textAlign: "center" }, // Use helper for subtitle
153
+ subtitleStyle,
154
+ ]}
155
+ >
156
+ {subtitle}
157
+ </Text>
158
+ )}
159
+
160
+ {content && (
161
+ <Text
162
+ style={[
163
+ styles.content,
164
+ { color: theme.text, textAlign: "center" }, // Keep text color
165
+ contentStyle,
166
+ ]}
167
+ >
168
+ {content}
169
+ </Text>
170
+ )}
171
+
172
+ {(secondaryButtonText || primaryButtonText) && (
173
+ <View
174
+ style={[
175
+ styles.buttonContainer,
176
+ { flexDirection: isRTL ? "row-reverse" : "row" },
177
+ ]}
178
+ >
179
+ {secondaryButtonText && (
180
+ <TouchableOpacity
181
+ style={[
182
+ styles.secondaryButton,
183
+ { borderColor: theme.primary }, // Keep primary border
184
+ secondaryButtonStyle,
185
+ isRTL
186
+ ? { marginLeft: 12, marginRight: 0 }
187
+ : { marginRight: 12, marginLeft: 0 },
188
+ ]}
189
+ onPress={onSecondaryButtonPress}
190
+ >
191
+ <Text
192
+ style={[
193
+ styles.secondaryButtonText,
194
+ { color: theme.primary }, // Keep primary text color
195
+ secondaryButtonTextStyle,
196
+ ]}
197
+ >
198
+ {secondaryButtonText}
199
+ </Text>
200
+ </TouchableOpacity>
201
+ )}
202
+
203
+ {primaryButtonText && (
204
+ <TouchableOpacity
205
+ style={[
206
+ styles.primaryButton,
207
+ { backgroundColor: theme.primary }, // Keep primary background
208
+ primaryButtonStyle,
209
+ ]}
210
+ onPress={onPrimaryButtonPress}
211
+ >
212
+ <Text
213
+ style={[
214
+ styles.primaryButtonText,
215
+ { color: theme.onPrimary }, // Use onPrimary for text
216
+ primaryButtonTextStyle,
217
+ ]}
218
+ >
219
+ {primaryButtonText}
220
+ </Text>
221
+ </TouchableOpacity>
222
+ )}
223
+ </View>
224
+ )}
225
+ </View>
226
+ );
227
+
228
+ return (
229
+ <Modal
230
+ transparent
231
+ visible={visible}
232
+ animationType="fade"
233
+ onRequestClose={onClose}
234
+ statusBarTranslucent
235
+ >
236
+ <View style={styles.modalOverlay}>
237
+ {closeOnBackdropPress && (
238
+ <TouchableWithoutFeedback onPress={onClose}>
239
+ <View style={StyleSheet.absoluteFill} />
240
+ </TouchableWithoutFeedback>
241
+ )}
242
+
243
+ <TouchableWithoutFeedback>
244
+ <PopupContent />
245
+ </TouchableWithoutFeedback>
246
+ </View>
247
+ </Modal>
248
+ );
249
+ };
250
+
251
+ const { width } = Dimensions.get("window");
252
+ const popupWidth = width * 0.85;
253
+
254
+ // Function to create themed styles
255
+ const createStyles = (theme: ThemeType) =>
256
+ StyleSheet.create({
257
+ modalOverlay: {
258
+ flex: 1,
259
+ backgroundColor: "rgba(0, 0, 0, 0.5)", // Keep overlay color
260
+ justifyContent: "center",
261
+ alignItems: "center",
262
+ paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
263
+ },
264
+ popupContainer: {
265
+ width: popupWidth,
266
+ maxHeight: "80%",
267
+ borderRadius: 16,
268
+ elevation: 5,
269
+ shadowColor: "#000",
270
+ shadowOffset: { width: 0, height: 2 },
271
+ shadowOpacity: 0.25,
272
+ shadowRadius: 3.84,
273
+ position: "relative",
274
+ // backgroundColor is set inline using theme.surface
275
+ },
276
+ closeIconContainer: {
277
+ position: "absolute",
278
+ zIndex: 10,
279
+ width: 32,
280
+ height: 32,
281
+ justifyContent: "center",
282
+ alignItems: "center",
283
+ borderWidth: 1,
284
+ borderRadius: 16,
285
+ padding: 0,
286
+ // backgroundColor and borderColor set inline
287
+ },
288
+ closeIcon: {
289
+ width: 24,
290
+ height: 24,
291
+ resizeMode: "contain",
292
+ textAlign: "center",
293
+ textAlignVertical: "center",
294
+ lineHeight: 24,
295
+ // color is set inline
296
+ },
297
+ backgroundImage: {
298
+ width: "100%",
299
+ height: "100%",
300
+ },
301
+ backgroundImageStyle: {
302
+ borderRadius: 16,
303
+ },
304
+ contentContainer: {
305
+ padding: 24,
306
+ alignItems: "center",
307
+ justifyContent: "center",
308
+ borderRadius: 16,
309
+ },
310
+ illustrationContainer: {
311
+ marginBottom: 16,
312
+ alignItems: "center",
313
+ justifyContent: "center",
314
+ },
315
+ illustrationImage: {
316
+ width: 150,
317
+ height: 150,
318
+ marginBottom: 8,
319
+ },
320
+ title: {
321
+ fontSize: 20,
322
+ fontWeight: "bold",
323
+ marginBottom: 12,
324
+ width: "100%",
325
+ // color is set inline
326
+ },
327
+ subtitle: {
328
+ fontSize: 20, // Adjusted size for subtitle
329
+ fontWeight: "bold", // Adjusted weight for subtitle
330
+ marginBottom: 12,
331
+ width: "100%",
332
+ },
333
+ content: {
334
+ fontSize: 16,
335
+ marginBottom: 24,
336
+ lineHeight: 22,
337
+ width: "100%",
338
+ // color is set inline
339
+ },
340
+ buttonContainer: {
341
+ justifyContent: "center",
342
+ marginTop: 16,
343
+ width: "100%",
344
+ },
345
+ primaryButton: {
346
+ paddingVertical: 12,
347
+ paddingHorizontal: 32,
348
+ borderRadius: 50,
349
+ minWidth: 120,
350
+ alignItems: "center",
351
+ // backgroundColor is set inline
352
+ },
353
+ primaryButtonText: {
354
+ fontWeight: "600",
355
+ fontSize: 16,
356
+ // color is set inline using theme.onPrimary
357
+ },
358
+ secondaryButton: {
359
+ paddingVertical: 12,
360
+ paddingHorizontal: 24,
361
+ borderRadius: 50,
362
+ borderWidth: 1,
363
+ minWidth: 120,
364
+ alignItems: "center",
365
+ // borderColor is set inline
366
+ },
367
+ secondaryButtonText: {
368
+ fontWeight: "600",
369
+ fontSize: 16,
370
+ // color is set inline
371
+ },
372
+ });
373
+
374
+ export default Popup;
@@ -0,0 +1,133 @@
1
+ # Popup
2
+
3
+ ![Standard Popup Example](../../assets/components/Popup-1.png)
4
+ ![Popup with RTL](../../assets/components/Popup-3.png)
5
+ ![Popup with background image](../../assets/components/Popup-2.png)
6
+
7
+
8
+ ## Popup Documentation
9
+
10
+ The `Popup` is a versatile modal component designed for displaying important information, confirmations, or actions to users. It provides a customizable interface with support for background images, illustrations, titles, content text, and action buttons. The component is fully RTL-compatible and offers different variants for close button positioning.
11
+
12
+ ### Usage
13
+
14
+ ```tsx
15
+ import Popup from "@/components/Popup";
16
+ import { useTheme } from "@/theme";
17
+
18
+ const MyComponent = () => {
19
+ const [isVisible, setIsVisible] = useState(false);
20
+ const theme = useTheme();
21
+
22
+ const handleClose = () => setIsVisible(false);
23
+ const handlePrimaryAction = () => {
24
+ // Do something
25
+ handleClose();
26
+ };
27
+
28
+ return (
29
+ <Popup
30
+ visible={isVisible}
31
+ onClose={handleClose}
32
+ showCloseIcon={true}
33
+ containerStyle={{ borderColor: "white", borderWidth: 1, height: 300, width:400 }}
34
+ title="UNLOCK"
35
+ closeIconVariant="nested"
36
+ content="Upgrade to Visa signature to get your Card Now!"
37
+ primaryButtonText="Upgrade"
38
+ subtitle={`60%\nDiscount`}
39
+ backgroundImage={require("@/assets/images/face.jpg")}
40
+ onPrimaryButtonPress={handleUpgrade}
41
+ contentContainerStyle={{backgroundColor:"rgba(0,0,0,0.5)", flex: 1}}
42
+ closeIconContainerStyle={{backgroundColor:"white"}}
43
+ customCloseIcon={<Ionicons name="close" size={20} color={"black"} />}
44
+ />
45
+ );
46
+ };
47
+ ```
48
+
49
+ ### Illustration Example
50
+
51
+ ```tsx
52
+ <Popup
53
+ visible={isVisible}
54
+ onClose={handleClose}
55
+ showCloseIcon={true}
56
+ containerStyle={{ borderColor: "white", borderWidth: 1 }}
57
+ illustrationImage={require('@/assets/images/upgrade.png')} // Path to your illustration
58
+ title="UNLOCK"
59
+ closeIconVariant="nested"
60
+ content="Upgrade to Visa signature to get your Card Now!"
61
+ primaryButtonText="Upgrade"
62
+ primaryButtonStyle={{width: 300, backgroundColor:"#E94DAA"}}
63
+ onPrimaryButtonPress={handleUpgrade}
64
+ customCloseIcon={<Ionicons
65
+ name="close"
66
+ size={20}
67
+ color={"#E94DAA"}/>}
68
+ />
69
+ ```
70
+
71
+ ### RTL
72
+
73
+ ```tsx
74
+ <Popup
75
+ visible={isVisible}
76
+ onClose={handleClose}
77
+ showCloseIcon={true}
78
+ title="ترقية إلى النسخة المميزة"
79
+ subtitle="استمتع بمزايا حصرية"
80
+ content="احصل على جميع الميزات المتقدمة والمحتوى الحصري بدون إعلانات. اشترك الآن واستمتع بتجربة كاملة مع تحديثات مجانية لمدة عام كامل."
81
+ primaryButtonText="ترقية الآن"
82
+ secondaryButtonText="ليس الآن"
83
+ onPrimaryButtonPress={handleUpgrade}
84
+ onSecondaryButtonPress={handleDismiss}
85
+ isRTL={true}
86
+ />
87
+ ```
88
+
89
+ ### Props
90
+
91
+ | Prop | Type | Default | Description |
92
+ |------|------|---------|-------------|
93
+ | `visible` | `boolean` | Required | Controls the visibility of the popup |
94
+ | `onClose` | `() => void` | Required | Function to call when popup should be closed |
95
+ | `backgroundImage` | `ImageSourcePropType` | `undefined` | Optional background image for the popup |
96
+ | `title` | `string` | `undefined` | Main title text |
97
+ | `subtitle` | `string` | `undefined` | Subtitle text displayed below title |
98
+ | `content` | `string` | `undefined` | Main content text |
99
+ | `children` | `ReactNode` | `undefined` | Custom content to render inside the popup |
100
+ | `primaryButtonText` | `string` | `undefined` | Text for the primary action button |
101
+ | `onPrimaryButtonPress` | `() => void` | `undefined` | Function to execute when primary button is pressed |
102
+ | `secondaryButtonText` | `string` | `undefined` | Text for the secondary action button |
103
+ | `onSecondaryButtonPress` | `() => void` | `undefined` | Function to execute when secondary button is pressed |
104
+ | `closeOnBackdropPress` | `boolean` | `true` | Whether tapping outside the popup should close it |
105
+ | `showCloseIcon` | `boolean` | `false` | Whether to show the close icon button |
106
+ | `closeIconVariant` | `"floating" \| "nested"` | `"floating"` | Style variant for the close icon position |
107
+ | `customCloseIcon` | `ReactNode` | `undefined` | Custom component to use as close icon |
108
+ | `illustrationImage` | `ImageSourcePropType` | `undefined` | Image to display at the top of the content area |
109
+ | `isRTL` | `boolean` | `false` | Whether to render in right-to-left mode |
110
+ | `containerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the container |
111
+ | `contentContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the content container |
112
+ | `titleStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the title text |
113
+ | `subtitleStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the subtitle text |
114
+ | `contentStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the content text |
115
+ | `primaryButtonStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the primary button |
116
+ | `primaryButtonTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the primary button text |
117
+ | `secondaryButtonStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the secondary button |
118
+ | `secondaryButtonTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the secondary button text |
119
+ | `closeIconContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the close icon container |
120
+ | `closeIconStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the close icon |
121
+ | `illustrationStyle` | `StyleProp<ImageStyle>` | `undefined` | Additional styles for the illustration image |
122
+
123
+ ### Close Icon Variants
124
+
125
+ - **Floating**: The close icon appears outside the popup's main border, creating a floating effect
126
+ - **Nested**: The close icon appears inside the popup's border in the top-right (or top-left in RTL mode)
127
+
128
+ ### Related Components
129
+
130
+ - `Modal`: The native React Native component used as the foundation
131
+ - `ImageBackground`: Used when a background image is provided
132
+ - `TouchableOpacity`: Used for the buttons and close icon
133
+ - `Text`: Used for rendering text content
@@ -0,0 +1,2 @@
1
+ export { default as Popup} from "./Popup";
2
+ export * from "./Popup"
@@ -0,0 +1,157 @@
1
+ import { useTheme } from "../../theme/ThemeContext";
2
+ import React from "react";
3
+ import { View, Text, StyleSheet, ViewStyle, TextStyle } from "react-native";
4
+
5
+ export type ProgressBarTextPosition = "inside" | "above" | "below";
6
+ export type ProgressBarTextAlign = "center" | "left" | "right";
7
+
8
+ interface ProgressBarProps {
9
+ progress?: number;
10
+ text?: string;
11
+ containerStyle?: ViewStyle;
12
+ barContainerStyle?: ViewStyle;
13
+ progressStyle?: ViewStyle;
14
+ remainingStyle?: ViewStyle;
15
+ textStyle?: TextStyle;
16
+ progressColor?: string;
17
+ remainingColor?: string;
18
+ textColor?: string;
19
+ height?: number;
20
+ width?: number;
21
+ borderRadius?: number;
22
+ textPosition?: ProgressBarTextPosition;
23
+ textAlign?: "center" | "left" | "right";
24
+ showText?: boolean;
25
+ isRTL?: boolean;
26
+ }
27
+
28
+ const ProgressBar: React.FC<ProgressBarProps> = ({
29
+ progress = 0.5,
30
+ text = "",
31
+ containerStyle = {},
32
+ barContainerStyle = {},
33
+ progressStyle = {},
34
+ remainingStyle = {},
35
+ textStyle = {},
36
+ progressColor: progressColorProp,
37
+ remainingColor: remainingColorProp,
38
+ textColor: textColorProp,
39
+ height = 40,
40
+ width,
41
+ borderRadius = 5,
42
+ textPosition = "inside",
43
+ textAlign = "left",
44
+ showText = true,
45
+ isRTL = false,
46
+ }) => {
47
+ const theme = useTheme();
48
+ const progressColor = progressColorProp ?? theme.primary;
49
+ const remainingColor = remainingColorProp ?? theme.border;
50
+ const textColor = textColorProp ?? theme.onPrimary;
51
+
52
+ const clampedProgress: number = Math.min(Math.max(progress, 0), 1);
53
+
54
+ return (
55
+ <View style={[styles.container, containerStyle, { width }]}>
56
+ {textPosition === "above" && showText && (
57
+ <Text
58
+ style={[
59
+ styles.textAbove,
60
+ { color: theme.text, textAlign }, // Use theme.text for outside text
61
+ textStyle,
62
+ ]}
63
+ >
64
+ {text}
65
+ </Text>
66
+ )}
67
+
68
+ <View
69
+ style={[
70
+ styles.barContainer,
71
+ {
72
+ height,
73
+ borderRadius,
74
+ backgroundColor: remainingColor,
75
+ },
76
+ barContainerStyle,
77
+ ]}
78
+ >
79
+ <View
80
+ style={[
81
+ styles.progressBar,
82
+ isRTL ? { right: 0 } : { left: 0 },
83
+ {
84
+ width: `${clampedProgress * 100}%`,
85
+ height: "100%",
86
+ borderRadius,
87
+ backgroundColor: progressColor,
88
+ },
89
+ progressStyle,
90
+ ]}
91
+ />
92
+
93
+ {textPosition === "inside" && showText && (
94
+ <Text
95
+ style={[
96
+ styles.textInside,
97
+ { color: textColor, textAlign }, // Use determined textColor for inside
98
+ textStyle,
99
+ ]}
100
+ >
101
+ {text}
102
+ </Text>
103
+ )}
104
+ </View>
105
+
106
+ {textPosition === "below" && showText && (
107
+ <Text
108
+ numberOfLines={1}
109
+ style={[
110
+ styles.textBelow,
111
+ { color: theme.text, textAlign }, // Use theme.text for outside text
112
+ textStyle,
113
+ ]}
114
+ >
115
+ {text}
116
+ </Text>
117
+ )}
118
+ </View>
119
+ );
120
+ };
121
+
122
+ const styles = StyleSheet.create({
123
+ container: {
124
+ width: "100%",
125
+ justifyContent: "center",
126
+ },
127
+ barContainer: {
128
+ width: "100%",
129
+ overflow: "hidden",
130
+ position: "relative",
131
+ },
132
+ progressBar: {
133
+ position: "absolute",
134
+ top: 0,
135
+ },
136
+ textInside: {
137
+ position: "absolute",
138
+ left: 0,
139
+ right: 0,
140
+ top: 0,
141
+ bottom: 0,
142
+ textAlign: "center",
143
+ textAlignVertical: "center",
144
+ paddingHorizontal: 10,
145
+ fontWeight: "bold",
146
+ },
147
+ textAbove: {
148
+ marginBottom: 5,
149
+ fontWeight: "bold",
150
+ },
151
+ textBelow: {
152
+ marginTop: 5,
153
+ fontWeight: "bold",
154
+ },
155
+ });
156
+
157
+ export default ProgressBar;
@@ -0,0 +1,2 @@
1
+ export { default as ProgressBar} from './ProgressBar';
2
+ export * from './ProgressBar';