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.
- package/README.md +200 -0
- package/lib/commonjs/app/_layout.js +41 -0
- package/lib/commonjs/app/_layout.js.map +1 -0
- package/lib/commonjs/app/index.js +153 -0
- package/lib/commonjs/app/index.js.map +1 -0
- package/lib/commonjs/assets/components/BannerWithDetails.png +0 -0
- package/lib/commonjs/assets/components/DealCard-Horizontal.png +0 -0
- package/lib/commonjs/assets/components/DealCard-Vertical.png +0 -0
- package/lib/commonjs/assets/components/DealCard-floating.png +0 -0
- package/lib/commonjs/assets/components/DealCard-nested.png +0 -0
- package/lib/commonjs/assets/components/Filters.png +0 -0
- package/lib/commonjs/assets/components/Popup-1.png +0 -0
- package/lib/commonjs/assets/components/Popup-2.png +0 -0
- package/lib/commonjs/assets/components/Popup-3.png +0 -0
- package/lib/commonjs/assets/components/RedemptionOption-Horizontal.png +0 -0
- package/lib/commonjs/assets/components/RedemptionOption-Vertical.png +0 -0
- package/lib/commonjs/assets/components/SimpleBanner.png +0 -0
- package/lib/commonjs/assets/components/SimpleTrendingCard.png +0 -0
- package/lib/commonjs/assets/components/SimpleTrendingCardV2.png +0 -0
- package/lib/commonjs/assets/components/UnlockRewards-1.png +0 -0
- package/lib/commonjs/assets/components/UnlockRewards-2.png +0 -0
- package/lib/commonjs/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/lib/commonjs/assets/images/adaptive-icon.png +0 -0
- package/lib/commonjs/assets/images/face.jpg +0 -0
- package/lib/commonjs/assets/images/favicon.png +0 -0
- package/lib/commonjs/assets/images/giftvoucher.jpg +0 -0
- package/lib/commonjs/assets/images/icon.png +0 -0
- package/lib/commonjs/assets/images/insta.webp +0 -0
- package/lib/commonjs/assets/images/muse.jpg +0 -0
- package/lib/commonjs/assets/images/namshi-banner.png +0 -0
- package/lib/commonjs/assets/images/namshi.webp +0 -0
- package/lib/commonjs/assets/images/partial-react-logo.png +0 -0
- package/lib/commonjs/assets/images/pb-logo.jpg +0 -0
- package/lib/commonjs/assets/images/pb.jpg +0 -0
- package/lib/commonjs/assets/images/react-logo.png +0 -0
- package/lib/commonjs/assets/images/react-logo@2x.png +0 -0
- package/lib/commonjs/assets/images/react-logo@3x.png +0 -0
- package/lib/commonjs/assets/images/scratch_foreground.png +0 -0
- package/lib/commonjs/assets/images/splash-icon.png +0 -0
- package/lib/commonjs/assets/images/upgrade.png +0 -0
- package/lib/commonjs/components/Badges/Badge.js +65 -0
- package/lib/commonjs/components/Badges/Badge.js.map +1 -0
- package/lib/commonjs/components/Badges/README.md +98 -0
- package/lib/commonjs/components/Badges/index.js +29 -0
- package/lib/commonjs/components/Badges/index.js.map +1 -0
- package/lib/commonjs/components/Banner/Banner.js +135 -0
- package/lib/commonjs/components/Banner/Banner.js.map +1 -0
- package/lib/commonjs/components/Banner/BannerWithDetails.js +118 -0
- package/lib/commonjs/components/Banner/BannerWithDetails.js.map +1 -0
- package/lib/commonjs/components/Banner/README.md +101 -0
- package/lib/commonjs/components/Banner/index.js +48 -0
- package/lib/commonjs/components/Banner/index.js.map +1 -0
- package/lib/commonjs/components/BrandIcon/BrandIcon.js +103 -0
- package/lib/commonjs/components/BrandIcon/BrandIcon.js.map +1 -0
- package/lib/commonjs/components/BrandIcon/index.js +29 -0
- package/lib/commonjs/components/BrandIcon/index.js.map +1 -0
- package/lib/commonjs/components/Card/Card.js +124 -0
- package/lib/commonjs/components/Card/Card.js.map +1 -0
- package/lib/commonjs/components/Card/CardContent.js +42 -0
- package/lib/commonjs/components/Card/CardContent.js.map +1 -0
- package/lib/commonjs/components/Card/CardFooter.js +34 -0
- package/lib/commonjs/components/Card/CardFooter.js.map +1 -0
- package/lib/commonjs/components/Card/CardHeader.js +77 -0
- package/lib/commonjs/components/Card/CardHeader.js.map +1 -0
- package/lib/commonjs/components/Card/CardImage.js +51 -0
- package/lib/commonjs/components/Card/CardImage.js.map +1 -0
- package/lib/commonjs/components/Card/index.js +98 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Card/templates/DealCard.js +188 -0
- package/lib/commonjs/components/Card/templates/DealCard.js.map +1 -0
- package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js +195 -0
- package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
- package/lib/commonjs/components/Card/templates/README.md +233 -0
- package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js +59 -0
- package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js.map +1 -0
- package/lib/commonjs/components/Card/types.js +6 -0
- package/lib/commonjs/components/Card/types.js.map +1 -0
- package/lib/commonjs/components/CloseIcon/CloseIcon.js +71 -0
- package/lib/commonjs/components/CloseIcon/CloseIcon.js.map +1 -0
- package/lib/commonjs/components/CloseIcon/index.js +29 -0
- package/lib/commonjs/components/CloseIcon/index.js.map +1 -0
- package/lib/commonjs/components/Filters/Filters.js +339 -0
- package/lib/commonjs/components/Filters/Filters.js.map +1 -0
- package/lib/commonjs/components/Filters/PointsRangeSelector.js +262 -0
- package/lib/commonjs/components/Filters/PointsRangeSelector.js.map +1 -0
- package/lib/commonjs/components/Filters/README.md +212 -0
- package/lib/commonjs/components/Filters/index.js +47 -0
- package/lib/commonjs/components/Filters/index.js.map +1 -0
- package/lib/commonjs/components/Input/Input.js +156 -0
- package/lib/commonjs/components/Input/Input.js.map +1 -0
- package/lib/commonjs/components/Input/README.md +128 -0
- package/lib/commonjs/components/Input/index.js +29 -0
- package/lib/commonjs/components/Input/index.js.map +1 -0
- package/lib/commonjs/components/LockOverlay/LockOverlay.js +65 -0
- package/lib/commonjs/components/LockOverlay/LockOverlay.js.map +1 -0
- package/lib/commonjs/components/LockOverlay/index.js +29 -0
- package/lib/commonjs/components/LockOverlay/index.js.map +1 -0
- package/lib/commonjs/components/Popup/Popup.js +296 -0
- package/lib/commonjs/components/Popup/Popup.js.map +1 -0
- package/lib/commonjs/components/Popup/README.md +133 -0
- package/lib/commonjs/components/Popup/index.js +29 -0
- package/lib/commonjs/components/Popup/index.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +121 -0
- package/lib/commonjs/components/ProgressBar/ProgressBar.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/index.js +29 -0
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
- package/lib/commonjs/components/RedemptionOption/README.md +148 -0
- package/lib/commonjs/components/RedemptionOption/RedemptionOption.js +111 -0
- package/lib/commonjs/components/RedemptionOption/RedemptionOption.js.map +1 -0
- package/lib/commonjs/components/RedemptionOption/index.js +29 -0
- package/lib/commonjs/components/RedemptionOption/index.js.map +1 -0
- package/lib/commonjs/components/ScratchCard/README.md +119 -0
- package/lib/commonjs/components/ScratchCard/ScratchCard.js +153 -0
- package/lib/commonjs/components/ScratchCard/ScratchCard.js.map +1 -0
- package/lib/commonjs/components/ScratchCard/ScratchCardContent.js +28 -0
- package/lib/commonjs/components/ScratchCard/ScratchCardContent.js.map +1 -0
- package/lib/commonjs/components/ScratchCard/index.js +48 -0
- package/lib/commonjs/components/ScratchCard/index.js.map +1 -0
- package/lib/commonjs/components/UnlockRewards/README.md +187 -0
- package/lib/commonjs/components/UnlockRewards/RewardItem.js +125 -0
- package/lib/commonjs/components/UnlockRewards/RewardItem.js.map +1 -0
- package/lib/commonjs/components/UnlockRewards/UnlockRewards.js +207 -0
- package/lib/commonjs/components/UnlockRewards/UnlockRewards.js.map +1 -0
- package/lib/commonjs/components/UnlockRewards/index.js +48 -0
- package/lib/commonjs/components/UnlockRewards/index.js.map +1 -0
- package/lib/commonjs/components/Wheel/README.md +141 -0
- package/lib/commonjs/components/Wheel/Wheel.js +323 -0
- package/lib/commonjs/components/Wheel/Wheel.js.map +1 -0
- package/lib/commonjs/components/Wheel/index.js +29 -0
- package/lib/commonjs/components/Wheel/index.js.map +1 -0
- package/lib/commonjs/components/index.js +160 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/constants/BRANDS.js +57 -0
- package/lib/commonjs/constants/BRANDS.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/theme/Colors.js +120 -0
- package/lib/commonjs/theme/Colors.js.map +1 -0
- package/lib/commonjs/theme/ThemeContext.js +49 -0
- package/lib/commonjs/theme/ThemeContext.js.map +1 -0
- package/lib/commonjs/theme/index.js +28 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/module/app/_layout.js +36 -0
- package/lib/module/app/_layout.js.map +1 -0
- package/lib/module/app/index.js +143 -0
- package/lib/module/app/index.js.map +1 -0
- package/lib/module/assets/components/BannerWithDetails.png +0 -0
- package/lib/module/assets/components/DealCard-Horizontal.png +0 -0
- package/lib/module/assets/components/DealCard-Vertical.png +0 -0
- package/lib/module/assets/components/DealCard-floating.png +0 -0
- package/lib/module/assets/components/DealCard-nested.png +0 -0
- package/lib/module/assets/components/Filters.png +0 -0
- package/lib/module/assets/components/Popup-1.png +0 -0
- package/lib/module/assets/components/Popup-2.png +0 -0
- package/lib/module/assets/components/Popup-3.png +0 -0
- package/lib/module/assets/components/RedemptionOption-Horizontal.png +0 -0
- package/lib/module/assets/components/RedemptionOption-Vertical.png +0 -0
- package/lib/module/assets/components/SimpleBanner.png +0 -0
- package/lib/module/assets/components/SimpleTrendingCard.png +0 -0
- package/lib/module/assets/components/SimpleTrendingCardV2.png +0 -0
- package/lib/module/assets/components/UnlockRewards-1.png +0 -0
- package/lib/module/assets/components/UnlockRewards-2.png +0 -0
- package/lib/module/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/lib/module/assets/images/adaptive-icon.png +0 -0
- package/lib/module/assets/images/face.jpg +0 -0
- package/lib/module/assets/images/favicon.png +0 -0
- package/lib/module/assets/images/giftvoucher.jpg +0 -0
- package/lib/module/assets/images/icon.png +0 -0
- package/lib/module/assets/images/insta.webp +0 -0
- package/lib/module/assets/images/muse.jpg +0 -0
- package/lib/module/assets/images/namshi-banner.png +0 -0
- package/lib/module/assets/images/namshi.webp +0 -0
- package/lib/module/assets/images/partial-react-logo.png +0 -0
- package/lib/module/assets/images/pb-logo.jpg +0 -0
- package/lib/module/assets/images/pb.jpg +0 -0
- package/lib/module/assets/images/react-logo.png +0 -0
- package/lib/module/assets/images/react-logo@2x.png +0 -0
- package/lib/module/assets/images/react-logo@3x.png +0 -0
- package/lib/module/assets/images/scratch_foreground.png +0 -0
- package/lib/module/assets/images/splash-icon.png +0 -0
- package/lib/module/assets/images/upgrade.png +0 -0
- package/lib/module/components/Badges/Badge.js +59 -0
- package/lib/module/components/Badges/Badge.js.map +1 -0
- package/lib/module/components/Badges/README.md +98 -0
- package/lib/module/components/Badges/index.js +5 -0
- package/lib/module/components/Badges/index.js.map +1 -0
- package/lib/module/components/Banner/Banner.js +130 -0
- package/lib/module/components/Banner/Banner.js.map +1 -0
- package/lib/module/components/Banner/BannerWithDetails.js +111 -0
- package/lib/module/components/Banner/BannerWithDetails.js.map +1 -0
- package/lib/module/components/Banner/README.md +101 -0
- package/lib/module/components/Banner/index.js +7 -0
- package/lib/module/components/Banner/index.js.map +1 -0
- package/lib/module/components/BrandIcon/BrandIcon.js +98 -0
- package/lib/module/components/BrandIcon/BrandIcon.js.map +1 -0
- package/lib/module/components/BrandIcon/index.js +5 -0
- package/lib/module/components/BrandIcon/index.js.map +1 -0
- package/lib/module/components/Card/Card.js +119 -0
- package/lib/module/components/Card/Card.js.map +1 -0
- package/lib/module/components/Card/CardContent.js +37 -0
- package/lib/module/components/Card/CardContent.js.map +1 -0
- package/lib/module/components/Card/CardFooter.js +29 -0
- package/lib/module/components/Card/CardFooter.js.map +1 -0
- package/lib/module/components/Card/CardHeader.js +72 -0
- package/lib/module/components/Card/CardHeader.js.map +1 -0
- package/lib/module/components/Card/CardImage.js +46 -0
- package/lib/module/components/Card/CardImage.js.map +1 -0
- package/lib/module/components/Card/index.js +18 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Card/templates/DealCard.js +183 -0
- package/lib/module/components/Card/templates/DealCard.js.map +1 -0
- package/lib/module/components/Card/templates/DealCardWithBackgroundImage.js +188 -0
- package/lib/module/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
- package/lib/module/components/Card/templates/README.md +233 -0
- package/lib/module/components/Card/templates/SimpleTrendingCard.js +54 -0
- package/lib/module/components/Card/templates/SimpleTrendingCard.js.map +1 -0
- package/lib/module/components/Card/types.js +4 -0
- package/lib/module/components/Card/types.js.map +1 -0
- package/lib/module/components/CloseIcon/CloseIcon.js +63 -0
- package/lib/module/components/CloseIcon/CloseIcon.js.map +1 -0
- package/lib/module/components/CloseIcon/index.js +5 -0
- package/lib/module/components/CloseIcon/index.js.map +1 -0
- package/lib/module/components/Filters/Filters.js +330 -0
- package/lib/module/components/Filters/Filters.js.map +1 -0
- package/lib/module/components/Filters/PointsRangeSelector.js +256 -0
- package/lib/module/components/Filters/PointsRangeSelector.js.map +1 -0
- package/lib/module/components/Filters/README.md +212 -0
- package/lib/module/components/Filters/index.js +7 -0
- package/lib/module/components/Filters/index.js.map +1 -0
- package/lib/module/components/Input/Input.js +150 -0
- package/lib/module/components/Input/Input.js.map +1 -0
- package/lib/module/components/Input/README.md +128 -0
- package/lib/module/components/Input/index.js +5 -0
- package/lib/module/components/Input/index.js.map +1 -0
- package/lib/module/components/LockOverlay/LockOverlay.js +60 -0
- package/lib/module/components/LockOverlay/LockOverlay.js.map +1 -0
- package/lib/module/components/LockOverlay/index.js +5 -0
- package/lib/module/components/LockOverlay/index.js.map +1 -0
- package/lib/module/components/Popup/Popup.js +291 -0
- package/lib/module/components/Popup/Popup.js.map +1 -0
- package/lib/module/components/Popup/README.md +133 -0
- package/lib/module/components/Popup/index.js +5 -0
- package/lib/module/components/Popup/index.js.map +1 -0
- package/lib/module/components/ProgressBar/ProgressBar.js +116 -0
- package/lib/module/components/ProgressBar/ProgressBar.js.map +1 -0
- package/lib/module/components/ProgressBar/index.js +5 -0
- package/lib/module/components/ProgressBar/index.js.map +1 -0
- package/lib/module/components/RedemptionOption/README.md +148 -0
- package/lib/module/components/RedemptionOption/RedemptionOption.js +106 -0
- package/lib/module/components/RedemptionOption/RedemptionOption.js.map +1 -0
- package/lib/module/components/RedemptionOption/index.js +5 -0
- package/lib/module/components/RedemptionOption/index.js.map +1 -0
- package/lib/module/components/ScratchCard/README.md +119 -0
- package/lib/module/components/ScratchCard/ScratchCard.js +147 -0
- package/lib/module/components/ScratchCard/ScratchCard.js.map +1 -0
- package/lib/module/components/ScratchCard/ScratchCardContent.js +24 -0
- package/lib/module/components/ScratchCard/ScratchCardContent.js.map +1 -0
- package/lib/module/components/ScratchCard/index.js +7 -0
- package/lib/module/components/ScratchCard/index.js.map +1 -0
- package/lib/module/components/UnlockRewards/README.md +187 -0
- package/lib/module/components/UnlockRewards/RewardItem.js +120 -0
- package/lib/module/components/UnlockRewards/RewardItem.js.map +1 -0
- package/lib/module/components/UnlockRewards/UnlockRewards.js +200 -0
- package/lib/module/components/UnlockRewards/UnlockRewards.js.map +1 -0
- package/lib/module/components/UnlockRewards/index.js +7 -0
- package/lib/module/components/UnlockRewards/index.js.map +1 -0
- package/lib/module/components/Wheel/README.md +141 -0
- package/lib/module/components/Wheel/Wheel.js +317 -0
- package/lib/module/components/Wheel/Wheel.js.map +1 -0
- package/lib/module/components/Wheel/index.js +5 -0
- package/lib/module/components/Wheel/index.js.map +1 -0
- package/lib/module/components/index.js +17 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/constants/BRANDS.js +53 -0
- package/lib/module/constants/BRANDS.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/theme/Colors.js +116 -0
- package/lib/module/theme/Colors.js.map +1 -0
- package/lib/module/theme/ThemeContext.js +41 -0
- package/lib/module/theme/ThemeContext.js.map +1 -0
- package/lib/module/theme/index.js +5 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/typescript/commonjs/app/_layout.d.ts +3 -0
- package/lib/typescript/commonjs/app/_layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/app/index.d.ts +3 -0
- package/lib/typescript/commonjs/app/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Badges/Badge.d.ts +16 -0
- package/lib/typescript/commonjs/components/Badges/Badge.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Badges/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Badges/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +26 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts +19 -0
- package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Banner/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Banner/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/lib/typescript/commonjs/components/BrandIcon/BrandIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BrandIcon/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/BrandIcon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardContent.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardFooter.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardFooter.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardHeader.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardImage.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardImage.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/index.d.ts +11 -0
- package/lib/typescript/commonjs/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts +33 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts +38 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts +14 -0
- package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/types.d.ts +78 -0
- package/lib/typescript/commonjs/components/Card/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/CloseIcon/CloseIcon.d.ts +16 -0
- package/lib/typescript/commonjs/components/CloseIcon/CloseIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/CloseIcon/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/CloseIcon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Filters/Filters.d.ts +74 -0
- package/lib/typescript/commonjs/components/Filters/Filters.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Filters/PointsRangeSelector.d.ts +29 -0
- package/lib/typescript/commonjs/components/Filters/PointsRangeSelector.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Filters/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Filters/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Input/Input.d.ts +23 -0
- package/lib/typescript/commonjs/components/Input/Input.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Input/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Input/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/LockOverlay/LockOverlay.d.ts +16 -0
- package/lib/typescript/commonjs/components/LockOverlay/LockOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/LockOverlay/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/LockOverlay/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Popup/Popup.d.ts +38 -0
- package/lib/typescript/commonjs/components/Popup/Popup.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Popup/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Popup/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +26 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/RedemptionOption/RedemptionOption.d.ts +24 -0
- package/lib/typescript/commonjs/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/RedemptionOption/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/RedemptionOption/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCard.d.ts +20 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCardContent.d.ts +8 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ScratchCard/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/ScratchCard/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UnlockRewards/RewardItem.d.ts +25 -0
- package/lib/typescript/commonjs/components/UnlockRewards/RewardItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UnlockRewards/UnlockRewards.d.ts +59 -0
- package/lib/typescript/commonjs/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UnlockRewards/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/UnlockRewards/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts +34 -0
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Wheel/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Wheel/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +15 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/constants/BRANDS.d.ts +7 -0
- package/lib/typescript/commonjs/constants/BRANDS.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/theme/Colors.d.ts +28 -0
- package/lib/typescript/commonjs/theme/Colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts +13 -0
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +3 -0
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/app/_layout.d.ts +3 -0
- package/lib/typescript/module/app/_layout.d.ts.map +1 -0
- package/lib/typescript/module/app/index.d.ts +3 -0
- package/lib/typescript/module/app/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Badges/Badge.d.ts +16 -0
- package/lib/typescript/module/components/Badges/Badge.d.ts.map +1 -0
- package/lib/typescript/module/components/Badges/index.d.ts +3 -0
- package/lib/typescript/module/components/Badges/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts +26 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts.map +1 -0
- package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts +19 -0
- package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts.map +1 -0
- package/lib/typescript/module/components/Banner/index.d.ts +5 -0
- package/lib/typescript/module/components/Banner/index.d.ts.map +1 -0
- package/lib/typescript/module/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/lib/typescript/module/components/BrandIcon/BrandIcon.d.ts.map +1 -0
- package/lib/typescript/module/components/BrandIcon/index.d.ts +3 -0
- package/lib/typescript/module/components/BrandIcon/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/Card.d.ts +5 -0
- package/lib/typescript/module/components/Card/Card.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardContent.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardContent.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardFooter.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardFooter.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardHeader.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardHeader.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardImage.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardImage.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/index.d.ts +11 -0
- package/lib/typescript/module/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/templates/DealCard.d.ts +33 -0
- package/lib/typescript/module/components/Card/templates/DealCard.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts +38 -0
- package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts +14 -0
- package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/types.d.ts +78 -0
- package/lib/typescript/module/components/Card/types.d.ts.map +1 -0
- package/lib/typescript/module/components/CloseIcon/CloseIcon.d.ts +16 -0
- package/lib/typescript/module/components/CloseIcon/CloseIcon.d.ts.map +1 -0
- package/lib/typescript/module/components/CloseIcon/index.d.ts +3 -0
- package/lib/typescript/module/components/CloseIcon/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Filters/Filters.d.ts +74 -0
- package/lib/typescript/module/components/Filters/Filters.d.ts.map +1 -0
- package/lib/typescript/module/components/Filters/PointsRangeSelector.d.ts +29 -0
- package/lib/typescript/module/components/Filters/PointsRangeSelector.d.ts.map +1 -0
- package/lib/typescript/module/components/Filters/index.d.ts +5 -0
- package/lib/typescript/module/components/Filters/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Input/Input.d.ts +23 -0
- package/lib/typescript/module/components/Input/Input.d.ts.map +1 -0
- package/lib/typescript/module/components/Input/index.d.ts +3 -0
- package/lib/typescript/module/components/Input/index.d.ts.map +1 -0
- package/lib/typescript/module/components/LockOverlay/LockOverlay.d.ts +16 -0
- package/lib/typescript/module/components/LockOverlay/LockOverlay.d.ts.map +1 -0
- package/lib/typescript/module/components/LockOverlay/index.d.ts +3 -0
- package/lib/typescript/module/components/LockOverlay/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Popup/Popup.d.ts +38 -0
- package/lib/typescript/module/components/Popup/Popup.d.ts.map +1 -0
- package/lib/typescript/module/components/Popup/index.d.ts +3 -0
- package/lib/typescript/module/components/Popup/index.d.ts.map +1 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +26 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/module/components/ProgressBar/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/module/components/RedemptionOption/RedemptionOption.d.ts +24 -0
- package/lib/typescript/module/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
- package/lib/typescript/module/components/RedemptionOption/index.d.ts +3 -0
- package/lib/typescript/module/components/RedemptionOption/index.d.ts.map +1 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCard.d.ts +20 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCard.d.ts.map +1 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCardContent.d.ts +8 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
- package/lib/typescript/module/components/ScratchCard/index.d.ts +5 -0
- package/lib/typescript/module/components/ScratchCard/index.d.ts.map +1 -0
- package/lib/typescript/module/components/UnlockRewards/RewardItem.d.ts +25 -0
- package/lib/typescript/module/components/UnlockRewards/RewardItem.d.ts.map +1 -0
- package/lib/typescript/module/components/UnlockRewards/UnlockRewards.d.ts +59 -0
- package/lib/typescript/module/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
- package/lib/typescript/module/components/UnlockRewards/index.d.ts +5 -0
- package/lib/typescript/module/components/UnlockRewards/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Wheel/Wheel.d.ts +34 -0
- package/lib/typescript/module/components/Wheel/Wheel.d.ts.map +1 -0
- package/lib/typescript/module/components/Wheel/index.d.ts +3 -0
- package/lib/typescript/module/components/Wheel/index.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +15 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -0
- package/lib/typescript/module/constants/BRANDS.d.ts +7 -0
- package/lib/typescript/module/constants/BRANDS.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/theme/Colors.d.ts +28 -0
- package/lib/typescript/module/theme/Colors.d.ts.map +1 -0
- package/lib/typescript/module/theme/ThemeContext.d.ts +13 -0
- package/lib/typescript/module/theme/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +3 -0
- package/lib/typescript/module/theme/index.d.ts.map +1 -0
- package/package.json +116 -0
- package/src/app/_layout.tsx +38 -0
- package/src/app/index.tsx +115 -0
- package/src/assets/components/BannerWithDetails.png +0 -0
- package/src/assets/components/DealCard-Horizontal.png +0 -0
- package/src/assets/components/DealCard-Vertical.png +0 -0
- package/src/assets/components/DealCard-floating.png +0 -0
- package/src/assets/components/DealCard-nested.png +0 -0
- package/src/assets/components/Filters.png +0 -0
- package/src/assets/components/Popup-1.png +0 -0
- package/src/assets/components/Popup-2.png +0 -0
- package/src/assets/components/Popup-3.png +0 -0
- package/src/assets/components/RedemptionOption-Horizontal.png +0 -0
- package/src/assets/components/RedemptionOption-Vertical.png +0 -0
- package/src/assets/components/SimpleBanner.png +0 -0
- package/src/assets/components/SimpleTrendingCard.png +0 -0
- package/src/assets/components/SimpleTrendingCardV2.png +0 -0
- package/src/assets/components/UnlockRewards-1.png +0 -0
- package/src/assets/components/UnlockRewards-2.png +0 -0
- package/src/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/src/assets/images/adaptive-icon.png +0 -0
- package/src/assets/images/face.jpg +0 -0
- package/src/assets/images/favicon.png +0 -0
- package/src/assets/images/giftvoucher.jpg +0 -0
- package/src/assets/images/icon.png +0 -0
- package/src/assets/images/insta.webp +0 -0
- package/src/assets/images/muse.jpg +0 -0
- package/src/assets/images/namshi-banner.png +0 -0
- package/src/assets/images/namshi.webp +0 -0
- package/src/assets/images/partial-react-logo.png +0 -0
- package/src/assets/images/pb-logo.jpg +0 -0
- package/src/assets/images/pb.jpg +0 -0
- package/src/assets/images/react-logo.png +0 -0
- package/src/assets/images/react-logo@2x.png +0 -0
- package/src/assets/images/react-logo@3x.png +0 -0
- package/src/assets/images/scratch_foreground.png +0 -0
- package/src/assets/images/splash-icon.png +0 -0
- package/src/assets/images/upgrade.png +0 -0
- package/src/components/Badges/Badge.tsx +81 -0
- package/src/components/Badges/README.md +98 -0
- package/src/components/Badges/index.ts +2 -0
- package/src/components/Banner/Banner.tsx +172 -0
- package/src/components/Banner/BannerWithDetails.tsx +133 -0
- package/src/components/Banner/README.md +101 -0
- package/src/components/Banner/index.ts +5 -0
- package/src/components/BrandIcon/BrandIcon.tsx +134 -0
- package/src/components/BrandIcon/index.ts +2 -0
- package/src/components/Card/Card.tsx +144 -0
- package/src/components/Card/CardContent.tsx +33 -0
- package/src/components/Card/CardFooter.tsx +33 -0
- package/src/components/Card/CardHeader.tsx +80 -0
- package/src/components/Card/CardImage.tsx +51 -0
- package/src/components/Card/index.ts +15 -0
- package/src/components/Card/templates/DealCard.tsx +255 -0
- package/src/components/Card/templates/DealCardWithBackgroundImage.tsx +273 -0
- package/src/components/Card/templates/README.md +233 -0
- package/src/components/Card/templates/SimpleTrendingCard.tsx +54 -0
- package/src/components/Card/types.ts +75 -0
- package/src/components/CloseIcon/CloseIcon.tsx +77 -0
- package/src/components/CloseIcon/index.ts +2 -0
- package/src/components/Filters/Filters.tsx +427 -0
- package/src/components/Filters/PointsRangeSelector.tsx +319 -0
- package/src/components/Filters/README.md +212 -0
- package/src/components/Filters/index.ts +4 -0
- package/src/components/Input/Input.tsx +218 -0
- package/src/components/Input/README.md +128 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/LockOverlay/LockOverlay.tsx +82 -0
- package/src/components/LockOverlay/index.ts +2 -0
- package/src/components/Popup/Popup.tsx +374 -0
- package/src/components/Popup/README.md +133 -0
- package/src/components/Popup/index.ts +2 -0
- package/src/components/ProgressBar/ProgressBar.tsx +157 -0
- package/src/components/ProgressBar/index.ts +2 -0
- package/src/components/RedemptionOption/README.md +148 -0
- package/src/components/RedemptionOption/RedemptionOption.tsx +158 -0
- package/src/components/RedemptionOption/index.ts +2 -0
- package/src/components/ScratchCard/README.md +119 -0
- package/src/components/ScratchCard/ScratchCard.tsx +190 -0
- package/src/components/ScratchCard/ScratchCardContent.tsx +25 -0
- package/src/components/ScratchCard/index.ts +4 -0
- package/src/components/UnlockRewards/README.md +187 -0
- package/src/components/UnlockRewards/RewardItem.tsx +172 -0
- package/src/components/UnlockRewards/UnlockRewards.tsx +293 -0
- package/src/components/UnlockRewards/index.ts +4 -0
- package/src/components/Wheel/README.md +141 -0
- package/src/components/Wheel/Wheel.tsx +374 -0
- package/src/components/Wheel/index.ts +2 -0
- package/src/components/index.ts +14 -0
- package/src/constants/BRANDS.ts +64 -0
- package/src/index.ts +2 -0
- package/src/theme/Colors.ts +107 -0
- package/src/theme/ThemeContext.tsx +46 -0
- package/src/theme/index.ts +2 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Image, View, StyleSheet } from 'react-native';
|
|
3
|
+
import { CardImageProps } from './types';
|
|
4
|
+
|
|
5
|
+
const CardImage: React.FC<CardImageProps> = ({
|
|
6
|
+
source,
|
|
7
|
+
style,
|
|
8
|
+
height = 200,
|
|
9
|
+
width = '100%',
|
|
10
|
+
resizeMode = 'cover',
|
|
11
|
+
borderRadius,
|
|
12
|
+
overlay,
|
|
13
|
+
}) => (
|
|
14
|
+
<View style={styles.container}>
|
|
15
|
+
<Image
|
|
16
|
+
source={source}
|
|
17
|
+
style={[
|
|
18
|
+
styles.image,
|
|
19
|
+
// {
|
|
20
|
+
// height,
|
|
21
|
+
// width,
|
|
22
|
+
// resizeMode,
|
|
23
|
+
// borderRadius,
|
|
24
|
+
// },
|
|
25
|
+
style,
|
|
26
|
+
]}
|
|
27
|
+
/>
|
|
28
|
+
{overlay && (
|
|
29
|
+
<View style={styles.overlay}>
|
|
30
|
+
{overlay}
|
|
31
|
+
</View>
|
|
32
|
+
)}
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const styles = StyleSheet.create({
|
|
37
|
+
container: {
|
|
38
|
+
position: 'relative',
|
|
39
|
+
},
|
|
40
|
+
image: {
|
|
41
|
+
width: '100%',
|
|
42
|
+
height: 200,
|
|
43
|
+
},
|
|
44
|
+
overlay: {
|
|
45
|
+
...StyleSheet.absoluteFillObject,
|
|
46
|
+
justifyContent: 'center',
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export default CardImage;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// components/Card/index.ts
|
|
2
|
+
export { default as Card} from './Card';
|
|
3
|
+
export * from './Card';
|
|
4
|
+
export { default as CardContent } from './CardContent';
|
|
5
|
+
export { default as CardFooter } from './CardFooter';
|
|
6
|
+
export { default as CardHeader } from './CardHeader';
|
|
7
|
+
export { default as CardImage } from './CardImage';
|
|
8
|
+
|
|
9
|
+
// Export templates
|
|
10
|
+
export { default as DealCardWithBackgroundImage } from './templates/DealCardWithBackgroundImage';
|
|
11
|
+
export { default as DealCard } from "./templates/DealCard";
|
|
12
|
+
export { default as SimpleTrendingCard } from './templates/SimpleTrendingCard';
|
|
13
|
+
|
|
14
|
+
// Export types
|
|
15
|
+
export * from './types';
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
ImageRequireSource,
|
|
4
|
+
StyleProp,
|
|
5
|
+
ViewStyle,
|
|
6
|
+
View,
|
|
7
|
+
Text,
|
|
8
|
+
TextStyle,
|
|
9
|
+
Image,
|
|
10
|
+
useWindowDimensions,
|
|
11
|
+
} from "react-native";
|
|
12
|
+
import Card from "../Card";
|
|
13
|
+
import { useTheme } from "../../../theme/ThemeContext";
|
|
14
|
+
import ProgressBar, {
|
|
15
|
+
ProgressBarTextAlign,
|
|
16
|
+
ProgressBarTextPosition,
|
|
17
|
+
} from "../../ProgressBar/ProgressBar";
|
|
18
|
+
import CardHeader from "../CardHeader";
|
|
19
|
+
import CardFooter from "../CardFooter";
|
|
20
|
+
import LockOverlay from "../../LockOverlay/LockOverlay";
|
|
21
|
+
|
|
22
|
+
interface HorizontalDealCardProps {
|
|
23
|
+
imageSource: ImageRequireSource;
|
|
24
|
+
variant?: "vertical" | "horizontal";
|
|
25
|
+
label?: string;
|
|
26
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
27
|
+
labelContainerStyle?: StyleProp<ViewStyle>;
|
|
28
|
+
dealDescription?: string;
|
|
29
|
+
dealDescriptionStyle?: StyleProp<TextStyle>;
|
|
30
|
+
dealProviderName?: string;
|
|
31
|
+
dealProviderNameStyle?: StyleProp<TextStyle>;
|
|
32
|
+
dealPrice?: string;
|
|
33
|
+
dealPriceStyle?: StyleProp<TextStyle>;
|
|
34
|
+
progressBar?: boolean;
|
|
35
|
+
progressBarText?: string;
|
|
36
|
+
progressBarTextPosition?: ProgressBarTextPosition;
|
|
37
|
+
progressBarTextAlign?: ProgressBarTextAlign;
|
|
38
|
+
progressColor?: string;
|
|
39
|
+
progressWidth?: number;
|
|
40
|
+
progressHeight?: number;
|
|
41
|
+
remainingProgressColor?: string;
|
|
42
|
+
progressValue?: number;
|
|
43
|
+
onPress?: () => void;
|
|
44
|
+
style?: StyleProp<ViewStyle>;
|
|
45
|
+
width?: number | string;
|
|
46
|
+
isRTL?: boolean;
|
|
47
|
+
overlayVisible?: boolean;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const DealCard: React.FC<HorizontalDealCardProps> = ({
|
|
51
|
+
imageSource,
|
|
52
|
+
onPress,
|
|
53
|
+
label,
|
|
54
|
+
labelContainerStyle,
|
|
55
|
+
labelStyle,
|
|
56
|
+
dealDescription,
|
|
57
|
+
dealDescriptionStyle,
|
|
58
|
+
dealPrice,
|
|
59
|
+
dealPriceStyle,
|
|
60
|
+
dealProviderName,
|
|
61
|
+
dealProviderNameStyle,
|
|
62
|
+
progressBar,
|
|
63
|
+
progressBarText,
|
|
64
|
+
progressBarTextPosition,
|
|
65
|
+
progressBarTextAlign,
|
|
66
|
+
progressValue,
|
|
67
|
+
progressHeight,
|
|
68
|
+
progressWidth,
|
|
69
|
+
remainingProgressColor,
|
|
70
|
+
progressColor,
|
|
71
|
+
style,
|
|
72
|
+
width,
|
|
73
|
+
variant = "horizontal",
|
|
74
|
+
isRTL = false,
|
|
75
|
+
overlayVisible = false,
|
|
76
|
+
}) => {
|
|
77
|
+
const theme = useTheme();
|
|
78
|
+
const { width: screenWidth } = useWindowDimensions();
|
|
79
|
+
const isVertical = variant === "vertical";
|
|
80
|
+
|
|
81
|
+
const imageSize = Math.min(110, 110);
|
|
82
|
+
const cardPadding = 12
|
|
83
|
+
const fontSize = screenWidth < 360 ? 14 : 16;
|
|
84
|
+
|
|
85
|
+
const calculatedProgressWidth =
|
|
86
|
+
progressWidth ||
|
|
87
|
+
(typeof width === "number" ? width * 0.4 : screenWidth * 0.3);
|
|
88
|
+
|
|
89
|
+
const containerFlexDirection = isVertical
|
|
90
|
+
? "column"
|
|
91
|
+
: isRTL
|
|
92
|
+
? "row-reverse"
|
|
93
|
+
: "row";
|
|
94
|
+
|
|
95
|
+
const textContainerStyle: ViewStyle = {
|
|
96
|
+
flex: isVertical ? 0 : 1,
|
|
97
|
+
...(isVertical
|
|
98
|
+
? { paddingLeft: cardPadding, paddingRight: cardPadding }
|
|
99
|
+
: isRTL
|
|
100
|
+
? { paddingLeft: cardPadding }
|
|
101
|
+
: { paddingRight: cardPadding }),
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
const renderDealPrice = (): React.ReactNode => {
|
|
105
|
+
return (
|
|
106
|
+
<Text
|
|
107
|
+
style={[
|
|
108
|
+
{
|
|
109
|
+
textAlign: "right",
|
|
110
|
+
fontSize: fontSize,
|
|
111
|
+
fontWeight: "bold",
|
|
112
|
+
marginBottom: 3,
|
|
113
|
+
color: theme.text,
|
|
114
|
+
},
|
|
115
|
+
isRTL && { textAlign: "left" },
|
|
116
|
+
dealPriceStyle,
|
|
117
|
+
]}
|
|
118
|
+
>
|
|
119
|
+
{dealPrice}
|
|
120
|
+
</Text>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return (
|
|
125
|
+
<Card
|
|
126
|
+
onPress={onPress}
|
|
127
|
+
variant="filled"
|
|
128
|
+
backgroundColor={theme.surface}
|
|
129
|
+
style={[
|
|
130
|
+
{
|
|
131
|
+
borderRadius: 16,
|
|
132
|
+
overflow: "hidden",
|
|
133
|
+
alignItems: isVertical ? "stretch" : "center",
|
|
134
|
+
flexDirection: containerFlexDirection,
|
|
135
|
+
},
|
|
136
|
+
typeof width === "number" && { width },
|
|
137
|
+
style,
|
|
138
|
+
]}
|
|
139
|
+
>
|
|
140
|
+
<View
|
|
141
|
+
style={
|
|
142
|
+
isVertical
|
|
143
|
+
? {
|
|
144
|
+
position: "relative",
|
|
145
|
+
marginHorizontal: cardPadding,
|
|
146
|
+
marginVertical: cardPadding,
|
|
147
|
+
borderRadius: 10,
|
|
148
|
+
overflow: "hidden",
|
|
149
|
+
}
|
|
150
|
+
: {
|
|
151
|
+
position: "relative",
|
|
152
|
+
marginLeft: cardPadding,
|
|
153
|
+
marginRight: cardPadding,
|
|
154
|
+
borderRadius: 10,
|
|
155
|
+
overflow: "hidden",
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
>
|
|
159
|
+
<Image
|
|
160
|
+
source={imageSource}
|
|
161
|
+
style={
|
|
162
|
+
isVertical
|
|
163
|
+
? {
|
|
164
|
+
height: 200,
|
|
165
|
+
width: "100%",
|
|
166
|
+
borderRadius: 10,
|
|
167
|
+
alignSelf: "center",
|
|
168
|
+
resizeMode: "cover",
|
|
169
|
+
}
|
|
170
|
+
: {
|
|
171
|
+
width: imageSize,
|
|
172
|
+
height: imageSize,
|
|
173
|
+
borderRadius: 10,
|
|
174
|
+
alignSelf: "center",
|
|
175
|
+
resizeMode: "cover",
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/>
|
|
179
|
+
<LockOverlay visible={overlayVisible} />
|
|
180
|
+
</View>
|
|
181
|
+
|
|
182
|
+
<View style={textContainerStyle}>
|
|
183
|
+
<CardHeader
|
|
184
|
+
title={dealProviderName}
|
|
185
|
+
subtitle={dealDescription}
|
|
186
|
+
subtitleStyle={[
|
|
187
|
+
isRTL && { textAlign: "right" },
|
|
188
|
+
dealDescriptionStyle,
|
|
189
|
+
]}
|
|
190
|
+
titleStyle={[isRTL && { textAlign: "right" }, dealProviderNameStyle]}
|
|
191
|
+
style={{ paddingLeft: 0, paddingRight: 0 }}
|
|
192
|
+
/>
|
|
193
|
+
<View style={{ marginTop: 10, marginBottom: 15 }}>
|
|
194
|
+
{renderDealPrice()}
|
|
195
|
+
<CardFooter
|
|
196
|
+
justifyContent="space-between"
|
|
197
|
+
style={[{ padding: 0 }, isRTL && { flexDirection: "row-reverse" }]}
|
|
198
|
+
>
|
|
199
|
+
{label && (
|
|
200
|
+
<View
|
|
201
|
+
style={[
|
|
202
|
+
{
|
|
203
|
+
backgroundColor: theme.primary,
|
|
204
|
+
paddingVertical: 5,
|
|
205
|
+
paddingHorizontal: 8,
|
|
206
|
+
borderRadius: 10,
|
|
207
|
+
},
|
|
208
|
+
labelContainerStyle,
|
|
209
|
+
]}
|
|
210
|
+
>
|
|
211
|
+
<Text
|
|
212
|
+
style={[
|
|
213
|
+
{
|
|
214
|
+
color: theme.onPrimary,
|
|
215
|
+
fontSize: 14,
|
|
216
|
+
},
|
|
217
|
+
labelStyle,
|
|
218
|
+
]}
|
|
219
|
+
>
|
|
220
|
+
{label}
|
|
221
|
+
</Text>
|
|
222
|
+
</View>
|
|
223
|
+
)}
|
|
224
|
+
<View>
|
|
225
|
+
{progressBar && (
|
|
226
|
+
<ProgressBar
|
|
227
|
+
progress={progressValue}
|
|
228
|
+
remainingColor={remainingProgressColor}
|
|
229
|
+
progressColor={progressColor}
|
|
230
|
+
height={progressHeight || (screenWidth < 360 ? 10 : 14)}
|
|
231
|
+
width={calculatedProgressWidth}
|
|
232
|
+
textPosition={progressBarTextPosition}
|
|
233
|
+
text={progressBarText}
|
|
234
|
+
showText={progressBarText != null}
|
|
235
|
+
textAlign={
|
|
236
|
+
isRTL && progressBarTextAlign == null
|
|
237
|
+
? "right"
|
|
238
|
+
: progressBarTextAlign
|
|
239
|
+
}
|
|
240
|
+
isRTL={isRTL}
|
|
241
|
+
textStyle={{
|
|
242
|
+
fontSize: screenWidth < 360 ? 8 : 10,
|
|
243
|
+
color: theme.text,
|
|
244
|
+
}}
|
|
245
|
+
/>
|
|
246
|
+
)}
|
|
247
|
+
</View>
|
|
248
|
+
</CardFooter>
|
|
249
|
+
</View>
|
|
250
|
+
</View>
|
|
251
|
+
</Card>
|
|
252
|
+
);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
export default DealCard;
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
ImageRequireSource,
|
|
4
|
+
StyleProp,
|
|
5
|
+
ViewStyle,
|
|
6
|
+
View,
|
|
7
|
+
Text,
|
|
8
|
+
TextStyle,
|
|
9
|
+
TouchableOpacity,
|
|
10
|
+
} from "react-native";
|
|
11
|
+
import Card from "../Card";
|
|
12
|
+
import CardHeader from "../CardHeader";
|
|
13
|
+
import CardContent from "../CardContent";
|
|
14
|
+
import { useTheme } from "../../../theme/ThemeContext";
|
|
15
|
+
import CardFooter from "../CardFooter";
|
|
16
|
+
import ProgressBar, {
|
|
17
|
+
ProgressBarTextAlign,
|
|
18
|
+
ProgressBarTextPosition,
|
|
19
|
+
} from "../../ProgressBar/ProgressBar";
|
|
20
|
+
import LockOverlay from "../../LockOverlay/LockOverlay";
|
|
21
|
+
|
|
22
|
+
interface DealCardProps {
|
|
23
|
+
backgroundImage: ImageRequireSource;
|
|
24
|
+
label?: string;
|
|
25
|
+
labelStyle?: StyleProp<TextStyle>;
|
|
26
|
+
labelContainerStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
actionIconDefault?: React.ReactNode;
|
|
28
|
+
actionIconActive?: React.ReactNode;
|
|
29
|
+
onActionPress?: (active: boolean) => void;
|
|
30
|
+
innerCardStyle?: ViewStyle;
|
|
31
|
+
innerCardVariant?: "floating" | "nested";
|
|
32
|
+
dealDescription?: string;
|
|
33
|
+
dealDescriptionStyle?: StyleProp<TextStyle>;
|
|
34
|
+
dealProviderName?: string;
|
|
35
|
+
dealProviderNameStyle?: StyleProp<TextStyle>;
|
|
36
|
+
dealPrice?: string;
|
|
37
|
+
dealPriceStyle?: StyleProp<TextStyle>;
|
|
38
|
+
progressBar?: boolean;
|
|
39
|
+
progressBarText?: string;
|
|
40
|
+
progressBarTextPosition?: ProgressBarTextPosition;
|
|
41
|
+
progressBarTextAlign?: ProgressBarTextAlign;
|
|
42
|
+
progressColor?: string;
|
|
43
|
+
progressWidth?: number;
|
|
44
|
+
progressHeight?: number;
|
|
45
|
+
remainingProgressColor?: string;
|
|
46
|
+
progressValue?: number;
|
|
47
|
+
onPress?: () => void;
|
|
48
|
+
style?: ViewStyle;
|
|
49
|
+
width?: number;
|
|
50
|
+
isRTL?: boolean;
|
|
51
|
+
overlayVisible?: boolean;
|
|
52
|
+
overlayCover?: "all" | "background";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const DealCardWithBackgroundImage: React.FC<DealCardProps> = ({
|
|
56
|
+
backgroundImage,
|
|
57
|
+
onPress,
|
|
58
|
+
label,
|
|
59
|
+
labelContainerStyle,
|
|
60
|
+
labelStyle,
|
|
61
|
+
actionIconDefault,
|
|
62
|
+
actionIconActive,
|
|
63
|
+
onActionPress,
|
|
64
|
+
innerCardStyle,
|
|
65
|
+
dealDescription,
|
|
66
|
+
dealDescriptionStyle,
|
|
67
|
+
dealPrice,
|
|
68
|
+
dealPriceStyle,
|
|
69
|
+
dealProviderName,
|
|
70
|
+
dealProviderNameStyle,
|
|
71
|
+
progressBar,
|
|
72
|
+
progressBarText,
|
|
73
|
+
progressBarTextPosition,
|
|
74
|
+
progressBarTextAlign,
|
|
75
|
+
progressValue,
|
|
76
|
+
progressHeight,
|
|
77
|
+
progressWidth,
|
|
78
|
+
remainingProgressColor,
|
|
79
|
+
progressColor,
|
|
80
|
+
innerCardVariant = "nested",
|
|
81
|
+
style,
|
|
82
|
+
width = 300,
|
|
83
|
+
isRTL = false,
|
|
84
|
+
overlayVisible = false,
|
|
85
|
+
overlayCover = "background",
|
|
86
|
+
}) => {
|
|
87
|
+
const theme = useTheme();
|
|
88
|
+
|
|
89
|
+
const [isActive, setIsActive] = useState(false);
|
|
90
|
+
|
|
91
|
+
const handleActionPress = () => {
|
|
92
|
+
if (!actionIconActive) return;
|
|
93
|
+
setIsActive(!isActive);
|
|
94
|
+
if (onActionPress) {
|
|
95
|
+
onActionPress(!isActive);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const labelContent = label && (
|
|
100
|
+
<View
|
|
101
|
+
style={[
|
|
102
|
+
{
|
|
103
|
+
backgroundColor: theme.surface,
|
|
104
|
+
paddingVertical: 5,
|
|
105
|
+
paddingHorizontal: 8,
|
|
106
|
+
borderRadius: 10,
|
|
107
|
+
},
|
|
108
|
+
labelContainerStyle,
|
|
109
|
+
]}
|
|
110
|
+
>
|
|
111
|
+
<Text style={[{ color: theme.onSurface }, labelStyle]}>{label}</Text>
|
|
112
|
+
</View>
|
|
113
|
+
);
|
|
114
|
+
|
|
115
|
+
const actionContent = (
|
|
116
|
+
<TouchableOpacity onPress={handleActionPress}>
|
|
117
|
+
{isActive ? actionIconActive : actionIconDefault}
|
|
118
|
+
</TouchableOpacity>
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
const headerLeft = isRTL ? actionContent : labelContent;
|
|
122
|
+
const headerRight = isRTL ? labelContent : actionContent;
|
|
123
|
+
|
|
124
|
+
const mainCardBorderRadius = style?.borderRadius || 8;
|
|
125
|
+
|
|
126
|
+
const innerCardBorderRadius = 30;
|
|
127
|
+
const getVariantStyle = (): StyleProp<ViewStyle> => {
|
|
128
|
+
if (innerCardVariant === "floating") {
|
|
129
|
+
return {
|
|
130
|
+
position: "absolute",
|
|
131
|
+
bottom: -30,
|
|
132
|
+
width: width,
|
|
133
|
+
marginHorizontal: 0,
|
|
134
|
+
marginVertical: 0,
|
|
135
|
+
paddingBottom: progressBar || dealPrice ? 0 : 20,
|
|
136
|
+
borderRadius: 20,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
return {};
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const computedInnerCardStyle = [
|
|
143
|
+
{
|
|
144
|
+
borderRadius: innerCardBorderRadius,
|
|
145
|
+
},
|
|
146
|
+
getVariantStyle(),
|
|
147
|
+
innerCardStyle,
|
|
148
|
+
];
|
|
149
|
+
const finalInnerBorderRadius =
|
|
150
|
+
(innerCardStyle?.borderRadius as number) ||
|
|
151
|
+
(innerCardVariant === "floating" ? 20 : innerCardBorderRadius) ||
|
|
152
|
+
innerCardBorderRadius;
|
|
153
|
+
|
|
154
|
+
const overlayStyle: ViewStyle = {
|
|
155
|
+
borderRadius: mainCardBorderRadius,
|
|
156
|
+
borderBottomLeftRadius:
|
|
157
|
+
innerCardVariant === "floating"
|
|
158
|
+
? finalInnerBorderRadius
|
|
159
|
+
: mainCardBorderRadius,
|
|
160
|
+
borderBottomRightRadius:
|
|
161
|
+
innerCardVariant === "floating"
|
|
162
|
+
? finalInnerBorderRadius
|
|
163
|
+
: mainCardBorderRadius,
|
|
164
|
+
bottom: innerCardVariant === "floating" ? -30 : 0,
|
|
165
|
+
overflow: "hidden",
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
return (
|
|
169
|
+
<Card
|
|
170
|
+
onPress={onPress}
|
|
171
|
+
style={[
|
|
172
|
+
{
|
|
173
|
+
height: 300,
|
|
174
|
+
position: "relative",
|
|
175
|
+
borderRadius: mainCardBorderRadius,
|
|
176
|
+
},
|
|
177
|
+
style,
|
|
178
|
+
{ width },
|
|
179
|
+
]}
|
|
180
|
+
backgroundImage={{
|
|
181
|
+
source: backgroundImage,
|
|
182
|
+
resizeMode: "cover",
|
|
183
|
+
}}
|
|
184
|
+
>
|
|
185
|
+
<LockOverlay
|
|
186
|
+
visible={overlayVisible}
|
|
187
|
+
containerStyle={overlayStyle}
|
|
188
|
+
contentVerticalAlign={overlayCover == "background" ? "top" : "center"}
|
|
189
|
+
/>
|
|
190
|
+
<CardHeader
|
|
191
|
+
left={headerLeft}
|
|
192
|
+
right={headerRight}
|
|
193
|
+
style={{ alignItems: "center" }}
|
|
194
|
+
/>
|
|
195
|
+
|
|
196
|
+
<View
|
|
197
|
+
style={{
|
|
198
|
+
flex: 1,
|
|
199
|
+
justifyContent: "flex-end",
|
|
200
|
+
zIndex: overlayCover == "background" ? 1000 : 0,
|
|
201
|
+
}}
|
|
202
|
+
>
|
|
203
|
+
<CardContent style={{ padding: 0 }}>
|
|
204
|
+
<Card
|
|
205
|
+
backgroundColor={theme.surface}
|
|
206
|
+
variant="filled"
|
|
207
|
+
style={computedInnerCardStyle}
|
|
208
|
+
>
|
|
209
|
+
<CardHeader
|
|
210
|
+
title={dealProviderName}
|
|
211
|
+
titleColor={theme.text}
|
|
212
|
+
titleStyle={[
|
|
213
|
+
{ fontSize: 18, textAlign: isRTL ? "right" : "left" },
|
|
214
|
+
dealProviderNameStyle,
|
|
215
|
+
]}
|
|
216
|
+
subtitle={dealDescription}
|
|
217
|
+
subtitleColor={theme.helper}
|
|
218
|
+
subtitleStyle={[
|
|
219
|
+
{ textAlign: isRTL ? "right" : "left" },
|
|
220
|
+
dealDescriptionStyle,
|
|
221
|
+
]}
|
|
222
|
+
/>
|
|
223
|
+
{(progressBar || dealPrice) && (
|
|
224
|
+
<CardFooter
|
|
225
|
+
justifyContent="space-between"
|
|
226
|
+
style={{
|
|
227
|
+
flexDirection: isRTL ? "row-reverse" : "row",
|
|
228
|
+
}}
|
|
229
|
+
>
|
|
230
|
+
{progressBar && (
|
|
231
|
+
<ProgressBar
|
|
232
|
+
progress={progressValue}
|
|
233
|
+
remainingColor={remainingProgressColor}
|
|
234
|
+
progressColor={progressColor}
|
|
235
|
+
height={progressHeight || 14}
|
|
236
|
+
width={progressWidth || width * 0.5}
|
|
237
|
+
textPosition={progressBarTextPosition}
|
|
238
|
+
text={progressBarText}
|
|
239
|
+
showText={progressBarText != null}
|
|
240
|
+
textAlign={
|
|
241
|
+
isRTL && progressBarTextAlign == null
|
|
242
|
+
? "right"
|
|
243
|
+
: progressBarTextAlign
|
|
244
|
+
}
|
|
245
|
+
textStyle={{ fontSize: 10, color: theme.text }}
|
|
246
|
+
isRTL={isRTL}
|
|
247
|
+
/>
|
|
248
|
+
)}
|
|
249
|
+
<View>
|
|
250
|
+
<Text
|
|
251
|
+
style={[
|
|
252
|
+
{
|
|
253
|
+
fontSize: 16,
|
|
254
|
+
color: theme.primary,
|
|
255
|
+
fontWeight: "bold",
|
|
256
|
+
textAlign: isRTL ? "left" : "right",
|
|
257
|
+
},
|
|
258
|
+
dealPriceStyle,
|
|
259
|
+
]}
|
|
260
|
+
>
|
|
261
|
+
{dealPrice}
|
|
262
|
+
</Text>
|
|
263
|
+
</View>
|
|
264
|
+
</CardFooter>
|
|
265
|
+
)}
|
|
266
|
+
</Card>
|
|
267
|
+
</CardContent>
|
|
268
|
+
</View>
|
|
269
|
+
</Card>
|
|
270
|
+
);
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
export default DealCardWithBackgroundImage;
|