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,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "../../theme/index.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View, StyleSheet, Text } from "react-native";
|
|
6
|
+
|
|
7
|
+
// Badge props
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
// Simple Badge component
|
|
10
|
+
export const Badge = ({
|
|
11
|
+
icon,
|
|
12
|
+
isActive = false,
|
|
13
|
+
size,
|
|
14
|
+
style,
|
|
15
|
+
activeStyle,
|
|
16
|
+
inactiveStyle,
|
|
17
|
+
activeIcon,
|
|
18
|
+
label,
|
|
19
|
+
labelStyle
|
|
20
|
+
}) => {
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const styles = StyleSheet.create({
|
|
23
|
+
badge: {
|
|
24
|
+
borderRadius: 12,
|
|
25
|
+
justifyContent: "center",
|
|
26
|
+
alignItems: "center",
|
|
27
|
+
backgroundColor: theme.secondary,
|
|
28
|
+
padding: 8
|
|
29
|
+
},
|
|
30
|
+
activeBadge: {
|
|
31
|
+
backgroundColor: theme.primary
|
|
32
|
+
},
|
|
33
|
+
label: {
|
|
34
|
+
fontSize: 12,
|
|
35
|
+
color: theme.text,
|
|
36
|
+
marginTop: 4,
|
|
37
|
+
textAlign: "center",
|
|
38
|
+
fontWeight: "500"
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const badgeStyles = [styles.badge, size ? {
|
|
42
|
+
width: size,
|
|
43
|
+
height: size
|
|
44
|
+
} : {}, style, isActive ? [styles.activeBadge, activeStyle] : inactiveStyle];
|
|
45
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: {
|
|
47
|
+
alignItems: "center"
|
|
48
|
+
},
|
|
49
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
50
|
+
style: badgeStyles,
|
|
51
|
+
children: isActive && activeIcon ? activeIcon : icon
|
|
52
|
+
}), label && /*#__PURE__*/_jsx(Text, {
|
|
53
|
+
style: [styles.label, labelStyle],
|
|
54
|
+
children: label
|
|
55
|
+
})]
|
|
56
|
+
});
|
|
57
|
+
};
|
|
58
|
+
export default Badge;
|
|
59
|
+
//# sourceMappingURL=Badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useTheme","React","View","StyleSheet","Text","jsx","_jsx","jsxs","_jsxs","Badge","icon","isActive","size","style","activeStyle","inactiveStyle","activeIcon","label","labelStyle","theme","styles","create","badge","borderRadius","justifyContent","alignItems","backgroundColor","secondary","padding","activeBadge","primary","fontSize","color","text","marginTop","textAlign","fontWeight","badgeStyles","width","height","children"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Badges/Badge.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,sBAAa;AACtC,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,UAAU,EAIVC,IAAI,QAEC,cAAc;;AAErB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiBA;AACA,OAAO,MAAMC,KAA2B,GAAGA,CAAC;EAC1CC,IAAI;EACJC,QAAQ,GAAG,KAAK;EAChBC,IAAI;EACJC,KAAK;EACLC,WAAW;EACXC,aAAa;EACbC,UAAU;EACVC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGnB,QAAQ,CAAC,CAAC;EAExB,MAAMoB,MAAM,GAAGjB,UAAU,CAACkB,MAAM,CAAC;IAC/BC,KAAK,EAAE;MACLC,YAAY,EAAE,EAAE;MAChBC,cAAc,EAAE,QAAQ;MACxBC,UAAU,EAAE,QAAQ;MACpBC,eAAe,EAAEP,KAAK,CAACQ,SAAS;MAChCC,OAAO,EAAE;IACX,CAAC;IACDC,WAAW,EAAE;MACXH,eAAe,EAAEP,KAAK,CAACW;IACzB,CAAC;IACDb,KAAK,EAAE;MACHc,QAAQ,EAAE,EAAE;MACZC,KAAK,EAAEb,KAAK,CAACc,IAAI;MACjBC,SAAS,EAAE,CAAC;MACZC,SAAS,EAAE,QAAQ;MACnBC,UAAU,EAAE;IACd;EACJ,CAAC,CAAC;EAEF,MAAMC,WAAW,GAAG,CAClBjB,MAAM,CAACE,KAAK,EACZV,IAAI,GAAG;IAAE0B,KAAK,EAAE1B,IAAI;IAAE2B,MAAM,EAAE3B;EAAK,CAAC,GAAG,CAAC,CAAC,EACzCC,KAAK,EACLF,QAAQ,GAAG,CAACS,MAAM,CAACS,WAAW,EAAEf,WAAW,CAAC,GAAGC,aAAa,CAC7D;EAED,oBACEP,KAAA,CAACN,IAAI;IAACW,KAAK,EAAE;MAAEY,UAAU,EAAE;IAAS,CAAE;IAAAe,QAAA,gBACpClC,IAAA,CAACJ,IAAI;MAACW,KAAK,EAAEwB,WAAY;MAAAG,QAAA,EACtB7B,QAAQ,IAAIK,UAAU,GAAGA,UAAU,GAAGN;IAAI,CACvC,CAAC,EACNO,KAAK,iBAAIX,IAAA,CAACF,IAAI;MAACS,KAAK,EAAE,CAACO,MAAM,CAACH,KAAK,EAAEC,UAAU,CAAE;MAAAsB,QAAA,EAAEvB;IAAK,CAAO,CAAC;EAAA,CAC7D,CAAC;AAEX,CAAC;AAED,eAAeR,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Badge Component
|
|
2
|
+
|
|
3
|
+
A customizable badge component for React Native applications that displays icons with optional labels, supporting both active and inactive states. Perfect for creating navigation tabs, feature highlights, or status indicators.
|
|
4
|
+
|
|
5
|
+
## Basic Usage
|
|
6
|
+
|
|
7
|
+
```jsx
|
|
8
|
+
import React from 'react';
|
|
9
|
+
import { View } from 'react-native';
|
|
10
|
+
import { Badge } from '@your-org/component-library';
|
|
11
|
+
import { StarIcon } from 'your-icon-library';
|
|
12
|
+
|
|
13
|
+
const MyBadgeExample = () => {
|
|
14
|
+
return (
|
|
15
|
+
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
|
16
|
+
<Badge
|
|
17
|
+
icon={<StarIcon size={24} color="#FFFFFF" />}
|
|
18
|
+
label="Favorite"
|
|
19
|
+
isActive={true}
|
|
20
|
+
/>
|
|
21
|
+
</View>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default MyBadgeExample;
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Props
|
|
29
|
+
|
|
30
|
+
### Core Props
|
|
31
|
+
|
|
32
|
+
| Prop | Type | Required | Default | Description |
|
|
33
|
+
|------|------|----------|---------|-------------|
|
|
34
|
+
| `icon` | `React.ReactNode` | ✅ | - | Icon to display in the badge |
|
|
35
|
+
| `activeIcon` | `React.ReactNode` | ❌ | - | Alternative icon to display when badge is active |
|
|
36
|
+
| `isActive` | `boolean` | ❌ | `false` | Whether the badge is in active state |
|
|
37
|
+
| `label` | `string` | ❌ | - | Text label for the badge |
|
|
38
|
+
|
|
39
|
+
### Dimension Props
|
|
40
|
+
|
|
41
|
+
| Prop | Type | Required | Default | Description |
|
|
42
|
+
|------|------|----------|---------|-------------|
|
|
43
|
+
| `size` | `number` | ❌ | `60` | Size of the badge in pixels |
|
|
44
|
+
|
|
45
|
+
### Styling Props
|
|
46
|
+
|
|
47
|
+
| Prop | Type | Required | Default | Description |
|
|
48
|
+
|------|------|----------|---------|-------------|
|
|
49
|
+
| `style` | `StyleProp<ViewStyle>` | ❌ | - | Custom style for the badge |
|
|
50
|
+
| `activeStyle` | `StyleProp<ViewStyle>` | ❌ | - | Additional style applied when badge is active |
|
|
51
|
+
| `inactiveStyle` | `StyleProp<ViewStyle>` | ❌ | - | Additional style applied when badge is inactive |
|
|
52
|
+
| `labelStyle` | `StyleProp<TextStyle>` | ❌ | - | Custom style for the label text |
|
|
53
|
+
|
|
54
|
+
## Advanced Examples
|
|
55
|
+
|
|
56
|
+
### With Active and Inactive Icons
|
|
57
|
+
|
|
58
|
+
```jsx
|
|
59
|
+
<Badge
|
|
60
|
+
icon={<StarOutlineIcon size={24} color="#FFFFFF" />}
|
|
61
|
+
activeIcon={<StarFilledIcon size={24} color="#FFFFFF" />}
|
|
62
|
+
isActive={isFavorite}
|
|
63
|
+
label="Favorite"
|
|
64
|
+
size={80}
|
|
65
|
+
/>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Custom Styling
|
|
69
|
+
|
|
70
|
+
```jsx
|
|
71
|
+
<Badge
|
|
72
|
+
icon={<ProfileIcon size={30} color="#333333" />}
|
|
73
|
+
style={{ backgroundColor: '#F5F5F5', borderWidth: 1, borderColor: '#E0E0E0' }}
|
|
74
|
+
activeStyle={{ backgroundColor: '#4CAF50', borderColor: '#388E3C' }}
|
|
75
|
+
labelStyle={{ color: '#333333', fontSize: 14, fontWeight: 'bold' }}
|
|
76
|
+
label="Profile"
|
|
77
|
+
size={70}
|
|
78
|
+
/>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Without Label
|
|
82
|
+
|
|
83
|
+
```jsx
|
|
84
|
+
<Badge
|
|
85
|
+
icon={<NotificationIcon size={24} color="#FFFFFF" />}
|
|
86
|
+
activeIcon={<NotificationActiveIcon size={24} color="#FFFFFF" />}
|
|
87
|
+
isActive={hasNotifications}
|
|
88
|
+
size={50}
|
|
89
|
+
/>
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
### Theme Integration
|
|
94
|
+
|
|
95
|
+
The Badge component automatically uses your application's theme through the `useTheme()` hook. Default styling includes:
|
|
96
|
+
- Badge background color: Uses `theme.secondary` for inactive state
|
|
97
|
+
- Active badge background color: Uses `theme.primary` for active state
|
|
98
|
+
- Label text color: Uses `theme.text`
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","Badge"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Badges/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,KAAK,QAAQ,YAAS;AAC1C,cAAc,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
|
|
5
|
+
import { Card, CardFooter } from "../Card/index.js";
|
|
6
|
+
import { useTheme } from "../../theme/index.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
/**
|
|
9
|
+
* A customizable banner component with background image and action button
|
|
10
|
+
*/
|
|
11
|
+
const Banner = ({
|
|
12
|
+
backgroundImage,
|
|
13
|
+
buttonText = "Redeem",
|
|
14
|
+
onButtonPress,
|
|
15
|
+
onBannerPress,
|
|
16
|
+
containerStyle,
|
|
17
|
+
backgroundImageStyle,
|
|
18
|
+
contentContainerStyle,
|
|
19
|
+
buttonStyle,
|
|
20
|
+
buttonTextStyle,
|
|
21
|
+
height = 300,
|
|
22
|
+
customButton,
|
|
23
|
+
contentAlignment = "center",
|
|
24
|
+
// Icon props with defaults
|
|
25
|
+
icon,
|
|
26
|
+
iconPosition = "left",
|
|
27
|
+
iconStyle,
|
|
28
|
+
iconSpacing = 8
|
|
29
|
+
}) => {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
// Handle banner press if provided
|
|
32
|
+
const handlePress = onBannerPress ? onBannerPress : undefined;
|
|
33
|
+
|
|
34
|
+
// Render the button with optional icon
|
|
35
|
+
const renderButton = () => {
|
|
36
|
+
if (customButton) {
|
|
37
|
+
return customButton;
|
|
38
|
+
}
|
|
39
|
+
if (!buttonText) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
43
|
+
style: [styles.button, buttonStyle, {
|
|
44
|
+
borderColor: theme.primary
|
|
45
|
+
}],
|
|
46
|
+
onPress: onButtonPress,
|
|
47
|
+
accessibilityRole: "button",
|
|
48
|
+
accessibilityLabel: buttonText,
|
|
49
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
50
|
+
style: [styles.buttonContent, {
|
|
51
|
+
flexDirection: iconPosition === "left" ? "row" : "row-reverse"
|
|
52
|
+
}],
|
|
53
|
+
children: [icon && /*#__PURE__*/_jsx(View, {
|
|
54
|
+
style: [styles.iconContainer, {
|
|
55
|
+
marginRight: iconPosition === "left" ? iconSpacing : 0,
|
|
56
|
+
marginLeft: iconPosition === "right" ? iconSpacing : 0
|
|
57
|
+
}, iconStyle],
|
|
58
|
+
accessible: false,
|
|
59
|
+
importantForAccessibility: "no-hide-descendants",
|
|
60
|
+
children: icon
|
|
61
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
62
|
+
style: [styles.buttonText, buttonTextStyle, {
|
|
63
|
+
color: theme.primary
|
|
64
|
+
}],
|
|
65
|
+
children: buttonText
|
|
66
|
+
})]
|
|
67
|
+
})
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
return /*#__PURE__*/_jsx(Card, {
|
|
71
|
+
style: [{
|
|
72
|
+
height
|
|
73
|
+
}, containerStyle],
|
|
74
|
+
backgroundImage: {
|
|
75
|
+
source: backgroundImage,
|
|
76
|
+
resizeMode: "cover",
|
|
77
|
+
style: backgroundImageStyle
|
|
78
|
+
},
|
|
79
|
+
onPress: handlePress,
|
|
80
|
+
children: /*#__PURE__*/_jsx(CardFooter, {
|
|
81
|
+
justifyContent: "center",
|
|
82
|
+
style: [styles.footer, contentAlignment === "top" ? styles.footerTop : contentAlignment === "center" ? styles.footerCenter : styles.footerBottom, contentContainerStyle],
|
|
83
|
+
children: renderButton()
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const styles = StyleSheet.create({
|
|
88
|
+
footer: {
|
|
89
|
+
position: "absolute",
|
|
90
|
+
left: 0,
|
|
91
|
+
right: 0
|
|
92
|
+
},
|
|
93
|
+
footerTop: {
|
|
94
|
+
top: 0
|
|
95
|
+
},
|
|
96
|
+
footerCenter: {
|
|
97
|
+
top: "50%",
|
|
98
|
+
transform: [{
|
|
99
|
+
translateY: -20
|
|
100
|
+
}] // Approximate button height offset
|
|
101
|
+
},
|
|
102
|
+
footerBottom: {
|
|
103
|
+
bottom: 0
|
|
104
|
+
},
|
|
105
|
+
button: {
|
|
106
|
+
backgroundColor: "transparent",
|
|
107
|
+
paddingHorizontal: 24,
|
|
108
|
+
paddingVertical: 8,
|
|
109
|
+
borderRadius: 8,
|
|
110
|
+
borderWidth: 1,
|
|
111
|
+
borderColor: "#FFFFFF"
|
|
112
|
+
},
|
|
113
|
+
buttonContent: {
|
|
114
|
+
flexDirection: "row",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "center"
|
|
117
|
+
},
|
|
118
|
+
iconContainer: {
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
justifyContent: "center"
|
|
121
|
+
},
|
|
122
|
+
buttonText: {
|
|
123
|
+
color: "#FFFFFF",
|
|
124
|
+
fontSize: 14,
|
|
125
|
+
fontWeight: "600",
|
|
126
|
+
letterSpacing: 1
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
export default Banner;
|
|
130
|
+
//# sourceMappingURL=Banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","Text","TouchableOpacity","View","Card","CardFooter","useTheme","jsx","_jsx","jsxs","_jsxs","Banner","backgroundImage","buttonText","onButtonPress","onBannerPress","containerStyle","backgroundImageStyle","contentContainerStyle","buttonStyle","buttonTextStyle","height","customButton","contentAlignment","icon","iconPosition","iconStyle","iconSpacing","theme","handlePress","undefined","renderButton","style","styles","button","borderColor","primary","onPress","accessibilityRole","accessibilityLabel","children","buttonContent","flexDirection","iconContainer","marginRight","marginLeft","accessible","importantForAccessibility","color","source","resizeMode","justifyContent","footer","footerTop","footerCenter","footerBottom","create","position","left","right","top","transform","translateY","bottom","backgroundColor","paddingHorizontal","paddingVertical","borderRadius","borderWidth","alignItems","fontSize","fontWeight","letterSpacing"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Banner/Banner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAKhBC,IAAI,QACC,cAAc;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TO,GAAG,EAAE;EACP,CAAC;EACDN,YAAY,EAAE;IACZM,GAAG,EAAE,KAAK;IACVC,SAAS,EAAE,CAAC;MAAEC,UAAU,EAAE,CAAC;IAAG,CAAC,CAAC,CAAE;EACpC,CAAC;EACDP,YAAY,EAAE;IACZQ,MAAM,EAAE;EACV,CAAC;EACD7B,MAAM,EAAE;IACN8B,eAAe,EAAE,aAAa;IAC9BC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdjC,WAAW,EAAE;EACf,CAAC;EACDM,aAAa,EAAE;IACbC,aAAa,EAAE,KAAK;IACpB2B,UAAU,EAAE,QAAQ;IACpBlB,cAAc,EAAE;EAClB,CAAC;EACDR,aAAa,EAAE;IACb0B,UAAU,EAAE,QAAQ;IACpBlB,cAAc,EAAE;EAClB,CAAC;EACDtC,UAAU,EAAE;IACVmC,KAAK,EAAE,SAAS;IAChBsB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC;AAEF,eAAe7D,MAAM","ignoreList":[]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { View, Text, StyleSheet, TouchableOpacity } from "react-native";
|
|
5
|
+
import { Card, CardContent } from "../Card/index.js";
|
|
6
|
+
import { useTheme } from "../../theme/index.js"; // Import ThemeType
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const BannerWithDetails = ({
|
|
9
|
+
backgroundImage,
|
|
10
|
+
logoImage,
|
|
11
|
+
detailText,
|
|
12
|
+
onPress,
|
|
13
|
+
containerStyle,
|
|
14
|
+
imageStyle,
|
|
15
|
+
logoContainerStyle,
|
|
16
|
+
logoStyle,
|
|
17
|
+
textContainerStyle,
|
|
18
|
+
textStyle,
|
|
19
|
+
customDetailContent
|
|
20
|
+
}) => {
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const styles = createStyles(theme); // Create styles using theme
|
|
23
|
+
|
|
24
|
+
const content = /*#__PURE__*/_jsx(View, {
|
|
25
|
+
style: {
|
|
26
|
+
width: "100%",
|
|
27
|
+
paddingBottom: 50
|
|
28
|
+
},
|
|
29
|
+
children: /*#__PURE__*/_jsx(Card, {
|
|
30
|
+
style: [styles.container, containerStyle],
|
|
31
|
+
backgroundImage: {
|
|
32
|
+
source: backgroundImage,
|
|
33
|
+
style: [styles.backgroundImage, imageStyle]
|
|
34
|
+
},
|
|
35
|
+
borderRadius: 15,
|
|
36
|
+
children: /*#__PURE__*/_jsxs(CardContent, {
|
|
37
|
+
style: styles.cardContent,
|
|
38
|
+
children: [/*#__PURE__*/_jsx(Card, {
|
|
39
|
+
style: [styles.logoContainer, logoContainerStyle],
|
|
40
|
+
backgroundImage: {
|
|
41
|
+
source: logoImage,
|
|
42
|
+
style: [styles.backgroundImage],
|
|
43
|
+
imageStyle: logoStyle
|
|
44
|
+
}
|
|
45
|
+
}), /*#__PURE__*/_jsx(Card, {
|
|
46
|
+
variant: "elevated",
|
|
47
|
+
style: [styles.textContainer, textContainerStyle],
|
|
48
|
+
children: customDetailContent || /*#__PURE__*/_jsx(Text, {
|
|
49
|
+
style: [styles.detailText, textStyle],
|
|
50
|
+
children: detailText
|
|
51
|
+
})
|
|
52
|
+
})]
|
|
53
|
+
})
|
|
54
|
+
})
|
|
55
|
+
});
|
|
56
|
+
if (onPress) {
|
|
57
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
58
|
+
onPress: onPress,
|
|
59
|
+
children: content
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return content;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
// Function to create themed styles
|
|
66
|
+
const createStyles = theme => StyleSheet.create({
|
|
67
|
+
container: {
|
|
68
|
+
position: "relative",
|
|
69
|
+
borderRadius: 12,
|
|
70
|
+
padding: 0,
|
|
71
|
+
height: 300
|
|
72
|
+
},
|
|
73
|
+
backgroundImage: {
|
|
74
|
+
width: "100%",
|
|
75
|
+
height: "100%",
|
|
76
|
+
resizeMode: "cover"
|
|
77
|
+
},
|
|
78
|
+
cardContent: {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
bottom: 0,
|
|
81
|
+
left: 0,
|
|
82
|
+
right: 0,
|
|
83
|
+
padding: 0,
|
|
84
|
+
alignItems: "center",
|
|
85
|
+
transform: [{
|
|
86
|
+
translateY: "30%"
|
|
87
|
+
}]
|
|
88
|
+
},
|
|
89
|
+
logoContainer: {
|
|
90
|
+
marginVertical: 0,
|
|
91
|
+
bottom: -15,
|
|
92
|
+
width: 90,
|
|
93
|
+
height: 80,
|
|
94
|
+
zIndex: 50
|
|
95
|
+
// Background is image
|
|
96
|
+
},
|
|
97
|
+
textContainer: {
|
|
98
|
+
marginVertical: 0,
|
|
99
|
+
padding: 20,
|
|
100
|
+
height: 80,
|
|
101
|
+
width: "90%",
|
|
102
|
+
justifyContent: "center"
|
|
103
|
+
},
|
|
104
|
+
detailText: {
|
|
105
|
+
textAlign: "center",
|
|
106
|
+
fontSize: 14,
|
|
107
|
+
color: theme.onSurface // Use standard text color
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
export default BannerWithDetails;
|
|
111
|
+
//# sourceMappingURL=BannerWithDetails.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","TouchableOpacity","Card","CardContent","useTheme","jsx","_jsx","jsxs","_jsxs","BannerWithDetails","backgroundImage","logoImage","detailText","onPress","containerStyle","imageStyle","logoContainerStyle","logoStyle","textContainerStyle","textStyle","customDetailContent","theme","styles","createStyles","content","style","width","paddingBottom","children","container","source","borderRadius","cardContent","logoContainer","variant","textContainer","create","position","padding","height","resizeMode","bottom","left","right","alignItems","transform","translateY","marginVertical","zIndex","justifyContent","textAlign","fontSize","color","onSurface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,MAAM,EAAE;IACR;EACF,CAAC;EACDb,aAAa,EAAE;IACbY,cAAc,EAAE,CAAC;IACjBT,OAAO,EAAE,EAAE;IACXC,MAAM,EAAE,EAAE;IACVb,KAAK,EAAE,KAAK;IACZuB,cAAc,EAAE;EAClB,CAAC;EACDrC,UAAU,EAAE;IACVsC,SAAS,EAAE,QAAQ;IACnBC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE/B,KAAK,CAACgC,SAAS,CAAE;EAC1B;AACF,CAAC,CAAC;AAEJ,eAAe5C,iBAAiB","ignoreList":[]}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"names":["default","Banner","BannerWithDetails"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Banner/index.ts"],"mappings":";;AAAA,SAAQA,OAAO,IAAIC,MAAM,QAAO,aAAU;AAC1C,SAAQD,OAAO,IAAIE,iBAAiB,QAAO,wBAAqB;AAEhE,cAAc,aAAU;AACxB,cAAc,wBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "../../theme/index.js";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { View, Image, TouchableOpacity, StyleSheet } from 'react-native';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const BrandIcon = ({
|
|
8
|
+
brand,
|
|
9
|
+
size = 66,
|
|
10
|
+
selected = false,
|
|
11
|
+
onPress,
|
|
12
|
+
disabled = false,
|
|
13
|
+
containerStyle,
|
|
14
|
+
imageStyle,
|
|
15
|
+
selectionIndicatorStyle,
|
|
16
|
+
selectionIndicatorIcon
|
|
17
|
+
}) => {
|
|
18
|
+
const theme = useTheme();
|
|
19
|
+
const styles = createStyles(theme); // Create styles using theme
|
|
20
|
+
|
|
21
|
+
const iconSize = {
|
|
22
|
+
width: size,
|
|
23
|
+
height: size,
|
|
24
|
+
borderRadius: size / 2
|
|
25
|
+
};
|
|
26
|
+
const imageSize = {
|
|
27
|
+
width: size,
|
|
28
|
+
height: size,
|
|
29
|
+
borderRadius: size / 2
|
|
30
|
+
};
|
|
31
|
+
const indicatorSize = {
|
|
32
|
+
width: size * 0.3,
|
|
33
|
+
height: size * 0.3,
|
|
34
|
+
borderRadius: size * 0.3 / 2
|
|
35
|
+
};
|
|
36
|
+
const indicatorPosition = {
|
|
37
|
+
top: -5,
|
|
38
|
+
right: 0
|
|
39
|
+
};
|
|
40
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
41
|
+
style: [styles.container, iconSize, selected && styles.selectedContainer, containerStyle],
|
|
42
|
+
onPress: onPress,
|
|
43
|
+
disabled: disabled || !onPress,
|
|
44
|
+
activeOpacity: 0.8,
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Image, {
|
|
46
|
+
source: brand.logo,
|
|
47
|
+
style: [styles.logo, imageSize, imageStyle],
|
|
48
|
+
resizeMode: "contain"
|
|
49
|
+
}), selected && /*#__PURE__*/_jsx(View, {
|
|
50
|
+
style: [styles.selectionIndicator, indicatorSize, indicatorPosition, selectionIndicatorStyle],
|
|
51
|
+
children: selectionIndicatorIcon
|
|
52
|
+
})]
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// Function to create themed styles
|
|
57
|
+
const createStyles = theme => StyleSheet.create({
|
|
58
|
+
container: {
|
|
59
|
+
backgroundColor: theme.surface,
|
|
60
|
+
// Use surface for background
|
|
61
|
+
justifyContent: 'center',
|
|
62
|
+
alignItems: 'center',
|
|
63
|
+
borderWidth: 1,
|
|
64
|
+
borderColor: theme.border,
|
|
65
|
+
// Use border color
|
|
66
|
+
shadowColor: '#000000',
|
|
67
|
+
// Keep shadow black for now
|
|
68
|
+
shadowOffset: {
|
|
69
|
+
width: 0,
|
|
70
|
+
height: 2
|
|
71
|
+
},
|
|
72
|
+
shadowOpacity: 0.1,
|
|
73
|
+
shadowRadius: 2,
|
|
74
|
+
elevation: 2
|
|
75
|
+
},
|
|
76
|
+
selectedContainer: {
|
|
77
|
+
borderColor: theme.primary,
|
|
78
|
+
// Use primary for selected border
|
|
79
|
+
borderWidth: 2 // Keep border width for selected state
|
|
80
|
+
},
|
|
81
|
+
logo: {},
|
|
82
|
+
selectionIndicator: {
|
|
83
|
+
position: 'absolute',
|
|
84
|
+
backgroundColor: theme.primary,
|
|
85
|
+
// Use primary for indicator background
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
alignItems: 'center',
|
|
88
|
+
zIndex: 2
|
|
89
|
+
},
|
|
90
|
+
checkmark: {
|
|
91
|
+
// Style is unused in current code, but if used:
|
|
92
|
+
width: '60%',
|
|
93
|
+
height: '60%'
|
|
94
|
+
// tintColor: theme.onPrimary, // Use onPrimary if checkmark is an icon/image
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
export default BrandIcon;
|
|
98
|
+
//# sourceMappingURL=BrandIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useTheme","React","View","Image","TouchableOpacity","StyleSheet","jsx","_jsx","jsxs","_jsxs","BrandIcon","brand","size","selected","onPress","disabled","containerStyle","imageStyle","selectionIndicatorStyle","selectionIndicatorIcon","theme","styles","createStyles","iconSize","width","height","borderRadius","imageSize","indicatorSize","indicatorPosition","top","right","style","container","selectedContainer","activeOpacity","children","source","logo","resizeMode","selectionIndicator","create","backgroundColor","surface","justifyContent","alignItems","borderWidth","borderColor","border","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","primary","position","zIndex","checkmark"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/BrandIcon/BrandIcon.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAmB,sBAAa;AACjD,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,KAAK,EACLC,gBAAgB,EAChBC,UAAU,QAKL,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAkBtB,MAAMC,SAAmC,GAAGA,CAAC;EAC3CC,KAAK;EACLC,IAAI,GAAG,EAAE;EACTC,QAAQ,GAAG,KAAK;EAChBC,OAAO;EACPC,QAAQ,GAAG,KAAK;EAChBC,cAAc;EACdC,UAAU;EACVC,uBAAuB;EACvBC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGpB,QAAQ,CAAC,CAAC;EACxB,MAAMqB,MAAM,GAAGC,YAAY,CAACF,KAAK,CAAC,CAAC,CAAC;;EAEpC,MAAMG,QAAQ,GAAG;IACfC,KAAK,EAAEZ,IAAI;IACXa,MAAM,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C,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE3B,KAAK,CAAC4B,MAAM;IAAE;IAC3BC,WAAW,EAAE,SAAS;IAAE;IACxBC,YAAY,EAAE;MAAE1B,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrC0B,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACb,CAAC;EACDnB,iBAAiB,EAAE;IACjBa,WAAW,EAAE3B,KAAK,CAACkC,OAAO;IAAE;IAC5BR,WAAW,EAAE,CAAC,CAAE;EAClB,CAAC;EACDR,IAAI,EAAE,CAAC,CAAC;EACRE,kBAAkB,EAAE;IAClBe,QAAQ,EAAE,UAAU;IACpBb,eAAe,EAAEtB,KAAK,CAACkC,OAAO;IAAE;IAChCV,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBW,MAAM,EAAE;EACV,CAAC;EACDC,SAAS,EAAE;IAAE;IACXjC,KAAK,EAAE,KAAK;IACZC,MAAM,EAAE;IACR;EACF;AACF,CAAC,CAAC;AAEF,eAAef,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","BrandIcon"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/BrandIcon/index.ts"],"mappings":";;AAAA,SAAQA,OAAO,IAAIC,SAAS,QAAO,gBAAa;AAChD,cAAc,gBAAa","ignoreList":[]}
|