@magmamath/students-features 0.3.3 → 0.4.0
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/dist/commonjs/features/celebrations/components/Celebrations.js +51 -0
- package/dist/commonjs/features/celebrations/components/Celebrations.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/Particle.js +84 -0
- package/dist/commonjs/features/celebrations/components/Particle.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js +45 -0
- package/dist/commonjs/features/celebrations/components/ParticleBatch.js.map +1 -0
- package/dist/commonjs/features/celebrations/components/Spark.js +23 -0
- package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -0
- package/dist/commonjs/features/celebrations/config.js +199 -0
- package/dist/commonjs/features/celebrations/config.js.map +1 -0
- package/dist/commonjs/features/celebrations/helpers.js +94 -0
- package/dist/commonjs/features/celebrations/helpers.js.map +1 -0
- package/dist/commonjs/features/celebrations/index.js +28 -0
- package/dist/commonjs/features/celebrations/index.js.map +1 -0
- package/dist/commonjs/features/celebrations/types.js +15 -0
- package/dist/commonjs/features/celebrations/types.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js +58 -0
- package/dist/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +247 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +131 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +56 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +68 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js +53 -0
- package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js +47 -0
- package/dist/commonjs/features/endOfAssignment/components/EOAModal.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js +69 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js +55 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +102 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +83 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js +96 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js +44 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +233 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +63 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js +34 -0
- package/dist/commonjs/features/endOfAssignment/components/Modal/model.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +91 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +107 -0
- package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/constants.js +55 -0
- package/dist/commonjs/features/endOfAssignment/constants.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/helpers.js +64 -0
- package/dist/commonjs/features/endOfAssignment/helpers.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js +51 -0
- package/dist/commonjs/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/index.js +40 -0
- package/dist/commonjs/features/endOfAssignment/index.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js +53 -0
- package/dist/commonjs/features/endOfAssignment/model/model.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/types.js +33 -0
- package/dist/commonjs/features/endOfAssignment/types.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js +43 -0
- package/dist/commonjs/features/endOfAssignment/ui/EOABadge.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js +30 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js +65 -0
- package/dist/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js +29 -0
- package/dist/commonjs/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js +32 -0
- package/dist/commonjs/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
- package/dist/commonjs/index.js +24 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/Halloween.js +54 -0
- package/dist/commonjs/shared/icons/Halloween.js.map +1 -0
- package/dist/commonjs/shared/icons/Pi.js +30 -0
- package/dist/commonjs/shared/icons/Pi.js.map +1 -0
- package/dist/commonjs/shared/icons/Star.js +30 -0
- package/dist/commonjs/shared/icons/Star.js.map +1 -0
- package/dist/commonjs/shared/icons/Valentine.js +30 -0
- package/dist/commonjs/shared/icons/Valentine.js.map +1 -0
- package/dist/commonjs/shared/icons/Winter.js +32 -0
- package/dist/commonjs/shared/icons/Winter.js.map +1 -0
- package/dist/module/features/celebrations/components/Celebrations.js +45 -0
- package/dist/module/features/celebrations/components/Celebrations.js.map +1 -0
- package/dist/module/features/celebrations/components/Particle.js +76 -0
- package/dist/module/features/celebrations/components/Particle.js.map +1 -0
- package/dist/module/features/celebrations/components/ParticleBatch.js +38 -0
- package/dist/module/features/celebrations/components/ParticleBatch.js.map +1 -0
- package/dist/module/features/celebrations/components/Spark.js +17 -0
- package/dist/module/features/celebrations/components/Spark.js.map +1 -0
- package/dist/module/features/celebrations/config.js +194 -0
- package/dist/module/features/celebrations/config.js.map +1 -0
- package/dist/module/features/celebrations/helpers.js +87 -0
- package/dist/module/features/celebrations/helpers.js.map +1 -0
- package/dist/module/features/celebrations/index.js +5 -0
- package/dist/module/features/celebrations/index.js.map +1 -0
- package/dist/module/features/celebrations/types.js +11 -0
- package/dist/module/features/celebrations/types.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js +52 -0
- package/dist/module/features/endOfAssignment/components/CheatDetected/CheatDetected.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js +241 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +124 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js +50 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js +62 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js +47 -0
- package/dist/module/features/endOfAssignment/components/CorrectAnswer/Spark.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/EOAModal.js +41 -0
- package/dist/module/features/endOfAssignment/components/EOAModal.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js +63 -0
- package/dist/module/features/endOfAssignment/components/ExamLeave/ExamLeave.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js +49 -0
- package/dist/module/features/endOfAssignment/components/ExamPaused/ExamPaused.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js +96 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js +77 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js +89 -0
- package/dist/module/features/endOfAssignment/components/Modal/Modal.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js +38 -0
- package/dist/module/features/endOfAssignment/components/Modal/ModalBackground.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +226 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +56 -0
- package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/Modal/model.js +29 -0
- package/dist/module/features/endOfAssignment/components/Modal/model.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +85 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js +100 -0
- package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.js.map +1 -0
- package/dist/module/features/endOfAssignment/constants.js +51 -0
- package/dist/module/features/endOfAssignment/constants.js.map +1 -0
- package/dist/module/features/endOfAssignment/helpers.js +58 -0
- package/dist/module/features/endOfAssignment/helpers.js.map +1 -0
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js +46 -0
- package/dist/module/features/endOfAssignment/hooks/useSparkAnimation.js.map +1 -0
- package/dist/module/features/endOfAssignment/index.js +6 -0
- package/dist/module/features/endOfAssignment/index.js.map +1 -0
- package/dist/module/features/endOfAssignment/model/model.js +48 -0
- package/dist/module/features/endOfAssignment/model/model.js.map +1 -0
- package/dist/module/features/endOfAssignment/types.js +29 -0
- package/dist/module/features/endOfAssignment/types.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/EOABadge.js +37 -0
- package/dist/module/features/endOfAssignment/ui/EOABadge.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js +24 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButton.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js +58 -0
- package/dist/module/features/endOfAssignment/ui/PracticeButtonGroup.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js +21 -0
- package/dist/module/features/endOfAssignment/ui/SparkIcon.js.map +1 -0
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js +24 -0
- package/dist/module/features/endOfAssignment/ui/ThumbUpIcon.js.map +1 -0
- package/dist/module/index.js +2 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/Halloween.js +47 -0
- package/dist/module/shared/icons/Halloween.js.map +1 -0
- package/dist/module/shared/icons/Pi.js +23 -0
- package/dist/module/shared/icons/Pi.js.map +1 -0
- package/dist/module/shared/icons/Star.js +23 -0
- package/dist/module/shared/icons/Star.js.map +1 -0
- package/dist/module/shared/icons/Valentine.js +23 -0
- package/dist/module/shared/icons/Valentine.js.map +1 -0
- package/dist/module/shared/icons/Winter.js +25 -0
- package/dist/module/shared/icons/Winter.js.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts +10 -0
- package/dist/typescript/commonjs/features/celebrations/components/Celebrations.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts +19 -0
- package/dist/typescript/commonjs/features/celebrations/components/Particle.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts +26 -0
- package/dist/typescript/commonjs/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts +4 -0
- package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/config.d.ts +167 -0
- package/dist/typescript/commonjs/features/celebrations/config.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts +6 -0
- package/dist/typescript/commonjs/features/celebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/index.d.ts +3 -0
- package/dist/typescript/commonjs/features/celebrations/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/celebrations/types.d.ts +11 -0
- package/dist/typescript/commonjs/features/celebrations/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
- package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts +41 -0
- package/dist/typescript/commonjs/features/endOfAssignment/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts +9 -0
- package/dist/typescript/commonjs/features/endOfAssignment/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
- package/dist/typescript/commonjs/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/model/model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts +60 -0
- package/dist/typescript/commonjs/features/endOfAssignment/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
- package/dist/typescript/commonjs/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +2 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Halloween.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Star.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Star.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts +5 -0
- package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts +10 -0
- package/dist/typescript/module/features/celebrations/components/Celebrations.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts +19 -0
- package/dist/typescript/module/features/celebrations/components/Particle.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts +26 -0
- package/dist/typescript/module/features/celebrations/components/ParticleBatch.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts +4 -0
- package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/config.d.ts +167 -0
- package/dist/typescript/module/features/celebrations/config.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/helpers.d.ts +6 -0
- package/dist/typescript/module/features/celebrations/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/index.d.ts +3 -0
- package/dist/typescript/module/features/celebrations/index.d.ts.map +1 -0
- package/dist/typescript/module/features/celebrations/types.d.ts +11 -0
- package/dist/typescript/module/features/celebrations/types.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/CheatDetected/CheatDetected.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts +15 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts +12 -0
- package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/Spark.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts +11 -0
- package/dist/typescript/module/features/endOfAssignment/components/EOAModal.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamLeave/ExamLeave.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamPaused/ExamPaused.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmit.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts +20 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/Modal.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts +3 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/ModalBackground.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/components/Modal/model.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts +8 -0
- package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswerContent.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts +41 -0
- package/dist/typescript/module/features/endOfAssignment/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts +9 -0
- package/dist/typescript/module/features/endOfAssignment/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts +27 -0
- package/dist/typescript/module/features/endOfAssignment/hooks/useSparkAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/index.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/index.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/model/model.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts +60 -0
- package/dist/typescript/module/features/endOfAssignment/types.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts +11 -0
- package/dist/typescript/module/features/endOfAssignment/ui/EOABadge.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts +10 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButton.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts +14 -0
- package/dist/typescript/module/features/endOfAssignment/ui/PracticeButtonGroup.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/ui/SparkIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts +4 -0
- package/dist/typescript/module/features/endOfAssignment/ui/ThumbUpIcon.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +2 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/Halloween.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Halloween.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Pi.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Star.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Star.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Valentine.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/Winter.d.ts +5 -0
- package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -0
- package/package.json +3 -1
- package/src/features/celebrations/components/Celebrations.tsx +62 -0
- package/src/features/celebrations/components/Particle.tsx +99 -0
- package/src/features/celebrations/components/ParticleBatch.tsx +56 -0
- package/src/features/celebrations/components/Spark.tsx +14 -0
- package/src/features/celebrations/config.ts +199 -0
- package/src/features/celebrations/helpers.ts +96 -0
- package/src/features/celebrations/index.ts +2 -0
- package/src/features/celebrations/types.ts +11 -0
- package/src/features/endOfAssignment/components/CheatDetected/CheatDetected.tsx +48 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/AnimatedCard.tsx +293 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +128 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswerSparks.tsx +39 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/GoodDrawingSparks.tsx +40 -0
- package/src/features/endOfAssignment/components/CorrectAnswer/Spark.tsx +45 -0
- package/src/features/endOfAssignment/components/EOAModal.tsx +64 -0
- package/src/features/endOfAssignment/components/ExamLeave/ExamLeave.tsx +56 -0
- package/src/features/endOfAssignment/components/ExamPaused/ExamPaused.tsx +46 -0
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmit.tsx +102 -0
- package/src/features/endOfAssignment/components/ExamSubmit/ExamSubmitContent.tsx +69 -0
- package/src/features/endOfAssignment/components/ExamSubmit/blurred-card.png +0 -0
- package/src/features/endOfAssignment/components/Modal/Modal.tsx +105 -0
- package/src/features/endOfAssignment/components/Modal/ModalBackground.tsx +33 -0
- package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +196 -0
- package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +62 -0
- package/src/features/endOfAssignment/components/Modal/model.ts +34 -0
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +85 -0
- package/src/features/endOfAssignment/components/NoAnswer/NoAnswerContent.tsx +107 -0
- package/src/features/endOfAssignment/constants.ts +53 -0
- package/src/features/endOfAssignment/helpers.ts +28 -0
- package/src/features/endOfAssignment/hooks/useSparkAnimation.tsx +78 -0
- package/src/features/endOfAssignment/index.ts +3 -0
- package/src/features/endOfAssignment/model/model.ts +57 -0
- package/src/features/endOfAssignment/types.ts +65 -0
- package/src/features/endOfAssignment/ui/EOABadge.tsx +47 -0
- package/src/features/endOfAssignment/ui/PracticeButton.tsx +27 -0
- package/src/features/endOfAssignment/ui/PracticeButtonGroup.tsx +75 -0
- package/src/features/endOfAssignment/ui/SparkIcon.tsx +15 -0
- package/src/features/endOfAssignment/ui/ThumbUpIcon.tsx +17 -0
- package/src/index.ts +2 -0
- package/src/shared/icons/Halloween.tsx +33 -0
- package/src/shared/icons/Pi.tsx +16 -0
- package/src/shared/icons/Star.tsx +16 -0
- package/src/shared/icons/Valentine.tsx +16 -0
- package/src/shared/icons/Winter.tsx +19 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { Button, COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
import { EOAModalContentProps } from '../../types'
|
|
6
|
+
|
|
7
|
+
export const ExamPaused = ({ textContent, model }: EOAModalContentProps) => {
|
|
8
|
+
return (
|
|
9
|
+
<View style={styles.container}>
|
|
10
|
+
<Typography variant='h2' style={styles.title}>
|
|
11
|
+
{textContent.title}
|
|
12
|
+
</Typography>
|
|
13
|
+
|
|
14
|
+
<Typography variant='h1' style={styles.description}>
|
|
15
|
+
{textContent.description}
|
|
16
|
+
</Typography>
|
|
17
|
+
|
|
18
|
+
<Button
|
|
19
|
+
variant='primary'
|
|
20
|
+
colorScheme='purple'
|
|
21
|
+
size='large'
|
|
22
|
+
style={{ text: styles.buttonText }}
|
|
23
|
+
onPress={model.hidePopUpAndLeave}
|
|
24
|
+
>
|
|
25
|
+
{textContent.leftButtonText}
|
|
26
|
+
</Button>
|
|
27
|
+
</View>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const styles = StyleSheet.create({
|
|
32
|
+
container: {
|
|
33
|
+
gap: SPACING[800],
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
},
|
|
36
|
+
title: {
|
|
37
|
+
color: COLORS.NEUTRAL_9,
|
|
38
|
+
},
|
|
39
|
+
description: {
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
fontWeight: '700',
|
|
42
|
+
},
|
|
43
|
+
buttonText: {
|
|
44
|
+
textTransform: 'uppercase',
|
|
45
|
+
},
|
|
46
|
+
})
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet, Platform, Image } from 'react-native'
|
|
3
|
+
import { useUnit } from 'effector-react'
|
|
4
|
+
import {
|
|
5
|
+
Button,
|
|
6
|
+
ButtonVariant,
|
|
7
|
+
COLORS,
|
|
8
|
+
IS_MOBILE,
|
|
9
|
+
SPACING,
|
|
10
|
+
Typography,
|
|
11
|
+
} from '@magmamath/react-native-ui'
|
|
12
|
+
|
|
13
|
+
import { ExamSubmitContent } from './ExamSubmitContent'
|
|
14
|
+
import { EOAModalContentProps } from '../../types'
|
|
15
|
+
import { PracticeButton } from '../../ui/PracticeButton'
|
|
16
|
+
|
|
17
|
+
export const ExamSubmit = ({ textContent, model, onPracticePress }: EOAModalContentProps) => {
|
|
18
|
+
const popUpData = useUnit(model.$popUpData)
|
|
19
|
+
|
|
20
|
+
const problemsAmount = popUpData?.stats?.problemsAmount ?? 0
|
|
21
|
+
const practiceModeEnabled = popUpData?.user.practiceMode
|
|
22
|
+
|
|
23
|
+
const leaveAssignmentButtonVariant =
|
|
24
|
+
!practiceModeEnabled || popUpData?.newerAssignmentAvailable
|
|
25
|
+
? ButtonVariant.PRIMARY
|
|
26
|
+
: ButtonVariant.TERTIARY
|
|
27
|
+
|
|
28
|
+
const handlePracticePress = () => {
|
|
29
|
+
onPracticePress?.()
|
|
30
|
+
model.hidePopUp()
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<View style={styles.container}>
|
|
35
|
+
<View style={styles.contentBackground}>
|
|
36
|
+
{IS_MOBILE ? (
|
|
37
|
+
<Image source={require('./blurred-card.png')} />
|
|
38
|
+
) : (
|
|
39
|
+
<ExamSubmitContent problemsAmount={problemsAmount} />
|
|
40
|
+
)}
|
|
41
|
+
</View>
|
|
42
|
+
<Typography variant="h2" style={styles.title}>
|
|
43
|
+
{textContent.title}
|
|
44
|
+
</Typography>
|
|
45
|
+
<Typography variant="h1" style={styles.description}>
|
|
46
|
+
{textContent.description}
|
|
47
|
+
</Typography>
|
|
48
|
+
|
|
49
|
+
<View style={styles.buttonsContainer}>
|
|
50
|
+
<Button
|
|
51
|
+
variant={leaveAssignmentButtonVariant}
|
|
52
|
+
size="large"
|
|
53
|
+
colorScheme={popUpData?.isExam ? 'purple' : 'blue'}
|
|
54
|
+
style={{ text: { textTransform: 'uppercase' } }}
|
|
55
|
+
onPress={model.hidePopUpAndLeave}
|
|
56
|
+
>
|
|
57
|
+
{textContent.leftButtonText ?? ''}
|
|
58
|
+
</Button>
|
|
59
|
+
{!!practiceModeEnabled && !popUpData?.newerAssignmentAvailable && (
|
|
60
|
+
<PracticeButton onPress={handlePracticePress} text={textContent.rightButtonText} />
|
|
61
|
+
)}
|
|
62
|
+
</View>
|
|
63
|
+
</View>
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const styles = StyleSheet.create({
|
|
68
|
+
container: {
|
|
69
|
+
flex: 1,
|
|
70
|
+
gap: SPACING[400],
|
|
71
|
+
alignItems: 'center',
|
|
72
|
+
justifyContent: 'space-between',
|
|
73
|
+
},
|
|
74
|
+
title: {
|
|
75
|
+
color: COLORS.NEUTRAL_9,
|
|
76
|
+
paddingVertical: SPACING[100],
|
|
77
|
+
},
|
|
78
|
+
description: {
|
|
79
|
+
color: COLORS.NEUTRAL_9,
|
|
80
|
+
textAlign: 'center',
|
|
81
|
+
fontWeight: 700,
|
|
82
|
+
paddingTop: SPACING[800],
|
|
83
|
+
paddingBottom: SPACING[1600],
|
|
84
|
+
},
|
|
85
|
+
contentBackground: {
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
zIndex: -1,
|
|
88
|
+
top: '22%',
|
|
89
|
+
...(Platform.OS === 'web' && {
|
|
90
|
+
filter: 'blur(4px)',
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
buttonsContainer: {
|
|
94
|
+
height: 62,
|
|
95
|
+
flexDirection: 'row',
|
|
96
|
+
alignItems: 'center',
|
|
97
|
+
gap: SPACING[200],
|
|
98
|
+
},
|
|
99
|
+
buttonText: {
|
|
100
|
+
textTransform: 'uppercase',
|
|
101
|
+
},
|
|
102
|
+
})
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS, COLORS, CorrectIcon, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
type ExamSumitContentProps = {
|
|
6
|
+
problemsAmount: number
|
|
7
|
+
description?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const ExamSubmitContent = ({ problemsAmount, description }: ExamSumitContentProps) => {
|
|
11
|
+
return (
|
|
12
|
+
<View style={styles.container}>
|
|
13
|
+
<View style={styles.content}>
|
|
14
|
+
<View style={styles.iconContainer}>
|
|
15
|
+
<CorrectIcon size={70} color={COLORS.NEUTRAL_1} />
|
|
16
|
+
</View>
|
|
17
|
+
<View style={styles.textContainer}>
|
|
18
|
+
<Typography variant="xxl" style={styles.largeText}>
|
|
19
|
+
{description || '?'}
|
|
20
|
+
</Typography>
|
|
21
|
+
<Typography style={styles.text}>/{problemsAmount}</Typography>
|
|
22
|
+
</View>
|
|
23
|
+
</View>
|
|
24
|
+
</View>
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const styles = StyleSheet.create({
|
|
29
|
+
container: {
|
|
30
|
+
opacity: 0.4,
|
|
31
|
+
paddingHorizontal: SPACING[100],
|
|
32
|
+
paddingTop: SPACING[100],
|
|
33
|
+
paddingBottom: 38,
|
|
34
|
+
marginBottom: SPACING[800],
|
|
35
|
+
backgroundColor: COLORS.NEUTRAL_5,
|
|
36
|
+
borderRadius: BORDER_RADIUS[400],
|
|
37
|
+
},
|
|
38
|
+
content: {
|
|
39
|
+
flexDirection: 'row',
|
|
40
|
+
borderRadius: BORDER_RADIUS[200],
|
|
41
|
+
paddingVertical: SPACING[400],
|
|
42
|
+
paddingHorizontal: SPACING[800],
|
|
43
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
44
|
+
gap: SPACING[500],
|
|
45
|
+
},
|
|
46
|
+
iconContainer: {
|
|
47
|
+
backgroundColor: COLORS.NEUTRAL_5,
|
|
48
|
+
padding: SPACING[200],
|
|
49
|
+
borderRadius: 100,
|
|
50
|
+
height: 70,
|
|
51
|
+
width: 70,
|
|
52
|
+
justifyContent: 'center',
|
|
53
|
+
alignItems: 'center',
|
|
54
|
+
},
|
|
55
|
+
textContainer: {
|
|
56
|
+
flexDirection: 'row',
|
|
57
|
+
},
|
|
58
|
+
text: {
|
|
59
|
+
fontWeight: '700',
|
|
60
|
+
color: COLORS.NEUTRAL_5,
|
|
61
|
+
alignSelf: 'flex-end',
|
|
62
|
+
},
|
|
63
|
+
largeText: {
|
|
64
|
+
fontSize: 48,
|
|
65
|
+
fontWeight: '700',
|
|
66
|
+
lineHeight: 48,
|
|
67
|
+
color: COLORS.NEUTRAL_5,
|
|
68
|
+
},
|
|
69
|
+
})
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { ReactNode, useEffect, useState } from 'react'
|
|
2
|
+
import { ButtonVariant, CrossIcon, COLORS, BORDER_RADIUS, SPACING, SHADOWS, Button } from '@magmamath/react-native-ui'
|
|
3
|
+
import {
|
|
4
|
+
Animated,
|
|
5
|
+
GestureResponderEvent,
|
|
6
|
+
StyleProp,
|
|
7
|
+
StyleSheet,
|
|
8
|
+
TextStyle,
|
|
9
|
+
TouchableWithoutFeedback,
|
|
10
|
+
View,
|
|
11
|
+
ViewStyle,
|
|
12
|
+
} from 'react-native'
|
|
13
|
+
|
|
14
|
+
import { ModalModel } from './model'
|
|
15
|
+
import { ModalBackground } from './ModalBackground'
|
|
16
|
+
|
|
17
|
+
const stopPropagation = {
|
|
18
|
+
onTouchStart: (event: GestureResponderEvent) => {
|
|
19
|
+
event.stopPropagation()
|
|
20
|
+
},
|
|
21
|
+
onMouseDown: (event: MouseEvent) => {
|
|
22
|
+
event.stopPropagation()
|
|
23
|
+
},
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type ModalProps = {
|
|
27
|
+
isVisible: boolean
|
|
28
|
+
content: ReactNode
|
|
29
|
+
isDismissable: boolean
|
|
30
|
+
onClose?: () => void
|
|
31
|
+
hideCloseButton?: boolean
|
|
32
|
+
withBackground?: boolean
|
|
33
|
+
style?: {
|
|
34
|
+
overlay?: StyleProp<ViewStyle>
|
|
35
|
+
container?: StyleProp<ViewStyle>
|
|
36
|
+
header?: StyleProp<TextStyle> | StyleProp<ViewStyle>
|
|
37
|
+
content?: StyleProp<TextStyle> | StyleProp<ViewStyle>
|
|
38
|
+
footer?: StyleProp<ViewStyle>
|
|
39
|
+
closeButton?: StyleProp<ViewStyle>
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const Modal = ({ isVisible, isDismissable = true, onClose, style, content, withBackground }: ModalProps) => {
|
|
44
|
+
const [modalModel] = useState(() => new ModalModel())
|
|
45
|
+
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
if (isVisible) {
|
|
48
|
+
modalModel.animation.show()
|
|
49
|
+
}
|
|
50
|
+
}, [isVisible])
|
|
51
|
+
|
|
52
|
+
if (!isVisible) return null
|
|
53
|
+
return (
|
|
54
|
+
<TouchableWithoutFeedback onPress={() => isDismissable && onClose?.()}>
|
|
55
|
+
<Animated.View style={[styles.overlay, style?.overlay, modalModel.animatedStyle]}>
|
|
56
|
+
<TouchableWithoutFeedback {...stopPropagation}>
|
|
57
|
+
<View style={[styles.container, style?.container]}>
|
|
58
|
+
{withBackground && <View style={styles.backgroundWrapper}>{<ModalBackground />}</View>}
|
|
59
|
+
{isDismissable && (
|
|
60
|
+
<View style={[styles.closeButton, style?.closeButton]}>
|
|
61
|
+
<Button
|
|
62
|
+
variant={ButtonVariant.TERTIARY}
|
|
63
|
+
icon={<CrossIcon size={18} color={COLORS.NEUTRAL_7} />}
|
|
64
|
+
onPress={onClose}
|
|
65
|
+
/>
|
|
66
|
+
</View>
|
|
67
|
+
)}
|
|
68
|
+
{content}
|
|
69
|
+
</View>
|
|
70
|
+
</TouchableWithoutFeedback>
|
|
71
|
+
</Animated.View>
|
|
72
|
+
</TouchableWithoutFeedback>
|
|
73
|
+
)
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
overlay: {
|
|
78
|
+
...StyleSheet.absoluteFillObject,
|
|
79
|
+
justifyContent: 'center',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
backgroundColor: 'rgba(0, 0, 0, 0.2)',
|
|
82
|
+
zIndex: 10001,
|
|
83
|
+
},
|
|
84
|
+
container: {
|
|
85
|
+
position: 'relative',
|
|
86
|
+
justifyContent: 'space-between',
|
|
87
|
+
backgroundColor: COLORS.NEUTRAL_1,
|
|
88
|
+
minWidth: 300,
|
|
89
|
+
maxWidth: 957,
|
|
90
|
+
borderRadius: BORDER_RADIUS['400'],
|
|
91
|
+
paddingHorizontal: SPACING['1600'],
|
|
92
|
+
paddingVertical: SPACING['800'],
|
|
93
|
+
gap: SPACING['600'],
|
|
94
|
+
...SHADOWS['5'],
|
|
95
|
+
},
|
|
96
|
+
closeButton: {
|
|
97
|
+
position: 'absolute',
|
|
98
|
+
top: SPACING['400'],
|
|
99
|
+
right: SPACING['400'],
|
|
100
|
+
},
|
|
101
|
+
backgroundWrapper: {
|
|
102
|
+
...StyleSheet.absoluteFillObject,
|
|
103
|
+
zIndex: -1,
|
|
104
|
+
},
|
|
105
|
+
})
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import { View, StyleSheet } from 'react-native'
|
|
3
|
+
import { BORDER_RADIUS } from '@magmamath/react-native-ui'
|
|
4
|
+
|
|
5
|
+
import { TrophyIcon } from './assets/TrophyIcon'
|
|
6
|
+
import { SunrisingIcon } from './assets/SunrisingIcon'
|
|
7
|
+
|
|
8
|
+
export const ModalBackground = () => (
|
|
9
|
+
<View style={[StyleSheet.absoluteFill, styles.backgroundContainer]}>
|
|
10
|
+
<View style={styles.bgImageLeft}>
|
|
11
|
+
<TrophyIcon size={466} />
|
|
12
|
+
</View>
|
|
13
|
+
<View style={styles.bgImageRight}>
|
|
14
|
+
<SunrisingIcon size={909} />
|
|
15
|
+
</View>
|
|
16
|
+
</View>
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
backgroundContainer: {
|
|
21
|
+
borderRadius: BORDER_RADIUS[400],
|
|
22
|
+
overflow: 'hidden',
|
|
23
|
+
},
|
|
24
|
+
bgImageLeft: {
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
bottom: 0,
|
|
27
|
+
zIndex: -1,
|
|
28
|
+
},
|
|
29
|
+
bgImageRight: {
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
zIndex: -2,
|
|
32
|
+
},
|
|
33
|
+
})
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import * as React from 'react'
|
|
2
|
+
import { IconProps } from '@magmamath/react-native-ui'
|
|
3
|
+
import Svg, { G, Path, Defs, LinearGradient, Stop } from 'react-native-svg'
|
|
4
|
+
|
|
5
|
+
export const SunrisingIcon = (props: IconProps) => {
|
|
6
|
+
const height = (props.size ?? 0) * 0.606
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<Svg width={props.size} height={height} viewBox='0 0 909 551' fill='none' {...props}>
|
|
10
|
+
<G opacity={0.1}>
|
|
11
|
+
<Path
|
|
12
|
+
d='M164.04-598.854a893.984 893.984 0 01222.319 28.085L164.04 295.106v-893.96z'
|
|
13
|
+
fill='url(#paint0_linear_3505_1308)'
|
|
14
|
+
/>
|
|
15
|
+
<Path
|
|
16
|
+
d='M-282.94-479.086a893.954 893.954 0 01206.577-86.837L164.04 295.106l-446.98-774.192z'
|
|
17
|
+
fill='url(#paint1_linear_3505_1308)'
|
|
18
|
+
/>
|
|
19
|
+
<Path
|
|
20
|
+
d='M-610.152-151.874A893.997 893.997 0 01-474.67-330.365l638.71 625.471-774.192-446.98z'
|
|
21
|
+
fill='url(#paint2_linear_3505_1308)'
|
|
22
|
+
/>
|
|
23
|
+
<Path
|
|
24
|
+
d='M-729.92 295.106a893.938 893.938 0 0128.086-222.319L164.04 295.106h-893.96z'
|
|
25
|
+
fill='url(#paint3_linear_3505_1308)'
|
|
26
|
+
/>
|
|
27
|
+
<Path
|
|
28
|
+
d='M-610.152 742.086a893.994 893.994 0 01-86.837-206.577L164.04 295.106l-774.192 446.98z'
|
|
29
|
+
fill='url(#paint4_linear_3505_1308)'
|
|
30
|
+
/>
|
|
31
|
+
<Path
|
|
32
|
+
d='M-282.94 1069.3a894.157 894.157 0 01-178.491-135.484l625.471-638.71-446.98 774.194z'
|
|
33
|
+
fill='url(#paint5_linear_3505_1308)'
|
|
34
|
+
/>
|
|
35
|
+
<Path
|
|
36
|
+
d='M611.02-479.086a893.96 893.96 0 01178.491 135.482L164.04 295.106l446.98-774.192z'
|
|
37
|
+
fill='url(#paint6_linear_3505_1308)'
|
|
38
|
+
/>
|
|
39
|
+
<Path
|
|
40
|
+
d='M938.232-151.874a894.096 894.096 0 0186.838 206.577L164.04 295.106l774.192-446.98z'
|
|
41
|
+
fill='url(#paint7_linear_3505_1308)'
|
|
42
|
+
/>
|
|
43
|
+
<Path
|
|
44
|
+
d='M1058 295.106c0 74.991-9.44 149.684-28.09 222.319L164.04 295.106H1058z'
|
|
45
|
+
fill='url(#paint8_linear_3505_1308)'
|
|
46
|
+
/>
|
|
47
|
+
<Path
|
|
48
|
+
d='M938.232 742.086A893.96 893.96 0 01802.75 920.577L164.04 295.106l774.192 446.98z'
|
|
49
|
+
fill='url(#paint9_linear_3505_1308)'
|
|
50
|
+
/>
|
|
51
|
+
<Path
|
|
52
|
+
d='M611.02 1069.3a893.885 893.885 0 01-206.577 86.83L164.04 295.106 611.02 1069.3z'
|
|
53
|
+
fill='url(#paint10_linear_3505_1308)'
|
|
54
|
+
/>
|
|
55
|
+
<Path
|
|
56
|
+
d='M164.04 1189.07a893.941 893.941 0 01-222.319-28.09L164.04 295.106v893.964z'
|
|
57
|
+
fill='url(#paint11_linear_3505_1308)'
|
|
58
|
+
/>
|
|
59
|
+
</G>
|
|
60
|
+
<Defs>
|
|
61
|
+
<LinearGradient
|
|
62
|
+
id='paint0_linear_3505_1308'
|
|
63
|
+
x1={164.04}
|
|
64
|
+
y1={383.036}
|
|
65
|
+
x2={930.076}
|
|
66
|
+
y2={383.036}
|
|
67
|
+
gradientUnits='userSpaceOnUse'
|
|
68
|
+
>
|
|
69
|
+
<Stop stopColor='#FF245F' />
|
|
70
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
71
|
+
</LinearGradient>
|
|
72
|
+
<LinearGradient
|
|
73
|
+
id='paint1_linear_3505_1308'
|
|
74
|
+
x1={164.04}
|
|
75
|
+
y1={383.036}
|
|
76
|
+
x2={930.076}
|
|
77
|
+
y2={383.036}
|
|
78
|
+
gradientUnits='userSpaceOnUse'
|
|
79
|
+
>
|
|
80
|
+
<Stop stopColor='#FF245F' />
|
|
81
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
82
|
+
</LinearGradient>
|
|
83
|
+
<LinearGradient
|
|
84
|
+
id='paint2_linear_3505_1308'
|
|
85
|
+
x1={164.04}
|
|
86
|
+
y1={383.036}
|
|
87
|
+
x2={930.076}
|
|
88
|
+
y2={383.036}
|
|
89
|
+
gradientUnits='userSpaceOnUse'
|
|
90
|
+
>
|
|
91
|
+
<Stop stopColor='#FF245F' />
|
|
92
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
93
|
+
</LinearGradient>
|
|
94
|
+
<LinearGradient
|
|
95
|
+
id='paint3_linear_3505_1308'
|
|
96
|
+
x1={164.04}
|
|
97
|
+
y1={383.036}
|
|
98
|
+
x2={930.076}
|
|
99
|
+
y2={383.036}
|
|
100
|
+
gradientUnits='userSpaceOnUse'
|
|
101
|
+
>
|
|
102
|
+
<Stop stopColor='#FF245F' />
|
|
103
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
104
|
+
</LinearGradient>
|
|
105
|
+
<LinearGradient
|
|
106
|
+
id='paint4_linear_3505_1308'
|
|
107
|
+
x1={164.04}
|
|
108
|
+
y1={383.036}
|
|
109
|
+
x2={930.076}
|
|
110
|
+
y2={383.036}
|
|
111
|
+
gradientUnits='userSpaceOnUse'
|
|
112
|
+
>
|
|
113
|
+
<Stop stopColor='#FF245F' />
|
|
114
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
115
|
+
</LinearGradient>
|
|
116
|
+
<LinearGradient
|
|
117
|
+
id='paint5_linear_3505_1308'
|
|
118
|
+
x1={164.04}
|
|
119
|
+
y1={383.036}
|
|
120
|
+
x2={930.076}
|
|
121
|
+
y2={383.036}
|
|
122
|
+
gradientUnits='userSpaceOnUse'
|
|
123
|
+
>
|
|
124
|
+
<Stop stopColor='#FF245F' />
|
|
125
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
126
|
+
</LinearGradient>
|
|
127
|
+
<LinearGradient
|
|
128
|
+
id='paint6_linear_3505_1308'
|
|
129
|
+
x1={164.04}
|
|
130
|
+
y1={383.036}
|
|
131
|
+
x2={930.076}
|
|
132
|
+
y2={383.036}
|
|
133
|
+
gradientUnits='userSpaceOnUse'
|
|
134
|
+
>
|
|
135
|
+
<Stop stopColor='#FF245F' />
|
|
136
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
137
|
+
</LinearGradient>
|
|
138
|
+
<LinearGradient
|
|
139
|
+
id='paint7_linear_3505_1308'
|
|
140
|
+
x1={164.04}
|
|
141
|
+
y1={383.036}
|
|
142
|
+
x2={930.076}
|
|
143
|
+
y2={383.036}
|
|
144
|
+
gradientUnits='userSpaceOnUse'
|
|
145
|
+
>
|
|
146
|
+
<Stop stopColor='#FF245F' />
|
|
147
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
148
|
+
</LinearGradient>
|
|
149
|
+
<LinearGradient
|
|
150
|
+
id='paint8_linear_3505_1308'
|
|
151
|
+
x1={164.04}
|
|
152
|
+
y1={383.036}
|
|
153
|
+
x2={930.076}
|
|
154
|
+
y2={383.036}
|
|
155
|
+
gradientUnits='userSpaceOnUse'
|
|
156
|
+
>
|
|
157
|
+
<Stop stopColor='#FF245F' />
|
|
158
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
159
|
+
</LinearGradient>
|
|
160
|
+
<LinearGradient
|
|
161
|
+
id='paint9_linear_3505_1308'
|
|
162
|
+
x1={164.04}
|
|
163
|
+
y1={383.036}
|
|
164
|
+
x2={930.076}
|
|
165
|
+
y2={383.036}
|
|
166
|
+
gradientUnits='userSpaceOnUse'
|
|
167
|
+
>
|
|
168
|
+
<Stop stopColor='#FF245F' />
|
|
169
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
170
|
+
</LinearGradient>
|
|
171
|
+
<LinearGradient
|
|
172
|
+
id='paint10_linear_3505_1308'
|
|
173
|
+
x1={164.04}
|
|
174
|
+
y1={383.036}
|
|
175
|
+
x2={930.076}
|
|
176
|
+
y2={383.036}
|
|
177
|
+
gradientUnits='userSpaceOnUse'
|
|
178
|
+
>
|
|
179
|
+
<Stop stopColor='#FF245F' />
|
|
180
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
181
|
+
</LinearGradient>
|
|
182
|
+
<LinearGradient
|
|
183
|
+
id='paint11_linear_3505_1308'
|
|
184
|
+
x1={164.04}
|
|
185
|
+
y1={383.036}
|
|
186
|
+
x2={930.076}
|
|
187
|
+
y2={383.036}
|
|
188
|
+
gradientUnits='userSpaceOnUse'
|
|
189
|
+
>
|
|
190
|
+
<Stop stopColor='#FF245F' />
|
|
191
|
+
<Stop offset={1} stopColor='#FF7917' stopOpacity={0} />
|
|
192
|
+
</LinearGradient>
|
|
193
|
+
</Defs>
|
|
194
|
+
</Svg>
|
|
195
|
+
)
|
|
196
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { IconProps } from '@magmamath/react-native-ui'
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import Svg, { Path } from 'react-native-svg'
|
|
4
|
+
|
|
5
|
+
export const TrophyIcon = (props: IconProps) => {
|
|
6
|
+
const height = (props.size ?? 0) * 0.982
|
|
7
|
+
|
|
8
|
+
return (
|
|
9
|
+
<Svg width={props.size} height={height} viewBox='0 0 466 458' fill='none' {...props}>
|
|
10
|
+
<Path
|
|
11
|
+
d='M258.454 244.45l-5.731 32.767 16.384 2.86c8.047 1.407 15.796 2.106 23.222 2.106 15.697.011 29.985-3.137 42.766-9.389 6.728-3.292 13.025-7.438 18.9-12.449 44.672-38.12 50.247-115.859 49.604-158.813-.288-18.467-9.466-35.848-24.575-46.49-9.355-6.606-20.23-10.209-31.348-10.575a57.996 57.996 0 00-17.935 2.206c-14.355 4.09-26.36 13.38-33.875 25.994l-32.379-14.332L250.03 88.75l39.162 17.326c6.274 2.771 13.247 2.916 19.632.388 6.374-2.516 11.373-7.382 14.055-13.7a24.56 24.56 0 0115.974-14.112c2.993-.853 6.052-1.13 9.056-.853a24.578 24.578 0 0111.961 4.422c6.44 4.534 10.353 11.95 10.475 19.82 1.164 76.841-18.822 112.224-32.024 127.144-2.195 2.494-4.213 4.412-5.909 5.864-14.632 12.47-33.465 16.483-57.586 12.271l-16.372-2.871zM37.623 282.187c7.429 0 15.173-.703 23.223-2.111l16.379-2.864-5.73-32.757-16.378 2.865c-24.126 4.221-42.953.202-57.575-12.274-11.858-10.119-39.295-43.336-37.936-133.006.119-7.871 4.036-15.28 10.476-19.82a24.601 24.601 0 0121.015-3.57A24.606 24.606 0 017.075 92.764c2.683 6.318 7.675 11.186 14.058 13.709 6.384 2.522 13.355 2.38 19.63-.396l39.152-17.329-13.46-30.41-32.37 14.328C26.57 60.055 14.57 50.762.213 46.67c-16.936-4.828-34.901-1.777-49.293 8.369-15.102 10.647-24.286 28.03-24.565 46.498-.652 42.947 4.926 120.686 49.6 158.806 17.036 14.535 37.71 21.844 61.668 21.844z'
|
|
12
|
+
fill='#FFD690'
|
|
13
|
+
/>
|
|
14
|
+
<Path
|
|
15
|
+
opacity={0.1}
|
|
16
|
+
d='M335.095 272.795c6.728-3.293 13.025-7.438 18.9-12.449 44.672-38.121 50.247-115.859 49.604-158.813-.288-18.467-9.466-35.848-24.575-46.49-9.355-6.606-20.23-10.209-31.348-10.575 3.326 3.691 14.3 18.057.233 33.332a24.578 24.578 0 0111.961 4.423c6.44 4.534 10.353 11.95 10.475 19.82 1.164 76.84-18.822 112.223-32.024 127.144 0 0 21.659 24.497-3.226 43.608z'
|
|
17
|
+
fill='#D25B00'
|
|
18
|
+
/>
|
|
19
|
+
<Path
|
|
20
|
+
d='M26.153 202.82L46.65 26.089a11.505 11.505 0 0111.429-10.18h213.797a11.504 11.504 0 0111.428 10.18l20.495 176.731c4.463 38.483-10.944 76.387-39.056 96.086l-8.179 5.73c-15.466 10.838-32.135 18.807-49.434 23.744-11.86 3.386-19.699 16.816-18.043 31.209l5.7 49.527h-59.619l5.7-49.527c1.656-14.393-6.182-27.825-18.043-31.209-17.299-4.937-33.967-12.905-49.434-23.744l-8.178-5.73c-28.115-19.699-43.522-57.604-39.059-96.086z'
|
|
21
|
+
fill='#FFD690'
|
|
22
|
+
/>
|
|
23
|
+
<Path
|
|
24
|
+
opacity={0.1}
|
|
25
|
+
d='M169.03 359.583l1.752 36.868h22.546l-4.245-36.868c-1.652-14.388 6.185-27.823 18.046-31.203 17.293-4.933 33.964-12.903 49.428-23.744l8.18-5.731c28.112-19.698 43.52-57.597 39.063-96.084L283.299 26.086a11.505 11.505 0 00-11.429-10.18h-50.531l12.193 186.914c2.505 38.487-6.152 76.386-21.959 96.084l-4.6 5.731c-8.702 10.841-18.068 18.811-27.801 23.743-6.661 3.382-11.073 16.817-10.142 31.205z'
|
|
26
|
+
fill='#D25B00'
|
|
27
|
+
/>
|
|
28
|
+
<Path
|
|
29
|
+
d='M63.166 437.528l203.607-4.774v-6.731c0-16.335-13.295-29.576-29.63-29.576H92.742c-16.335 0-29.576 13.241-29.576 29.576v11.505z'
|
|
30
|
+
fill='#FFD690'
|
|
31
|
+
/>
|
|
32
|
+
<Path
|
|
33
|
+
opacity={0.1}
|
|
34
|
+
d='M171.477 396.447c16.328 0 29.574 13.247 29.574 29.575v7.907l65.722-.857v-7.05c0-16.328-13.246-29.575-29.574-29.575h-65.722z'
|
|
35
|
+
fill='#D25B00'
|
|
36
|
+
/>
|
|
37
|
+
<Path
|
|
38
|
+
d='M209.405 432.82c15.086 0 27.324 12.238 27.324 27.336v100.01h42.122c8.43 0 15.264-6.834 15.264-15.264v-84.746c0-15.097-12.239-27.336-27.335-27.336h-57.375z'
|
|
39
|
+
fill='#2488BB'
|
|
40
|
+
/>
|
|
41
|
+
<Path
|
|
42
|
+
opacity={0.5}
|
|
43
|
+
d='M35.846 543.408a8.835 8.835 0 1017.668 0v-88.343c0-6.569 1.263-10.538 2.59-13.251 1.325-2.713 5.889-7.362 13.25-8.834H66.41c-5.89 0-13.567 0-20.614 5.889-6.683 5.586-9.95 13.376-9.95 22.086v82.453z'
|
|
44
|
+
fill='#fff'
|
|
45
|
+
/>
|
|
46
|
+
<Path
|
|
47
|
+
d='M35.837 460.156v84.489c0 8.57 6.912 15.518 15.483 15.518H278.85c8.43 0 15.264-6.833 15.264-15.263v-84.744c0-15.097-12.239-27.336-27.335-27.336H63.173c-15.097 0-27.336 12.239-27.336 27.336z'
|
|
48
|
+
fill='#AAD5EF'
|
|
49
|
+
/>
|
|
50
|
+
<Path
|
|
51
|
+
opacity={0.1}
|
|
52
|
+
d='M208.151 432.762c15.309 0 27.727 12.418 27.727 27.739l.004 33.137h42.744c8.555 0 15.489-6.934 15.489-15.489l-.003-17.648c0-15.32-12.419-27.739-27.739-27.739h-58.222z'
|
|
53
|
+
fill='#D25B00'
|
|
54
|
+
/>
|
|
55
|
+
<Path
|
|
56
|
+
opacity={0.3}
|
|
57
|
+
d='M73.782 17.1c-1.8.654-4.135 2.151-6.083 4.197-2.014 2.118-2.78 3.928-2.901 4.848-3.966 30.145-7.066 56.336-10.696 87.003-3.112 26.288-9.844 72.335-12.788 92.948-2.944 20.613-2.944 23.442-2.944 35.337 0 22.086 10.364 42.197 10.364 42.197-4.634-5.04-14.077-23.056-15.589-26.678-5.247-12.574-9.599-33.753-7.343-51.809 4.73-37.865 7.788-67.529 10.907-93.864 5.03-41.445 4.877-42.092 8.977-77.441 1.785-15.392 1.08-18.069 13.976-18.069h18.25c-1.451.417-2.836.86-4.13 1.33zM35.846 543.249a8.834 8.834 0 008.834 8.834 8.834 8.834 0 008.834-8.834v-88.343c0-6.57 1.263-10.538 2.59-13.251 1.325-2.713 5.889-7.362 13.25-8.835 0 0-1.158-.003-2.94-.003-13.712 0-13.571.004-20.618 5.893-6.683 5.586-9.95 13.376-9.95 22.086v82.453z'
|
|
58
|
+
fill='#fff'
|
|
59
|
+
/>
|
|
60
|
+
</Svg>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { IS_WEB } from '@magmamath/react-native-ui'
|
|
2
|
+
import { Animated } from 'react-native'
|
|
3
|
+
|
|
4
|
+
export class ModalModel {
|
|
5
|
+
private static ANIMATION_DURATION = 200
|
|
6
|
+
private static INITIAL_OPACITY = 0
|
|
7
|
+
private static createTimingAnimation(
|
|
8
|
+
animation: Animated.Value,
|
|
9
|
+
toValue: number
|
|
10
|
+
) {
|
|
11
|
+
return Animated.timing(animation, {
|
|
12
|
+
toValue,
|
|
13
|
+
duration: ModalModel.ANIMATION_DURATION,
|
|
14
|
+
useNativeDriver: !IS_WEB,
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public animation
|
|
19
|
+
public animatedStyle
|
|
20
|
+
|
|
21
|
+
constructor() {
|
|
22
|
+
const opacity = new Animated.Value(ModalModel.INITIAL_OPACITY)
|
|
23
|
+
const opacityAnimation = ModalModel.createTimingAnimation(opacity, 1)
|
|
24
|
+
this.animation = {
|
|
25
|
+
show: () => {
|
|
26
|
+
opacityAnimation.reset()
|
|
27
|
+
opacityAnimation.start()
|
|
28
|
+
},
|
|
29
|
+
}
|
|
30
|
+
this.animatedStyle = {
|
|
31
|
+
opacity,
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|