@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.
Files changed (132) hide show
  1. package/dist/features/auth/account-selector/account-selector-styled.js +5 -6
  2. package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -1
  3. package/dist/features/auth/account-selector/account-selector.js +57 -51
  4. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  5. package/dist/features/auth/comps/user-list/user-list-styled.js +2 -3
  6. package/dist/features/auth/comps/user-list/user-list-styled.js.map +1 -1
  7. package/dist/features/auth/pla-signup/pla-analytics-events.js +3 -9
  8. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  9. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
  10. package/dist/features/auth/signup/custom-input-field/custom-input-field.js +8 -8
  11. package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
  12. package/dist/features/journey/use-journey/use-journey.js +6 -18
  13. package/dist/features/journey/use-journey/use-journey.js.map +1 -1
  14. package/dist/features/milestone/create/milestone-create-helpers.js +7 -13
  15. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  16. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +34 -40
  17. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  18. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
  19. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  20. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  21. package/dist/features/parent-dashboard/parent-dashboard-view.js +138 -161
  22. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  23. package/dist/features/stickers/constants.js +235 -0
  24. package/dist/features/stickers/constants.js.map +1 -0
  25. package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/comps/sticker/sticker-styled.js} +15 -45
  26. package/dist/features/stickers/sticker-selector/comps/sticker/sticker-styled.js.map +1 -0
  27. package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js +49 -0
  28. package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js.map +1 -0
  29. package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid-styled.js +28 -0
  30. package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid-styled.js.map +1 -0
  31. package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js +26 -0
  32. package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js.map +1 -0
  33. package/dist/features/stickers/sticker-selector/sticker-selector-styled.js +13 -0
  34. package/dist/features/stickers/sticker-selector/sticker-selector-styled.js.map +1 -0
  35. package/dist/features/stickers/sticker-selector/sticker-selector.js +86 -0
  36. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
  37. package/dist/features/stickers/stickers-effects/stickers-effects-animations.js +82 -0
  38. package/dist/features/stickers/stickers-effects/stickers-effects-animations.js.map +1 -0
  39. package/dist/features/stickers/stickers-effects/stickers-effects-cache.js +19 -0
  40. package/dist/features/stickers/stickers-effects/stickers-effects-cache.js.map +1 -0
  41. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +105 -0
  42. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
  43. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +37 -0
  44. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
  45. package/dist/features/stickers/stickers-effects/stickers-effects.js +67 -0
  46. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
  47. package/dist/features/trial-session/comps/class-preference/class-preference.js +49 -61
  48. package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
  49. package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
  50. package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
  51. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +0 -5
  52. package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
  53. package/dist/features/trial-session/comps/student-feedback/student-feedback.js +51 -96
  54. package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
  55. package/dist/features/trial-session/comps/student-profile/student-profile.js +63 -70
  56. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  57. package/dist/features/trial-session/helper.js +54 -71
  58. package/dist/features/trial-session/helper.js.map +1 -1
  59. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +130 -149
  60. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  61. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  62. package/dist/features/trial-session/trial-session-view.js +98 -107
  63. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  64. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +88 -75
  65. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
  66. package/dist/features/ui/lottie-animation/lottie-animation.js +55 -46
  67. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  68. package/dist/features/ui/modals/modal-styled.js +48 -15
  69. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  70. package/dist/features/ui/modals/modal.js +46 -38
  71. package/dist/features/ui/modals/modal.js.map +1 -1
  72. package/dist/index.d.ts +71 -66
  73. package/dist/index.js +391 -401
  74. package/dist/index.js.map +1 -1
  75. package/package.json +3 -2
  76. package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js +0 -31
  77. package/dist/features/auth/account-selector/comps/compact-header/account-selector-header.js.map +0 -1
  78. package/dist/features/parent-dashboard/api/cancel-subscription.js +0 -9
  79. package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
  80. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
  81. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
  82. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -96
  83. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
  84. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
  85. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
  86. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -80
  87. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
  88. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
  89. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
  90. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
  91. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
  92. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -59
  93. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
  94. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -93
  95. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
  96. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -63
  97. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
  98. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -65
  99. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
  100. package/dist/features/student-username/add/add-student-username-constants.js +0 -6
  101. package/dist/features/student-username/add/add-student-username-constants.js.map +0 -1
  102. package/dist/features/student-username/add/add-student-username-helpers.js +0 -6
  103. package/dist/features/student-username/add/add-student-username-helpers.js.map +0 -1
  104. package/dist/features/student-username/add/add-student-username-styled.js +0 -10
  105. package/dist/features/student-username/add/add-student-username-styled.js.map +0 -1
  106. package/dist/features/student-username/add/add-student-username.js +0 -78
  107. package/dist/features/student-username/add/add-student-username.js.map +0 -1
  108. package/dist/features/student-username/add/api/update-username.js +0 -9
  109. package/dist/features/student-username/add/api/update-username.js.map +0 -1
  110. package/dist/features/student-username/add/api/username-availability.js +0 -10
  111. package/dist/features/student-username/add/api/username-availability.js.map +0 -1
  112. package/dist/features/student-username/add/hooks/use-check-username-availability.js +0 -41
  113. package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +0 -1
  114. package/dist/features/trial-session/api/teacher-availability.js +0 -9
  115. package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
  116. package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
  117. package/dist/features/trial-session/comps/class-preference/helpers.js.map +0 -1
  118. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
  119. package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
  120. package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
  121. package/dist/features/ui/sticker-grid/sticker.js +0 -57
  122. package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
  123. package/dist/features/ui/stickers/constants.js +0 -6
  124. package/dist/features/ui/stickers/constants.js.map +0 -1
  125. package/dist/features/ui/stickers/stickers-effects.js +0 -64
  126. package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
  127. package/dist/features/ui/stickers/stickers-styled.js +0 -29
  128. package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
  129. package/dist/features/ui/stickers/stickers-utils.js +0 -91
  130. package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
  131. package/dist/features/ui/stickers/stickers.js +0 -40
  132. package/dist/features/ui/stickers/stickers.js.map +0 -1
@@ -1,75 +1,84 @@
1
- import { jsx as E } from "react/jsx-runtime";
2
- import g from "lottie-web";
3
- import { memo as w, forwardRef as A, useRef as u, useImperativeHandle as b, useEffect as I } from "react";
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 = A((v, L) => {
6
+ const O = b((L, h) => {
7
7
  const {
8
- src: m,
9
- width: h = "100%",
8
+ src: l,
9
+ width: g = "100%",
10
10
  height: y = "100%",
11
- settings: l,
12
- eventListener: n,
13
- onRender: i,
14
- animateOnIntersect: c
15
- } = v, a = u(null), r = u(null), s = u(null);
16
- return b(
17
- L,
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: (e, o) => {
20
- var t;
21
- return (t = r.current) == null ? void 0 : t.playSegments(e, o);
20
+ playSegments: (t, n) => {
21
+ var e;
22
+ return (e = r.current) == null ? void 0 : e.playSegments(t, n);
22
23
  },
23
- addEventListener: (e, o) => {
24
- var t;
25
- return (t = r.current) == null ? void 0 : t.addEventListener(e, o);
24
+ addEventListener: (t, n) => {
25
+ var e;
26
+ return (e = r.current) == null ? void 0 : e.addEventListener(t, n);
26
27
  },
27
- removeEventListener: (e, o) => {
28
- var t;
29
- return (t = r.current) == null ? void 0 : t.removeEventListener(e, o);
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 e;
33
- return (e = r.current) == null ? void 0 : e.play();
33
+ var t;
34
+ return (t = r.current) == null ? void 0 : t.play();
34
35
  },
35
36
  stop: () => {
36
- var e;
37
- return (e = r.current) == null ? void 0 : e.stop();
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
- setLoop: (e) => {
40
- r.current && (r.current.loop = e);
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
- ), I(() => {
45
- let e = !1;
49
+ ), S(() => {
50
+ let t = !1;
46
51
  return (async () => {
47
52
  try {
48
- const t = await x(m);
53
+ const e = await x(l);
54
+ if (!e) {
55
+ i == null || i();
56
+ return;
57
+ }
49
58
  requestAnimationFrame(() => {
50
- !a.current || e || (r.current = g.loadAnimation({
51
- container: a.current,
52
- animationData: t,
59
+ !c.current || t || (r.current = w.loadAnimation({
60
+ container: c.current,
61
+ animationData: e,
53
62
  loop: !0,
54
63
  autoplay: !0,
55
- ...l
56
- }), c && (s.current = new IntersectionObserver(
57
- ([f]) => {
58
- var d, p;
59
- f && f.isIntersecting ? (d = r.current) == null || d.play() : (p = r.current) == null || p.pause();
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
- ), s.current.observe(a.current)), i == null || i(), n && r.current.addEventListener(n.name, n.callback));
71
+ ), u.current.observe(c.current)), a == null || a(), o && r.current.addEventListener(o.name, o.callback));
63
72
  });
64
- } catch (t) {
65
- throw Error(`Error loading Lottie animation: ${t}`);
73
+ } catch (e) {
74
+ throw i == null || i(), Error(`Error loading Lottie animation: ${e}`);
66
75
  }
67
76
  })(), () => {
68
- var t;
69
- e = !0, r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((t = s.current) == null || t.disconnect()), r.current.destroy());
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
- }, [m, n, i, c, l]), /* @__PURE__ */ E($, { ref: a, $width: h, $height: y });
72
- }), D = w(O);
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,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MACzC;;AAAA,gBAAAC,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,aAAaF,GAAUC;AAAA;AAAA,MACpD,kBAAkB,CAACE,GAAmBC,MACpC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,iBAAiBC,GAAiCC;AAAA;AAAA,MAC/E,qBAAqB,CAACD,GAAmBC,MACvC;;AAAA,gB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AAMA,EAAc,QAAQ,GAGtFE,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;IAC5B;AAAA,EACF,GACC,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDuB,GAAS,EAAA,KAAKnB,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcyB,IAAAC,EAAKhC,CAAe;"}
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,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AAU;AAAA,YACV,GAAGpB;AAAA,UAAA,CACJ,GAEGI,MACFI,EAAqB,UAAU,IAAI;AAAA,YACjC,CAAC,CAACe,CAAK,MAAM;;AACP,cAAAA,KAASA,EAAM,kBACjBX,IAAAL,EAAkB,YAAlB,QAAAK,EAA2B,UAE3BY,IAAAjB,EAAkB,YAAlB,QAAAiB,EAA2B;AAAA,YAE/B;AAAA,YACA,EAAE,WAAW,EAAE;AAAA,UAAA,GAGIhB,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAG7CH,KAAA,QAAAA,KACPD,KACFM,EAAkB,QAAQ,iBAAiBN,EAAc,MAAMA,EAAc,QAAQ;AAAA,QACvF,CACD;AAAA,eACMwB,GAAO;AACJ,cAAAtB,KAAA,QAAAA,KACJ,MAAM,mCAAmCsB,CAAK,EAAE;AAAA,MACxD;AAAA,IAAA,MAKK,MAAM;;AACC,MAAAN,IAAA,IACRZ,EAAkB,YAChBN,KACFM,EAAkB,QAAQ,oBAAoBN,EAAc,MAAMA,EAAc,QAAQ,GAGtFG,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;IAC5B;AAAA,EACF,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 p = a.div(
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
- ), l = a.div(
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
- ), d = a.div`
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
- `, i = 720, r = 800, n = 500, f = a.div(
110
+ `, r = 720, n = 800, s = 500, h = a.div(
110
111
  ({ $isClosing: t }) => `
111
112
  position: absolute;
112
- width: ${i}px;
113
+ width: ${r}px;
113
114
  height: 100%;
114
115
  left: 50%;
115
- margin-left: ${-(i / 2)}px;
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: ${r}ms;
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: ${n}ms;
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
- ), h = a.div(
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
- l as BaseModal,
220
+ d as BaseModal,
189
221
  c as BaseModalContent,
190
- h as BottomSheetModal,
222
+ g as BottomSheetModal,
191
223
  m as CloseButtonContainer,
192
- p as ModalContainer,
193
- d as ModalLoaderWrapper,
194
- f as SpotlightModal
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,QAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAM3BF,EAAO,UAAU;AAAA;AAAA;AAAA,eAGxBE,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAKME,IAAYJ,EAAO;AAAA,EAIvB,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAU,GAAA,YAAAE,GAAY,QAAAE,QAAa;AAAA;AAAA;AAAA;AAAA,WAItCA,CAAM;AAAA,sBACKJ,EAAO,OAAO;AAAA,sBACdA,EAAO,OAAO;AAAA;AAAA,eAGhCE,IAAa,mBAAmB,aAClC;AAAA;AAAA;AAAA;AAAA,4BAI0BE,CAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8BlC,GAKMC,IAAmBN,EAAO;AAAA,EAC9B,CAAC,EAAE,aAAAO,EAAA,MAAkB;AAAA;AAAA;AAAA;AAAA,4BAIKA,CAAW;AAAA;AAAA;AAAA;AAIvC,GAKMC,IAAuBR,EAAO;AAAA,EAClC,CAAC,EAAE,OAAO,EAAE,QAAAC,EAAO,GAAG,aAAAM,EAAkB,MAAA;AAAA;AAAA;AAAA;AAAA,WAI/BN,EAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOGM,CAAW;AAAA;AAAA;AAAA,aAG1BN,EAAO,OAAO;AAAA;AAAA;AAG3B,GAEMQ,IAAqBT,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ5BU,IAAiB,KACjBC,IAAkC,KAClCC,IAAgC,KAEhCC,IAAiBb,EAAO;AAAA,EAG5B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA,WAEXO,CAAc;AAAA;AAAA;AAAA,iBAGR,EAAEA,IAAiB,EAAE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAQdC,CAA+B;AAAA;AAAA;AAAA;AAAA,IAKnDR,IACI;AAAA;AAAA,4BAEoBS,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF,GAEME,IAAmBd,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,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
+ {"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;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T,IACI;AAAA;AAAA,4BAEoBU,CAA6B;AAAA;AAAA;AAAA;AAAA,QAKjD,EACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBF,GAEME,IAA4Bf,EAAO;AAAA,EACvC,CAAC,EAAE,OAAO,EAAE,QAAAC,GAAQ,QAAAC,EAAO,GAAG,YAAAC,GAAY,WAAAC,EAAA,MAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAMtCH,EAAO,WAAW;AAAA;AAAA,oBAEpBG,IAAY,SAAS,MAAM;AAAA,eAChCD,IAAa,oBAAoB,gBAAgB;AAAA,aACnDD,EAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAoBzB,GAEMc,IAAmBhB,EAAO;AAAA,EAC9B,CAAC,EAAE,YAAAG,EAAA,MAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,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 o, jsxs as f } from "react/jsx-runtime";
2
- import { captureException as E } from "@sentry/browser";
3
- import { memo as v, useCallback as b, Suspense as n } from "react";
4
- import { ErrorBoundary as a } from "react-error-boundary";
5
- import { useTheme as x } from "styled-components";
6
- import B from "../../../assets/line-icons/icons/cross.js";
7
- import h from "../error/error.js";
8
- import S from "../buttons/clickable/clickable.js";
9
- import W from "../layout/flex-view.js";
10
- import c from "../loader/app-loader/app-loader.js";
11
- import { EDeviceType as w } from "../theme/constants.js";
12
- import { ModalContainer as d, BottomSheetModal as y, ModalLoaderWrapper as g, SpotlightModal as A, BaseModal as L, CloseButtonContainer as j, BaseModalContent as D } from "./modal-styled.js";
13
- const N = v(({ modal: u, isClosing: r = !1, onClose: m }) => {
14
- const { device: C } = x(), k = C <= w.MOBILE, { renderAs: s, element: e, modalWidth: i, isDismissable: p, renderOnMobileAs: M } = u, t = b((l) => {
15
- E(l);
16
- }, []), $ = b((l) => {
17
- l.stopPropagation();
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 s === "bottom-sheet" || k && M === "bottom-sheet" ? /* @__PURE__ */ o(d, { $isClosing: r, onClick: p ? m : () => null, children: /* @__PURE__ */ o(y, { $isClosing: r, onClick: $, children: /* @__PURE__ */ o(
20
- a,
19
+ return l === "bottom-sheet" || C && M === "bottom-sheet" ? /* @__PURE__ */ r(
20
+ m,
21
21
  {
22
- fallback: /* @__PURE__ */ o(W, { $gap: 24, children: /* @__PURE__ */ o(h, { height: "100%" }) }),
23
- onError: t,
24
- children: /* @__PURE__ */ o(n, { fallback: /* @__PURE__ */ o(c, { height: "50vh" }), children: e })
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
- ) }) }) : s === "spotlight" ? /* @__PURE__ */ o(d, { $isClosing: r, children: /* @__PURE__ */ o(
27
- a,
34
+ ) : l === "spotlight" ? /* @__PURE__ */ r(m, { $isClosing: o, $blocking: i, children: /* @__PURE__ */ r(
35
+ h,
28
36
  {
29
- fallback: /* @__PURE__ */ o(g, { children: /* @__PURE__ */ o(h, { height: "100vh" }) }),
30
- onError: t,
31
- children: /* @__PURE__ */ f(
32
- n,
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__ */ o(g, { children: /* @__PURE__ */ o(c, { height: "100vh" }) }),
42
+ fallback: /* @__PURE__ */ r(k, { children: /* @__PURE__ */ r(s, { height: "100vh" }) }),
35
43
  children: [
36
- /* @__PURE__ */ o(A, { $isClosing: r }),
44
+ /* @__PURE__ */ r(L, { $isClosing: o }),
37
45
  e
38
46
  ]
39
47
  }
40
48
  )
41
49
  }
42
- ) }) : /* @__PURE__ */ o(d, { $isClosing: r, children: /* @__PURE__ */ f(L, { $isClosing: r, $width: i, children: [
43
- p !== !1 && /* @__PURE__ */ o(j, { $modalWidth: i, children: /* @__PURE__ */ o(S, { label: "Close", onClick: m, children: /* @__PURE__ */ o(B, { width: 40, height: 40 }) }) }),
44
- /* @__PURE__ */ o(D, { $modalWidth: i, children: /* @__PURE__ */ o(
45
- a,
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__ */ o(h, { height: "50vh", size: "compact" }),
48
- onError: t,
49
- children: /* @__PURE__ */ o(n, { fallback: /* @__PURE__ */ o(c, { height: "50vh" }), children: e })
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
- N as default
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 $isClosing={isClosing} onClick={isDismissable ? onClose : () => null}>\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}>\n <ErrorBoundary\n fallback={\n <Styled.ModalLoaderWrapper>\n <Error height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n onError={sentryCaptureException}\n >\n <Suspense\n fallback={\n <Styled.ModalLoaderWrapper>\n <AppLoader height=\"100vh\" />\n </Styled.ModalLoaderWrapper>\n }\n >\n <Styled.SpotlightModal $isClosing={isClosing} />\n {element}\n </Suspense>\n </ErrorBoundary>\n </Styled.ModalContainer>\n );\n }\n\n return (\n <Styled.ModalContainer $isClosing={isClosing}>\n <Styled.BaseModal $isClosing={isClosing} $width={modalWidth}>\n {isDismissable !== false && (\n <Styled.CloseButtonContainer $modalWidth={modalWidth}>\n <Clickable label=\"Close\" onClick={onClose}>\n <CrossIcon width={40} height={40} />\n </Clickable>\n </Styled.CloseButtonContainer>\n )}\n <Styled.BaseModalContent $modalWidth={modalWidth}>\n <ErrorBoundary\n fallback={<Error height=\"50vh\" size=\"compact\" />}\n onError={sentryCaptureException}\n >\n <Suspense fallback={<AppLoader height=\"50vh\" />}>{element}</Suspense>\n </ErrorBoundary>\n </Styled.BaseModalContent>\n </Styled.BaseModal>\n </Styled.ModalContainer>\n );\n});\n\nexport default Modal;\n"],"names":["Modal","memo","modal","isClosing","onClose","device","useTheme","isMobile","EDeviceType","renderAs","element","modalWidth","isDismissable","renderOnMobileAs","sentryCaptureException","useCallback","error","captureException","handleStopPropagation","e","Styled.ModalContainer","Styled.BottomSheetModal","jsx","ErrorBoundary","FlexView","Error","Suspense","AppLoader","Styled.ModalLoaderWrapper","jsxs","Styled.SpotlightModal","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,EAAqB,IAAAX,GAErEY,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,SAAIV,MAAa,kBAAmBF,KAAYM,MAAqB,mCAEhEO,GAAA,EAAsB,YAAYjB,GAAW,SAASS,IAAgBR,IAAU,MAAM,MACrF,4BAACiB,GAAA,EAAwB,YAAYlB,GAAW,SAASe,GACvD,UAAA,gBAAAI;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,4BACGC,GAAS,EAAA,MAAM,IACd,UAAC,gBAAAF,EAAAG,GAAA,EAAM,QAAO,OAAA,CAAO,EACvB,CAAA;AAAA,MAEF,SAASX;AAAA,MAET,UAAA,gB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AA;AAAA,MAAA;AAAA,IAAA,GAE9D;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ,CAAC;"}
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,GAA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