@cuemath/leap 3.2.16-link.1 → 3.2.16-mb
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 +0 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +25 -26
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +14 -20
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +47 -54
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +17 -29
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +10 -22
- 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 +31 -30
- 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 +34 -35
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +15 -14
- 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 +7 -6
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +9 -8
- package/dist/features/auth/login/login-styled.js.map +1 -1
- 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/hooks/use-game-launcher-journey/use-game-launcher-journey.js +98 -121
- 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 +28 -29
- 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 +42 -43
- 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 +35 -43
- 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 +24 -26
- 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 +1 -3
- 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/hooks/use-viewport/use-viewport.js +22 -0
- package/dist/features/hooks/use-viewport/use-viewport.js.map +1 -0
- package/dist/features/journey/comps/coachmark/coachmark.js +27 -29
- 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 +72 -73
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +4 -6
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/stickers/sticker-data.js +234 -0
- package/dist/features/stickers/sticker-data.js.map +1 -0
- package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +4 -3
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +25 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker.js +57 -0
- package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js} +6 -6
- package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-styled.js → stickers/stickers-effects/stickers-effects-styled.js} +2 -2
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
- package/dist/features/{ui/stickers/stickers-utils.js → stickers/stickers-effects/stickers-effects-utils.js} +6 -6
- package/dist/features/stickers/stickers-effects/stickers-effects-utils.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +39 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
- package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +50 -7
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +69 -15
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/error/error.js +27 -65
- package/dist/features/ui/error/error.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/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +18 -19
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +29 -25
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +58 -69
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +14 -50
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +7 -14
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +12 -13
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- 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 +15 -17
- package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
- package/dist/features/ui/text/text.js +38 -44
- 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 +2 -4
- 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 +13 -12
- 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 +260 -246
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +28 -37
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +164 -166
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/index.d.ts +53 -246
- package/dist/index.js +585 -633
- package/dist/index.js.map +1 -1
- package/dist/static/nudge-tap.5cb30093.json +1057 -0
- package/package.json +3 -2
- package/dist/assets/line-icons/icons/after-noon.js +0 -34
- package/dist/assets/line-icons/icons/after-noon.js.map +0 -1
- package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
- package/dist/assets/line-icons/icons/cue-board-filled.js +0 -33
- package/dist/assets/line-icons/icons/cue-board-filled.js.map +0 -1
- package/dist/assets/line-icons/icons/cue-board.js +0 -23
- package/dist/assets/line-icons/icons/cue-board.js.map +0 -1
- package/dist/assets/line-icons/icons/evening.js +0 -35
- package/dist/assets/line-icons/icons/evening.js.map +0 -1
- package/dist/assets/line-icons/icons/hint-fill.js +0 -35
- package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
- package/dist/assets/line-icons/icons/morning.js +0 -35
- package/dist/assets/line-icons/icons/morning.js.map +0 -1
- package/dist/assets/line-icons/icons/screen-grab-filled.js +0 -35
- package/dist/assets/line-icons/icons/screen-grab-filled.js.map +0 -1
- package/dist/assets/line-icons/icons/screen-grab.js +0 -23
- package/dist/assets/line-icons/icons/screen-grab.js.map +0 -1
- package/dist/assets/line-icons/icons/star3.js +0 -32
- package/dist/assets/line-icons/icons/star3.js.map +0 -1
- package/dist/assets/line-icons/icons/sticker-filled.js +0 -64
- package/dist/assets/line-icons/icons/sticker-filled.js.map +0 -1
- package/dist/assets/line-icons/icons/sticker.js +0 -46
- package/dist/assets/line-icons/icons/sticker.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +0 -9
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +0 -52
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +0 -93
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js +0 -10
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text-styled.js.map +0 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js +0 -17
- package/dist/features/auth/comps/animated-avatar-message/animated-text/animated-text.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +0 -22
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +0 -1
- package/dist/features/auth/comps/otp-input/otp-input.js +0 -51
- package/dist/features/auth/comps/otp-input/otp-input.js.map +0 -1
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +0 -44
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +0 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +0 -75
- package/dist/features/auth/comps/pill-button/pill-button.js.map +0 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +0 -17
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +0 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +0 -67
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +0 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +0 -19
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +0 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +0 -32
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +0 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +0 -44
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +0 -1
- package/dist/features/auth/signup-v2/signup-header/signup-header.js +0 -54
- package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +0 -1
- package/dist/features/auth/signup-v2/signup-options/signup-options.js +0 -83
- package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +0 -81
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
- package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app.js +0 -62
- package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +0 -49
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +0 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +0 -64
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +0 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +0 -28
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +0 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +0 -83
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +0 -1
- package/dist/features/ui/accordion/accordion.js +0 -62
- package/dist/features/ui/accordion/accordion.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +0 -1
- package/dist/features/ui/drawer/drawer-styled.js +0 -34
- package/dist/features/ui/drawer/drawer-styled.js.map +0 -1
- package/dist/features/ui/drawer/drawer.js +0 -42
- package/dist/features/ui/drawer/drawer.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker.js +0 -57
- package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
- package/dist/features/ui/stickers/constants.js +0 -6
- package/dist/features/ui/stickers/constants.js.map +0 -1
- package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
- package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
- package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
- package/dist/features/ui/stickers/stickers.js +0 -40
- package/dist/features/ui/stickers/stickers.js.map +0 -1
- package/dist/static/animated-avatar.1ad58b1d.json +0 -1
- package/dist/static/animated-avatar.69b07505.json +0 -1
- package/dist/static/animated-avatar.9c560b46.json +0 -1
- package/dist/static/calendar-purple.1a840b41.svg +0 -1
- package/dist/static/flying-disk.c7f6ed39.json +0 -1
- package/dist/static/graduation-cap.3be3340a.json +0 -1
- package/dist/static/handshake.287e7dfb.svg +0 -1
- package/dist/static/light-bulb.c6db0b23.json +0 -1
- package/dist/static/money.332aacf1.svg +0 -1
- package/dist/static/muscle.9bcfb8a7.json +0 -1
- package/dist/static/nudge-tap.0591aef4.json +0 -1
- package/dist/static/parent-avatar.822c7b9b.svg +0 -1
- package/dist/static/pencil.23df9da0.json +0 -1
- package/dist/static/plus-sign.de6af957.json +0 -1
- package/dist/static/racing-car.2cbf864e.json +0 -1
- package/dist/static/rocket.0a3ccab0.json +0 -1
- package/dist/static/shovel.abeec04c.json +0 -1
- package/dist/static/stripe-blurple.6abf422f.svg +0 -1
- package/dist/static/trustpilot.bd3d79e1.svg +0 -1
@@ -0,0 +1,57 @@
|
|
1
|
+
import { jsxs as v, jsx as c } from "react/jsx-runtime";
|
2
|
+
import { memo as L, useState as f, useRef as $, useCallback as o, useEffect as g } from "react";
|
3
|
+
import k from "../../ui/lottie-animation/lottie-animation.js";
|
4
|
+
import { StickerContainer as E, StaticEmoji as M, LottieContainer as R } from "./sticker-selector-styles.js";
|
5
|
+
const j = ({
|
6
|
+
emoji: l,
|
7
|
+
lottieUrl: u,
|
8
|
+
size: n = 48,
|
9
|
+
onClick: s,
|
10
|
+
disabled: e = !1
|
11
|
+
}) => {
|
12
|
+
const [i, m] = f(!1), [r, a] = f(!1), t = $(null), p = o(() => {
|
13
|
+
t.current && (t.current.goToAndStop(0, !0), m(!0), r && t.current.play());
|
14
|
+
}, [r]);
|
15
|
+
g(() => {
|
16
|
+
!t.current || !i || (r ? t.current.play() : t.current.goToAndStop(0, !0));
|
17
|
+
}, [r, i]);
|
18
|
+
const d = o(() => {
|
19
|
+
e || a(!0);
|
20
|
+
}, [e]), h = o(() => {
|
21
|
+
e || a(!1);
|
22
|
+
}, [e]), S = o(() => {
|
23
|
+
!e && s && s();
|
24
|
+
}, [e, s]);
|
25
|
+
return /* @__PURE__ */ v(
|
26
|
+
E,
|
27
|
+
{
|
28
|
+
$size: n,
|
29
|
+
$disabled: e,
|
30
|
+
onMouseEnter: d,
|
31
|
+
onMouseLeave: h,
|
32
|
+
onClick: S,
|
33
|
+
children: [
|
34
|
+
!r && /* @__PURE__ */ c(M, { $size: n, children: l }),
|
35
|
+
/* @__PURE__ */ c(R, { $size: n, $visible: i, children: u && r && /* @__PURE__ */ c(
|
36
|
+
k,
|
37
|
+
{
|
38
|
+
ref: t,
|
39
|
+
src: u,
|
40
|
+
width: "100%",
|
41
|
+
height: "100%",
|
42
|
+
settings: {
|
43
|
+
loop: !0,
|
44
|
+
autoplay: !1,
|
45
|
+
renderer: "canvas"
|
46
|
+
},
|
47
|
+
onRender: p
|
48
|
+
}
|
49
|
+
) })
|
50
|
+
]
|
51
|
+
}
|
52
|
+
);
|
53
|
+
}, H = L(j);
|
54
|
+
export {
|
55
|
+
H as default
|
56
|
+
};
|
57
|
+
//# sourceMappingURL=sticker.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"sticker.js","sources":["../../../../src/features/stickers/sticker-selector/sticker.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../ui/lottie-animation/types';\nimport type { IStickerProps } from './sticker-selector-types';\n\nimport React, { memo, useCallback, useEffect, useRef, useState } from 'react';\n\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport * as S from './sticker-selector-styles';\n\nconst Sticker: React.FC<IStickerProps> = ({\n emoji,\n lottieUrl,\n size = 48,\n onClick,\n disabled = false,\n}) => {\n const [isLoaded, setIsLoaded] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const lottieRef = useRef<ILottieAnimationRef>(null);\n\n const handleRender = useCallback(() => {\n if (!lottieRef.current) return;\n\n lottieRef.current.goToAndStop(0, true);\n setIsLoaded(true);\n\n if (isHovered) lottieRef.current.play();\n }, [isHovered]);\n\n useEffect(() => {\n if (!lottieRef.current || !isLoaded) return;\n\n if (isHovered) {\n lottieRef.current.play();\n } else {\n lottieRef.current.goToAndStop(0, true);\n }\n }, [isHovered, isLoaded]);\n\n const handleMouseEnter = useCallback(() => {\n if (!disabled) setIsHovered(true);\n }, [disabled]);\n\n const handleMouseLeave = useCallback(() => {\n if (!disabled) setIsHovered(false);\n }, [disabled]);\n\n const handleClick = useCallback(() => {\n if (!disabled && onClick) onClick();\n }, [disabled, onClick]);\n\n return (\n <S.StickerContainer\n $size={size}\n $disabled={disabled}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onClick={handleClick}\n >\n {!isHovered && <S.StaticEmoji $size={size}>{emoji}</S.StaticEmoji>}\n\n <S.LottieContainer $size={size} $visible={isLoaded}>\n {lottieUrl && isHovered && (\n <LottieAnimation\n ref={lottieRef}\n src={lottieUrl}\n width=\"100%\"\n height=\"100%\"\n settings={{\n loop: true,\n autoplay: false,\n renderer: 'canvas',\n }}\n onRender={handleRender}\n />\n )}\n </S.LottieContainer>\n </S.StickerContainer>\n );\n};\n\nexport default memo(Sticker);\n"],"names":["Sticker","emoji","lottieUrl","size","onClick","disabled","isLoaded","setIsLoaded","useState","isHovered","setIsHovered","lottieRef","useRef","handleRender","useCallback","useEffect","handleMouseEnter","handleMouseLeave","handleClick","jsxs","S.StickerContainer","jsx","S.StaticEmoji","S.LottieContainer","LottieAnimation","Sticker$1","memo"],"mappings":";;;;AAQA,MAAMA,IAAmC,CAAC;AAAA,EACxC,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,SAAAC;AAAA,EACA,UAAAC,IAAW;AACb,MAAM;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAC1CG,IAAYC,EAA4B,IAAI,GAE5CC,IAAeC,EAAY,MAAM;AACjC,IAACH,EAAU,YAELA,EAAA,QAAQ,YAAY,GAAG,EAAI,GACrCJ,EAAY,EAAI,GAEZE,KAAqBE,EAAA,QAAQ,KAAK;AAAA,EAAA,GACrC,CAACF,CAAS,CAAC;AAEd,EAAAM,EAAU,MAAM;AACd,IAAI,CAACJ,EAAU,WAAW,CAACL,MAEvBG,IACFE,EAAU,QAAQ,SAERA,EAAA,QAAQ,YAAY,GAAG,EAAI;AAAA,EACvC,GACC,CAACF,GAAWH,CAAQ,CAAC;AAElB,QAAAU,IAAmBF,EAAY,MAAM;AACrC,IAACT,KAAUK,EAAa,EAAI;AAAA,EAAA,GAC/B,CAACL,CAAQ,CAAC,GAEPY,IAAmBH,EAAY,MAAM;AACrC,IAACT,KAAUK,EAAa,EAAK;AAAA,EAAA,GAChC,CAACL,CAAQ,CAAC,GAEPa,IAAcJ,EAAY,MAAM;AAChC,IAAA,CAACT,KAAYD,KAAiBA;EAAA,GACjC,CAACC,GAAUD,CAAO,CAAC;AAGpB,SAAA,gBAAAe;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,OAAOjB;AAAA,MACP,WAAWE;AAAA,MACX,cAAcW;AAAA,MACd,cAAcC;AAAA,MACd,SAASC;AAAA,MAER,UAAA;AAAA,QAAA,CAACT,KAAc,gBAAAY,EAAAC,GAAA,EAAc,OAAOnB,GAAO,UAAMF,GAAA;AAAA,QAElD,gBAAAoB,EAACE,GAAA,EAAkB,OAAOpB,GAAM,UAAUG,GACvC,UAAAJ,KAAaO,KACZ,gBAAAY;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,KAAKb;AAAA,YACL,KAAKT;AAAA,YACL,OAAM;AAAA,YACN,QAAO;AAAA,YACP,UAAU;AAAA,cACR,MAAM;AAAA,cACN,UAAU;AAAA,cACV,UAAU;AAAA,YACZ;AAAA,YACA,UAAUW;AAAA,UAAA;AAAA,QAAA,GAGhB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeY,IAAAC,EAAK1B,CAAO;"}
|
package/dist/features/{ui/stickers/stickers-effects.js → stickers/stickers-effects/effects.js}
RENAMED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { keyframes as r, css as t } from "styled-components";
|
2
|
-
import { randomizeDuration as o } from "./stickers-utils.js";
|
2
|
+
import { randomizeDuration as o } from "./stickers-effects-utils.js";
|
3
3
|
const s = r`
|
4
4
|
0% {
|
5
5
|
transform: translateY(0vh);
|
@@ -45,20 +45,20 @@ const s = r`
|
|
45
45
|
opacity: 0;
|
46
46
|
}
|
47
47
|
`, i = {
|
48
|
-
|
48
|
+
"float-up": (a) => t`
|
49
49
|
animation: ${s} ${o(a)}ms ease-out forwards;
|
50
50
|
`,
|
51
|
-
|
51
|
+
"fall-down": (a) => t`
|
52
52
|
animation: ${n} ${o(a)}ms ease-out forwards;
|
53
53
|
`,
|
54
|
-
|
54
|
+
"burst-from-edges": (a) => t`
|
55
55
|
animation: ${e} ${o(a)}ms linear forwards;
|
56
56
|
`,
|
57
|
-
|
57
|
+
"pop-expand": (a) => t`
|
58
58
|
animation: ${m} ${a}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards;
|
59
59
|
`
|
60
60
|
};
|
61
61
|
export {
|
62
62
|
i as effectAnimations
|
63
63
|
};
|
64
|
-
//# sourceMappingURL=
|
64
|
+
//# sourceMappingURL=effects.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"effects.js","sources":["../../../../src/features/stickers/stickers-effects/effects.ts"],"sourcesContent":["import type { IStickersProps } from './stickers-effects-types';\n\nimport { keyframes, css } from 'styled-components';\n\nimport { randomizeDuration } from './stickers-effects-utils';\n\nconst floatUp = keyframes`\n 0% {\n transform: translateY(0vh);\n opacity: 1;\n }\n 100% {\n transform: translateY(-100vh);\n opacity: 0;\n }\n`;\n\nconst fallDown = keyframes`\n 0% {\n transform: translateY(0vh);\n opacity: 1;\n }\n 100% {\n transform: translateY(100vh);\n opacity: 0;\n }\n`;\n\nconst burstFromEdges = keyframes`\n 0% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1);\n opacity: 1;\n }\n 100% {\n transform: translateX(0vw) translateY(0vh) scale(1.25);\n opacity: 0;\n }\n`;\n\nconst popExpand = keyframes`\n 0% {\n transform: translateX(0) translateY(0vh);\n opacity: 1;\n }\n 35% {\n transform: translateX(0) translateY(-50vh) scale(1.25);\n opacity: 1;\n }\n 60% {\n transform: translateX(var(--from-x)) translateY(var(--from-y)) scale(1.25);\n opacity: 0.75;\n }\n 100% {\n transform: translateX(var(--from-x)) translateY(-110vh) scale(1.25);\n opacity: 0;\n }\n`;\n\nexport const effectAnimations: Record<\n IStickersProps['effect'],\n (duration: number) => ReturnType<typeof css>\n> = {\n 'float-up': (duration: number) => css`\n animation: ${floatUp} ${randomizeDuration(duration)}ms ease-out forwards;\n `,\n 'fall-down': (duration: number) => css`\n animation: ${fallDown} ${randomizeDuration(duration)}ms ease-out forwards;\n `,\n 'burst-from-edges': (duration: number) => css`\n animation: ${burstFromEdges} ${randomizeDuration(duration)}ms linear forwards;\n `,\n 'pop-expand': (duration: number) => css`\n animation: ${popExpand} ${duration}ms cubic-bezier(0.5, 0.1, 0.7, 1) forwards;\n `,\n};\n"],"names":["floatUp","keyframes","fallDown","burstFromEdges","popExpand","effectAnimations","duration","css","randomizeDuration"],"mappings":";;AAMA,MAAMA,IAAUC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWVC,IAAWD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWXE,IAAiBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWjBG,IAAYH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAmBLI,IAGT;AAAA,EACF,YAAY,CAACC,MAAqBC;AAAA,iBACnBP,CAAO,IAAIQ,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAErD,aAAa,CAACA,MAAqBC;AAAA,iBACpBL,CAAQ,IAAIM,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAEtD,oBAAoB,CAACA,MAAqBC;AAAA,iBAC3BJ,CAAc,IAAIK,EAAkBF,CAAQ,CAAC;AAAA;AAAA,EAE5D,cAAc,CAACA,MAAqBC;AAAA,iBACrBH,CAAS,IAAIE,CAAQ;AAAA;AAEtC;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import $, { css as s } from "styled-components";
|
2
|
-
import { effectAnimations as n } from "./
|
2
|
+
import { effectAnimations as n } from "./effects.js";
|
3
3
|
const h = $.div`
|
4
4
|
position: relative;
|
5
5
|
width: 100vw;
|
@@ -26,4 +26,4 @@ export {
|
|
26
26
|
h as Container,
|
27
27
|
a as Sticker
|
28
28
|
};
|
29
|
-
//# sourceMappingURL=stickers-styled.js.map
|
29
|
+
//# sourceMappingURL=stickers-effects-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects-styled.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-styled.ts"],"sourcesContent":["import type { IStickersProps } from './stickers-effects-types';\n\nimport styled, { css } from 'styled-components';\n\nimport { effectAnimations } from './effects';\n\nexport const Container = styled.div`\n position: relative;\n width: 100vw;\n height: 100vh;\n background: transparent;\n pointer-events: none;\n`;\n\nexport const Sticker = styled.div<{\n effect: IStickersProps['effect'];\n duration: number;\n fromX?: string;\n fromY?: string;\n x: number;\n y: number;\n size: number;\n}>`\n position: absolute;\n z-index: 10;\n\n left: ${({ x }) => `${x}%`};\n top: ${({ y }) => `${y}%`};\n width: ${({ size }) => `${size}px`};\n height: ${({ size }) => `${size}px`};\n font-size: ${({ size }) => `${size}px`};\n\n ${({ effect, duration, fromX, fromY }) =>\n fromX && fromY\n ? css`\n ${effectAnimations[effect](duration)}\n --from-x: ${fromX};\n --from-y: ${fromY};\n `\n : effectAnimations[effect](duration)}\n`;\n"],"names":["Container","styled","Sticker","x","y","size","effect","duration","fromX","fromY","css","effectAnimations"],"mappings":";;AAMO,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQnBC,IAAUD,EAAO;AAAA;AAAA;AAAA;AAAA,UAYpB,CAAC,EAAE,GAAAE,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,SACnB,CAAC,EAAE,GAAAC,EAAQ,MAAA,GAAGA,CAAC,GAAG;AAAA,WAChB,CAAC,EAAE,MAAAC,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,YACxB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA,eACtB,CAAC,EAAE,MAAAA,EAAW,MAAA,GAAGA,CAAI,IAAI;AAAA;AAAA,IAEpC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,OAAAC,GAAO,OAAAC,QAC5BD,KAASC,IACLC;AAAA,YACIC,EAAiBL,CAAM,EAAEC,CAAQ,CAAC;AAAA,sBACxBC,CAAK;AAAA,sBACLC,CAAK;AAAA,YAEnBE,EAAiBL,CAAM,EAAEC,CAAQ,CAAC;AAAA;"}
|
@@ -40,10 +40,10 @@ function x({
|
|
40
40
|
minSize: r,
|
41
41
|
maxSize: d
|
42
42
|
}) {
|
43
|
-
const c = 100 / n * 2, M = () => Math.random() * (d - r) + r, h = [], i = ["
|
43
|
+
const c = 100 / n * 2, M = () => Math.random() * (d - r) + r, h = [], i = ["float-up", "fall-down"].includes(s) ? g(n, c) : [];
|
44
44
|
for (let o = 0; o < n; o++) {
|
45
45
|
const a = t[o % t.length] ?? "", e = M();
|
46
|
-
if (s === "
|
46
|
+
if (s === "float-up")
|
47
47
|
h.push({
|
48
48
|
id: o,
|
49
49
|
sticker: a,
|
@@ -51,7 +51,7 @@ function x({
|
|
51
51
|
y: 110 + (Math.random() - 0.5) * e,
|
52
52
|
size: e
|
53
53
|
});
|
54
|
-
else if (s === "
|
54
|
+
else if (s === "fall-down")
|
55
55
|
h.push({
|
56
56
|
id: o,
|
57
57
|
sticker: a,
|
@@ -59,10 +59,10 @@ function x({
|
|
59
59
|
y: -10 + (Math.random() - 0.5) * e,
|
60
60
|
size: e
|
61
61
|
});
|
62
|
-
else if (s === "
|
62
|
+
else if (s === "burst-from-edges") {
|
63
63
|
const { x: l, y: m, fromX: p, fromY: u } = f(o, n);
|
64
64
|
h.push({ id: o, sticker: a, x: l, y: m, fromX: p, fromY: u, size: e });
|
65
|
-
} else s === "
|
65
|
+
} else s === "pop-expand" ? h.push({
|
66
66
|
id: o,
|
67
67
|
sticker: a,
|
68
68
|
x: 50,
|
@@ -88,4 +88,4 @@ export {
|
|
88
88
|
x as generateStickerData,
|
89
89
|
v as randomizeDuration
|
90
90
|
};
|
91
|
-
//# sourceMappingURL=stickers-utils.js.map
|
91
|
+
//# sourceMappingURL=stickers-effects-utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects-utils.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects-utils.ts"],"sourcesContent":["import type { TStickerData, IStickersProps } from './stickers-effects-types';\n\nconst getBurstPosition = (\n index: number,\n total: number,\n): {\n fromX: string;\n fromY: string;\n x: number;\n y: number;\n} => {\n const countPerSide = Math.ceil(total / 4);\n const sideIndex = Math.floor(index / countPerSide);\n const pos = index % countPerSide;\n\n const sides = ['top', 'right', 'bottom', 'left'] as const;\n const side = sides[sideIndex] ?? 'left';\n\n const basePercent = ((pos + 0.5) / countPerSide) * 100;\n const jitter = (Math.random() - 0.5) * 25;\n const edgePercent = Math.min(Math.max(basePercent + jitter, 0), 100);\n\n const centerX = 45 + Math.random() * 10;\n const centerY = 45 + Math.random() * 10;\n\n let fromX = 0;\n let fromY = 0;\n\n switch (side) {\n case 'top':\n fromX = edgePercent - centerX;\n fromY = -centerY + jitter;\n break;\n case 'right':\n fromX = 100 - centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n case 'bottom':\n fromX = edgePercent - centerX;\n fromY = 100 - centerY + jitter;\n break;\n case 'left':\n fromX = -centerX + jitter;\n fromY = edgePercent - centerY;\n break;\n }\n\n return {\n fromX: `${fromX}vw`,\n fromY: `${fromY}vh`,\n x: centerX,\n y: centerY,\n };\n};\n\nconst getRandomNonOverlappingPositions = (count: number, buffer = 10): number[] => {\n const used: number[] = [];\n let attempts = 0;\n const maxAttempts = count;\n\n while (used.length < count && attempts < maxAttempts) {\n const value = Math.floor(Math.random() * (100 - 2 * buffer) + buffer);\n\n if (used.every(v => Math.abs(v - value) >= buffer)) {\n used.push(value);\n }\n attempts++;\n }\n\n while (used.length < count) {\n used.push(Math.floor(Math.random() * (100 - 2 * buffer) + buffer));\n }\n\n return used;\n};\n\nexport function generateStickerData({\n count,\n effect,\n stickers,\n minSize,\n maxSize,\n}: {\n count: number;\n effect: IStickersProps['effect'];\n stickers: string[];\n minSize: number;\n maxSize: number;\n}): TStickerData[] {\n const buffer = (100 / count) * 2;\n const getSize = () => Math.random() * (maxSize - minSize) + minSize;\n const result: TStickerData[] = [];\n const xPositions = ['float-up', 'fall-down'].includes(effect)\n ? getRandomNonOverlappingPositions(count, buffer)\n : [];\n\n for (let i = 0; i < count; i++) {\n const sticker = stickers[i % stickers.length] ?? '';\n const size = getSize();\n\n if (effect === 'float-up') {\n result.push({\n id: i,\n sticker,\n x: xPositions[i]!,\n y: 110 + (Math.random() - 0.5) * size,\n size,\n });\n } else if (effect === 'fall-down') {\n result.push({\n id: i,\n sticker,\n x: xPositions[i]!,\n y: -10 + (Math.random() - 0.5) * size,\n size,\n });\n } else if (effect === 'burst-from-edges') {\n const { x, y, fromX, fromY } = getBurstPosition(i, count);\n\n result.push({ id: i, sticker, x, y, fromX, fromY, size });\n } else if (effect === 'pop-expand') {\n result.push({\n id: i,\n sticker,\n x: 50,\n y: 100,\n fromX: `${(Math.random() - 0.5) * 27.5}vw`,\n fromY: `${-50 - Math.random() * 27.5}vh`,\n size,\n });\n } else {\n result.push({\n id: i,\n sticker,\n x: Math.random() * 100,\n y: Math.random() * 100,\n size,\n });\n }\n }\n\n return result;\n}\n\nexport const randomizeDuration = (base: number, variancePercent = 0.2): number => {\n const delta = base * variancePercent;\n const min = base - delta;\n const max = base + delta;\n\n return Math.floor(Math.random() * (max - min + 1)) + min;\n};\n"],"names":["getBurstPosition","index","total","countPerSide","sideIndex","pos","side","basePercent","jitter","edgePercent","centerX","centerY","fromX","fromY","getRandomNonOverlappingPositions","count","buffer","used","attempts","maxAttempts","value","v","generateStickerData","effect","stickers","minSize","maxSize","getSize","result","xPositions","i","sticker","size","x","y","randomizeDuration","base","variancePercent","delta","min","max"],"mappings":"AAEA,MAAMA,IAAmB,CACvBC,GACAC,MAMG;AACH,QAAMC,IAAe,KAAK,KAAKD,IAA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EAAO,KAAK;AAAA,MACV,IAAIE;AAAA,MACJ,SAAAC;AAAA,MACA,GAAG;AAAA,MACH,GAAG;AAAA,MACH,OAAO,IAAI,KAAK,OAAO,IAAI,OAAO,IAAI;AAAA,MACtC,OAAO,GAAG,MAAM,KAAK,WAAW,IAAI;AAAA,MACpC,MAAAC;AAAA,IAAA,CACD,IAEDJ,EAAO,KAAK;AAAA,MACV,IAAIE;AAAA,MACJ,SAAAC;AAAA,MACA,GAAG,KAAK,OAAA,IAAW;AAAA,MACnB,GAAG,KAAK,OAAA,IAAW;AAAA,MACnB,MAAAC;AAAA,IAAA,CACD;AAAA,EAEL;AAEO,SAAAJ;AACT;AAEO,MAAMO,IAAoB,CAACC,GAAcC,IAAkB,QAAgB;AAChF,QAAMC,IAAQF,IAAOC,GACfE,IAAMH,IAAOE,GACbE,IAAMJ,IAAOE;AAEZ,SAAA,KAAK,MAAM,KAAK,OAAA,KAAYE,IAAMD,IAAM,EAAE,IAAIA;AACvD;"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { jsx as c } from "react/jsx-runtime";
|
2
|
+
import { memo as l, useState as x, useEffect as D } from "react";
|
3
|
+
import { Container as z, Sticker as E } from "./stickers-effects-styled.js";
|
4
|
+
import { generateStickerData as d } from "./stickers-effects-utils.js";
|
5
|
+
const h = ({ stickers: i, effect: t, count: o, duration: e }) => {
|
6
|
+
const [a, m] = x([]);
|
7
|
+
return D(() => {
|
8
|
+
const r = d({
|
9
|
+
count: o,
|
10
|
+
effect: t,
|
11
|
+
stickers: i,
|
12
|
+
minSize: 32,
|
13
|
+
maxSize: 48
|
14
|
+
});
|
15
|
+
m(r);
|
16
|
+
const s = setTimeout(() => m([]), e);
|
17
|
+
return () => clearTimeout(s);
|
18
|
+
}, [i, t, o, e]), /* @__PURE__ */ c(z, { children: a.map((r) => {
|
19
|
+
const { id: s, sticker: n, x: f, y: k, size: S, fromX: p, fromY: u } = r;
|
20
|
+
return /* @__PURE__ */ c(
|
21
|
+
E,
|
22
|
+
{
|
23
|
+
effect: t,
|
24
|
+
duration: e,
|
25
|
+
fromX: p,
|
26
|
+
fromY: u,
|
27
|
+
x: f,
|
28
|
+
y: k,
|
29
|
+
size: S,
|
30
|
+
children: n
|
31
|
+
},
|
32
|
+
s
|
33
|
+
);
|
34
|
+
}) });
|
35
|
+
}, C = l(h);
|
36
|
+
export {
|
37
|
+
C as default
|
38
|
+
};
|
39
|
+
//# sourceMappingURL=stickers-effects.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stickers-effects.js","sources":["../../../../src/features/stickers/stickers-effects/stickers-effects.tsx"],"sourcesContent":["import type { TStickerData, IStickersProps } from './stickers-effects-types';\n\nimport React, { memo, useEffect, useState } from 'react';\n\nimport * as S from './stickers-effects-styled';\nimport { generateStickerData } from './stickers-effects-utils';\n\nconst StickersEffects: React.FC<IStickersProps> = ({ stickers, effect, count, duration }) => {\n const [stickersData, setStickersData] = useState<ReturnType<typeof generateStickerData>>([]);\n\n useEffect(() => {\n const stickerData = generateStickerData({\n count,\n effect,\n stickers,\n minSize: 32,\n maxSize: 48,\n });\n\n setStickersData(stickerData);\n\n const timeout = setTimeout(() => setStickersData([]), duration);\n\n return () => clearTimeout(timeout);\n }, [stickers, effect, count, duration]);\n\n return (\n <S.Container>\n {stickersData.map((data: TStickerData) => {\n const { id, sticker, x, y, size, fromX, fromY } = data;\n\n return (\n <S.Sticker\n key={id}\n effect={effect}\n duration={duration}\n fromX={fromX}\n fromY={fromY}\n x={x}\n y={y}\n size={size}\n >\n {sticker}\n </S.Sticker>\n );\n })}\n </S.Container>\n );\n};\n\nexport default memo(StickersEffects);\n"],"names":["StickersEffects","stickers","effect","count","duration","stickersData","setStickersData","useState","useEffect","stickerData","generateStickerData","timeout","S.Container","data","id","sticker","x","y","size","fromX","fromY","jsx","S.Sticker","stickersEffects","memo"],"mappings":";;;;AAOA,MAAMA,IAA4C,CAAC,EAAE,UAAAC,GAAU,QAAAC,GAAQ,OAAAC,GAAO,UAAAC,QAAe;AAC3F,QAAM,CAACC,GAAcC,CAAe,IAAIC,EAAiD,CAAE,CAAA;AAE3F,SAAAC,EAAU,MAAM;AACd,UAAMC,IAAcC,EAAoB;AAAA,MACtC,OAAAP;AAAA,MACA,QAAAD;AAAA,MACA,UAAAD;AAAA,MACA,SAAS;AAAA,MACT,SAAS;AAAA,IAAA,CACV;AAED,IAAAK,EAAgBG,CAAW;AAE3B,UAAME,IAAU,WAAW,MAAML,EAAgB,CAAE,CAAA,GAAGF,CAAQ;AAEvD,WAAA,MAAM,aAAaO,CAAO;AAAA,KAChC,CAACV,GAAUC,GAAQC,GAAOC,CAAQ,CAAC,qBAGnCQ,GAAA,EACE,UAAaP,EAAA,IAAI,CAACQ,MAAuB;AAClC,UAAA,EAAE,IAAAC,GAAI,SAAAC,GAAS,GAAAC,GAAG,GAAAC,GAAG,MAAAC,GAAM,OAAAC,GAAO,OAAAC,EAAU,IAAAP;AAGhD,WAAA,gBAAAQ;AAAA,MAACC;AAAAA,MAAA;AAAA,QAEC,QAAApB;AAAA,QACA,UAAAE;AAAA,QACA,OAAAe;AAAA,QACA,OAAAC;AAAA,QACA,GAAAJ;AAAA,QACA,GAAAC;AAAA,QACA,MAAAC;AAAA,QAEC,UAAAH;AAAA,MAAA;AAAA,MATID;AAAA,IAAA;AAAA,EAYV,CAAA,EACH,CAAA;AAEJ,GAEeS,IAAAC,EAAKxB,CAAe;"}
|
@@ -11,7 +11,7 @@ import { useGetStudentProfileSummary as X } from "../../api/student-profile-summ
|
|
11
11
|
import { useTrialSessionContext as M } from "../../context/use-trial-session-context.js";
|
12
12
|
import O from "../slide-header/index.js";
|
13
13
|
import { Container as k, ContentWrapper as B, AbsoluteImage as H, ImageWrapper as R } from "./student-profile-styled.js";
|
14
|
-
import {
|
14
|
+
import { getMilestoneGoalName as P, getDummyProfileImage as W } from "./student-profile-utils.js";
|
15
15
|
const re = b(() => {
|
16
16
|
const { isTeacher: t, studentId: l, formData: $, updateSlideConfig: d, updateButtonState: f } = M(), { name: y, goals: r, studentProfile: o } = $ || {}, { dummyProfileImageIndex: I, profileSummary: x } = o || {}, C = W(I), m = A(() => r && r.length > 0 ? {
|
17
17
|
school_success_goal: P(r, g.SCHOOL_SUCCESS),
|
@@ -1,13 +1,56 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
|
1
|
+
import o from "styled-components";
|
2
|
+
import e from "../../../ui/image/image.js";
|
3
|
+
import t from "../../../ui/layout/flex-view.js";
|
4
|
+
const l = o.div`
|
4
5
|
width: 100%;
|
5
6
|
height: 100%;
|
6
|
-
`,
|
7
|
+
`, c = o(t)`
|
7
8
|
margin: auto;
|
8
|
-
|
9
|
+
`, h = o(e)`
|
10
|
+
object-fit: cover;
|
11
|
+
`, s = o.div(
|
12
|
+
({ theme: r }) => `
|
13
|
+
flex: 1;
|
14
|
+
display: grid;
|
15
|
+
border-left: 1px solid ${r.colors.BLACK_T_87};
|
16
|
+
grid-template-columns: repeat(2, 1fr);
|
17
|
+
grid-template-rows: auto auto auto;
|
18
|
+
`
|
19
|
+
), p = o(t)(
|
20
|
+
({ theme: r }) => `
|
21
|
+
border: 0.5px solid ${r.colors.WHITE_5};
|
22
|
+
&:first-child,
|
23
|
+
&:nth-child(2) {
|
24
|
+
grid-column: span 1;
|
25
|
+
}
|
26
|
+
&:nth-child(3),
|
27
|
+
&:nth-child(4) {
|
28
|
+
grid-column: span 2;
|
29
|
+
}
|
30
|
+
&:first-child {
|
31
|
+
border-left: none;
|
32
|
+
border-top: none;
|
33
|
+
}
|
34
|
+
&:nth-child(2) {
|
35
|
+
border-right: none;
|
36
|
+
border-top: none;
|
37
|
+
}
|
38
|
+
&:nth-child(3) {
|
39
|
+
border-left: none;
|
40
|
+
border-right: none;
|
41
|
+
}
|
42
|
+
&:nth-child(4) {
|
43
|
+
border-left: none;
|
44
|
+
border-right: none;
|
45
|
+
border-bottom: none;
|
46
|
+
}
|
47
|
+
`
|
48
|
+
);
|
9
49
|
export {
|
10
|
-
|
11
|
-
|
50
|
+
l as Container,
|
51
|
+
c as ContentWrapper,
|
52
|
+
s as GridContainer,
|
53
|
+
p as GridItem,
|
54
|
+
h as ProfilePicture
|
12
55
|
};
|
13
56
|
//# sourceMappingURL=teacher-intro-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-intro-styled.js","sources":["../../../../../src/features/trial-session/comps/teacher-intro/teacher-intro-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n`;\n\nconst ContentWrapper = styled(FlexView)`\n margin: auto;\n`;\n\nexport { Container, ContentWrapper };\n"],"names":["Container","styled","ContentWrapper","FlexView"],"mappings":"
|
1
|
+
{"version":3,"file":"teacher-intro-styled.js","sources":["../../../../../src/features/trial-session/comps/teacher-intro/teacher-intro-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n`;\n\nconst ContentWrapper = styled(FlexView)`\n margin: auto;\n`;\n\nconst ProfilePicture = styled(Image)`\n object-fit: cover;\n`;\n\nconst GridContainer = styled.div(\n ({ theme }) => `\n flex: 1;\n display: grid;\n border-left: 1px solid ${theme.colors.BLACK_T_87};\n grid-template-columns: repeat(2, 1fr);\n grid-template-rows: auto auto auto;\n`,\n);\n\nconst GridItem = styled(FlexView)(\n ({ theme }) => `\n border: 0.5px solid ${theme.colors.WHITE_5};\n &:first-child,\n &:nth-child(2) {\n grid-column: span 1;\n }\n &:nth-child(3),\n &:nth-child(4) {\n grid-column: span 2;\n }\n &:first-child {\n border-left: none;\n border-top: none;\n }\n &:nth-child(2) {\n border-right: none;\n border-top: none;\n }\n &:nth-child(3) {\n border-left: none;\n border-right: none;\n }\n &:nth-child(4) {\n border-left: none;\n border-right: none;\n border-bottom: none;\n }\n`,\n);\n\nexport { Container, ContentWrapper, ProfilePicture, GridContainer, GridItem };\n"],"names":["Container","styled","ContentWrapper","FlexView","ProfilePicture","Image","GridContainer","theme","GridItem"],"mappings":";;;AAKA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA,GAKnBC,IAAiBD,EAAOE,CAAQ;AAAA;AAAA,GAIhCC,IAAiBH,EAAOI,CAAK;AAAA;AAAA,GAI7BC,IAAgBL,EAAO;AAAA,EAC3B,CAAC,EAAE,OAAAM,EAAA,MAAY;AAAA;AAAA;AAAA,2BAGUA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAIlD,GAEMC,IAAWP,EAAOE,CAAQ;AAAA,EAC9B,CAAC,EAAE,OAAAI,EAAA,MAAY;AAAA,wBACOA,EAAM,OAAO,OAAO;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;AA2B5C;"}
|
@@ -1,20 +1,74 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import {
|
8
|
-
import
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
2
|
+
import { memo as T, useMemo as I } from "react";
|
3
|
+
import j from "../../../ui/image/image.js";
|
4
|
+
import h from "../../../ui/layout/flex-view.js";
|
5
|
+
import s from "../../../ui/separator/separator.js";
|
6
|
+
import t from "../../../ui/text/text.js";
|
7
|
+
import { useTrialSessionContext as k } from "../../context/use-trial-session-context.js";
|
8
|
+
import O from "../communication-slide/index.js";
|
9
|
+
import F from "../slide-header/index.js";
|
10
|
+
import { COUNTRY_FLAGS as H } from "./teacher-intro-constants.js";
|
11
|
+
import { Container as L, ContentWrapper as D, ProfilePicture as E, GridContainer as P, GridItem as i } from "./teacher-intro-styled.js";
|
12
|
+
const z = T(() => {
|
13
|
+
const { slideConfig: f } = k(), { renderAVIn: m, teacher_profile: u } = f || {}, {
|
14
|
+
degree: g,
|
15
|
+
countries: o,
|
16
|
+
lower_grade: a,
|
17
|
+
higher_grade: n,
|
18
|
+
header_image: $,
|
19
|
+
years_of_experience: p,
|
20
|
+
number_of_students_taught: b
|
21
|
+
} = u || {}, { degree_name: c, field_of_study: d } = g || {}, _ = Object.values(H), l = n && parseInt(n, 10) > 8, x = I(() => l ? "High School" : ` ${a === "K" ? "" : "G"}${a} - G${n}`, [l, n, a]);
|
22
|
+
return m === "right" ? /* @__PURE__ */ e(O, {}) : /* @__PURE__ */ r(L, { children: [
|
23
|
+
/* @__PURE__ */ e(s, { height: 60 }),
|
24
|
+
/* @__PURE__ */ e(F, {}),
|
25
|
+
/* @__PURE__ */ r(
|
26
|
+
D,
|
27
|
+
{
|
28
|
+
$flexDirection: "row",
|
29
|
+
$width: 750,
|
30
|
+
$borderColor: "BLACK_T_87",
|
31
|
+
$background: "WHITE_3",
|
32
|
+
children: [
|
33
|
+
/* @__PURE__ */ e(E, { withLoader: !0, src: $, width: 350, height: 350 }),
|
34
|
+
/* @__PURE__ */ r(P, { children: [
|
35
|
+
/* @__PURE__ */ r(i, { $justifyContent: "center", $gutter: 24, children: [
|
36
|
+
/* @__PURE__ */ e(t, { $renderAs: "ah3-black", children: p }),
|
37
|
+
/* @__PURE__ */ e(t, { $renderAs: "ub3", children: "Yrs of Teaching Experience" })
|
38
|
+
] }),
|
39
|
+
/* @__PURE__ */ r(i, { $justifyContent: "center", $gutter: 24, children: [
|
40
|
+
/* @__PURE__ */ e(t, { $renderAs: "ah3-black", children: b }),
|
41
|
+
/* @__PURE__ */ e(t, { $renderAs: "ub3", children: "Students Taught" })
|
42
|
+
] }),
|
43
|
+
c && d && /* @__PURE__ */ r(i, { $justifyContent: "center", $gutter: 24, children: [
|
44
|
+
/* @__PURE__ */ e(t, { $renderAs: "ab1-black", children: c }),
|
45
|
+
/* @__PURE__ */ r(t, { $renderAs: "ub3", children: [
|
46
|
+
"In ",
|
47
|
+
d
|
48
|
+
] })
|
49
|
+
] }),
|
50
|
+
/* @__PURE__ */ r(i, { $justifyContent: "center", $gutter: 24, children: [
|
51
|
+
/* @__PURE__ */ r(t, { $renderAs: "ab1-black", children: [
|
52
|
+
"Teaching ",
|
53
|
+
x,
|
54
|
+
" kids in"
|
55
|
+
] }),
|
56
|
+
/* @__PURE__ */ e(s, { height: 12 }),
|
57
|
+
/* @__PURE__ */ e(h, { $flexDirection: "row", $flexGap: 16, $flexWrap: !0, children: o && o.length > 0 && o.map((C) => {
|
58
|
+
const y = _.find((S) => S.name === C), { flag_icon: A = "", label: w, name: G } = y || {};
|
59
|
+
return /* @__PURE__ */ r(h, { $flexDirection: "row", $flexGap: 4, children: [
|
60
|
+
/* @__PURE__ */ e(j, { src: A, width: 30, height: 20, withLoader: !1 }),
|
61
|
+
/* @__PURE__ */ e(t, { $renderAs: "ab3-black", children: w })
|
62
|
+
] }, G);
|
63
|
+
}) })
|
64
|
+
] })
|
65
|
+
] })
|
66
|
+
]
|
67
|
+
}
|
68
|
+
)
|
15
69
|
] });
|
16
70
|
});
|
17
71
|
export {
|
18
|
-
|
72
|
+
z as default
|
19
73
|
};
|
20
74
|
//# sourceMappingURL=teacher-intro.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-intro.js","sources":["../../../../../src/features/trial-session/comps/teacher-intro/teacher-intro.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport Separator from '../../../ui/separator/separator';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport CommunicationSlide from '../communication-slide';\nimport SlideHeader from '../slide-header';\nimport
|
1
|
+
{"version":3,"file":"teacher-intro.js","sources":["../../../../../src/features/trial-session/comps/teacher-intro/teacher-intro.tsx"],"sourcesContent":["import { memo, useMemo } from 'react';\n\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport CommunicationSlide from '../communication-slide';\nimport SlideHeader from '../slide-header';\nimport { COUNTRY_FLAGS } from './teacher-intro-constants';\nimport * as Styled from './teacher-intro-styled';\n\nconst TeacherIntro = memo(() => {\n const { slideConfig } = useTrialSessionContext();\n const { renderAVIn, teacher_profile: teacherProfile } = slideConfig || {};\n\n const {\n degree,\n countries,\n lower_grade: lowerGrade,\n higher_grade: higherGrade,\n header_image: headerImage,\n years_of_experience: yearsOfExperience,\n number_of_students_taught: numberOfStudentsTaught,\n } = teacherProfile || {};\n const { degree_name: degreeName, field_of_study: fieldOfStudy } = degree || {};\n\n const countryFlagArray = Object.values(COUNTRY_FLAGS);\n const isHighSchool = higherGrade && parseInt(higherGrade, 10) > 8;\n\n const displayGrade = useMemo(() => {\n return isHighSchool\n ? 'High School'\n : ` ${lowerGrade === 'K' ? '' : 'G'}${lowerGrade} - G${higherGrade}`;\n }, [isHighSchool, higherGrade, lowerGrade]);\n\n if (renderAVIn === 'right') return <CommunicationSlide />;\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper\n $flexDirection=\"row\"\n $width={750}\n $borderColor=\"BLACK_T_87\"\n $background=\"WHITE_3\"\n >\n <Styled.ProfilePicture withLoader src={headerImage} width={350} height={350} />\n <Styled.GridContainer>\n <Styled.GridItem $justifyContent=\"center\" $gutter={24}>\n <Text $renderAs=\"ah3-black\">{yearsOfExperience}</Text>\n <Text $renderAs=\"ub3\">Yrs of Teaching Experience</Text>\n </Styled.GridItem>\n <Styled.GridItem $justifyContent=\"center\" $gutter={24}>\n <Text $renderAs=\"ah3-black\">{numberOfStudentsTaught}</Text>\n <Text $renderAs=\"ub3\">Students Taught</Text>\n </Styled.GridItem>\n {degreeName && fieldOfStudy && (\n <Styled.GridItem $justifyContent=\"center\" $gutter={24}>\n <Text $renderAs=\"ab1-black\">{degreeName}</Text>\n <Text $renderAs=\"ub3\">In {fieldOfStudy}</Text>\n </Styled.GridItem>\n )}\n <Styled.GridItem $justifyContent=\"center\" $gutter={24}>\n <Text $renderAs=\"ab1-black\">Teaching {displayGrade} kids in</Text>\n <Separator height={12} />\n <FlexView $flexDirection=\"row\" $flexGap={16} $flexWrap>\n {countries &&\n countries.length > 0 &&\n countries.map(country => {\n const countryFlag = countryFlagArray.find(item => item.name === country);\n const { flag_icon: flagIcon = '', label, name } = countryFlag || {};\n\n return (\n <FlexView key={name} $flexDirection=\"row\" $flexGap={4}>\n <Image src={flagIcon} width={30} height={20} withLoader={false} />\n <Text $renderAs=\"ab3-black\">{label}</Text>\n </FlexView>\n );\n })}\n </FlexView>\n </Styled.GridItem>\n </Styled.GridContainer>\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n});\n\nexport default TeacherIntro;\n"],"names":["TeacherIntro","memo","slideConfig","useTrialSessionContext","renderAVIn","teacherProfile","degree","countries","lowerGrade","higherGrade","headerImage","yearsOfExperience","numberOfStudentsTaught","degreeName","fieldOfStudy","countryFlagArray","COUNTRY_FLAGS","isHighSchool","displayGrade","useMemo","jsx","CommunicationSlide","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","Styled.ProfilePicture","Styled.GridContainer","Styled.GridItem","Text","FlexView","country","countryFlag","item","flagIcon","label","name","Image"],"mappings":";;;;;;;;;;;AAYM,MAAAA,IAAeC,EAAK,MAAM;AACxB,QAAA,EAAE,aAAAC,MAAgBC,KAClB,EAAE,YAAAC,GAAY,iBAAiBC,EAAe,IAAIH,KAAe,CAAA,GAEjE;AAAA,IACJ,QAAAI;AAAA,IACA,WAAAC;AAAA,IACA,aAAaC;AAAA,IACb,cAAcC;AAAA,IACd,cAAcC;AAAA,IACd,qBAAqBC;AAAA,IACrB,2BAA2BC;AAAA,EAAA,IACzBP,KAAkB,CAAA,GAChB,EAAE,aAAaQ,GAAY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10
|
-
|
11
|
-
|
1
|
+
import w from "styled-components";
|
2
|
+
import y from "../layout/flex-view.js";
|
3
|
+
import { arrowPosition as T, tooltipPosition as k, animateToolTip as m } from "./arrow-tooltip-util.js";
|
4
|
+
const P = w(y)(({
|
5
|
+
theme: o,
|
6
|
+
$arrowColor: r,
|
7
|
+
$arrowSize: t,
|
8
|
+
$arrowXCoOrdinates: c,
|
9
|
+
$arrowYCoOrdinates: d,
|
10
|
+
$borderColor: p,
|
11
|
+
$isAnimated: x,
|
12
|
+
$position: n,
|
13
|
+
$renderAs: s,
|
14
|
+
$tooltipCoOrdinates: e,
|
15
|
+
$tooltipOffset: f,
|
16
|
+
$tooltipXCoOrdinates: g,
|
17
|
+
$tooltipYCoOrdinates: u,
|
18
|
+
$zIndex: C,
|
19
|
+
$backgroundColor: O
|
20
|
+
}) => {
|
21
|
+
const { gutter: l } = o.layout, { REAL_BLACK_15: $ } = o.colors, { tooltipVariants: a } = o.arrowTooltip;
|
22
|
+
let { backgroundColorName: i } = a[s];
|
23
|
+
const { textColorName: b } = a[s];
|
24
|
+
return i = O || i, `
|
25
|
+
position: fixed;
|
26
|
+
z-index: ${C || 1};
|
27
|
+
padding: ${l * 0.25}px ${l * 0.5}px;
|
28
|
+
color: ${b};
|
29
|
+
box-shadow: 0px 2px 15px 0px ${$};
|
30
|
+
background-color: ${o.colors[i]};
|
31
|
+
border: 1px solid ${p ? o.colors[p] : "transparent"};
|
32
|
+
|
33
|
+
&::after {
|
34
|
+
content: '';
|
35
|
+
position: absolute;
|
36
|
+
height: ${t}px;
|
37
|
+
width: ${t}px;
|
38
|
+
clip-path: polygon(0% 0%, 100% 100%, 0% 100%);
|
39
|
+
background-color: ${r ? o.colors[r] : o.colors[i]};
|
40
|
+
${T({
|
41
|
+
position: n,
|
42
|
+
arrowXCoOrdinates: c,
|
43
|
+
arrowYCoOrdinates: d,
|
44
|
+
arrowSize: t
|
45
|
+
})};
|
46
|
+
}
|
47
|
+
|
48
|
+
${k({
|
49
|
+
position: n,
|
50
|
+
arrowSize: t,
|
51
|
+
tooltipCoOrdinates: e,
|
52
|
+
tooltipOffset: f,
|
53
|
+
tooltipXCoOrdinates: g,
|
54
|
+
tooltipYCoOrdinates: u
|
55
|
+
})};
|
56
|
+
|
57
|
+
${m(x)};
|
58
|
+
`;
|
59
|
+
});
|
12
60
|
export {
|
13
|
-
|
61
|
+
P as TooltipBody
|
14
62
|
};
|
15
63
|
//# sourceMappingURL=arrow-tooltip-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"arrow-tooltip-styled.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\
|
1
|
+
{"version":3,"file":"arrow-tooltip-styled.js","sources":["../../../../src/features/ui/arrow-tooltip/arrow-tooltip-styled.tsx"],"sourcesContent":["import type { TArrowTooltipVariants, TColorNames } from '../types';\nimport type { TPositionProps, TTooltipCoOrdinatesProps } from './arrow-tooltip-types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../layout/flex-view';\nimport { animateToolTip, arrowPosition, tooltipPosition } from './arrow-tooltip-util';\n\ninterface ITooltipBodyProps {\n $arrowSize: number;\n $arrowColor?: TColorNames;\n $arrowXCoOrdinates?: number;\n $arrowYCoOrdinates?: number;\n $backgroundColor?: TColorNames;\n $borderColor?: TColorNames;\n $position: TPositionProps;\n $renderAs: TArrowTooltipVariants;\n $tooltipCoOrdinates: TTooltipCoOrdinatesProps | null;\n $tooltipOffset?: number;\n $tooltipXCoOrdinates?: number | string;\n $tooltipYCoOrdinates?: number | string;\n $zIndex?: number;\n $isAnimated?: boolean;\n}\n\nconst TooltipBody = styled(FlexView)<ITooltipBodyProps>(({\n theme,\n $arrowColor,\n $arrowSize,\n $arrowXCoOrdinates,\n $arrowYCoOrdinates,\n $borderColor,\n $isAnimated,\n $position,\n $renderAs,\n $tooltipCoOrdinates,\n $tooltipOffset,\n $tooltipXCoOrdinates,\n $tooltipYCoOrdinates,\n $zIndex,\n $backgroundColor,\n}) => {\n const { gutter } = theme.layout;\n const { REAL_BLACK_15 } = theme.colors;\n const { tooltipVariants } = theme.arrowTooltip;\n let { backgroundColorName } = tooltipVariants[$renderAs];\n const { textColorName } = tooltipVariants[$renderAs];\n\n backgroundColorName = $backgroundColor || backgroundColorName;\n\n return `\n position: fixed;\n z-index: ${$zIndex || 1};\n padding: ${gutter * 0.25}px ${gutter * 0.5}px;\n color: ${textColorName};\n box-shadow: 0px 2px 15px 0px ${REAL_BLACK_15};\n background-color: ${theme.colors[backgroundColorName]};\n border: 1px solid ${$borderColor ? theme.colors[$borderColor] : 'transparent'};\n\n &::after {\n content: '';\n position: absolute;\n height: ${$arrowSize}px;\n width: ${$arrowSize}px;\n clip-path: polygon(0% 0%, 100% 100%, 0% 100%);\n background-color: ${\n $arrowColor ? theme.colors[$arrowColor] : theme.colors[backgroundColorName]\n };\n ${arrowPosition({\n position: $position,\n arrowXCoOrdinates: $arrowXCoOrdinates,\n arrowYCoOrdinates: $arrowYCoOrdinates,\n arrowSize: $arrowSize,\n })};\n }\n\n ${tooltipPosition({\n position: $position,\n arrowSize: $arrowSize,\n tooltipCoOrdinates: $tooltipCoOrdinates,\n tooltipOffset: $tooltipOffset,\n tooltipXCoOrdinates: $tooltipXCoOrdinates,\n tooltipYCoOrdinates: $tooltipYCoOrdinates,\n })};\n\n ${animateToolTip($isAnimated)};\n `;\n});\n\nexport { TooltipBody };\n"],"names":["TooltipBody","styled","FlexView","theme","$arrowColor","$arrowSize","$arrowXCoOrdinates","$arrowYCoOrdinates","$borderColor","$isAnimated","$position","$renderAs","$tooltipCoOrdinates","$tooltipOffset","$tooltipXCoOrdinates","$tooltipYCoOrdinates","$zIndex","$backgroundColor","gutter","REAL_BLACK_15","tooltipVariants","backgroundColorName","textColorName","arrowPosition","tooltipPosition","animateToolTip"],"mappings":";;;AAyBA,MAAMA,IAAcC,EAAOC,CAAQ,EAAqB,CAAC;AAAA,EACvD,OAAAC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