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,141 @@
|
|
|
1
|
+
# SpinWheel Component
|
|
2
|
+
|
|
3
|
+
A customizable spinning wheel component for React Native applications that allows users to create interactive prize wheels, random selectors, or game elements.
|
|
4
|
+
|
|
5
|
+
## Basic Usage
|
|
6
|
+
|
|
7
|
+
```jsx
|
|
8
|
+
import React, { useState } from 'react';
|
|
9
|
+
import { View, Alert } from 'react-native';
|
|
10
|
+
import { SpinWheel } from '@your-org/component-library';
|
|
11
|
+
|
|
12
|
+
const MySpinWheelExample = () => {
|
|
13
|
+
const items = [
|
|
14
|
+
{ id: 1, label: '10% OFF', color: '#FF0000', value: { discount: 10 } },
|
|
15
|
+
{ id: 2, label: '20% OFF', color: '#00FF00', value: { discount: 20 } },
|
|
16
|
+
{ id: 3, label: '30% OFF', color: '#0000FF', value: { discount: 30 } },
|
|
17
|
+
{ id: 4, label: 'FREE GIFT', color: '#FFFF00', value: { type: 'gift' } },
|
|
18
|
+
{ id: 5, label: 'BETTER LUCK', color: '#FF00FF', value: null },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const handleWin = (item) => {
|
|
22
|
+
Alert.alert('Congratulations!', `You won: ${item.label}`);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
|
27
|
+
<SpinWheel
|
|
28
|
+
items={items}
|
|
29
|
+
size={300}
|
|
30
|
+
onSpinEnd={handleWin}
|
|
31
|
+
/>
|
|
32
|
+
</View>
|
|
33
|
+
);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default MySpinWheelExample;
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Props
|
|
40
|
+
|
|
41
|
+
### Data Props
|
|
42
|
+
|
|
43
|
+
| Prop | Type | Required | Default | Description |
|
|
44
|
+
|------|------|----------|---------|-------------|
|
|
45
|
+
| `items` | `SpinWheelItem[]` | ✅ | `[]` | Array of items to display on the wheel |
|
|
46
|
+
|
|
47
|
+
#### SpinWheelItem Interface
|
|
48
|
+
|
|
49
|
+
```typescript
|
|
50
|
+
interface SpinWheelItem {
|
|
51
|
+
id: string | number; // Unique identifier
|
|
52
|
+
label: string; // Text to display on the wheel
|
|
53
|
+
value?: any; // Optional value associated with the item
|
|
54
|
+
color: string; // Background color (HEX, RGB, or named color)
|
|
55
|
+
textColor?: string; // Text color (defaults to wheelTextColor)
|
|
56
|
+
}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Dimension Props
|
|
60
|
+
|
|
61
|
+
| Prop | Type | Required | Default | Description |
|
|
62
|
+
|------|------|----------|---------|-------------|
|
|
63
|
+
| `size` | `number` | ❌ | `300` | Diameter of the wheel in pixels |
|
|
64
|
+
|
|
65
|
+
### Behavior Props
|
|
66
|
+
|
|
67
|
+
| Prop | Type | Required | Default | Description |
|
|
68
|
+
|------|------|----------|---------|-------------|
|
|
69
|
+
| `spinDuration` | `number` | ❌ | `5000` | Duration of spin animation in milliseconds |
|
|
70
|
+
| `enabled` | `boolean` | ❌ | `true` | Whether the wheel can be spun |
|
|
71
|
+
|
|
72
|
+
### Event Props
|
|
73
|
+
|
|
74
|
+
| Prop | Type | Required | Default | Description |
|
|
75
|
+
|------|------|----------|---------|-------------|
|
|
76
|
+
| `onSpinStart` | `() => void` | ❌ | - | Callback function called when spinning starts |
|
|
77
|
+
| `onSpinEnd` | `(item: SpinWheelItem) => void` | ❌ | - | Callback function called when spinning ends with the winning item |
|
|
78
|
+
|
|
79
|
+
### Styling Props
|
|
80
|
+
|
|
81
|
+
| Prop | Type | Required | Default | Description |
|
|
82
|
+
|------|------|----------|---------|-------------|
|
|
83
|
+
| `containerStyle` | `ViewStyle` | ❌ | - | Custom style for the container |
|
|
84
|
+
| `centerStyle` | `ViewStyle` | ❌ | - | Custom style for the center of the wheel |
|
|
85
|
+
| `spinButtonText` | `string` | ❌ | `"Spin"` | Text for the spin button |
|
|
86
|
+
| `spinButtonStyle` | `ViewStyle` | ❌ | - | Custom style for the spin button |
|
|
87
|
+
| `spinButtonTextStyle` | `TextStyle` | ❌ | - | Custom style for the spin button text |
|
|
88
|
+
| `wheelTextStyle` | `TextStyle` | ❌ | - | Custom style for the text on the wheel |
|
|
89
|
+
| `knobStyle` | `ViewStyle` | ❌ | - | Custom style for the pointer |
|
|
90
|
+
| `actionButtonStyle` | `ViewStyle` | ❌ | - | Custom style for the action button |
|
|
91
|
+
| `actionButtonTextStyle` | `TextStyle` | ❌ | - | Custom style for the action button text |
|
|
92
|
+
| `wheelBorderColor` | `string` | ❌ | `"#000000"` | Color of the wheel border |
|
|
93
|
+
| `wheelTextColor` | `string` | ❌ | `"#FFFFFF"` | Default color of text on the wheel |
|
|
94
|
+
| `knobColor` | `string` | ❌ | `"#D81E5B"` | Color of the pointer |
|
|
95
|
+
| `centerComponent` | `React.ReactNode` | ❌ | - | Custom component to render in the center |
|
|
96
|
+
|
|
97
|
+
## Advanced Examples
|
|
98
|
+
|
|
99
|
+
### Custom Styling
|
|
100
|
+
|
|
101
|
+
```jsx
|
|
102
|
+
<SpinWheel
|
|
103
|
+
items={items}
|
|
104
|
+
size={350}
|
|
105
|
+
spinDuration={6000}
|
|
106
|
+
knobColor="#FF5722"
|
|
107
|
+
wheelTextColor="#000000"
|
|
108
|
+
containerStyle={{ backgroundColor: '#F5F5F5', padding: 20, borderRadius: 10 }}
|
|
109
|
+
centerStyle={{ backgroundColor: '#FFC107' }}
|
|
110
|
+
spinButtonText="Try Your Luck!"
|
|
111
|
+
spinButtonStyle={{ backgroundColor: '#4CAF50' }}
|
|
112
|
+
spinButtonTextStyle={{ color: 'white', fontSize: 18 }}
|
|
113
|
+
onSpinEnd={handleWin}
|
|
114
|
+
/>
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
<!-- ### With Custom Center Component
|
|
118
|
+
|
|
119
|
+
```jsx
|
|
120
|
+
<SpinWheel
|
|
121
|
+
items={items}
|
|
122
|
+
size={400}
|
|
123
|
+
centerComponent={
|
|
124
|
+
<Image
|
|
125
|
+
source={require('./logo.png')}
|
|
126
|
+
style={{ width: 60, height: 60 }}
|
|
127
|
+
/>
|
|
128
|
+
}
|
|
129
|
+
onSpinEnd={handleWin}
|
|
130
|
+
/>
|
|
131
|
+
``` -->
|
|
132
|
+
|
|
133
|
+
### Disabled State
|
|
134
|
+
|
|
135
|
+
```jsx
|
|
136
|
+
<SpinWheel
|
|
137
|
+
items={items}
|
|
138
|
+
enabled={userHasCredits}
|
|
139
|
+
onSpinEnd={handleWin}
|
|
140
|
+
/>
|
|
141
|
+
```
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useRef, useEffect } from "react";
|
|
4
|
+
import { View, StyleSheet, Animated, Text, TouchableOpacity, Easing } from "react-native";
|
|
5
|
+
import { Svg, Path, G, Text as SvgText } from "react-native-svg";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
//default random colors
|
|
8
|
+
const colors = ["#FF0000",
|
|
9
|
+
// Red
|
|
10
|
+
"#FFA500",
|
|
11
|
+
// Orange
|
|
12
|
+
"#FFFF00",
|
|
13
|
+
// Yellow
|
|
14
|
+
"#008000",
|
|
15
|
+
// Green
|
|
16
|
+
"#0000FF",
|
|
17
|
+
// Blue
|
|
18
|
+
"#800080",
|
|
19
|
+
// Purple
|
|
20
|
+
"#FFC0CB",
|
|
21
|
+
// Pink
|
|
22
|
+
"#00FFFF",
|
|
23
|
+
// Cyan
|
|
24
|
+
"#FF00FF",
|
|
25
|
+
// Magenta
|
|
26
|
+
"#00FF00",
|
|
27
|
+
// Lime
|
|
28
|
+
"#4B0082",
|
|
29
|
+
// Indigo
|
|
30
|
+
"#EE82EE",
|
|
31
|
+
// Violet
|
|
32
|
+
"#40E0D0",
|
|
33
|
+
// Turquoise
|
|
34
|
+
"#FFD700",
|
|
35
|
+
// Gold
|
|
36
|
+
"#C0C0C0",
|
|
37
|
+
// Silver
|
|
38
|
+
"#FFDAB9",
|
|
39
|
+
// Peach
|
|
40
|
+
"#E6E6FA",
|
|
41
|
+
// Lavender
|
|
42
|
+
"#008080",
|
|
43
|
+
// Teal
|
|
44
|
+
"#FF7F50",
|
|
45
|
+
// Coral
|
|
46
|
+
"#DC143C",
|
|
47
|
+
// Crimson
|
|
48
|
+
"#87CEEB",
|
|
49
|
+
// Sky Blue
|
|
50
|
+
"#7FFF00",
|
|
51
|
+
// Chartreuse
|
|
52
|
+
"#CCCCFF",
|
|
53
|
+
// Periwinkle
|
|
54
|
+
"#FF6347",
|
|
55
|
+
// Tomato
|
|
56
|
+
"#FA8072" // Salmon
|
|
57
|
+
];
|
|
58
|
+
const SpinWheel = ({
|
|
59
|
+
items,
|
|
60
|
+
size = 300,
|
|
61
|
+
spinDuration = 5000,
|
|
62
|
+
enabled = true,
|
|
63
|
+
onSpinStart,
|
|
64
|
+
onSpinEnd,
|
|
65
|
+
containerStyle,
|
|
66
|
+
centerStyle,
|
|
67
|
+
spinButtonText = "Spin",
|
|
68
|
+
wheelTextStyle,
|
|
69
|
+
knobStyle,
|
|
70
|
+
knobColor = "#D81E5B",
|
|
71
|
+
actionButtonStyle,
|
|
72
|
+
actionButtonTextStyle,
|
|
73
|
+
wheelTextColor = "#FFFFFF"
|
|
74
|
+
}) => {
|
|
75
|
+
const wheelItems = items.length > 0 ? items : [];
|
|
76
|
+
const [spinning, setSpinning] = useState(false);
|
|
77
|
+
const [_, setWinner] = useState(null);
|
|
78
|
+
const rotateValue = useRef(new Animated.Value(0)).current;
|
|
79
|
+
|
|
80
|
+
// Track rotation manually for calculations
|
|
81
|
+
const rotationRef = useRef(0);
|
|
82
|
+
|
|
83
|
+
// Update tracked rotation when animation completes
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
const listener = rotateValue.addListener(({
|
|
86
|
+
value
|
|
87
|
+
}) => {
|
|
88
|
+
rotationRef.current = value;
|
|
89
|
+
});
|
|
90
|
+
return () => {
|
|
91
|
+
rotateValue.removeListener(listener);
|
|
92
|
+
};
|
|
93
|
+
}, [rotateValue]);
|
|
94
|
+
|
|
95
|
+
// Calculate angle for each segment
|
|
96
|
+
const anglePerItem = 360 / wheelItems.length;
|
|
97
|
+
|
|
98
|
+
// Create wheel segments
|
|
99
|
+
const generateWheelPaths = () => {
|
|
100
|
+
return wheelItems.map((item, index) => {
|
|
101
|
+
const startAngle = index * anglePerItem;
|
|
102
|
+
const endAngle = (index + 1) * anglePerItem;
|
|
103
|
+
|
|
104
|
+
// Calculate path for segment
|
|
105
|
+
const startRad = startAngle * Math.PI / 180;
|
|
106
|
+
const endRad = endAngle * Math.PI / 180;
|
|
107
|
+
const x1 = size / 2 + size / 2 * Math.cos(startRad);
|
|
108
|
+
const y1 = size / 2 + size / 2 * Math.sin(startRad);
|
|
109
|
+
const x2 = size / 2 + size / 2 * Math.cos(endRad);
|
|
110
|
+
const y2 = size / 2 + size / 2 * Math.sin(endRad);
|
|
111
|
+
const largeArcFlag = endAngle - startAngle <= 180 ? "0" : "1";
|
|
112
|
+
const pathData = [`M ${size / 2} ${size / 2}`, `L ${x1} ${y1}`, `A ${size / 2} ${size / 2} 0 ${largeArcFlag} 1 ${x2} ${y2}`, "Z"].join(" ");
|
|
113
|
+
|
|
114
|
+
// Calculate coordinates for text and decoration
|
|
115
|
+
const midRad = (startAngle + endAngle) / 2 * (Math.PI / 180);
|
|
116
|
+
const textX = size / 2 + size * 0.32 * Math.cos(midRad);
|
|
117
|
+
const textY = size / 2 + size * 0.32 * Math.sin(midRad);
|
|
118
|
+
const decorationX = size / 2 + size * 0.43 * Math.cos(midRad);
|
|
119
|
+
const decorationY = size / 2 + size * 0.43 * Math.sin(midRad);
|
|
120
|
+
return {
|
|
121
|
+
path: pathData,
|
|
122
|
+
item,
|
|
123
|
+
textX,
|
|
124
|
+
textY,
|
|
125
|
+
decorationX,
|
|
126
|
+
decorationY,
|
|
127
|
+
angle: (startAngle + endAngle) / 2
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
const wheelPaths = generateWheelPaths();
|
|
132
|
+
|
|
133
|
+
// Handle spin button press
|
|
134
|
+
const handleSpin = () => {
|
|
135
|
+
if (spinning || !enabled) return;
|
|
136
|
+
setSpinning(true);
|
|
137
|
+
onSpinStart?.();
|
|
138
|
+
|
|
139
|
+
// Random number of spins (3-5 full rotations) plus random angle
|
|
140
|
+
const randomSpins = 3 + Math.random() * 2;
|
|
141
|
+
const randomAngle = Math.random() * 360;
|
|
142
|
+
const targetRotation = 360 * randomSpins + randomAngle;
|
|
143
|
+
Animated.timing(rotateValue, {
|
|
144
|
+
toValue: rotationRef.current + targetRotation / 360,
|
|
145
|
+
duration: spinDuration,
|
|
146
|
+
easing: Easing.out(Easing.cubic),
|
|
147
|
+
useNativeDriver: true
|
|
148
|
+
}).start(() => handleSpinEnd());
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// Handle spin completion
|
|
152
|
+
const handleSpinEnd = () => {
|
|
153
|
+
setSpinning(false);
|
|
154
|
+
|
|
155
|
+
// Calculate winning segment based on final rotation with pointer at 270 degrees
|
|
156
|
+
const normalizedAngle = rotationRef.current * 360 % 360;
|
|
157
|
+
// Adjust calculation to account for pointer at 270 degrees (instead of 0)
|
|
158
|
+
const winningIndex = Math.floor((normalizedAngle - 270) % 360 / anglePerItem);
|
|
159
|
+
const adjustedIndex = (wheelItems.length - 1 - winningIndex) % wheelItems.length;
|
|
160
|
+
const winningItem = wheelItems[adjustedIndex >= 0 ? adjustedIndex : wheelItems.length + adjustedIndex];
|
|
161
|
+
setWinner(winningItem);
|
|
162
|
+
onSpinEnd?.(winningItem);
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// Animation interpolation for rotation
|
|
166
|
+
const rotate = rotateValue.interpolate({
|
|
167
|
+
inputRange: [0, 1],
|
|
168
|
+
outputRange: ["0deg", "360deg"]
|
|
169
|
+
});
|
|
170
|
+
return /*#__PURE__*/_jsx(View, {
|
|
171
|
+
style: [styles.container, containerStyle],
|
|
172
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
173
|
+
style: {
|
|
174
|
+
width: size,
|
|
175
|
+
height: size
|
|
176
|
+
},
|
|
177
|
+
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
178
|
+
style: [styles.wheelContainer, {
|
|
179
|
+
width: size,
|
|
180
|
+
height: size,
|
|
181
|
+
borderRadius: size / 2,
|
|
182
|
+
transform: [{
|
|
183
|
+
rotate
|
|
184
|
+
}]
|
|
185
|
+
}],
|
|
186
|
+
children: /*#__PURE__*/_jsx(Svg, {
|
|
187
|
+
width: size,
|
|
188
|
+
height: size,
|
|
189
|
+
viewBox: `0 0 ${size} ${size}`,
|
|
190
|
+
children: /*#__PURE__*/_jsx(G, {
|
|
191
|
+
children: wheelPaths.map(({
|
|
192
|
+
path,
|
|
193
|
+
item,
|
|
194
|
+
textX,
|
|
195
|
+
textY,
|
|
196
|
+
decorationX,
|
|
197
|
+
decorationY,
|
|
198
|
+
angle
|
|
199
|
+
}, index) => {
|
|
200
|
+
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
201
|
+
children: [/*#__PURE__*/_jsx(Path, {
|
|
202
|
+
d: path,
|
|
203
|
+
fill: item.color == "" || null ? colors[Math.floor(Math.random() * colors.length)] : item.color,
|
|
204
|
+
stroke: "#000000",
|
|
205
|
+
strokeWidth: 1
|
|
206
|
+
}), /*#__PURE__*/_jsx(SvgText, {
|
|
207
|
+
x: textX,
|
|
208
|
+
y: textY,
|
|
209
|
+
fill: item.textColor || wheelTextColor,
|
|
210
|
+
fontSize: wheelTextStyle?.fontSize || 14,
|
|
211
|
+
fontWeight: wheelTextStyle?.fontWeight || "bold",
|
|
212
|
+
textAnchor: "middle",
|
|
213
|
+
alignmentBaseline: "central",
|
|
214
|
+
transform: `rotate(${angle + 180}, ${textX}, ${textY} )`,
|
|
215
|
+
children: item.label
|
|
216
|
+
})]
|
|
217
|
+
}, item.id);
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
})
|
|
221
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
222
|
+
style: [styles.wheelCenter, {
|
|
223
|
+
width: size / 5,
|
|
224
|
+
height: size / 5,
|
|
225
|
+
transform: [{
|
|
226
|
+
translateX: -size / 10
|
|
227
|
+
}, {
|
|
228
|
+
translateY: -size / 10
|
|
229
|
+
}],
|
|
230
|
+
borderRadius: size / 5
|
|
231
|
+
}, centerStyle]
|
|
232
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
233
|
+
style: styles.pointerPosition,
|
|
234
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
235
|
+
style: [styles.pointer, {
|
|
236
|
+
borderBottomColor: knobColor
|
|
237
|
+
}, knobStyle]
|
|
238
|
+
})
|
|
239
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
240
|
+
style: {
|
|
241
|
+
position: "absolute",
|
|
242
|
+
width: "100%",
|
|
243
|
+
alignItems: "center",
|
|
244
|
+
justifyContent: "center",
|
|
245
|
+
bottom: -70,
|
|
246
|
+
zIndex: 2
|
|
247
|
+
},
|
|
248
|
+
children: /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
249
|
+
onPress: handleSpin,
|
|
250
|
+
disabled: spinning || !enabled,
|
|
251
|
+
style: [styles.actionButton, actionButtonStyle],
|
|
252
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
253
|
+
style: [styles.actionButtonText, actionButtonTextStyle],
|
|
254
|
+
children: spinButtonText
|
|
255
|
+
})
|
|
256
|
+
})
|
|
257
|
+
})]
|
|
258
|
+
})
|
|
259
|
+
});
|
|
260
|
+
};
|
|
261
|
+
const styles = StyleSheet.create({
|
|
262
|
+
container: {
|
|
263
|
+
alignItems: "center",
|
|
264
|
+
justifyContent: "center",
|
|
265
|
+
marginTop: 20,
|
|
266
|
+
marginBottom: 70 // Space for the button
|
|
267
|
+
},
|
|
268
|
+
wheelContainer: {
|
|
269
|
+
overflow: "hidden",
|
|
270
|
+
backgroundColor: "transparent"
|
|
271
|
+
},
|
|
272
|
+
wheelCenter: {
|
|
273
|
+
position: "absolute",
|
|
274
|
+
top: "50%",
|
|
275
|
+
left: "50%",
|
|
276
|
+
backgroundColor: "#000000",
|
|
277
|
+
borderWidth: 1,
|
|
278
|
+
borderColor: "#333333",
|
|
279
|
+
zIndex: 1
|
|
280
|
+
},
|
|
281
|
+
pointerPosition: {
|
|
282
|
+
position: "absolute",
|
|
283
|
+
left: "50%",
|
|
284
|
+
transform: [{
|
|
285
|
+
translateX: -10
|
|
286
|
+
}, {
|
|
287
|
+
rotate: "180deg"
|
|
288
|
+
}],
|
|
289
|
+
zIndex: 2
|
|
290
|
+
},
|
|
291
|
+
pointer: {
|
|
292
|
+
width: 0,
|
|
293
|
+
height: 0,
|
|
294
|
+
backgroundColor: "transparent",
|
|
295
|
+
borderStyle: "solid",
|
|
296
|
+
borderLeftWidth: 10,
|
|
297
|
+
borderRightWidth: 10,
|
|
298
|
+
borderBottomWidth: 15,
|
|
299
|
+
borderLeftColor: "transparent",
|
|
300
|
+
borderRightColor: "transparent",
|
|
301
|
+
borderBottomColor: "#D81E5B"
|
|
302
|
+
},
|
|
303
|
+
actionButton: {
|
|
304
|
+
paddingHorizontal: 30,
|
|
305
|
+
paddingVertical: 12,
|
|
306
|
+
borderRadius: 25,
|
|
307
|
+
shadowColor: "#000",
|
|
308
|
+
shadowRadius: 3,
|
|
309
|
+
backgroundColor: "grey"
|
|
310
|
+
},
|
|
311
|
+
actionButtonText: {
|
|
312
|
+
fontWeight: "bold",
|
|
313
|
+
fontSize: 16
|
|
314
|
+
}
|
|
315
|
+
});
|
|
316
|
+
export default SpinWheel;
|
|
317
|
+
//# sourceMappingURL=Wheel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useRef","useEffect","View","StyleSheet","Animated","Text","TouchableOpacity","Easing","Svg","Path","G","SvgText","jsx","_jsx","jsxs","_jsxs","colors","SpinWheel","items","size","spinDuration","enabled","onSpinStart","onSpinEnd","containerStyle","centerStyle","spinButtonText","wheelTextStyle","knobStyle","knobColor","actionButtonStyle","actionButtonTextStyle","wheelTextColor","wheelItems","length","spinning","setSpinning","_","setWinner","rotateValue","Value","current","rotationRef","listener","addListener","value","removeListener","anglePerItem","generateWheelPaths","map","item","index","startAngle","endAngle","startRad","Math","PI","endRad","x1","cos","y1","sin","x2","y2","largeArcFlag","pathData","join","midRad","textX","textY","decorationX","decorationY","path","angle","wheelPaths","handleSpin","randomSpins","random","randomAngle","targetRotation","timing","toValue","duration","easing","out","cubic","useNativeDriver","start","handleSpinEnd","normalizedAngle","winningIndex","floor","adjustedIndex","winningItem","rotate","interpolate","inputRange","outputRange","style","styles","container","children","width","height","wheelContainer","borderRadius","transform","viewBox","Fragment","d","fill","color","stroke","strokeWidth","x","y","textColor","fontSize","fontWeight","textAnchor","alignmentBaseline","label","id","wheelCenter","translateX","translateY","pointerPosition","pointer","borderBottomColor","position","alignItems","justifyContent","bottom","zIndex","onPress","disabled","actionButton","actionButtonText","create","marginTop","marginBottom","overflow","backgroundColor","top","left","borderWidth","borderColor","borderStyle","borderLeftWidth","borderRightWidth","borderBottomWidth","borderLeftColor","borderRightColor","paddingHorizontal","paddingVertical","shadowColor","shadowRadius"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Wheel/Wheel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,MAAM,EAAEC,SAAS,QAAQ,OAAO;AAC1D,SACEC,IAAI,EACJC,UAAU,EACVC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,MAAM,QAGD,cAAc;AACrB,SAASC,GAAG,EAAEC,IAAI,EAAEC,CAAC,EAAEL,IAAI,IAAIM,OAAO,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUjE;AACA,MAAMC,MAAM,GAAG,CACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS;AAAE;AACX,SAAS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BK,WAAW,EAAE,OAAO;IACpBC,eAAe,EAAE,EAAE;IACnBC,gBAAgB,EAAE,EAAE;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,aAAa;IAC9BC,gBAAgB,EAAE,aAAa;IAC/BxB,iBAAiB,EAAE;EACrB,CAAC;EACDQ,YAAY,EAAE;IACZiB,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE,EAAE;IACnBjD,YAAY,EAAE,EAAE;IAChBkD,WAAW,EAAE,MAAM;IACnBC,YAAY,EAAE,CAAC;IACfd,eAAe,EAAE;EACnB,CAAC;EACDL,gBAAgB,EAAE;IAChBnB,UAAU,EAAE,MAAM;IAClBD,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAepG,SAAS","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","Wheel"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Wheel/index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,KAAK,QAAO,YAAS;AACzC,cAAc,YAAS","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export * from "./Card/index.js";
|
|
4
|
+
export * from "./ProgressBar/index.js";
|
|
5
|
+
export * from "./Badges/index.js";
|
|
6
|
+
export * from "./Banner/index.js";
|
|
7
|
+
export * from "./BrandIcon/index.js";
|
|
8
|
+
export * from "./Filters/index.js";
|
|
9
|
+
export * from "./Input/index.js";
|
|
10
|
+
export * from "./LockOverlay/index.js";
|
|
11
|
+
export * from "./Popup/index.js";
|
|
12
|
+
export * from "./RedemptionOption/index.js";
|
|
13
|
+
export * from "./ScratchCard/index.js";
|
|
14
|
+
export * from "./UnlockRewards/index.js";
|
|
15
|
+
export * from "./Wheel/index.js";
|
|
16
|
+
export * from "./CloseIcon/index.js";
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"..\\..\\..\\src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,iBAAQ;AACtB,cAAc,wBAAe;AAC7B,cAAe,mBAAU;AACzB,cAAc,mBAAU;AACxB,cAAc,sBAAa;AAC3B,cAAc,oBAAW;AACzB,cAAc,kBAAS;AACvB,cAAc,wBAAe;AAC7B,cAAc,kBAAS;AACvB,cAAc,6BAAoB;AAClC,cAAc,wBAAe;AAC7B,cAAc,0BAAiB;AAC/B,cAAc,kBAAS;AACvB,cAAc,sBAAa","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const BRANDS = [{
|
|
4
|
+
id: "1",
|
|
5
|
+
name: "Brand 1",
|
|
6
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
7
|
+
}, {
|
|
8
|
+
id: "2",
|
|
9
|
+
name: "Brand 2",
|
|
10
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
11
|
+
}, {
|
|
12
|
+
id: "3",
|
|
13
|
+
name: "Brand 3",
|
|
14
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
15
|
+
}, {
|
|
16
|
+
id: "4",
|
|
17
|
+
name: "Brand 4",
|
|
18
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
19
|
+
}, {
|
|
20
|
+
id: "5",
|
|
21
|
+
name: "Brand 5",
|
|
22
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
23
|
+
}, {
|
|
24
|
+
id: "6",
|
|
25
|
+
name: "Brand 6",
|
|
26
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
27
|
+
}, {
|
|
28
|
+
id: "7",
|
|
29
|
+
name: "Brand 7",
|
|
30
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
31
|
+
}, {
|
|
32
|
+
id: "8",
|
|
33
|
+
name: "Brand 8",
|
|
34
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
35
|
+
}, {
|
|
36
|
+
id: "9",
|
|
37
|
+
name: "Brand 9",
|
|
38
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
39
|
+
}, {
|
|
40
|
+
id: "10",
|
|
41
|
+
name: "Brand 10",
|
|
42
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
43
|
+
}, {
|
|
44
|
+
id: "11",
|
|
45
|
+
name: "Brand 11",
|
|
46
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
47
|
+
}, {
|
|
48
|
+
id: "12",
|
|
49
|
+
name: "Brand 12",
|
|
50
|
+
logo: require("@/assets/images/pb-logo.jpg")
|
|
51
|
+
}];
|
|
52
|
+
export default BRANDS;
|
|
53
|
+
//# sourceMappingURL=BRANDS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BRANDS","id","name","logo","require"],"sourceRoot":"..\\..\\..\\src","sources":["constants/BRANDS.ts"],"mappings":";;AAAA,MAAMA,MAAM,GAAG,CACX;EACEC,EAAE,EAAE,GAAG;EACPC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAAC,6BAA6B;AAC7C,CAAC,EACD;EACEH,EAAE,EAAE,GAAG;EACPC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAAC,6BAA6B;AAC7C,CAAC,EACD;EACEH,EAAE,EAAE,GAAG;EACPC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAAC,6BAA6B;AAC7C,CAAC,EACD;EACEH,EAAE,EAAE,GAAG;EACPC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAAC,6BAA6B;AAC7C,CAAC,EACD;EACEH,EAAE,EAAE,GAAG;EACPC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAAC,6BAA6B;AAC7C,CAAC,EACD;EACEH,EAAE,EAAE,GAAG;EACPC,IAAI,EAAE,SAAS;EACfC,IAAI,EAAEC,OAAO,CAAC,6BAA6B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