@cuemath/leap 3.2.30 → 3.2.31-m

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 (202) hide show
  1. package/dist/assets/illustrations/illustrations.js +5 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +1 -6
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +1 -2
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +4 -6
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +16 -20
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/auth/account-selector/account-selector.js +52 -54
  12. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  13. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +1 -2
  14. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -1
  15. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +8 -8
  16. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
  17. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +60 -82
  18. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
  19. package/dist/features/auth/comps/pill-button/pill-button.js +38 -41
  20. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
  21. package/dist/features/auth/comps/resend-otp/resend-otp.js +14 -18
  22. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  23. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +26 -32
  24. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -1
  25. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +10 -2
  26. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  27. package/dist/features/auth/comps/user-list/user-item/user-item-styled.js +3 -9
  28. package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +1 -1
  29. package/dist/features/auth/comps/user-list/user-item/user-item.js +15 -14
  30. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  31. package/dist/features/auth/pla-signup/signup-options/signup-options.js +35 -42
  32. package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
  33. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js +43 -43
  34. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js.map +1 -1
  35. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-utils.js +1 -1
  36. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-utils.js.map +1 -1
  37. package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
  38. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  39. package/dist/features/communication/pub-sub/constants.js +4 -7
  40. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  41. package/dist/features/homework/homework-card-view.js +97 -85
  42. package/dist/features/homework/homework-card-view.js.map +1 -1
  43. package/dist/features/homework/homework-card.js +42 -44
  44. package/dist/features/homework/homework-card.js.map +1 -1
  45. package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
  46. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  47. package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
  48. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  49. package/dist/features/homework/utils.js +27 -33
  50. package/dist/features/homework/utils.js.map +1 -1
  51. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
  52. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  53. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  54. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  55. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  56. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  57. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js +53 -68
  58. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
  59. package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
  60. package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
  61. package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
  62. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  63. package/dist/features/puzzles/comps/puzzle-card.js +30 -79
  64. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  65. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
  66. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  67. package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
  68. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  69. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  70. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  71. package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
  72. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  73. package/dist/features/stickers/sticker-data.js +234 -0
  74. package/dist/features/stickers/sticker-data.js.map +1 -0
  75. package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +23 -31
  76. package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
  77. package/dist/features/stickers/sticker-selector/sticker-selector.js +39 -0
  78. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
  79. package/dist/features/stickers/sticker-selector/sticker.js +56 -0
  80. package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
  81. package/dist/features/stickers/stickers-effects/effects.js +82 -0
  82. package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
  83. package/dist/features/stickers/stickers-effects/stickers-cache.js +19 -0
  84. package/dist/features/stickers/stickers-effects/stickers-cache.js.map +1 -0
  85. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +105 -0
  86. package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
  87. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +36 -0
  88. package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
  89. package/dist/features/stickers/stickers-effects/stickers-effects.js +55 -0
  90. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
  91. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +8 -3
  92. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  93. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +40 -40
  94. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  95. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +88 -75
  96. package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
  97. package/dist/features/ui/lottie-animation/lottie-animation.js +45 -43
  98. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  99. package/dist/features/ui/modals/modal-styled.js +48 -15
  100. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  101. package/dist/features/ui/modals/modal.js +43 -35
  102. package/dist/features/ui/modals/modal.js.map +1 -1
  103. package/dist/features/ui/theme/layout.js +3 -3
  104. package/dist/features/ui/theme/layout.js.map +1 -1
  105. package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
  106. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  107. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
  108. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  109. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
  110. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  111. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +163 -166
  112. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  113. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
  114. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  115. package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
  116. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  117. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  118. package/dist/features/worksheet/worksheet/worksheet.js +430 -375
  119. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  120. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  121. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  122. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
  123. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  124. package/dist/index.d.ts +86 -149
  125. package/dist/index.js +418 -430
  126. package/dist/index.js.map +1 -1
  127. package/dist/static/animated-avatar.1ad58b1d.json +1 -0
  128. package/dist/static/animated-avatar.69b07505.json +1 -0
  129. package/dist/static/animated-avatar.9c560b46.json +1 -0
  130. package/dist/static/cuemath-app-qr-code.4beefe48.svg +1 -0
  131. package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +1 -0
  132. package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
  133. package/dist/static/otp.2d08f874.json +1 -0
  134. package/dist/static/phone-number.84f55562.json +1 -0
  135. package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
  136. package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
  137. package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
  138. package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
  139. package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
  140. package/dist/static/target-achieved-text.053bd142.json +2830 -0
  141. package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +1 -0
  142. package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +1 -0
  143. package/package.json +1 -1
  144. package/dist/features/auth/pla-signup/pla-analytics-events.js +0 -23
  145. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +0 -1
  146. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
  147. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
  148. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
  149. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
  150. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
  151. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
  152. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
  153. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
  154. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
  155. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
  156. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
  157. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
  158. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
  159. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
  160. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
  161. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
  162. package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
  163. package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
  164. package/dist/features/puzzles/constants/puzzle-container.js +0 -8
  165. package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
  166. package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
  167. package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
  168. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
  169. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
  170. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
  171. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
  172. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -107
  173. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
  174. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
  175. package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
  176. package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
  177. package/dist/features/ui/sticker-grid/sticker.js +0 -57
  178. package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
  179. package/dist/features/ui/stickers/constants.js +0 -6
  180. package/dist/features/ui/stickers/constants.js.map +0 -1
  181. package/dist/features/ui/stickers/stickers-effects.js +0 -64
  182. package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
  183. package/dist/features/ui/stickers/stickers-styled.js +0 -29
  184. package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
  185. package/dist/features/ui/stickers/stickers-utils.js +0 -91
  186. package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
  187. package/dist/features/ui/stickers/stickers.js +0 -40
  188. package/dist/features/ui/stickers/stickers.js.map +0 -1
  189. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  190. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  191. package/dist/static/animated-avatar.c3a0fa98.json +0 -1
  192. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
  193. package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
  194. package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
  195. package/dist/static/puzzle-orange-lottie.0a105c42.json +0 -21206
  196. package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
  197. package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
  198. package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
  199. package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
  200. package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
  201. package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
  202. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,115 +1,93 @@
1
- import { jsxs as _, jsx as a } from "react/jsx-runtime";
2
- import { memo as D, useRef as c, useState as y, useCallback as E, useImperativeHandle as O, useMemo as S, useEffect as f } from "react";
3
- import { LOTTIE as j } from "../../../../assets/lottie/lottie.js";
4
- import C from "../../../ui/layout/flex-view.js";
5
- import X from "../../../ui/lottie-animation/lottie-animation.js";
6
- import { ANIMATION_SEGMENTS as T, FADE_TIMEOUT as R } from "./animated-avatar-message-constants.js";
7
- import { Wrapper as k, MessageWrapper as B } from "./animated-avatar-message-styled.js";
8
- import G from "./animated-text/animated-text.js";
9
- const K = {
1
+ import { jsxs as b, jsx as l } from "react/jsx-runtime";
2
+ import { memo as N, useRef as T, useState as $, useCallback as R, useImperativeHandle as V, useMemo as _, useEffect as o } from "react";
3
+ import { LOTTIE as O } from "../../../../assets/lottie/lottie.js";
4
+ import x from "../../../ui/layout/flex-view.js";
5
+ import j from "../../../ui/lottie-animation/lottie-animation.js";
6
+ import { ANIMATION_SEGMENTS as E, FADE_TIMEOUT as L } from "./animated-avatar-message-constants.js";
7
+ import { Wrapper as C, MessageWrapper as D } from "./animated-avatar-message-styled.js";
8
+ import F from "./animated-text/animated-text.js";
9
+ const X = {
10
10
  autoplay: !1,
11
11
  loop: !1,
12
12
  renderer: "canvas"
13
- }, U = ({
14
- message: p,
15
- confirmationMessage: r,
16
- onShowContent: s,
17
- confirmationFrames: $,
18
- completionFrames: o,
19
- isConfirmationVisible: d,
20
- ref: b,
21
- height: N = "auto",
22
- idleFrames: A
13
+ }, k = ({
14
+ message: n,
15
+ confirmationMessage: e,
16
+ onShowContent: t,
17
+ confirmationFrames: c,
18
+ isConfirmationVisible: m,
19
+ ref: M,
20
+ height: h = "auto"
23
21
  }) => {
24
- const l = c(null), u = c(null), [v, n] = y(!1), [I, x] = y(!1), [h, M] = y(d), g = c(!1), m = c(A), i = E(() => {
25
- const e = l.current;
26
- if (!e) return;
27
- e.removeEventListener("complete", i), e.setLoop(!0);
28
- const t = g.current && m.current ? m.current : T.IDLE;
29
- e.playSegments(t, !0);
30
- }, []), P = E(() => {
31
- const e = l.current;
32
- if (!e) return;
33
- e.playSegments(T.INITIAL, !0);
34
- const t = () => {
35
- e.removeEventListener("complete", t), n(!0), s(!0), e.playSegments(T.FINAL, !0), e.addEventListener("complete", i);
22
+ const r = T(null), u = T(null), [p, i] = $(!1), [f, d] = $(m), v = R(() => {
23
+ var a, A;
24
+ (a = r.current) == null || a.playSegments(E.INITIAL, !0);
25
+ const s = () => {
26
+ var g, I;
27
+ (g = r.current) == null || g.removeEventListener("complete", s), i(!0), t(!0), (I = r.current) == null || I.playSegments(E.FINAL, !0);
36
28
  };
37
- e.addEventListener("complete", t);
38
- }, [s, i]), L = E(
39
- (e) => {
40
- const t = l.current;
41
- t && (t.setLoop(!1), t.playSegments(e, !0), t.addEventListener("complete", i));
42
- },
43
- [i]
44
- );
45
- O(
46
- b,
29
+ (A = r.current) == null || A.addEventListener("complete", s);
30
+ }, [t]);
31
+ V(
32
+ M,
47
33
  () => ({
48
- fadeOutMessageAndPlayCompletion: () => new Promise((e) => {
49
- s(!1), x(!1), o && I && (g.current = !1, L(o)), u.current = setTimeout(() => {
50
- n(!1), e();
51
- }, R);
34
+ fadeOutMessage: () => new Promise((s) => {
35
+ t(!1), u.current = setTimeout(() => {
36
+ i(!1), s();
37
+ }, L);
52
38
  }),
53
- playConfirmationFrames: () => new Promise((e) => {
54
- I || (o && x(!0), g.current = !!m.current, L($)), r && n(!1), u.current = setTimeout(() => {
55
- r && M(!0), n(!0), e();
56
- }, R);
39
+ playConfirmationFrames: () => new Promise((s) => {
40
+ var a;
41
+ (a = r.current) == null || a.playSegments(c, !0), e && i(!1), u.current = setTimeout(() => {
42
+ e && d(!0), i(!0), s();
43
+ }, L);
57
44
  })
58
45
  }),
59
- [
60
- o,
61
- $,
62
- r,
63
- I,
64
- s,
65
- L
66
- ]
46
+ [c, e, t]
67
47
  );
68
- const V = S(() => h && r ? r : p, [h, r, p]);
69
- return f(() => {
70
- m.current = A;
71
- }, [A]), f(() => () => {
48
+ const y = _(() => f && e ? e : n, [f, e, n]);
49
+ return o(() => () => {
72
50
  u.current && clearTimeout(u.current);
73
- }, []), f(() => {
74
- M(d);
75
- }, [d]), f(() => {
76
- n(!0), s(!0);
77
- }, [p, s]), /* @__PURE__ */ _(
78
- k,
51
+ }, []), o(() => {
52
+ d(m);
53
+ }, [m]), o(() => {
54
+ i(!0), t(!0);
55
+ }, [n, t]), /* @__PURE__ */ b(
56
+ C,
79
57
  {
80
58
  $flexDirection: "row",
81
59
  $justifyContent: "flex-start",
82
60
  $alignItems: "center",
83
61
  $flexColumnGapX: 0.5,
84
- $height: N,
62
+ $height: h,
85
63
  children: [
86
- /* @__PURE__ */ a(C, { $width: 147, $height: 147, children: /* @__PURE__ */ a(
87
- X,
64
+ /* @__PURE__ */ l(x, { $width: 80, $height: 80, children: /* @__PURE__ */ l(
65
+ j,
88
66
  {
89
- width: 147,
90
- height: 147,
91
- src: j.ANIMATED_AVATAR,
92
- ref: l,
93
- onRender: P,
94
- settings: K
67
+ width: 80,
68
+ height: 80,
69
+ src: O.ANIMATED_AVATAR,
70
+ ref: r,
71
+ onRender: v,
72
+ settings: X
95
73
  }
96
74
  ) }),
97
- v && /* @__PURE__ */ a(C, { $flex: 1, children: /* @__PURE__ */ a(
98
- B,
75
+ p && /* @__PURE__ */ l(x, { $flex: 1, children: /* @__PURE__ */ l(
76
+ D,
99
77
  {
100
78
  $gutterX: 1,
101
79
  $gapX: 0.5,
102
80
  $background: "BLACK_3",
103
81
  $borderColor: "BLACK_5",
104
- isVisible: v,
105
- children: /* @__PURE__ */ a(G, { text: V, speed: 20 })
82
+ isVisible: p,
83
+ children: /* @__PURE__ */ l(F, { text: y, speed: 20 })
106
84
  }
107
85
  ) })
108
86
  ]
109
87
  }
110
88
  );
111
- }, Y = D(U);
89
+ }, U = N(k);
112
90
  export {
113
- Y as default
91
+ U as default
114
92
  };
115
93
  //# sourceMappingURL=animated-avatar-message.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"animated-avatar-message.js","sources":["../../../../../src/features/auth/comps/animated-avatar-message/animated-avatar-message.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { IAnimatedAvatarMessageProps } from './animated-avatar-message-types';\n\nimport {\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n useEffect,\n type FC,\n useMemo,\n memo,\n} from 'react';\n\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport { ANIMATION_SEGMENTS, FADE_TIMEOUT } from './animated-avatar-message-constants';\nimport * as Styled from './animated-avatar-message-styled';\nimport AnimatedText from './animated-text/animated-text';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n};\n\nconst AnimatedAvatarMessage: FC<IAnimatedAvatarMessageProps> = ({\n message,\n confirmationMessage,\n onShowContent,\n confirmationFrames,\n completionFrames,\n isConfirmationVisible,\n ref,\n height = 'auto',\n idleFrames,\n}) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isMessageVisible, setIsMessageVisible] = useState(false);\n const [isConfirmationAnimationPlayed, setIsConfirmationAnimationPlayed] = useState(false);\n const [isConfirmationMessageVisible, setIsConfirmationMessageVisible] =\n useState(isConfirmationVisible);\n const shouldUseCustomIdleFrames = useRef(false);\n const idleFramesRef = useRef(idleFrames);\n\n const playIdleLoop = useCallback(() => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.removeEventListener('complete', playIdleLoop);\n animation.setLoop(true);\n\n const idleSegment =\n shouldUseCustomIdleFrames.current && idleFramesRef.current\n ? idleFramesRef.current\n : ANIMATION_SEGMENTS.IDLE;\n\n animation.playSegments(idleSegment, true);\n }, []);\n\n const handleLottieRender = useCallback(() => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.playSegments(ANIMATION_SEGMENTS.INITIAL, true);\n\n const onComplete = () => {\n animation.removeEventListener('complete', onComplete);\n setIsMessageVisible(true);\n onShowContent(true);\n animation.playSegments(ANIMATION_SEGMENTS.FINAL, true);\n animation.addEventListener('complete', playIdleLoop);\n };\n\n animation.addEventListener('complete', onComplete);\n }, [onShowContent, playIdleLoop]);\n\n const playAnimation = useCallback(\n (frames: [number, number]) => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.setLoop(false);\n animation.playSegments(frames, true);\n animation.addEventListener('complete', playIdleLoop);\n },\n [playIdleLoop],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n fadeOutMessageAndPlayCompletion: () =>\n new Promise<void>(resolve => {\n onShowContent(false);\n setIsConfirmationAnimationPlayed(false);\n if (completionFrames && isConfirmationAnimationPlayed) {\n shouldUseCustomIdleFrames.current = false;\n playAnimation(completionFrames);\n }\n timeoutRef.current = setTimeout(() => {\n setIsMessageVisible(false);\n resolve();\n }, FADE_TIMEOUT);\n }),\n\n playConfirmationFrames: () =>\n new Promise<void>(resolve => {\n if (!isConfirmationAnimationPlayed) {\n if (completionFrames) {\n setIsConfirmationAnimationPlayed(true);\n }\n shouldUseCustomIdleFrames.current = !!idleFramesRef.current;\n playAnimation(confirmationFrames);\n }\n\n if (confirmationMessage) {\n setIsMessageVisible(false);\n }\n timeoutRef.current = setTimeout(() => {\n if (confirmationMessage) {\n setIsConfirmationMessageVisible(true);\n }\n setIsMessageVisible(true);\n resolve();\n }, FADE_TIMEOUT);\n }),\n }),\n [\n completionFrames,\n confirmationFrames,\n confirmationMessage,\n isConfirmationAnimationPlayed,\n onShowContent,\n playAnimation,\n ],\n );\n\n const displayMessage = useMemo(() => {\n return isConfirmationMessageVisible && confirmationMessage ? confirmationMessage : message;\n }, [isConfirmationMessageVisible, confirmationMessage, message]);\n\n useEffect(() => {\n idleFramesRef.current = idleFrames;\n }, [idleFrames]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n useEffect(() => {\n setIsConfirmationMessageVisible(isConfirmationVisible);\n }, [isConfirmationVisible]);\n\n useEffect(() => {\n setIsMessageVisible(true);\n onShowContent(true);\n }, [message, onShowContent]);\n\n return (\n <Styled.Wrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexColumnGapX={0.5}\n $height={height}\n >\n <FlexView $width={147} $height={147}>\n <LottieAnimation\n width={147}\n height={147}\n src={LOTTIE.ANIMATED_AVATAR}\n ref={animationRef}\n onRender={handleLottieRender}\n settings={animationSettings}\n />\n </FlexView>\n {isMessageVisible && (\n <FlexView $flex={1}>\n <Styled.MessageWrapper\n $gutterX={1}\n $gapX={0.5}\n $background=\"BLACK_3\"\n $borderColor=\"BLACK_5\"\n isVisible={isMessageVisible}\n >\n <AnimatedText text={displayMessage} speed={20} />\n </Styled.MessageWrapper>\n </FlexView>\n )}\n </Styled.Wrapper>\n );\n};\n\nexport default memo(AnimatedAvatarMessage);\n"],"names":["animationSettings","AnimatedAvatarMessage","message","confirmationMessage","onShowContent","confirmationFrames","completionFrames","isConfirmationVisible","ref","height","idleFrames","animationRef","useRef","timeoutRef","isMessageVisible","setIsMessageVisible","useState","isConfirmationAnimationPlayed","setIsConfirmationAnimationPlayed","isConfirmationMessageVisible","setIsConfirmationMessageVisible","shouldUseCustomIdleFrames","idleFramesRef","playIdleLoop","useCallback","animation","idleSegment","ANIMATION_SEGMENTS","handleLottieRender","onComplete","playAnimation","frames","useImperativeHandle","resolve","FADE_TIMEOUT","displayMessage","useMemo","useEffect","jsxs","Styled.Wrapper","jsx","FlexView","LottieAnimation","LOTTIE","Styled.MessageWrapper","AnimatedText","animatedAvatarMessage","memo"],"mappings":";;;;;;;;AAqBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAyD,CAAC;AAAA,EAC9D,SAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,YAAAC;AACF,MAAM;AACE,QAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAaD,EAA6C,IAAI,GAC9D,CAACE,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxD,CAACC,GAA+BC,CAAgC,IAAIF,EAAS,EAAK,GAClF,CAACG,GAA8BC,CAA+B,IAClEJ,EAAST,CAAqB,GAC1Bc,IAA4BT,EAAO,EAAK,GACxCU,IAAgBV,EAAOF,CAAU,GAEjCa,IAAeC,EAAY,MAAM;AACrC,UAAMC,IAAYd,EAAa;AAE/B,QAAI,CAACc,EAAW;AAEN,IAAAA,EAAA,oBAAoB,YAAYF,CAAY,GACtDE,EAAU,QAAQ,EAAI;AAEtB,UAAMC,IACJL,EAA0B,WAAWC,EAAc,UAC/CA,EAAc,UACdK,EAAmB;AAEf,IAAAF,EAAA,aAAaC,GAAa,EAAI;AAAA,EAC1C,GAAG,CAAE,CAAA,GAECE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AK,GAAA,EAAa,MAAMV,GAAgB,OAAO,IAAI;AAAA,UAAA;AAAA,QAAA,GAEnD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEeW,IAAAC,EAAK9C,CAAqB;"}
1
+ {"version":3,"file":"animated-avatar-message.js","sources":["../../../../../src/features/auth/comps/animated-avatar-message/animated-avatar-message.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { IAnimatedAvatarMessageProps } from './animated-avatar-message-types';\n\nimport {\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n useEffect,\n type FC,\n useMemo,\n memo,\n} from 'react';\n\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport { ANIMATION_SEGMENTS, FADE_TIMEOUT } from './animated-avatar-message-constants';\nimport * as Styled from './animated-avatar-message-styled';\nimport AnimatedText from './animated-text/animated-text';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n};\n\nconst AnimatedAvatarMessage: FC<IAnimatedAvatarMessageProps> = ({\n message,\n confirmationMessage,\n onShowContent,\n confirmationFrames,\n isConfirmationVisible,\n ref,\n height = 'auto',\n}) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isMessageVisible, setIsMessageVisible] = useState(false);\n const [isConfirmationMessageVisible, setIsConfirmationMessageVisible] =\n useState(isConfirmationVisible);\n\n const handleLottieRender = useCallback(() => {\n animationRef.current?.playSegments(ANIMATION_SEGMENTS.INITIAL, true);\n const onComplete = () => {\n animationRef.current?.removeEventListener('complete', onComplete);\n setIsMessageVisible(true);\n onShowContent(true);\n\n animationRef.current?.playSegments(ANIMATION_SEGMENTS.FINAL, true);\n };\n\n animationRef.current?.addEventListener('complete', onComplete);\n }, [onShowContent]);\n\n useImperativeHandle(\n ref,\n () => ({\n fadeOutMessage: () =>\n new Promise<void>(resolve => {\n onShowContent(false);\n timeoutRef.current = setTimeout(() => {\n setIsMessageVisible(false);\n resolve();\n }, FADE_TIMEOUT);\n }),\n\n playConfirmationFrames: () =>\n new Promise<void>(resolve => {\n animationRef.current?.playSegments(confirmationFrames, true);\n if (confirmationMessage) {\n setIsMessageVisible(false);\n }\n timeoutRef.current = setTimeout(() => {\n if (confirmationMessage) {\n setIsConfirmationMessageVisible(true);\n }\n setIsMessageVisible(true);\n resolve();\n }, FADE_TIMEOUT);\n }),\n }),\n [confirmationFrames, confirmationMessage, onShowContent],\n );\n\n const displayMessage = useMemo(() => {\n return isConfirmationMessageVisible && confirmationMessage ? confirmationMessage : message;\n }, [isConfirmationMessageVisible, confirmationMessage, message]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n useEffect(() => {\n setIsConfirmationMessageVisible(isConfirmationVisible);\n }, [isConfirmationVisible]);\n\n useEffect(() => {\n setIsMessageVisible(true);\n onShowContent(true);\n }, [message, onShowContent]);\n\n return (\n <Styled.Wrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexColumnGapX={0.5}\n $height={height}\n >\n <FlexView $width={80} $height={80}>\n <LottieAnimation\n width={80}\n height={80}\n src={LOTTIE.ANIMATED_AVATAR}\n ref={animationRef}\n onRender={handleLottieRender}\n settings={animationSettings}\n />\n </FlexView>\n {isMessageVisible && (\n <FlexView $flex={1}>\n <Styled.MessageWrapper\n $gutterX={1}\n $gapX={0.5}\n $background=\"BLACK_3\"\n $borderColor=\"BLACK_5\"\n isVisible={isMessageVisible}\n >\n <AnimatedText text={displayMessage} speed={20} />\n </Styled.MessageWrapper>\n </FlexView>\n )}\n </Styled.Wrapper>\n );\n};\n\nexport default memo(AnimatedAvatarMessage);\n"],"names":["animationSettings","AnimatedAvatarMessage","message","confirmationMessage","onShowContent","confirmationFrames","isConfirmationVisible","ref","height","animationRef","useRef","timeoutRef","isMessageVisible","setIsMessageVisible","useState","isConfirmationMessageVisible","setIsConfirmationMessageVisible","handleLottieRender","useCallback","_a","ANIMATION_SEGMENTS","onComplete","_b","useImperativeHandle","resolve","FADE_TIMEOUT","displayMessage","useMemo","useEffect","jsxs","Styled.Wrapper","jsx","FlexView","LottieAnimation","LOTTIE","Styled.MessageWrapper","AnimatedText","animatedAvatarMessage","memo"],"mappings":";;;;;;;;AAqBA,MAAMA,IAAoB;AAAA,EACxB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAyD,CAAC;AAAA,EAC9D,SAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,KAAAC;AAAA,EACA,QAAAC,IAAS;AACX,MAAM;AACE,QAAAC,IAAeC,EAAmC,IAAI,GACtDC,IAAaD,EAA6C,IAAI,GAC9D,CAACE,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxD,CAACC,GAA8BC,CAA+B,IAClEF,EAASR,CAAqB,GAE1BW,IAAqBC,EAAY,MAAM;;AAC3C,KAAAC,IAAAV,EAAa,YAAb,QAAAU,EAAsB,aAAaC,EAAmB,SAAS;AAC/D,UAAMC,IAAa,MAAM;;AACV,OAAAF,IAAAV,EAAA,YAAA,QAAAU,EAAS,oBAAoB,YAAYE,IACtDR,EAAoB,EAAI,GACxBT,EAAc,EAAI,IAElBkB,IAAAb,EAAa,YAAb,QAAAa,EAAsB,aAAaF,EAAmB,OAAO;AAAA,IAAI;AAGtD,KAAAE,IAAAb,EAAA,YAAA,QAAAa,EAAS,iBAAiB,YAAYD;AAAA,EAAU,GAC5D,CAACjB,CAAa,CAAC;AAElB,EAAAmB;AAAA,IACEhB;AAAA,IACA,OAAO;AAAA,MACL,gBAAgB,MACd,IAAI,QAAc,CAAWiB,MAAA;AAC3B,QAAApB,EAAc,EAAK,GACRO,EAAA,UAA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ACC,gBAAAmB,EAACC,GAAS,EAAA,OAAO,GACf,UAAA,gBAAAD;AAAA,UAACI;AAAAA,UAAA;AAAA,YACC,UAAU;AAAA,YACV,OAAO;AAAA,YACP,aAAY;AAAA,YACZ,cAAa;AAAA,YACb,WAAWvB;AAAA,YAEX,UAAC,gBAAAmB,EAAAK,GAAA,EAAa,MAAMV,GAAgB,OAAO,IAAI;AAAA,UAAA;AAAA,QAAA,GAEnD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEeW,IAAAC,EAAKrC,CAAqB;"}
@@ -1,77 +1,74 @@
1
- import { jsx as o, jsxs as R } from "react/jsx-runtime";
2
- import { memo as _, useState as L, useCallback as l, useEffect as j } from "react";
3
- import { useTheme as k } from "styled-components";
4
- import y from "../../../ui/arrow-tooltip/arrow-tooltip.js";
5
- import B from "../../../ui/hooks/use-click-handler.js";
6
- import O from "../../../ui/layout/flex-view.js";
7
- import P from "../../../ui/lottie-animation/lottie-animation.js";
8
- import { Wrapper as S, IconWrapper as X, Label as Y } from "./pill-button-styled.js";
9
- const D = {
1
+ import { jsx as o, jsxs as b } from "react/jsx-runtime";
2
+ import { memo as H, useState as L, useCallback as l, useEffect as M } from "react";
3
+ import { useTheme as R } from "styled-components";
4
+ import _ from "../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import j from "../../../ui/layout/flex-view.js";
6
+ import y from "../../../ui/lottie-animation/lottie-animation.js";
7
+ import { Wrapper as B, IconWrapper as O, Label as P } from "./pill-button-styled.js";
8
+ const X = {
10
9
  autoplay: !0,
11
10
  loop: !0,
12
11
  renderer: "canvas"
13
- }, F = ({
12
+ }, k = ({
14
13
  id: i,
15
- label: u,
14
+ label: d,
16
15
  selected: t = !1,
17
16
  disabled: e = !1,
18
- animatedLabel: a = "",
17
+ animatedLabel: u = "",
19
18
  icon: r,
20
- onClick: c,
21
- tooltip: f,
22
- width: A,
23
- analyticsLabel: g,
24
- analyticsProps: v
19
+ onClick: a,
20
+ tooltip: c,
21
+ width: A
25
22
  }) => {
26
- const [C, h] = L(!1), [n, $] = L(!1), { colors: m } = k(), s = !!a, E = l(() => {
27
- c(i);
28
- }, [i, c]), { handleClick: I } = B({ label: u, analyticsLabel: g, analyticsProps: v }, E);
29
- j(() => {
23
+ const [g, f] = L(!1), [n, v] = L(!1), { colors: h } = R(), s = !!u, $ = l(() => {
24
+ a(i);
25
+ }, [i, a]), C = l(() => f(!0), []), E = l(() => f(!1), []);
26
+ M(() => {
30
27
  if (!s || e) return;
31
- const b = setInterval(() => {
32
- $((M) => !M);
28
+ const T = setInterval(() => {
29
+ v((W) => !W);
33
30
  }, 1e3);
34
- return () => clearInterval(b);
31
+ return () => clearInterval(T);
35
32
  }, [e, s]);
36
- const w = l(() => h(!0), []), H = l(() => h(!1), []), p = !!r && !e && (s || t || C), T = m[n ? "YELLOW_4" : "WHITE_1"], W = m[n && !t ? "YELLOW_4" : "WHITE_1"], d = n ? a : u, x = /* @__PURE__ */ o(
37
- S,
33
+ const m = !!r && !e && (s || t || g), I = h[n ? "YELLOW_4" : "WHITE_1"], w = h[n && !t ? "YELLOW_4" : "WHITE_1"], p = n ? u : d, x = /* @__PURE__ */ o(
34
+ B,
38
35
  {
39
36
  selected: t,
40
37
  disabled: e,
41
- onClick: I,
42
- onMouseEnter: w,
43
- onMouseLeave: H,
38
+ onClick: $,
39
+ onMouseEnter: C,
40
+ onMouseLeave: E,
44
41
  width: A,
45
- borderColor: T,
46
- children: /* @__PURE__ */ R(
47
- O,
42
+ borderColor: I,
43
+ children: /* @__PURE__ */ b(
44
+ j,
48
45
  {
49
46
  $flexDirection: "row",
50
47
  $alignItems: "center",
51
48
  $justifyContent: "center",
52
49
  $flexColumnGapX: 0.25,
53
50
  children: [
54
- r && /* @__PURE__ */ o(X, { $widthX: 1, $heightX: 1, $showLottie: p, children: /* @__PURE__ */ o(P, { src: r, settings: D }) }),
51
+ r && /* @__PURE__ */ o(O, { $widthX: 1, $heightX: 1, $showLottie: m, children: /* @__PURE__ */ o(y, { src: r, settings: X }) }),
55
52
  /* @__PURE__ */ o(
56
- Y,
53
+ P,
57
54
  {
58
- shouldOffsetLabel: p || !r,
55
+ shouldOffsetLabel: m || !r,
59
56
  selected: t,
60
57
  disabled: e,
61
58
  $renderAs: n ? t ? "ub3-bold" : "ub3" : t ? "ub2-bold" : "ub2",
62
- textColor: W,
63
- children: d
59
+ textColor: w,
60
+ children: p
64
61
  },
65
- d
62
+ p
66
63
  )
67
64
  ]
68
65
  }
69
66
  )
70
67
  }
71
68
  );
72
- return e && f ? /* @__PURE__ */ o(y, { renderAs: "primary", tooltipItem: f, position: "top", children: x }) : x;
73
- }, tt = _(F);
69
+ return e && c ? /* @__PURE__ */ o(_, { renderAs: "primary", tooltipItem: c, position: "top", children: x }) : x;
70
+ }, K = H(k);
74
71
  export {
75
- tt as default
72
+ K as default
76
73
  };
77
74
  //# sourceMappingURL=pill-button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pill-button.js","sources":["../../../../../src/features/auth/comps/pill-button/pill-button.tsx"],"sourcesContent":["import type { IPillButtonProps } from './pill-button-types';\n\nimport { useCallback, useEffect, useState, type FC, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport useClickHandler from '../../../ui/hooks/use-click-handler';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './pill-button-styled';\n\nconst lottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PillButton: FC<IPillButtonProps> = ({\n id,\n label,\n selected = false,\n disabled = false,\n animatedLabel = '',\n icon,\n onClick,\n tooltip,\n width,\n analyticsLabel,\n analyticsProps,\n}) => {\n const [isHovered, setHovered] = useState(false);\n const [highlightPhase, setHighlightPhase] = useState(false);\n const { colors } = useTheme();\n const shouldAnimate = !!animatedLabel;\n\n const handleSelect = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const { handleClick } = useClickHandler({ label, analyticsLabel, analyticsProps }, handleSelect);\n\n useEffect(() => {\n if (!shouldAnimate || disabled) return;\n\n const interval = setInterval(() => {\n setHighlightPhase(prev => !prev);\n }, 1000);\n\n return () => clearInterval(interval);\n }, [disabled, shouldAnimate]);\n\n const handleMouseEnter = useCallback(() => setHovered(true), []);\n const handleMouseLeave = useCallback(() => setHovered(false), []);\n\n const showLottie = !!icon && !disabled && (shouldAnimate || selected || isHovered);\n\n const borderColor = colors[highlightPhase ? 'YELLOW_4' : 'WHITE_1'];\n const textColor = colors[highlightPhase && !selected ? 'YELLOW_4' : 'WHITE_1'];\n const currentLabel = highlightPhase ? animatedLabel : label;\n const defaultTextRenderAs = selected ? 'ub2-bold' : 'ub2';\n const textRenderAs = highlightPhase ? (selected ? 'ub3-bold' : 'ub3') : defaultTextRenderAs;\n\n const ButtonContent = (\n <Styled.Wrapper\n selected={selected}\n disabled={disabled}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n width={width}\n borderColor={borderColor}\n >\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexColumnGapX={0.25}\n >\n {icon && (\n <Styled.IconWrapper $widthX={1} $heightX={1} $showLottie={showLottie}>\n <LottieAnimation src={icon} settings={lottieSettings} />\n </Styled.IconWrapper>\n )}\n <Styled.Label\n key={currentLabel}\n shouldOffsetLabel={showLottie || !icon}\n selected={selected}\n disabled={disabled}\n $renderAs={textRenderAs}\n textColor={textColor}\n >\n {currentLabel}\n </Styled.Label>\n </FlexView>\n </Styled.Wrapper>\n );\n\n return disabled && tooltip ? (\n <ArrowTooltip renderAs=\"primary\" tooltipItem={tooltip} position=\"top\">\n {ButtonContent}\n </ArrowTooltip>\n ) : (\n ButtonContent\n );\n};\n\nexport default memo(PillButton);\n"],"names":["lottieSettings","PillButton","id","label","selected","disabled","animatedLabel","icon","onClick","tooltip","width","analyticsLabel","analyticsProps","isHovered","setHovered","useState","highlightPhase","setHighlightPhase","colors","useTheme","shouldAnimate","handleSelect","useCallback","handleClick","useClickHandler","useEffect","interval","prev","handleMouseEnter","handleMouseLeave","showLottie","borderColor","textColor","currentLabel","ButtonContent","jsx","Styled.Wrapper","jsxs","FlexView","Styled.IconWrapper","LottieAnimation","Styled.Label","ArrowTooltip","pillButton","memo"],"mappings":";;;;;;;;AAWA,MAAMA,IAAiB;AAAA,EACrB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAmC,CAAC;AAAA,EACxC,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,eAAAC,IAAgB;AAAA,EAChB,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAWC,CAAU,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GACpD,EAAE,QAAAG,MAAWC,KACbC,IAAgB,CAAC,CAACd,GAElBe,IAAeC,EAAY,MAAM;AACrC,IAAAd,EAAQN,CAAE;AAAA,EAAA,GACT,CAACA,GAAIM,CAAO,CAAC,GAEV,EAAE,aAAAe,EAAgB,IAAAC,EAAgB,EAAE,OAAArB,GAAO,gBAAAQ,GAAgB,gBAAAC,KAAkBS,CAAY;AAE/F,EAAAI,EAAU,MAAM;AACV,QAAA,CAACL,KAAiBf,EAAU;AAE1B,UAAAqB,IAAW,YAAY,MAAM;AACf,MAAAT,EAAA,CAAAU,MAAQ,CAACA,CAAI;AAAA,OAC9B,GAAI;AAEA,WAAA,MAAM,cAAcD,CAAQ;AAAA,EAAA,GAClC,CAACrB,GAAUe,CAAa,CAAC;AAE5B,QAAMQ,IAAmBN,EAAY,MAAMR,EAAW,EAAI,GAAG,CAAA,CAAE,G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../../src/features/auth/comps/pill-button/pill-button.tsx"],"sourcesContent":["import type { IPillButtonProps } from './pill-button-types';\n\nimport { useCallback, useEffect, useState, type FC, memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './pill-button-styled';\n\nconst lottieSettings = {\n autoplay: true,\n loop: true,\n renderer: 'canvas',\n};\n\nconst PillButton: FC<IPillButtonProps> = ({\n id,\n label,\n selected = false,\n disabled = false,\n animatedLabel = '',\n icon,\n onClick,\n tooltip,\n width,\n}) => {\n const [isHovered, setHovered] = useState(false);\n const [highlightPhase, setHighlightPhase] = useState(false);\n const { colors } = useTheme();\n const shouldAnimate = !!animatedLabel;\n\n const handleClick = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const handleMouseEnter = useCallback(() => setHovered(true), []);\n const handleMouseLeave = useCallback(() => setHovered(false), []);\n\n useEffect(() => {\n if (!shouldAnimate || disabled) return;\n\n const interval = setInterval(() => {\n setHighlightPhase(prev => !prev);\n }, 1000);\n\n return () => clearInterval(interval);\n }, [disabled, shouldAnimate]);\n\n const showLottie = !!icon && !disabled && (shouldAnimate || selected || isHovered);\n\n const borderColor = colors[highlightPhase ? 'YELLOW_4' : 'WHITE_1'];\n const textColor = colors[highlightPhase && !selected ? 'YELLOW_4' : 'WHITE_1'];\n const currentLabel = highlightPhase ? animatedLabel : label;\n const defaultTextRenderAs = selected ? 'ub2-bold' : 'ub2';\n const textRenderAs = highlightPhase ? (selected ? 'ub3-bold' : 'ub3') : defaultTextRenderAs;\n\n const ButtonContent = (\n <Styled.Wrapper\n selected={selected}\n disabled={disabled}\n onClick={handleClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n width={width}\n borderColor={borderColor}\n >\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $flexColumnGapX={0.25}\n >\n {icon && (\n <Styled.IconWrapper $widthX={1} $heightX={1} $showLottie={showLottie}>\n <LottieAnimation src={icon} settings={lottieSettings} />\n </Styled.IconWrapper>\n )}\n <Styled.Label\n key={currentLabel}\n shouldOffsetLabel={showLottie || !icon}\n selected={selected}\n disabled={disabled}\n $renderAs={textRenderAs}\n textColor={textColor}\n >\n {currentLabel}\n </Styled.Label>\n </FlexView>\n </Styled.Wrapper>\n );\n\n return disabled && tooltip ? (\n <ArrowTooltip renderAs=\"primary\" tooltipItem={tooltip} position=\"top\">\n {ButtonContent}\n </ArrowTooltip>\n ) : (\n ButtonContent\n );\n};\n\nexport default memo(PillButton);\n"],"names":["lottieSettings","PillButton","id","label","selected","disabled","animatedLabel","icon","onClick","tooltip","width","isHovered","setHovered","useState","highlightPhase","setHighlightPhase","colors","useTheme","shouldAnimate","handleClick","useCallback","handleMouseEnter","handleMouseLeave","useEffect","interval","prev","showLottie","borderColor","textColor","currentLabel","ButtonContent","jsx","Styled.Wrapper","jsxs","FlexView","Styled.IconWrapper","LottieAnimation","Styled.Label","ArrowTooltip","pillButton","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAiB;AAAA,EACrB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAmC,CAAC;AAAA,EACxC,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,UAAAC,IAAW;AAAA,EACX,eAAAC,IAAgB;AAAA,EAChB,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAWC,CAAU,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GACpD,EAAE,QAAAG,MAAWC,KACbC,IAAgB,CAAC,CAACZ,GAElBa,IAAcC,EAAY,MAAM;AACpC,IAAAZ,EAAQN,CAAE;AAAA,E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,gBA8B5C,WAAAwB;AAAA,gBAEC,UAAAC;AAAA,cAAA;AAAA,cAPIA;AAAA,YAQP;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAIG,SAAAxB,KAAYI,IACjB,gBAAAsB,EAACO,GAAa,EAAA,UAAS,WAAU,aAAa7B,GAAS,UAAS,OAC7D,UAAAqB,EAAA,CACH,IAEAA;AAEJ,GAEeS,IAAAC,EAAKvC,CAAU;"}
@@ -1,11 +1,11 @@
1
- import { jsx as r, jsxs as n, Fragment as w } from "react/jsx-runtime";
2
- import { memo as A, useCallback as f } from "react";
3
- import I from "../../../ui/buttons/button/button.js";
1
+ import { jsx as r, jsxs as n, Fragment as C } from "react/jsx-runtime";
2
+ import { memo as g, useCallback as f } from "react";
3
+ import w from "../../../ui/buttons/button/button.js";
4
4
  import $ from "../../../ui/buttons/text-button/text-button.js";
5
5
  import m from "../../../ui/layout/flex-view.js";
6
6
  import a from "../../../ui/text/text.js";
7
- import { useResendTimer as E } from "./hooks/use-resend-timer.js";
8
- const H = ({
7
+ import { useResendTimer as A } from "./hooks/use-resend-timer.js";
8
+ const I = ({
9
9
  onResendOTP: l,
10
10
  onResendVoiceOTP: i,
11
11
  timerSeconds: h = 15,
@@ -14,20 +14,18 @@ const H = ({
14
14
  renderAs: x = "text",
15
15
  width: k,
16
16
  textButtonColor: s = "WHITE_T_60",
17
- size: d = "small",
18
- analyticsLabel: _,
19
- analyticsProps: C
17
+ size: d = "small"
20
18
  }) => {
21
- const { canResend: c, resetTimer: t, timeLeft: u } = E({
19
+ const { canResend: c, resetTimer: t, timeLeft: u } = A({
22
20
  initialSeconds: h
23
21
  }), b = f(() => {
24
22
  l == null || l(), t();
25
- }, [l, t]), g = f(() => {
23
+ }, [l, t]), _ = f(() => {
26
24
  i == null || i(), t();
27
25
  }, [i, t]);
28
26
  if (x === "submit")
29
27
  return /* @__PURE__ */ r(
30
- I,
28
+ w,
31
29
  {
32
30
  size: d,
33
31
  renderAs: "secondary-dark",
@@ -47,12 +45,10 @@ const H = ({
47
45
  label: "Resend",
48
46
  size: e ? "small" : "regular",
49
47
  color: s,
50
- onClick: b,
51
- analyticsLabel: _,
52
- analyticsProps: C
48
+ onClick: b
53
49
  }
54
50
  ),
55
- p && /* @__PURE__ */ n(w, { children: [
51
+ p && /* @__PURE__ */ n(C, { children: [
56
52
  /* @__PURE__ */ r(a, { $renderAs: e ? "ub3" : "ub2", $color: s, children: "or" }),
57
53
  /* @__PURE__ */ r(m, { $width: 116, children: /* @__PURE__ */ r(
58
54
  $,
@@ -60,7 +56,7 @@ const H = ({
60
56
  label: "Get code via call",
61
57
  size: e ? "small" : "regular",
62
58
  color: s,
63
- onClick: g
59
+ onClick: _
64
60
  }
65
61
  ) })
66
62
  ] })
@@ -69,8 +65,8 @@ const H = ({
69
65
  " ",
70
66
  /* @__PURE__ */ r(a, { $renderAs: e ? "ub3-bold" : "ub2-bold", $inline: !0, $color: "WHITE_T_60", children: u })
71
67
  ] }) }) });
72
- }, X = A(H);
68
+ }, F = g(I);
73
69
  export {
74
- X as default
70
+ F as default
75
71
  };
76
72
  //# sourceMappingURL=resend-otp.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resend-otp.js","sources":["../../../../../src/features/auth/comps/resend-otp/resend-otp.tsx"],"sourcesContent":["import type { IOTPResendProps } from './resend-otp-types';\n\nimport { useCallback, memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { useResendTimer } from './hooks/use-resend-timer';\n\nconst ResendOTP: React.FC<IOTPResendProps> = ({\n onResendOTP,\n onResendVoiceOTP,\n timerSeconds = 15,\n showVoiceOTP = false,\n disabled,\n renderAs = 'text',\n width,\n textButtonColor = 'WHITE_T_60',\n size = 'small',\n analyticsLabel,\n analyticsProps,\n}) => {\n const { canResend, resetTimer, timeLeft } = useResendTimer({\n initialSeconds: timerSeconds,\n });\n\n const handleResendClick = useCallback(() => {\n onResendOTP?.();\n resetTimer();\n }, [onResendOTP, resetTimer]);\n\n const handleVoiceResendClick = useCallback(() => {\n onResendVoiceOTP?.();\n resetTimer();\n }, [onResendVoiceOTP, resetTimer]);\n\n if (renderAs === 'submit') {\n return (\n <Button\n size={size}\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={canResend ? 'Resend' : `Resend in ${timeLeft}`}\n width={width}\n onClick={handleResendClick}\n disabled={!canResend || disabled}\n />\n );\n }\n\n const isXSmallSize = size === 'xsmall';\n\n return (\n <FlexView>\n {!canResend ? (\n <FlexView $width={105}>\n <Text $renderAs={isXSmallSize ? 'ub3' : 'ub2'} $color=\"WHITE_T_60\">\n Resend in{' '}\n <Text $renderAs={isXSmallSize ? 'ub3-bold' : 'ub2-bold'} $inline $color=\"WHITE_T_60\">\n {timeLeft}\n </Text>\n </Text>\n </FlexView>\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.5}>\n <TextButton\n disabled={disabled}\n label=\"Resend\"\n size={isXSmallSize ? 'small' : 'regular'}\n color={textButtonColor}\n onClick={handleResendClick}\n analyticsLabel={analyticsLabel}\n analyticsProps={analyticsProps}\n />\n {showVoiceOTP && (\n <>\n <Text $renderAs={isXSmallSize ? 'ub3' : 'ub2'} $color={textButtonColor}>\n or\n </Text>\n <FlexView $width={116}>\n <TextButton\n label=\"Get code via call\"\n size={isXSmallSize ? 'small' : 'regular'}\n color={textButtonColor}\n onClick={handleVoiceResendClick}\n />\n </FlexView>\n </>\n )}\n </FlexView>\n )}\n </FlexView>\n );\n};\n\nexport default memo(ResendOTP);\n"],"names":["ResendOTP","onResendOTP","onResendVoiceOTP","timerSeconds","showVoiceOTP","disabled","renderAs","width","textButtonColor","size","analyticsLabel","analyticsProps","canResend","resetTimer","timeLeft","useResendTimer","handleResendClick","useCallback","handleVoiceResendClick","jsx","Button","isXSmallSize","FlexView","jsxs","TextBut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A;AAAA,IACF;AAAA,IACCP,KAEG,gBAAAmB,EAAAE,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAN,EAACO,KAAK,WAAWL,IAAe,QAAQ,OAAO,QAAQb,GAAiB,UAExE,KAAA,CAAA;AAAA,MACA,gBAAAW,EAACG,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAH;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,MAAMH,IAAe,UAAU;AAAA,UAC/B,OAAOb;AAAA,UACP,SAASU;AAAA,QAAA;AAAA,MAAA,GAEb;AAAA,IAAA,GACF;AAAA,EAAA,EAEJ,CAAA,sBAlCCI,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAC,EAACG,KAAK,WAAWL,IAAe,QAAQ,OAAO,QAAO,cAAa,UAAA;AAAA,IAAA;AAAA,IACvD;AAAA,IACV,gBAAAF,EAACO,GAAK,EAAA,WAAWL,IAAe,aAAa,YAAY,SAAO,IAAC,QAAO,cACrE,UACHP,EAAA,CAAA;AAAA,EACF,EAAA,CAAA,EACF,CAAA,EA6BJ,CAAA;AAEJ,GAEea,IAAAC,EAAK5B,CAAS;"}
1
+ {"version":3,"file":"resend-otp.js","sources":["../../../../../src/features/auth/comps/resend-otp/resend-otp.tsx"],"sourcesContent":["import type { IOTPResendProps } from './resend-otp-types';\n\nimport { useCallback, memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { useResendTimer } from './hooks/use-resend-timer';\n\nconst ResendOTP: React.FC<IOTPResendProps> = ({\n onResendOTP,\n onResendVoiceOTP,\n timerSeconds = 15,\n showVoiceOTP = false,\n disabled,\n renderAs = 'text',\n width,\n textButtonColor = 'WHITE_T_60',\n size = 'small',\n}) => {\n const { canResend, resetTimer, timeLeft } = useResendTimer({\n initialSeconds: timerSeconds,\n });\n\n const handleResendClick = useCallback(() => {\n onResendOTP?.();\n resetTimer();\n }, [onResendOTP, resetTimer]);\n\n const handleVoiceResendClick = useCallback(() => {\n onResendVoiceOTP?.();\n resetTimer();\n }, [onResendVoiceOTP, resetTimer]);\n\n if (renderAs === 'submit') {\n return (\n <Button\n size={size}\n renderAs=\"secondary-dark\"\n type=\"submit\"\n label={canResend ? 'Resend' : `Resend in ${timeLeft}`}\n width={width}\n onClick={handleResendClick}\n disabled={!canResend || disabled}\n />\n );\n }\n\n const isXSmallSize = size === 'xsmall';\n\n return (\n <FlexView>\n {!canResend ? (\n <FlexView $width={105}>\n <Text $renderAs={isXSmallSize ? 'ub3' : 'ub2'} $color=\"WHITE_T_60\">\n Resend in{' '}\n <Text $renderAs={isXSmallSize ? 'ub3-bold' : 'ub2-bold'} $inline $color=\"WHITE_T_60\">\n {timeLeft}\n </Text>\n </Text>\n </FlexView>\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.5}>\n <TextButton\n disabled={disabled}\n label=\"Resend\"\n size={isXSmallSize ? 'small' : 'regular'}\n color={textButtonColor}\n onClick={handleResendClick}\n />\n {showVoiceOTP && (\n <>\n <Text $renderAs={isXSmallSize ? 'ub3' : 'ub2'} $color={textButtonColor}>\n or\n </Text>\n <FlexView $width={116}>\n <TextButton\n label=\"Get code via call\"\n size={isXSmallSize ? 'small' : 'regular'}\n color={textButtonColor}\n onClick={handleVoiceResendClick}\n />\n </FlexView>\n </>\n )}\n </FlexView>\n )}\n </FlexView>\n );\n};\n\nexport default memo(ResendOTP);\n"],"names":["ResendOTP","onResendOTP","onResendVoiceOTP","timerSeconds","showVoiceOTP","disabled","renderAs","width","textButtonColor","size","canResend","resetTimer","timeLeft","useResendTimer","handleResendClick","useCallback","handleVoiceResendClick","jsx","Button","isXSmallSize","FlexView","jsxs","TextButton","Fragment","Text","ResendOtp","memo"],"mappings":";;;;;;;AAUA,MAAMA,IAAuC,CAAC;AAAA,EAC5C,aAAAC;AAAA,EACA,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,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAH;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,MAAMH,IAAe,UAAU;AAAA,UAC/B,OAAOX;AAAA,UACP,SAASQ;AAAA,QAAA;AAAA,MAAA,GAEb;AAAA,IAAA,GACF;AAAA,EAAA,EAEJ,CAAA,sBAhCCI,GAAS,EAAA,QAAQ,KAChB,UAAA,gBAAAC,EAACG,KAAK,WAAWL,IAAe,QAAQ,OAAO,QAAO,cAAa,UAAA;AAAA,IAAA;AAAA,IACvD;AAAA,IACV,gBAAAF,EAACO,GAAK,EAAA,WAAWL,IAAe,aAAa,YAAY,SAAO,IAAC,QAAO,cACrE,UACHP,EAAA,CAAA;AAAA,EACF,EAAA,CAAA,EACF,CAAA,EA2BJ,CAAA;AAEJ,GAEea,IAAAC,EAAK1B,CAAS;"}
@@ -1,32 +1,26 @@
1
- import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
- import { memo as g, useRef as x, useCallback as t, useMemo as I } from "react";
3
- import T from "../../../ui/hooks/use-click-handler.js";
4
- import _ from "../../../ui/layout/flex-view.js";
5
- import A from "../../../ui/lottie-animation/lottie-animation.js";
6
- import u from "../../../ui/text/text.js";
7
- import { Wrapper as E } from "./selectable-info-card-styled.js";
8
- const L = ({
1
+ import { jsxs as s, jsx as n } from "react/jsx-runtime";
2
+ import { memo as d, useRef as C, useCallback as t, useMemo as b } from "react";
3
+ import g from "../../../ui/layout/flex-view.js";
4
+ import x from "../../../ui/lottie-animation/lottie-animation.js";
5
+ import m from "../../../ui/text/text.js";
6
+ import { Wrapper as I } from "./selectable-info-card-styled.js";
7
+ const T = ({
9
8
  id: a,
10
- title: l,
9
+ title: u,
11
10
  description: c,
12
11
  icon: i,
13
12
  selected: r,
14
- onClick: s,
15
- analyticsLabel: f,
16
- analyticsProps: p
13
+ onClick: l
17
14
  }) => {
18
- const e = x(null), d = t(() => {
19
- s(a);
20
- }, [a, s]), { handleClick: h } = T(
21
- { label: l, analyticsLabel: f, analyticsProps: p },
22
- d
23
- ), $ = t(() => {
15
+ const e = C(null), f = t(() => {
16
+ l(a);
17
+ }, [a, l]), p = t(() => {
24
18
  var o;
25
19
  (o = e.current) == null || o.play();
26
- }, []), C = t(() => {
20
+ }, []), $ = t(() => {
27
21
  var o;
28
22
  r || (o = e.current) == null || o.stop();
29
- }, [r]), b = I(
23
+ }, [r]), h = b(
30
24
  () => ({
31
25
  autoplay: r,
32
26
  loop: !0,
@@ -34,40 +28,40 @@ const L = ({
34
28
  }),
35
29
  [r]
36
30
  );
37
- return /* @__PURE__ */ m(
38
- E,
31
+ return /* @__PURE__ */ s(
32
+ I,
39
33
  {
40
34
  $gutterX: 1,
41
35
  $gapX: 1,
42
36
  $borderColor: "WHITE",
43
37
  $flexDirection: "row",
44
38
  $background: r ? "WHITE_1" : "BLACK_1",
45
- onMouseEnter: $,
46
- onMouseLeave: C,
47
- onClick: h,
39
+ onMouseEnter: p,
40
+ onMouseLeave: $,
41
+ onClick: f,
48
42
  $flexColumnGapX: 0.5,
49
43
  selected: r,
50
44
  $alignItems: "center",
51
45
  children: [
52
46
  i && /* @__PURE__ */ n(
53
- A,
47
+ x,
54
48
  {
55
49
  src: i,
56
50
  ref: e,
57
- settings: b,
51
+ settings: h,
58
52
  width: 40,
59
53
  height: 40
60
54
  }
61
55
  ),
62
- /* @__PURE__ */ m(_, { children: [
63
- /* @__PURE__ */ n(u, { $renderAs: "ab3", $color: r ? "BLACK_1" : "WHITE", children: l }),
64
- /* @__PURE__ */ n(u, { $renderAs: "ub3", $color: r ? "BLACK_T_60" : "WHITE_T_60", children: c })
56
+ /* @__PURE__ */ s(g, { children: [
57
+ /* @__PURE__ */ n(m, { $renderAs: "ab3", $color: r ? "BLACK_1" : "WHITE", children: u }),
58
+ /* @__PURE__ */ n(m, { $renderAs: "ub3", $color: r ? "BLACK_T_60" : "WHITE_T_60", children: c })
65
59
  ] })
66
60
  ]
67
61
  }
68
62
  );
69
- }, K = g(L);
63
+ }, H = d(T);
70
64
  export {
71
- K as default
65
+ H as default
72
66
  };
73
67
  //# sourceMappingURL=selectable-info-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"selectable-info-card.js","sources":["../../../../../src/features/auth/comps/selectable-info-card/selectable-info-card.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ISelectableInfoCardProps } from './selectable-info-card-types';\n\nimport { useCallback, useMemo, useRef, memo } from 'react';\n\nimport useClickHandler from '../../../ui/hooks/use-click-handler';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './selectable-info-card-styled';\n\nconst SelectableInfoCard = ({\n id,\n title,\n description,\n icon,\n selected,\n onClick,\n analyticsLabel,\n analyticsProps,\n}: ISelectableInfoCardProps) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const handleSelect = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const { handleClick } = useClickHandler(\n { label: title, analyticsLabel, analyticsProps },\n handleSelect,\n );\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n if (selected) return;\n animationRef.current?.stop();\n }, [selected]);\n\n const renderSettings = useMemo(\n () => ({\n autoplay: selected,\n loop: true,\n renderer: 'canvas',\n }),\n [selected],\n );\n\n return (\n <Styled.Wrapper\n $gutterX={1}\n $gapX={1}\n $borderColor=\"WHITE\"\n $flexDirection=\"row\"\n $background={selected ? 'WHITE_1' : 'BLACK_1'}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n onClick={handleClick}\n $flexColumnGapX={0.5}\n selected={selected}\n $alignItems=\"center\"\n >\n {icon && (\n <LottieAnimation\n src={icon}\n ref={animationRef}\n settings={renderSettings}\n width={40}\n height={40}\n />\n )}\n\n <FlexView>\n <Text $renderAs=\"ab3\" $color={selected ? 'BLACK_1' : 'WHITE'}>\n {title}\n </Text>\n <Text $renderAs=\"ub3\" $color={selected ? 'BLACK_T_60' : 'WHITE_T_60'}>\n {description}\n </Text>\n </FlexView>\n </Styled.Wrapper>\n );\n};\n\nexport default memo(SelectableInfoCard);\n"],"names":["SelectableInfoCard","id","title","description","icon","selected","onClick","analyticsLabel","analyticsProps","animationRef","useRef","handleSelect","useCallback","handleClick","useClickHandler","handleOnMouseEnter","_a","handleOnMouseLeave","renderSettings","useMemo","jsxs","Styled.Wrapper","jsx","LottieAnimation","FlexView","Text","selectableInfoCard","memo"],"mappings":";;;;;;;AAWA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,MAAgC;AACxB,QAAAC,IAAeC,EAAmC,IAAI,GAEtDC,IAAeC,EAAY,MAAM;AACrC,IAAAN,EAAQL,CAAE;AAAA,EAAA,GACT,CAACA,GAAIK,CAAO,CAAC,GAEV,EAAE,aAAAO,MAAgBC;AAAA,IACtB,EAAE,OAAOZ,GAAO,gBAAAK,GAAgB,gBAAAC,EAAe;AAAA,IAC/CG;AAAA,EAAA,GAGII,IAAqBH,EAAY,MAAM;;AAC3C,KAAAI,IAAAP,EAAa,YAAb,QAAAO,EAAsB;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAqBL,EAAY,MAAM;;AAC3C,IAAIP,MACJW,IAAAP,EAAa,YAAb,QAAAO,EAAsB;AAAA,EAAK,GAC1B,CAACX,CAAQ,CAAC,GAEPa,IAAiBC;AAAA,IACrB,OAAO;AAAA,MACL,UAAUd;AAAA,MACV,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACA,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAe;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,cAAa;AAAA,MACb,gBAAe;AAAA,MACf,aAAahB,IAAW,YAAY;AAAA,MACpC,cAAcU;AAAA,MACd,cAAcE;AAAA,MACd,SAASJ;AAAA,MACT,iBAAiB;AAAA,MACjB,UAAAR;AAAA,MACA,aAAY;AAAA,MAEX,UAAA;AAAA,QACCD,KAAA,gBAAAkB;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAKnB;AAAA,YACL,KAAKK;AAAA,YACL,UAAUS;AAAA,YACV,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA;AAAA,QACV;AAAA,0BAGDM,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAF,EAACG,KAAK,WAAU,OAAM,QAAQpB,IAAW,YAAY,SAClD,UACHH,EAAA,CAAA;AAAA,UACA,gBAAAoB,EAACG,KAAK,WAAU,OAAM,QAAQpB,IAAW,eAAe,cACrD,UACHF,EAAA,CAAA;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeuB,IAAAC,EAAK3B,CAAkB;"}
1
+ {"version":3,"file":"selectable-info-card.js","sources":["../../../../../src/features/auth/comps/selectable-info-card/selectable-info-card.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ISelectableInfoCardProps } from './selectable-info-card-types';\n\nimport { useCallback, useMemo, useRef, memo } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './selectable-info-card-styled';\n\nconst SelectableInfoCard = ({\n id,\n title,\n description,\n icon,\n selected,\n onClick,\n}: ISelectableInfoCardProps) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const handleClick = useCallback(() => {\n onClick(id);\n }, [id, onClick]);\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n if (selected) return;\n animationRef.current?.stop();\n }, [selected]);\n\n const renderSettings = useMemo(\n () => ({\n autoplay: selected,\n loop: true,\n renderer: 'canvas',\n }),\n [selected],\n );\n\n return (\n <Styled.Wrapper\n $gutterX={1}\n $gapX={1}\n $borderColor=\"WHITE\"\n $flexDirection=\"row\"\n $background={selected ? 'WHITE_1' : 'BLACK_1'}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n onClick={handleClick}\n $flexColumnGapX={0.5}\n selected={selected}\n $alignItems=\"center\"\n >\n {icon && (\n <LottieAnimation\n src={icon}\n ref={animationRef}\n settings={renderSettings}\n width={40}\n height={40}\n />\n )}\n\n <FlexView>\n <Text $renderAs=\"ab3\" $color={selected ? 'BLACK_1' : 'WHITE'}>\n {title}\n </Text>\n <Text $renderAs=\"ub3\" $color={selected ? 'BLACK_T_60' : 'WHITE_T_60'}>\n {description}\n </Text>\n </FlexView>\n </Styled.Wrapper>\n );\n};\n\nexport default memo(SelectableInfoCard);\n"],"names":["SelectableInfoCard","id","title","description","icon","selected","onClick","animationRef","useRef","handleClick","useCallback","handleOnMouseEnter","_a","handleOnMouseLeave","renderSettings","useMemo","jsxs","Styled.Wrapper","jsx","LottieAnimation","FlexView","Text","selectableInfoCard","memo"],"mappings":";;;;;;AAUA,MAAMA,IAAqB,CAAC;AAAA,EAC1B,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AACF,MAAgC;AACxB,QAAAC,IAAeC,EAAmC,IAAI,GAEtDC,IAAcC,EAAY,MAAM;AACpC,IAAAJ,EAAQL,CAAE;AAAA,EAAA,GACT,CAACA,GAAIK,CAAO,CAAC,GAEVK,IAAqBD,EAAY,MAAM;;AAC3C,KAAAE,IAAAL,EAAa,YAAb,QAAAK,EAAsB;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAqBH,EAAY,MAAM;;AAC3C,IAAIL,MACJO,IAAAL,EAAa,YAAb,QAAAK,EAAsB;AAAA,EAAK,GAC1B,CAACP,CAAQ,CAAC,GAEPS,IAAiBC;AAAA,IACrB,OAAO;AAAA,MACL,UAAUV;AAAA,MACV,MAAM;AAAA,MACN,UAAU;AAAA,IAAA;AAAA,IAEZ,CAACA,CAAQ;AAAA,EAAA;AAIT,SAAA,gBAAAW;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,cAAa;AAAA,MACb,gBAAe;AAAA,MACf,aAAaZ,IAAW,YAAY;AAAA,MACpC,cAAcM;AAAA,MACd,cAAcE;AAAA,MACd,SAASJ;AAAA,MACT,iBAAiB;AAAA,MACjB,UAAAJ;AAAA,MACA,aAAY;AAAA,MAEX,UAAA;AAAA,QACCD,KAAA,gBAAAc;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,KAAKf;AAAA,YACL,KAAKG;AAAA,YACL,UAAUO;AAAA,YACV,OAAO;AAAA,YACP,QAAQ;AAAA,UAAA;AAAA,QACV;AAAA,0BAGDM,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAF,EAACG,KAAK,WAAU,OAAM,QAAQhB,IAAW,YAAY,SAClD,UACHH,EAAA,CAAA;AAAA,UACA,gBAAAgB,EAACG,KAAK,WAAU,OAAM,QAAQhB,IAAW,eAAe,cACrD,UACHF,EAAA,CAAA;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEemB,IAAAC,EAAKvB,CAAkB;"}
@@ -13,10 +13,18 @@ const f = ({ tab: o, isSelected: e, onChange: r }) => {
13
13
  $flexDirection: "row",
14
14
  $alignItems: "center",
15
15
  $justifyContent: "center",
16
- onClick: c,
17
16
  children: [
18
17
  t ? /* @__PURE__ */ n(a, { $selected: e, $iconPosition: i, children: /* @__PURE__ */ n(t, {}) }) : void 0,
19
- /* @__PURE__ */ n($, { $renderAs: e ? "ub2-bold" : "ub2", $align: "center", $color: "WHITE", children: o.label })
18
+ /* @__PURE__ */ n(
19
+ $,
20
+ {
21
+ $renderAs: e ? "ub2-bold" : "ub2",
22
+ $align: "center",
23
+ onClick: c,
24
+ $color: "WHITE",
25
+ children: o.label
26
+ }
27
+ )
20
28
  ]
21
29
  }
22
30
  );