@cuemath/leap 3.3.24-link.2 → 3.3.24
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/features/auth/account-selector/account-selector-styled.js +5 -6
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +57 -51
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list-styled.js +2 -3
- package/dist/features/auth/comps/user-list/user-list-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +3 -9
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +8 -8
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/journey/use-journey/use-journey.js +6 -18
- package/dist/features/journey/use-journey/use-journey.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +7 -13
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +34 -40
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +138 -161
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/stickers/constants.js +235 -0
- package/dist/features/stickers/constants.js.map +1 -0
- package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/comps/sticker/sticker-styled.js} +15 -45
- package/dist/features/stickers/sticker-selector/comps/sticker/sticker-styled.js.map +1 -0
- package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js +49 -0
- package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js.map +1 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid-styled.js +28 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid-styled.js.map +1 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js +26 -0
- package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector-styled.js +13 -0
- package/dist/features/stickers/sticker-selector/sticker-selector-styled.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +86 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-animations.js +82 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-animations.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-cache.js +19 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-cache.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +105 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +37 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +67 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
- package/dist/features/trial-session/comps/class-preference/class-preference.js +49 -61
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +0 -5
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +51 -96
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +63 -70
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/helper.js +54 -71
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +130 -149
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +98 -107
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +88 -75
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +55 -46
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +48 -15
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +46 -38
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/index.d.ts +71 -66
- package/dist/index.js +391 -401
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
- package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js +0 -31
- package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js.map +0 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +0 -9
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -96
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -80
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -59
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -93
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -63
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -65
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-constants.js +0 -6
- package/dist/features/student-username/add/add-student-username-constants.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-helpers.js +0 -6
- package/dist/features/student-username/add/add-student-username-helpers.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-styled.js +0 -10
- package/dist/features/student-username/add/add-student-username-styled.js.map +0 -1
- package/dist/features/student-username/add/add-student-username.js +0 -78
- package/dist/features/student-username/add/add-student-username.js.map +0 -1
- package/dist/features/student-username/add/api/update-username.js +0 -9
- package/dist/features/student-username/add/api/update-username.js.map +0 -1
- package/dist/features/student-username/add/api/username-availability.js +0 -10
- package/dist/features/student-username/add/api/username-availability.js.map +0 -1
- package/dist/features/student-username/add/hooks/use-check-username-availability.js +0 -41
- package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +0 -1
- package/dist/features/trial-session/api/teacher-availability.js +0 -9
- package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
- package/dist/features/trial-session/comps/class-preference/helpers.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 +0 -64
- package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
- package/dist/features/ui/stickers/stickers-styled.js +0 -29
- package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
- package/dist/features/ui/stickers/stickers-utils.js +0 -91
- 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
|
@@ -1,75 +1,84 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { memo as
|
|
1
|
+
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
+
import w from "lottie-web";
|
|
3
|
+
import { memo as E, forwardRef as b, useRef as m, useImperativeHandle as I, useEffect as S } from "react";
|
|
4
4
|
import $ from "../layout/flex-view.js";
|
|
5
5
|
import { fetchLottie as x } from "./helper.js";
|
|
6
|
-
const O =
|
|
6
|
+
const O = b((L, h) => {
|
|
7
7
|
const {
|
|
8
|
-
src:
|
|
9
|
-
width:
|
|
8
|
+
src: l,
|
|
9
|
+
width: g = "100%",
|
|
10
10
|
height: y = "100%",
|
|
11
|
-
settings:
|
|
12
|
-
eventListener:
|
|
13
|
-
onRender:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
settings: f,
|
|
12
|
+
eventListener: o,
|
|
13
|
+
onRender: a,
|
|
14
|
+
onError: i,
|
|
15
|
+
animateOnIntersect: s
|
|
16
|
+
} = L, c = m(null), r = m(null), u = m(null);
|
|
17
|
+
return I(
|
|
18
|
+
h,
|
|
18
19
|
() => ({
|
|
19
|
-
playSegments: (
|
|
20
|
-
var
|
|
21
|
-
return (
|
|
20
|
+
playSegments: (t, n) => {
|
|
21
|
+
var e;
|
|
22
|
+
return (e = r.current) == null ? void 0 : e.playSegments(t, n);
|
|
22
23
|
},
|
|
23
|
-
addEventListener: (
|
|
24
|
-
var
|
|
25
|
-
return (
|
|
24
|
+
addEventListener: (t, n) => {
|
|
25
|
+
var e;
|
|
26
|
+
return (e = r.current) == null ? void 0 : e.addEventListener(t, n);
|
|
26
27
|
},
|
|
27
|
-
removeEventListener: (
|
|
28
|
-
var
|
|
29
|
-
return (
|
|
28
|
+
removeEventListener: (t, n) => {
|
|
29
|
+
var e;
|
|
30
|
+
return (e = r.current) == null ? void 0 : e.removeEventListener(t, n);
|
|
30
31
|
},
|
|
31
32
|
play: () => {
|
|
32
|
-
var
|
|
33
|
-
return (
|
|
33
|
+
var t;
|
|
34
|
+
return (t = r.current) == null ? void 0 : t.play();
|
|
34
35
|
},
|
|
35
36
|
stop: () => {
|
|
36
|
-
var
|
|
37
|
-
return (
|
|
37
|
+
var t;
|
|
38
|
+
return (t = r.current) == null ? void 0 : t.stop();
|
|
39
|
+
},
|
|
40
|
+
setLoop: (t) => {
|
|
41
|
+
r.current && (r.current.loop = t);
|
|
38
42
|
},
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
goToAndStop: (t, n) => {
|
|
44
|
+
var e;
|
|
45
|
+
return (e = r.current) == null ? void 0 : e.goToAndStop(t, n);
|
|
41
46
|
}
|
|
42
47
|
}),
|
|
43
48
|
[]
|
|
44
|
-
),
|
|
45
|
-
let
|
|
49
|
+
), S(() => {
|
|
50
|
+
let t = !1;
|
|
46
51
|
return (async () => {
|
|
47
52
|
try {
|
|
48
|
-
const
|
|
53
|
+
const e = await x(l);
|
|
54
|
+
if (!e) {
|
|
55
|
+
i == null || i();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
49
58
|
requestAnimationFrame(() => {
|
|
50
|
-
!
|
|
51
|
-
container:
|
|
52
|
-
animationData:
|
|
59
|
+
!c.current || t || (r.current = w.loadAnimation({
|
|
60
|
+
container: c.current,
|
|
61
|
+
animationData: e,
|
|
53
62
|
loop: !0,
|
|
54
63
|
autoplay: !0,
|
|
55
|
-
...
|
|
56
|
-
}),
|
|
57
|
-
([
|
|
58
|
-
var
|
|
59
|
-
|
|
64
|
+
...f
|
|
65
|
+
}), s && (u.current = new IntersectionObserver(
|
|
66
|
+
([d]) => {
|
|
67
|
+
var p, v;
|
|
68
|
+
d && d.isIntersecting ? (p = r.current) == null || p.play() : (v = r.current) == null || v.pause();
|
|
60
69
|
},
|
|
61
70
|
{ threshold: 0 }
|
|
62
|
-
),
|
|
71
|
+
), u.current.observe(c.current)), a == null || a(), o && r.current.addEventListener(o.name, o.callback));
|
|
63
72
|
});
|
|
64
|
-
} catch (
|
|
65
|
-
throw Error(`Error loading Lottie animation: ${
|
|
73
|
+
} catch (e) {
|
|
74
|
+
throw i == null || i(), Error(`Error loading Lottie animation: ${e}`);
|
|
66
75
|
}
|
|
67
76
|
})(), () => {
|
|
68
|
-
var
|
|
69
|
-
|
|
77
|
+
var e;
|
|
78
|
+
t = !0, r.current && (o && r.current.removeEventListener(o.name, o.callback), s && ((e = u.current) == null || e.disconnect()), r.current.destroy());
|
|
70
79
|
};
|
|
71
|
-
}, [
|
|
72
|
-
}), D =
|
|
80
|
+
}, [l, o, a, s, f, i]), /* @__PURE__ */ A($, { ref: c, $width: g, $height: y });
|
|
81
|
+
}), D = E(O);
|
|
73
82
|
export {
|
|
74
83
|
D as default
|
|
75
84
|
};
|
|
@@ -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 setLoop: (loop: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.loop = loop;\n }\n },\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","loop","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,
|
|
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 onError,\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 setLoop: (loop: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.loop = loop;\n }\n },\n goToAndStop: (v, f) => animationInstance.current?.goToAndStop(v, f),\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 if (!animationData) {\n onError?.();\n\n return;\n }\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 onError?.();\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, onError]);\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","onError","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","loop","v","f","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,SAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAT,GAEEU,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEb;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACc,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,MACvC,SAAS,CAACG,MAAkB;AAC1B,QAAIR,EAAkB,YACpBA,EAAkB,QAAQ,OAAOQ;AAAA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F,GACC,CAACV,GAAKI,GAAeC,GAAUE,GAAoBJ,GAAUG,CAAO,CAAC,qBAEhEuB,GAAS,EAAA,KAAKrB,GAAW,QAAQP,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEc4B,IAAAC,EAAKnC,CAAe;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import a from "styled-components";
|
|
2
|
-
const
|
|
3
|
-
({ theme: { colors: t, zIndex: o }, $isClosing: e }) => `
|
|
2
|
+
const l = a.div(
|
|
3
|
+
({ theme: { colors: t, zIndex: o }, $isClosing: e, $blocking: i }) => `
|
|
4
4
|
position: fixed;
|
|
5
5
|
top: 0;
|
|
6
6
|
left: 0;
|
|
@@ -10,6 +10,7 @@ const p = a.div(
|
|
|
10
10
|
backdrop-filter: blur(40px);
|
|
11
11
|
display: flex;
|
|
12
12
|
animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
|
13
|
+
pointer-events: ${i ? "auto" : "none"};
|
|
13
14
|
z-index: ${o.MODAL};
|
|
14
15
|
|
|
15
16
|
@keyframes backdropFadeIn {
|
|
@@ -30,7 +31,7 @@ const p = a.div(
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
`
|
|
33
|
-
),
|
|
34
|
+
), d = a.div(
|
|
34
35
|
({ theme: { colors: t }, $isClosing: o, $width: e }) => `
|
|
35
36
|
position: relative;
|
|
36
37
|
align-self: center;
|
|
@@ -100,19 +101,19 @@ const p = a.div(
|
|
|
100
101
|
color: ${t.BLACK_1};
|
|
101
102
|
}
|
|
102
103
|
`
|
|
103
|
-
),
|
|
104
|
+
), f = a.div`
|
|
104
105
|
display: flex;
|
|
105
106
|
align-items: center;
|
|
106
107
|
justify-content: center;
|
|
107
108
|
height: 100vh;
|
|
108
109
|
width: 100%;
|
|
109
|
-
`,
|
|
110
|
+
`, r = 720, n = 800, s = 500, h = a.div(
|
|
110
111
|
({ $isClosing: t }) => `
|
|
111
112
|
position: absolute;
|
|
112
|
-
width: ${
|
|
113
|
+
width: ${r}px;
|
|
113
114
|
height: 100%;
|
|
114
115
|
left: 50%;
|
|
115
|
-
margin-left: ${-(
|
|
116
|
+
margin-left: ${-(r / 2)}px;
|
|
116
117
|
clip-path: polygon(calc(50% - 100px) 0, calc(50% + 100px) 0, 100% 100%, 0 100%);
|
|
117
118
|
background: linear-gradient(
|
|
118
119
|
180deg,
|
|
@@ -120,13 +121,13 @@ const p = a.div(
|
|
|
120
121
|
rgba(0, 0, 0, 0) 100%
|
|
121
122
|
);
|
|
122
123
|
animation: openSpotlight;
|
|
123
|
-
animation-duration: ${
|
|
124
|
+
animation-duration: ${n}ms;
|
|
124
125
|
animation-timing-function: linear;
|
|
125
126
|
animation-fill-mode: forwards;
|
|
126
127
|
opacity: 0;
|
|
127
128
|
${t ? `
|
|
128
129
|
animation: closeSpotlight;
|
|
129
|
-
animation-duration: ${
|
|
130
|
+
animation-duration: ${s}ms;
|
|
130
131
|
animation-timing-function: linear;
|
|
131
132
|
animation-fill-mode: forwards;
|
|
132
133
|
opacity: 1;
|
|
@@ -150,7 +151,38 @@ const p = a.div(
|
|
|
150
151
|
}
|
|
151
152
|
}
|
|
152
153
|
`
|
|
153
|
-
),
|
|
154
|
+
), x = a.div(
|
|
155
|
+
({ theme: { colors: t, zIndex: o }, $isClosing: e, $blocking: i }) => `
|
|
156
|
+
position: fixed;
|
|
157
|
+
top: 0;
|
|
158
|
+
left: 0;
|
|
159
|
+
right: 0;
|
|
160
|
+
bottom: 0;
|
|
161
|
+
background-color: ${t.TRANSPARENT};
|
|
162
|
+
display: flex;
|
|
163
|
+
pointer-events: ${i ? "auto" : "none"};
|
|
164
|
+
animation: ${e ? "backdropFadeOut" : "backdropFadeIn"} 0.2s ease-out forwards;
|
|
165
|
+
z-index: ${o.MODAL};
|
|
166
|
+
|
|
167
|
+
@keyframes backdropFadeIn {
|
|
168
|
+
from {
|
|
169
|
+
opacity: 0;
|
|
170
|
+
}
|
|
171
|
+
to {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
@keyframes backdropFadeOut {
|
|
177
|
+
from {
|
|
178
|
+
opacity: 1;
|
|
179
|
+
}
|
|
180
|
+
to {
|
|
181
|
+
opacity: 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
`
|
|
185
|
+
), g = a.div(
|
|
154
186
|
({ $isClosing: t }) => `
|
|
155
187
|
width: 100%;
|
|
156
188
|
height: max-content;
|
|
@@ -185,12 +217,13 @@ const p = a.div(
|
|
|
185
217
|
`
|
|
186
218
|
);
|
|
187
219
|
export {
|
|
188
|
-
|
|
220
|
+
d as BaseModal,
|
|
189
221
|
c as BaseModalContent,
|
|
190
|
-
|
|
222
|
+
g as BottomSheetModal,
|
|
191
223
|
m as CloseButtonContainer,
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
224
|
+
l as ModalContainer,
|
|
225
|
+
f as ModalLoaderWrapper,
|
|
226
|
+
h as SpotlightModal,
|
|
227
|
+
x as TransparentModalContainer
|
|
195
228
|
};
|
|
196
229
|
//# 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 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\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,
|
|
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; $blocking?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing, $blocking }) => `\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 pointer-events: ${$blocking ? 'auto' : 'none'};\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\nconst TransparentModalContainer = styled.div<{ $isClosing?: boolean; $blocking?: boolean }>(\n ({ theme: { colors, zIndex }, $isClosing, $blocking }) => `\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ${colors.TRANSPARENT};\n display: flex;\n pointer-events: ${$blocking ? 'auto' : 'none'};\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\nconst BottomSheetModal = styled.div<{ $isClosing?: boolean }>(\n ({ $isClosing }) => `\n width: 100%;\n height: max-content;\n overflow: auto;\n position: fixed;\n left: 0;\n right: 0;\n bottom: 0;\n animation: ${$isClosing ? 'slideOut' : 'slideIn'} 0.3s forwards;\n\n @keyframes slideIn {\n from {\n transform: translateY(100%);\n opacity: 0;\n }\n to {\n transform: translateY(0%);\n opacity: 1;\n }\n }\n\n @keyframes slideOut {\n from {\n transform: translateY(0%);\n opacity: 1;\n }\n to {\n transform: translateY(100%);\n opacity: 0;\n }\n }\n `,\n);\n\nexport {\n ModalContainer,\n BaseModal,\n BaseModalContent,\n CloseButtonContainer,\n TransparentModalContainer,\n SpotlightModal,\n ModalLoaderWrapper,\n BottomSheetModal,\n};\n"],"names":["ModalContainer","styled","colors","zIndex","$isClosing","$blocking","BaseModal","$width","BaseModalContent","$modalWidth","CloseButtonContainer","ModalLoaderWrapper","spotlightWidth","spotlightAnimationStartDuration","spotlightAnimationEndDuration","SpotlightModal","TransparentModalContainer","BottomSheetModal"],"mappings":";AAEA,MAAMA,IAAiBC,EAAO;AAAA,EAC5B,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,GAAY,WAAAC,EAAA,MAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMtCH,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,oBAC5CC,IAAY,SAAS,MAAM;AAAA,aAClCF,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKMG,IAAYL,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAG,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKL,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BG,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,IAAmBP,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAQ,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBT,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG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AA,iBAQLA,IAAa,aAAa,SAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBpD;"}
|
|
@@ -1,57 +1,65 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { captureException as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { ErrorBoundary as
|
|
5
|
-
import { useTheme as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { EDeviceType as
|
|
12
|
-
import { ModalContainer as
|
|
13
|
-
const
|
|
14
|
-
const { device:
|
|
15
|
-
|
|
16
|
-
}, []),
|
|
17
|
-
|
|
1
|
+
import { jsx as r, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { captureException as v } from "@sentry/browser";
|
|
3
|
+
import { memo as x, useCallback as g, Suspense as c } from "react";
|
|
4
|
+
import { ErrorBoundary as h } from "react-error-boundary";
|
|
5
|
+
import { useTheme as B } from "styled-components";
|
|
6
|
+
import S from "../../../assets/line-icons/icons/cross.js";
|
|
7
|
+
import d from "../error/error.js";
|
|
8
|
+
import W from "../buttons/clickable/clickable.js";
|
|
9
|
+
import w from "../layout/flex-view.js";
|
|
10
|
+
import s from "../loader/app-loader/app-loader.js";
|
|
11
|
+
import { EDeviceType as y } from "../theme/constants.js";
|
|
12
|
+
import { ModalContainer as m, BottomSheetModal as A, ModalLoaderWrapper as k, SpotlightModal as L, TransparentModalContainer as T, BaseModal as j, CloseButtonContainer as D, BaseModalContent as I } from "./modal-styled.js";
|
|
13
|
+
const R = x(({ modal: u, isClosing: o = !1, onClose: p }) => {
|
|
14
|
+
const { device: $ } = B(), C = $ <= y.MOBILE, { renderAs: l, element: e, modalWidth: t, isDismissable: f, renderOnMobileAs: M, blocking: i = !0 } = u, n = g((a) => {
|
|
15
|
+
v(a);
|
|
16
|
+
}, []), E = g((a) => {
|
|
17
|
+
a.stopPropagation();
|
|
18
18
|
}, []);
|
|
19
|
-
return
|
|
20
|
-
|
|
19
|
+
return l === "bottom-sheet" || C && M === "bottom-sheet" ? /* @__PURE__ */ r(
|
|
20
|
+
m,
|
|
21
21
|
{
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
$isClosing: o,
|
|
23
|
+
$blocking: i,
|
|
24
|
+
onClick: f ? p : () => null,
|
|
25
|
+
children: /* @__PURE__ */ r(A, { $isClosing: o, onClick: E, children: /* @__PURE__ */ r(
|
|
26
|
+
h,
|
|
27
|
+
{
|
|
28
|
+
fallback: /* @__PURE__ */ r(w, { $gap: 24, children: /* @__PURE__ */ r(d, { height: "100%" }) }),
|
|
29
|
+
onError: n,
|
|
30
|
+
children: /* @__PURE__ */ r(c, { fallback: /* @__PURE__ */ r(s, { height: "50vh" }), children: e })
|
|
31
|
+
}
|
|
32
|
+
) })
|
|
25
33
|
}
|
|
26
|
-
)
|
|
27
|
-
|
|
34
|
+
) : l === "spotlight" ? /* @__PURE__ */ r(m, { $isClosing: o, $blocking: i, children: /* @__PURE__ */ r(
|
|
35
|
+
h,
|
|
28
36
|
{
|
|
29
|
-
fallback: /* @__PURE__ */
|
|
30
|
-
onError:
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
-
|
|
37
|
+
fallback: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(d, { height: "100vh" }) }),
|
|
38
|
+
onError: n,
|
|
39
|
+
children: /* @__PURE__ */ b(
|
|
40
|
+
c,
|
|
33
41
|
{
|
|
34
|
-
fallback: /* @__PURE__ */
|
|
42
|
+
fallback: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(s, { height: "100vh" }) }),
|
|
35
43
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
44
|
+
/* @__PURE__ */ r(L, { $isClosing: o }),
|
|
37
45
|
e
|
|
38
46
|
]
|
|
39
47
|
}
|
|
40
48
|
)
|
|
41
49
|
}
|
|
42
|
-
) }) : /* @__PURE__ */
|
|
43
|
-
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
|
|
50
|
+
) }) : l === "fullscreen-transparent" ? /* @__PURE__ */ r(T, { $isClosing: o, $blocking: i, children: e }) : /* @__PURE__ */ r(m, { $isClosing: o, $blocking: i, children: /* @__PURE__ */ b(j, { $isClosing: o, $width: t, children: [
|
|
51
|
+
f !== !1 && /* @__PURE__ */ r(D, { $modalWidth: t, children: /* @__PURE__ */ r(W, { label: "Close", onClick: p, children: /* @__PURE__ */ r(S, { width: 40, height: 40 }) }) }),
|
|
52
|
+
/* @__PURE__ */ r(I, { $modalWidth: t, children: /* @__PURE__ */ r(
|
|
53
|
+
h,
|
|
46
54
|
{
|
|
47
|
-
fallback: /* @__PURE__ */
|
|
48
|
-
onError:
|
|
49
|
-
children: /* @__PURE__ */
|
|
55
|
+
fallback: /* @__PURE__ */ r(d, { height: "50vh", size: "compact" }),
|
|
56
|
+
onError: n,
|
|
57
|
+
children: /* @__PURE__ */ r(c, { fallback: /* @__PURE__ */ r(s, { height: "50vh" }), children: e })
|
|
50
58
|
}
|
|
51
59
|
) })
|
|
52
60
|
] }) });
|
|
53
61
|
});
|
|
54
62
|
export {
|
|
55
|
-
|
|
63
|
+
R as default
|
|
56
64
|
};
|
|
57
65
|
//# 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 { captureException } from '@sentry/browser';\nimport { memo, Suspense, useCallback } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\nimport { useTheme } from 'styled-components';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport FlexView from '../layout/flex-view';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport { EDeviceType } from '../theme/constants';\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 { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const { renderAs, element, modalWidth, isDismissable, renderOnMobileAs } = modal;\n\n const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n const handleStopPropagation = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n }, []);\n\n if (renderAs === 'bottom-sheet' || (isMobile && renderOnMobileAs === 'bottom-sheet')) {\n return (\n <Styled.ModalContainer
|
|
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';\nimport { useTheme } from 'styled-components';\n\nimport CrossIcon from '../../../assets/line-icons/icons/cross';\nimport Error from '../../ui/error/error';\nimport Clickable from '../buttons/clickable/clickable';\nimport FlexView from '../layout/flex-view';\nimport AppLoader from '../loader/app-loader/app-loader';\nimport { EDeviceType } from '../theme/constants';\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 { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const { renderAs, element, modalWidth, isDismissable, renderOnMobileAs, blocking = true } = modal;\n\n const sentryCaptureException = useCallback((error: Error) => {\n captureException(error);\n }, []);\n\n const handleStopPropagation = useCallback((e: React.MouseEvent) => {\n e.stopPropagation();\n }, []);\n\n if (renderAs === 'bottom-sheet' || (isMobile && renderOnMobileAs === 'bottom-sheet')) {\n return (\n <Styled.ModalContainer\n $isClosing={isClosing}\n $blocking={blocking}\n onClick={isDismissable ? onClose : () => null}\n >\n <Styled.BottomSheetModal $isClosing={isClosing} onClick={handleStopPropagation}>\n <ErrorBoundary\n fallback={\n <FlexView $gap={24}>\n <Error height=\"100%\" />\n </FlexView>\n }\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BottomSheetModal>\n </Styled.ModalContainer>\n );\n }\n\n if (renderAs === 'spotlight') {\n return (\n <Styled.ModalContainer $isClosing={isClosing} $blocking={blocking}>\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 if (renderAs === 'fullscreen-transparent') {\n return (\n <Styled.TransparentModalContainer $isClosing={isClosing} $blocking={blocking}>\n {element}\n </Styled.TransparentModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing} $blocking={blocking}>\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","device","useTheme","isMobile","EDeviceType","renderAs","element","modalWidth","isDismissable","renderOnMobileAs","blocking","sentryCaptureException","useCallback","error","captureException","handleStopPropagation","e","jsx","Styled.ModalContainer","Styled.BottomSheetModal","ErrorBoundary","FlexView","Error","Suspense","AppLoader","Styled.ModalLoaderWrapper","jsxs","Styled.SpotlightModal","Styled.TransparentModalContainer","Styled.BaseModal","Styled.CloseButtonContainer","Clickable","CrossIcon","Styled.BaseModalContent"],"mappings":";;;;;;;;;;;;AAoBM,MAAAA,IAAyBC,EAAK,CAAC,EAAE,OAAAC,GAAO,WAAAC,IAAY,IAAO,SAAAC,QAAc;AACvE,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,EAAY,QACjC,EAAE,UAAAC,GAAU,SAAAC,GAAS,YAAAC,GAAY,eAAAC,GAAe,kBAAAC,GAAkB,UAAAC,IAAW,GAAS,IAAAZ,GAEtFa,IAAyBC,EAAY,CAACC,MAAiB;AAC3D,IAAAC,EAAiBD,CAAK;AAAA,EACxB,GAAG,CAAE,CAAA,GAECE,IAAwBH,EAAY,CAACI,MAAwB;AACjE,IAAAA,EAAE,gBAAgB;AAAA,EACpB,GAAG,CAAE,CAAA;AAEL,SAAIX,MAAa,kBAAmBF,KAAYM,MAAqB,iBAEjE,gBAAAQ;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,YAAYnB;AAAA,MACZ,WAAWW;AAAA,MACX,SAASF,IAAgBR,IAAU,MAAM;AAAA,MAEzC,4BAACmB,GAAA,EAAwB,YAAYpB,GAAW,SAASgB,GACvD,UAAA,gBAAAE;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,4BACGC,GAAS,EAAA,MAAM,IACd,UAAC,gBAAAJ,EAAAK,GAAA,EAAM,QAAO,OAAA,CAAO,EACvB,CAAA;AAAA,UAEF,SAASX;AAAA,UAET,UAAA,gBAAAM,EAACM,KAAS,UAAU,gBAAAN,EAACO,KAAU,QAAO,OAAO,CAAA,GAAK,UAAQlB,EAAA,CAA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