@cuemath/leap 3.2.18-mb → 3.2.19-beta-0.1
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/assets/illustrations/illustrations.js +11 -5
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/after-noon.js +34 -0
- package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js +33 -0
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/cue-board.js +23 -0
- package/dist/assets/line-icons/icons/cue-board.js.map +1 -0
- package/dist/assets/line-icons/icons/evening.js +35 -0
- package/dist/assets/line-icons/icons/evening.js.map +1 -0
- package/dist/assets/line-icons/icons/hint-fill.js +35 -0
- package/dist/assets/line-icons/icons/hint-fill.js.map +1 -0
- package/dist/assets/line-icons/icons/morning.js +35 -0
- package/dist/assets/line-icons/icons/morning.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js +35 -0
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/screen-grab.js +23 -0
- package/dist/assets/line-icons/icons/screen-grab.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker-filled.js +64 -0
- package/dist/assets/line-icons/icons/sticker-filled.js.map +1 -0
- package/dist/assets/line-icons/icons/sticker.js +46 -0
- package/dist/assets/line-icons/icons/sticker.js.map +1 -0
- package/dist/assets/lottie/lottie.js +16 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +2 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +6 -4
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +10 -8
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +26 -25
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +52 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +93 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +10 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +17 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +20 -14
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +26 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +50 -0
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button.js +74 -0
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +35 -34
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +8 -9
- package/dist/features/auth/login/login-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +19 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +32 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +44 -0
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +54 -0
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +83 -0
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +9 -9
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +4 -4
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +85 -85
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +121 -98
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
- package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
- package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
- package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +3 -1
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +7 -4
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +85 -97
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -42
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +54 -48
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +33 -27
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +29 -27
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/journey/use-journey/journey-context-provider.js +73 -72
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +6 -4
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js +85 -0
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app-view.js +120 -0
- package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -0
- package/dist/features/puzzles/app/puzzle-app.js +62 -0
- package/dist/features/puzzles/app/puzzle-app.js.map +1 -0
- package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +79 -30
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/constants/puzzle-container.js +8 -0
- package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
- package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
- package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +100 -107
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +110 -0
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +6 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +12 -60
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +72 -77
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +63 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +21 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -0
- package/dist/features/ui/buttons/button/button.js +41 -38
- package/dist/features/ui/buttons/button/button.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +31 -27
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/buttons/text-button/text-button.js +26 -22
- package/dist/features/ui/buttons/text-button/text-button.js.map +1 -1
- package/dist/features/ui/drawer/drawer-styled.js +34 -0
- package/dist/features/ui/drawer/drawer-styled.js.map +1 -0
- package/dist/features/ui/drawer/drawer.js +42 -0
- package/dist/features/ui/drawer/drawer.js.map +1 -0
- package/dist/features/ui/error/error.js +65 -27
- package/dist/features/ui/error/error.js.map +1 -1
- package/dist/features/ui/grade-selector/grade-selector.js +33 -27
- package/dist/features/ui/grade-selector/grade-selector.js.map +1 -1
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +25 -29
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +34 -58
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +40 -14
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +14 -7
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +13 -12
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/{stickers/sticker-selector/sticker-selector-styles.js → ui/sticker-grid/sticker-grid-styles.js} +3 -4
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
- package/dist/features/ui/sticker-grid/sticker.js +57 -0
- package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
- package/dist/features/ui/stickers/constants.js +6 -0
- package/dist/features/ui/stickers/constants.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/effects.js → ui/stickers/stickers-effects.js} +6 -6
- package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
- package/dist/features/{stickers/stickers-effects/stickers-effects-styled.js → ui/stickers/stickers-styled.js} +2 -2
- package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
- package/dist/features/ui/stickers/stickers-utils.js +91 -0
- package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
- package/dist/features/ui/stickers/stickers.js +40 -0
- package/dist/features/ui/stickers/stickers.js.map +1 -0
- package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
- package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
- package/dist/features/ui/streak-icon/streak-icon.js +17 -15
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/features/ui/tab/tab.js +30 -26
- package/dist/features/ui/tab/tab.js.map +1 -1
- package/dist/features/ui/text/text.js +40 -36
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/ui/theme/constants.js +4 -2
- package/dist/features/ui/theme/constants.js.map +1 -1
- package/dist/features/ui/theme/get-device.js +3 -3
- package/dist/features/ui/theme/get-device.js.map +1 -1
- package/dist/features/worksheet/worksheet/constants.js +12 -13
- package/dist/features/worksheet/worksheet/constants.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +29 -25
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +101 -47
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +244 -255
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +45 -36
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +321 -325
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +281 -61
- package/dist/index.js +585 -537
- package/dist/index.js.map +1 -1
- package/dist/static/animated-avatar.1ad58b1d.json +1 -0
- package/dist/static/animated-avatar.69b07505.json +1 -0
- package/dist/static/animated-avatar.9c560b46.json +1 -0
- package/dist/static/calendar-purple.1a840b41.svg +1 -0
- package/dist/static/flying-disk.c7f6ed39.json +1 -0
- package/dist/static/graduation-cap.3be3340a.json +1 -0
- package/dist/static/handshake.287e7dfb.svg +1 -0
- package/dist/static/light-bulb.c6db0b23.json +1 -0
- package/dist/static/money.332aacf1.svg +1 -0
- package/dist/static/muscle.9bcfb8a7.json +1 -0
- package/dist/static/nudge-tap.0591aef4.json +1 -0
- package/dist/static/parent-avatar.822c7b9b.svg +1 -0
- package/dist/static/pencil.23df9da0.json +1 -0
- package/dist/static/plus-sign.de6af957.json +1 -0
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +1 -0
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
- package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +1 -0
- package/dist/static/puzzle-pattern-blue.abff0164.svg +1 -0
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +1 -0
- package/dist/static/puzzle-pattern-purple.14b09759.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +1 -0
- package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
- package/dist/static/racing-car.2cbf864e.json +1 -0
- package/dist/static/rocket.0a3ccab0.json +1 -0
- package/dist/static/shovel.abeec04c.json +1 -0
- package/dist/static/trustpilot.bd3d79e1.svg +1 -0
- package/package.json +1 -1
- package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
- package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -1
- package/dist/features/stickers/sticker-data.js +0 -234
- package/dist/features/stickers/sticker-data.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker-selector.js +0 -25
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +0 -1
- package/dist/features/stickers/sticker-selector/sticker.js +0 -57
- package/dist/features/stickers/sticker-selector/sticker.js.map +0 -1
- package/dist/features/stickers/stickers-effects/effects.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js +0 -93
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +0 -39
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +0 -1
- package/dist/static/nudge-tap.5cb30093.json +0 -1057
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +0 -1
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3da09665.svg +0 -1
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"icon-button.js","sources":["../../../../../src/features/ui/buttons/icon-button/icon-button.tsx"],"sourcesContent":["import type { IIconButtonProps } from './icon-button-types';\n\nimport { memo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport useClickHandler from '../../hooks/use-click-handler';\nimport { Loader } from '../button/button-styled';\nimport * as Styled from './icon-button-styled';\n\nconst IconButton: FC<IIconButtonProps> = memo(props => {\n const {\n Icon,\n size,\n onClick,\n renderAs,\n disabled,\n analyticsLabel,\n analyticsProps,\n customBgColor,\n busy,\n } = props;\n const { handleClick } = useClickHandler({ analyticsLabel, analyticsProps }, onClick);\n\n return (\n <Styled.IconButtonWrapper\n disabled={disabled}\n $size={size}\n $buttonRenderAs={renderAs}\n onClick={handleClick}\n $customBgColor={customBgColor}\n >\n {busy ? (\n <Loader src={ILLUSTRATIONS.LOADER} alt=\"Loader\" $size={
|
1
|
+
{"version":3,"file":"icon-button.js","sources":["../../../../../src/features/ui/buttons/icon-button/icon-button.tsx"],"sourcesContent":["import type { IIconButtonProps } from './icon-button-types';\n\nimport { memo, useMemo, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport useClickHandler from '../../hooks/use-click-handler';\nimport { EDeviceType } from '../../theme/constants';\nimport { Loader } from '../button/button-styled';\nimport * as Styled from './icon-button-styled';\n\nconst IconButton: FC<IIconButtonProps> = memo(props => {\n const {\n Icon,\n size,\n sizeOnMobile,\n sizeOnTablet,\n onClick,\n renderAs,\n disabled,\n analyticsLabel,\n analyticsProps,\n customBgColor,\n busy,\n } = props;\n const { handleClick } = useClickHandler({ analyticsLabel, analyticsProps }, onClick);\n const { device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n return (\n <Styled.IconButtonWrapper\n disabled={disabled}\n $size={size}\n $buttonRenderAs={renderAs}\n onClick={handleClick}\n $customBgColor={customBgColor}\n >\n {busy ? (\n <Loader src={ILLUSTRATIONS.LOADER} alt=\"Loader\" $size={renderSize || 'small'} />\n ) : (\n <Styled.IconWrapper $size={renderSize} $buttonRenderAs={renderAs}>\n <Icon />\n </Styled.IconWrapper>\n )}\n </Styled.IconButtonWrapper>\n );\n});\n\nexport default IconButton;\n"],"names":["IconButton","memo","props","Icon","size","sizeOnMobile","sizeOnTablet","onClick","renderAs","disabled","analyticsLabel","analyticsProps","customBgColor","busy","handleClick","useClickHandler","device","useTheme","renderSize","useMemo","EDeviceType","jsx","Styled.IconButtonWrapper","Loader","ILLUSTRATIONS","Styled.IconWrapper","IconButton$1"],"mappings":";;;;;;;;AAWA,MAAMA,IAAmCC,EAAK,CAASC,MAAA;AAC/C,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,MAAAC;AAAA,EACE,IAAAX,GACE,EAAE,aAAAY,MAAgBC,EAAgB,EAAE,gBAAAL,GAAgB,gBAAAC,EAAA,GAAkBJ,CAAO,GAC7E,EAAE,QAAAS,MAAWC,KACbC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBf,KAAgBC,KAAgBF,IAGrCY,KAAUI,EAAY,UACjBd,KAAgBF,GAIxB,CAACY,GAAQZ,GAAMC,GAAcC,CAAY,CAAC;AAG3C,SAAA,gBAAAe;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAAb;AAAA,MACA,OAAOL;AAAA,MACP,iBAAiBI;AAAA,MACjB,SAASM;AAAA,MACT,gBAAgBF;AAAA,MAEf,UAAAC,sBACEU,GAAO,EAAA,KAAKC,EAAc,QAAQ,KAAI,UAAS,OAAON,KAAc,SAAS,IAE7E,gBAAAG,EAAAI,GAAA,EAAmB,OAAOP,GAAY,iBAAiBV,GACtD,UAAC,gBAAAa,EAAAlB,GAAA,CAAA,CAAK,EACR,CAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDuB,IAAe1B;"}
|
@@ -1,30 +1,34 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import a from "
|
4
|
-
import {
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
2
|
+
import { useMemo as T } from "react";
|
3
|
+
import { useTheme as a } from "styled-components";
|
4
|
+
import { EDeviceType as c } from "../../theme/constants.js";
|
5
|
+
import $ from "../clickable/clickable.js";
|
6
|
+
import { Text as h } from "./text-button-styled.js";
|
5
7
|
const l = ({
|
6
|
-
label:
|
7
|
-
size:
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
label: e,
|
9
|
+
size: r = "regular",
|
10
|
+
sizeOnMobile: n,
|
11
|
+
sizeOnTablet: t,
|
12
|
+
disabled: f = !1,
|
13
|
+
onClick: i,
|
14
|
+
analyticsLabel: p,
|
15
|
+
analyticsProps: s,
|
16
|
+
color: x
|
13
17
|
}) => {
|
14
|
-
const { textButton:
|
15
|
-
return /* @__PURE__ */
|
16
|
-
|
18
|
+
const { textButton: d, device: o } = a(), m = T(() => o <= c.MOBILE ? n || t || r : o <= c.TABLET && t || r, [o, r, n, t]), { textVariant: B } = d.sizes[m];
|
19
|
+
return /* @__PURE__ */ u(
|
20
|
+
$,
|
17
21
|
{
|
18
|
-
label:
|
19
|
-
disabled:
|
20
|
-
onClick:
|
21
|
-
analyticsLabel:
|
22
|
-
analyticsProps:
|
23
|
-
children: /* @__PURE__ */
|
22
|
+
label: e,
|
23
|
+
disabled: f,
|
24
|
+
onClick: i,
|
25
|
+
analyticsLabel: p,
|
26
|
+
analyticsProps: s,
|
27
|
+
children: /* @__PURE__ */ u(h, { $color: x, $renderAs: B, $buttonSize: m, children: e })
|
24
28
|
}
|
25
29
|
);
|
26
|
-
},
|
30
|
+
}, j = l;
|
27
31
|
export {
|
28
|
-
|
32
|
+
j as default
|
29
33
|
};
|
30
34
|
//# sourceMappingURL=text-button.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"text-button.js","sources":["../../../../../src/features/ui/buttons/text-button/text-button.tsx"],"sourcesContent":["import type { ITextButtonProps } from './text-button-types';\n\nimport React from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Clickable from '../clickable/clickable';\nimport * as Styled from './text-button-styled';\n\nconst TextButton: React.FC<ITextButtonProps> = ({\n label,\n size = 'regular',\n disabled = false,\n onClick,\n analyticsLabel,\n analyticsProps,\n color,\n}) => {\n const { textButton } = useTheme();\n const { textVariant } = textButton.sizes[
|
1
|
+
{"version":3,"file":"text-button.js","sources":["../../../../../src/features/ui/buttons/text-button/text-button.tsx"],"sourcesContent":["import type { ITextButtonProps } from './text-button-types';\n\nimport React, { useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { EDeviceType } from '../../theme/constants';\nimport Clickable from '../clickable/clickable';\nimport * as Styled from './text-button-styled';\n\nconst TextButton: React.FC<ITextButtonProps> = ({\n label,\n size = 'regular',\n sizeOnMobile,\n sizeOnTablet,\n disabled = false,\n onClick,\n analyticsLabel,\n analyticsProps,\n color,\n}) => {\n const { textButton, device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n const { textVariant } = textButton.sizes[renderSize];\n\n return (\n <Clickable\n label={label}\n disabled={disabled}\n onClick={onClick}\n analyticsLabel={analyticsLabel}\n analyticsProps={analyticsProps}\n >\n <Styled.Text $color={color} $renderAs={textVariant} $buttonSize={renderSize}>\n {label}\n </Styled.Text>\n </Clickable>\n );\n};\n\nexport default TextButton;\n"],"names":["TextButton","label","size","sizeOnMobile","sizeOnTablet","disabled","onClick","analyticsLabel","analyticsProps","color","textButton","device","useTheme","renderSize","useMemo","EDeviceType","textVariant","jsx","Clickable","Styled.Text","TextButton$1"],"mappings":";;;;;;AASA,MAAMA,IAAyC,CAAC;AAAA,EAC9C,OAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAAC,GAAY,QAAAC,EAAO,IAAIC,EAAS,GAClCC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBZ,KAAgBC,KAAgBF,IAGrCS,KAAUI,EAAY,UACjBX,KAAgBF,GAIxB,CAACS,GAAQT,GAAMC,GAAcC,CAAY,CAAC,GAEvC,EAAE,aAAAY,EAAgB,IAAAN,EAAW,MAAMG,CAAU;AAGjD,SAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAjB;AAAA,MACA,UAAAI;AAAA,MACA,SAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,gBAAAC;AAAA,MAEA,UAAA,gBAAAS,EAACE,GAAA,EAAY,QAAQV,GAAO,WAAWO,GAAa,aAAaH,GAC9D,UACHZ,EAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEAmB,IAAepB;"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import e from "../layout/flex-view.js";
|
3
|
+
const a = o.div`
|
4
|
+
position: fixed;
|
5
|
+
top: 0;
|
6
|
+
bottom: 0;
|
7
|
+
left: ${({ $position: t }) => t === "left" ? 0 : "auto"};
|
8
|
+
right: ${({ $position: t }) => t === "right" ? 0 : "auto"};
|
9
|
+
width: 100%;
|
10
|
+
height: 100%;
|
11
|
+
z-index: ${({ $zIndex: t }) => t ?? 999};
|
12
|
+
pointer-events: ${({ $isOpen: t }) => t ? "auto" : "none"};
|
13
|
+
`, s = o(e)`
|
14
|
+
position: absolute;
|
15
|
+
top: 0;
|
16
|
+
bottom: 0;
|
17
|
+
${({ $position: t }) => t === "left" ? "left: 0;" : "right: 0;"}
|
18
|
+
width: ${({ $drawerWidth: t }) => typeof t == "number" ? `${t}px` : t};
|
19
|
+
transform: ${({ $isOpen: t, $position: i }) => t ? "translateX(0)" : i === "left" ? "translateX(-100%)" : "translateX(100%)"};
|
20
|
+
transition: transform 0.3s ease-in-out;
|
21
|
+
height: 100%;
|
22
|
+
`, p = o(e)`
|
23
|
+
position: absolute;
|
24
|
+
inset: 0;
|
25
|
+
backdrop-filter: blur(40px);
|
26
|
+
opacity: ${({ $isOpen: t }) => t ? 1 : 0};
|
27
|
+
transition: opacity 0.3s ease-in-out;
|
28
|
+
`;
|
29
|
+
export {
|
30
|
+
p as DrawerBackdrop,
|
31
|
+
a as DrawerContainer,
|
32
|
+
s as DrawerPanel
|
33
|
+
};
|
34
|
+
//# sourceMappingURL=drawer-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"drawer-styled.js","sources":["../../../../src/features/ui/drawer/drawer-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\ninterface DrawerContainerProps {\n $isOpen: boolean;\n $position: 'left' | 'right';\n $zIndex?: number;\n}\n\ninterface DrawerPanelProps extends DrawerContainerProps {\n $drawerWidth: number | string;\n}\n\nexport const DrawerContainer = styled.div<DrawerContainerProps>`\n position: fixed;\n top: 0;\n bottom: 0;\n left: ${({ $position }) => ($position === 'left' ? 0 : 'auto')};\n right: ${({ $position }) => ($position === 'right' ? 0 : 'auto')};\n width: 100%;\n height: 100%;\n z-index: ${({ $zIndex }) => $zIndex ?? 999};\n pointer-events: ${({ $isOpen }) => ($isOpen ? 'auto' : 'none')};\n`;\n\nexport const DrawerPanel = styled(FlexView)<DrawerPanelProps>`\n position: absolute;\n top: 0;\n bottom: 0;\n ${({ $position }) => ($position === 'left' ? 'left: 0;' : 'right: 0;')}\n width: ${({ $drawerWidth }) =>\n typeof $drawerWidth === 'number' ? `${$drawerWidth}px` : $drawerWidth};\n transform: ${({ $isOpen, $position }) =>\n $isOpen ? 'translateX(0)' : $position === 'left' ? 'translateX(-100%)' : 'translateX(100%)'};\n transition: transform 0.3s ease-in-out;\n height: 100%;\n`;\n\nexport const DrawerBackdrop = styled(FlexView)<{ $isOpen: boolean }>`\n position: absolute;\n inset: 0;\n backdrop-filter: blur(40px);\n opacity: ${({ $isOpen }) => ($isOpen ? 1 : 0)};\n transition: opacity 0.3s ease-in-out;\n`;\n"],"names":["DrawerContainer","styled","$position","$zIndex","$isOpen","DrawerPanel","FlexView","$drawerWidth","DrawerBackdrop"],"mappings":";;AAcO,MAAMA,IAAkBC,EAAO;AAAA;AAAA;AAAA;AAAA,UAI5B,CAAC,EAAE,WAAAC,QAAiBA,MAAc,SAAS,IAAI,MAAO;AAAA,WACrD,CAAC,EAAE,WAAAA,QAAiBA,MAAc,UAAU,IAAI,MAAO;AAAA;AAAA;AAAA,aAGrD,CAAC,EAAE,SAAAC,QAAcA,KAAW,GAAG;AAAA,oBACxB,CAAC,EAAE,SAAAC,EAAA,MAAeA,IAAU,SAAS,MAAO;AAAA,GAGnDC,IAAcJ,EAAOK,CAAQ;AAAA;AAAA;AAAA;AAAA,IAItC,CAAC,EAAE,WAAAJ,QAAiBA,MAAc,SAAS,aAAa,WAAY;AAAA,WAC7D,CAAC,EAAE,cAAAK,EACV,MAAA,OAAOA,KAAiB,WAAW,GAAGA,CAAY,OAAOA,CAAY;AAAA,eAC1D,CAAC,EAAE,SAAAH,GAAS,WAAAF,QACvBE,IAAU,kBAAkBF,MAAc,SAAS,sBAAsB,kBAAkB;AAAA;AAAA;AAAA,GAKlFM,IAAiBP,EAAOK,CAAQ;AAAA;AAAA;AAAA;AAAA,aAIhC,CAAC,EAAE,SAAAF,EAAA,MAAeA,IAAU,IAAI,CAAE;AAAA;AAAA;"}
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { jsxs as s, jsx as c } from "react/jsx-runtime";
|
2
|
+
import { memo as $, useRef as w, useEffect as k } from "react";
|
3
|
+
import { DrawerContainer as D, DrawerBackdrop as _, DrawerPanel as p } from "./drawer-styled.js";
|
4
|
+
const E = $(
|
5
|
+
({ isOpen: r, onClose: e, children: i, drawerWidth: o = 300, position: n = "left", zIndex: u, theme: m = "dark" }) => {
|
6
|
+
const t = w(null);
|
7
|
+
k(() => {
|
8
|
+
const d = (f) => {
|
9
|
+
t.current && !t.current.contains(f.target) && (e == null || e());
|
10
|
+
};
|
11
|
+
return r && document.addEventListener("mousedown", d), () => {
|
12
|
+
document.removeEventListener("mousedown", d);
|
13
|
+
};
|
14
|
+
}, [r, e]);
|
15
|
+
const a = m === "dark";
|
16
|
+
return /* @__PURE__ */ s(D, { $isOpen: r, $position: n, $zIndex: u, children: [
|
17
|
+
/* @__PURE__ */ c(
|
18
|
+
_,
|
19
|
+
{
|
20
|
+
$isOpen: r,
|
21
|
+
onClick: e,
|
22
|
+
$background: a ? "WHITE_T_10" : "BLACK_T_38"
|
23
|
+
}
|
24
|
+
),
|
25
|
+
/* @__PURE__ */ c(
|
26
|
+
p,
|
27
|
+
{
|
28
|
+
ref: t,
|
29
|
+
$isOpen: r,
|
30
|
+
$position: n,
|
31
|
+
$drawerWidth: o,
|
32
|
+
$background: a ? "BLACK_3" : "WHITE_3",
|
33
|
+
children: i
|
34
|
+
}
|
35
|
+
)
|
36
|
+
] });
|
37
|
+
}
|
38
|
+
), L = E;
|
39
|
+
export {
|
40
|
+
L as default
|
41
|
+
};
|
42
|
+
//# sourceMappingURL=drawer.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"drawer.js","sources":["../../../../src/features/ui/drawer/drawer.tsx"],"sourcesContent":["import type { IDrawerProps } from './drawer-types';\nimport type { FC } from 'react';\n\nimport { memo, useEffect, useRef } from 'react';\n\nimport * as Styled from './drawer-styled';\n\nconst Drawer: FC<IDrawerProps> = memo(\n ({ isOpen, onClose, children, drawerWidth = 300, position = 'left', zIndex, theme = 'dark' }) => {\n const drawerRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleClickOutside = (e: MouseEvent) => {\n if (drawerRef.current && !drawerRef.current.contains(e.target as Node)) {\n onClose?.();\n }\n };\n\n if (isOpen) {\n document.addEventListener('mousedown', handleClickOutside);\n }\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [isOpen, onClose]);\n\n const isDarkTheme = theme === 'dark';\n\n return (\n <Styled.DrawerContainer $isOpen={isOpen} $position={position} $zIndex={zIndex}>\n <Styled.DrawerBackdrop\n $isOpen={isOpen}\n onClick={onClose}\n $background={isDarkTheme ? 'WHITE_T_10' : 'BLACK_T_38'}\n />\n <Styled.DrawerPanel\n ref={drawerRef}\n $isOpen={isOpen}\n $position={position}\n $drawerWidth={drawerWidth}\n $background={isDarkTheme ? 'BLACK_3' : 'WHITE_3'}\n >\n {children}\n </Styled.DrawerPanel>\n </Styled.DrawerContainer>\n );\n },\n);\n\nexport default Drawer;\n"],"names":["Drawer","memo","isOpen","onClose","children","drawerWidth","position","zIndex","theme","drawerRef","useRef","useEffect","handleClickOutside","e","isDarkTheme","jsxs","Styled.DrawerContainer","jsx","Styled.DrawerBackdrop","Styled.DrawerPanel","Drawer$1"],"mappings":";;;AAOA,MAAMA,IAA2BC;AAAA,EAC/B,CAAC,EAAE,QAAAC,GAAQ,SAAAC,GAAS,UAAAC,GAAU,aAAAC,IAAc,KAAK,UAAAC,IAAW,QAAQ,QAAAC,GAAQ,OAAAC,IAAQ,OAAA,MAAa;AACzF,UAAAC,IAAYC,EAAuB,IAAI;AAE7C,IAAAC,EAAU,MAAM;AACR,YAAAC,IAAqB,CAACC,MAAkB;AACxC,QAAAJ,EAAU,WAAW,CAACA,EAAU,QAAQ,SAASI,EAAE,MAAc,MACzDV,KAAA,QAAAA;AAAA,MACZ;AAGF,aAAID,KACO,SAAA,iBAAiB,aAAaU,CAAkB,GAGpD,MAAM;AACF,iBAAA,oBAAoB,aAAaA,CAAkB;AAAA,MAAA;AAAA,IAC9D,GACC,CAACV,GAAQC,CAAO,CAAC;AAEpB,UAAMW,IAAcN,MAAU;AAG5B,WAAA,gBAAAO,EAACC,GAAA,EAAuB,SAASd,GAAQ,WAAWI,GAAU,SAASC,GACrE,UAAA;AAAA,MAAA,gBAAAU;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,SAAShB;AAAA,UACT,SAASC;AAAA,UACT,aAAaW,IAAc,eAAe;AAAA,QAAA;AAAA,MAC5C;AAAA,MACA,gBAAAG;AAAA,QAACE;AAAAA,QAAA;AAAA,UACC,KAAKV;AAAA,UACL,SAASP;AAAA,UACT,WAAWI;AAAA,UACX,cAAcD;AAAA,UACd,aAAaS,IAAc,YAAY;AAAA,UAEtC,UAAAV;AAAA,QAAA;AAAA,MACH;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAgB,IAAepB;"}
|
@@ -1,47 +1,85 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { useCallback as
|
3
|
-
import { ILLUSTRATIONS as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
const
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { jsxs as n, jsx as i, Fragment as X } from "react/jsx-runtime";
|
2
|
+
import { useCallback as $ } from "react";
|
3
|
+
import { ILLUSTRATIONS as p } from "../../../assets/illustrations/illustrations.js";
|
4
|
+
import f from "../buttons/button/button.js";
|
5
|
+
import u from "../image/image.js";
|
6
|
+
import a from "../layout/flex-view.js";
|
7
|
+
import m from "../text/text.js";
|
8
|
+
const e = {
|
9
|
+
compact: {
|
10
|
+
widthX: 10,
|
11
|
+
heightX: 5,
|
12
|
+
borderRadiusX: 1,
|
13
|
+
marginBottomX: 1,
|
14
|
+
title: "h6",
|
15
|
+
description: "body3",
|
16
|
+
imageWidth: 54,
|
17
|
+
imageHeight: 44
|
18
|
+
},
|
19
|
+
full: {
|
20
|
+
widthX: 22.5,
|
21
|
+
heightX: 11.5,
|
22
|
+
borderRadiusX: 1,
|
23
|
+
marginBottomX: 1.5,
|
24
|
+
title: "h4",
|
25
|
+
description: "body2",
|
26
|
+
imageWidth: 122,
|
27
|
+
imageHeight: 100
|
28
|
+
}
|
29
|
+
}, w = (l) => {
|
30
|
+
const { height: d, onTryAgain: r, theme: h = "light", title: s, description: g, size: t = "full" } = l, c = $(() => {
|
31
|
+
r ? r() : window.location.reload();
|
32
|
+
}, [r]), o = h === "dark" ? "WHITE_T_87" : "BLACK_T_87";
|
33
|
+
return /* @__PURE__ */ n(a, { $alignItems: "center", $justifyContent: "center", $height: d, children: [
|
34
|
+
/* @__PURE__ */ i(
|
35
|
+
a,
|
15
36
|
{
|
16
|
-
$widthX:
|
17
|
-
$heightX:
|
18
|
-
$borderRadiusX:
|
19
|
-
$marginBottomX:
|
37
|
+
$widthX: e[t].widthX,
|
38
|
+
$heightX: e[t].heightX,
|
39
|
+
$borderRadiusX: e[t].borderRadiusX,
|
40
|
+
$marginBottomX: e[t].marginBottomX,
|
20
41
|
$background: "GREY_1",
|
21
42
|
$justifyContent: "center",
|
22
43
|
$alignItems: "center",
|
23
|
-
children: /* @__PURE__ */
|
44
|
+
children: /* @__PURE__ */ i(
|
45
|
+
u,
|
46
|
+
{
|
47
|
+
width: e[t].imageWidth,
|
48
|
+
height: e[t].imageHeight,
|
49
|
+
src: p.ROCKET_BROKEN,
|
50
|
+
withLoader: !1
|
51
|
+
}
|
52
|
+
)
|
24
53
|
}
|
25
54
|
),
|
26
|
-
/* @__PURE__ */
|
27
|
-
|
55
|
+
/* @__PURE__ */ i(
|
56
|
+
m,
|
57
|
+
{
|
58
|
+
$renderAs: e[t].title,
|
59
|
+
$marginBottomX: 0.5,
|
60
|
+
$color: o,
|
61
|
+
$align: "center",
|
62
|
+
children: s ?? "Oops! Looks like something went wrong"
|
63
|
+
}
|
64
|
+
),
|
65
|
+
/* @__PURE__ */ i(m, { $renderAs: "body2", $align: "center", $marginBottomX: 1.5, $color: o, children: g ?? /* @__PURE__ */ n(X, { children: [
|
28
66
|
"Please try again. Alternatively if that does not work,",
|
29
|
-
/* @__PURE__ */
|
67
|
+
/* @__PURE__ */ i("br", {}),
|
30
68
|
" please contact support."
|
31
69
|
] }) }),
|
32
|
-
/* @__PURE__ */
|
33
|
-
|
70
|
+
/* @__PURE__ */ i(
|
71
|
+
f,
|
34
72
|
{
|
35
73
|
label: "Try again",
|
36
|
-
onClick:
|
74
|
+
onClick: c,
|
37
75
|
renderAs: "primary",
|
38
76
|
size: "small",
|
39
77
|
widthX: 14
|
40
78
|
}
|
41
79
|
)
|
42
80
|
] });
|
43
|
-
},
|
81
|
+
}, k = w;
|
44
82
|
export {
|
45
|
-
|
83
|
+
k as default
|
46
84
|
};
|
47
85
|
//# sourceMappingURL=error.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error.js","sources":["../../../../src/features/ui/error/error.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Button from '../buttons/button/button';\nimport Image from '../image/image';\nimport FlexView from '../layout/flex-view';\nimport Text from '../text/text';\n\ninterface IErrorProps {\n onTryAgain?: () => void;\n height?: string | number;\n theme?: 'light' | 'dark';\n title?: string;\n description?: string;\n}\n\nconst Error: React.FC<IErrorProps> = props => {\n const { height, onTryAgain, theme = 'light', title, description } = props;\n const handleTryAgain = useCallback(() => {\n if (onTryAgain) {\n onTryAgain();\n } else {\n window.location.reload();\n }\n }, [onTryAgain]);\n\n const textColor = theme === 'dark' ? 'WHITE_T_87' : 'BLACK_T_87';\n\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height={height}>\n <FlexView\n $widthX={
|
1
|
+
{"version":3,"file":"error.js","sources":["../../../../src/features/ui/error/error.tsx"],"sourcesContent":["import type { TTextVariants } from '../types';\n\nimport React, { useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Button from '../buttons/button/button';\nimport Image from '../image/image';\nimport FlexView from '../layout/flex-view';\nimport Text from '../text/text';\n\ninterface IErrorProps {\n onTryAgain?: () => void;\n height?: string | number;\n theme?: 'light' | 'dark';\n title?: string;\n description?: string;\n size?: 'compact' | 'full';\n}\n\ninterface IErrorConfig {\n widthX: number;\n heightX: number;\n borderRadiusX: number;\n marginBottomX: number;\n title: TTextVariants;\n description: TTextVariants;\n imageWidth: number;\n imageHeight: number;\n}\n\nconst ERROR_CONFIG: Record<'compact' | 'full', IErrorConfig> = {\n compact: {\n widthX: 10,\n heightX: 5,\n borderRadiusX: 1,\n marginBottomX: 1,\n title: 'h6',\n description: 'body3',\n imageWidth: 54,\n imageHeight: 44,\n },\n full: {\n widthX: 22.5,\n heightX: 11.5,\n borderRadiusX: 1,\n marginBottomX: 1.5,\n title: 'h4',\n description: 'body2',\n imageWidth: 122,\n imageHeight: 100,\n },\n};\n\nconst Error: React.FC<IErrorProps> = props => {\n const { height, onTryAgain, theme = 'light', title, description, size = 'full' } = props;\n\n const handleTryAgain = useCallback(() => {\n if (onTryAgain) {\n onTryAgain();\n } else {\n window.location.reload();\n }\n }, [onTryAgain]);\n\n const textColor = theme === 'dark' ? 'WHITE_T_87' : 'BLACK_T_87';\n\n return (\n <FlexView $alignItems=\"center\" $justifyContent=\"center\" $height={height}>\n <FlexView\n $widthX={ERROR_CONFIG[size].widthX}\n $heightX={ERROR_CONFIG[size].heightX}\n $borderRadiusX={ERROR_CONFIG[size].borderRadiusX}\n $marginBottomX={ERROR_CONFIG[size].marginBottomX}\n $background=\"GREY_1\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Image\n width={ERROR_CONFIG[size].imageWidth}\n height={ERROR_CONFIG[size].imageHeight}\n src={ILLUSTRATIONS.ROCKET_BROKEN}\n withLoader={false}\n />\n </FlexView>\n <Text\n $renderAs={ERROR_CONFIG[size].title}\n $marginBottomX={0.5}\n $color={textColor}\n $align=\"center\"\n >\n {title ?? 'Oops! Looks like something went wrong'}\n </Text>\n <Text $renderAs=\"body2\" $align=\"center\" $marginBottomX={1.5} $color={textColor}>\n {description ?? (\n <>\n Please try again. Alternatively if that does not work,\n <br /> please contact support.\n </>\n )}\n </Text>\n <Button\n label=\"Try again\"\n onClick={handleTryAgain}\n renderAs=\"primary\"\n size=\"small\"\n widthX={14}\n />\n </FlexView>\n );\n};\n\nexport default Error;\n"],"names":["ERROR_CONFIG","Error","props","height","onTryAgain","theme","title","description","size","handleTryAgain","useCallback","textColor","FlexView","jsx","Image","ILLUSTRATIONS","Text","jsxs","Fragment","Button","Error$1"],"mappings":";;;;;;;AA8BA,MAAMA,IAAyD;AAAA,EAC7D,SAAS;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,eAAe;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,MAAM;AAAA,IACJ,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,eAAe;AAAA,IACf,eAAe;AAAA,IACf,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,aAAa;AAAA,EACf;AACF,GAEMC,IAA+B,CAASC,MAAA;AACtC,QAAA,EAAE,QAAAC,GAAQ,YAAAC,GAAY,OAAAC,IAAQ,SAAS,OAAAC,GAAO,aAAAC,GAAa,MAAAC,IAAO,OAAW,IAAAN,GAE7EO,IAAiBC,EAAY,MAAM;AACvC,IAAIN,IACSA,MAEX,OAAO,SAAS;EAClB,GACC,CAACA,CAAU,CAAC,GAETO,IAAYN,MAAU,SAAS,eAAe;AAEpD,2BACGO,GAAS,EAAA,aAAY,UAAS,iBAAgB,UAAS,SAAST,GAC/D,UAAA;AAAA,IAAA,gBAAAU;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,SAASZ,EAAaQ,CAAI,EAAE;AAAA,QAC5B,UAAUR,EAAaQ,CAAI,EAAE;AAAA,QAC7B,gBAAgBR,EAAaQ,CAAI,EAAE;AAAA,QACnC,gBAAgBR,EAAaQ,CAAI,EAAE;AAAA,QACnC,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,aAAY;AAAA,QAEZ,UAAA,gBAAAK;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAOd,EAAaQ,CAAI,EAAE;AAAA,YAC1B,QAAQR,EAAaQ,CAAI,EAAE;AAAA,YAC3B,KAAKO,EAAc;AAAA,YACnB,YAAY;AAAA,UAAA;AAAA,QACd;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,WAAWhB,EAAaQ,CAAI,EAAE;AAAA,QAC9B,gBAAgB;AAAA,QAChB,QAAQG;AAAA,QACR,QAAO;AAAA,QAEN,UAASL,KAAA;AAAA,MAAA;AAAA,IACZ;AAAA,IACA,gBAAAO,EAACG,GAAK,EAAA,WAAU,SAAQ,QAAO,UAAS,gBAAgB,KAAK,QAAQL,GAClE,UAAAJ,KACG,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,MAAA;AAAA,wBAEC,MAAG,EAAA;AAAA,MAAE;AAAA,IAAA,EAAA,CACR,EAEJ,CAAA;AAAA,IACA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,SAASV;AAAA,QACT,UAAS;AAAA,QACT,MAAK;AAAA,QACL,QAAQ;AAAA,MAAA;AAAA,IACV;AAAA,EACF,EAAA,CAAA;AAEJ,GAEAW,IAAenB;"}
|
@@ -1,40 +1,46 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
2
|
+
import { useMemo as h } from "react";
|
3
|
+
import { useTheme as s } from "styled-components";
|
4
|
+
import { EDeviceType as f } from "../theme/constants.js";
|
5
|
+
import { GradeSelectorWrapper as x } from "./grade-selector-styled.js";
|
6
|
+
import E from "./grade-tab.js";
|
7
|
+
function I({
|
8
|
+
selectedValue: i,
|
9
|
+
onSelect: n,
|
10
|
+
tabsWidth: p,
|
11
|
+
width: u,
|
12
|
+
grades: l,
|
13
|
+
renderAs: d,
|
14
|
+
size: e,
|
15
|
+
sizeOnMobile: m,
|
16
|
+
sizeOnTablet: t,
|
17
|
+
layoutAlignment: a
|
13
18
|
}) {
|
14
|
-
|
15
|
-
|
19
|
+
const { device: o } = s(), G = h(() => o <= f.MOBILE ? m || t || e : o <= f.TABLET && t || e, [o, e, m, t]);
|
20
|
+
return /* @__PURE__ */ c(
|
21
|
+
x,
|
16
22
|
{
|
17
|
-
width:
|
18
|
-
layoutAlignment:
|
23
|
+
width: u,
|
24
|
+
layoutAlignment: a,
|
19
25
|
$alignItems: "center",
|
20
26
|
$flexDirection: "row",
|
21
|
-
children:
|
22
|
-
|
27
|
+
children: l.map((r) => /* @__PURE__ */ c(
|
28
|
+
E,
|
23
29
|
{
|
24
|
-
label:
|
25
|
-
selected:
|
26
|
-
width:
|
27
|
-
onSelect:
|
28
|
-
renderAs:
|
29
|
-
size:
|
30
|
-
grade:
|
30
|
+
label: r === "0" ? "KG" : r,
|
31
|
+
selected: i === r,
|
32
|
+
width: p,
|
33
|
+
onSelect: n,
|
34
|
+
renderAs: d,
|
35
|
+
size: G,
|
36
|
+
grade: r
|
31
37
|
},
|
32
|
-
|
38
|
+
r
|
33
39
|
))
|
34
40
|
}
|
35
41
|
);
|
36
42
|
}
|
37
43
|
export {
|
38
|
-
|
44
|
+
I as default
|
39
45
|
};
|
40
46
|
//# sourceMappingURL=grade-selector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"grade-selector.js","sources":["../../../../src/features/ui/grade-selector/grade-selector.tsx"],"sourcesContent":["import type { IGradeSelectorProps } from './grade-selector-types';\nimport type
|
1
|
+
{"version":3,"file":"grade-selector.js","sources":["../../../../src/features/ui/grade-selector/grade-selector.tsx"],"sourcesContent":["import type { IGradeSelectorProps } from './grade-selector-types';\n\nimport { useMemo, type ReactElement } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { EDeviceType } from '../theme/constants';\nimport * as Styled from './grade-selector-styled';\nimport GradeTab from './grade-tab';\n\nfunction GradeSelector({\n selectedValue,\n onSelect,\n tabsWidth,\n width,\n grades,\n renderAs,\n size,\n sizeOnMobile,\n sizeOnTablet,\n layoutAlignment,\n}: IGradeSelectorProps): ReactElement {\n const { device } = useTheme();\n const renderSize = useMemo(() => {\n if (device <= EDeviceType.MOBILE) {\n return sizeOnMobile || sizeOnTablet || size;\n }\n\n if (device <= EDeviceType.TABLET) {\n return sizeOnTablet || size;\n }\n\n return size;\n }, [device, size, sizeOnMobile, sizeOnTablet]);\n\n return (\n <Styled.GradeSelectorWrapper\n width={width}\n layoutAlignment={layoutAlignment}\n $alignItems=\"center\"\n $flexDirection=\"row\"\n >\n {grades.map(grade => {\n return (\n <GradeTab\n key={grade}\n label={grade === '0' ? 'KG' : grade}\n selected={selectedValue === grade}\n width={tabsWidth}\n onSelect={onSelect}\n renderAs={renderAs}\n size={renderSize}\n grade={grade}\n />\n );\n })}\n </Styled.GradeSelectorWrapper>\n );\n}\n\nexport default GradeSelector;\n"],"names":["GradeSelector","selectedValue","onSelect","tabsWidth","width","grades","renderAs","size","sizeOnMobile","sizeOnTablet","layoutAlignment","device","useTheme","renderSize","useMemo","EDeviceType","jsx","Styled.GradeSelectorWrapper","grade","GradeTab"],"mappings":";;;;;;AASA,SAASA,EAAc;AAAA,EACrB,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AACF,GAAsC;AAC9B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAaC,EAAQ,MACrBH,KAAUI,EAAY,SACjBP,KAAgBC,KAAgBF,IAGrCI,KAAUI,EAAY,UACjBN,KAAgBF,GAIxB,CAACI,GAAQJ,GAAMC,GAAcC,CAAY,CAAC;AAG3C,SAAA,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAAb;AAAA,MACA,iBAAAM;AAAA,MACA,aAAY;AAAA,MACZ,gBAAe;AAAA,MAEd,UAAAL,EAAO,IAAI,CAASa,MAEjB,gBAAAF;AAAA,QAACG;AAAA,QAAA;AAAA,UAEC,OAAOD,MAAU,MAAM,OAAOA;AAAA,UAC9B,UAAUjB,MAAkBiB;AAAA,UAC5B,OAAOf;AAAA,UACP,UAAAD;AAAA,UACA,UAAAI;AAAA,UACA,MAAMO;AAAA,UACN,OAAAK;AAAA,QAAA;AAAA,QAPKA;AAAA,MAAA,CAUV;AAAA,IAAA;AAAA,EAAA;AAGP;"}
|
@@ -14,7 +14,7 @@ const p = t(i)`
|
|
14
14
|
overflow: hidden;
|
15
15
|
position: relative;
|
16
16
|
`, u = g(
|
17
|
-
({ borderRadius: n = 0, borderColor: r, withLoader: a, ...o }) => {
|
17
|
+
({ borderRadius: n = 0, borderColor: r, withLoader: a = !1, ...o }) => {
|
18
18
|
const { width: s, height: d } = o, [m, l] = f(!0);
|
19
19
|
return /* @__PURE__ */ h(
|
20
20
|
L,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,
|
1
|
+
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader = false, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,IAAa,IAAO,GAAGC,QAAY;AAC7D,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF,GAEAQ,IAAeb;"}
|
@@ -1,32 +1,32 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import { memo as
|
4
|
-
import
|
5
|
-
import { fetchLottie as
|
6
|
-
const
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
2
|
+
import g from "lottie-web";
|
3
|
+
import { memo as w, forwardRef as A, useRef as u, useImperativeHandle as b, useEffect as I } from "react";
|
4
|
+
import $ from "../layout/flex-view.js";
|
5
|
+
import { fetchLottie as x } from "./helper.js";
|
6
|
+
const O = A((v, L) => {
|
7
7
|
const {
|
8
8
|
src: m,
|
9
9
|
width: h = "100%",
|
10
|
-
height:
|
10
|
+
height: y = "100%",
|
11
11
|
settings: l,
|
12
|
-
eventListener:
|
13
|
-
onRender:
|
12
|
+
eventListener: n,
|
13
|
+
onRender: o,
|
14
14
|
animateOnIntersect: c
|
15
15
|
} = v, a = u(null), r = u(null), s = u(null);
|
16
16
|
return b(
|
17
17
|
L,
|
18
18
|
() => ({
|
19
|
-
playSegments: (t,
|
19
|
+
playSegments: (t, i) => {
|
20
20
|
var e;
|
21
|
-
return (e = r.current) == null ? void 0 : e.playSegments(t,
|
21
|
+
return (e = r.current) == null ? void 0 : e.playSegments(t, i);
|
22
22
|
},
|
23
|
-
addEventListener: (t,
|
23
|
+
addEventListener: (t, i) => {
|
24
24
|
var e;
|
25
|
-
return (e = r.current) == null ? void 0 : e.addEventListener(t,
|
25
|
+
return (e = r.current) == null ? void 0 : e.addEventListener(t, i);
|
26
26
|
},
|
27
|
-
removeEventListener: (t,
|
27
|
+
removeEventListener: (t, i) => {
|
28
28
|
var e;
|
29
|
-
return (e = r.current) == null ? void 0 : e.removeEventListener(t,
|
29
|
+
return (e = r.current) == null ? void 0 : e.removeEventListener(t, i);
|
30
30
|
},
|
31
31
|
play: () => {
|
32
32
|
var t;
|
@@ -35,10 +35,6 @@ const x = w((v, L) => {
|
|
35
35
|
stop: () => {
|
36
36
|
var t;
|
37
37
|
return (t = r.current) == null ? void 0 : t.stop();
|
38
|
-
},
|
39
|
-
goToAndStop: (t, n) => {
|
40
|
-
var e;
|
41
|
-
return (e = r.current) == null ? void 0 : e.goToAndStop(t, n);
|
42
38
|
}
|
43
39
|
}),
|
44
40
|
[]
|
@@ -46,32 +42,32 @@ const x = w((v, L) => {
|
|
46
42
|
let t = !1;
|
47
43
|
return (async () => {
|
48
44
|
try {
|
49
|
-
const e = await
|
45
|
+
const e = await x(m);
|
50
46
|
requestAnimationFrame(() => {
|
51
|
-
!a.current || t || (r.current =
|
47
|
+
!a.current || t || (r.current = g.loadAnimation({
|
52
48
|
container: a.current,
|
53
49
|
animationData: e,
|
54
50
|
loop: !0,
|
55
51
|
autoplay: !0,
|
56
52
|
...l
|
57
53
|
}), c && (s.current = new IntersectionObserver(
|
58
|
-
([
|
59
|
-
var
|
60
|
-
|
54
|
+
([f]) => {
|
55
|
+
var d, p;
|
56
|
+
f && f.isIntersecting ? (d = r.current) == null || d.play() : (p = r.current) == null || p.pause();
|
61
57
|
},
|
62
58
|
{ threshold: 0 }
|
63
|
-
), s.current.observe(a.current)),
|
59
|
+
), s.current.observe(a.current)), o == null || o(), n && r.current.addEventListener(n.name, n.callback));
|
64
60
|
});
|
65
61
|
} catch (e) {
|
66
62
|
throw Error(`Error loading Lottie animation: ${e}`);
|
67
63
|
}
|
68
64
|
})(), () => {
|
69
65
|
var e;
|
70
|
-
t = !0, r.current && (
|
66
|
+
t = !0, r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((e = s.current) == null || e.disconnect()), r.current.destroy());
|
71
67
|
};
|
72
|
-
}, [m,
|
73
|
-
}),
|
68
|
+
}, [m, n, o, c, l]), /* @__PURE__ */ E($, { ref: a, $width: h, $height: y });
|
69
|
+
}), D = w(O);
|
74
70
|
export {
|
75
|
-
|
71
|
+
D as default
|
76
72
|
};
|
77
73
|
//# sourceMappingURL=lottie-animation.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n play: () => animationInstance.current?.play(),\n stop: () => animationInstance.current?.stop(),\n
|
1
|
+
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n play: () => animationInstance.current?.play(),\n stop: () => animationInstance.current?.stop(),\n }),\n [],\n );\n\n useEffect(() => {\n let destroyed = false;\n\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n // Wait for layout\n // NOTE: Do not remove this as this is needed to fix canvas rendering on first layout.\n requestAnimationFrame(() => {\n if (!container.current || destroyed) return;\n\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n intersectionObserver.current.observe(container.current);\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n });\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n destroyed = true;\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","useEffect","destroyed","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MACzC;;AAAA,gBAAAC,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,aAAaF,GAAUC;AAAA;AAAA,MACpD,kBAAkB,CAACE,GAAmBC,MACpC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,iBAAiBC,GAAiCC;AAAA;AAAA,MAC/E,qBAAqB,CAACD,GAAmBC,MACvC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,oBAAoBC,GAAiCC;AAAA;AAAA,MAClF,MAAM,MAAM;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B;AAAA;AAAA,MACvC,MAAM,MAAM;;AAAA,gBAAAA,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B;AAAA;AAAA,IAAK;AAAA,IAE9C,CAAC;AAAA,EAAA,GAGHG,EAAU,MAAM;AACd,QAAIC,IAAY;AA4CF,YA1CQ,YAAY;AAC5B,UAAA;AACI,cAAAC,IAAgB,MAAMC,EAAYpB,CAAG;AAI3C,8BAAsB,MAAM;AACtB,UAAA,CAACO,EAAU,WAAWW,MAERT,EAAA,UAAUY,EAAO,cAAc;AAAA,YAC/C,WAAWd,EAAU;AAAA,YACrB,eAAAY;AAAA,YACA,MAAM;AAAA,YACN,UAAU;AAAA,YACV,GAAGhB;AAAA,UAAA,CACJ,GAEGG,MACFI,EAAqB,UAAU,IAAI;AAAA,YACjC,CAAC,CAACY,CAAK,MAAM;;AACP,cAAAA,KAASA,EAAM,kBACjBR,IAAAL,EAAkB,YAAlB,QAAAK,EAA2B,UAE3BS,IAAAd,EAAkB,YAAlB,QAAAc,EAA2B;AAAA,YAE/B;AAAA,YACA,EAAE,WAAW,EAAE;AAAA,UAAA,GAGIb,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAG7CF,KAAA,QAAAA,KACPD,KACFK,EAAkB,QAAQ,iBAAiBL,EAAc,MAAMA,EAAc,QAAQ;AAAA,QACvF,CACD;AAAA,eACMoB,GAAO;AACR,cAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,MACxD;AAAA,IAAA,MAKK,MAAM;;AACC,MAAAN,IAAA,IACRT,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;IAC5B;AAAA,EACF,GACC,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDsB,GAAS,EAAA,KAAKlB,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcwB,IAAAC,EAAK/B,CAAe;"}
|