@cuemath/leap 3.2.18-mb → 3.2.18
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 +5 -0
- 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 +11 -1
- package/dist/assets/lottie/lottie.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 +7 -7
- 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/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/journey/comps/coachmark/coachmark.js +29 -27
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- 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/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/app/puzzle-app-styled.js +81 -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/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/worksheet-question/learnosity-question.js +24 -24
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +246 -260
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -28
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +166 -164
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/index.d.ts +194 -57
- package/dist/index.js +579 -541
- 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/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
@@ -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;"}
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import
|
2
|
-
const s =
|
3
|
-
({ theme: { colors:
|
1
|
+
import a from "styled-components";
|
2
|
+
const s = a.div(
|
3
|
+
({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
|
4
4
|
position: fixed;
|
5
5
|
top: 0;
|
6
6
|
left: 0;
|
7
7
|
right: 0;
|
8
8
|
bottom: 0;
|
9
|
-
background-color: ${
|
9
|
+
background-color: ${t.BLACK_T_60};
|
10
10
|
backdrop-filter: blur(40px);
|
11
11
|
display: flex;
|
12
|
-
animation: ${
|
13
|
-
z-index: ${
|
12
|
+
animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
13
|
+
z-index: ${o.MODAL};
|
14
14
|
|
15
15
|
@keyframes backdropFadeIn {
|
16
16
|
from {
|
@@ -30,20 +30,20 @@ const s = e.div(
|
|
30
30
|
}
|
31
31
|
}
|
32
32
|
`
|
33
|
-
),
|
34
|
-
({ theme: { colors:
|
33
|
+
), l = a.div(
|
34
|
+
({ theme: { colors: t }, $isClosing: o, $width: e }) => `
|
35
35
|
position: relative;
|
36
36
|
align-self: center;
|
37
37
|
margin: 0 auto;
|
38
|
-
width: ${
|
39
|
-
background-color: ${
|
40
|
-
border: 1px solid ${
|
38
|
+
width: ${e};
|
39
|
+
background-color: ${t.WHITE_1};
|
40
|
+
border: 1px solid ${t.BLACK_1};
|
41
41
|
transform-origin: center center;
|
42
|
-
animation: ${
|
42
|
+
animation: ${o ? "modalDisappear" : "modalAppear"} 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
|
43
43
|
box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);
|
44
44
|
|
45
45
|
/* Responsive behavior for smaller screens */
|
46
|
-
@media (max-width: calc(${
|
46
|
+
@media (max-width: calc(${e} + 80px)) {
|
47
47
|
width: 100%;
|
48
48
|
max-width: 100%;
|
49
49
|
height: 100%;
|
@@ -73,35 +73,41 @@ const s = e.div(
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
`
|
76
|
-
),
|
77
|
-
({ $modalWidth:
|
76
|
+
), c = a.div(
|
77
|
+
({ $modalWidth: t }) => `
|
78
78
|
max-height: calc(100vh - 142px);
|
79
79
|
overflow-y: auto;
|
80
80
|
|
81
|
-
@media (max-width: calc(${
|
81
|
+
@media (max-width: calc(${t} + 80px)) {
|
82
82
|
max-height: 100vh;
|
83
83
|
}
|
84
84
|
}`
|
85
|
-
), d =
|
86
|
-
({ theme: { colors:
|
85
|
+
), d = a.div(
|
86
|
+
({ theme: { colors: t }, $modalWidth: o }) => `
|
87
87
|
position: absolute;
|
88
88
|
top: -56px;
|
89
89
|
right: -40px;
|
90
|
-
color: ${
|
90
|
+
color: ${t.WHITE_1};
|
91
91
|
transition: all 0.2s ease;
|
92
92
|
|
93
93
|
&:hover {
|
94
94
|
transform: scale(1.05);
|
95
95
|
}
|
96
96
|
|
97
|
-
@media (max-width: calc(${
|
97
|
+
@media (max-width: calc(${o} + 80px)) {
|
98
98
|
top: 16px;
|
99
99
|
right: 16px;
|
100
|
-
color: ${
|
100
|
+
color: ${t.BLACK_1};
|
101
101
|
}
|
102
102
|
`
|
103
|
-
),
|
104
|
-
|
103
|
+
), m = a.div`
|
104
|
+
display: flex;
|
105
|
+
align-items: center;
|
106
|
+
justify-content: center;
|
107
|
+
height: 100vh;
|
108
|
+
width: 100%;
|
109
|
+
`, i = 720, r = 800, n = 500, h = a.div(
|
110
|
+
({ $isClosing: t }) => `
|
105
111
|
position: absolute;
|
106
112
|
width: ${i}px;
|
107
113
|
height: 100%;
|
@@ -118,7 +124,7 @@ const s = e.div(
|
|
118
124
|
animation-timing-function: linear;
|
119
125
|
animation-fill-mode: forwards;
|
120
126
|
opacity: 0;
|
121
|
-
${
|
127
|
+
${t ? `
|
122
128
|
animation: closeSpotlight;
|
123
129
|
animation-duration: ${n}ms;
|
124
130
|
animation-timing-function: linear;
|
@@ -144,43 +150,13 @@ const s = e.div(
|
|
144
150
|
}
|
145
151
|
}
|
146
152
|
`
|
147
|
-
), f = e.div(
|
148
|
-
({ theme: { colors: a, zIndex: t }, $isClosing: o }) => `
|
149
|
-
position: fixed;
|
150
|
-
top: 0;
|
151
|
-
left: 0;
|
152
|
-
right: 0;
|
153
|
-
bottom: 0;
|
154
|
-
background-color: ${a.TRANSPARENT};
|
155
|
-
display: flex;
|
156
|
-
animation: ${o ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
157
|
-
z-index: ${t.MODAL};
|
158
|
-
|
159
|
-
@keyframes backdropFadeIn {
|
160
|
-
from {
|
161
|
-
opacity: 0;
|
162
|
-
}
|
163
|
-
to {
|
164
|
-
opacity: 1;
|
165
|
-
}
|
166
|
-
}
|
167
|
-
|
168
|
-
@keyframes backdropFadeOut {
|
169
|
-
from {
|
170
|
-
opacity: 1;
|
171
|
-
}
|
172
|
-
to {
|
173
|
-
opacity: 0;
|
174
|
-
}
|
175
|
-
}
|
176
|
-
`
|
177
153
|
);
|
178
154
|
export {
|
179
|
-
|
180
|
-
|
155
|
+
l as BaseModal,
|
156
|
+
c as BaseModalContent,
|
181
157
|
d as CloseButtonContainer,
|
182
158
|
s as ModalContainer,
|
183
|
-
m as
|
184
|
-
|
159
|
+
m as ModalLoaderWrapper,
|
160
|
+
h as SpotlightModal
|
185
161
|
};
|
186
162
|
//# sourceMappingURL=modal-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\
|
1
|
+
{"version":3,"file":"modal-styled.js","sources":["../../../../src/features/ui/modals/modal-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ModalContainer = styled.div<{ $isClosing?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.BLACK_T_60};\n backdrop-filter: blur(40px);\n display: flex;\n animation: ${$isClosing ? 'backdropFadeOut' : 'backdropFadeIn'} 0.2s ease-out forwards;\n z-index: ${zIndex.MODAL};\n\n @keyframes backdropFadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n \n @keyframes backdropFadeOut {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n }\n`,\n);\n\n/**\n * Base modal container with customizable width and animation state\n */\nconst BaseModal = styled.div<{\n $isClosing?: boolean;\n $width: string;\n}>(\n ({ theme: { colors }, $isClosing, $width }) => `\n position: relative;\n align-self: center;\n margin: 0 auto;\n width: ${$width};\n background-color: ${colors.WHITE_1};\n border: 1px solid ${colors.BLACK_1};\n transform-origin: center center;\n animation: ${\n $isClosing ? 'modalDisappear' : 'modalAppear'\n } 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;\n box-shadow: 0px 10px 20px 0px rgba(0, 0, 0, 0.20);\n \n /* Responsive behavior for smaller screens */\n @media (max-width: calc(${$width} + 80px)) {\n width: 100%;\n max-width: 100%;\n height: 100%;\n max-height: 100%;\n border: none;\n }\n \n @keyframes modalAppear {\n 0% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n 100% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n }\n \n @keyframes modalDisappear {\n 0% {\n opacity: 1;\n transform: perspective(1200px) translateZ(0) translateY(0) scale(1);\n }\n 100% {\n opacity: 0;\n transform: perspective(1200px) translateZ(-50px) translateY(10px) scale(0.98);\n }\n }\n`,\n);\n\n/**\n * Scrollable content container inside the modal\n */\nconst BaseModalContent = styled.div<{ $modalWidth: string }>(\n ({ $modalWidth }) => `\n max-height: calc(100vh - 142px);\n overflow-y: auto;\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n max-height: 100vh;\n }\n}`,\n);\n\n/**\n * Container for the close button with responsive positioning\n */\nconst CloseButtonContainer = styled.div<{ $modalWidth: string }>(\n ({ theme: { colors }, $modalWidth }) => `\n position: absolute;\n top: -56px;\n right: -40px;\n color: ${colors.WHITE_1};\n transition: all 0.2s ease;\n \n &:hover {\n transform: scale(1.05);\n }\n\n @media (max-width: calc(${$modalWidth} + 80px)) {\n top: 16px;\n right: 16px;\n color: ${colors.BLACK_1};\n }\n`,\n);\n\nconst ModalLoaderWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100vh;\n width: 100%;\n`;\n\nconst spotlightWidth = 720;\nconst spotlightAnimationStartDuration = 800;\nconst spotlightAnimationEndDuration = 500;\n\nconst SpotlightModal = styled.div<{\n $isClosing?: boolean;\n}>(\n ({ $isClosing }) => `\n position: absolute;\n width: ${spotlightWidth}px;\n height: 100%;\n left: 50%;\n margin-left: ${-(spotlightWidth / 2)}px;\n clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);\n background: linear-gradient(\n 180deg,\n rgba(0, 0, 0, 1) 0%,\n rgba(0, 0, 0, 0) 100%\n );\n animation: openSpotlight;\n animation-duration: ${spotlightAnimationStartDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 0;\n ${\n $isClosing\n ? `\n animation: closeSpotlight;\n animation-duration: ${spotlightAnimationEndDuration}ms;\n animation-timing-function: linear;\n animation-fill-mode: forwards;\n opacity: 1;\n `\n : ''\n }\n\n @keyframes openSpotlight {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n }\n\n @keyframes closeSpotlight {\n from {\n transform: rotateY(0);\n }\n to {\n transform: rotateY(90deg);\n }\n }\n`,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGM,CAAW;AAAA;AAAA;AAAA,aAG1BN,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMQ,IAAqBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5BU,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBb,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF;"}
|
@@ -1,19 +1,45 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
2
|
+
import { captureException as b } from "@sentry/browser";
|
3
|
+
import { memo as g, useCallback as k, Suspense as a } from "react";
|
4
|
+
import { ErrorBoundary as n } from "react-error-boundary";
|
5
|
+
import $ from "../../../assets/line-icons/icons/cross.js";
|
6
|
+
import h from "../error/error.js";
|
7
|
+
import E from "../buttons/clickable/clickable.js";
|
8
|
+
import d from "../loader/app-loader/app-loader.js";
|
9
|
+
import { ModalContainer as c, ModalLoaderWrapper as s, SpotlightModal as M, BaseModal as x, CloseButtonContainer as v, BaseModalContent as B } from "./modal-styled.js";
|
10
|
+
const I = g(({ modal: m, isClosing: o = !1, onClose: p }) => {
|
11
|
+
const { renderAs: f, element: i, modalWidth: e, isDismissable: C } = m, l = k((u) => {
|
12
|
+
b(u);
|
13
|
+
}, []);
|
14
|
+
return f === "spotlight" ? /* @__PURE__ */ r(c, { $isClosing: o, children: /* @__PURE__ */ r(
|
15
|
+
n,
|
16
|
+
{
|
17
|
+
fallback: /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(h, { height: "100vh" }) }),
|
18
|
+
onError: l,
|
19
|
+
children: /* @__PURE__ */ t(
|
20
|
+
a,
|
21
|
+
{
|
22
|
+
fallback: /* @__PURE__ */ r(s, { children: /* @__PURE__ */ r(d, { height: "100vh" }) }),
|
23
|
+
children: [
|
24
|
+
/* @__PURE__ */ r(M, { $isClosing: o }),
|
25
|
+
i
|
26
|
+
]
|
27
|
+
}
|
28
|
+
)
|
29
|
+
}
|
30
|
+
) }) : /* @__PURE__ */ r(c, { $isClosing: o, children: /* @__PURE__ */ t(x, { $isClosing: o, $width: e, children: [
|
31
|
+
C !== !1 && /* @__PURE__ */ r(v, { $modalWidth: e, children: /* @__PURE__ */ r(E, { label: "Close", onClick: p, children: /* @__PURE__ */ r($, { width: 40, height: 40 }) }) }),
|
32
|
+
/* @__PURE__ */ r(B, { $modalWidth: e, children: /* @__PURE__ */ r(
|
33
|
+
n,
|
34
|
+
{
|
35
|
+
fallback: /* @__PURE__ */ r(h, { height: "50vh", size: "compact" }),
|
36
|
+
onError: l,
|
37
|
+
children: /* @__PURE__ */ r(a, { fallback: /* @__PURE__ */ r(d, { height: "50vh" }), children: i })
|
38
|
+
}
|
39
|
+
) })
|
14
40
|
] }) });
|
15
41
|
});
|
16
42
|
export {
|
17
|
-
|
43
|
+
I as default
|
18
44
|
};
|
19
45
|
//# sourceMappingURL=modal.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Clickable from '../buttons/clickable/clickable';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.
|
1
|
+
{"version":3,"file":"modal.js","sources":["../../../../src/features/ui/modals/modal.tsx"],"sourcesContent":["import type { IModalProps } from './modal-types';\nimport type { FC } from 'react';\n\nimport { captureException } from '@sentry/browser';\nimport { memo, Suspense, useCallback } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport * as Styled from './modal-styled';\n\n/**\n * Modal component that renders modal content with close button\n * Handles animation state for entry and exit transitions\n */\nconst Modal: FC<IModalProps> = memo(({ modal, isClosing = false, onClose }) => {\n const { renderAs, element, modalWidth, isDismissable } = modal;\n\n const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n onError={sentryCaptureException}\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Styled.SpotlightModal $isClosing={isClosing} />\n {element}\n </Suspense>\n </ErrorBoundary>\n </Styled.ModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <ErrorBoundary\n fallback={<Error height=\"50vh\" size=\"compact\" />}\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","renderAs","element","modalWidth","isDismissable","sentryCaptureException","useCallback","error","captureException","jsx","Styled.ModalContainer","ErrorBoundary","Styled.ModalLoaderWrapper","Error","jsxs","Suspense","AppLoader","Styled.SpotlightModal","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;;AAiBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AAC7E,QAAM,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,MAAkBN,GAEnDO,IAAyBC,EAAY,CAACC,MAAiB;AAC3D,IAAAC,EAAiBD,CAAK;AAAA,EACxB,GAAG,CAAE,CAAA;AAEL,SAAIN,MAAa,cAEZ,gBAAAQ,EAAAC,GAAA,EAAsB,YAAYX,GACjC,UAAA,gBAAAU;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,4BACGC,GAAA,EACC,UAAC,gBAAAH,EAAAI,GAAA,EAAM,QAAO,QAAQ,CAAA,GACxB;AAAA,MAEF,SAASR;AAAA,MAET,UAAA,gBAAAS;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,4BACGH,GAAA,EACC,UAAC,gBAAAH,EAAAO,GAAA,EAAU,QAAO,QAAQ,CAAA,GAC5B;AAAA,UAGF,UAAA;AAAA,YAAA,gBAAAP,EAACQ,GAAA,EAAsB,YAAYlB,EAAW,CAAA;AAAA,YAC7CG;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA,IAKD,gBAAAO,EAAAC,GAAA,EAAsB,YAAYX,GACjC,UAAC,gBAAAe,EAAAI,GAAA,EAAiB,YAAYnB,GAAW,QAAQI,GAC9C,UAAA;AAAA,IAAkBC,MAAA,wBAChBe,GAAA,EAA4B,aAAahB,GACxC,4BAACiB,GAAU,EAAA,OAAM,SAAQ,SAASpB,GAChC,4BAACqB,GAAU,EAAA,OAAO,IAAI,QAAQ,IAAI,GACpC,EACF,CAAA;AAAA,IAED,gBAAAZ,EAAAa,GAAA,EAAwB,aAAanB,GACpC,UAAA,gBAAAM;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,UAAW,gBAAAF,EAAAI,GAAA,EAAM,QAAO,QAAO,MAAK,WAAU;AAAA,QAC9C,SAASR;AAAA,QAET,UAAA,gBAAAI,EAACM,KAAS,UAAU,gBAAAN,EAACO,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQd,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,CAAC;"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import e from "styled-components";
|
2
2
|
import n from "../layout/flex-view.js";
|
3
|
-
const
|
3
|
+
const p = e.div`
|
4
4
|
position: absolute;
|
5
5
|
top: ${({ $top: t }) => t}px;
|
6
6
|
left: ${({ $left: t }) => t}px;
|
@@ -11,15 +11,22 @@ const r = e.div`
|
|
11
11
|
align-items: end;
|
12
12
|
z-index: ${({ $zIndex: t }) => t};
|
13
13
|
pointer-events: none;
|
14
|
-
`,
|
15
|
-
|
14
|
+
`, r = e(n)`
|
15
|
+
div {
|
16
|
+
// Inner container of Lottie Component
|
17
|
+
display: flex;
|
18
|
+
justify-content: center;
|
19
|
+
align-items: center;
|
20
|
+
}
|
16
21
|
|
17
|
-
|
18
|
-
|
22
|
+
svg {
|
23
|
+
width: 33.84px !important;
|
24
|
+
height: 47.27px !important;
|
25
|
+
display: block;
|
19
26
|
}
|
20
27
|
`;
|
21
28
|
export {
|
22
|
-
|
23
|
-
|
29
|
+
r as NudgeLottieContainer,
|
30
|
+
p as NudgeWrapper
|
24
31
|
};
|
25
32
|
//# sourceMappingURL=nudge-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nudge-styled.js","sources":["../../../../src/features/ui/nudge/nudge-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\ninterface NudgeWrapperProps {\n $top: number;\n $left: number;\n $zIndex: number;\n}\n\nexport const NudgeWrapper = styled.div<NudgeWrapperProps>`\n position: absolute;\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n height: max-content;\n width: max-content;\n display: flex;\n justify-content: center;\n align-items: end;\n z-index: ${({ $zIndex }) => $zIndex};\n pointer-events: none;\n`;\n\nexport const NudgeLottieContainer = styled(FlexView)`\n
|
1
|
+
{"version":3,"file":"nudge-styled.js","sources":["../../../../src/features/ui/nudge/nudge-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\n\ninterface NudgeWrapperProps {\n $top: number;\n $left: number;\n $zIndex: number;\n}\n\nexport const NudgeWrapper = styled.div<NudgeWrapperProps>`\n position: absolute;\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n height: max-content;\n width: max-content;\n display: flex;\n justify-content: center;\n align-items: end;\n z-index: ${({ $zIndex }) => $zIndex};\n pointer-events: none;\n`;\n\nexport const NudgeLottieContainer = styled(FlexView)`\n div {\n // Inner container of Lottie Component\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n svg {\n width: 33.84px !important;\n height: 47.27px !important;\n display: block;\n }\n`;\n"],"names":["NudgeWrapper","styled","$top","$left","$zIndex","NudgeLottieContainer","FlexView"],"mappings":";;AAUO,MAAMA,IAAeC,EAAO;AAAA;AAAA,SAE1B,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjB,CAAC,EAAE,SAAAC,EAAQ,MAAMA,CAAO;AAAA;AAAA,GAIxBC,IAAuBJ,EAAOK,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,17 +1,18 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as n } from "react";
|
2
3
|
import { LOTTIE as d } from "../../../assets/lottie/lottie.js";
|
3
|
-
import
|
4
|
-
import { NudgeWrapper as
|
5
|
-
const
|
6
|
-
content:
|
7
|
-
nudgePointerX:
|
8
|
-
nudgePointerY:
|
4
|
+
import p from "../lottie-animation/lottie-animation.js";
|
5
|
+
import { NudgeWrapper as f, NudgeLottieContainer as s } from "./nudge-styled.js";
|
6
|
+
const u = ({
|
7
|
+
content: o,
|
8
|
+
nudgePointerX: r = 0,
|
9
|
+
nudgePointerY: e = 0,
|
9
10
|
zIndex: i = 100
|
10
|
-
}) => /* @__PURE__ */
|
11
|
-
/* @__PURE__ */ t(s, { $height:
|
12
|
-
|
13
|
-
] }),
|
11
|
+
}) => /* @__PURE__ */ m(f, { $top: e, $left: r, $zIndex: i, children: [
|
12
|
+
/* @__PURE__ */ t(s, { $height: 60, $width: 60, children: /* @__PURE__ */ t(p, { src: d.NUDGE_TAP }) }),
|
13
|
+
o
|
14
|
+
] }), N = n(u);
|
14
15
|
export {
|
15
|
-
|
16
|
+
N as default
|
16
17
|
};
|
17
18
|
//# sourceMappingURL=nudge.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nudge.js","sources":["../../../../src/features/ui/nudge/nudge.tsx"],"sourcesContent":["import type { INudgeProps } from './nudge-types';\n\nimport React from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport LottieAnimation from '../lottie-animation/lottie-animation';\nimport * as S from './nudge-styled';\n\nconst Nudge: React.FC<INudgeProps> = ({\n content,\n nudgePointerX = 0,\n nudgePointerY = 0,\n zIndex = 100,\n}) => {\n return (\n <S.NudgeWrapper $top={nudgePointerY} $left={nudgePointerX} $zIndex={zIndex}>\n <S.NudgeLottieContainer $height={
|
1
|
+
{"version":3,"file":"nudge.js","sources":["../../../../src/features/ui/nudge/nudge.tsx"],"sourcesContent":["import type { INudgeProps } from './nudge-types';\n\nimport React, { memo } from 'react';\n\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport LottieAnimation from '../lottie-animation/lottie-animation';\nimport * as S from './nudge-styled';\n\nconst Nudge: React.FC<INudgeProps> = ({\n content,\n nudgePointerX = 0,\n nudgePointerY = 0,\n zIndex = 100,\n}) => {\n return (\n <S.NudgeWrapper $top={nudgePointerY} $left={nudgePointerX} $zIndex={zIndex}>\n <S.NudgeLottieContainer $height={60} $width={60}>\n <LottieAnimation src={LOTTIE.NUDGE_TAP} />\n </S.NudgeLottieContainer>\n {content}\n </S.NudgeWrapper>\n );\n};\n\nexport default memo(Nudge);\n"],"names":["Nudge","content","nudgePointerX","nudgePointerY","zIndex","jsxs","S.NudgeWrapper","jsx","S.NudgeLottieContainer","LottieAnimation","LOTTIE","Nudge$1","memo"],"mappings":";;;;;AAQA,MAAMA,IAA+B,CAAC;AAAA,EACpC,SAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,eAAAC,IAAgB;AAAA,EAChB,QAAAC,IAAS;AACX,MAEI,gBAAAC,EAACC,GAAA,EAAe,MAAMH,GAAe,OAAOD,GAAe,SAASE,GAClE,UAAA;AAAA,EAAA,gBAAAG,EAACC,GAAA,EAAuB,SAAS,IAAI,QAAQ,IAC3C,UAAA,gBAAAD,EAACE,GAAgB,EAAA,KAAKC,EAAO,UAAA,CAAW,EAC1C,CAAA;AAAA,EACCT;AACH,EAAA,CAAA,GAIWU,IAAAC,EAAKZ,CAAK;"}
|
@@ -36,12 +36,11 @@ const e = r.div`
|
|
36
36
|
left: 50%;
|
37
37
|
width: ${({ $size: t }) => typeof t == "number" ? `${t * 0.7}px` : t};
|
38
38
|
height: ${({ $size: t }) => typeof t == "number" ? `${t * 0.7}px` : t};
|
39
|
+
opacity: 0;
|
40
|
+
transition: opacity 0.2s ease;
|
39
41
|
transform: translate(-50%, -50%);
|
40
42
|
pointer-events: none;
|
41
43
|
|
42
|
-
opacity: ${({ $visible: t }) => t ? 1 : 0};
|
43
|
-
transition: opacity 0.2s ease;
|
44
|
-
|
45
44
|
${e}:hover & {
|
46
45
|
opacity: 1;
|
47
46
|
}
|
@@ -84,4 +83,4 @@ export {
|
|
84
83
|
i as StickerGrid,
|
85
84
|
c as StickerGridContainer
|
86
85
|
};
|
87
|
-
//# sourceMappingURL=sticker-
|
86
|
+
//# sourceMappingURL=sticker-grid-styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sticker-grid-styles.js","sources":["../../../../src/features/ui/sticker-grid/sticker-grid-styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StickerContainer = styled.div<{\n $size: number | string;\n $disabled?: boolean;\n}>`\n position: relative;\n width: ${({ $size }) => (typeof $size === 'number' ? `${$size}px` : $size)};\n height: ${({ $size }) => (typeof $size === 'number' ? `${$size}px` : $size)};\n cursor: ${({ $disabled }) => ($disabled ? 'none' : 'pointer')};\n border-radius: 8px;\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 0.2s ease;\n background-color: transparent;\n opacity: ${({ $disabled }) => ($disabled ? 0.5 : 1)};\n\n &:hover {\n transform: ${({ $disabled }) => ($disabled ? 'none' : 'scale(1.1)')};\n background-color: rgba(255, 255, 255, 0.1);\n }\n\n &:active {\n transform: ${({ $disabled }) => ($disabled ? 'none' : 'scale(0.95)')};\n }\n`;\n\nexport const StaticEmoji = styled.div<{ $size: number | string }>`\n font-size: ${({ $size }) => {\n if (typeof $size === 'number') {\n return `${$size * 0.7}px`;\n }\n\n return '70%';\n }};\n line-height: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n transition: opacity 0.2s ease;\n`;\n\nexport const LottieContainer = styled.div<{ $size: number | string }>`\n position: absolute;\n top: 50%;\n left: 50%;\n width: ${({ $size }) => (typeof $size === 'number' ? `${$size * 0.7}px` : $size)};\n height: ${({ $size }) => (typeof $size === 'number' ? `${$size * 0.7}px` : $size)};\n opacity: 0;\n transition: opacity 0.2s ease;\n transform: translate(-50%, -50%);\n pointer-events: none;\n\n ${StickerContainer}:hover & {\n opacity: 1;\n }\n`;\n\nexport const StickerGrid = styled.div<{\n $columns: number;\n $gap: number;\n}>`\n display: grid;\n grid-template-columns: repeat(${({ $columns }) => $columns}, 1fr);\n gap: ${({ $gap }) => $gap}px;\n padding: 16px;\n background-color: #2a2a2a;\n border-radius: 12px;\n max-height: 400px;\n overflow-y: auto;\n\n &::-webkit-scrollbar {\n width: 8px;\n }\n\n &::-webkit-scrollbar-track {\n background: rgba(255, 255, 255, 0.1);\n border-radius: 4px;\n }\n\n &::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.3);\n border-radius: 4px;\n }\n\n &::-webkit-scrollbar-thumb:hover {\n background: rgba(255, 255, 255, 0.5);\n }\n`;\n\nexport const StickerGridContainer = styled.div<{\n $width: string;\n $height: string;\n}>`\n width: 100%;\n max-width: ${({ $width }) => $width};\n max-height: ${({ $height }) => $height};\n`;\n"],"names":["StickerContainer","styled","$size","$disabled","StaticEmoji","LottieContainer","StickerGrid","$columns","$gap","StickerGridContainer","$width","$height"],"mappings":";AAEO,MAAMA,IAAmBC,EAAO;AAAA;AAAA,WAK5B,CAAC,EAAE,OAAAC,EAAa,MAAA,OAAOA,KAAU,WAAW,GAAGA,CAAK,OAAOA,CAAM;AAAA,YAChE,CAAC,EAAE,OAAAA,EAAa,MAAA,OAAOA,KAAU,WAAW,GAAGA,CAAK,OAAOA,CAAM;AAAA,YACjE,CAAC,EAAE,WAAAC,EAAA,MAAiBA,IAAY,SAAS,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAQlD,CAAC,EAAE,WAAAA,EAAA,MAAiBA,IAAY,MAAM,CAAE;AAAA;AAAA;AAAA,iBAGpC,CAAC,EAAE,WAAAA,EAAA,MAAiBA,IAAY,SAAS,YAAa;AAAA;AAAA;AAAA;AAAA;AAAA,iBAKtD,CAAC,EAAE,WAAAA,EAAA,MAAiBA,IAAY,SAAS,aAAc;AAAA;AAAA,GAI3DC,IAAcH,EAAO;AAAA,eACnB,CAAC,EAAE,OAAAC,QACV,OAAOA,KAAU,WACZ,GAAGA,IAAQ,GAAG,OAGhB,KACR;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUUG,IAAkBJ,EAAO;AAAA;AAAA;AAAA;AAAA,WAI3B,CAAC,EAAE,OAAAC,QAAa,OAAOA,KAAU,WAAW,GAAGA,IAAQ,GAAG,OAAOA,CAAM;AAAA,YACtE,CAAC,EAAE,OAAAA,QAAa,OAAOA,KAAU,WAAW,GAAGA,IAAQ,GAAG,OAAOA,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAM/EF,CAAgB;AAAA;AAAA;AAAA,GAKPM,IAAcL,EAAO;AAAA;AAAA,kCAKA,CAAC,EAAE,UAAAM,EAAS,MAAMA,CAAQ;AAAA,SACnD,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GA0BdC,IAAuBR,EAAO;AAAA;AAAA,eAK5B,CAAC,EAAE,QAAAS,EAAO,MAAMA,CAAM;AAAA,gBACrB,CAAC,EAAE,SAAAC,EAAQ,MAAMA,CAAO;AAAA;"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import { memo as d } from "react";
|
3
|
+
import n from "./sticker.js";
|
4
|
+
import { StickerGridContainer as a, StickerGrid as f } from "./sticker-grid-styles.js";
|
5
|
+
const h = ({
|
6
|
+
stickers: t,
|
7
|
+
columns: i = 4,
|
8
|
+
gap: e = 8,
|
9
|
+
stickerSize: p = 48,
|
10
|
+
onStickerClick: o
|
11
|
+
}) => /* @__PURE__ */ m(a, { $width: "350px", $height: "400px", children: /* @__PURE__ */ m(f, { $columns: i, $gap: e, children: t.map((r) => /* @__PURE__ */ m(
|
12
|
+
n,
|
13
|
+
{
|
14
|
+
emoji: r.emoji,
|
15
|
+
lottieUrl: r.lottieUrl,
|
16
|
+
size: p,
|
17
|
+
onClick: () => o == null ? void 0 : o(r)
|
18
|
+
},
|
19
|
+
r.id
|
20
|
+
)) }) }), $ = d(h);
|
21
|
+
export {
|
22
|
+
$ as default
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=sticker-grid.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sticker-grid.js","sources":["../../../../src/features/ui/sticker-grid/sticker-grid.tsx"],"sourcesContent":["import type { IStickerGridProps } from './sticker-grid-types';\n\nimport React, { memo } from 'react';\n\nimport Sticker from './sticker';\nimport { StickerGrid, StickerGridContainer } from './sticker-grid-styles';\n\nconst StickerGridComponent: React.FC<IStickerGridProps> = ({\n stickers,\n columns = 4,\n gap = 8,\n stickerSize = 48,\n onStickerClick,\n}) => {\n return (\n <StickerGridContainer $width=\"350px\" $height=\"400px\">\n <StickerGrid $columns={columns} $gap={gap}>\n {stickers.map(sticker => (\n <Sticker\n key={sticker.id}\n emoji={sticker.emoji}\n lottieUrl={sticker.lottieUrl}\n size={stickerSize}\n onClick={() => onStickerClick?.(sticker)}\n />\n ))}\n </StickerGrid>\n </StickerGridContainer>\n );\n};\n\nexport default memo(StickerGridComponent);\n"],"names":["StickerGridComponent","stickers","columns","gap","stickerSize","onStickerClick","jsx","StickerGridContainer","StickerGrid","sticker","Sticker","stickerGrid","memo"],"mappings":";;;;AAOA,MAAMA,IAAoD,CAAC;AAAA,EACzD,UAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,KAAAC,IAAM;AAAA,EACN,aAAAC,IAAc;AAAA,EACd,gBAAAC;AACF,MAEK,gBAAAC,EAAAC,GAAA,EAAqB,QAAO,SAAQ,SAAQ,SAC3C,UAAA,gBAAAD,EAACE,GAAY,EAAA,UAAUN,GAAS,MAAMC,GACnC,UAAAF,EAAS,IAAI,CACZQ,MAAA,gBAAAH;AAAA,EAACI;AAAA,EAAA;AAAA,IAEC,OAAOD,EAAQ;AAAA,IACf,WAAWA,EAAQ;AAAA,IACnB,MAAML;AAAA,IACN,SAAS,MAAMC,KAAA,gBAAAA,EAAiBI;AAAA,EAAO;AAAA,EAJlCA,EAAQ;AAAA,CAMhB,GACH,EACF,CAAA,GAIWE,IAAAC,EAAKZ,CAAoB;"}
|