related-ui-components 1.9.6 → 1.9.7

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 (562) hide show
  1. package/README.md +200 -0
  2. package/lib/commonjs/app.js +161 -0
  3. package/lib/commonjs/app.js.map +1 -0
  4. package/lib/commonjs/assets/components/BannerWithDetails.png +0 -0
  5. package/lib/commonjs/assets/components/DealCard-Horizontal.png +0 -0
  6. package/lib/commonjs/assets/components/DealCard-Vertical.png +0 -0
  7. package/lib/commonjs/assets/components/DealCard-floating.png +0 -0
  8. package/lib/commonjs/assets/components/DealCard-nested.png +0 -0
  9. package/lib/commonjs/assets/components/Filters.png +0 -0
  10. package/lib/commonjs/assets/components/Popup-1.png +0 -0
  11. package/lib/commonjs/assets/components/Popup-2.png +0 -0
  12. package/lib/commonjs/assets/components/Popup-3.png +0 -0
  13. package/lib/commonjs/assets/components/RedemptionOption-Horizontal.png +0 -0
  14. package/lib/commonjs/assets/components/RedemptionOption-Vertical.png +0 -0
  15. package/lib/commonjs/assets/components/SimpleBanner.png +0 -0
  16. package/lib/commonjs/assets/components/SimpleTrendingCard.png +0 -0
  17. package/lib/commonjs/assets/components/SimpleTrendingCardV2.png +0 -0
  18. package/lib/commonjs/assets/components/UnlockRewards-1.png +0 -0
  19. package/lib/commonjs/assets/components/UnlockRewards-2.png +0 -0
  20. package/lib/commonjs/assets/fonts/SpaceMono-Regular.ttf +0 -0
  21. package/lib/commonjs/assets/images/adaptive-icon.png +0 -0
  22. package/lib/commonjs/assets/images/face.jpg +0 -0
  23. package/lib/commonjs/assets/images/favicon.png +0 -0
  24. package/lib/commonjs/assets/images/giftvoucher.jpg +0 -0
  25. package/lib/commonjs/assets/images/icon.png +0 -0
  26. package/lib/commonjs/assets/images/insta.webp +0 -0
  27. package/lib/commonjs/assets/images/muse.jpg +0 -0
  28. package/lib/commonjs/assets/images/namshi-banner.png +0 -0
  29. package/lib/commonjs/assets/images/namshi.webp +0 -0
  30. package/lib/commonjs/assets/images/partial-react-logo.png +0 -0
  31. package/lib/commonjs/assets/images/pb-logo.jpg +0 -0
  32. package/lib/commonjs/assets/images/pb.jpg +0 -0
  33. package/lib/commonjs/assets/images/react-logo.png +0 -0
  34. package/lib/commonjs/assets/images/react-logo@2x.png +0 -0
  35. package/lib/commonjs/assets/images/react-logo@3x.png +0 -0
  36. package/lib/commonjs/assets/images/scratch_foreground.png +0 -0
  37. package/lib/commonjs/assets/images/splash-icon.png +0 -0
  38. package/lib/commonjs/assets/images/upgrade.png +0 -0
  39. package/lib/commonjs/components/Badges/Badge.js +67 -0
  40. package/lib/commonjs/components/Badges/Badge.js.map +1 -0
  41. package/lib/commonjs/components/Badges/README.md +98 -0
  42. package/lib/commonjs/components/Badges/index.js +29 -0
  43. package/lib/commonjs/components/Badges/index.js.map +1 -0
  44. package/lib/commonjs/components/Banner/Banner.js +138 -0
  45. package/lib/commonjs/components/Banner/Banner.js.map +1 -0
  46. package/lib/commonjs/components/Banner/BannerWithDetails.js +120 -0
  47. package/lib/commonjs/components/Banner/BannerWithDetails.js.map +1 -0
  48. package/lib/commonjs/components/Banner/README.md +101 -0
  49. package/lib/commonjs/components/Banner/index.js +48 -0
  50. package/lib/commonjs/components/Banner/index.js.map +1 -0
  51. package/lib/commonjs/components/BrandIcon/BrandIcon.js +115 -0
  52. package/lib/commonjs/components/BrandIcon/BrandIcon.js.map +1 -0
  53. package/lib/commonjs/components/BrandIcon/index.js +29 -0
  54. package/lib/commonjs/components/BrandIcon/index.js.map +1 -0
  55. package/lib/commonjs/components/Button/Button.js +124 -0
  56. package/lib/commonjs/components/Button/Button.js.map +1 -0
  57. package/lib/commonjs/components/Button/index.js +29 -0
  58. package/lib/commonjs/components/Button/index.js.map +1 -0
  59. package/lib/commonjs/components/Card/Card.js +116 -0
  60. package/lib/commonjs/components/Card/Card.js.map +1 -0
  61. package/lib/commonjs/components/Card/CardContent.js +42 -0
  62. package/lib/commonjs/components/Card/CardContent.js.map +1 -0
  63. package/lib/commonjs/components/Card/CardFooter.js +34 -0
  64. package/lib/commonjs/components/Card/CardFooter.js.map +1 -0
  65. package/lib/commonjs/components/Card/CardHeader.js +79 -0
  66. package/lib/commonjs/components/Card/CardHeader.js.map +1 -0
  67. package/lib/commonjs/components/Card/CardImage.js +52 -0
  68. package/lib/commonjs/components/Card/CardImage.js.map +1 -0
  69. package/lib/commonjs/components/Card/index.js +98 -0
  70. package/lib/commonjs/components/Card/index.js.map +1 -0
  71. package/lib/commonjs/components/Card/templates/DealCard.js +194 -0
  72. package/lib/commonjs/components/Card/templates/DealCard.js.map +1 -0
  73. package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js +237 -0
  74. package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
  75. package/lib/commonjs/components/Card/templates/README.md +233 -0
  76. package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js +59 -0
  77. package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js.map +1 -0
  78. package/lib/commonjs/components/Card/types.js +6 -0
  79. package/lib/commonjs/components/Card/types.js.map +1 -0
  80. package/lib/commonjs/components/CloseIcon/CloseIcon.js +75 -0
  81. package/lib/commonjs/components/CloseIcon/CloseIcon.js.map +1 -0
  82. package/lib/commonjs/components/CloseIcon/index.js +29 -0
  83. package/lib/commonjs/components/CloseIcon/index.js.map +1 -0
  84. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js +358 -0
  85. package/lib/commonjs/components/DateRangePicker/DateRangePicker.js.map +1 -0
  86. package/lib/commonjs/components/DateRangePicker/index.js +4 -0
  87. package/lib/commonjs/components/DateRangePicker/index.js.map +1 -0
  88. package/lib/commonjs/components/Filters/Filters.js +345 -0
  89. package/lib/commonjs/components/Filters/Filters.js.map +1 -0
  90. package/lib/commonjs/components/Filters/PointsRangeSelector.js +264 -0
  91. package/lib/commonjs/components/Filters/PointsRangeSelector.js.map +1 -0
  92. package/lib/commonjs/components/Filters/README.md +212 -0
  93. package/lib/commonjs/components/Filters/index.js +48 -0
  94. package/lib/commonjs/components/Filters/index.js.map +1 -0
  95. package/lib/commonjs/components/Input/Input.js +161 -0
  96. package/lib/commonjs/components/Input/Input.js.map +1 -0
  97. package/lib/commonjs/components/Input/README.md +128 -0
  98. package/lib/commonjs/components/Input/index.js +29 -0
  99. package/lib/commonjs/components/Input/index.js.map +1 -0
  100. package/lib/commonjs/components/LockOverlay/LockOverlay.js +65 -0
  101. package/lib/commonjs/components/LockOverlay/LockOverlay.js.map +1 -0
  102. package/lib/commonjs/components/LockOverlay/index.js +29 -0
  103. package/lib/commonjs/components/LockOverlay/index.js.map +1 -0
  104. package/lib/commonjs/components/Marquee/Marquee.js +105 -0
  105. package/lib/commonjs/components/Marquee/Marquee.js.map +1 -0
  106. package/lib/commonjs/components/Marquee/index.js +29 -0
  107. package/lib/commonjs/components/Marquee/index.js.map +1 -0
  108. package/lib/commonjs/components/NumericStepper/NumericStepper.js +103 -0
  109. package/lib/commonjs/components/NumericStepper/NumericStepper.js.map +1 -0
  110. package/lib/commonjs/components/NumericStepper/index.js +29 -0
  111. package/lib/commonjs/components/NumericStepper/index.js.map +1 -0
  112. package/lib/commonjs/components/Popup/Popup.js +342 -0
  113. package/lib/commonjs/components/Popup/Popup.js.map +1 -0
  114. package/lib/commonjs/components/Popup/README.md +133 -0
  115. package/lib/commonjs/components/Popup/index.js +29 -0
  116. package/lib/commonjs/components/Popup/index.js.map +1 -0
  117. package/lib/commonjs/components/ProgressBar/ProgressBar.js +125 -0
  118. package/lib/commonjs/components/ProgressBar/ProgressBar.js.map +1 -0
  119. package/lib/commonjs/components/ProgressBar/index.js +29 -0
  120. package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
  121. package/lib/commonjs/components/RedeemedVoucher/RedeemedVoucherSheet.js +459 -0
  122. package/lib/commonjs/components/RedeemedVoucher/RedeemedVoucherSheet.js.map +1 -0
  123. package/lib/commonjs/components/RedeemedVoucher/index.js +29 -0
  124. package/lib/commonjs/components/RedeemedVoucher/index.js.map +1 -0
  125. package/lib/commonjs/components/RedemptionOption/README.md +148 -0
  126. package/lib/commonjs/components/RedemptionOption/RedemptionOption.js +132 -0
  127. package/lib/commonjs/components/RedemptionOption/RedemptionOption.js.map +1 -0
  128. package/lib/commonjs/components/RedemptionOption/index.js +29 -0
  129. package/lib/commonjs/components/RedemptionOption/index.js.map +1 -0
  130. package/lib/commonjs/components/ScratchCard/README.md +119 -0
  131. package/lib/commonjs/components/ScratchCard/ScratchCard.js +222 -0
  132. package/lib/commonjs/components/ScratchCard/ScratchCard.js.map +1 -0
  133. package/lib/commonjs/components/ScratchCard/ScratchCardContent.js +28 -0
  134. package/lib/commonjs/components/ScratchCard/ScratchCardContent.js.map +1 -0
  135. package/lib/commonjs/components/ScratchCard/index.js +48 -0
  136. package/lib/commonjs/components/ScratchCard/index.js.map +1 -0
  137. package/lib/commonjs/components/SelectAmount/SelectAmount.js +189 -0
  138. package/lib/commonjs/components/SelectAmount/SelectAmount.js.map +1 -0
  139. package/lib/commonjs/components/SelectAmount/index.js +4 -0
  140. package/lib/commonjs/components/SelectAmount/index.js.map +1 -0
  141. package/lib/commonjs/components/Skeleton/Shimmer.js +75 -0
  142. package/lib/commonjs/components/Skeleton/Shimmer.js.map +1 -0
  143. package/lib/commonjs/components/Skeleton/SkeletonElement.js +36 -0
  144. package/lib/commonjs/components/Skeleton/SkeletonElement.js.map +1 -0
  145. package/lib/commonjs/components/Skeleton/index.js +48 -0
  146. package/lib/commonjs/components/Skeleton/index.js.map +1 -0
  147. package/lib/commonjs/components/Suggestions/SuggestionList.js +98 -0
  148. package/lib/commonjs/components/Suggestions/SuggestionList.js.map +1 -0
  149. package/lib/commonjs/components/TravelBooking/CarRentalForm.js +370 -0
  150. package/lib/commonjs/components/TravelBooking/CarRentalForm.js.map +1 -0
  151. package/lib/commonjs/components/TravelBooking/FlightForm.js +347 -0
  152. package/lib/commonjs/components/TravelBooking/FlightForm.js.map +1 -0
  153. package/lib/commonjs/components/TravelBooking/FlightSummary.js +257 -0
  154. package/lib/commonjs/components/TravelBooking/FlightSummary.js.map +1 -0
  155. package/lib/commonjs/components/TravelBooking/HotelForm.js +290 -0
  156. package/lib/commonjs/components/TravelBooking/HotelForm.js.map +1 -0
  157. package/lib/commonjs/components/TravelBooking/HotelSummary.js +246 -0
  158. package/lib/commonjs/components/TravelBooking/HotelSummary.js.map +1 -0
  159. package/lib/commonjs/components/TravelBooking/README.md +421 -0
  160. package/lib/commonjs/components/TravelBooking/SummaryBar.js +181 -0
  161. package/lib/commonjs/components/TravelBooking/SummaryBar.js.map +1 -0
  162. package/lib/commonjs/components/TravelBooking/TabSelector.js +115 -0
  163. package/lib/commonjs/components/TravelBooking/TabSelector.js.map +1 -0
  164. package/lib/commonjs/components/TravelBooking/TravelBooking.js +261 -0
  165. package/lib/commonjs/components/TravelBooking/TravelBooking.js.map +1 -0
  166. package/lib/commonjs/components/TravelBooking/index.js +22 -0
  167. package/lib/commonjs/components/TravelBooking/index.js.map +1 -0
  168. package/lib/commonjs/components/TravelBooking/types.js +15 -0
  169. package/lib/commonjs/components/TravelBooking/types.js.map +1 -0
  170. package/lib/commonjs/components/UnlockRewards/README.md +187 -0
  171. package/lib/commonjs/components/UnlockRewards/RewardItem.js +129 -0
  172. package/lib/commonjs/components/UnlockRewards/RewardItem.js.map +1 -0
  173. package/lib/commonjs/components/UnlockRewards/UnlockRewards.js +230 -0
  174. package/lib/commonjs/components/UnlockRewards/UnlockRewards.js.map +1 -0
  175. package/lib/commonjs/components/UnlockRewards/index.js +48 -0
  176. package/lib/commonjs/components/UnlockRewards/index.js.map +1 -0
  177. package/lib/commonjs/components/Wheel/README.md +141 -0
  178. package/lib/commonjs/components/Wheel/Wheel.js +361 -0
  179. package/lib/commonjs/components/Wheel/Wheel.js.map +1 -0
  180. package/lib/commonjs/components/Wheel/index.js +29 -0
  181. package/lib/commonjs/components/Wheel/index.js.map +1 -0
  182. package/lib/commonjs/components/index.js +204 -0
  183. package/lib/commonjs/components/index.js.map +1 -0
  184. package/lib/commonjs/constants/BRANDS.js +58 -0
  185. package/lib/commonjs/constants/BRANDS.js.map +1 -0
  186. package/lib/commonjs/index.js +28 -0
  187. package/lib/commonjs/index.js.map +1 -0
  188. package/lib/commonjs/theme/Colors.js +154 -0
  189. package/lib/commonjs/theme/Colors.js.map +1 -0
  190. package/lib/commonjs/theme/ThemeContext.js +57 -0
  191. package/lib/commonjs/theme/ThemeContext.js.map +1 -0
  192. package/lib/commonjs/theme/index.js +28 -0
  193. package/lib/commonjs/theme/index.js.map +1 -0
  194. package/lib/module/theme/ThemeContext.js +39 -19
  195. package/lib/module/theme/ThemeContext.js.map +1 -1
  196. package/lib/typescript/lib/commonjs/app.d.ts +4 -0
  197. package/lib/typescript/lib/commonjs/app.d.ts.map +1 -0
  198. package/lib/typescript/lib/commonjs/components/Badges/Badge.d.ts +14 -0
  199. package/lib/typescript/lib/commonjs/components/Badges/Badge.d.ts.map +1 -0
  200. package/lib/typescript/lib/commonjs/components/Badges/index.d.ts +3 -0
  201. package/lib/typescript/lib/commonjs/components/Badges/index.d.ts.map +1 -0
  202. package/lib/typescript/lib/commonjs/components/Banner/Banner.d.ts +24 -0
  203. package/lib/typescript/lib/commonjs/components/Banner/Banner.d.ts.map +1 -0
  204. package/lib/typescript/lib/commonjs/components/Banner/BannerWithDetails.d.ts +16 -0
  205. package/lib/typescript/lib/commonjs/components/Banner/BannerWithDetails.d.ts.map +1 -0
  206. package/lib/typescript/lib/commonjs/components/Banner/index.d.ts +4 -0
  207. package/lib/typescript/lib/commonjs/components/Banner/index.d.ts.map +1 -0
  208. package/lib/typescript/lib/commonjs/components/BrandIcon/BrandIcon.d.ts +18 -0
  209. package/lib/typescript/lib/commonjs/components/BrandIcon/BrandIcon.d.ts.map +1 -0
  210. package/lib/typescript/lib/commonjs/components/BrandIcon/index.d.ts +3 -0
  211. package/lib/typescript/lib/commonjs/components/BrandIcon/index.d.ts.map +1 -0
  212. package/lib/typescript/lib/commonjs/components/Button/Button.d.ts +17 -0
  213. package/lib/typescript/lib/commonjs/components/Button/Button.d.ts.map +1 -0
  214. package/lib/typescript/lib/commonjs/components/Button/index.d.ts +3 -0
  215. package/lib/typescript/lib/commonjs/components/Button/index.d.ts.map +1 -0
  216. package/lib/typescript/lib/commonjs/components/Card/Card.d.ts +17 -0
  217. package/lib/typescript/lib/commonjs/components/Card/Card.d.ts.map +1 -0
  218. package/lib/typescript/lib/commonjs/components/Card/CardContent.d.ts +8 -0
  219. package/lib/typescript/lib/commonjs/components/Card/CardContent.d.ts.map +1 -0
  220. package/lib/typescript/lib/commonjs/components/Card/CardFooter.d.ts +9 -0
  221. package/lib/typescript/lib/commonjs/components/Card/CardFooter.d.ts.map +1 -0
  222. package/lib/typescript/lib/commonjs/components/Card/CardHeader.d.ts +14 -0
  223. package/lib/typescript/lib/commonjs/components/Card/CardHeader.d.ts.map +1 -0
  224. package/lib/typescript/lib/commonjs/components/Card/CardImage.d.ts +12 -0
  225. package/lib/typescript/lib/commonjs/components/Card/CardImage.d.ts.map +1 -0
  226. package/lib/typescript/lib/commonjs/components/Card/index.d.ts +10 -0
  227. package/lib/typescript/lib/commonjs/components/Card/index.d.ts.map +1 -0
  228. package/lib/typescript/lib/commonjs/components/Card/templates/DealCard.d.ts +30 -0
  229. package/lib/typescript/lib/commonjs/components/Card/templates/DealCard.d.ts.map +1 -0
  230. package/lib/typescript/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts +37 -0
  231. package/lib/typescript/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
  232. package/lib/typescript/lib/commonjs/components/Card/templates/SimpleTrendingCard.d.ts +12 -0
  233. package/lib/typescript/lib/commonjs/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
  234. package/lib/typescript/lib/commonjs/components/Card/types.d.ts +2 -0
  235. package/lib/typescript/lib/commonjs/components/Card/types.d.ts.map +1 -0
  236. package/lib/typescript/lib/commonjs/components/CloseIcon/CloseIcon.d.ts +14 -0
  237. package/lib/typescript/lib/commonjs/components/CloseIcon/CloseIcon.d.ts.map +1 -0
  238. package/lib/typescript/lib/commonjs/components/CloseIcon/index.d.ts +3 -0
  239. package/lib/typescript/lib/commonjs/components/CloseIcon/index.d.ts.map +1 -0
  240. package/lib/typescript/lib/commonjs/components/DateRangePicker/DateRangePicker.d.ts +20 -0
  241. package/lib/typescript/lib/commonjs/components/DateRangePicker/DateRangePicker.d.ts.map +1 -0
  242. package/lib/typescript/lib/commonjs/components/DateRangePicker/index.d.ts.map +1 -0
  243. package/lib/typescript/lib/commonjs/components/Filters/Filters.d.ts +56 -0
  244. package/lib/typescript/lib/commonjs/components/Filters/Filters.d.ts.map +1 -0
  245. package/lib/typescript/lib/commonjs/components/Filters/PointsRangeSelector.d.ts +27 -0
  246. package/lib/typescript/lib/commonjs/components/Filters/PointsRangeSelector.d.ts.map +1 -0
  247. package/lib/typescript/lib/commonjs/components/Filters/index.d.ts +4 -0
  248. package/lib/typescript/lib/commonjs/components/Filters/index.d.ts.map +1 -0
  249. package/lib/typescript/lib/commonjs/components/Input/Input.d.ts +4 -0
  250. package/lib/typescript/lib/commonjs/components/Input/Input.d.ts.map +1 -0
  251. package/lib/typescript/lib/commonjs/components/Input/index.d.ts +3 -0
  252. package/lib/typescript/lib/commonjs/components/Input/index.d.ts.map +1 -0
  253. package/lib/typescript/lib/commonjs/components/LockOverlay/LockOverlay.d.ts +15 -0
  254. package/lib/typescript/lib/commonjs/components/LockOverlay/LockOverlay.d.ts.map +1 -0
  255. package/lib/typescript/lib/commonjs/components/LockOverlay/index.d.ts +3 -0
  256. package/lib/typescript/lib/commonjs/components/LockOverlay/index.d.ts.map +1 -0
  257. package/lib/typescript/lib/commonjs/components/Marquee/Marquee.d.ts +14 -0
  258. package/lib/typescript/lib/commonjs/components/Marquee/Marquee.d.ts.map +1 -0
  259. package/lib/typescript/lib/commonjs/components/Marquee/index.d.ts +3 -0
  260. package/lib/typescript/lib/commonjs/components/Marquee/index.d.ts.map +1 -0
  261. package/lib/typescript/lib/commonjs/components/NumericStepper/NumericStepper.d.ts +16 -0
  262. package/lib/typescript/lib/commonjs/components/NumericStepper/NumericStepper.d.ts.map +1 -0
  263. package/lib/typescript/lib/commonjs/components/NumericStepper/index.d.ts +3 -0
  264. package/lib/typescript/lib/commonjs/components/NumericStepper/index.d.ts.map +1 -0
  265. package/lib/typescript/lib/commonjs/components/Popup/Popup.d.ts +39 -0
  266. package/lib/typescript/lib/commonjs/components/Popup/Popup.d.ts.map +1 -0
  267. package/lib/typescript/lib/commonjs/components/Popup/index.d.ts +3 -0
  268. package/lib/typescript/lib/commonjs/components/Popup/index.d.ts.map +1 -0
  269. package/lib/typescript/lib/commonjs/components/ProgressBar/ProgressBar.d.ts +22 -0
  270. package/lib/typescript/lib/commonjs/components/ProgressBar/ProgressBar.d.ts.map +1 -0
  271. package/lib/typescript/lib/commonjs/components/ProgressBar/index.d.ts +3 -0
  272. package/lib/typescript/lib/commonjs/components/ProgressBar/index.d.ts.map +1 -0
  273. package/lib/typescript/lib/commonjs/components/RedeemedVoucher/RedeemedVoucherSheet.d.ts +4 -0
  274. package/lib/typescript/lib/commonjs/components/RedeemedVoucher/RedeemedVoucherSheet.d.ts.map +1 -0
  275. package/lib/typescript/lib/commonjs/components/RedeemedVoucher/index.d.ts +3 -0
  276. package/lib/typescript/lib/commonjs/components/RedeemedVoucher/index.d.ts.map +1 -0
  277. package/lib/typescript/lib/commonjs/components/RedemptionOption/RedemptionOption.d.ts +23 -0
  278. package/lib/typescript/lib/commonjs/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
  279. package/lib/typescript/lib/commonjs/components/RedemptionOption/index.d.ts +3 -0
  280. package/lib/typescript/lib/commonjs/components/RedemptionOption/index.d.ts.map +1 -0
  281. package/lib/typescript/lib/commonjs/components/ScratchCard/ScratchCard.d.ts +19 -0
  282. package/lib/typescript/lib/commonjs/components/ScratchCard/ScratchCard.d.ts.map +1 -0
  283. package/lib/typescript/lib/commonjs/components/ScratchCard/ScratchCardContent.d.ts +7 -0
  284. package/lib/typescript/lib/commonjs/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
  285. package/lib/typescript/lib/commonjs/components/ScratchCard/index.d.ts +4 -0
  286. package/lib/typescript/lib/commonjs/components/ScratchCard/index.d.ts.map +1 -0
  287. package/lib/typescript/lib/commonjs/components/SelectAmount/SelectAmount.d.ts +29 -0
  288. package/lib/typescript/lib/commonjs/components/SelectAmount/SelectAmount.d.ts.map +1 -0
  289. package/lib/typescript/lib/commonjs/components/SelectAmount/index.d.ts.map +1 -0
  290. package/lib/typescript/lib/commonjs/components/Skeleton/Shimmer.d.ts +11 -0
  291. package/lib/typescript/lib/commonjs/components/Skeleton/Shimmer.d.ts.map +1 -0
  292. package/lib/typescript/lib/commonjs/components/Skeleton/SkeletonElement.d.ts +10 -0
  293. package/lib/typescript/lib/commonjs/components/Skeleton/SkeletonElement.d.ts.map +1 -0
  294. package/lib/typescript/lib/commonjs/components/Skeleton/index.d.ts +4 -0
  295. package/lib/typescript/lib/commonjs/components/Skeleton/index.d.ts.map +1 -0
  296. package/lib/typescript/lib/commonjs/components/Suggestions/SuggestionList.d.ts +12 -0
  297. package/lib/typescript/lib/commonjs/components/Suggestions/SuggestionList.d.ts.map +1 -0
  298. package/lib/typescript/lib/commonjs/components/TravelBooking/CarRentalForm.d.ts +52 -0
  299. package/lib/typescript/lib/commonjs/components/TravelBooking/CarRentalForm.d.ts.map +1 -0
  300. package/lib/typescript/lib/commonjs/components/TravelBooking/FlightForm.d.ts +47 -0
  301. package/lib/typescript/lib/commonjs/components/TravelBooking/FlightForm.d.ts.map +1 -0
  302. package/lib/typescript/lib/commonjs/components/TravelBooking/FlightSummary.d.ts +32 -0
  303. package/lib/typescript/lib/commonjs/components/TravelBooking/FlightSummary.d.ts.map +1 -0
  304. package/lib/typescript/lib/commonjs/components/TravelBooking/HotelForm.d.ts +45 -0
  305. package/lib/typescript/lib/commonjs/components/TravelBooking/HotelForm.d.ts.map +1 -0
  306. package/lib/typescript/lib/commonjs/components/TravelBooking/HotelSummary.d.ts +36 -0
  307. package/lib/typescript/lib/commonjs/components/TravelBooking/HotelSummary.d.ts.map +1 -0
  308. package/lib/typescript/lib/commonjs/components/TravelBooking/SummaryBar.d.ts +12 -0
  309. package/lib/typescript/lib/commonjs/components/TravelBooking/SummaryBar.d.ts.map +1 -0
  310. package/lib/typescript/lib/commonjs/components/TravelBooking/TabSelector.d.ts +15 -0
  311. package/lib/typescript/lib/commonjs/components/TravelBooking/TabSelector.d.ts.map +1 -0
  312. package/lib/typescript/lib/commonjs/components/TravelBooking/TravelBooking.d.ts +47 -0
  313. package/lib/typescript/lib/commonjs/components/TravelBooking/TravelBooking.d.ts.map +1 -0
  314. package/lib/typescript/lib/commonjs/components/TravelBooking/index.d.ts.map +1 -0
  315. package/lib/typescript/lib/commonjs/components/TravelBooking/types.d.ts +3 -0
  316. package/lib/typescript/lib/commonjs/components/TravelBooking/types.d.ts.map +1 -0
  317. package/lib/typescript/lib/commonjs/components/UnlockRewards/RewardItem.d.ts +23 -0
  318. package/lib/typescript/lib/commonjs/components/UnlockRewards/RewardItem.d.ts.map +1 -0
  319. package/lib/typescript/lib/commonjs/components/UnlockRewards/UnlockRewards.d.ts +41 -0
  320. package/lib/typescript/lib/commonjs/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
  321. package/lib/typescript/lib/commonjs/components/UnlockRewards/index.d.ts +4 -0
  322. package/lib/typescript/lib/commonjs/components/UnlockRewards/index.d.ts.map +1 -0
  323. package/lib/typescript/lib/commonjs/components/Wheel/Wheel.d.ts +25 -0
  324. package/lib/typescript/lib/commonjs/components/Wheel/Wheel.d.ts.map +1 -0
  325. package/lib/typescript/lib/commonjs/components/Wheel/index.d.ts +3 -0
  326. package/lib/typescript/lib/commonjs/components/Wheel/index.d.ts.map +1 -0
  327. package/lib/typescript/lib/commonjs/components/index.d.ts +2 -0
  328. package/lib/typescript/lib/commonjs/components/index.d.ts.map +1 -0
  329. package/lib/typescript/lib/commonjs/constants/BRANDS.d.ts +14 -0
  330. package/lib/typescript/lib/commonjs/constants/BRANDS.d.ts.map +1 -0
  331. package/lib/typescript/lib/commonjs/index.d.ts +2 -0
  332. package/lib/typescript/lib/commonjs/index.d.ts.map +1 -0
  333. package/lib/typescript/lib/commonjs/theme/Colors.d.ts +110 -0
  334. package/lib/typescript/lib/commonjs/theme/Colors.d.ts.map +1 -0
  335. package/lib/typescript/lib/commonjs/theme/ThemeContext.d.ts +11 -0
  336. package/lib/typescript/lib/commonjs/theme/ThemeContext.d.ts.map +1 -0
  337. package/lib/typescript/lib/commonjs/theme/index.d.ts +2 -0
  338. package/lib/typescript/lib/commonjs/theme/index.d.ts.map +1 -0
  339. package/lib/typescript/src/app.d.ts.map +1 -0
  340. package/lib/typescript/src/components/Badges/Badge.d.ts.map +1 -0
  341. package/lib/typescript/src/components/Badges/index.d.ts.map +1 -0
  342. package/lib/typescript/src/components/Banner/Banner.d.ts.map +1 -0
  343. package/lib/typescript/src/components/Banner/BannerWithDetails.d.ts.map +1 -0
  344. package/lib/typescript/src/components/Banner/index.d.ts.map +1 -0
  345. package/lib/typescript/src/components/BrandIcon/BrandIcon.d.ts.map +1 -0
  346. package/lib/typescript/src/components/BrandIcon/index.d.ts.map +1 -0
  347. package/lib/typescript/src/components/Button/Button.d.ts.map +1 -0
  348. package/lib/typescript/src/components/Button/index.d.ts.map +1 -0
  349. package/lib/typescript/src/components/Card/Card.d.ts.map +1 -0
  350. package/lib/typescript/src/components/Card/CardContent.d.ts.map +1 -0
  351. package/lib/typescript/src/components/Card/CardFooter.d.ts.map +1 -0
  352. package/lib/typescript/src/components/Card/CardHeader.d.ts.map +1 -0
  353. package/lib/typescript/src/components/Card/CardImage.d.ts.map +1 -0
  354. package/lib/typescript/src/components/Card/index.d.ts.map +1 -0
  355. package/lib/typescript/src/components/Card/templates/DealCard.d.ts.map +1 -0
  356. package/lib/typescript/src/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
  357. package/lib/typescript/src/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
  358. package/lib/typescript/src/components/Card/types.d.ts.map +1 -0
  359. package/lib/typescript/src/components/CloseIcon/CloseIcon.d.ts.map +1 -0
  360. package/lib/typescript/src/components/CloseIcon/index.d.ts.map +1 -0
  361. package/lib/typescript/src/components/DateRangePicker/DateRangePicker.d.ts.map +1 -0
  362. package/lib/typescript/src/components/DateRangePicker/index.d.ts +2 -0
  363. package/lib/typescript/src/components/DateRangePicker/index.d.ts.map +1 -0
  364. package/lib/typescript/src/components/Filters/Filters.d.ts.map +1 -0
  365. package/lib/typescript/src/components/Filters/PointsRangeSelector.d.ts.map +1 -0
  366. package/lib/typescript/src/components/Filters/index.d.ts.map +1 -0
  367. package/lib/typescript/src/components/Input/Input.d.ts.map +1 -0
  368. package/lib/typescript/src/components/Input/index.d.ts.map +1 -0
  369. package/lib/typescript/src/components/LockOverlay/LockOverlay.d.ts.map +1 -0
  370. package/lib/typescript/src/components/LockOverlay/index.d.ts.map +1 -0
  371. package/lib/typescript/src/components/Marquee/Marquee.d.ts.map +1 -0
  372. package/lib/typescript/src/components/Marquee/index.d.ts.map +1 -0
  373. package/lib/typescript/src/components/NumericStepper/NumericStepper.d.ts.map +1 -0
  374. package/lib/typescript/src/components/NumericStepper/index.d.ts.map +1 -0
  375. package/lib/typescript/src/components/Popup/Popup.d.ts.map +1 -0
  376. package/lib/typescript/src/components/Popup/index.d.ts.map +1 -0
  377. package/lib/typescript/src/components/ProgressBar/ProgressBar.d.ts.map +1 -0
  378. package/lib/typescript/src/components/ProgressBar/index.d.ts.map +1 -0
  379. package/lib/typescript/src/components/RedeemedVoucher/RedeemedVoucherSheet.d.ts.map +1 -0
  380. package/lib/typescript/src/components/RedeemedVoucher/index.d.ts.map +1 -0
  381. package/lib/typescript/src/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
  382. package/lib/typescript/src/components/RedemptionOption/index.d.ts.map +1 -0
  383. package/lib/typescript/src/components/ScratchCard/ScratchCard.d.ts.map +1 -0
  384. package/lib/typescript/src/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
  385. package/lib/typescript/src/components/ScratchCard/index.d.ts.map +1 -0
  386. package/lib/typescript/src/components/SelectAmount/SelectAmount.d.ts.map +1 -0
  387. package/lib/typescript/src/components/SelectAmount/index.d.ts +2 -0
  388. package/lib/typescript/src/components/SelectAmount/index.d.ts.map +1 -0
  389. package/lib/typescript/src/components/Skeleton/Shimmer.d.ts.map +1 -0
  390. package/lib/typescript/src/components/Skeleton/SkeletonElement.d.ts.map +1 -0
  391. package/lib/typescript/src/components/Skeleton/index.d.ts.map +1 -0
  392. package/lib/typescript/src/components/Suggestions/SuggestionList.d.ts.map +1 -0
  393. package/lib/typescript/src/components/TravelBooking/CarRentalForm.d.ts.map +1 -0
  394. package/lib/typescript/src/components/TravelBooking/FlightForm.d.ts.map +1 -0
  395. package/lib/typescript/src/components/TravelBooking/FlightSummary.d.ts.map +1 -0
  396. package/lib/typescript/src/components/TravelBooking/HotelForm.d.ts.map +1 -0
  397. package/lib/typescript/src/components/TravelBooking/HotelSummary.d.ts.map +1 -0
  398. package/lib/typescript/src/components/TravelBooking/SummaryBar.d.ts.map +1 -0
  399. package/lib/typescript/src/components/TravelBooking/TabSelector.d.ts.map +1 -0
  400. package/lib/typescript/src/components/TravelBooking/TravelBooking.d.ts.map +1 -0
  401. package/lib/typescript/src/components/TravelBooking/index.d.ts +2 -0
  402. package/lib/typescript/src/components/TravelBooking/index.d.ts.map +1 -0
  403. package/lib/typescript/src/components/TravelBooking/types.d.ts.map +1 -0
  404. package/lib/typescript/src/components/UnlockRewards/RewardItem.d.ts.map +1 -0
  405. package/lib/typescript/src/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
  406. package/lib/typescript/src/components/UnlockRewards/index.d.ts.map +1 -0
  407. package/lib/typescript/src/components/Wheel/Wheel.d.ts.map +1 -0
  408. package/lib/typescript/src/components/Wheel/index.d.ts.map +1 -0
  409. package/lib/typescript/src/components/index.d.ts.map +1 -0
  410. package/lib/typescript/src/constants/BRANDS.d.ts.map +1 -0
  411. package/lib/typescript/src/index.d.ts.map +1 -0
  412. package/lib/typescript/src/theme/Colors.d.ts.map +1 -0
  413. package/lib/typescript/{theme → src/theme}/ThemeContext.d.ts +8 -5
  414. package/lib/typescript/src/theme/ThemeContext.d.ts.map +1 -0
  415. package/lib/typescript/src/theme/index.d.ts.map +1 -0
  416. package/package.json +3 -3
  417. package/src/theme/ThemeContext.tsx +56 -20
  418. package/lib/typescript/app.d.ts.map +0 -1
  419. package/lib/typescript/components/Badges/Badge.d.ts.map +0 -1
  420. package/lib/typescript/components/Badges/index.d.ts.map +0 -1
  421. package/lib/typescript/components/Banner/Banner.d.ts.map +0 -1
  422. package/lib/typescript/components/Banner/BannerWithDetails.d.ts.map +0 -1
  423. package/lib/typescript/components/Banner/index.d.ts.map +0 -1
  424. package/lib/typescript/components/BrandIcon/BrandIcon.d.ts.map +0 -1
  425. package/lib/typescript/components/BrandIcon/index.d.ts.map +0 -1
  426. package/lib/typescript/components/Button/Button.d.ts.map +0 -1
  427. package/lib/typescript/components/Button/index.d.ts.map +0 -1
  428. package/lib/typescript/components/Card/Card.d.ts.map +0 -1
  429. package/lib/typescript/components/Card/CardContent.d.ts.map +0 -1
  430. package/lib/typescript/components/Card/CardFooter.d.ts.map +0 -1
  431. package/lib/typescript/components/Card/CardHeader.d.ts.map +0 -1
  432. package/lib/typescript/components/Card/CardImage.d.ts.map +0 -1
  433. package/lib/typescript/components/Card/index.d.ts.map +0 -1
  434. package/lib/typescript/components/Card/templates/DealCard.d.ts.map +0 -1
  435. package/lib/typescript/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +0 -1
  436. package/lib/typescript/components/Card/templates/SimpleTrendingCard.d.ts.map +0 -1
  437. package/lib/typescript/components/Card/types.d.ts.map +0 -1
  438. package/lib/typescript/components/CloseIcon/CloseIcon.d.ts.map +0 -1
  439. package/lib/typescript/components/CloseIcon/index.d.ts.map +0 -1
  440. package/lib/typescript/components/DateRangePicker/DateRangePicker.d.ts.map +0 -1
  441. package/lib/typescript/components/DateRangePicker/index.d.ts.map +0 -1
  442. package/lib/typescript/components/Filters/Filters.d.ts.map +0 -1
  443. package/lib/typescript/components/Filters/PointsRangeSelector.d.ts.map +0 -1
  444. package/lib/typescript/components/Filters/index.d.ts.map +0 -1
  445. package/lib/typescript/components/Input/Input.d.ts.map +0 -1
  446. package/lib/typescript/components/Input/index.d.ts.map +0 -1
  447. package/lib/typescript/components/LockOverlay/LockOverlay.d.ts.map +0 -1
  448. package/lib/typescript/components/LockOverlay/index.d.ts.map +0 -1
  449. package/lib/typescript/components/Marquee/Marquee.d.ts.map +0 -1
  450. package/lib/typescript/components/Marquee/index.d.ts.map +0 -1
  451. package/lib/typescript/components/NumericStepper/NumericStepper.d.ts.map +0 -1
  452. package/lib/typescript/components/NumericStepper/index.d.ts.map +0 -1
  453. package/lib/typescript/components/Popup/Popup.d.ts.map +0 -1
  454. package/lib/typescript/components/Popup/index.d.ts.map +0 -1
  455. package/lib/typescript/components/ProgressBar/ProgressBar.d.ts.map +0 -1
  456. package/lib/typescript/components/ProgressBar/index.d.ts.map +0 -1
  457. package/lib/typescript/components/RedeemedVoucher/RedeemedVoucherSheet.d.ts.map +0 -1
  458. package/lib/typescript/components/RedeemedVoucher/index.d.ts.map +0 -1
  459. package/lib/typescript/components/RedemptionOption/RedemptionOption.d.ts.map +0 -1
  460. package/lib/typescript/components/RedemptionOption/index.d.ts.map +0 -1
  461. package/lib/typescript/components/ScratchCard/ScratchCard.d.ts.map +0 -1
  462. package/lib/typescript/components/ScratchCard/ScratchCardContent.d.ts.map +0 -1
  463. package/lib/typescript/components/ScratchCard/index.d.ts.map +0 -1
  464. package/lib/typescript/components/SelectAmount/SelectAmount.d.ts.map +0 -1
  465. package/lib/typescript/components/SelectAmount/index.d.ts.map +0 -1
  466. package/lib/typescript/components/Skeleton/Shimmer.d.ts.map +0 -1
  467. package/lib/typescript/components/Skeleton/SkeletonElement.d.ts.map +0 -1
  468. package/lib/typescript/components/Skeleton/index.d.ts.map +0 -1
  469. package/lib/typescript/components/Suggestions/SuggestionList.d.ts.map +0 -1
  470. package/lib/typescript/components/TravelBooking/CarRentalForm.d.ts.map +0 -1
  471. package/lib/typescript/components/TravelBooking/FlightForm.d.ts.map +0 -1
  472. package/lib/typescript/components/TravelBooking/FlightSummary.d.ts.map +0 -1
  473. package/lib/typescript/components/TravelBooking/HotelForm.d.ts.map +0 -1
  474. package/lib/typescript/components/TravelBooking/HotelSummary.d.ts.map +0 -1
  475. package/lib/typescript/components/TravelBooking/SummaryBar.d.ts.map +0 -1
  476. package/lib/typescript/components/TravelBooking/TabSelector.d.ts.map +0 -1
  477. package/lib/typescript/components/TravelBooking/TravelBooking.d.ts.map +0 -1
  478. package/lib/typescript/components/TravelBooking/index.d.ts.map +0 -1
  479. package/lib/typescript/components/TravelBooking/types.d.ts.map +0 -1
  480. package/lib/typescript/components/UnlockRewards/RewardItem.d.ts.map +0 -1
  481. package/lib/typescript/components/UnlockRewards/UnlockRewards.d.ts.map +0 -1
  482. package/lib/typescript/components/UnlockRewards/index.d.ts.map +0 -1
  483. package/lib/typescript/components/Wheel/Wheel.d.ts.map +0 -1
  484. package/lib/typescript/components/Wheel/index.d.ts.map +0 -1
  485. package/lib/typescript/components/index.d.ts.map +0 -1
  486. package/lib/typescript/constants/BRANDS.d.ts.map +0 -1
  487. package/lib/typescript/index.d.ts.map +0 -1
  488. package/lib/typescript/theme/Colors.d.ts.map +0 -1
  489. package/lib/typescript/theme/ThemeContext.d.ts.map +0 -1
  490. package/lib/typescript/theme/index.d.ts.map +0 -1
  491. /package/lib/typescript/{components → lib/commonjs/components}/DateRangePicker/index.d.ts +0 -0
  492. /package/lib/typescript/{components → lib/commonjs/components}/SelectAmount/index.d.ts +0 -0
  493. /package/lib/typescript/{components → lib/commonjs/components}/TravelBooking/index.d.ts +0 -0
  494. /package/lib/typescript/{app.d.ts → src/app.d.ts} +0 -0
  495. /package/lib/typescript/{components → src/components}/Badges/Badge.d.ts +0 -0
  496. /package/lib/typescript/{components → src/components}/Badges/index.d.ts +0 -0
  497. /package/lib/typescript/{components → src/components}/Banner/Banner.d.ts +0 -0
  498. /package/lib/typescript/{components → src/components}/Banner/BannerWithDetails.d.ts +0 -0
  499. /package/lib/typescript/{components → src/components}/Banner/index.d.ts +0 -0
  500. /package/lib/typescript/{components → src/components}/BrandIcon/BrandIcon.d.ts +0 -0
  501. /package/lib/typescript/{components → src/components}/BrandIcon/index.d.ts +0 -0
  502. /package/lib/typescript/{components → src/components}/Button/Button.d.ts +0 -0
  503. /package/lib/typescript/{components → src/components}/Button/index.d.ts +0 -0
  504. /package/lib/typescript/{components → src/components}/Card/Card.d.ts +0 -0
  505. /package/lib/typescript/{components → src/components}/Card/CardContent.d.ts +0 -0
  506. /package/lib/typescript/{components → src/components}/Card/CardFooter.d.ts +0 -0
  507. /package/lib/typescript/{components → src/components}/Card/CardHeader.d.ts +0 -0
  508. /package/lib/typescript/{components → src/components}/Card/CardImage.d.ts +0 -0
  509. /package/lib/typescript/{components → src/components}/Card/index.d.ts +0 -0
  510. /package/lib/typescript/{components → src/components}/Card/templates/DealCard.d.ts +0 -0
  511. /package/lib/typescript/{components → src/components}/Card/templates/DealCardWithBackgroundImage.d.ts +0 -0
  512. /package/lib/typescript/{components → src/components}/Card/templates/SimpleTrendingCard.d.ts +0 -0
  513. /package/lib/typescript/{components → src/components}/Card/types.d.ts +0 -0
  514. /package/lib/typescript/{components → src/components}/CloseIcon/CloseIcon.d.ts +0 -0
  515. /package/lib/typescript/{components → src/components}/CloseIcon/index.d.ts +0 -0
  516. /package/lib/typescript/{components → src/components}/DateRangePicker/DateRangePicker.d.ts +0 -0
  517. /package/lib/typescript/{components → src/components}/Filters/Filters.d.ts +0 -0
  518. /package/lib/typescript/{components → src/components}/Filters/PointsRangeSelector.d.ts +0 -0
  519. /package/lib/typescript/{components → src/components}/Filters/index.d.ts +0 -0
  520. /package/lib/typescript/{components → src/components}/Input/Input.d.ts +0 -0
  521. /package/lib/typescript/{components → src/components}/Input/index.d.ts +0 -0
  522. /package/lib/typescript/{components → src/components}/LockOverlay/LockOverlay.d.ts +0 -0
  523. /package/lib/typescript/{components → src/components}/LockOverlay/index.d.ts +0 -0
  524. /package/lib/typescript/{components → src/components}/Marquee/Marquee.d.ts +0 -0
  525. /package/lib/typescript/{components → src/components}/Marquee/index.d.ts +0 -0
  526. /package/lib/typescript/{components → src/components}/NumericStepper/NumericStepper.d.ts +0 -0
  527. /package/lib/typescript/{components → src/components}/NumericStepper/index.d.ts +0 -0
  528. /package/lib/typescript/{components → src/components}/Popup/Popup.d.ts +0 -0
  529. /package/lib/typescript/{components → src/components}/Popup/index.d.ts +0 -0
  530. /package/lib/typescript/{components → src/components}/ProgressBar/ProgressBar.d.ts +0 -0
  531. /package/lib/typescript/{components → src/components}/ProgressBar/index.d.ts +0 -0
  532. /package/lib/typescript/{components → src/components}/RedeemedVoucher/RedeemedVoucherSheet.d.ts +0 -0
  533. /package/lib/typescript/{components → src/components}/RedeemedVoucher/index.d.ts +0 -0
  534. /package/lib/typescript/{components → src/components}/RedemptionOption/RedemptionOption.d.ts +0 -0
  535. /package/lib/typescript/{components → src/components}/RedemptionOption/index.d.ts +0 -0
  536. /package/lib/typescript/{components → src/components}/ScratchCard/ScratchCard.d.ts +0 -0
  537. /package/lib/typescript/{components → src/components}/ScratchCard/ScratchCardContent.d.ts +0 -0
  538. /package/lib/typescript/{components → src/components}/ScratchCard/index.d.ts +0 -0
  539. /package/lib/typescript/{components → src/components}/SelectAmount/SelectAmount.d.ts +0 -0
  540. /package/lib/typescript/{components → src/components}/Skeleton/Shimmer.d.ts +0 -0
  541. /package/lib/typescript/{components → src/components}/Skeleton/SkeletonElement.d.ts +0 -0
  542. /package/lib/typescript/{components → src/components}/Skeleton/index.d.ts +0 -0
  543. /package/lib/typescript/{components → src/components}/Suggestions/SuggestionList.d.ts +0 -0
  544. /package/lib/typescript/{components → src/components}/TravelBooking/CarRentalForm.d.ts +0 -0
  545. /package/lib/typescript/{components → src/components}/TravelBooking/FlightForm.d.ts +0 -0
  546. /package/lib/typescript/{components → src/components}/TravelBooking/FlightSummary.d.ts +0 -0
  547. /package/lib/typescript/{components → src/components}/TravelBooking/HotelForm.d.ts +0 -0
  548. /package/lib/typescript/{components → src/components}/TravelBooking/HotelSummary.d.ts +0 -0
  549. /package/lib/typescript/{components → src/components}/TravelBooking/SummaryBar.d.ts +0 -0
  550. /package/lib/typescript/{components → src/components}/TravelBooking/TabSelector.d.ts +0 -0
  551. /package/lib/typescript/{components → src/components}/TravelBooking/TravelBooking.d.ts +0 -0
  552. /package/lib/typescript/{components → src/components}/TravelBooking/types.d.ts +0 -0
  553. /package/lib/typescript/{components → src/components}/UnlockRewards/RewardItem.d.ts +0 -0
  554. /package/lib/typescript/{components → src/components}/UnlockRewards/UnlockRewards.d.ts +0 -0
  555. /package/lib/typescript/{components → src/components}/UnlockRewards/index.d.ts +0 -0
  556. /package/lib/typescript/{components → src/components}/Wheel/Wheel.d.ts +0 -0
  557. /package/lib/typescript/{components → src/components}/Wheel/index.d.ts +0 -0
  558. /package/lib/typescript/{components → src/components}/index.d.ts +0 -0
  559. /package/lib/typescript/{constants → src/constants}/BRANDS.d.ts +0 -0
  560. /package/lib/typescript/{index.d.ts → src/index.d.ts} +0 -0
  561. /package/lib/typescript/{theme → src/theme}/Colors.d.ts +0 -0
  562. /package/lib/typescript/{theme → src/theme}/index.d.ts +0 -0
@@ -0,0 +1,148 @@
1
+ # RedemptionOption Component
2
+
3
+ A flexible, customizable touchable option component for React Native applications with support for icons, vertical/horizontal layouts, active states, and extensive styling options.
4
+
5
+ ## Basic Usage
6
+
7
+ ```jsx
8
+ import React from 'react';
9
+ import { View } from 'react-native';
10
+ import { RedemptionOption } from '@your-org/component-library';
11
+ import { GiftIcon } from '@your-org/icons';
12
+
13
+ const RewardsScreen = () => {
14
+ return (
15
+ <View style={{ padding: 16 }}>
16
+ <RedemptionOption
17
+ icon={<GiftIcon size={24} color="#FFFFFF" />}
18
+ text="Redeem Points"
19
+ onPress={() => console.log('Option pressed')}
20
+ />
21
+ </View>
22
+ );
23
+ };
24
+
25
+ export default RewardsScreen;
26
+ ```
27
+
28
+ ## Props
29
+
30
+ The `RedemptionOption` component provides extensive customization options through its props.
31
+
32
+ ### Core Properties
33
+
34
+ | Prop | Type | Required | Default | Description |
35
+ |------|------|----------|---------|-------------|
36
+ | `icon` | `React.ReactNode` | ✅ | - | Icon component to display in the option |
37
+ | `text` | `string` | ✅ | - | Text label to display with the icon |
38
+
39
+ ### Layout & Appearance Properties
40
+
41
+ | Prop | Type | Required | Default | Description |
42
+ |------|------|----------|---------|-------------|
43
+ | `orientation` | `"vertical" \| "horizontal"` | ❌ | `"vertical"` | Determines the layout direction of icon and text |
44
+ | `backgroundColor` | `string` | ❌ | theme.primary | Background color of the option |
45
+ | `textColor` | `string` | ❌ | theme.secondary | Color of the text label |
46
+ | `width` | `number \| string` | ❌ | - | Width of the option component |
47
+ | `height` | `number \| string` | ❌ | - | Height of the option component |
48
+ | `borderRadius` | `number` | ❌ | `8` | Corner radius of the option component |
49
+ | `padding` | `number` | ❌ | `12` | Padding inside the option component |
50
+ | `fontSize` | `number` | ❌ | `14` | Base font size for the text (actual size will be 90% of this value) |
51
+
52
+ ### State Properties
53
+
54
+ | Prop | Type | Required | Default | Description |
55
+ |------|------|----------|---------|-------------|
56
+ | `disabled` | `boolean` | ❌ | `false` | Whether the option is disabled (reduces opacity and prevents interaction) |
57
+ | `isActive` | `boolean` | ❌ | `false` | Whether the option is in active state (adds a border) |
58
+ | `activeOpacityValue` | `number` | ❌ | `0.7` | The opacity value when the button is pressed |
59
+
60
+ ### Style Customization
61
+
62
+ | Prop | Type | Required | Default | Description |
63
+ |------|------|----------|---------|-------------|
64
+ | `containerStyle` | `StyleProp<ViewStyle>` | ❌ | - | Style for the outer container |
65
+ | `textStyle` | `StyleProp<TextStyle>` | ❌ | - | Style for the text label |
66
+ | `iconContainerStyle` | `StyleProp<ViewStyle>` | ❌ | - | Style for the container around the icon |
67
+
68
+ ### Behavior Props
69
+
70
+ | Prop | Type | Required | Default | Description |
71
+ |------|------|----------|---------|-------------|
72
+ | `onPress` | `() => void` | ❌ | - | Function to call when the option is pressed |
73
+
74
+ ## Examples
75
+
76
+ ### Vertical Layout (Default)
77
+
78
+ ```jsx
79
+ <RedemptionOption
80
+ icon={<CoinIcon size={24} color="#FFD700" />}
81
+ text="Redeem Coins"
82
+ onPress={() => handleRedemption('coins')}
83
+ backgroundColor="#2C3E50"
84
+ textColor="#FFFFFF"
85
+ />
86
+ ```
87
+
88
+ ### Horizontal Layout
89
+
90
+ ```jsx
91
+ <RedemptionOption
92
+ icon={<TicketIcon size={20} color="#FF5722" />}
93
+ text="Movie Tickets"
94
+ orientation="horizontal"
95
+ onPress={() => handleRedemption('tickets')}
96
+ width="100%"
97
+ padding={16}
98
+ />
99
+ ```
100
+
101
+ ### Active State
102
+
103
+ ```jsx
104
+ <RedemptionOption
105
+ icon={<StarIcon size={22} color="#FFD700" />}
106
+ text="Premium Rewards"
107
+ isActive={selectedReward === 'premium'}
108
+ onPress={() => setSelectedReward('premium')}
109
+ backgroundColor="#1E88E5"
110
+ textColor="#FFFFFF"
111
+ />
112
+ ```
113
+
114
+ ### Disabled State
115
+
116
+ ```jsx
117
+ <RedemptionOption
118
+ icon={<LockIcon size={20} color="#9E9E9E" />}
119
+ text="Locked Reward"
120
+ disabled={!hasEnoughPoints}
121
+ onPress={() => handleRedemption('locked')}
122
+ backgroundColor="#ECEFF1"
123
+ textColor="#757575"
124
+ />
125
+ ```
126
+
127
+ ### Custom Styling
128
+
129
+ ```jsx
130
+ <RedemptionOption
131
+ icon={<GiftIcon size={28} color="#E91E63" />}
132
+ text="Special Offer"
133
+ containerStyle={{
134
+ shadowColor: '#000',
135
+ shadowOffset: { width: 0, height: 2 },
136
+ shadowOpacity: 0.3,
137
+ shadowRadius: 4,
138
+ elevation: 5,
139
+ }}
140
+ iconContainerStyle={{
141
+ backgroundColor: 'rgba(233, 30, 99, 0.1)',
142
+ borderRadius: 20,
143
+ padding: 8
144
+ }}
145
+ textStyle={{ fontWeight: 'bold', letterSpacing: 0.5 }}
146
+ onPress={() => handleSpecialOffer()}
147
+ />
148
+ ```
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _index = require("../../theme/index.js");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactNative = require("react-native");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const RedemptionOption = ({
13
+ icon,
14
+ text,
15
+ orientation = "vertical",
16
+ backgroundColor,
17
+ textColor,
18
+ width,
19
+ height,
20
+ borderRadius = 8,
21
+ padding = 12,
22
+ fontSize = 14,
23
+ disabled = false,
24
+ isActive = false,
25
+ onPress,
26
+ containerStyle,
27
+ textStyle,
28
+ iconContainerStyle,
29
+ activeOpacityValue = 0.7,
30
+ isRTL
31
+ }) => {
32
+ const {
33
+ theme,
34
+ isRTL: rtl
35
+ } = (0, _index.useTheme)();
36
+ isRTL = isRTL || rtl;
37
+ textColor = textColor || theme.onSurface;
38
+
39
+ // Dynamic styles based on props
40
+ let dynamicContainerStyle = {
41
+ backgroundColor: backgroundColor || theme.surface,
42
+ borderRadius,
43
+ padding,
44
+ borderWidth: isActive ? 2 : 0,
45
+ borderColor: isActive ? textColor : undefined
46
+ };
47
+ if (width) dynamicContainerStyle.width = width;
48
+ if (height) dynamicContainerStyle.height = height;
49
+ const dynamicTextStyle = {
50
+ color: textColor,
51
+ fontSize: fontSize * 0.9,
52
+ lineHeight: fontSize * 1.1
53
+ };
54
+
55
+ // Determine horizontal flex direction based on RTL
56
+ const horizontalDirection = {
57
+ flexDirection: isRTL ? 'row-reverse' : 'row',
58
+ justifyContent: "flex-start",
59
+ alignItems: "center"
60
+ };
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
62
+ style: [styles.container, orientation === "vertical" ? styles.vertical : horizontalDirection, dynamicContainerStyle, disabled && styles.disabled, containerStyle],
63
+ onPress: onPress,
64
+ disabled: disabled,
65
+ activeOpacity: activeOpacityValue,
66
+ accessibilityRole: "button",
67
+ accessibilityState: {
68
+ disabled,
69
+ selected: isActive
70
+ },
71
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
72
+ style: [styles.iconContainer, orientation === "horizontal" && (isRTL ? {
73
+ marginLeft: 12,
74
+ marginRight: 0
75
+ } : {
76
+ marginRight: 12,
77
+ marginLeft: 0
78
+ }), iconContainerStyle],
79
+ children: icon
80
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
81
+ style: {
82
+ minHeight: 40,
83
+ justifyContent: "center"
84
+ },
85
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
86
+ style: [styles.text, orientation === "horizontal" ? {} : styles.textVertical, dynamicTextStyle, textStyle],
87
+ numberOfLines: 2,
88
+ ellipsizeMode: "tail",
89
+ adjustsFontSizeToFit: orientation === "vertical",
90
+ minimumFontScale: 0.8,
91
+ children: text
92
+ })
93
+ })]
94
+ });
95
+ };
96
+ const styles = _reactNative.StyleSheet.create({
97
+ container: {
98
+ alignItems: "center",
99
+ justifyContent: "center"
100
+ },
101
+ vertical: {
102
+ flexDirection: "column",
103
+ justifyContent: "center"
104
+ },
105
+ horizontal: {
106
+ // Base horizontal style is now handled dynamically with RTL support
107
+ flexDirection: "row",
108
+ justifyContent: "flex-start",
109
+ alignItems: "center"
110
+ },
111
+ iconContainer: {
112
+ // marginBottom: 8,
113
+ justifyContent: "center",
114
+ alignItems: "center"
115
+ },
116
+ iconHorizontal: {
117
+ // This is now handled dynamically with RTL support
118
+ marginBottom: 0,
119
+ marginRight: 12
120
+ },
121
+ text: {
122
+ fontWeight: "500"
123
+ },
124
+ textVertical: {
125
+ textAlign: "center"
126
+ },
127
+ disabled: {
128
+ opacity: 0.6
129
+ }
130
+ });
131
+ var _default = exports.default = RedemptionOption;
132
+ //# sourceMappingURL=RedemptionOption.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_index","require","_react","_interopRequireDefault","_reactNative","_jsxRuntime","e","__esModule","default","RedemptionOption","icon","text","orientation","backgroundColor","textColor","width","height","borderRadius","padding","fontSize","disabled","isActive","onPress","containerStyle","textStyle","iconContainerStyle","activeOpacityValue","isRTL","theme","rtl","useTheme","onSurface","dynamicContainerStyle","surface","borderWidth","borderColor","undefined","dynamicTextStyle","color","lineHeight","horizontalDirection","flexDirection","justifyContent","alignItems","jsxs","TouchableOpacity","style","styles","container","vertical","activeOpacity","accessibilityRole","accessibilityState","selected","children","jsx","View","iconContainer","marginLeft","marginRight","minHeight","Text","textVertical","numberOfLines","ellipsizeMode","adjustsFontSizeToFit","minimumFontScale","StyleSheet","create","horizontal","iconHorizontal","marginBottom","fontWeight","textAlign","opacity","_default","exports"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/RedemptionOption/RedemptionOption.tsx"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {
7
+ RedemptionOption: true
8
+ };
9
+ Object.defineProperty(exports, "RedemptionOption", {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _RedemptionOption.default;
13
+ }
14
+ });
15
+ var _RedemptionOption = _interopRequireWildcard(require("./RedemptionOption.js"));
16
+ Object.keys(_RedemptionOption).forEach(function (key) {
17
+ if (key === "default" || key === "__esModule") return;
18
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
19
+ if (key in exports && exports[key] === _RedemptionOption[key]) return;
20
+ Object.defineProperty(exports, key, {
21
+ enumerable: true,
22
+ get: function () {
23
+ return _RedemptionOption[key];
24
+ }
25
+ });
26
+ });
27
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
28
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_RedemptionOption","_interopRequireWildcard","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","n","__proto__","a","getOwnPropertyDescriptor","u","i","set"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/RedemptionOption/index.ts"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AACAC,MAAA,CAAAC,IAAA,CAAAJ,iBAAA,EAAAK,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAN,iBAAA,CAAAM,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAd,iBAAA,CAAAM,GAAA;IAAA;EAAA;AAAA;AAAmC,SAAAS,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAL,GAAA,CAAAE,CAAA,OAAAO,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAtB,MAAA,CAAAS,cAAA,IAAAT,MAAA,CAAAuB,wBAAA,WAAAC,CAAA,IAAAX,CAAA,oBAAAW,CAAA,OAAAnB,cAAA,CAAAC,IAAA,CAAAO,CAAA,EAAAW,CAAA,SAAAC,CAAA,GAAAH,CAAA,GAAAtB,MAAA,CAAAuB,wBAAA,CAAAV,CAAA,EAAAW,CAAA,UAAAC,CAAA,KAAAA,CAAA,CAAAd,GAAA,IAAAc,CAAA,CAAAC,GAAA,IAAA1B,MAAA,CAAAS,cAAA,CAAAW,CAAA,EAAAI,CAAA,EAAAC,CAAA,IAAAL,CAAA,CAAAI,CAAA,IAAAX,CAAA,CAAAW,CAAA,YAAAJ,CAAA,CAAAF,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAU,GAAA,CAAAb,CAAA,EAAAO,CAAA,GAAAA,CAAA","ignoreList":[]}
@@ -0,0 +1,119 @@
1
+ ## ScratchCard Documentation
2
+
3
+ The `ScratchCard` is an interactive component that creates a scratch-to-reveal experience commonly used for promotions, rewards, and gamification features. It leverages the Shopify React Native Skia library to provide a smooth scratching animation with customizable appearance. The component tracks scratching progress and can trigger an action when a sufficient area has been revealed.
4
+
5
+ ### Usage
6
+
7
+ ```tsx
8
+ import ScratchCard from "@/components/ScratchCard/ScratchCard";
9
+ import ScratchCardContent from "@/components/ScratchCard/ScratchCardContent";
10
+ import { Image, Text, View } from "react-native";
11
+
12
+ const MyComponent = () => {
13
+ const handleRevealed = () => {
14
+ // Handle card fully revealed action
15
+ console.log("Scratch card revealed!");
16
+ };
17
+
18
+ return (
19
+ <View style={{ width: 300, height: 200 }}>
20
+ <ScratchCard
21
+ image={require("@/assets/images/scratch_foreground.png")}
22
+ onScratched={handleRevealed}
23
+ brushStrokeWidth={40}
24
+ revealThreshold={0.7}
25
+ >
26
+ <ScratchCardContent>
27
+ <Image
28
+ source={require("@/assets/images/reward-banner.png")}
29
+ style={{ width: 250, height: 150 }}
30
+ />
31
+ </ScratchCardContent>
32
+ </ScratchCard>
33
+ </View>
34
+ );
35
+ };
36
+
37
+ export default MyComponent;
38
+ ```
39
+
40
+ ### Text-Based Example
41
+
42
+ ```tsx
43
+ <ScratchCard
44
+ backgroundColor="#8A2BE2"
45
+ text="Scratch to reveal your prize!"
46
+ textFontColor="#FFFFFF"
47
+ textFontSize={18}
48
+ width={300}
49
+ height={150}
50
+ onScratched={() => alert("Congratulations! You won a prize!")}
51
+ >
52
+ <ScratchCardContent style={{ backgroundColor: "#FFD700" }}>
53
+ <Text style={{ fontSize: 24, fontWeight: "bold", color: "#000" }}>
54
+ 50% OFF COUPON
55
+ </Text>
56
+ <Text style={{ marginTop: 8, color: "#333" }}>
57
+ Use code: SCRATCH50
58
+ </Text>
59
+ </ScratchCardContent>
60
+ </ScratchCard>
61
+ ```
62
+
63
+ ### Props
64
+
65
+ #### Core Props
66
+
67
+ | Prop | Type | Default | Description |
68
+ |------|------|---------|-------------|
69
+ | `style` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the container |
70
+ | `children` | `React.ReactNode` | Required | Content to reveal underneath the scratch layer |
71
+ | `image` | `ImageSourcePropType` | `null` | Image to use as the scratch layer |
72
+ | `width` | `number` | `300` | Width of the scratch card |
73
+ | `height` | `number` | `300` | Height of the scratch card |
74
+ | `onScratched` | `() => void` | `undefined` | Function to call when scratch threshold is reached |
75
+
76
+ #### Scratch Behavior Props
77
+
78
+ | Prop | Type | Default | Description |
79
+ |------|------|---------|-------------|
80
+ | `brushStrokeWidth` | `number` | `50` | Width of the scratching stroke |
81
+ | `revealThreshold` | `number` | `0.8` | Percentage (0.0-1.0) that needs to be scratched to trigger the reveal |
82
+
83
+ #### Appearance Props
84
+
85
+ | Prop | Type | Default | Description |
86
+ |------|------|---------|-------------|
87
+ | `backgroundColor` | `string` | `"#CCCCCC"` | Background color of the scratch layer (used if no image is provided) |
88
+ | `text` | `string` | `""` | Optional text to display on the scratch layer |
89
+ | `textFont` | `ImageSourcePropType` | `undefined` (required if text is present) | Font for the scratch layer text |
90
+ | `textFontColor` | `string` | `"#CCCCCC"` | Color for the scratch layer text |
91
+ | `textFontSize` | `number` | `16` | Font size for the scratch layer text |
92
+
93
+ ### ScratchCardContent
94
+
95
+ The `ScratchCardContent` is a companion component that provides styling for the content underneath the scratch layer.
96
+
97
+ #### Usage
98
+
99
+ ```tsx
100
+ import ScratchCardContent from "@/components/ScratchCard/ScratchCardContent";
101
+
102
+ <ScratchCardContent style={{ backgroundColor: "#f5f5f5" }}>
103
+ <Text>Your revealed content here</Text>
104
+ </ScratchCardContent>
105
+ ```
106
+
107
+ #### Props
108
+
109
+ | Prop | Type | Default | Description |
110
+ |------|------|---------|-------------|
111
+ | `children` | `React.ReactNode` | Required | Content to display underneath the scratch layer |
112
+ | `style` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the content container |
113
+
114
+ ### Related Components
115
+
116
+ - `ScratchCardContent`: Used for styling the revealed content
117
+ - `Image`: Used to display images in the scratch content or as the scratch layer
118
+ - `Text`: Used to display text in both the scratch layer and revealed content
119
+ - `View`: The foundation component for layout structure
@@ -0,0 +1,222 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNativeSkia = require("@shopify/react-native-skia");
9
+ var _reactNative = require("react-native");
10
+ var _reactNativeReanimated = require("react-native-reanimated");
11
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
+ const ScratchCard = ({
16
+ style,
17
+ children,
18
+ image,
19
+ brushStrokeWidth = 50,
20
+ revealThreshold = 0.8,
21
+ width = 300,
22
+ height = 300,
23
+ backgroundColor = "#CCCCCC",
24
+ text = "",
25
+ textFont,
26
+ textFontColor = "#CCCCCC",
27
+ textFontSize = 16,
28
+ onScratched,
29
+ gradient
30
+ }) => {
31
+ const loadedImg = (0, _reactNativeSkia.useImage)(image);
32
+ const loadedFont = (0, _reactNativeSkia.useFont)(textFont, textFontSize);
33
+ const [[areaWidth, areaHeight], setSize] = (0, _react.useState)([0, 0]);
34
+ const [isScratched, setScratched] = (0, _react.useState)(false);
35
+ const [isLayoutReady, setLayoutReady] = (0, _react.useState)(false);
36
+ const isThresholdReached = (0, _reactNativeReanimated.useSharedValue)(false);
37
+ const path = (0, _reactNativeReanimated.useSharedValue)(_reactNativeSkia.Skia.Path.Make());
38
+ (0, _react.useEffect)(() => {
39
+ path.value = _reactNativeSkia.Skia.Path.Make();
40
+ isThresholdReached.value = false;
41
+ setScratched(false);
42
+ }, [areaWidth, areaHeight]);
43
+ const handleLayout = (0, _react.useCallback)(event => {
44
+ const {
45
+ width: newWidth,
46
+ height: newHeight
47
+ } = event.nativeEvent.layout;
48
+ if (newWidth > 0 && newHeight > 0) {
49
+ if (newWidth !== areaWidth || newHeight !== areaHeight) {
50
+ setSize([newWidth, newHeight]);
51
+ }
52
+ if (!isLayoutReady) {
53
+ setLayoutReady(true);
54
+ }
55
+ } else {
56
+ setLayoutReady(false);
57
+ }
58
+ }, [areaWidth, areaHeight, isLayoutReady]);
59
+ const revealCardOnJS = (0, _react.useCallback)(() => {
60
+ setScratched(true);
61
+ onScratched?.();
62
+ }, [onScratched]);
63
+ const pan = _reactNativeGestureHandler.Gesture.Pan().averageTouches(true).maxPointers(1).onBegin(e => {
64
+ if (!isLayoutReady) return;
65
+ try {
66
+ const newPath = path.value.copy();
67
+ newPath.moveTo(e.x, e.y);
68
+ newPath.lineTo(e.x + 0.001, e.y + 0.001);
69
+ path.value = newPath;
70
+ (0, _reactNativeSkia.notifyChange)(path);
71
+ } catch (error) {
72
+ console.error("ScratchCard: Error in onBegin:", error);
73
+ }
74
+ }).onChange(e => {
75
+ if (!isLayoutReady || isThresholdReached.value) return;
76
+ try {
77
+ const newPath = path.value.copy();
78
+ newPath.lineTo(e.x, e.y);
79
+ path.value = newPath;
80
+ (0, _reactNativeSkia.notifyChange)(path);
81
+ const bounds = path.value.getBounds();
82
+ if (!bounds || areaWidth <= 0 || areaHeight <= 0) {
83
+ return;
84
+ }
85
+ const scratchedArea = bounds.width * bounds.height;
86
+ const totalArea = areaWidth * areaHeight;
87
+ if (totalArea > 0 && scratchedArea / totalArea > revealThreshold) {
88
+ if (!isThresholdReached.value) {
89
+ isThresholdReached.value = true;
90
+ (0, _reactNativeReanimated.runOnJS)(revealCardOnJS)();
91
+ }
92
+ }
93
+ } catch (error) {
94
+ console.error("ScratchCard: Error in onChange (UI Thread):", error);
95
+ }
96
+ });
97
+ const textMetrics = _react.default.useMemo(() => {
98
+ if (loadedFont && text && areaWidth > 0 && areaHeight > 0) {
99
+ const metrics = loadedFont.measureText(text);
100
+ const textX = areaWidth / 2 - metrics.width / 2;
101
+ const textY = areaHeight / 2 + metrics.height / 3;
102
+ return {
103
+ x: textX,
104
+ y: textY,
105
+ width: metrics.width,
106
+ height: metrics.height
107
+ };
108
+ }
109
+ return null;
110
+ }, [loadedFont, text, areaWidth, areaHeight]);
111
+ const canRenderCanvas = isLayoutReady && areaWidth > 0 && areaHeight > 0;
112
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
113
+ style: {
114
+ justifyContent: "center",
115
+ alignContent: "center"
116
+ },
117
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
118
+ onLayout: handleLayout,
119
+ style: [styles.container, style, {
120
+ width,
121
+ height
122
+ }],
123
+ children: [canRenderCanvas && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
124
+ style: styles.content,
125
+ children: children
126
+ }), !isScratched && canRenderCanvas && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector, {
127
+ gesture: pan,
128
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Canvas, {
129
+ style: styles.canvas,
130
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Mask, {
131
+ mode: "luminance",
132
+ mask: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSkia.Group, {
133
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Rect, {
134
+ x: 0,
135
+ y: 0,
136
+ width: areaWidth,
137
+ height: areaHeight,
138
+ color: "white"
139
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Path, {
140
+ path: path,
141
+ color: "black",
142
+ style: "stroke",
143
+ strokeJoin: "round",
144
+ strokeCap: "round",
145
+ strokeWidth: brushStrokeWidth
146
+ })]
147
+ }),
148
+ children: loadedImg ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Image, {
149
+ image: loadedImg,
150
+ fit: "cover",
151
+ x: 0,
152
+ y: 0,
153
+ width: areaWidth,
154
+ height: areaHeight
155
+ }) : gradient ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSkia.Group, {
156
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.LinearGradient, {
157
+ start: gradient.start ?? {
158
+ x: 0,
159
+ y: 0
160
+ },
161
+ end: gradient.end ?? {
162
+ x: areaWidth,
163
+ y: areaHeight
164
+ },
165
+ colors: gradient.colors
166
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Rect, {
167
+ x: 0,
168
+ y: 0,
169
+ width: areaWidth,
170
+ height: areaHeight
171
+ }), loadedFont && textMetrics && text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Text, {
172
+ x: textMetrics.x,
173
+ y: textMetrics.y,
174
+ text: text,
175
+ color: textFontColor,
176
+ font: loadedFont
177
+ }) : null]
178
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSkia.Group, {
179
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Rect, {
180
+ x: 0,
181
+ y: 0,
182
+ width: areaWidth,
183
+ height: areaHeight,
184
+ color: backgroundColor
185
+ }), loadedFont && textMetrics && text ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSkia.Text, {
186
+ x: textMetrics.x,
187
+ y: textMetrics.y,
188
+ text: text,
189
+ color: textFontColor,
190
+ font: loadedFont
191
+ }) : null]
192
+ })
193
+ })
194
+ })
195
+ })]
196
+ })
197
+ });
198
+ };
199
+ const styles = _reactNative.StyleSheet.create({
200
+ container: {
201
+ position: "relative",
202
+ overflow: "hidden"
203
+ },
204
+ content: {
205
+ position: "absolute",
206
+ top: 0,
207
+ left: 0,
208
+ width: "100%",
209
+ height: "100%",
210
+ zIndex: 1
211
+ },
212
+ canvas: {
213
+ position: "absolute",
214
+ top: 0,
215
+ left: 0,
216
+ width: "100%",
217
+ height: "100%",
218
+ zIndex: 2
219
+ }
220
+ });
221
+ var _default = exports.default = ScratchCard;
222
+ //# sourceMappingURL=ScratchCard.js.map