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,133 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Image,
|
|
5
|
+
Text,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
TextStyle,
|
|
9
|
+
ImageStyle,
|
|
10
|
+
TouchableOpacity,
|
|
11
|
+
ImageRequireSource,
|
|
12
|
+
} from "react-native";
|
|
13
|
+
import { Card, CardContent } from "../Card";
|
|
14
|
+
import { useTheme, ThemeType } from "../../theme"; // Import ThemeType
|
|
15
|
+
|
|
16
|
+
interface BannerWithDetailsProps {
|
|
17
|
+
backgroundImage: ImageRequireSource;
|
|
18
|
+
logoImage: ImageRequireSource;
|
|
19
|
+
detailText: string;
|
|
20
|
+
onPress?: () => void;
|
|
21
|
+
containerStyle?: ViewStyle;
|
|
22
|
+
imageStyle?: ViewStyle; // Note: This seems to be applied to backgroundImage style
|
|
23
|
+
logoContainerStyle?: ViewStyle;
|
|
24
|
+
logoStyle?: ImageStyle; // Note: This seems to be applied to logo backgroundImage imageStyle
|
|
25
|
+
textContainerStyle?: ViewStyle;
|
|
26
|
+
textStyle?: TextStyle;
|
|
27
|
+
customLogo?: React.ReactNode; // Note: customLogo prop is declared but not used
|
|
28
|
+
customDetailContent?: React.ReactNode;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const BannerWithDetails: React.FC<BannerWithDetailsProps> = ({
|
|
32
|
+
backgroundImage,
|
|
33
|
+
logoImage,
|
|
34
|
+
detailText,
|
|
35
|
+
onPress,
|
|
36
|
+
containerStyle,
|
|
37
|
+
imageStyle,
|
|
38
|
+
logoContainerStyle,
|
|
39
|
+
logoStyle,
|
|
40
|
+
textContainerStyle,
|
|
41
|
+
textStyle,
|
|
42
|
+
customDetailContent,
|
|
43
|
+
}) => {
|
|
44
|
+
const theme = useTheme();
|
|
45
|
+
const styles = createStyles(theme); // Create styles using theme
|
|
46
|
+
|
|
47
|
+
const content = (
|
|
48
|
+
<View style={{ width: "100%", paddingBottom: 50 }}>
|
|
49
|
+
<Card
|
|
50
|
+
style={[styles.container, containerStyle]}
|
|
51
|
+
backgroundImage={{
|
|
52
|
+
source: backgroundImage,
|
|
53
|
+
style: [styles.backgroundImage, imageStyle],
|
|
54
|
+
}}
|
|
55
|
+
borderRadius={15}
|
|
56
|
+
>
|
|
57
|
+
<CardContent style={styles.cardContent}>
|
|
58
|
+
<Card
|
|
59
|
+
style={[styles.logoContainer, logoContainerStyle]}
|
|
60
|
+
backgroundImage={{
|
|
61
|
+
source: logoImage,
|
|
62
|
+
style: [styles.backgroundImage],
|
|
63
|
+
imageStyle: logoStyle,
|
|
64
|
+
}}
|
|
65
|
+
/>
|
|
66
|
+
<Card
|
|
67
|
+
variant="elevated"
|
|
68
|
+
style={[styles.textContainer, textContainerStyle]}
|
|
69
|
+
>
|
|
70
|
+
{customDetailContent || (
|
|
71
|
+
<Text style={[styles.detailText, textStyle]}>
|
|
72
|
+
{detailText}
|
|
73
|
+
</Text>
|
|
74
|
+
)}
|
|
75
|
+
</Card>
|
|
76
|
+
</CardContent>
|
|
77
|
+
</Card>
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (onPress) {
|
|
82
|
+
return <TouchableOpacity onPress={onPress}>{content}</TouchableOpacity>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return content;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Function to create themed styles
|
|
89
|
+
const createStyles = (theme: ThemeType) =>
|
|
90
|
+
StyleSheet.create({
|
|
91
|
+
container: {
|
|
92
|
+
position: "relative",
|
|
93
|
+
borderRadius: 12,
|
|
94
|
+
padding: 0,
|
|
95
|
+
height: 300,
|
|
96
|
+
},
|
|
97
|
+
backgroundImage: {
|
|
98
|
+
width: "100%",
|
|
99
|
+
height: "100%",
|
|
100
|
+
resizeMode: "cover",
|
|
101
|
+
},
|
|
102
|
+
cardContent: {
|
|
103
|
+
position: "absolute",
|
|
104
|
+
bottom: 0,
|
|
105
|
+
left: 0,
|
|
106
|
+
right: 0,
|
|
107
|
+
padding: 0,
|
|
108
|
+
alignItems: "center",
|
|
109
|
+
transform: [{ translateY: "30%" }],
|
|
110
|
+
},
|
|
111
|
+
logoContainer: {
|
|
112
|
+
marginVertical: 0,
|
|
113
|
+
bottom: -15,
|
|
114
|
+
width: 90,
|
|
115
|
+
height: 80,
|
|
116
|
+
zIndex: 50,
|
|
117
|
+
// Background is image
|
|
118
|
+
},
|
|
119
|
+
textContainer: {
|
|
120
|
+
marginVertical: 0,
|
|
121
|
+
padding: 20,
|
|
122
|
+
height: 80,
|
|
123
|
+
width: "90%",
|
|
124
|
+
justifyContent: "center",
|
|
125
|
+
},
|
|
126
|
+
detailText: {
|
|
127
|
+
textAlign: "center",
|
|
128
|
+
fontSize: 14,
|
|
129
|
+
color: theme.onSurface, // Use standard text color
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export default BannerWithDetails;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Banner
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
## Banner Documentation
|
|
6
|
+
|
|
7
|
+
The `Banner` is a customizable banner component with a background image and an optional action button. It supports different vertical alignments, custom styling, and an optional icon that can be positioned on either side of the button text.
|
|
8
|
+
|
|
9
|
+
### Usage
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import Banner from "@/components/Card/templates/Banner";
|
|
13
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
14
|
+
|
|
15
|
+
const MyComponent = () => {
|
|
16
|
+
return (
|
|
17
|
+
<Banner
|
|
18
|
+
backgroundImage={require("@/assets/images/banner-bg.jpg")}
|
|
19
|
+
buttonText="Redeem Now"
|
|
20
|
+
onButtonPress={() => Alert.alert("Button pressed")}
|
|
21
|
+
onBannerPress={() => Alert.alert("Banner pressed")}
|
|
22
|
+
height={200}
|
|
23
|
+
contentAlignment="bottom"
|
|
24
|
+
icon={<Ionicons name="gift-outline" size={20} color="#FFFFFF" />}
|
|
25
|
+
iconPosition="left"
|
|
26
|
+
/>
|
|
27
|
+
);
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Props
|
|
32
|
+
|
|
33
|
+
| Prop | Type | Default | Description |
|
|
34
|
+
|------|------|---------|-------------|
|
|
35
|
+
| `backgroundImage` | `ImageRequireSource` | Required | The background image to display in the banner |
|
|
36
|
+
| `buttonText` | `string` | `"Redeem"` | Text to display on the action button |
|
|
37
|
+
| `onButtonPress` | `() => void` | `undefined` | Function to execute when the button is pressed |
|
|
38
|
+
| `onBannerPress` | `() => void` | `undefined` | Function to execute when the banner (outside the button) is pressed |
|
|
39
|
+
| `containerStyle` | `ViewStyle` | `undefined` | Additional styles to apply to the banner container |
|
|
40
|
+
| `backgroundImageStyle` | `ViewStyle` | `undefined` | Additional styles to apply to the background image |
|
|
41
|
+
| `contentContainerStyle` | `ViewStyle` | `undefined` | Additional styles to apply to the content container |
|
|
42
|
+
| `buttonStyle` | `ViewStyle` | `undefined` | Additional styles to apply to the button |
|
|
43
|
+
| `buttonTextStyle` | `TextStyle` | `undefined` | Additional styles to apply to the button text |
|
|
44
|
+
| `height` | `DimensionValue` | `300` | Height of the banner |
|
|
45
|
+
| `customButton` | `React.ReactNode` | `undefined` | Custom button component to replace the default button |
|
|
46
|
+
| `contentAlignment` | `"top" \| "center" \| "bottom"` | `"center"` | Vertical alignment of the content within the banner |
|
|
47
|
+
| `icon` | `React.ReactNode` | `undefined` | Optional icon to display alongside the button text |
|
|
48
|
+
| `iconPosition` | `"left" \| "right"` | `"left"` | Position of the icon relative to the button text |
|
|
49
|
+
| `iconStyle` | `ViewStyle` | `undefined` | Additional styles to apply to the icon container |
|
|
50
|
+
| `iconSpacing` | `number` | `8` | Spacing between the icon and button text |
|
|
51
|
+
|
|
52
|
+
### Related Components
|
|
53
|
+
|
|
54
|
+
- `Card`: The base component used for the overall container
|
|
55
|
+
- `CardFooter`: Contains the button and manages content positioning
|
|
56
|
+
|
|
57
|
+
# BannerWithDetails
|
|
58
|
+
|
|
59
|
+

|
|
60
|
+
|
|
61
|
+
## BannerWithDetails Documentation
|
|
62
|
+
|
|
63
|
+
The `BannerWithDetails` is a visually appealing banner component that combines a background image with a prominently featured logo and a card containing detail text. It's designed for showcasing brand information or promotional content with a clean, elevated appearance.
|
|
64
|
+
|
|
65
|
+
### Usage
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import BannerWithDetails from "@/components/Card/templates/BannerWithDetails";
|
|
69
|
+
|
|
70
|
+
const MyComponent = () => {
|
|
71
|
+
return (
|
|
72
|
+
<BannerWithDetails
|
|
73
|
+
backgroundImage={require("@/assets/images/banner-bg.jpg")}
|
|
74
|
+
logoImage={require("@/assets/images/company-logo.png")}
|
|
75
|
+
detailText="Limited time offer: 25% off on all premium items!"
|
|
76
|
+
onPress={() => Alert.alert("Banner pressed")}
|
|
77
|
+
/>
|
|
78
|
+
);
|
|
79
|
+
};
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Props
|
|
83
|
+
|
|
84
|
+
| Prop | Type | Default | Description |
|
|
85
|
+
|------|------|---------|-------------|
|
|
86
|
+
| `backgroundImage` | `ImageRequireSource` | Required | The background image for the banner |
|
|
87
|
+
| `logoImage` | `ImageRequireSource` | Required | The logo image to display in the centered card |
|
|
88
|
+
| `detailText` | `string` | Required | Text description to display in the details card |
|
|
89
|
+
| `onPress` | `() => void` | `undefined` | Function to execute when the banner is pressed |
|
|
90
|
+
| `containerStyle` | `ViewStyle` | `undefined` | Additional styles for the main container |
|
|
91
|
+
| `imageStyle` | `ViewStyle` | `undefined` | Additional styles for the background image |
|
|
92
|
+
| `logoContainerStyle` | `ViewStyle` | `undefined` | Additional styles for the logo container |
|
|
93
|
+
| `logoStyle` | `ImageStyle` | `undefined` | Additional styles for the logo image |
|
|
94
|
+
| `textContainerStyle` | `ViewStyle` | `undefined` | Additional styles for the text container |
|
|
95
|
+
| `textStyle` | `TextStyle` | `undefined` | Additional styles for the detail text |
|
|
96
|
+
| `customDetailContent` | `React.ReactNode` | `undefined` | Custom content to replace the default detail text |
|
|
97
|
+
|
|
98
|
+
### Related Components
|
|
99
|
+
|
|
100
|
+
- `Card`: Used for the main container, logo container, and text container
|
|
101
|
+
- `CardContent`: Manages the positioning of the logo and text containers
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { useTheme, ThemeType } from "../../theme";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import {
|
|
4
|
+
View,
|
|
5
|
+
Image,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
StyleProp,
|
|
9
|
+
ViewStyle,
|
|
10
|
+
ImageSourcePropType,
|
|
11
|
+
ImageStyle,
|
|
12
|
+
} from 'react-native';
|
|
13
|
+
|
|
14
|
+
interface BrandIconProps {
|
|
15
|
+
brand: {
|
|
16
|
+
id: string;
|
|
17
|
+
logo: ImageSourcePropType;
|
|
18
|
+
name: string;
|
|
19
|
+
};
|
|
20
|
+
size?: number;
|
|
21
|
+
selected?: boolean;
|
|
22
|
+
onPress?: () => void;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
25
|
+
imageStyle?: StyleProp<ImageStyle>;
|
|
26
|
+
selectionIndicatorStyle?: StyleProp<ViewStyle>;
|
|
27
|
+
selectionIndicatorIcon?: React.ReactNode
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const BrandIcon: React.FC<BrandIconProps> = ({
|
|
31
|
+
brand,
|
|
32
|
+
size = 66,
|
|
33
|
+
selected = false,
|
|
34
|
+
onPress,
|
|
35
|
+
disabled = false,
|
|
36
|
+
containerStyle,
|
|
37
|
+
imageStyle,
|
|
38
|
+
selectionIndicatorStyle,
|
|
39
|
+
selectionIndicatorIcon
|
|
40
|
+
}) => {
|
|
41
|
+
const theme = useTheme();
|
|
42
|
+
const styles = createStyles(theme); // Create styles using theme
|
|
43
|
+
|
|
44
|
+
const iconSize = {
|
|
45
|
+
width: size,
|
|
46
|
+
height: size,
|
|
47
|
+
borderRadius: size / 2,
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const imageSize = {
|
|
51
|
+
width: size,
|
|
52
|
+
height: size,
|
|
53
|
+
borderRadius: size / 2,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const indicatorSize = {
|
|
57
|
+
width: size * 0.3,
|
|
58
|
+
height: size * 0.3,
|
|
59
|
+
borderRadius: (size * 0.3) / 2,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
const indicatorPosition = {
|
|
63
|
+
top: -5,
|
|
64
|
+
right: 0,
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<TouchableOpacity
|
|
69
|
+
style={[
|
|
70
|
+
styles.container,
|
|
71
|
+
iconSize,
|
|
72
|
+
selected && styles.selectedContainer,
|
|
73
|
+
containerStyle,
|
|
74
|
+
]}
|
|
75
|
+
onPress={onPress}
|
|
76
|
+
disabled={disabled || !onPress}
|
|
77
|
+
activeOpacity={0.8}
|
|
78
|
+
>
|
|
79
|
+
<Image
|
|
80
|
+
source={brand.logo}
|
|
81
|
+
style={[styles.logo, imageSize, imageStyle]}
|
|
82
|
+
resizeMode="contain"
|
|
83
|
+
/>
|
|
84
|
+
|
|
85
|
+
{selected && (
|
|
86
|
+
<View
|
|
87
|
+
style={[
|
|
88
|
+
styles.selectionIndicator,
|
|
89
|
+
indicatorSize,
|
|
90
|
+
indicatorPosition,
|
|
91
|
+
selectionIndicatorStyle,
|
|
92
|
+
]}
|
|
93
|
+
>
|
|
94
|
+
{selectionIndicatorIcon}
|
|
95
|
+
</View>
|
|
96
|
+
)}
|
|
97
|
+
</TouchableOpacity>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// Function to create themed styles
|
|
102
|
+
const createStyles = (theme: ThemeType) => StyleSheet.create({
|
|
103
|
+
container: {
|
|
104
|
+
backgroundColor: theme.surface, // Use surface for background
|
|
105
|
+
justifyContent: 'center',
|
|
106
|
+
alignItems: 'center',
|
|
107
|
+
borderWidth: 1,
|
|
108
|
+
borderColor: theme.border, // Use border color
|
|
109
|
+
shadowColor: '#000000', // Keep shadow black for now
|
|
110
|
+
shadowOffset: { width: 0, height: 2 },
|
|
111
|
+
shadowOpacity: 0.1,
|
|
112
|
+
shadowRadius: 2,
|
|
113
|
+
elevation: 2,
|
|
114
|
+
},
|
|
115
|
+
selectedContainer: {
|
|
116
|
+
borderColor: theme.primary, // Use primary for selected border
|
|
117
|
+
borderWidth: 2, // Keep border width for selected state
|
|
118
|
+
},
|
|
119
|
+
logo: {},
|
|
120
|
+
selectionIndicator: {
|
|
121
|
+
position: 'absolute',
|
|
122
|
+
backgroundColor: theme.primary, // Use primary for indicator background
|
|
123
|
+
justifyContent: 'center',
|
|
124
|
+
alignItems: 'center',
|
|
125
|
+
zIndex: 2,
|
|
126
|
+
},
|
|
127
|
+
checkmark: { // Style is unused in current code, but if used:
|
|
128
|
+
width: '60%',
|
|
129
|
+
height: '60%',
|
|
130
|
+
// tintColor: theme.onPrimary, // Use onPrimary if checkmark is an icon/image
|
|
131
|
+
},
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
export default BrandIcon;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
TouchableOpacity,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
Platform,
|
|
7
|
+
ImageBackground,
|
|
8
|
+
} from "react-native";
|
|
9
|
+
import { CardProps } from "./types";
|
|
10
|
+
import { useTheme } from "../../theme/ThemeContext";
|
|
11
|
+
|
|
12
|
+
const Card: React.FC<CardProps> = ({
|
|
13
|
+
children,
|
|
14
|
+
style,
|
|
15
|
+
onPress,
|
|
16
|
+
disabled = false,
|
|
17
|
+
elevation = 1,
|
|
18
|
+
testID,
|
|
19
|
+
variant,
|
|
20
|
+
backgroundColor,
|
|
21
|
+
borderColor,
|
|
22
|
+
borderRadius = 8,
|
|
23
|
+
backgroundImage,
|
|
24
|
+
// margin,
|
|
25
|
+
// padding,
|
|
26
|
+
}) => {
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
|
|
29
|
+
const getCardStyle = () => {
|
|
30
|
+
const baseStyle: any = {
|
|
31
|
+
backgroundColor: backgroundColor || theme.background,
|
|
32
|
+
borderRadius,
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
switch (variant) {
|
|
36
|
+
case "outlined":
|
|
37
|
+
return {
|
|
38
|
+
...baseStyle,
|
|
39
|
+
borderWidth: 1,
|
|
40
|
+
borderColor: borderColor || theme.border,
|
|
41
|
+
};
|
|
42
|
+
case "filled":
|
|
43
|
+
return {
|
|
44
|
+
...baseStyle,
|
|
45
|
+
backgroundColor: backgroundColor || theme.primary,
|
|
46
|
+
};
|
|
47
|
+
case "elevated":
|
|
48
|
+
return {
|
|
49
|
+
...baseStyle,
|
|
50
|
+
borderColor: borderColor || "transparent",
|
|
51
|
+
...Platform.select({
|
|
52
|
+
ios: {
|
|
53
|
+
shadowColor: "#000",
|
|
54
|
+
shadowOffset: { width: 0, height: elevation },
|
|
55
|
+
shadowOpacity: 0.1,
|
|
56
|
+
shadowRadius: elevation,
|
|
57
|
+
},
|
|
58
|
+
android: {
|
|
59
|
+
elevation,
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const cardStyle = [
|
|
67
|
+
styles.card,
|
|
68
|
+
getCardStyle(),
|
|
69
|
+
disabled && { opacity: 0.6 },
|
|
70
|
+
style,
|
|
71
|
+
backgroundImage && { backgroundColor: "transparent" },
|
|
72
|
+
];
|
|
73
|
+
|
|
74
|
+
const renderCardContent = () =>
|
|
75
|
+
backgroundImage ? (
|
|
76
|
+
<ImageBackground
|
|
77
|
+
source={backgroundImage.source}
|
|
78
|
+
style={[styles.backgroundImage, backgroundImage.style]}
|
|
79
|
+
imageStyle={[{ borderRadius }, backgroundImage.imageStyle]}
|
|
80
|
+
resizeMode={backgroundImage.resizeMode || "cover"}
|
|
81
|
+
blurRadius={backgroundImage.blurRadius}
|
|
82
|
+
>
|
|
83
|
+
<View
|
|
84
|
+
style={[
|
|
85
|
+
styles.imageContentContainer,
|
|
86
|
+
{
|
|
87
|
+
opacity:
|
|
88
|
+
backgroundImage.opacity !== undefined
|
|
89
|
+
? backgroundImage.opacity
|
|
90
|
+
: 1,
|
|
91
|
+
},
|
|
92
|
+
]}
|
|
93
|
+
>
|
|
94
|
+
{children}
|
|
95
|
+
</View>
|
|
96
|
+
</ImageBackground>
|
|
97
|
+
) : (
|
|
98
|
+
children
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
if (onPress) {
|
|
102
|
+
return (
|
|
103
|
+
<TouchableOpacity
|
|
104
|
+
style={cardStyle}
|
|
105
|
+
onPress={onPress}
|
|
106
|
+
disabled={disabled}
|
|
107
|
+
testID={testID}
|
|
108
|
+
activeOpacity={0.7}
|
|
109
|
+
accessibilityRole="button"
|
|
110
|
+
accessibilityLabel={"Card"}
|
|
111
|
+
>
|
|
112
|
+
{renderCardContent()}
|
|
113
|
+
</TouchableOpacity>
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<View style={cardStyle} testID={testID}>
|
|
119
|
+
{renderCardContent()}
|
|
120
|
+
</View>
|
|
121
|
+
);
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const styles = StyleSheet.create({
|
|
125
|
+
card: {
|
|
126
|
+
borderRadius: 8,
|
|
127
|
+
// overflow: "hidden",
|
|
128
|
+
marginVertical: 8,
|
|
129
|
+
marginHorizontal: 16,
|
|
130
|
+
flexDirection: "column",
|
|
131
|
+
display: "flex",
|
|
132
|
+
},
|
|
133
|
+
backgroundImage: {
|
|
134
|
+
width: "100%",
|
|
135
|
+
height: "100%",
|
|
136
|
+
// overflow: "hidden",
|
|
137
|
+
},
|
|
138
|
+
imageContentContainer: {
|
|
139
|
+
flex: 1,
|
|
140
|
+
backgroundColor: "transparent",
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
export default Card;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, StyleSheet } from "react-native";
|
|
3
|
+
import { CardContentProps } from "./types";
|
|
4
|
+
|
|
5
|
+
const CardContent: React.FC<CardContentProps> = ({
|
|
6
|
+
children,
|
|
7
|
+
style,
|
|
8
|
+
padding = 16,
|
|
9
|
+
}) => {
|
|
10
|
+
const getContentStyle = () => {
|
|
11
|
+
if (typeof padding === "number") {
|
|
12
|
+
return { padding };
|
|
13
|
+
} else if (padding) {
|
|
14
|
+
return {
|
|
15
|
+
paddingHorizontal: padding.horizontal,
|
|
16
|
+
paddingVertical: padding.vertical,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
return { padding: 16 };
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<View style={[styles.content, getContentStyle(), style]}>{children}</View>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const styles = StyleSheet.create({
|
|
28
|
+
content: {
|
|
29
|
+
padding: 16,
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default CardContent;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { View, StyleSheet } from "react-native";
|
|
3
|
+
import { CardFooterProps } from "./types";
|
|
4
|
+
|
|
5
|
+
const CardFooter: React.FC<CardFooterProps> = ({
|
|
6
|
+
children,
|
|
7
|
+
style,
|
|
8
|
+
inset = false,
|
|
9
|
+
justifyContent = "flex-end",
|
|
10
|
+
}) => (
|
|
11
|
+
<View
|
|
12
|
+
style={[
|
|
13
|
+
styles.footer,
|
|
14
|
+
{ justifyContent },
|
|
15
|
+
inset && { marginHorizontal: 16 },
|
|
16
|
+
style,
|
|
17
|
+
]}
|
|
18
|
+
>
|
|
19
|
+
{children}
|
|
20
|
+
</View>
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
const styles = StyleSheet.create({
|
|
24
|
+
footer: {
|
|
25
|
+
padding: 16,
|
|
26
|
+
// paddingBottom: 0,
|
|
27
|
+
flexDirection: "row",
|
|
28
|
+
justifyContent: "flex-end",
|
|
29
|
+
// alignItems: "center",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export default CardFooter;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
3
|
+
import { CardHeaderProps } from './types';
|
|
4
|
+
import { useTheme } from '../../theme/ThemeContext';
|
|
5
|
+
|
|
6
|
+
const CardHeader: React.FC<CardHeaderProps> = ({
|
|
7
|
+
title,
|
|
8
|
+
subtitle,
|
|
9
|
+
left,
|
|
10
|
+
right,
|
|
11
|
+
style,
|
|
12
|
+
titleStyle,
|
|
13
|
+
subtitleStyle,
|
|
14
|
+
titleColor,
|
|
15
|
+
subtitleColor,
|
|
16
|
+
}) => {
|
|
17
|
+
const theme = useTheme();
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<View style={[styles.header, style]}>
|
|
21
|
+
{left && <View style={styles.left}>{left}</View>}
|
|
22
|
+
|
|
23
|
+
<View style={[styles.headerTextContainer, !left ? { paddingLeft: 0 } : {}]}>
|
|
24
|
+
{title && typeof title === 'string' ? (
|
|
25
|
+
<Text style={[
|
|
26
|
+
styles.title,
|
|
27
|
+
{ color: titleColor || theme.text },
|
|
28
|
+
titleStyle
|
|
29
|
+
]}>
|
|
30
|
+
{title}
|
|
31
|
+
</Text>
|
|
32
|
+
) : (
|
|
33
|
+
title
|
|
34
|
+
)}
|
|
35
|
+
{subtitle && typeof subtitle === 'string' ? (
|
|
36
|
+
<Text style={[
|
|
37
|
+
styles.subtitle,
|
|
38
|
+
{ color: subtitleColor || theme.helper },
|
|
39
|
+
subtitleStyle
|
|
40
|
+
]}>
|
|
41
|
+
{subtitle}
|
|
42
|
+
</Text>
|
|
43
|
+
) : (
|
|
44
|
+
subtitle
|
|
45
|
+
)}
|
|
46
|
+
</View>
|
|
47
|
+
|
|
48
|
+
{right && <View style={styles.right}>{right}</View>}
|
|
49
|
+
</View>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const styles = StyleSheet.create({
|
|
54
|
+
header: {
|
|
55
|
+
flexDirection: 'row',
|
|
56
|
+
padding: 16,
|
|
57
|
+
paddingBottom: 0,
|
|
58
|
+
// backgroundColor:"red",
|
|
59
|
+
// alignItems: 'center'
|
|
60
|
+
},
|
|
61
|
+
left: {
|
|
62
|
+
marginRight: 16,
|
|
63
|
+
},
|
|
64
|
+
headerTextContainer: {
|
|
65
|
+
flex: 1,
|
|
66
|
+
},
|
|
67
|
+
right: {
|
|
68
|
+
marginLeft: 16,
|
|
69
|
+
},
|
|
70
|
+
title: {
|
|
71
|
+
fontSize: 18,
|
|
72
|
+
fontWeight: '600',
|
|
73
|
+
},
|
|
74
|
+
subtitle: {
|
|
75
|
+
fontSize: 14,
|
|
76
|
+
marginTop: 4,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
export default CardHeader;
|