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,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _Card = _interopRequireDefault(require("../Card.js"));
|
|
10
|
+
var _ThemeContext = require("../../../theme/ThemeContext.js");
|
|
11
|
+
var _ProgressBar = _interopRequireDefault(require("../../ProgressBar/ProgressBar.js"));
|
|
12
|
+
var _CardHeader = _interopRequireDefault(require("../CardHeader.js"));
|
|
13
|
+
var _CardFooter = _interopRequireDefault(require("../CardFooter.js"));
|
|
14
|
+
var _LockOverlay = _interopRequireDefault(require("../../LockOverlay/LockOverlay.js"));
|
|
15
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
+
const DealCard = ({
|
|
18
|
+
imageSource,
|
|
19
|
+
onPress,
|
|
20
|
+
label,
|
|
21
|
+
labelContainerStyle,
|
|
22
|
+
labelStyle,
|
|
23
|
+
dealDescription,
|
|
24
|
+
dealDescriptionStyle,
|
|
25
|
+
dealPrice,
|
|
26
|
+
dealPriceStyle,
|
|
27
|
+
dealProviderName,
|
|
28
|
+
dealProviderNameStyle,
|
|
29
|
+
progressBar,
|
|
30
|
+
progressBarText,
|
|
31
|
+
progressBarTextPosition,
|
|
32
|
+
progressBarTextAlign,
|
|
33
|
+
progressValue,
|
|
34
|
+
progressHeight,
|
|
35
|
+
progressWidth,
|
|
36
|
+
remainingProgressColor,
|
|
37
|
+
progressColor,
|
|
38
|
+
style,
|
|
39
|
+
width,
|
|
40
|
+
variant = "horizontal",
|
|
41
|
+
isRTL = false,
|
|
42
|
+
overlayVisible = false
|
|
43
|
+
}) => {
|
|
44
|
+
const theme = (0, _ThemeContext.useTheme)();
|
|
45
|
+
const {
|
|
46
|
+
width: screenWidth
|
|
47
|
+
} = (0, _reactNative.useWindowDimensions)();
|
|
48
|
+
const isVertical = variant === "vertical";
|
|
49
|
+
const imageSize = Math.min(110, 110);
|
|
50
|
+
const cardPadding = 12;
|
|
51
|
+
const fontSize = screenWidth < 360 ? 14 : 16;
|
|
52
|
+
const calculatedProgressWidth = progressWidth || (typeof width === "number" ? width * 0.4 : screenWidth * 0.3);
|
|
53
|
+
const containerFlexDirection = isVertical ? "column" : isRTL ? "row-reverse" : "row";
|
|
54
|
+
const textContainerStyle = {
|
|
55
|
+
flex: isVertical ? 0 : 1,
|
|
56
|
+
...(isVertical ? {
|
|
57
|
+
paddingLeft: cardPadding,
|
|
58
|
+
paddingRight: cardPadding
|
|
59
|
+
} : isRTL ? {
|
|
60
|
+
paddingLeft: cardPadding
|
|
61
|
+
} : {
|
|
62
|
+
paddingRight: cardPadding
|
|
63
|
+
})
|
|
64
|
+
};
|
|
65
|
+
const renderDealPrice = () => {
|
|
66
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
67
|
+
style: [{
|
|
68
|
+
textAlign: "right",
|
|
69
|
+
fontSize: fontSize,
|
|
70
|
+
fontWeight: "bold",
|
|
71
|
+
marginBottom: 3,
|
|
72
|
+
color: theme.text
|
|
73
|
+
}, isRTL && {
|
|
74
|
+
textAlign: "left"
|
|
75
|
+
}, dealPriceStyle],
|
|
76
|
+
children: dealPrice
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.default, {
|
|
80
|
+
onPress: onPress,
|
|
81
|
+
variant: "filled",
|
|
82
|
+
backgroundColor: theme.surface,
|
|
83
|
+
style: [{
|
|
84
|
+
borderRadius: 16,
|
|
85
|
+
overflow: "hidden",
|
|
86
|
+
alignItems: isVertical ? "stretch" : "center",
|
|
87
|
+
flexDirection: containerFlexDirection
|
|
88
|
+
}, typeof width === "number" && {
|
|
89
|
+
width
|
|
90
|
+
}, style],
|
|
91
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
92
|
+
style: isVertical ? {
|
|
93
|
+
position: "relative",
|
|
94
|
+
marginHorizontal: cardPadding,
|
|
95
|
+
marginVertical: cardPadding,
|
|
96
|
+
borderRadius: 10,
|
|
97
|
+
overflow: "hidden"
|
|
98
|
+
} : {
|
|
99
|
+
position: "relative",
|
|
100
|
+
marginLeft: cardPadding,
|
|
101
|
+
marginRight: cardPadding,
|
|
102
|
+
borderRadius: 10,
|
|
103
|
+
overflow: "hidden"
|
|
104
|
+
},
|
|
105
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
106
|
+
source: imageSource,
|
|
107
|
+
style: isVertical ? {
|
|
108
|
+
height: 200,
|
|
109
|
+
width: "100%",
|
|
110
|
+
borderRadius: 10,
|
|
111
|
+
alignSelf: "center",
|
|
112
|
+
resizeMode: "cover"
|
|
113
|
+
} : {
|
|
114
|
+
width: imageSize,
|
|
115
|
+
height: imageSize,
|
|
116
|
+
borderRadius: 10,
|
|
117
|
+
alignSelf: "center",
|
|
118
|
+
resizeMode: "cover"
|
|
119
|
+
}
|
|
120
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LockOverlay.default, {
|
|
121
|
+
visible: overlayVisible
|
|
122
|
+
})]
|
|
123
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
124
|
+
style: textContainerStyle,
|
|
125
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CardHeader.default, {
|
|
126
|
+
title: dealProviderName,
|
|
127
|
+
subtitle: dealDescription,
|
|
128
|
+
subtitleStyle: [isRTL && {
|
|
129
|
+
textAlign: "right"
|
|
130
|
+
}, dealDescriptionStyle],
|
|
131
|
+
titleStyle: [isRTL && {
|
|
132
|
+
textAlign: "right"
|
|
133
|
+
}, dealProviderNameStyle],
|
|
134
|
+
style: {
|
|
135
|
+
paddingLeft: 0,
|
|
136
|
+
paddingRight: 0
|
|
137
|
+
}
|
|
138
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
139
|
+
style: {
|
|
140
|
+
marginTop: 10,
|
|
141
|
+
marginBottom: 15
|
|
142
|
+
},
|
|
143
|
+
children: [renderDealPrice(), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CardFooter.default, {
|
|
144
|
+
justifyContent: "space-between",
|
|
145
|
+
style: [{
|
|
146
|
+
padding: 0
|
|
147
|
+
}, isRTL && {
|
|
148
|
+
flexDirection: "row-reverse"
|
|
149
|
+
}],
|
|
150
|
+
children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
151
|
+
style: [{
|
|
152
|
+
backgroundColor: theme.primary,
|
|
153
|
+
paddingVertical: 5,
|
|
154
|
+
paddingHorizontal: 8,
|
|
155
|
+
borderRadius: 10
|
|
156
|
+
}, labelContainerStyle],
|
|
157
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
158
|
+
style: [{
|
|
159
|
+
color: theme.onPrimary,
|
|
160
|
+
fontSize: 14
|
|
161
|
+
}, labelStyle],
|
|
162
|
+
children: label
|
|
163
|
+
})
|
|
164
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
165
|
+
children: progressBar && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar.default, {
|
|
166
|
+
progress: progressValue,
|
|
167
|
+
remainingColor: remainingProgressColor,
|
|
168
|
+
progressColor: progressColor,
|
|
169
|
+
height: progressHeight || (screenWidth < 360 ? 10 : 14),
|
|
170
|
+
width: calculatedProgressWidth,
|
|
171
|
+
textPosition: progressBarTextPosition,
|
|
172
|
+
text: progressBarText,
|
|
173
|
+
showText: progressBarText != null,
|
|
174
|
+
textAlign: isRTL && progressBarTextAlign == null ? "right" : progressBarTextAlign,
|
|
175
|
+
isRTL: isRTL,
|
|
176
|
+
textStyle: {
|
|
177
|
+
fontSize: screenWidth < 360 ? 8 : 10,
|
|
178
|
+
color: theme.text
|
|
179
|
+
}
|
|
180
|
+
})
|
|
181
|
+
})]
|
|
182
|
+
})]
|
|
183
|
+
})]
|
|
184
|
+
})]
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
var _default = exports.default = DealCard;
|
|
188
|
+
//# sourceMappingURL=DealCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_Card","_ThemeContext","_ProgressBar","_CardHeader","_CardFooter","_LockOverlay","_jsxRuntime","e","__esModule","default","DealCard","imageSource","onPress","label","labelContainerStyle","labelStyle","dealDescription","dealDescriptionStyle","dealPrice","dealPriceStyle","dealProviderName","dealProviderNameStyle","progressBar","progressBarText","progressBarTextPosition","progressBarTextAlign","progressValue","progressHeight","progressWidth","remainingProgressColor","progressColor","style","width","variant","isRTL","overlayVisible","theme","useTheme","screenWidth","useWindowDimensions","isVertical","imageSize","Math","min","cardPadding","fontSize","calculatedProgressWidth","containerFlexDirection","textContainerStyle","flex","paddingLeft","paddingRight","renderDealPrice","jsx","Text","textAlign","fontWeight","marginBottom","color","text","children","jsxs","backgroundColor","surface","borderRadius","overflow","alignItems","flexDirection","View","position","marginHorizontal","marginVertical","marginLeft","marginRight","Image","source","height","alignSelf","resizeMode","visible","title","subtitle","subtitleStyle","titleStyle","marginTop","justifyContent","padding","primary","paddingVertical","paddingHorizontal","onPrimary","progress","remainingColor","textPosition","showText","textStyle","_default","exports"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/Card/templates/DealCard.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAL,sBAAA,CAAAC,OAAA;AAIA,IAAAK,WAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,WAAA,GAAAP,sBAAA,CAAAC,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AAEc,uBAAwB;cAC/B+C,YAAY,EAAErE,uBAAwB;cACtCmC,IAAI,EAAEpC,eAAgB;cACtBuE,QAAQ,EAAEvE,eAAe,IAAI,IAAK;cAClCgC,SAAS,EACPrB,KAAK,IAAIT,oBAAoB,IAAI,IAAI,GACjC,OAAO,GACPA,oBACL;cACDS,KAAK,EAAEA,KAAM;cACb6D,SAAS,EAAE;gBACTlD,QAAQ,EAAEP,WAAW,GAAG,GAAG,GAAG,CAAC,GAAG,EAAE;gBACpCoB,KAAK,EAAEtB,KAAK,CAACuB;cACf;YAAE,CACH;UACF,CACG,CAAC;QAAA,CACG,CAAC;MAAA,CACT,CAAC;IAAA,CACH,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAAC,IAAAqC,QAAA,GAAAC,OAAA,CAAAxF,OAAA,GAEaC,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,195 @@
|
|
|
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 _reactNative = require("react-native");
|
|
9
|
+
var _Card = _interopRequireDefault(require("../Card.js"));
|
|
10
|
+
var _CardHeader = _interopRequireDefault(require("../CardHeader.js"));
|
|
11
|
+
var _CardContent = _interopRequireDefault(require("../CardContent.js"));
|
|
12
|
+
var _ThemeContext = require("../../../theme/ThemeContext.js");
|
|
13
|
+
var _CardFooter = _interopRequireDefault(require("../CardFooter.js"));
|
|
14
|
+
var _ProgressBar = _interopRequireDefault(require("../../ProgressBar/ProgressBar.js"));
|
|
15
|
+
var _LockOverlay = _interopRequireDefault(require("../../LockOverlay/LockOverlay.js"));
|
|
16
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
|
+
const DealCardWithBackgroundImage = ({
|
|
21
|
+
backgroundImage,
|
|
22
|
+
onPress,
|
|
23
|
+
label,
|
|
24
|
+
labelContainerStyle,
|
|
25
|
+
labelStyle,
|
|
26
|
+
actionIconDefault,
|
|
27
|
+
actionIconActive,
|
|
28
|
+
onActionPress,
|
|
29
|
+
innerCardStyle,
|
|
30
|
+
dealDescription,
|
|
31
|
+
dealDescriptionStyle,
|
|
32
|
+
dealPrice,
|
|
33
|
+
dealPriceStyle,
|
|
34
|
+
dealProviderName,
|
|
35
|
+
dealProviderNameStyle,
|
|
36
|
+
progressBar,
|
|
37
|
+
progressBarText,
|
|
38
|
+
progressBarTextPosition,
|
|
39
|
+
progressBarTextAlign,
|
|
40
|
+
progressValue,
|
|
41
|
+
progressHeight,
|
|
42
|
+
progressWidth,
|
|
43
|
+
remainingProgressColor,
|
|
44
|
+
progressColor,
|
|
45
|
+
innerCardVariant = "nested",
|
|
46
|
+
style,
|
|
47
|
+
width = 300,
|
|
48
|
+
isRTL = false,
|
|
49
|
+
overlayVisible = false,
|
|
50
|
+
overlayCover = "background"
|
|
51
|
+
}) => {
|
|
52
|
+
const theme = (0, _ThemeContext.useTheme)();
|
|
53
|
+
const [isActive, setIsActive] = (0, _react.useState)(false);
|
|
54
|
+
const handleActionPress = () => {
|
|
55
|
+
if (!actionIconActive) return;
|
|
56
|
+
setIsActive(!isActive);
|
|
57
|
+
if (onActionPress) {
|
|
58
|
+
onActionPress(!isActive);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const labelContent = label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
62
|
+
style: [{
|
|
63
|
+
backgroundColor: theme.surface,
|
|
64
|
+
paddingVertical: 5,
|
|
65
|
+
paddingHorizontal: 8,
|
|
66
|
+
borderRadius: 10
|
|
67
|
+
}, labelContainerStyle],
|
|
68
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
69
|
+
style: [{
|
|
70
|
+
color: theme.onSurface
|
|
71
|
+
}, labelStyle],
|
|
72
|
+
children: label
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
const actionContent = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
76
|
+
onPress: handleActionPress,
|
|
77
|
+
children: isActive ? actionIconActive : actionIconDefault
|
|
78
|
+
});
|
|
79
|
+
const headerLeft = isRTL ? actionContent : labelContent;
|
|
80
|
+
const headerRight = isRTL ? labelContent : actionContent;
|
|
81
|
+
const mainCardBorderRadius = style?.borderRadius || 8;
|
|
82
|
+
const innerCardBorderRadius = 30;
|
|
83
|
+
const getVariantStyle = () => {
|
|
84
|
+
if (innerCardVariant === "floating") {
|
|
85
|
+
return {
|
|
86
|
+
position: "absolute",
|
|
87
|
+
bottom: -30,
|
|
88
|
+
width: width,
|
|
89
|
+
marginHorizontal: 0,
|
|
90
|
+
marginVertical: 0,
|
|
91
|
+
paddingBottom: progressBar || dealPrice ? 0 : 20,
|
|
92
|
+
borderRadius: 20
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {};
|
|
96
|
+
};
|
|
97
|
+
const computedInnerCardStyle = [{
|
|
98
|
+
borderRadius: innerCardBorderRadius
|
|
99
|
+
}, getVariantStyle(), innerCardStyle];
|
|
100
|
+
const finalInnerBorderRadius = innerCardStyle?.borderRadius || (innerCardVariant === "floating" ? 20 : innerCardBorderRadius) || innerCardBorderRadius;
|
|
101
|
+
const overlayStyle = {
|
|
102
|
+
borderRadius: mainCardBorderRadius,
|
|
103
|
+
borderBottomLeftRadius: innerCardVariant === "floating" ? finalInnerBorderRadius : mainCardBorderRadius,
|
|
104
|
+
borderBottomRightRadius: innerCardVariant === "floating" ? finalInnerBorderRadius : mainCardBorderRadius,
|
|
105
|
+
bottom: innerCardVariant === "floating" ? -30 : 0,
|
|
106
|
+
overflow: "hidden"
|
|
107
|
+
};
|
|
108
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.default, {
|
|
109
|
+
onPress: onPress,
|
|
110
|
+
style: [{
|
|
111
|
+
height: 300,
|
|
112
|
+
position: "relative",
|
|
113
|
+
borderRadius: mainCardBorderRadius
|
|
114
|
+
}, style, {
|
|
115
|
+
width
|
|
116
|
+
}],
|
|
117
|
+
backgroundImage: {
|
|
118
|
+
source: backgroundImage,
|
|
119
|
+
resizeMode: "cover"
|
|
120
|
+
},
|
|
121
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LockOverlay.default, {
|
|
122
|
+
visible: overlayVisible,
|
|
123
|
+
containerStyle: overlayStyle,
|
|
124
|
+
contentVerticalAlign: overlayCover == "background" ? "top" : "center"
|
|
125
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardHeader.default, {
|
|
126
|
+
left: headerLeft,
|
|
127
|
+
right: headerRight,
|
|
128
|
+
style: {
|
|
129
|
+
alignItems: "center"
|
|
130
|
+
}
|
|
131
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
132
|
+
style: {
|
|
133
|
+
flex: 1,
|
|
134
|
+
justifyContent: "flex-end",
|
|
135
|
+
zIndex: overlayCover == "background" ? 1000 : 0
|
|
136
|
+
},
|
|
137
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CardContent.default, {
|
|
138
|
+
style: {
|
|
139
|
+
padding: 0
|
|
140
|
+
},
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.default, {
|
|
142
|
+
backgroundColor: theme.surface,
|
|
143
|
+
variant: "filled",
|
|
144
|
+
style: computedInnerCardStyle,
|
|
145
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CardHeader.default, {
|
|
146
|
+
title: dealProviderName,
|
|
147
|
+
titleColor: theme.text,
|
|
148
|
+
titleStyle: [{
|
|
149
|
+
fontSize: 18,
|
|
150
|
+
textAlign: isRTL ? "right" : "left"
|
|
151
|
+
}, dealProviderNameStyle],
|
|
152
|
+
subtitle: dealDescription,
|
|
153
|
+
subtitleColor: theme.helper,
|
|
154
|
+
subtitleStyle: [{
|
|
155
|
+
textAlign: isRTL ? "right" : "left"
|
|
156
|
+
}, dealDescriptionStyle]
|
|
157
|
+
}), (progressBar || dealPrice) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CardFooter.default, {
|
|
158
|
+
justifyContent: "space-between",
|
|
159
|
+
style: {
|
|
160
|
+
flexDirection: isRTL ? "row-reverse" : "row"
|
|
161
|
+
},
|
|
162
|
+
children: [progressBar && /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar.default, {
|
|
163
|
+
progress: progressValue,
|
|
164
|
+
remainingColor: remainingProgressColor,
|
|
165
|
+
progressColor: progressColor,
|
|
166
|
+
height: progressHeight || 14,
|
|
167
|
+
width: progressWidth || width * 0.5,
|
|
168
|
+
textPosition: progressBarTextPosition,
|
|
169
|
+
text: progressBarText,
|
|
170
|
+
showText: progressBarText != null,
|
|
171
|
+
textAlign: isRTL && progressBarTextAlign == null ? "right" : progressBarTextAlign,
|
|
172
|
+
textStyle: {
|
|
173
|
+
fontSize: 10,
|
|
174
|
+
color: theme.text
|
|
175
|
+
},
|
|
176
|
+
isRTL: isRTL
|
|
177
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
178
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
179
|
+
style: [{
|
|
180
|
+
fontSize: 16,
|
|
181
|
+
color: theme.primary,
|
|
182
|
+
fontWeight: "bold",
|
|
183
|
+
textAlign: isRTL ? "left" : "right"
|
|
184
|
+
}, dealPriceStyle],
|
|
185
|
+
children: dealPrice
|
|
186
|
+
})
|
|
187
|
+
})]
|
|
188
|
+
})]
|
|
189
|
+
})
|
|
190
|
+
})
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
};
|
|
194
|
+
var _default = exports.default = DealCardWithBackgroundImage;
|
|
195
|
+
//# sourceMappingURL=DealCardWithBackgroundImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_Card","_interopRequireDefault","_CardHeader","_CardContent","_ThemeContext","_CardFooter","_ProgressBar","_LockOverlay","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","DealCardWithBackgroundImage","backgroundImage","onPress","label","labelContainerStyle","labelStyle","actionIconDefault","actionIconActive","onActionPress","innerCardStyle","dealDescription","dealDescriptionStyle","dealPrice","dealPriceStyle","dealProviderName","dealProviderNameStyle","progressBar","progressBarText","progressBarTextPosition","progressBarTextAlign","progressValue","progressHeight","progressWidth","remainingProgressColor","progressColor","innerCardVariant","style","width","isRTL","overlayVisible","overlayCover","theme","useTheme","isActive","setIsActive","useState","handleActionPress","labelContent","jsx","View","backgroundColor","surface","paddingVertical","paddingHorizontal","borderRadius","children","Text","color","onSurface","actionContent","TouchableOpacity","headerLeft","headerRight","mainCardBorderRadius","innerCardBorderRadius","getVariantStyle","position","bottom","marginHorizontal","marginVertical","paddingBottom","computedInnerCardStyle","finalInnerBorderRadius","overlayStyle","borderBottomLeftRadius","borderBottomRightRadius","overflow","jsxs","height","source","resizeMode","visible","containerStyle","contentVerticalAlign","left","right","alignItems","flex","justifyContent","zIndex","padding","variant","title","titleColor","text","titleStyle","fontSize","textAlign","subtitle","subtitleColor","helper","subtitleStyle","flexDirection","progress","remainingColor","textPosition","showText","textStyle","primary","fontWeight","_default","exports"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/Card/templates/DealCardWithBackgroundImage.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,KAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,WAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,YAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,YAAA,GAAAL,sBAAA,CAAAH,OAAA;AAIA,IAAAS,YAAA,GAAAN,sBAAA,CAAAH,OAAA;AAAwD,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAA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AS,CACN;YAAC,CACH,CAAC;UAAA,CACG,CACb;QAAA,CACG;MAAC,CACI;IAAC,CACV,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAAC,IAAAwF,QAAA,GAAAC,OAAA,CAAAvH,OAAA,GAEakB,2BAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Card Template Components
|
|
2
|
+
|
|
3
|
+
List of pre-defined template common based on app designs, the templates use the internal Card related components
|
|
4
|
+
|
|
5
|
+
## 1. Simple Trending Card
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
## SimpleTrendingCard Documentation
|
|
11
|
+
|
|
12
|
+
The `SimpleTrendingCard` is a customizable card component designed for displaying trending content with an optional icon. It leverages the base `Card` component and provides a sleek interface with background image support.
|
|
13
|
+
|
|
14
|
+
### Usage
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
import SimpleTrendingCard from "@/components/Card/templates/SimpleTrendingCard";
|
|
18
|
+
import { Image } from "react-native";
|
|
19
|
+
|
|
20
|
+
const MyComponent = () => {
|
|
21
|
+
return (
|
|
22
|
+
<SimpleTrendingCard
|
|
23
|
+
backgroundImage={require("@/assets/images/pb.jpg")}
|
|
24
|
+
style={{ borderRadius: 50 }}
|
|
25
|
+
icon={
|
|
26
|
+
<Image
|
|
27
|
+
source={require("@/assets/images/insta.webp")}
|
|
28
|
+
style={{ width: 36, height: 36 }} // Adjust size as needed
|
|
29
|
+
resizeMode="contain"
|
|
30
|
+
/>
|
|
31
|
+
}
|
|
32
|
+
onPress={()=>Alert.alert("Pressed")}
|
|
33
|
+
iconPosition="left"
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Props
|
|
40
|
+
|
|
41
|
+
| Prop | Type | Default | Description |
|
|
42
|
+
|------|------|---------|-------------|
|
|
43
|
+
| `backgroundImage` | `ImageRequireSource` | Required | The background image to display in the card |
|
|
44
|
+
| `icon` | `React.ReactNode` | `undefined` | Optional icon to display in the card header |
|
|
45
|
+
| `iconPosition` | `"left" \| "right"` | `"left"` | Position of the icon in the header |
|
|
46
|
+
| `shadowEffect` | `true \| false` | `true` | Shadow Effect displayed or not |
|
|
47
|
+
| `shadowOpacity` | `number` | `0.5` | Shadow Effect Opacity |
|
|
48
|
+
| `onPress` | `() => void` | `undefined` | Function to execute when the card is pressed |
|
|
49
|
+
| `style` | `StyleProp<ViewStyle>` | `undefined` | Additional styles to apply to the card |
|
|
50
|
+
|
|
51
|
+
### Features
|
|
52
|
+
|
|
53
|
+
- **Background Image**: The card displays a full-size background image with "cover" resize mode
|
|
54
|
+
- **Customizable Icon**: Optional icon that can be positioned on either the left or right side of the card header
|
|
55
|
+
- **Responsive Sizing**: Default dimensions of 250×300, which can be overridden with custom styles
|
|
56
|
+
- **Interactive**: Built-in touch handling through the `onPress` prop
|
|
57
|
+
|
|
58
|
+
### Related Components
|
|
59
|
+
|
|
60
|
+
- `Card`: The base component for all card layouts
|
|
61
|
+
- `CardHeader`: Handles the positioning of elements in the card header
|
|
62
|
+
|
|
63
|
+
# DealCardWithBackgroundImage
|
|
64
|
+
|
|
65
|
+

|
|
66
|
+

|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
# DealCardWithBackgroundImage Documentation
|
|
70
|
+
|
|
71
|
+
The `DealCardWithBackgroundImage` is a versatile card component designed for displaying deals, offers, or promotions with rich customization options. It features a background image, customizable labels, action icons, inner card content, and optional progress bar. As well as choosing between a floating or nested inner card.
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import DealCardWithBackgroundImage from "@/components/Card/templates/DealCardWithBackgroundImage";
|
|
77
|
+
import { Image } from "react-native";
|
|
78
|
+
import { HeartIcon, HeartFilledIcon } from "@/components/Icons";
|
|
79
|
+
|
|
80
|
+
const MyComponent = () => {
|
|
81
|
+
return (
|
|
82
|
+
<DealCardWithBackgroundImage
|
|
83
|
+
width={300}
|
|
84
|
+
backgroundImage={require("@/assets/images/pb.jpg")}
|
|
85
|
+
label="Discount"
|
|
86
|
+
actionIconDefault={
|
|
87
|
+
<Ionicons name="heart-outline" size={20} color={theme.primary} />
|
|
88
|
+
}
|
|
89
|
+
actionIconActive={
|
|
90
|
+
<Ionicons name="heart" size={20} color={theme.secondary} />
|
|
91
|
+
}
|
|
92
|
+
innerCardVariant="floating"
|
|
93
|
+
onActionPress={(active) => console.log(active)}
|
|
94
|
+
dealProviderName="Pull&Bear"
|
|
95
|
+
dealDescription="25% discount on all items"
|
|
96
|
+
progressBar={true}
|
|
97
|
+
progressBarText="500 points to Redeem!"
|
|
98
|
+
progressBarTextPosition="below"
|
|
99
|
+
remainingProgressColor="rgba(0, 0, 0, 0.4)"
|
|
100
|
+
dealPrice="1,000 KP"
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Props
|
|
107
|
+
|
|
108
|
+
| Prop | Type | Default | Description |
|
|
109
|
+
|------|------|---------|-------------|
|
|
110
|
+
| `backgroundImage` | `ImageRequireSource` | Required | The background image to display in the card |
|
|
111
|
+
| `label` | `string` | `undefined` | Optional label text to display in the upper left corner |
|
|
112
|
+
| `labelStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the label text |
|
|
113
|
+
| `labelContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Custom styles for the label container |
|
|
114
|
+
| `actionIconDefault` | `React.ReactNode` | `undefined` | Icon to display when action is inactive (e.g., unfavorited) |
|
|
115
|
+
| `actionIconActive` | `React.ReactNode` | `undefined` | Icon to display when action is active (e.g., favorited) |
|
|
116
|
+
| `onActionPress` | `(active: boolean) => void` | `undefined` | Function to execute when the action icon is pressed |
|
|
117
|
+
| `innerCardStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the inner card |
|
|
118
|
+
| `innerCardVariant` | `"floating" \| "nested"` | `"nested"` | The style variant for the inner card |
|
|
119
|
+
| `dealDescription` | `string` | `undefined` | Description text for the deal |
|
|
120
|
+
| `dealDescriptionStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the deal description |
|
|
121
|
+
| `dealProviderName` | `string` | `undefined` | Name of the deal provider |
|
|
122
|
+
| `dealProviderNameStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the provider name |
|
|
123
|
+
| `dealPrice` | `string` | `undefined` | Price text for the deal |
|
|
124
|
+
| `dealPriceStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the price text |
|
|
125
|
+
| `progressBar` | `boolean` | `undefined` | Whether to show a progress bar |
|
|
126
|
+
| `progressBarText` | `string` | `undefined` | Text to display with the progress bar |
|
|
127
|
+
| `progressBarTextPosition` | `ProgressBarTextPosition` | `undefined` | Position of the progress bar text |
|
|
128
|
+
| `progressBarTextAlign` | `ProgressBarTextAlign` | `undefined` | Alignment of the progress bar text |
|
|
129
|
+
| `progressColor` | `string` | `undefined` | Color of the progress indicator |
|
|
130
|
+
| `progressWidth` | `number` | `undefined` | Width of the progress bar |
|
|
131
|
+
| `progressHeight` | `number` | `undefined` | Height of the progress bar |
|
|
132
|
+
| `remainingProgressColor` | `string` | `undefined` | Color of the unfilled portion of the progress bar |
|
|
133
|
+
| `progressValue` | `number` | `undefined` | Value between 0 and 1 representing progress |
|
|
134
|
+
| `onPress` | `() => void` | `undefined` | Function to execute when the card is pressed |
|
|
135
|
+
| `style` | `StyleProp<ViewStyle>` | `undefined` | Additional styles to apply to the card |
|
|
136
|
+
| `width` | `number` | `300` | Width of the card in pixels |
|
|
137
|
+
| `isRTL` | `boolean` | `false` | Whether to render the component in right-to-left mode for RTL languages |
|
|
138
|
+
| `overlayVisible` | `boolean` | `false` | Whether to show a lock overlay on the card |
|
|
139
|
+
| `overlayCover` | `"all" \| "background"` | `"background"` | Controls which part of the card the overlay covers |
|
|
140
|
+
|
|
141
|
+
## Inner Card Variants
|
|
142
|
+
|
|
143
|
+
- **Nested**: The inner card sits within the main card's boundaries
|
|
144
|
+
- **Floating**: The inner card extends beyond the bottom edge of the main card, creating a floating effect
|
|
145
|
+
|
|
146
|
+
## Related Components
|
|
147
|
+
|
|
148
|
+
- `Card`: The base component for all card layouts
|
|
149
|
+
- `CardHeader`: Handles the positioning of elements in the card header
|
|
150
|
+
- `CardContent`: Contains the main content of the card
|
|
151
|
+
- `CardFooter`: Displays the progress bar and price at the bottom of the inner card
|
|
152
|
+
- `ProgressBar`: Shows completion or availability status visually
|
|
153
|
+
- `LockOverlay`: Displays a lock overlay when the `overlayVisible` prop is true
|
|
154
|
+
|
|
155
|
+
# DealCard
|
|
156
|
+
|
|
157
|
+

|
|
158
|
+

|
|
159
|
+
|
|
160
|
+
# DealCard Documentation
|
|
161
|
+
|
|
162
|
+
The `DealCard` is a versatile card component designed for displaying deals or offers in either horizontal or vertical orientation. It features an image, customizable labels, descriptive text, pricing information, and an optional progress bar.
|
|
163
|
+
|
|
164
|
+
## Usage
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import DealCard from "@/components/Card/templates/DealCard";
|
|
168
|
+
import { Alert } from "react-native";
|
|
169
|
+
|
|
170
|
+
const MyComponent = () => {
|
|
171
|
+
return (
|
|
172
|
+
<DealCard
|
|
173
|
+
imageSource={require("@/assets/images/pb.jpg")}
|
|
174
|
+
// width={275}
|
|
175
|
+
variant="horizontal"
|
|
176
|
+
label="Discount"
|
|
177
|
+
// labelStyle={{ color: "#000" }}
|
|
178
|
+
dealProviderName="Pull&Bear"
|
|
179
|
+
dealDescription="25% discount on all items"
|
|
180
|
+
// dealDescriptionStyle={{ color: "black" }}
|
|
181
|
+
progressBar={true}
|
|
182
|
+
progressBarText="500 points to Redeem!"
|
|
183
|
+
progressBarTextPosition="below"
|
|
184
|
+
// progressColor="black"
|
|
185
|
+
remainingProgressColor="rgba(255, 255, 255, 0.4)"
|
|
186
|
+
dealPrice="1,000 KP"
|
|
187
|
+
/>
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Props
|
|
193
|
+
|
|
194
|
+
| Prop | Type | Default | Description |
|
|
195
|
+
|------|------|---------|-------------|
|
|
196
|
+
| `imageSource` | `ImageRequireSource` | Required | The image to display in the card |
|
|
197
|
+
| `variant` | `"vertical" \| "horizontal"` | `"horizontal"` | Layout orientation of the card |
|
|
198
|
+
| `label` | `string` | `undefined` | Optional label text to display |
|
|
199
|
+
| `labelStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the label text |
|
|
200
|
+
| `labelContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Custom styles for the label container |
|
|
201
|
+
| `dealDescription` | `string` | `undefined` | Description text for the deal |
|
|
202
|
+
| `dealDescriptionStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the deal description |
|
|
203
|
+
| `dealProviderName` | `string` | `undefined` | Name of the deal provider |
|
|
204
|
+
| `dealProviderNameStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the provider name |
|
|
205
|
+
| `dealPrice` | `string` | `undefined` | Price text for the deal |
|
|
206
|
+
| `dealPriceStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the price text |
|
|
207
|
+
| `progressBar` | `boolean` | `undefined` | Whether to show a progress bar |
|
|
208
|
+
| `progressBarText` | `string` | `undefined` | Text to display with the progress bar |
|
|
209
|
+
| `progressBarTextPosition` | `ProgressBarTextPosition` | `undefined` | Position of the progress bar text |
|
|
210
|
+
| `progressBarTextAlign` | `ProgressBarTextAlign` | `undefined` | Alignment of the progress bar text |
|
|
211
|
+
| `progressColor` | `string` | `undefined` | Color of the progress indicator |
|
|
212
|
+
| `progressWidth` | `number` | `undefined` | Width of the progress bar |
|
|
213
|
+
| `progressHeight` | `number` | `undefined` | Height of the progress bar |
|
|
214
|
+
| `remainingProgressColor` | `string` | `undefined` | Color of the unfilled portion of the progress bar |
|
|
215
|
+
| `progressValue` | `number` | `undefined` | Value between 0 and 1 representing progress |
|
|
216
|
+
| `onPress` | `() => void` | `undefined` | Function to execute when the card is pressed |
|
|
217
|
+
| `style` | `StyleProp<ViewStyle>` | `undefined` | Additional styles to apply to the card |
|
|
218
|
+
| `width` | `number \| string` | `undefined` | Width of the card in pixels or as a percentage |
|
|
219
|
+
| `isRTL` | `boolean` | `false` | Whether to render the component in right-to-left mode for RTL languages |
|
|
220
|
+
| `overlayVisible` | `boolean` | `false` | Whether to show a lock overlay on top of the image |
|
|
221
|
+
|
|
222
|
+
## Layout Variants
|
|
223
|
+
|
|
224
|
+
- **Horizontal**: Image appears on the left side with content to the right
|
|
225
|
+
- **Vertical**: Image appears on top with content below
|
|
226
|
+
|
|
227
|
+
## Related Components
|
|
228
|
+
|
|
229
|
+
- `Card`: The base component used for the overall container
|
|
230
|
+
- `CardHeader`: Displays the provider name and deal description
|
|
231
|
+
- `CardFooter`: Contains the label and progress bar
|
|
232
|
+
- `ProgressBar`: Shows completion or availability status visually
|
|
233
|
+
- `LockOverlay`: Displays a lock overlay when the `overlayVisible` prop is true
|