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,291 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "../../theme/index.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { Modal, View, Text, TouchableOpacity, StyleSheet, ImageBackground, Dimensions, TouchableWithoutFeedback, Platform, StatusBar, Image } from "react-native";
|
|
6
|
+
import CloseIcon from "../CloseIcon/CloseIcon.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const Popup = ({
|
|
9
|
+
visible,
|
|
10
|
+
onClose,
|
|
11
|
+
backgroundImage,
|
|
12
|
+
title,
|
|
13
|
+
content,
|
|
14
|
+
subtitle,
|
|
15
|
+
primaryButtonText,
|
|
16
|
+
onPrimaryButtonPress,
|
|
17
|
+
secondaryButtonText,
|
|
18
|
+
onSecondaryButtonPress,
|
|
19
|
+
closeOnBackdropPress = true,
|
|
20
|
+
showCloseIcon = false,
|
|
21
|
+
customCloseIcon,
|
|
22
|
+
illustrationImage,
|
|
23
|
+
illustrationStyle,
|
|
24
|
+
containerStyle,
|
|
25
|
+
titleStyle,
|
|
26
|
+
contentStyle,
|
|
27
|
+
primaryButtonStyle,
|
|
28
|
+
primaryButtonTextStyle,
|
|
29
|
+
secondaryButtonStyle,
|
|
30
|
+
secondaryButtonTextStyle,
|
|
31
|
+
contentContainerStyle,
|
|
32
|
+
closeIconContainerStyle,
|
|
33
|
+
closeIconStyle,
|
|
34
|
+
closeIconVariant = "floating",
|
|
35
|
+
subtitleStyle,
|
|
36
|
+
isRTL = false,
|
|
37
|
+
closeIconColor,
|
|
38
|
+
closeIconSize = 28
|
|
39
|
+
}) => {
|
|
40
|
+
const theme = useTheme();
|
|
41
|
+
const styles = createStyles(theme); // Create styles using theme
|
|
42
|
+
|
|
43
|
+
const PopupContent = () => /*#__PURE__*/_jsxs(View, {
|
|
44
|
+
style: [styles.popupContainer, {
|
|
45
|
+
backgroundColor: theme.surface
|
|
46
|
+
},
|
|
47
|
+
// Use surface for popup background
|
|
48
|
+
containerStyle],
|
|
49
|
+
children: [/*#__PURE__*/_jsx(CloseIcon, {
|
|
50
|
+
show: showCloseIcon,
|
|
51
|
+
onPress: onClose,
|
|
52
|
+
customIcon: customCloseIcon,
|
|
53
|
+
variant: closeIconVariant,
|
|
54
|
+
containerStyle: closeIconContainerStyle,
|
|
55
|
+
iconStyle: closeIconStyle,
|
|
56
|
+
color: closeIconColor,
|
|
57
|
+
size: closeIconSize,
|
|
58
|
+
isRTL: isRTL
|
|
59
|
+
}), backgroundImage ? /*#__PURE__*/_jsx(ImageBackground, {
|
|
60
|
+
source: backgroundImage,
|
|
61
|
+
style: styles.backgroundImage,
|
|
62
|
+
imageStyle: styles.backgroundImageStyle,
|
|
63
|
+
children: /*#__PURE__*/_jsx(PopupInnerContent, {})
|
|
64
|
+
}) : /*#__PURE__*/_jsx(PopupInnerContent, {})]
|
|
65
|
+
});
|
|
66
|
+
const PopupInnerContent = () => /*#__PURE__*/_jsxs(View, {
|
|
67
|
+
style: [styles.contentContainer, contentContainerStyle],
|
|
68
|
+
children: [illustrationImage && /*#__PURE__*/_jsx(View, {
|
|
69
|
+
style: styles.illustrationContainer,
|
|
70
|
+
children: /*#__PURE__*/_jsx(Image, {
|
|
71
|
+
source: illustrationImage,
|
|
72
|
+
style: [styles.illustrationImage, illustrationStyle],
|
|
73
|
+
resizeMode: "contain"
|
|
74
|
+
})
|
|
75
|
+
}), title && /*#__PURE__*/_jsx(Text, {
|
|
76
|
+
style: [styles.title, {
|
|
77
|
+
color: theme.text,
|
|
78
|
+
textAlign: "center"
|
|
79
|
+
},
|
|
80
|
+
// Keep text color
|
|
81
|
+
titleStyle],
|
|
82
|
+
children: title
|
|
83
|
+
}), subtitle && /*#__PURE__*/_jsx(Text, {
|
|
84
|
+
style: [styles.subtitle, {
|
|
85
|
+
color: theme.text,
|
|
86
|
+
textAlign: "center"
|
|
87
|
+
},
|
|
88
|
+
// Use helper for subtitle
|
|
89
|
+
subtitleStyle],
|
|
90
|
+
children: subtitle
|
|
91
|
+
}), content && /*#__PURE__*/_jsx(Text, {
|
|
92
|
+
style: [styles.content, {
|
|
93
|
+
color: theme.text,
|
|
94
|
+
textAlign: "center"
|
|
95
|
+
},
|
|
96
|
+
// Keep text color
|
|
97
|
+
contentStyle],
|
|
98
|
+
children: content
|
|
99
|
+
}), (secondaryButtonText || primaryButtonText) && /*#__PURE__*/_jsxs(View, {
|
|
100
|
+
style: [styles.buttonContainer, {
|
|
101
|
+
flexDirection: isRTL ? "row-reverse" : "row"
|
|
102
|
+
}],
|
|
103
|
+
children: [secondaryButtonText && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
104
|
+
style: [styles.secondaryButton, {
|
|
105
|
+
borderColor: theme.primary
|
|
106
|
+
},
|
|
107
|
+
// Keep primary border
|
|
108
|
+
secondaryButtonStyle, isRTL ? {
|
|
109
|
+
marginLeft: 12,
|
|
110
|
+
marginRight: 0
|
|
111
|
+
} : {
|
|
112
|
+
marginRight: 12,
|
|
113
|
+
marginLeft: 0
|
|
114
|
+
}],
|
|
115
|
+
onPress: onSecondaryButtonPress,
|
|
116
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
117
|
+
style: [styles.secondaryButtonText, {
|
|
118
|
+
color: theme.primary
|
|
119
|
+
},
|
|
120
|
+
// Keep primary text color
|
|
121
|
+
secondaryButtonTextStyle],
|
|
122
|
+
children: secondaryButtonText
|
|
123
|
+
})
|
|
124
|
+
}), primaryButtonText && /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
125
|
+
style: [styles.primaryButton, {
|
|
126
|
+
backgroundColor: theme.primary
|
|
127
|
+
},
|
|
128
|
+
// Keep primary background
|
|
129
|
+
primaryButtonStyle],
|
|
130
|
+
onPress: onPrimaryButtonPress,
|
|
131
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
132
|
+
style: [styles.primaryButtonText, {
|
|
133
|
+
color: theme.onPrimary
|
|
134
|
+
},
|
|
135
|
+
// Use onPrimary for text
|
|
136
|
+
primaryButtonTextStyle],
|
|
137
|
+
children: primaryButtonText
|
|
138
|
+
})
|
|
139
|
+
})]
|
|
140
|
+
})]
|
|
141
|
+
});
|
|
142
|
+
return /*#__PURE__*/_jsx(Modal, {
|
|
143
|
+
transparent: true,
|
|
144
|
+
visible: visible,
|
|
145
|
+
animationType: "fade",
|
|
146
|
+
onRequestClose: onClose,
|
|
147
|
+
statusBarTranslucent: true,
|
|
148
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
149
|
+
style: styles.modalOverlay,
|
|
150
|
+
children: [closeOnBackdropPress && /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
151
|
+
onPress: onClose,
|
|
152
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
153
|
+
style: StyleSheet.absoluteFill
|
|
154
|
+
})
|
|
155
|
+
}), /*#__PURE__*/_jsx(TouchableWithoutFeedback, {
|
|
156
|
+
children: /*#__PURE__*/_jsx(PopupContent, {})
|
|
157
|
+
})]
|
|
158
|
+
})
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
const {
|
|
162
|
+
width
|
|
163
|
+
} = Dimensions.get("window");
|
|
164
|
+
const popupWidth = width * 0.85;
|
|
165
|
+
|
|
166
|
+
// Function to create themed styles
|
|
167
|
+
const createStyles = theme => StyleSheet.create({
|
|
168
|
+
modalOverlay: {
|
|
169
|
+
flex: 1,
|
|
170
|
+
backgroundColor: "rgba(0, 0, 0, 0.5)",
|
|
171
|
+
// Keep overlay color
|
|
172
|
+
justifyContent: "center",
|
|
173
|
+
alignItems: "center",
|
|
174
|
+
paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0
|
|
175
|
+
},
|
|
176
|
+
popupContainer: {
|
|
177
|
+
width: popupWidth,
|
|
178
|
+
maxHeight: "80%",
|
|
179
|
+
borderRadius: 16,
|
|
180
|
+
elevation: 5,
|
|
181
|
+
shadowColor: "#000",
|
|
182
|
+
shadowOffset: {
|
|
183
|
+
width: 0,
|
|
184
|
+
height: 2
|
|
185
|
+
},
|
|
186
|
+
shadowOpacity: 0.25,
|
|
187
|
+
shadowRadius: 3.84,
|
|
188
|
+
position: "relative"
|
|
189
|
+
// backgroundColor is set inline using theme.surface
|
|
190
|
+
},
|
|
191
|
+
closeIconContainer: {
|
|
192
|
+
position: "absolute",
|
|
193
|
+
zIndex: 10,
|
|
194
|
+
width: 32,
|
|
195
|
+
height: 32,
|
|
196
|
+
justifyContent: "center",
|
|
197
|
+
alignItems: "center",
|
|
198
|
+
borderWidth: 1,
|
|
199
|
+
borderRadius: 16,
|
|
200
|
+
padding: 0
|
|
201
|
+
// backgroundColor and borderColor set inline
|
|
202
|
+
},
|
|
203
|
+
closeIcon: {
|
|
204
|
+
width: 24,
|
|
205
|
+
height: 24,
|
|
206
|
+
resizeMode: "contain",
|
|
207
|
+
textAlign: "center",
|
|
208
|
+
textAlignVertical: "center",
|
|
209
|
+
lineHeight: 24
|
|
210
|
+
// color is set inline
|
|
211
|
+
},
|
|
212
|
+
backgroundImage: {
|
|
213
|
+
width: "100%",
|
|
214
|
+
height: "100%"
|
|
215
|
+
},
|
|
216
|
+
backgroundImageStyle: {
|
|
217
|
+
borderRadius: 16
|
|
218
|
+
},
|
|
219
|
+
contentContainer: {
|
|
220
|
+
padding: 24,
|
|
221
|
+
alignItems: "center",
|
|
222
|
+
justifyContent: "center",
|
|
223
|
+
borderRadius: 16
|
|
224
|
+
},
|
|
225
|
+
illustrationContainer: {
|
|
226
|
+
marginBottom: 16,
|
|
227
|
+
alignItems: "center",
|
|
228
|
+
justifyContent: "center"
|
|
229
|
+
},
|
|
230
|
+
illustrationImage: {
|
|
231
|
+
width: 150,
|
|
232
|
+
height: 150,
|
|
233
|
+
marginBottom: 8
|
|
234
|
+
},
|
|
235
|
+
title: {
|
|
236
|
+
fontSize: 20,
|
|
237
|
+
fontWeight: "bold",
|
|
238
|
+
marginBottom: 12,
|
|
239
|
+
width: "100%"
|
|
240
|
+
// color is set inline
|
|
241
|
+
},
|
|
242
|
+
subtitle: {
|
|
243
|
+
fontSize: 20,
|
|
244
|
+
// Adjusted size for subtitle
|
|
245
|
+
fontWeight: "bold",
|
|
246
|
+
// Adjusted weight for subtitle
|
|
247
|
+
marginBottom: 12,
|
|
248
|
+
width: "100%"
|
|
249
|
+
},
|
|
250
|
+
content: {
|
|
251
|
+
fontSize: 16,
|
|
252
|
+
marginBottom: 24,
|
|
253
|
+
lineHeight: 22,
|
|
254
|
+
width: "100%"
|
|
255
|
+
// color is set inline
|
|
256
|
+
},
|
|
257
|
+
buttonContainer: {
|
|
258
|
+
justifyContent: "center",
|
|
259
|
+
marginTop: 16,
|
|
260
|
+
width: "100%"
|
|
261
|
+
},
|
|
262
|
+
primaryButton: {
|
|
263
|
+
paddingVertical: 12,
|
|
264
|
+
paddingHorizontal: 32,
|
|
265
|
+
borderRadius: 50,
|
|
266
|
+
minWidth: 120,
|
|
267
|
+
alignItems: "center"
|
|
268
|
+
// backgroundColor is set inline
|
|
269
|
+
},
|
|
270
|
+
primaryButtonText: {
|
|
271
|
+
fontWeight: "600",
|
|
272
|
+
fontSize: 16
|
|
273
|
+
// color is set inline using theme.onPrimary
|
|
274
|
+
},
|
|
275
|
+
secondaryButton: {
|
|
276
|
+
paddingVertical: 12,
|
|
277
|
+
paddingHorizontal: 24,
|
|
278
|
+
borderRadius: 50,
|
|
279
|
+
borderWidth: 1,
|
|
280
|
+
minWidth: 120,
|
|
281
|
+
alignItems: "center"
|
|
282
|
+
// borderColor is set inline
|
|
283
|
+
},
|
|
284
|
+
secondaryButtonText: {
|
|
285
|
+
fontWeight: "600",
|
|
286
|
+
fontSize: 16
|
|
287
|
+
// color is set inline
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
export default Popup;
|
|
291
|
+
//# sourceMappingURL=Popup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useTheme","React","Modal","View","Text","TouchableOpacity","StyleSheet","ImageBackground","Dimensions","TouchableWithoutFeedback","Platform","StatusBar","Image","CloseIcon","jsx","_jsx","jsxs","_jsxs","Popup","visible","onClose","backgroundImage","title","content","subtitle","primaryButtonText","onPrimaryButtonPress","secondaryButtonText","onSecondaryButtonPress","closeOnBackdropPress","showCloseIcon","customCloseIcon","illustrationImage","illustrationStyle","containerStyle","titleStyle","contentStyle","primaryButtonStyle","primaryButtonTextStyle","secondaryButtonStyle","secondaryButtonTextStyle","contentContainerStyle","closeIconContainerStyle","closeIconStyle","closeIconVariant","subtitleStyle","isRTL","closeIconColor","closeIconSize","theme","styles","createStyles","PopupContent","style","popupContainer","backgroundColor","surface","children","show","onPress","customIcon","variant","iconStyle","color","size","source","imageStyle","backgroundImageStyle","PopupInnerContent","contentContainer","illustrationContainer","resizeMode","text","textAlign","buttonContainer","flexDirection","secondaryButton","borderColor","primary","marginLeft","marginRight","primaryButton","onPrimary","transparent","animationType","onRequestClose","statusBarTranslucent","modalOverlay","absoluteFill","width","get","popupWidth","create","flex","justifyContent","alignItems","paddingTop","OS","currentHeight","maxHeight","borderRadius","elevation","shadowColor","shadowOffset","height","shadowOpacity","shadowRadius","position","closeIconContainer","zIndex","borderWidth","padding","closeIcon","textAlignVertical","lineHeight","marginBottom","fontSize","fontWeight","marginTop","paddingVertical","paddingHorizontal","minWidth"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Popup/Popup.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAmB,sBAAa;AACjD,OAAOC,KAAK,MAAyB,OAAO;AAC5C,SACEC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,eAAe,EAEfC,UAAU,EACVC,wBAAwB,EACxBC,QAAQ,EACRC,SAAS,EACTC,KAAK,QAIA,cAAc;AACrB,OAAOC,SAAS,MAAM,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAoC/C,MAAMC,KAAqB,GAAGA,CAAC;EAC7BC,OAAO;EACPC,OAAO;EACPC,eAAe;EACfC,KAAK;EACLC,OAAO;EACPC,QAAQ;EACRC,iBAAiB;EACjBC,oBAAoB;EACpBC,mBAAmB;EACnBC,sBAA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ACdzB,KAAK,EAAE;IACP;EACF,CAAC;EACDf,eAAe,EAAE;IACfoB,cAAc,EAAE,QAAQ;IACxBwB,SAAS,EAAE,EAAE;IACb7B,KAAK,EAAE;EACT,CAAC;EACDR,aAAa,EAAE;IACbsC,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBpB,YAAY,EAAE,EAAE;IAChBqB,QAAQ,EAAE,GAAG;IACb1B,UAAU,EAAE;IACZ;EACF,CAAC;EACDtE,iBAAiB,EAAE;IACjB4F,UAAU,EAAE,KAAK;IACjBD,QAAQ,EAAE;IACV;EACF,CAAC;EACDxC,eAAe,EAAE;IACf2C,eAAe,EAAE,EAAE;IACnBC,iBAAiB,EAAE,EAAE;IACrBpB,YAAY,EAAE,EAAE;IAChBU,WAAW,EAAE,CAAC;IACdW,QAAQ,EAAE,GAAG;IACb1B,UAAU,EAAE;IACZ;EACF,CAAC;EACDpE,mBAAmB,EAAE;IACnB0F,UAAU,EAAE,KAAK;IACjBD,QAAQ,EAAE;IACV;EACF;AACF,CAAC,CAAC;AAEJ,eAAelG,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# Popup
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Popup Documentation
|
|
9
|
+
|
|
10
|
+
The `Popup` is a versatile modal component designed for displaying important information, confirmations, or actions to users. It provides a customizable interface with support for background images, illustrations, titles, content text, and action buttons. The component is fully RTL-compatible and offers different variants for close button positioning.
|
|
11
|
+
|
|
12
|
+
### Usage
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import Popup from "@/components/Popup";
|
|
16
|
+
import { useTheme } from "@/theme";
|
|
17
|
+
|
|
18
|
+
const MyComponent = () => {
|
|
19
|
+
const [isVisible, setIsVisible] = useState(false);
|
|
20
|
+
const theme = useTheme();
|
|
21
|
+
|
|
22
|
+
const handleClose = () => setIsVisible(false);
|
|
23
|
+
const handlePrimaryAction = () => {
|
|
24
|
+
// Do something
|
|
25
|
+
handleClose();
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
return (
|
|
29
|
+
<Popup
|
|
30
|
+
visible={isVisible}
|
|
31
|
+
onClose={handleClose}
|
|
32
|
+
showCloseIcon={true}
|
|
33
|
+
containerStyle={{ borderColor: "white", borderWidth: 1, height: 300, width:400 }}
|
|
34
|
+
title="UNLOCK"
|
|
35
|
+
closeIconVariant="nested"
|
|
36
|
+
content="Upgrade to Visa signature to get your Card Now!"
|
|
37
|
+
primaryButtonText="Upgrade"
|
|
38
|
+
subtitle={`60%\nDiscount`}
|
|
39
|
+
backgroundImage={require("@/assets/images/face.jpg")}
|
|
40
|
+
onPrimaryButtonPress={handleUpgrade}
|
|
41
|
+
contentContainerStyle={{backgroundColor:"rgba(0,0,0,0.5)", flex: 1}}
|
|
42
|
+
closeIconContainerStyle={{backgroundColor:"white"}}
|
|
43
|
+
customCloseIcon={<Ionicons name="close" size={20} color={"black"} />}
|
|
44
|
+
/>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Illustration Example
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
<Popup
|
|
53
|
+
visible={isVisible}
|
|
54
|
+
onClose={handleClose}
|
|
55
|
+
showCloseIcon={true}
|
|
56
|
+
containerStyle={{ borderColor: "white", borderWidth: 1 }}
|
|
57
|
+
illustrationImage={require('@/assets/images/upgrade.png')} // Path to your illustration
|
|
58
|
+
title="UNLOCK"
|
|
59
|
+
closeIconVariant="nested"
|
|
60
|
+
content="Upgrade to Visa signature to get your Card Now!"
|
|
61
|
+
primaryButtonText="Upgrade"
|
|
62
|
+
primaryButtonStyle={{width: 300, backgroundColor:"#E94DAA"}}
|
|
63
|
+
onPrimaryButtonPress={handleUpgrade}
|
|
64
|
+
customCloseIcon={<Ionicons
|
|
65
|
+
name="close"
|
|
66
|
+
size={20}
|
|
67
|
+
color={"#E94DAA"}/>}
|
|
68
|
+
/>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### RTL
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
<Popup
|
|
75
|
+
visible={isVisible}
|
|
76
|
+
onClose={handleClose}
|
|
77
|
+
showCloseIcon={true}
|
|
78
|
+
title="ترقية إلى النسخة المميزة"
|
|
79
|
+
subtitle="استمتع بمزايا حصرية"
|
|
80
|
+
content="احصل على جميع الميزات المتقدمة والمحتوى الحصري بدون إعلانات. اشترك الآن واستمتع بتجربة كاملة مع تحديثات مجانية لمدة عام كامل."
|
|
81
|
+
primaryButtonText="ترقية الآن"
|
|
82
|
+
secondaryButtonText="ليس الآن"
|
|
83
|
+
onPrimaryButtonPress={handleUpgrade}
|
|
84
|
+
onSecondaryButtonPress={handleDismiss}
|
|
85
|
+
isRTL={true}
|
|
86
|
+
/>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Props
|
|
90
|
+
|
|
91
|
+
| Prop | Type | Default | Description |
|
|
92
|
+
|------|------|---------|-------------|
|
|
93
|
+
| `visible` | `boolean` | Required | Controls the visibility of the popup |
|
|
94
|
+
| `onClose` | `() => void` | Required | Function to call when popup should be closed |
|
|
95
|
+
| `backgroundImage` | `ImageSourcePropType` | `undefined` | Optional background image for the popup |
|
|
96
|
+
| `title` | `string` | `undefined` | Main title text |
|
|
97
|
+
| `subtitle` | `string` | `undefined` | Subtitle text displayed below title |
|
|
98
|
+
| `content` | `string` | `undefined` | Main content text |
|
|
99
|
+
| `children` | `ReactNode` | `undefined` | Custom content to render inside the popup |
|
|
100
|
+
| `primaryButtonText` | `string` | `undefined` | Text for the primary action button |
|
|
101
|
+
| `onPrimaryButtonPress` | `() => void` | `undefined` | Function to execute when primary button is pressed |
|
|
102
|
+
| `secondaryButtonText` | `string` | `undefined` | Text for the secondary action button |
|
|
103
|
+
| `onSecondaryButtonPress` | `() => void` | `undefined` | Function to execute when secondary button is pressed |
|
|
104
|
+
| `closeOnBackdropPress` | `boolean` | `true` | Whether tapping outside the popup should close it |
|
|
105
|
+
| `showCloseIcon` | `boolean` | `false` | Whether to show the close icon button |
|
|
106
|
+
| `closeIconVariant` | `"floating" \| "nested"` | `"floating"` | Style variant for the close icon position |
|
|
107
|
+
| `customCloseIcon` | `ReactNode` | `undefined` | Custom component to use as close icon |
|
|
108
|
+
| `illustrationImage` | `ImageSourcePropType` | `undefined` | Image to display at the top of the content area |
|
|
109
|
+
| `isRTL` | `boolean` | `false` | Whether to render in right-to-left mode |
|
|
110
|
+
| `containerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the container |
|
|
111
|
+
| `contentContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the content container |
|
|
112
|
+
| `titleStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the title text |
|
|
113
|
+
| `subtitleStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the subtitle text |
|
|
114
|
+
| `contentStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the content text |
|
|
115
|
+
| `primaryButtonStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the primary button |
|
|
116
|
+
| `primaryButtonTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the primary button text |
|
|
117
|
+
| `secondaryButtonStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the secondary button |
|
|
118
|
+
| `secondaryButtonTextStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the secondary button text |
|
|
119
|
+
| `closeIconContainerStyle` | `StyleProp<ViewStyle>` | `undefined` | Additional styles for the close icon container |
|
|
120
|
+
| `closeIconStyle` | `StyleProp<TextStyle>` | `undefined` | Additional styles for the close icon |
|
|
121
|
+
| `illustrationStyle` | `StyleProp<ImageStyle>` | `undefined` | Additional styles for the illustration image |
|
|
122
|
+
|
|
123
|
+
### Close Icon Variants
|
|
124
|
+
|
|
125
|
+
- **Floating**: The close icon appears outside the popup's main border, creating a floating effect
|
|
126
|
+
- **Nested**: The close icon appears inside the popup's border in the top-right (or top-left in RTL mode)
|
|
127
|
+
|
|
128
|
+
### Related Components
|
|
129
|
+
|
|
130
|
+
- `Modal`: The native React Native component used as the foundation
|
|
131
|
+
- `ImageBackground`: Used when a background image is provided
|
|
132
|
+
- `TouchableOpacity`: Used for the buttons and close icon
|
|
133
|
+
- `Text`: Used for rendering text content
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","Popup"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Popup/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,KAAK,QAAO,YAAS;AACzC,cAAc,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useTheme } from "../../theme/ThemeContext.js";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { View, Text, StyleSheet } from "react-native";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const ProgressBar = ({
|
|
8
|
+
progress = 0.5,
|
|
9
|
+
text = "",
|
|
10
|
+
containerStyle = {},
|
|
11
|
+
barContainerStyle = {},
|
|
12
|
+
progressStyle = {},
|
|
13
|
+
remainingStyle = {},
|
|
14
|
+
textStyle = {},
|
|
15
|
+
progressColor: progressColorProp,
|
|
16
|
+
remainingColor: remainingColorProp,
|
|
17
|
+
textColor: textColorProp,
|
|
18
|
+
height = 40,
|
|
19
|
+
width,
|
|
20
|
+
borderRadius = 5,
|
|
21
|
+
textPosition = "inside",
|
|
22
|
+
textAlign = "left",
|
|
23
|
+
showText = true,
|
|
24
|
+
isRTL = false
|
|
25
|
+
}) => {
|
|
26
|
+
const theme = useTheme();
|
|
27
|
+
const progressColor = progressColorProp ?? theme.primary;
|
|
28
|
+
const remainingColor = remainingColorProp ?? theme.border;
|
|
29
|
+
const textColor = textColorProp ?? theme.onPrimary;
|
|
30
|
+
const clampedProgress = Math.min(Math.max(progress, 0), 1);
|
|
31
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
32
|
+
style: [styles.container, containerStyle, {
|
|
33
|
+
width
|
|
34
|
+
}],
|
|
35
|
+
children: [textPosition === "above" && showText && /*#__PURE__*/_jsx(Text, {
|
|
36
|
+
style: [styles.textAbove, {
|
|
37
|
+
color: theme.text,
|
|
38
|
+
textAlign
|
|
39
|
+
},
|
|
40
|
+
// Use theme.text for outside text
|
|
41
|
+
textStyle],
|
|
42
|
+
children: text
|
|
43
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
44
|
+
style: [styles.barContainer, {
|
|
45
|
+
height,
|
|
46
|
+
borderRadius,
|
|
47
|
+
backgroundColor: remainingColor
|
|
48
|
+
}, barContainerStyle],
|
|
49
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
50
|
+
style: [styles.progressBar, isRTL ? {
|
|
51
|
+
right: 0
|
|
52
|
+
} : {
|
|
53
|
+
left: 0
|
|
54
|
+
}, {
|
|
55
|
+
width: `${clampedProgress * 100}%`,
|
|
56
|
+
height: "100%",
|
|
57
|
+
borderRadius,
|
|
58
|
+
backgroundColor: progressColor
|
|
59
|
+
}, progressStyle]
|
|
60
|
+
}), textPosition === "inside" && showText && /*#__PURE__*/_jsx(Text, {
|
|
61
|
+
style: [styles.textInside, {
|
|
62
|
+
color: textColor,
|
|
63
|
+
textAlign
|
|
64
|
+
},
|
|
65
|
+
// Use determined textColor for inside
|
|
66
|
+
textStyle],
|
|
67
|
+
children: text
|
|
68
|
+
})]
|
|
69
|
+
}), textPosition === "below" && showText && /*#__PURE__*/_jsx(Text, {
|
|
70
|
+
numberOfLines: 1,
|
|
71
|
+
style: [styles.textBelow, {
|
|
72
|
+
color: theme.text,
|
|
73
|
+
textAlign
|
|
74
|
+
},
|
|
75
|
+
// Use theme.text for outside text
|
|
76
|
+
textStyle],
|
|
77
|
+
children: text
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const styles = StyleSheet.create({
|
|
82
|
+
container: {
|
|
83
|
+
width: "100%",
|
|
84
|
+
justifyContent: "center"
|
|
85
|
+
},
|
|
86
|
+
barContainer: {
|
|
87
|
+
width: "100%",
|
|
88
|
+
overflow: "hidden",
|
|
89
|
+
position: "relative"
|
|
90
|
+
},
|
|
91
|
+
progressBar: {
|
|
92
|
+
position: "absolute",
|
|
93
|
+
top: 0
|
|
94
|
+
},
|
|
95
|
+
textInside: {
|
|
96
|
+
position: "absolute",
|
|
97
|
+
left: 0,
|
|
98
|
+
right: 0,
|
|
99
|
+
top: 0,
|
|
100
|
+
bottom: 0,
|
|
101
|
+
textAlign: "center",
|
|
102
|
+
textAlignVertical: "center",
|
|
103
|
+
paddingHorizontal: 10,
|
|
104
|
+
fontWeight: "bold"
|
|
105
|
+
},
|
|
106
|
+
textAbove: {
|
|
107
|
+
marginBottom: 5,
|
|
108
|
+
fontWeight: "bold"
|
|
109
|
+
},
|
|
110
|
+
textBelow: {
|
|
111
|
+
marginTop: 5,
|
|
112
|
+
fontWeight: "bold"
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
export default ProgressBar;
|
|
116
|
+
//# sourceMappingURL=ProgressBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useTheme","React","View","Text","StyleSheet","jsx","_jsx","jsxs","_jsxs","ProgressBar","progress","text","containerStyle","barContainerStyle","progressStyle","remainingStyle","textStyle","progressColor","progressColorProp","remainingColor","remainingColorProp","textColor","textColorProp","height","width","borderRadius","textPosition","textAlign","showText","isRTL","theme","primary","border","onPrimary","clampedProgress","Math","min","max","style","styles","container","children","textAbove","color","barContainer","backgroundColor","progressBar","right","left","textInside","numberOfLines","textBelow","create","justifyContent","overflow","position","top","bottom","textAlignVertical","paddingHorizontal","fontWeight","marginBottom","marginTop"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/ProgressBar/ProgressBar.tsx"],"mappings":";;AAAA,SAASA,QA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;EAC/BZ,SAAS,EAAE;IACThB,KAAK,EAAE,MAAM;IACb6B,cAAc,EAAE;EAClB,CAAC;EACDT,YAAY,EAAE;IACZpB,KAAK,EAAE,MAAM;IACb8B,QAAQ,EAAE,QAAQ;IAClBC,QAAQ,EAAE;EACZ,CAAC;EACDT,WAAW,EAAE;IACXS,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACP,CAAC;EACDP,UAAU,EAAE;IACVM,QAAQ,EAAE,UAAU;IACpBP,IAAI,EAAE,CAAC;IACPD,KAAK,EAAE,CAAC;IACRS,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE,CAAC;IACT9B,SAAS,EAAE,QAAQ;IACnB+B,iBAAiB,EAAE,QAAQ;IAC3BC,iBAAiB,EAAE,EAAE;IACrBC,UAAU,EAAE;EACd,CAAC;EACDlB,SAAS,EAAE;IACTmB,YAAY,EAAE,CAAC;IACfD,UAAU,EAAE;EACd,CAAC;EACDT,SAAS,EAAE;IACTW,SAAS,EAAE,CAAC;IACZF,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAenD,WAAW","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","ProgressBar"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/ProgressBar/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,WAAW,QAAO,kBAAe;AACrD,cAAc,kBAAe","ignoreList":[]}
|