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,330 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useCallback, useRef, useState } from "react";
|
|
4
|
+
import { View, Text, StyleSheet, TouchableOpacity, I18nManager } from "react-native";
|
|
5
|
+
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
6
|
+
import BottomSheet, { BottomSheetView } from "@gorhom/bottom-sheet";
|
|
7
|
+
import PointsRangeSelector from "./PointsRangeSelector.js";
|
|
8
|
+
import { BrandIcon } from "../BrandIcon/index.js";
|
|
9
|
+
import { Ionicons } from "@expo/vector-icons";
|
|
10
|
+
import Checkbox from "expo-checkbox";
|
|
11
|
+
import { useTheme } from "../../theme/index.js"; // Import ThemeType
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
const Filters = ({
|
|
14
|
+
isRTL = I18nManager.isRTL,
|
|
15
|
+
sortOptions = [],
|
|
16
|
+
sortSectionTitle = "Sort",
|
|
17
|
+
sectionTitleStyle,
|
|
18
|
+
sortSectionStyle,
|
|
19
|
+
onActionButtonPress,
|
|
20
|
+
rangeInitialMax = 1000,
|
|
21
|
+
rangeInitialMin = 0,
|
|
22
|
+
rangeMaxLimit = 1000,
|
|
23
|
+
rangeMinLimit = 0,
|
|
24
|
+
pointsRangeContainerStyle,
|
|
25
|
+
pointsRangeInputsContainerStyle,
|
|
26
|
+
pointsRangeCustomInputContainerStyle,
|
|
27
|
+
pointsRangeCustomInputFieldStyle,
|
|
28
|
+
pointsRangeSliderContainerStyle,
|
|
29
|
+
pointsRangeMultiSliderContainerStyle,
|
|
30
|
+
pointsRangeTrackStyle,
|
|
31
|
+
pointsRangeSelectedTrackStyle,
|
|
32
|
+
pointsRangeUnselectedTrackStyle,
|
|
33
|
+
pointsRangeMarkerStyle,
|
|
34
|
+
pointsRangeMarkerEnabledStyle,
|
|
35
|
+
pointsRangeMarkerDisabledStyle,
|
|
36
|
+
pointsRangeMarkerDotStyle,
|
|
37
|
+
pointsRangeInputProps,
|
|
38
|
+
pointsRangeMultiSliderProps,
|
|
39
|
+
containerStyle,
|
|
40
|
+
headerStyle,
|
|
41
|
+
titleStyle,
|
|
42
|
+
resetTextStyle,
|
|
43
|
+
sectionStyle,
|
|
44
|
+
optionRowStyle,
|
|
45
|
+
optionTextStyle,
|
|
46
|
+
checkboxColor: checkboxColorProp,
|
|
47
|
+
applyButtonStyle,
|
|
48
|
+
applyButtonTextStyle,
|
|
49
|
+
bottomSheetStyle,
|
|
50
|
+
bottomSheetIndex = 0,
|
|
51
|
+
snapPoints = ["50%", "90%"],
|
|
52
|
+
handleIndicatorStyle,
|
|
53
|
+
brands = [],
|
|
54
|
+
brandContainerStyle,
|
|
55
|
+
brandActiveIcon,
|
|
56
|
+
showPointsRange = true,
|
|
57
|
+
pointsRangeSectionTitle = "Points range",
|
|
58
|
+
brandActiveIconStyle,
|
|
59
|
+
brandSectionTile = "Brands",
|
|
60
|
+
applyButtonText = "Apply Filter",
|
|
61
|
+
headerResetText = "Reset All",
|
|
62
|
+
headerTitleText = "Filter"
|
|
63
|
+
}) => {
|
|
64
|
+
const theme = useTheme();
|
|
65
|
+
const bottomSheetRef = useRef(null);
|
|
66
|
+
const styles = createStyles(theme, isRTL);
|
|
67
|
+
const checkboxColor = checkboxColorProp ?? theme.primary;
|
|
68
|
+
const handleSheetChanges = useCallback(index => {
|
|
69
|
+
console.log("handleSheetChanges", index);
|
|
70
|
+
}, []);
|
|
71
|
+
const [resetCounter, setResetCounter] = useState(0);
|
|
72
|
+
const [checkedItems, setCheckedItems] = useState(sortOptions.reduce((acc, option) => {
|
|
73
|
+
acc[option.id] = false;
|
|
74
|
+
return acc;
|
|
75
|
+
}, {}));
|
|
76
|
+
const [selectedBrands, setSelectedBrands] = useState(brands.reduce((acc, option) => {
|
|
77
|
+
acc[option.id] = false;
|
|
78
|
+
return acc;
|
|
79
|
+
}, {}));
|
|
80
|
+
const [pointsRange, setPointsRange] = useState({
|
|
81
|
+
min: rangeInitialMin,
|
|
82
|
+
max: rangeInitialMax
|
|
83
|
+
});
|
|
84
|
+
const handleCheckboxChange = id => {
|
|
85
|
+
setCheckedItems(prevState => ({
|
|
86
|
+
...prevState,
|
|
87
|
+
[id]: !prevState[id]
|
|
88
|
+
}));
|
|
89
|
+
};
|
|
90
|
+
const handleBrandSelect = id => {
|
|
91
|
+
setSelectedBrands(prevState => ({
|
|
92
|
+
...prevState,
|
|
93
|
+
[id]: !prevState[id]
|
|
94
|
+
}));
|
|
95
|
+
};
|
|
96
|
+
const handleApplyFilter = () => {
|
|
97
|
+
if (onActionButtonPress) {
|
|
98
|
+
const selectedSortOptions = sortOptions.filter(option => checkedItems[option.id]);
|
|
99
|
+
const selectedBrandsList = brands.filter(brand => selectedBrands[brand.id]);
|
|
100
|
+
const filterResult = {
|
|
101
|
+
sort: selectedSortOptions,
|
|
102
|
+
pointsRange: pointsRange,
|
|
103
|
+
selectedBrands: selectedBrandsList
|
|
104
|
+
};
|
|
105
|
+
onActionButtonPress(filterResult);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
const handleResetAll = () => {
|
|
109
|
+
const resetState = sortOptions.reduce((acc, option) => {
|
|
110
|
+
acc[option.id] = false;
|
|
111
|
+
return acc;
|
|
112
|
+
}, {});
|
|
113
|
+
const resetBrands = brands.reduce((acc, option) => {
|
|
114
|
+
acc[option.id] = false;
|
|
115
|
+
return acc;
|
|
116
|
+
}, {});
|
|
117
|
+
setCheckedItems(resetState);
|
|
118
|
+
setSelectedBrands(resetBrands);
|
|
119
|
+
setPointsRange({
|
|
120
|
+
min: rangeInitialMin,
|
|
121
|
+
max: rangeInitialMax
|
|
122
|
+
});
|
|
123
|
+
setResetCounter(prev => prev + 1);
|
|
124
|
+
};
|
|
125
|
+
return /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
126
|
+
style: {
|
|
127
|
+
flex: 1
|
|
128
|
+
},
|
|
129
|
+
children: /*#__PURE__*/_jsx(BottomSheet, {
|
|
130
|
+
ref: bottomSheetRef,
|
|
131
|
+
index: bottomSheetIndex,
|
|
132
|
+
handleComponent: () => null,
|
|
133
|
+
onChange: handleSheetChanges,
|
|
134
|
+
style: bottomSheetStyle,
|
|
135
|
+
backgroundStyle: {
|
|
136
|
+
backgroundColor: theme.surface
|
|
137
|
+
} // Use surface for BS background
|
|
138
|
+
,
|
|
139
|
+
handleIndicatorStyle: [styles.handleIndicator, handleIndicatorStyle],
|
|
140
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
141
|
+
style: [styles.container, containerStyle],
|
|
142
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
143
|
+
style: [styles.header, headerStyle],
|
|
144
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
145
|
+
style: [styles.title, titleStyle],
|
|
146
|
+
children: headerTitleText
|
|
147
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
148
|
+
onPress: handleResetAll,
|
|
149
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
150
|
+
style: [styles.resetText, resetTextStyle],
|
|
151
|
+
children: headerResetText
|
|
152
|
+
})
|
|
153
|
+
})]
|
|
154
|
+
}), /*#__PURE__*/_jsxs(BottomSheetView, {
|
|
155
|
+
style: {
|
|
156
|
+
paddingBottom: 75
|
|
157
|
+
},
|
|
158
|
+
children: [sortOptions && sortOptions.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
159
|
+
style: [styles.section, sectionStyle, sortSectionStyle],
|
|
160
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
161
|
+
style: [styles.sectionTitle, sectionTitleStyle],
|
|
162
|
+
children: sortSectionTitle
|
|
163
|
+
}), sortOptions.map(option => /*#__PURE__*/_jsxs(View, {
|
|
164
|
+
style: [styles.optionRow, optionRowStyle],
|
|
165
|
+
children: [/*#__PURE__*/_jsx(Checkbox, {
|
|
166
|
+
value: checkedItems[option.id],
|
|
167
|
+
color: checkboxColor,
|
|
168
|
+
hitSlop: {
|
|
169
|
+
top: 10,
|
|
170
|
+
right: 10,
|
|
171
|
+
bottom: 10,
|
|
172
|
+
left: 10
|
|
173
|
+
},
|
|
174
|
+
onValueChange: () => handleCheckboxChange(option.id.toString())
|
|
175
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
176
|
+
style: [styles.optionText, optionTextStyle],
|
|
177
|
+
children: option.name
|
|
178
|
+
})]
|
|
179
|
+
}, option.id))]
|
|
180
|
+
}), showPointsRange && /*#__PURE__*/_jsxs(View, {
|
|
181
|
+
style: [styles.section, sectionStyle],
|
|
182
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
183
|
+
style: [styles.sectionTitle, sectionTitleStyle],
|
|
184
|
+
children: pointsRangeSectionTitle
|
|
185
|
+
}), /*#__PURE__*/_jsx(PointsRangeSelector, {
|
|
186
|
+
resetKey: resetCounter,
|
|
187
|
+
initialMax: rangeInitialMax,
|
|
188
|
+
initialMin: rangeInitialMin,
|
|
189
|
+
minLimit: rangeMinLimit,
|
|
190
|
+
maxLimit: rangeMaxLimit,
|
|
191
|
+
isRTL: isRTL,
|
|
192
|
+
containerStyle: pointsRangeContainerStyle,
|
|
193
|
+
inputsContainerStyle: pointsRangeInputsContainerStyle,
|
|
194
|
+
customInputContainerStyle: pointsRangeCustomInputContainerStyle,
|
|
195
|
+
customInputFieldStyle: pointsRangeCustomInputFieldStyle,
|
|
196
|
+
sliderContainerStyle: pointsRangeSliderContainerStyle,
|
|
197
|
+
multiSliderContainerStyle: pointsRangeMultiSliderContainerStyle,
|
|
198
|
+
trackStyle: pointsRangeTrackStyle,
|
|
199
|
+
selectedTrackStyle: pointsRangeSelectedTrackStyle,
|
|
200
|
+
unselectedTrackStyle: pointsRangeUnselectedTrackStyle,
|
|
201
|
+
markerStyle: pointsRangeMarkerStyle,
|
|
202
|
+
markerEnabledStyle: pointsRangeMarkerEnabledStyle,
|
|
203
|
+
markerDisabledStyle: pointsRangeMarkerDisabledStyle,
|
|
204
|
+
markerDotStyle: pointsRangeMarkerDotStyle,
|
|
205
|
+
inputProps: pointsRangeInputProps,
|
|
206
|
+
multiSliderProps: pointsRangeMultiSliderProps,
|
|
207
|
+
onChange: (min, max) => {
|
|
208
|
+
setPointsRange({
|
|
209
|
+
min,
|
|
210
|
+
max
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
})]
|
|
214
|
+
}), brands && brands.length > 0 && /*#__PURE__*/_jsxs(View, {
|
|
215
|
+
style: [styles.section, sectionStyle],
|
|
216
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
217
|
+
style: [styles.sectionTitle, sectionTitleStyle],
|
|
218
|
+
children: brandSectionTile
|
|
219
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
220
|
+
style: [styles.brandsGrid, brandContainerStyle],
|
|
221
|
+
children: brands.map(brand => /*#__PURE__*/_jsx(BrandIcon, {
|
|
222
|
+
size: 50,
|
|
223
|
+
selected: selectedBrands[brand.id],
|
|
224
|
+
onPress: () => handleBrandSelect(brand.id.toString()),
|
|
225
|
+
brand: {
|
|
226
|
+
id: brand.id,
|
|
227
|
+
name: brand.name,
|
|
228
|
+
logo: brand.logo
|
|
229
|
+
},
|
|
230
|
+
selectionIndicatorIcon: brandActiveIcon || /*#__PURE__*/_jsx(Ionicons, {
|
|
231
|
+
name: "checkmark-outline",
|
|
232
|
+
color: theme.onPrimary // Use primary for checkmark color
|
|
233
|
+
}),
|
|
234
|
+
selectionIndicatorStyle: brandActiveIconStyle
|
|
235
|
+
}, brand.id))
|
|
236
|
+
})]
|
|
237
|
+
}), /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
238
|
+
style: [styles.applyButton, applyButtonStyle],
|
|
239
|
+
onPress: handleApplyFilter,
|
|
240
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
241
|
+
style: [styles.applyButtonText, applyButtonTextStyle],
|
|
242
|
+
children: applyButtonText
|
|
243
|
+
})
|
|
244
|
+
})]
|
|
245
|
+
})]
|
|
246
|
+
})
|
|
247
|
+
})
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
const createStyles = (theme, isRTL) => StyleSheet.create({
|
|
251
|
+
container: {
|
|
252
|
+
flex: 1,
|
|
253
|
+
paddingHorizontal: 25,
|
|
254
|
+
backgroundColor: theme.surface // Use surface for container inside BS
|
|
255
|
+
},
|
|
256
|
+
handleIndicator: {
|
|
257
|
+
width: 40,
|
|
258
|
+
height: 4,
|
|
259
|
+
backgroundColor: theme.border,
|
|
260
|
+
alignSelf: "center",
|
|
261
|
+
marginTop: 8,
|
|
262
|
+
// Add some margin if handle is visible
|
|
263
|
+
borderRadius: 2
|
|
264
|
+
},
|
|
265
|
+
header: {
|
|
266
|
+
flexDirection: isRTL ? "row-reverse" : "row",
|
|
267
|
+
justifyContent: "space-between",
|
|
268
|
+
alignItems: "center",
|
|
269
|
+
paddingVertical: 15,
|
|
270
|
+
borderBottomWidth: 1,
|
|
271
|
+
borderBottomColor: theme.border
|
|
272
|
+
},
|
|
273
|
+
title: {
|
|
274
|
+
fontSize: 18,
|
|
275
|
+
fontWeight: "bold",
|
|
276
|
+
color: theme.text,
|
|
277
|
+
textAlign: isRTL ? "right" : "left"
|
|
278
|
+
},
|
|
279
|
+
resetText: {
|
|
280
|
+
fontSize: 14,
|
|
281
|
+
color: theme.primary,
|
|
282
|
+
fontWeight: "500",
|
|
283
|
+
textAlign: isRTL ? "left" : "right"
|
|
284
|
+
},
|
|
285
|
+
section: {
|
|
286
|
+
marginTop: 20
|
|
287
|
+
},
|
|
288
|
+
sectionTitle: {
|
|
289
|
+
fontSize: 16,
|
|
290
|
+
fontWeight: "500",
|
|
291
|
+
color: theme.helper,
|
|
292
|
+
marginBottom: 15,
|
|
293
|
+
textAlign: isRTL ? "right" : "left"
|
|
294
|
+
},
|
|
295
|
+
optionRow: {
|
|
296
|
+
flexDirection: isRTL ? "row-reverse" : "row",
|
|
297
|
+
alignItems: "center",
|
|
298
|
+
marginBottom: 15,
|
|
299
|
+
gap: 5
|
|
300
|
+
},
|
|
301
|
+
optionText: {
|
|
302
|
+
fontSize: 15,
|
|
303
|
+
color: theme.text,
|
|
304
|
+
textAlign: isRTL ? "right" : "left",
|
|
305
|
+
marginLeft: isRTL ? 0 : 8,
|
|
306
|
+
// Add spacing between checkbox and text
|
|
307
|
+
marginRight: isRTL ? 8 : 0
|
|
308
|
+
},
|
|
309
|
+
brandsGrid: {
|
|
310
|
+
flexDirection: "row",
|
|
311
|
+
flexWrap: "wrap",
|
|
312
|
+
gap: 10,
|
|
313
|
+
justifyContent: isRTL ? "flex-end" : "flex-start"
|
|
314
|
+
},
|
|
315
|
+
applyButton: {
|
|
316
|
+
backgroundColor: theme.primary,
|
|
317
|
+
borderRadius: 30,
|
|
318
|
+
paddingVertical: 15,
|
|
319
|
+
alignItems: "center",
|
|
320
|
+
marginTop: 30
|
|
321
|
+
},
|
|
322
|
+
applyButtonText: {
|
|
323
|
+
color: theme.onPrimary,
|
|
324
|
+
// Use onPrimary for text on primary button
|
|
325
|
+
fontSize: 16,
|
|
326
|
+
fontWeight: "bold"
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
export default Filters;
|
|
330
|
+
//# sourceMappingURL=Filters.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useRef","useState","View","Text","StyleSheet","TouchableOpacity","I18nManager","GestureHandlerRootView","BottomSheet","BottomSheetView","PointsRangeSelector","BrandIcon","Ionicons","Checkbox","useTheme","jsx","_jsx","jsxs","_jsxs","Filters","isRTL","sortOptions","sortSectionTitle","sectionTitleStyle","sortSectionStyle","onActionButtonPress","rangeInitialMax","rangeInitialMin","rangeMaxLimit","rangeMinLimit","pointsRangeContainerStyle","pointsRangeInputsContainerStyle","pointsRangeCustomInputContainerStyle","pointsRangeCustomInputFieldStyle","pointsRangeSliderContainerStyle","pointsRangeMultiSliderContainerStyle","pointsRangeTrackStyle","pointsRangeSelectedTrackStyle","pointsRangeUnselectedTrackStyle","pointsRangeMarkerStyle","pointsRangeMarkerEnabledStyle","pointsRangeMarkerDisabledStyle","pointsRangeMarkerDotStyle","pointsRangeInputProps","pointsRangeMultiSliderProps","containerStyle","headerStyle","titleStyle","resetTextStyle","sectionStyle","optionRowStyle","optionTextStyle","checkboxColor","checkboxColorProp","applyButtonStyle","applyButtonTextStyle","bottomSheetStyle","bottomSheetIndex","snapPoints","handleIndicatorStyle","brands","brandContainerStyle","brandActiveIcon","showPointsRange","pointsRangeSectionTitle","brandActiveIconStyle","brandSectionTile","applyButtonText","headerResetText","headerTitleText","theme","bottomSheetRef","styles","createStyles","primary","handleSheetChanges","index","console","log","resetCounter","setResetCounter","checkedItems","setCheckedItems","reduce","acc","option","id","selectedBrands","setSelectedBrands","pointsRange","setPointsRange","min","max","handleCheckboxChange","prevState","handleBrandSelect","handleApplyFilter","selectedSortOptions","filter","selectedBrandsList","brand","filterResult","sort","handleResetAll","resetState","resetBrands","prev","style","flex","children","ref","handleComponent","onChange","backgroundStyle","backgroundColor","surface","handleIndicator","container","header","title","onPress","resetText","paddingBottom","length","section","sectionTitle","map","optionRow","value","color","hitSlop","top","right","bottom","left","onValueChange","toString","optionText","name","resetKey","initialMax","initialMin","minLimit","maxLimit","inputsContainerStyle","customInputContainerStyle","customInputFieldStyle","sliderContainerStyle","multiSliderContainerStyle","trackStyle","selectedTrackStyle","unselectedTrackStyle","markerStyle","markerEnabledStyle","markerDisabledStyle","markerDotStyle","inputProps","multiSliderProps","brandsGrid","size","selected","logo","selectionIndicatorIcon","onPrimary","selectionIndicatorStyle","applyButton","create","paddingHorizontal","width","height","border","alignSelf","marginTop","borderRadius","flexDirection","justifyContent","alignItems","paddingVertical","borderBottomWidth","borderBottomColor","fontSize","fontWeight","text","textAlign","helper","marginBottom","gap","marginLeft","marginRight","flexWrap"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Filters/Filters.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC5D,SACEC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,gBAAgB,EAIhBC,WAAW,QACN,cAAc;AACrB,SAASC,sBAAsB,QAAQ,8BAA8B;AACrE,OAAOC,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AAG,aAAa,GAAG,KAAK;IAC5C4J,UAAU,EAAE,QAAQ;IACpBS,YAAY,EAAE,EAAE;IAChBC,GAAG,EAAE;EACP,CAAC;EACDjD,UAAU,EAAE;IACV2C,QAAQ,EAAE,EAAE;IACZnD,KAAK,EAAE3D,KAAK,CAACgH,IAAI;IACjBC,SAAS,EAAEnK,KAAK,GAAG,OAAO,GAAG,MAAM;IACnCuK,UAAU,EAAEvK,KAAK,GAAG,CAAC,GAAG,CAAC;IAAE;IAC3BwK,WAAW,EAAExK,KAAK,GAAG,CAAC,GAAG;EAC3B,CAAC;EACD0I,UAAU,EAAE;IACVgB,aAAa,EAAE,KAAK;IACpBe,QAAQ,EAAE,MAAM;IAChBH,GAAG,EAAE,EAAE;IACPX,cAAc,EAAE3J,KAAK,GAAG,UAAU,GAAG;EACvC,CAAC;EACDiJ,WAAW,EAAE;IACXnD,eAAe,EAAE5C,KAAK,CAACI,OAAO;IAC9BmG,YAAY,EAAE,EAAE;IAChBI,eAAe,EAAE,EAAE;IACnBD,UAAU,EAAE,QAAQ;IACpBJ,SAAS,EAAE;EACb,CAAC;EACDzG,eAAe,EAAE;IACf8D,KAAK,EAAE3D,KAAK,CAAC6F,SAAS;IAAE;IACxBiB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEJ,eAAelK,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useCallback, useEffect } from "react";
|
|
4
|
+
import { View, StyleSheet, Dimensions, I18nManager } from "react-native";
|
|
5
|
+
import MultiSlider from "@ptomasroos/react-native-multi-slider";
|
|
6
|
+
import CustomInput from "../Input/Input.js";
|
|
7
|
+
import { useTheme } from "../../theme/index.js";
|
|
8
|
+
|
|
9
|
+
// Get initial screen width (we'll refine this with onLayout)
|
|
10
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const {
|
|
12
|
+
width: SCREEN_WIDTH
|
|
13
|
+
} = Dimensions.get("window");
|
|
14
|
+
const HORIZONTAL_PADDING = 40; // Adjust based on your container's padding
|
|
15
|
+
|
|
16
|
+
const PointsRangeSelector = ({
|
|
17
|
+
minLimit = 0,
|
|
18
|
+
maxLimit = 1000,
|
|
19
|
+
initialMin = 50,
|
|
20
|
+
initialMax = 500,
|
|
21
|
+
resetKey,
|
|
22
|
+
isRTL = I18nManager.isRTL,
|
|
23
|
+
onChange,
|
|
24
|
+
// Style props
|
|
25
|
+
containerStyle,
|
|
26
|
+
inputsContainerStyle,
|
|
27
|
+
customInputContainerStyle,
|
|
28
|
+
customInputFieldStyle,
|
|
29
|
+
sliderContainerStyle,
|
|
30
|
+
multiSliderContainerStyle,
|
|
31
|
+
trackStyle,
|
|
32
|
+
selectedTrackStyle,
|
|
33
|
+
unselectedTrackStyle,
|
|
34
|
+
markerStyle,
|
|
35
|
+
markerEnabledStyle,
|
|
36
|
+
markerDisabledStyle,
|
|
37
|
+
markerDotStyle,
|
|
38
|
+
inputProps = {},
|
|
39
|
+
multiSliderProps = {}
|
|
40
|
+
}) => {
|
|
41
|
+
const theme = useTheme();
|
|
42
|
+
const styles = createStyles(theme, isRTL);
|
|
43
|
+
const [values, setValues] = useState([initialMin, initialMax]);
|
|
44
|
+
const [minInputValue, setMinInputValue] = useState(initialMin.toString());
|
|
45
|
+
const [maxInputValue, setMaxInputValue] = useState(initialMax.toString());
|
|
46
|
+
|
|
47
|
+
// Track container width for responsive sizing
|
|
48
|
+
const [containerWidth, setContainerWidth] = useState(SCREEN_WIDTH - HORIZONTAL_PADDING);
|
|
49
|
+
|
|
50
|
+
// Handle container layout to get precise width
|
|
51
|
+
const onContainerLayout = useCallback(event => {
|
|
52
|
+
const {
|
|
53
|
+
width
|
|
54
|
+
} = event.nativeEvent.layout;
|
|
55
|
+
setContainerWidth(width);
|
|
56
|
+
}, []);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
setValues([initialMin, initialMax]);
|
|
59
|
+
setMinInputValue(initialMin.toString());
|
|
60
|
+
setMaxInputValue(initialMax.toString());
|
|
61
|
+
if (onChange) {
|
|
62
|
+
onChange(initialMin, initialMax);
|
|
63
|
+
}
|
|
64
|
+
}, [resetKey, initialMin, initialMax]);
|
|
65
|
+
const handleValuesChange = newValues => {
|
|
66
|
+
setValues(newValues);
|
|
67
|
+
setMinInputValue(newValues[0].toString());
|
|
68
|
+
setMaxInputValue(newValues[1].toString());
|
|
69
|
+
if (onChange) {
|
|
70
|
+
onChange(newValues[0], newValues[1]);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
const handleMinInputChange = text => {
|
|
74
|
+
setMinInputValue(text);
|
|
75
|
+
if (text && !isNaN(Number(text))) {
|
|
76
|
+
const newValue = Number(text);
|
|
77
|
+
if (newValue < minLimit || newValue >= values[1]) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
const newValues = [newValue, values[1]];
|
|
81
|
+
setValues(newValues);
|
|
82
|
+
if (onChange) {
|
|
83
|
+
onChange(newValues[0], newValues[1]);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const handleMaxInputChange = text => {
|
|
88
|
+
setMaxInputValue(text);
|
|
89
|
+
if (text && !isNaN(Number(text))) {
|
|
90
|
+
const newValue = Number(text);
|
|
91
|
+
if (newValue > maxLimit || newValue <= values[0]) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
const newValues = [values[0], newValue];
|
|
95
|
+
setValues(newValues);
|
|
96
|
+
if (onChange) {
|
|
97
|
+
onChange(newValues[0], newValues[1]);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// Custom marker component
|
|
103
|
+
const CustomMarker = ({
|
|
104
|
+
currentValue,
|
|
105
|
+
enabled
|
|
106
|
+
}) => /*#__PURE__*/_jsx(View, {
|
|
107
|
+
style: [styles.marker, enabled ? styles.markerEnabled : styles.markerDisabled, markerStyle, enabled ? markerEnabledStyle : markerDisabledStyle],
|
|
108
|
+
hitSlop: {
|
|
109
|
+
top: 10,
|
|
110
|
+
right: 10,
|
|
111
|
+
bottom: 10,
|
|
112
|
+
left: 10
|
|
113
|
+
},
|
|
114
|
+
children: enabled && /*#__PURE__*/_jsx(View, {
|
|
115
|
+
style: [styles.markerDot, markerDotStyle]
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// Prepare inputs in the correct order based on RTL setting
|
|
120
|
+
const renderInputs = () => {
|
|
121
|
+
const minInput = /*#__PURE__*/_jsx(CustomInput, {
|
|
122
|
+
value: minInputValue,
|
|
123
|
+
onChangeText: handleMinInputChange,
|
|
124
|
+
keyboardType: "numeric",
|
|
125
|
+
placeholder: "Min",
|
|
126
|
+
containerStyle: [styles.customInputContainer, customInputContainerStyle],
|
|
127
|
+
inputContainerStyle: [styles.customInputField, customInputFieldStyle],
|
|
128
|
+
textAlign: isRTL ? "right" : "left",
|
|
129
|
+
...inputProps
|
|
130
|
+
});
|
|
131
|
+
const maxInput = /*#__PURE__*/_jsx(CustomInput, {
|
|
132
|
+
value: maxInputValue,
|
|
133
|
+
onChangeText: handleMaxInputChange,
|
|
134
|
+
keyboardType: "numeric",
|
|
135
|
+
placeholder: "Max",
|
|
136
|
+
containerStyle: [styles.customInputContainer, customInputContainerStyle],
|
|
137
|
+
inputContainerStyle: [styles.customInputField, customInputFieldStyle],
|
|
138
|
+
textAlign: isRTL ? "right" : "left",
|
|
139
|
+
...inputProps
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
// If RTL, we swap the order of the inputs
|
|
143
|
+
return isRTL ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
144
|
+
children: [maxInput, minInput]
|
|
145
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
146
|
+
children: [minInput, maxInput]
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
150
|
+
style: [styles.container, containerStyle],
|
|
151
|
+
onLayout: onContainerLayout,
|
|
152
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
153
|
+
style: [styles.inputsContainer, inputsContainerStyle],
|
|
154
|
+
children: renderInputs()
|
|
155
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
156
|
+
style: [styles.sliderContainer, sliderContainerStyle],
|
|
157
|
+
children: /*#__PURE__*/_jsx(MultiSlider, {
|
|
158
|
+
values: values,
|
|
159
|
+
min: minLimit,
|
|
160
|
+
max: maxLimit,
|
|
161
|
+
step: 10,
|
|
162
|
+
allowOverlap: false,
|
|
163
|
+
snapped: true,
|
|
164
|
+
onValuesChange: handleValuesChange,
|
|
165
|
+
selectedStyle: [styles.selectedTrack, selectedTrackStyle],
|
|
166
|
+
unselectedStyle: [styles.unselectedTrack, unselectedTrackStyle],
|
|
167
|
+
containerStyle: [styles.sliderContainerStyle, multiSliderContainerStyle],
|
|
168
|
+
trackStyle: [styles.track, trackStyle],
|
|
169
|
+
sliderLength: containerWidth // Use measured width for slider length
|
|
170
|
+
,
|
|
171
|
+
customMarker: CustomMarker
|
|
172
|
+
// For RTL support with MultiSlider
|
|
173
|
+
,
|
|
174
|
+
enabledOne: true,
|
|
175
|
+
enabledTwo: true,
|
|
176
|
+
isRTL: isRTL,
|
|
177
|
+
...multiSliderProps
|
|
178
|
+
})
|
|
179
|
+
})]
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
const createStyles = (theme, isRTL) => StyleSheet.create({
|
|
183
|
+
container: {
|
|
184
|
+
// Default container styling
|
|
185
|
+
},
|
|
186
|
+
inputsContainer: {
|
|
187
|
+
flexDirection: "row",
|
|
188
|
+
justifyContent: "space-between",
|
|
189
|
+
marginBottom: 20
|
|
190
|
+
},
|
|
191
|
+
customInputContainer: {
|
|
192
|
+
width: "48%"
|
|
193
|
+
},
|
|
194
|
+
customInputField: {
|
|
195
|
+
minHeight: 40,
|
|
196
|
+
textAlign: isRTL ? "right" : "left"
|
|
197
|
+
},
|
|
198
|
+
sliderContainer: {
|
|
199
|
+
marginVertical: 10,
|
|
200
|
+
alignItems: "center",
|
|
201
|
+
width: "100%",
|
|
202
|
+
// Apply any RTL specific styling if needed
|
|
203
|
+
transform: isRTL ? [{
|
|
204
|
+
scaleX: -1
|
|
205
|
+
}] : []
|
|
206
|
+
},
|
|
207
|
+
sliderContainerStyle: {
|
|
208
|
+
height: 30,
|
|
209
|
+
width: "100%"
|
|
210
|
+
},
|
|
211
|
+
track: {
|
|
212
|
+
height: 4,
|
|
213
|
+
borderRadius: 2
|
|
214
|
+
},
|
|
215
|
+
selectedTrack: {
|
|
216
|
+
backgroundColor: theme.primary
|
|
217
|
+
},
|
|
218
|
+
unselectedTrack: {
|
|
219
|
+
backgroundColor: theme.border
|
|
220
|
+
},
|
|
221
|
+
marker: {
|
|
222
|
+
width: 20,
|
|
223
|
+
height: 20,
|
|
224
|
+
borderRadius: 12,
|
|
225
|
+
backgroundColor: theme.surface,
|
|
226
|
+
borderWidth: 2,
|
|
227
|
+
shadowColor: "#000",
|
|
228
|
+
shadowOffset: {
|
|
229
|
+
width: 0,
|
|
230
|
+
height: 2
|
|
231
|
+
},
|
|
232
|
+
shadowOpacity: 0.25,
|
|
233
|
+
shadowRadius: 2.84,
|
|
234
|
+
elevation: 3,
|
|
235
|
+
alignItems: "center",
|
|
236
|
+
justifyContent: "center",
|
|
237
|
+
// Flip the marker back when parent is flipped for RTL
|
|
238
|
+
transform: isRTL ? [{
|
|
239
|
+
scaleX: -1
|
|
240
|
+
}] : []
|
|
241
|
+
},
|
|
242
|
+
markerEnabled: {
|
|
243
|
+
borderColor: theme.primary
|
|
244
|
+
},
|
|
245
|
+
markerDisabled: {
|
|
246
|
+
borderColor: theme.disabled
|
|
247
|
+
},
|
|
248
|
+
markerDot: {
|
|
249
|
+
width: 18,
|
|
250
|
+
height: 18,
|
|
251
|
+
borderRadius: 12,
|
|
252
|
+
backgroundColor: theme.primary
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
export default PointsRangeSelector;
|
|
256
|
+
//# sourceMappingURL=PointsRangeSelector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useCallback","useEffect","View","StyleSheet","Dimensions","I18nManager","MultiSlider","CustomInput","useTheme","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","width","SCREEN_WIDTH","get","HORIZONTAL_PADDING","PointsRangeSelector","minLimit","maxLimit","initialMin","initialMax","resetKey","isRTL","onChange","containerStyle","inputsContainerStyle","customInputContainerStyle","customInputFieldStyle","sliderContainerStyle","multiSliderContainerStyle","trackStyle","selectedTrackStyle","unselectedTrackStyle","markerStyle","markerEnabledStyle","markerDisabledStyle","markerDotStyle","inputProps","multiSliderProps","theme","styles","createStyles","values","setValues","minInputValue","setMinInputValue","toString","maxInputValue","setMaxInputValue","containerWidth","setContainerWidth","onContainerLayout","event","nativeEvent","layout","handleValuesChange","newValues","handleMinInputChange","text","isNaN","Number","newValue","handleMaxInputChange","CustomMarker","currentValue","enabled","style","marker","markerEnabled","markerDisabled","hitSlop","top","right","bottom","left","children","markerDot","renderInputs","minInput","value","onChangeText","keyboardType","placeholder","customInputContainer","inputContainerStyle","customInputField","textAlign","maxInput","container","onLayout","inputsContainer","sliderContainer","min","max","step","allowOverlap","snapped","onValuesChange","selectedStyle","selectedTrack","unselectedStyle","unselectedTrack","track","sliderLength","customMarker","enabledOne","enabledTwo","create","flexDirection","justifyContent","marginBottom","minHeight","marginVertical","alignItems","transform","scaleX","height","borderRadius","backgroundColor","primary","border","surface","borderWidth","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderColor","disabled"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Filters/PointsRangeSelector.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,WAAW,EAAEC,SAAS,QAAQ,OAAO;AAC/D,SACEC,IAAI,EAEJC,U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