related-ui-components 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +200 -0
- package/lib/commonjs/app/_layout.js +41 -0
- package/lib/commonjs/app/_layout.js.map +1 -0
- package/lib/commonjs/app/index.js +153 -0
- package/lib/commonjs/app/index.js.map +1 -0
- package/lib/commonjs/assets/components/BannerWithDetails.png +0 -0
- package/lib/commonjs/assets/components/DealCard-Horizontal.png +0 -0
- package/lib/commonjs/assets/components/DealCard-Vertical.png +0 -0
- package/lib/commonjs/assets/components/DealCard-floating.png +0 -0
- package/lib/commonjs/assets/components/DealCard-nested.png +0 -0
- package/lib/commonjs/assets/components/Filters.png +0 -0
- package/lib/commonjs/assets/components/Popup-1.png +0 -0
- package/lib/commonjs/assets/components/Popup-2.png +0 -0
- package/lib/commonjs/assets/components/Popup-3.png +0 -0
- package/lib/commonjs/assets/components/RedemptionOption-Horizontal.png +0 -0
- package/lib/commonjs/assets/components/RedemptionOption-Vertical.png +0 -0
- package/lib/commonjs/assets/components/SimpleBanner.png +0 -0
- package/lib/commonjs/assets/components/SimpleTrendingCard.png +0 -0
- package/lib/commonjs/assets/components/SimpleTrendingCardV2.png +0 -0
- package/lib/commonjs/assets/components/UnlockRewards-1.png +0 -0
- package/lib/commonjs/assets/components/UnlockRewards-2.png +0 -0
- package/lib/commonjs/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/lib/commonjs/assets/images/adaptive-icon.png +0 -0
- package/lib/commonjs/assets/images/face.jpg +0 -0
- package/lib/commonjs/assets/images/favicon.png +0 -0
- package/lib/commonjs/assets/images/giftvoucher.jpg +0 -0
- package/lib/commonjs/assets/images/icon.png +0 -0
- package/lib/commonjs/assets/images/insta.webp +0 -0
- package/lib/commonjs/assets/images/muse.jpg +0 -0
- package/lib/commonjs/assets/images/namshi-banner.png +0 -0
- package/lib/commonjs/assets/images/namshi.webp +0 -0
- package/lib/commonjs/assets/images/partial-react-logo.png +0 -0
- package/lib/commonjs/assets/images/pb-logo.jpg +0 -0
- package/lib/commonjs/assets/images/pb.jpg +0 -0
- package/lib/commonjs/assets/images/react-logo.png +0 -0
- package/lib/commonjs/assets/images/react-logo@2x.png +0 -0
- package/lib/commonjs/assets/images/react-logo@3x.png +0 -0
- package/lib/commonjs/assets/images/scratch_foreground.png +0 -0
- package/lib/commonjs/assets/images/splash-icon.png +0 -0
- package/lib/commonjs/assets/images/upgrade.png +0 -0
- package/lib/commonjs/components/Badges/Badge.js +65 -0
- package/lib/commonjs/components/Badges/Badge.js.map +1 -0
- package/lib/commonjs/components/Badges/README.md +98 -0
- package/lib/commonjs/components/Badges/index.js +29 -0
- package/lib/commonjs/components/Badges/index.js.map +1 -0
- package/lib/commonjs/components/Banner/Banner.js +135 -0
- package/lib/commonjs/components/Banner/Banner.js.map +1 -0
- package/lib/commonjs/components/Banner/BannerWithDetails.js +118 -0
- package/lib/commonjs/components/Banner/BannerWithDetails.js.map +1 -0
- package/lib/commonjs/components/Banner/README.md +101 -0
- package/lib/commonjs/components/Banner/index.js +48 -0
- package/lib/commonjs/components/Banner/index.js.map +1 -0
- package/lib/commonjs/components/BrandIcon/BrandIcon.js +103 -0
- package/lib/commonjs/components/BrandIcon/BrandIcon.js.map +1 -0
- package/lib/commonjs/components/BrandIcon/index.js +29 -0
- package/lib/commonjs/components/BrandIcon/index.js.map +1 -0
- package/lib/commonjs/components/Card/Card.js +124 -0
- package/lib/commonjs/components/Card/Card.js.map +1 -0
- package/lib/commonjs/components/Card/CardContent.js +42 -0
- package/lib/commonjs/components/Card/CardContent.js.map +1 -0
- package/lib/commonjs/components/Card/CardFooter.js +34 -0
- package/lib/commonjs/components/Card/CardFooter.js.map +1 -0
- package/lib/commonjs/components/Card/CardHeader.js +77 -0
- package/lib/commonjs/components/Card/CardHeader.js.map +1 -0
- package/lib/commonjs/components/Card/CardImage.js +51 -0
- package/lib/commonjs/components/Card/CardImage.js.map +1 -0
- package/lib/commonjs/components/Card/index.js +98 -0
- package/lib/commonjs/components/Card/index.js.map +1 -0
- package/lib/commonjs/components/Card/templates/DealCard.js +188 -0
- package/lib/commonjs/components/Card/templates/DealCard.js.map +1 -0
- package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js +195 -0
- package/lib/commonjs/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
- package/lib/commonjs/components/Card/templates/README.md +233 -0
- package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js +59 -0
- package/lib/commonjs/components/Card/templates/SimpleTrendingCard.js.map +1 -0
- package/lib/commonjs/components/Card/types.js +6 -0
- package/lib/commonjs/components/Card/types.js.map +1 -0
- package/lib/commonjs/components/CloseIcon/CloseIcon.js +71 -0
- package/lib/commonjs/components/CloseIcon/CloseIcon.js.map +1 -0
- package/lib/commonjs/components/CloseIcon/index.js +29 -0
- package/lib/commonjs/components/CloseIcon/index.js.map +1 -0
- package/lib/commonjs/components/Filters/Filters.js +339 -0
- package/lib/commonjs/components/Filters/Filters.js.map +1 -0
- package/lib/commonjs/components/Filters/PointsRangeSelector.js +262 -0
- package/lib/commonjs/components/Filters/PointsRangeSelector.js.map +1 -0
- package/lib/commonjs/components/Filters/README.md +212 -0
- package/lib/commonjs/components/Filters/index.js +47 -0
- package/lib/commonjs/components/Filters/index.js.map +1 -0
- package/lib/commonjs/components/Input/Input.js +156 -0
- package/lib/commonjs/components/Input/Input.js.map +1 -0
- package/lib/commonjs/components/Input/README.md +128 -0
- package/lib/commonjs/components/Input/index.js +29 -0
- package/lib/commonjs/components/Input/index.js.map +1 -0
- package/lib/commonjs/components/LockOverlay/LockOverlay.js +65 -0
- package/lib/commonjs/components/LockOverlay/LockOverlay.js.map +1 -0
- package/lib/commonjs/components/LockOverlay/index.js +29 -0
- package/lib/commonjs/components/LockOverlay/index.js.map +1 -0
- package/lib/commonjs/components/Popup/Popup.js +296 -0
- package/lib/commonjs/components/Popup/Popup.js.map +1 -0
- package/lib/commonjs/components/Popup/README.md +133 -0
- package/lib/commonjs/components/Popup/index.js +29 -0
- package/lib/commonjs/components/Popup/index.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/ProgressBar.js +121 -0
- package/lib/commonjs/components/ProgressBar/ProgressBar.js.map +1 -0
- package/lib/commonjs/components/ProgressBar/index.js +29 -0
- package/lib/commonjs/components/ProgressBar/index.js.map +1 -0
- package/lib/commonjs/components/RedemptionOption/README.md +148 -0
- package/lib/commonjs/components/RedemptionOption/RedemptionOption.js +111 -0
- package/lib/commonjs/components/RedemptionOption/RedemptionOption.js.map +1 -0
- package/lib/commonjs/components/RedemptionOption/index.js +29 -0
- package/lib/commonjs/components/RedemptionOption/index.js.map +1 -0
- package/lib/commonjs/components/ScratchCard/README.md +119 -0
- package/lib/commonjs/components/ScratchCard/ScratchCard.js +153 -0
- package/lib/commonjs/components/ScratchCard/ScratchCard.js.map +1 -0
- package/lib/commonjs/components/ScratchCard/ScratchCardContent.js +28 -0
- package/lib/commonjs/components/ScratchCard/ScratchCardContent.js.map +1 -0
- package/lib/commonjs/components/ScratchCard/index.js +48 -0
- package/lib/commonjs/components/ScratchCard/index.js.map +1 -0
- package/lib/commonjs/components/UnlockRewards/README.md +187 -0
- package/lib/commonjs/components/UnlockRewards/RewardItem.js +125 -0
- package/lib/commonjs/components/UnlockRewards/RewardItem.js.map +1 -0
- package/lib/commonjs/components/UnlockRewards/UnlockRewards.js +207 -0
- package/lib/commonjs/components/UnlockRewards/UnlockRewards.js.map +1 -0
- package/lib/commonjs/components/UnlockRewards/index.js +48 -0
- package/lib/commonjs/components/UnlockRewards/index.js.map +1 -0
- package/lib/commonjs/components/Wheel/README.md +141 -0
- package/lib/commonjs/components/Wheel/Wheel.js +323 -0
- package/lib/commonjs/components/Wheel/Wheel.js.map +1 -0
- package/lib/commonjs/components/Wheel/index.js +29 -0
- package/lib/commonjs/components/Wheel/index.js.map +1 -0
- package/lib/commonjs/components/index.js +160 -0
- package/lib/commonjs/components/index.js.map +1 -0
- package/lib/commonjs/constants/BRANDS.js +57 -0
- package/lib/commonjs/constants/BRANDS.js.map +1 -0
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/theme/Colors.js +120 -0
- package/lib/commonjs/theme/Colors.js.map +1 -0
- package/lib/commonjs/theme/ThemeContext.js +49 -0
- package/lib/commonjs/theme/ThemeContext.js.map +1 -0
- package/lib/commonjs/theme/index.js +28 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/module/app/_layout.js +36 -0
- package/lib/module/app/_layout.js.map +1 -0
- package/lib/module/app/index.js +143 -0
- package/lib/module/app/index.js.map +1 -0
- package/lib/module/assets/components/BannerWithDetails.png +0 -0
- package/lib/module/assets/components/DealCard-Horizontal.png +0 -0
- package/lib/module/assets/components/DealCard-Vertical.png +0 -0
- package/lib/module/assets/components/DealCard-floating.png +0 -0
- package/lib/module/assets/components/DealCard-nested.png +0 -0
- package/lib/module/assets/components/Filters.png +0 -0
- package/lib/module/assets/components/Popup-1.png +0 -0
- package/lib/module/assets/components/Popup-2.png +0 -0
- package/lib/module/assets/components/Popup-3.png +0 -0
- package/lib/module/assets/components/RedemptionOption-Horizontal.png +0 -0
- package/lib/module/assets/components/RedemptionOption-Vertical.png +0 -0
- package/lib/module/assets/components/SimpleBanner.png +0 -0
- package/lib/module/assets/components/SimpleTrendingCard.png +0 -0
- package/lib/module/assets/components/SimpleTrendingCardV2.png +0 -0
- package/lib/module/assets/components/UnlockRewards-1.png +0 -0
- package/lib/module/assets/components/UnlockRewards-2.png +0 -0
- package/lib/module/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/lib/module/assets/images/adaptive-icon.png +0 -0
- package/lib/module/assets/images/face.jpg +0 -0
- package/lib/module/assets/images/favicon.png +0 -0
- package/lib/module/assets/images/giftvoucher.jpg +0 -0
- package/lib/module/assets/images/icon.png +0 -0
- package/lib/module/assets/images/insta.webp +0 -0
- package/lib/module/assets/images/muse.jpg +0 -0
- package/lib/module/assets/images/namshi-banner.png +0 -0
- package/lib/module/assets/images/namshi.webp +0 -0
- package/lib/module/assets/images/partial-react-logo.png +0 -0
- package/lib/module/assets/images/pb-logo.jpg +0 -0
- package/lib/module/assets/images/pb.jpg +0 -0
- package/lib/module/assets/images/react-logo.png +0 -0
- package/lib/module/assets/images/react-logo@2x.png +0 -0
- package/lib/module/assets/images/react-logo@3x.png +0 -0
- package/lib/module/assets/images/scratch_foreground.png +0 -0
- package/lib/module/assets/images/splash-icon.png +0 -0
- package/lib/module/assets/images/upgrade.png +0 -0
- package/lib/module/components/Badges/Badge.js +59 -0
- package/lib/module/components/Badges/Badge.js.map +1 -0
- package/lib/module/components/Badges/README.md +98 -0
- package/lib/module/components/Badges/index.js +5 -0
- package/lib/module/components/Badges/index.js.map +1 -0
- package/lib/module/components/Banner/Banner.js +130 -0
- package/lib/module/components/Banner/Banner.js.map +1 -0
- package/lib/module/components/Banner/BannerWithDetails.js +111 -0
- package/lib/module/components/Banner/BannerWithDetails.js.map +1 -0
- package/lib/module/components/Banner/README.md +101 -0
- package/lib/module/components/Banner/index.js +7 -0
- package/lib/module/components/Banner/index.js.map +1 -0
- package/lib/module/components/BrandIcon/BrandIcon.js +98 -0
- package/lib/module/components/BrandIcon/BrandIcon.js.map +1 -0
- package/lib/module/components/BrandIcon/index.js +5 -0
- package/lib/module/components/BrandIcon/index.js.map +1 -0
- package/lib/module/components/Card/Card.js +119 -0
- package/lib/module/components/Card/Card.js.map +1 -0
- package/lib/module/components/Card/CardContent.js +37 -0
- package/lib/module/components/Card/CardContent.js.map +1 -0
- package/lib/module/components/Card/CardFooter.js +29 -0
- package/lib/module/components/Card/CardFooter.js.map +1 -0
- package/lib/module/components/Card/CardHeader.js +72 -0
- package/lib/module/components/Card/CardHeader.js.map +1 -0
- package/lib/module/components/Card/CardImage.js +46 -0
- package/lib/module/components/Card/CardImage.js.map +1 -0
- package/lib/module/components/Card/index.js +18 -0
- package/lib/module/components/Card/index.js.map +1 -0
- package/lib/module/components/Card/templates/DealCard.js +183 -0
- package/lib/module/components/Card/templates/DealCard.js.map +1 -0
- package/lib/module/components/Card/templates/DealCardWithBackgroundImage.js +188 -0
- package/lib/module/components/Card/templates/DealCardWithBackgroundImage.js.map +1 -0
- package/lib/module/components/Card/templates/README.md +233 -0
- package/lib/module/components/Card/templates/SimpleTrendingCard.js +54 -0
- package/lib/module/components/Card/templates/SimpleTrendingCard.js.map +1 -0
- package/lib/module/components/Card/types.js +4 -0
- package/lib/module/components/Card/types.js.map +1 -0
- package/lib/module/components/CloseIcon/CloseIcon.js +63 -0
- package/lib/module/components/CloseIcon/CloseIcon.js.map +1 -0
- package/lib/module/components/CloseIcon/index.js +5 -0
- package/lib/module/components/CloseIcon/index.js.map +1 -0
- package/lib/module/components/Filters/Filters.js +330 -0
- package/lib/module/components/Filters/Filters.js.map +1 -0
- package/lib/module/components/Filters/PointsRangeSelector.js +256 -0
- package/lib/module/components/Filters/PointsRangeSelector.js.map +1 -0
- package/lib/module/components/Filters/README.md +212 -0
- package/lib/module/components/Filters/index.js +7 -0
- package/lib/module/components/Filters/index.js.map +1 -0
- package/lib/module/components/Input/Input.js +150 -0
- package/lib/module/components/Input/Input.js.map +1 -0
- package/lib/module/components/Input/README.md +128 -0
- package/lib/module/components/Input/index.js +5 -0
- package/lib/module/components/Input/index.js.map +1 -0
- package/lib/module/components/LockOverlay/LockOverlay.js +60 -0
- package/lib/module/components/LockOverlay/LockOverlay.js.map +1 -0
- package/lib/module/components/LockOverlay/index.js +5 -0
- package/lib/module/components/LockOverlay/index.js.map +1 -0
- package/lib/module/components/Popup/Popup.js +291 -0
- package/lib/module/components/Popup/Popup.js.map +1 -0
- package/lib/module/components/Popup/README.md +133 -0
- package/lib/module/components/Popup/index.js +5 -0
- package/lib/module/components/Popup/index.js.map +1 -0
- package/lib/module/components/ProgressBar/ProgressBar.js +116 -0
- package/lib/module/components/ProgressBar/ProgressBar.js.map +1 -0
- package/lib/module/components/ProgressBar/index.js +5 -0
- package/lib/module/components/ProgressBar/index.js.map +1 -0
- package/lib/module/components/RedemptionOption/README.md +148 -0
- package/lib/module/components/RedemptionOption/RedemptionOption.js +106 -0
- package/lib/module/components/RedemptionOption/RedemptionOption.js.map +1 -0
- package/lib/module/components/RedemptionOption/index.js +5 -0
- package/lib/module/components/RedemptionOption/index.js.map +1 -0
- package/lib/module/components/ScratchCard/README.md +119 -0
- package/lib/module/components/ScratchCard/ScratchCard.js +147 -0
- package/lib/module/components/ScratchCard/ScratchCard.js.map +1 -0
- package/lib/module/components/ScratchCard/ScratchCardContent.js +24 -0
- package/lib/module/components/ScratchCard/ScratchCardContent.js.map +1 -0
- package/lib/module/components/ScratchCard/index.js +7 -0
- package/lib/module/components/ScratchCard/index.js.map +1 -0
- package/lib/module/components/UnlockRewards/README.md +187 -0
- package/lib/module/components/UnlockRewards/RewardItem.js +120 -0
- package/lib/module/components/UnlockRewards/RewardItem.js.map +1 -0
- package/lib/module/components/UnlockRewards/UnlockRewards.js +200 -0
- package/lib/module/components/UnlockRewards/UnlockRewards.js.map +1 -0
- package/lib/module/components/UnlockRewards/index.js +7 -0
- package/lib/module/components/UnlockRewards/index.js.map +1 -0
- package/lib/module/components/Wheel/README.md +141 -0
- package/lib/module/components/Wheel/Wheel.js +317 -0
- package/lib/module/components/Wheel/Wheel.js.map +1 -0
- package/lib/module/components/Wheel/index.js +5 -0
- package/lib/module/components/Wheel/index.js.map +1 -0
- package/lib/module/components/index.js +17 -0
- package/lib/module/components/index.js.map +1 -0
- package/lib/module/constants/BRANDS.js +53 -0
- package/lib/module/constants/BRANDS.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/theme/Colors.js +116 -0
- package/lib/module/theme/Colors.js.map +1 -0
- package/lib/module/theme/ThemeContext.js +41 -0
- package/lib/module/theme/ThemeContext.js.map +1 -0
- package/lib/module/theme/index.js +5 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/typescript/commonjs/app/_layout.d.ts +3 -0
- package/lib/typescript/commonjs/app/_layout.d.ts.map +1 -0
- package/lib/typescript/commonjs/app/index.d.ts +3 -0
- package/lib/typescript/commonjs/app/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Badges/Badge.d.ts +16 -0
- package/lib/typescript/commonjs/components/Badges/Badge.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Badges/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Badges/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts +26 -0
- package/lib/typescript/commonjs/components/Banner/Banner.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts +19 -0
- package/lib/typescript/commonjs/components/Banner/BannerWithDetails.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Banner/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Banner/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/lib/typescript/commonjs/components/BrandIcon/BrandIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/BrandIcon/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/BrandIcon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/Card.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardContent.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardFooter.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardFooter.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardHeader.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardHeader.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/CardImage.d.ts +5 -0
- package/lib/typescript/commonjs/components/Card/CardImage.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/index.d.ts +11 -0
- package/lib/typescript/commonjs/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts +33 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts +38 -0
- package/lib/typescript/commonjs/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts +14 -0
- package/lib/typescript/commonjs/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Card/types.d.ts +78 -0
- package/lib/typescript/commonjs/components/Card/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/CloseIcon/CloseIcon.d.ts +16 -0
- package/lib/typescript/commonjs/components/CloseIcon/CloseIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/CloseIcon/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/CloseIcon/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Filters/Filters.d.ts +74 -0
- package/lib/typescript/commonjs/components/Filters/Filters.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Filters/PointsRangeSelector.d.ts +29 -0
- package/lib/typescript/commonjs/components/Filters/PointsRangeSelector.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Filters/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/Filters/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Input/Input.d.ts +23 -0
- package/lib/typescript/commonjs/components/Input/Input.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Input/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Input/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/LockOverlay/LockOverlay.d.ts +16 -0
- package/lib/typescript/commonjs/components/LockOverlay/LockOverlay.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/LockOverlay/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/LockOverlay/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Popup/Popup.d.ts +38 -0
- package/lib/typescript/commonjs/components/Popup/Popup.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Popup/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Popup/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts +26 -0
- package/lib/typescript/commonjs/components/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/RedemptionOption/RedemptionOption.d.ts +24 -0
- package/lib/typescript/commonjs/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/RedemptionOption/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/RedemptionOption/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCard.d.ts +20 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCard.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCardContent.d.ts +8 -0
- package/lib/typescript/commonjs/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/ScratchCard/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/ScratchCard/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UnlockRewards/RewardItem.d.ts +25 -0
- package/lib/typescript/commonjs/components/UnlockRewards/RewardItem.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UnlockRewards/UnlockRewards.d.ts +59 -0
- package/lib/typescript/commonjs/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/UnlockRewards/index.d.ts +5 -0
- package/lib/typescript/commonjs/components/UnlockRewards/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts +34 -0
- package/lib/typescript/commonjs/components/Wheel/Wheel.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/Wheel/index.d.ts +3 -0
- package/lib/typescript/commonjs/components/Wheel/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/components/index.d.ts +15 -0
- package/lib/typescript/commonjs/components/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/constants/BRANDS.d.ts +7 -0
- package/lib/typescript/commonjs/constants/BRANDS.d.ts.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/theme/Colors.d.ts +28 -0
- package/lib/typescript/commonjs/theme/Colors.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts +13 -0
- package/lib/typescript/commonjs/theme/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/theme/index.d.ts +3 -0
- package/lib/typescript/commonjs/theme/index.d.ts.map +1 -0
- package/lib/typescript/module/app/_layout.d.ts +3 -0
- package/lib/typescript/module/app/_layout.d.ts.map +1 -0
- package/lib/typescript/module/app/index.d.ts +3 -0
- package/lib/typescript/module/app/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Badges/Badge.d.ts +16 -0
- package/lib/typescript/module/components/Badges/Badge.d.ts.map +1 -0
- package/lib/typescript/module/components/Badges/index.d.ts +3 -0
- package/lib/typescript/module/components/Badges/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts +26 -0
- package/lib/typescript/module/components/Banner/Banner.d.ts.map +1 -0
- package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts +19 -0
- package/lib/typescript/module/components/Banner/BannerWithDetails.d.ts.map +1 -0
- package/lib/typescript/module/components/Banner/index.d.ts +5 -0
- package/lib/typescript/module/components/Banner/index.d.ts.map +1 -0
- package/lib/typescript/module/components/BrandIcon/BrandIcon.d.ts +20 -0
- package/lib/typescript/module/components/BrandIcon/BrandIcon.d.ts.map +1 -0
- package/lib/typescript/module/components/BrandIcon/index.d.ts +3 -0
- package/lib/typescript/module/components/BrandIcon/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/Card.d.ts +5 -0
- package/lib/typescript/module/components/Card/Card.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardContent.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardContent.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardFooter.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardFooter.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardHeader.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardHeader.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/CardImage.d.ts +5 -0
- package/lib/typescript/module/components/Card/CardImage.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/index.d.ts +11 -0
- package/lib/typescript/module/components/Card/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/templates/DealCard.d.ts +33 -0
- package/lib/typescript/module/components/Card/templates/DealCard.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts +38 -0
- package/lib/typescript/module/components/Card/templates/DealCardWithBackgroundImage.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts +14 -0
- package/lib/typescript/module/components/Card/templates/SimpleTrendingCard.d.ts.map +1 -0
- package/lib/typescript/module/components/Card/types.d.ts +78 -0
- package/lib/typescript/module/components/Card/types.d.ts.map +1 -0
- package/lib/typescript/module/components/CloseIcon/CloseIcon.d.ts +16 -0
- package/lib/typescript/module/components/CloseIcon/CloseIcon.d.ts.map +1 -0
- package/lib/typescript/module/components/CloseIcon/index.d.ts +3 -0
- package/lib/typescript/module/components/CloseIcon/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Filters/Filters.d.ts +74 -0
- package/lib/typescript/module/components/Filters/Filters.d.ts.map +1 -0
- package/lib/typescript/module/components/Filters/PointsRangeSelector.d.ts +29 -0
- package/lib/typescript/module/components/Filters/PointsRangeSelector.d.ts.map +1 -0
- package/lib/typescript/module/components/Filters/index.d.ts +5 -0
- package/lib/typescript/module/components/Filters/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Input/Input.d.ts +23 -0
- package/lib/typescript/module/components/Input/Input.d.ts.map +1 -0
- package/lib/typescript/module/components/Input/index.d.ts +3 -0
- package/lib/typescript/module/components/Input/index.d.ts.map +1 -0
- package/lib/typescript/module/components/LockOverlay/LockOverlay.d.ts +16 -0
- package/lib/typescript/module/components/LockOverlay/LockOverlay.d.ts.map +1 -0
- package/lib/typescript/module/components/LockOverlay/index.d.ts +3 -0
- package/lib/typescript/module/components/LockOverlay/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Popup/Popup.d.ts +38 -0
- package/lib/typescript/module/components/Popup/Popup.d.ts.map +1 -0
- package/lib/typescript/module/components/Popup/index.d.ts +3 -0
- package/lib/typescript/module/components/Popup/index.d.ts.map +1 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts +26 -0
- package/lib/typescript/module/components/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/module/components/ProgressBar/index.d.ts +3 -0
- package/lib/typescript/module/components/ProgressBar/index.d.ts.map +1 -0
- package/lib/typescript/module/components/RedemptionOption/RedemptionOption.d.ts +24 -0
- package/lib/typescript/module/components/RedemptionOption/RedemptionOption.d.ts.map +1 -0
- package/lib/typescript/module/components/RedemptionOption/index.d.ts +3 -0
- package/lib/typescript/module/components/RedemptionOption/index.d.ts.map +1 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCard.d.ts +20 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCard.d.ts.map +1 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCardContent.d.ts +8 -0
- package/lib/typescript/module/components/ScratchCard/ScratchCardContent.d.ts.map +1 -0
- package/lib/typescript/module/components/ScratchCard/index.d.ts +5 -0
- package/lib/typescript/module/components/ScratchCard/index.d.ts.map +1 -0
- package/lib/typescript/module/components/UnlockRewards/RewardItem.d.ts +25 -0
- package/lib/typescript/module/components/UnlockRewards/RewardItem.d.ts.map +1 -0
- package/lib/typescript/module/components/UnlockRewards/UnlockRewards.d.ts +59 -0
- package/lib/typescript/module/components/UnlockRewards/UnlockRewards.d.ts.map +1 -0
- package/lib/typescript/module/components/UnlockRewards/index.d.ts +5 -0
- package/lib/typescript/module/components/UnlockRewards/index.d.ts.map +1 -0
- package/lib/typescript/module/components/Wheel/Wheel.d.ts +34 -0
- package/lib/typescript/module/components/Wheel/Wheel.d.ts.map +1 -0
- package/lib/typescript/module/components/Wheel/index.d.ts +3 -0
- package/lib/typescript/module/components/Wheel/index.d.ts.map +1 -0
- package/lib/typescript/module/components/index.d.ts +15 -0
- package/lib/typescript/module/components/index.d.ts.map +1 -0
- package/lib/typescript/module/constants/BRANDS.d.ts +7 -0
- package/lib/typescript/module/constants/BRANDS.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +3 -0
- package/lib/typescript/module/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/theme/Colors.d.ts +28 -0
- package/lib/typescript/module/theme/Colors.d.ts.map +1 -0
- package/lib/typescript/module/theme/ThemeContext.d.ts +13 -0
- package/lib/typescript/module/theme/ThemeContext.d.ts.map +1 -0
- package/lib/typescript/module/theme/index.d.ts +3 -0
- package/lib/typescript/module/theme/index.d.ts.map +1 -0
- package/package.json +116 -0
- package/src/app/_layout.tsx +38 -0
- package/src/app/index.tsx +115 -0
- package/src/assets/components/BannerWithDetails.png +0 -0
- package/src/assets/components/DealCard-Horizontal.png +0 -0
- package/src/assets/components/DealCard-Vertical.png +0 -0
- package/src/assets/components/DealCard-floating.png +0 -0
- package/src/assets/components/DealCard-nested.png +0 -0
- package/src/assets/components/Filters.png +0 -0
- package/src/assets/components/Popup-1.png +0 -0
- package/src/assets/components/Popup-2.png +0 -0
- package/src/assets/components/Popup-3.png +0 -0
- package/src/assets/components/RedemptionOption-Horizontal.png +0 -0
- package/src/assets/components/RedemptionOption-Vertical.png +0 -0
- package/src/assets/components/SimpleBanner.png +0 -0
- package/src/assets/components/SimpleTrendingCard.png +0 -0
- package/src/assets/components/SimpleTrendingCardV2.png +0 -0
- package/src/assets/components/UnlockRewards-1.png +0 -0
- package/src/assets/components/UnlockRewards-2.png +0 -0
- package/src/assets/fonts/SpaceMono-Regular.ttf +0 -0
- package/src/assets/images/adaptive-icon.png +0 -0
- package/src/assets/images/face.jpg +0 -0
- package/src/assets/images/favicon.png +0 -0
- package/src/assets/images/giftvoucher.jpg +0 -0
- package/src/assets/images/icon.png +0 -0
- package/src/assets/images/insta.webp +0 -0
- package/src/assets/images/muse.jpg +0 -0
- package/src/assets/images/namshi-banner.png +0 -0
- package/src/assets/images/namshi.webp +0 -0
- package/src/assets/images/partial-react-logo.png +0 -0
- package/src/assets/images/pb-logo.jpg +0 -0
- package/src/assets/images/pb.jpg +0 -0
- package/src/assets/images/react-logo.png +0 -0
- package/src/assets/images/react-logo@2x.png +0 -0
- package/src/assets/images/react-logo@3x.png +0 -0
- package/src/assets/images/scratch_foreground.png +0 -0
- package/src/assets/images/splash-icon.png +0 -0
- package/src/assets/images/upgrade.png +0 -0
- package/src/components/Badges/Badge.tsx +81 -0
- package/src/components/Badges/README.md +98 -0
- package/src/components/Badges/index.ts +2 -0
- package/src/components/Banner/Banner.tsx +172 -0
- package/src/components/Banner/BannerWithDetails.tsx +133 -0
- package/src/components/Banner/README.md +101 -0
- package/src/components/Banner/index.ts +5 -0
- package/src/components/BrandIcon/BrandIcon.tsx +134 -0
- package/src/components/BrandIcon/index.ts +2 -0
- package/src/components/Card/Card.tsx +144 -0
- package/src/components/Card/CardContent.tsx +33 -0
- package/src/components/Card/CardFooter.tsx +33 -0
- package/src/components/Card/CardHeader.tsx +80 -0
- package/src/components/Card/CardImage.tsx +51 -0
- package/src/components/Card/index.ts +15 -0
- package/src/components/Card/templates/DealCard.tsx +255 -0
- package/src/components/Card/templates/DealCardWithBackgroundImage.tsx +273 -0
- package/src/components/Card/templates/README.md +233 -0
- package/src/components/Card/templates/SimpleTrendingCard.tsx +54 -0
- package/src/components/Card/types.ts +75 -0
- package/src/components/CloseIcon/CloseIcon.tsx +77 -0
- package/src/components/CloseIcon/index.ts +2 -0
- package/src/components/Filters/Filters.tsx +427 -0
- package/src/components/Filters/PointsRangeSelector.tsx +319 -0
- package/src/components/Filters/README.md +212 -0
- package/src/components/Filters/index.ts +4 -0
- package/src/components/Input/Input.tsx +218 -0
- package/src/components/Input/README.md +128 -0
- package/src/components/Input/index.ts +2 -0
- package/src/components/LockOverlay/LockOverlay.tsx +82 -0
- package/src/components/LockOverlay/index.ts +2 -0
- package/src/components/Popup/Popup.tsx +374 -0
- package/src/components/Popup/README.md +133 -0
- package/src/components/Popup/index.ts +2 -0
- package/src/components/ProgressBar/ProgressBar.tsx +157 -0
- package/src/components/ProgressBar/index.ts +2 -0
- package/src/components/RedemptionOption/README.md +148 -0
- package/src/components/RedemptionOption/RedemptionOption.tsx +158 -0
- package/src/components/RedemptionOption/index.ts +2 -0
- package/src/components/ScratchCard/README.md +119 -0
- package/src/components/ScratchCard/ScratchCard.tsx +190 -0
- package/src/components/ScratchCard/ScratchCardContent.tsx +25 -0
- package/src/components/ScratchCard/index.ts +4 -0
- package/src/components/UnlockRewards/README.md +187 -0
- package/src/components/UnlockRewards/RewardItem.tsx +172 -0
- package/src/components/UnlockRewards/UnlockRewards.tsx +293 -0
- package/src/components/UnlockRewards/index.ts +4 -0
- package/src/components/Wheel/README.md +141 -0
- package/src/components/Wheel/Wheel.tsx +374 -0
- package/src/components/Wheel/index.ts +2 -0
- package/src/components/index.ts +14 -0
- package/src/constants/BRANDS.ts +64 -0
- package/src/index.ts +2 -0
- package/src/theme/Colors.ts +107 -0
- package/src/theme/ThemeContext.tsx +46 -0
- package/src/theme/index.ts +2 -0
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { View, Text, TouchableOpacity } from "react-native";
|
|
5
|
+
import Card from "../Card.js";
|
|
6
|
+
import CardHeader from "../CardHeader.js";
|
|
7
|
+
import CardContent from "../CardContent.js";
|
|
8
|
+
import { useTheme } from "../../../theme/ThemeContext.js";
|
|
9
|
+
import CardFooter from "../CardFooter.js";
|
|
10
|
+
import ProgressBar from "../../ProgressBar/ProgressBar.js";
|
|
11
|
+
import LockOverlay from "../../LockOverlay/LockOverlay.js";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const DealCardWithBackgroundImage = ({
|
|
14
|
+
backgroundImage,
|
|
15
|
+
onPress,
|
|
16
|
+
label,
|
|
17
|
+
labelContainerStyle,
|
|
18
|
+
labelStyle,
|
|
19
|
+
actionIconDefault,
|
|
20
|
+
actionIconActive,
|
|
21
|
+
onActionPress,
|
|
22
|
+
innerCardStyle,
|
|
23
|
+
dealDescription,
|
|
24
|
+
dealDescriptionStyle,
|
|
25
|
+
dealPrice,
|
|
26
|
+
dealPriceStyle,
|
|
27
|
+
dealProviderName,
|
|
28
|
+
dealProviderNameStyle,
|
|
29
|
+
progressBar,
|
|
30
|
+
progressBarText,
|
|
31
|
+
progressBarTextPosition,
|
|
32
|
+
progressBarTextAlign,
|
|
33
|
+
progressValue,
|
|
34
|
+
progressHeight,
|
|
35
|
+
progressWidth,
|
|
36
|
+
remainingProgressColor,
|
|
37
|
+
progressColor,
|
|
38
|
+
innerCardVariant = "nested",
|
|
39
|
+
style,
|
|
40
|
+
width = 300,
|
|
41
|
+
isRTL = false,
|
|
42
|
+
overlayVisible = false,
|
|
43
|
+
overlayCover = "background"
|
|
44
|
+
}) => {
|
|
45
|
+
const theme = useTheme();
|
|
46
|
+
const [isActive, setIsActive] = useState(false);
|
|
47
|
+
const handleActionPress = () => {
|
|
48
|
+
if (!actionIconActive) return;
|
|
49
|
+
setIsActive(!isActive);
|
|
50
|
+
if (onActionPress) {
|
|
51
|
+
onActionPress(!isActive);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const labelContent = label && /*#__PURE__*/_jsx(View, {
|
|
55
|
+
style: [{
|
|
56
|
+
backgroundColor: theme.surface,
|
|
57
|
+
paddingVertical: 5,
|
|
58
|
+
paddingHorizontal: 8,
|
|
59
|
+
borderRadius: 10
|
|
60
|
+
}, labelContainerStyle],
|
|
61
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
62
|
+
style: [{
|
|
63
|
+
color: theme.onSurface
|
|
64
|
+
}, labelStyle],
|
|
65
|
+
children: label
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
const actionContent = /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
69
|
+
onPress: handleActionPress,
|
|
70
|
+
children: isActive ? actionIconActive : actionIconDefault
|
|
71
|
+
});
|
|
72
|
+
const headerLeft = isRTL ? actionContent : labelContent;
|
|
73
|
+
const headerRight = isRTL ? labelContent : actionContent;
|
|
74
|
+
const mainCardBorderRadius = style?.borderRadius || 8;
|
|
75
|
+
const innerCardBorderRadius = 30;
|
|
76
|
+
const getVariantStyle = () => {
|
|
77
|
+
if (innerCardVariant === "floating") {
|
|
78
|
+
return {
|
|
79
|
+
position: "absolute",
|
|
80
|
+
bottom: -30,
|
|
81
|
+
width: width,
|
|
82
|
+
marginHorizontal: 0,
|
|
83
|
+
marginVertical: 0,
|
|
84
|
+
paddingBottom: progressBar || dealPrice ? 0 : 20,
|
|
85
|
+
borderRadius: 20
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
return {};
|
|
89
|
+
};
|
|
90
|
+
const computedInnerCardStyle = [{
|
|
91
|
+
borderRadius: innerCardBorderRadius
|
|
92
|
+
}, getVariantStyle(), innerCardStyle];
|
|
93
|
+
const finalInnerBorderRadius = innerCardStyle?.borderRadius || (innerCardVariant === "floating" ? 20 : innerCardBorderRadius) || innerCardBorderRadius;
|
|
94
|
+
const overlayStyle = {
|
|
95
|
+
borderRadius: mainCardBorderRadius,
|
|
96
|
+
borderBottomLeftRadius: innerCardVariant === "floating" ? finalInnerBorderRadius : mainCardBorderRadius,
|
|
97
|
+
borderBottomRightRadius: innerCardVariant === "floating" ? finalInnerBorderRadius : mainCardBorderRadius,
|
|
98
|
+
bottom: innerCardVariant === "floating" ? -30 : 0,
|
|
99
|
+
overflow: "hidden"
|
|
100
|
+
};
|
|
101
|
+
return /*#__PURE__*/_jsxs(Card, {
|
|
102
|
+
onPress: onPress,
|
|
103
|
+
style: [{
|
|
104
|
+
height: 300,
|
|
105
|
+
position: "relative",
|
|
106
|
+
borderRadius: mainCardBorderRadius
|
|
107
|
+
}, style, {
|
|
108
|
+
width
|
|
109
|
+
}],
|
|
110
|
+
backgroundImage: {
|
|
111
|
+
source: backgroundImage,
|
|
112
|
+
resizeMode: "cover"
|
|
113
|
+
},
|
|
114
|
+
children: [/*#__PURE__*/_jsx(LockOverlay, {
|
|
115
|
+
visible: overlayVisible,
|
|
116
|
+
containerStyle: overlayStyle,
|
|
117
|
+
contentVerticalAlign: overlayCover == "background" ? "top" : "center"
|
|
118
|
+
}), /*#__PURE__*/_jsx(CardHeader, {
|
|
119
|
+
left: headerLeft,
|
|
120
|
+
right: headerRight,
|
|
121
|
+
style: {
|
|
122
|
+
alignItems: "center"
|
|
123
|
+
}
|
|
124
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
125
|
+
style: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
justifyContent: "flex-end",
|
|
128
|
+
zIndex: overlayCover == "background" ? 1000 : 0
|
|
129
|
+
},
|
|
130
|
+
children: /*#__PURE__*/_jsx(CardContent, {
|
|
131
|
+
style: {
|
|
132
|
+
padding: 0
|
|
133
|
+
},
|
|
134
|
+
children: /*#__PURE__*/_jsxs(Card, {
|
|
135
|
+
backgroundColor: theme.surface,
|
|
136
|
+
variant: "filled",
|
|
137
|
+
style: computedInnerCardStyle,
|
|
138
|
+
children: [/*#__PURE__*/_jsx(CardHeader, {
|
|
139
|
+
title: dealProviderName,
|
|
140
|
+
titleColor: theme.text,
|
|
141
|
+
titleStyle: [{
|
|
142
|
+
fontSize: 18,
|
|
143
|
+
textAlign: isRTL ? "right" : "left"
|
|
144
|
+
}, dealProviderNameStyle],
|
|
145
|
+
subtitle: dealDescription,
|
|
146
|
+
subtitleColor: theme.helper,
|
|
147
|
+
subtitleStyle: [{
|
|
148
|
+
textAlign: isRTL ? "right" : "left"
|
|
149
|
+
}, dealDescriptionStyle]
|
|
150
|
+
}), (progressBar || dealPrice) && /*#__PURE__*/_jsxs(CardFooter, {
|
|
151
|
+
justifyContent: "space-between",
|
|
152
|
+
style: {
|
|
153
|
+
flexDirection: isRTL ? "row-reverse" : "row"
|
|
154
|
+
},
|
|
155
|
+
children: [progressBar && /*#__PURE__*/_jsx(ProgressBar, {
|
|
156
|
+
progress: progressValue,
|
|
157
|
+
remainingColor: remainingProgressColor,
|
|
158
|
+
progressColor: progressColor,
|
|
159
|
+
height: progressHeight || 14,
|
|
160
|
+
width: progressWidth || width * 0.5,
|
|
161
|
+
textPosition: progressBarTextPosition,
|
|
162
|
+
text: progressBarText,
|
|
163
|
+
showText: progressBarText != null,
|
|
164
|
+
textAlign: isRTL && progressBarTextAlign == null ? "right" : progressBarTextAlign,
|
|
165
|
+
textStyle: {
|
|
166
|
+
fontSize: 10,
|
|
167
|
+
color: theme.text
|
|
168
|
+
},
|
|
169
|
+
isRTL: isRTL
|
|
170
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
171
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
172
|
+
style: [{
|
|
173
|
+
fontSize: 16,
|
|
174
|
+
color: theme.primary,
|
|
175
|
+
fontWeight: "bold",
|
|
176
|
+
textAlign: isRTL ? "left" : "right"
|
|
177
|
+
}, dealPriceStyle],
|
|
178
|
+
children: dealPrice
|
|
179
|
+
})
|
|
180
|
+
})]
|
|
181
|
+
})]
|
|
182
|
+
})
|
|
183
|
+
})
|
|
184
|
+
})]
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
export default DealCardWithBackgroundImage;
|
|
188
|
+
//# sourceMappingURL=DealCardWithBackgroundImage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","View","Text","TouchableOpacity","Card","CardHeader","CardContent","useTheme","CardFooter","ProgressBar","LockOverlay","jsx","_jsx","jsxs","_jsxs","DealCardWithBackgroundImage","backgroundImage","onPress","label","labelContainerStyle","labelStyle","actionIconDefault","actionIconActive","onActionPress","innerCardStyle","dealDescription","dealDescriptionStyle","dealPrice","dealPriceStyle","dealProviderName","dealProviderNameStyle","progressBar","progressBarText","progressBarTextPosition","progressBarTextAlign","progressValue","progressHeight","progressWidth","remainingProgressColor","progressColor","innerCardVariant","style","width","isRTL","overlayVisible","overlayCover","theme","isActive","setIsActive","handleActionPress","labelContent","backgroundColor","surface","paddingVertical","paddingHorizontal","borderRadius","children","color","onSurface","actionContent","headerLeft","headerRight","mainCardBorderRadius","innerCardBorderRadius","getVariantStyle","position","bottom","marginHorizontal","marginVertical","paddingBottom","computedInnerCardStyle","finalInnerBorderRadius","overlayStyle","borderBottomLeftRadius","borderBottomRightRadius","overflow","height","source","resizeMode","visible","containerStyle","contentVerticalAlign","left","right","alignItems","flex","justifyContent","zIndex","padding","variant","title","titleColor","text","titleStyle","fontSize","textAlign","subtitle","subtitleColor","helper","subtitleStyle","flexDirection","progress","remainingColor","textPosition","showText","textStyle","primary","fontWeight"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/Card/templates/DealCardWithBackgroundImage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAIEC,IAAI,EACJC,IAAI,EAEJC,gBAAgB,QACX,cAAc;AACrB,OAAOC,IAAI,MAAM,YAAS;AAC1B,OAAOC,UAAU,MAAM,kBAAe;AACtC,OAAOC,WAAW,MAAM,mBAAgB;AACxC,SAASC,QAAQ,QAAQ,gCAA6B;AACtD,OAAOC,UAAU,MAAM,kBAAe;AACtC,OAAOC,WAAW,MAGX,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kBACZrC,KAAK,EAAEX,KAAK,CAAC4D,OAAO;kBACpBC,UAAU,EAAE,MAAM;kBAClBZ,SAAS,EAAEpD,KAAK,GAAG,MAAM,GAAG;gBAC9B,CAAC,EACDf,cAAc,CACd;gBAAA4B,QAAA,EAED7B;cAAS,CACN;YAAC,CACH,CAAC;UAAA,CACG,CACb;QAAA,CACG;MAAC,CACI;IAAC,CACV,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAED,eAAeZ,2BAA2B","ignoreList":[]}
|
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Card Template Components
|
|
2
|
+
|
|
3
|
+
List of pre-defined template common based on app designs, the templates use the internal Card related components
|
|
4
|
+
|
|
5
|
+
## 1. Simple Trending Card
|
|
6
|
+
|
|
7
|
+

|
|
8
|
+

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

|
|
66
|
+

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

|
|
158
|
+

|
|
159
|
+
|
|
160
|
+
# DealCard Documentation
|
|
161
|
+
|
|
162
|
+
The `DealCard` is a versatile card component designed for displaying deals or offers in either horizontal or vertical orientation. It features an image, customizable labels, descriptive text, pricing information, and an optional progress bar.
|
|
163
|
+
|
|
164
|
+
## Usage
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import DealCard from "@/components/Card/templates/DealCard";
|
|
168
|
+
import { Alert } from "react-native";
|
|
169
|
+
|
|
170
|
+
const MyComponent = () => {
|
|
171
|
+
return (
|
|
172
|
+
<DealCard
|
|
173
|
+
imageSource={require("@/assets/images/pb.jpg")}
|
|
174
|
+
// width={275}
|
|
175
|
+
variant="horizontal"
|
|
176
|
+
label="Discount"
|
|
177
|
+
// labelStyle={{ color: "#000" }}
|
|
178
|
+
dealProviderName="Pull&Bear"
|
|
179
|
+
dealDescription="25% discount on all items"
|
|
180
|
+
// dealDescriptionStyle={{ color: "black" }}
|
|
181
|
+
progressBar={true}
|
|
182
|
+
progressBarText="500 points to Redeem!"
|
|
183
|
+
progressBarTextPosition="below"
|
|
184
|
+
// progressColor="black"
|
|
185
|
+
remainingProgressColor="rgba(255, 255, 255, 0.4)"
|
|
186
|
+
dealPrice="1,000 KP"
|
|
187
|
+
/>
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Props
|
|
193
|
+
|
|
194
|
+
| Prop | Type | Default | Description |
|
|
195
|
+
|------|------|---------|-------------|
|
|
196
|
+
| `imageSource` | `ImageRequireSource` | Required | The image to display in the card |
|
|
197
|
+
| `variant` | `"vertical" \| "horizontal"` | `"horizontal"` | Layout orientation of the card |
|
|
198
|
+
| `label` | `string` | `undefined` | Optional label text to display |
|
|
199
|
+
| `labelStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the label text |
|
|
200
|
+
| `labelContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Custom styles for the label container |
|
|
201
|
+
| `dealDescription` | `string` | `undefined` | Description text for the deal |
|
|
202
|
+
| `dealDescriptionStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the deal description |
|
|
203
|
+
| `dealProviderName` | `string` | `undefined` | Name of the deal provider |
|
|
204
|
+
| `dealProviderNameStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the provider name |
|
|
205
|
+
| `dealPrice` | `string` | `undefined` | Price text for the deal |
|
|
206
|
+
| `dealPriceStyle` | `StyleProp<TextStyle>` | `undefined` | Custom styles for the price text |
|
|
207
|
+
| `progressBar` | `boolean` | `undefined` | Whether to show a progress bar |
|
|
208
|
+
| `progressBarText` | `string` | `undefined` | Text to display with the progress bar |
|
|
209
|
+
| `progressBarTextPosition` | `ProgressBarTextPosition` | `undefined` | Position of the progress bar text |
|
|
210
|
+
| `progressBarTextAlign` | `ProgressBarTextAlign` | `undefined` | Alignment of the progress bar text |
|
|
211
|
+
| `progressColor` | `string` | `undefined` | Color of the progress indicator |
|
|
212
|
+
| `progressWidth` | `number` | `undefined` | Width of the progress bar |
|
|
213
|
+
| `progressHeight` | `number` | `undefined` | Height of the progress bar |
|
|
214
|
+
| `remainingProgressColor` | `string` | `undefined` | Color of the unfilled portion of the progress bar |
|
|
215
|
+
| `progressValue` | `number` | `undefined` | Value between 0 and 1 representing progress |
|
|
216
|
+
| `onPress` | `() => void` | `undefined` | Function to execute when the card is pressed |
|
|
217
|
+
| `style` | `StyleProp<ViewStyle>` | `undefined` | Additional styles to apply to the card |
|
|
218
|
+
| `width` | `number \| string` | `undefined` | Width of the card in pixels or as a percentage |
|
|
219
|
+
| `isRTL` | `boolean` | `false` | Whether to render the component in right-to-left mode for RTL languages |
|
|
220
|
+
| `overlayVisible` | `boolean` | `false` | Whether to show a lock overlay on top of the image |
|
|
221
|
+
|
|
222
|
+
## Layout Variants
|
|
223
|
+
|
|
224
|
+
- **Horizontal**: Image appears on the left side with content to the right
|
|
225
|
+
- **Vertical**: Image appears on top with content below
|
|
226
|
+
|
|
227
|
+
## Related Components
|
|
228
|
+
|
|
229
|
+
- `Card`: The base component used for the overall container
|
|
230
|
+
- `CardHeader`: Displays the provider name and deal description
|
|
231
|
+
- `CardFooter`: Contains the label and progress bar
|
|
232
|
+
- `ProgressBar`: Shows completion or availability status visually
|
|
233
|
+
- `LockOverlay`: Displays a lock overlay when the `overlayVisible` prop is true
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from "react";
|
|
4
|
+
import Card from "../Card.js";
|
|
5
|
+
import CardHeader from "../CardHeader.js";
|
|
6
|
+
import { LinearGradient } from "expo-linear-gradient";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const SimpleTrendingCard = ({
|
|
9
|
+
backgroundImage,
|
|
10
|
+
onPress,
|
|
11
|
+
icon,
|
|
12
|
+
iconPosition = "left",
|
|
13
|
+
shadowEffect = true,
|
|
14
|
+
shadowOpacity = 0.5,
|
|
15
|
+
style
|
|
16
|
+
}) => {
|
|
17
|
+
return /*#__PURE__*/_jsxs(Card, {
|
|
18
|
+
onPress: onPress,
|
|
19
|
+
style: [{
|
|
20
|
+
width: 250,
|
|
21
|
+
height: 300
|
|
22
|
+
}, style],
|
|
23
|
+
backgroundImage: {
|
|
24
|
+
source: backgroundImage,
|
|
25
|
+
resizeMode: "cover"
|
|
26
|
+
},
|
|
27
|
+
children: [shadowEffect && /*#__PURE__*/_jsx(LinearGradient, {
|
|
28
|
+
colors: [`rgba(0, 0, 0, ${shadowOpacity})`, "transparent"],
|
|
29
|
+
start: {
|
|
30
|
+
x: 0.5,
|
|
31
|
+
y: 1
|
|
32
|
+
},
|
|
33
|
+
end: {
|
|
34
|
+
x: 0.5,
|
|
35
|
+
y: 0
|
|
36
|
+
},
|
|
37
|
+
style: {
|
|
38
|
+
position: "absolute",
|
|
39
|
+
left: 0,
|
|
40
|
+
right: 0,
|
|
41
|
+
top: 0,
|
|
42
|
+
bottom: 0
|
|
43
|
+
}
|
|
44
|
+
}), icon && /*#__PURE__*/_jsx(CardHeader, {
|
|
45
|
+
left: iconPosition === "left" ? icon : null,
|
|
46
|
+
right: iconPosition === "right" ? icon : null,
|
|
47
|
+
style: {
|
|
48
|
+
alignItems: "center"
|
|
49
|
+
}
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
export default SimpleTrendingCard;
|
|
54
|
+
//# sourceMappingURL=SimpleTrendingCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Card","CardHeader","LinearGradient","jsx","_jsx","jsxs","_jsxs","SimpleTrendingCard","backgroundImage","onPress","icon","iconPosition","shadowEffect","shadowOpacity","style","width","height","source","resizeMode","children","colors","start","x","y","end","position","left","right","top","bottom","alignItems"],"sourceRoot":"..\\..\\..\\..\\..\\src","sources":["components/Card/templates/SimpleTrendingCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,IAAI,MAAM,YAAS;AAC1B,OAAOC,UAAU,MAAM,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]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Card/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// components/CloseIcon.tsx
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { TouchableOpacity, StyleSheet } from "react-native";
|
|
6
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
7
|
+
import { useTheme } from "../../theme/index.js"; // Assuming your theme setup is here
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const CloseIcon = ({
|
|
10
|
+
onPress,
|
|
11
|
+
show = true,
|
|
12
|
+
customIcon,
|
|
13
|
+
variant = "nested",
|
|
14
|
+
containerStyle,
|
|
15
|
+
iconStyle,
|
|
16
|
+
color: colorProp,
|
|
17
|
+
// Renamed to avoid conflict with theme color
|
|
18
|
+
size = 28,
|
|
19
|
+
isRTL = false
|
|
20
|
+
}) => {
|
|
21
|
+
const theme = useTheme();
|
|
22
|
+
const styles = themedStyles(theme);
|
|
23
|
+
|
|
24
|
+
// Use prop color if provided, otherwise use theme text color
|
|
25
|
+
const iconColor = colorProp ?? theme.text;
|
|
26
|
+
|
|
27
|
+
// Calculate default position based on variant and RTL
|
|
28
|
+
const defaultPosition = variant === "nested" ? {
|
|
29
|
+
top: 10,
|
|
30
|
+
[isRTL ? "left" : "right"]: 10
|
|
31
|
+
} : {
|
|
32
|
+
top: -12,
|
|
33
|
+
[isRTL ? "left" : "right"]: -12
|
|
34
|
+
};
|
|
35
|
+
if (!show || !onPress) {
|
|
36
|
+
return null; // Don't render if not shown or no onPress handler
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
39
|
+
style: [styles.container, defaultPosition, containerStyle],
|
|
40
|
+
onPress: onPress,
|
|
41
|
+
hitSlop: {
|
|
42
|
+
top: 10,
|
|
43
|
+
right: 10,
|
|
44
|
+
bottom: 10,
|
|
45
|
+
left: 10
|
|
46
|
+
} // Improve touch area
|
|
47
|
+
,
|
|
48
|
+
children: customIcon || /*#__PURE__*/_jsx(Ionicons, {
|
|
49
|
+
name: "close",
|
|
50
|
+
size: size,
|
|
51
|
+
color: iconColor,
|
|
52
|
+
style: iconStyle
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const themedStyles = theme => StyleSheet.create({
|
|
57
|
+
container: {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
zIndex: 10 // Ensure it's above other elements
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
export default CloseIcon;
|
|
63
|
+
//# sourceMappingURL=CloseIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","TouchableOpacity","StyleSheet","Ionicons","useTheme","jsx","_jsx","CloseIcon","onPress","show","customIcon","variant","containerStyle","iconStyle","color","colorProp","size","isRTL","theme","styles","themedStyles","iconColor","text","defaultPosition","top","style","container","hitSlop","right","bottom","left","children","name","create","position","zIndex"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/CloseIcon/CloseIcon.tsx"],"mappings":";;AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,gBAAgB,EAChBC,UAAU,QAGL,cAAc;AACrB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAmB,sBAAa,CAAC,CAAC;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAcnD,MAAMC,SAAmC,GAAGA,CAAC;EAC3CC,OAAO;EACPC,IAAI,GAAG,IAAI;EACXC,UAAU;EACVC,OAAO,GAAG,QAAQ;EAClBC,cAAc;EACdC,SAAS;EACTC,KAAK,EAAEC,SAAS;EAAE;EAClBC,IAAI,GAAG,EAAE;EACTC,KAAK,GAAG;AACV,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGd,QAAQ,CAAC,CAAC;EACxB,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":";;AAAA,SAASA,OAAO,IAAIC,SAAS,QAAQ,gBAAa;AAClD,cAAc,gBAAa","ignoreList":[]}
|