@cuemath/leap 3.2.31 → 3.2.32-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.
- package/dist/assets/illustrations/illustrations.js +5 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -6
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +4 -6
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +16 -20
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector.js +52 -54
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +1 -2
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +8 -8
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +60 -82
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +38 -41
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +14 -18
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +26 -32
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -1
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +10 -2
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js +3 -9
- package/dist/features/auth/comps/user-list/user-item/user-item-styled.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +15 -14
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/pla-signup/signup-options/signup-options.js +35 -42
- package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js +43 -43
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-item.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-utils.js +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-utils.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +4 -7
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +97 -85
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +42 -44
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +27 -33
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js +53 -68
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +46 -48
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +38 -39
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +41 -43
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +59 -61
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +89 -91
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +30 -79
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/stickers/sticker-data.js +234 -0
- package/dist/features/stickers/sticker-data.js.map +1 -0
- package/dist/features/{ui/sticker-grid/sticker-grid-styles.js → stickers/sticker-selector/sticker-selector-styles.js} +23 -31
- package/dist/features/stickers/sticker-selector/sticker-selector-styles.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +39 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker.js +59 -0
- package/dist/features/stickers/sticker-selector/sticker.js.map +1 -0
- package/dist/features/stickers/stickers-effects/effects.js +82 -0
- package/dist/features/stickers/stickers-effects/effects.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-cache.js +19 -0
- package/dist/features/stickers/stickers-effects/stickers-cache.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js +105 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +36 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +55 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -0
- package/dist/features/trial-session/comps/learning-plan/index.js +18 -19
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +8 -3
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +40 -40
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js +88 -75
- package/dist/features/ui/dot-lottie-animations/dot-lottie-animation.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +45 -43
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +48 -15
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +43 -35
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/theme/layout.js +3 -3
- package/dist/features/ui/theme/layout.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +163 -166
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +430 -375
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +86 -151
- package/dist/index.js +418 -430
- package/dist/index.js.map +1 -1
- package/dist/static/animated-avatar.1ad58b1d.json +1 -0
- package/dist/static/animated-avatar.69b07505.json +1 -0
- package/dist/static/animated-avatar.9c560b46.json +1 -0
- package/dist/static/cuemath-app-qr-code.4beefe48.svg +1 -0
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +1 -0
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/otp.2d08f874.json +1 -0
- package/dist/static/phone-number.84f55562.json +1 -0
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
- package/dist/static/target-achieved-text.053bd142.json +2830 -0
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +1 -0
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +1 -0
- package/package.json +3 -2
- package/dist/features/auth/pla-signup/pla-analytics-events.js +0 -23
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
- package/dist/features/puzzles/constants/puzzle-container.js +0 -8
- package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
- package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
- package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -107
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker-grid.js +0 -24
- package/dist/features/ui/sticker-grid/sticker-grid.js.map +0 -1
- package/dist/features/ui/sticker-grid/sticker.js +0 -57
- package/dist/features/ui/sticker-grid/sticker.js.map +0 -1
- package/dist/features/ui/stickers/constants.js +0 -6
- package/dist/features/ui/stickers/constants.js.map +0 -1
- package/dist/features/ui/stickers/stickers-effects.js +0 -64
- package/dist/features/ui/stickers/stickers-effects.js.map +0 -1
- package/dist/features/ui/stickers/stickers-styled.js +0 -29
- package/dist/features/ui/stickers/stickers-styled.js.map +0 -1
- package/dist/features/ui/stickers/stickers-utils.js +0 -91
- package/dist/features/ui/stickers/stickers-utils.js.map +0 -1
- package/dist/features/ui/stickers/stickers.js +0 -40
- package/dist/features/ui/stickers/stickers.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
- package/dist/static/animated-avatar.c3a0fa98.json +0 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
- package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
- package/dist/static/puzzle-orange-lottie.0a105c42.json +0 -21206
- package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
- package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
- package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
|
@@ -1,115 +1,93 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { LOTTIE as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { ANIMATION_SEGMENTS as
|
|
7
|
-
import { Wrapper as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
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
|
-
},
|
|
14
|
-
message:
|
|
15
|
-
confirmationMessage:
|
|
16
|
-
onShowContent:
|
|
17
|
-
confirmationFrames:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
-
|
|
38
|
-
}, [
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
34
|
+
fadeOutMessage: () => new Promise((s) => {
|
|
35
|
+
t(!1), u.current = setTimeout(() => {
|
|
36
|
+
i(!1), s();
|
|
37
|
+
}, L);
|
|
52
38
|
}),
|
|
53
|
-
playConfirmationFrames: () => new Promise((
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
|
69
|
-
return
|
|
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
|
-
}, []),
|
|
74
|
-
|
|
75
|
-
}, [
|
|
76
|
-
|
|
77
|
-
}, [
|
|
78
|
-
|
|
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:
|
|
62
|
+
$height: h,
|
|
85
63
|
children: [
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
64
|
+
/* @__PURE__ */ l(x, { $width: 80, $height: 80, children: /* @__PURE__ */ l(
|
|
65
|
+
j,
|
|
88
66
|
{
|
|
89
|
-
width:
|
|
90
|
-
height:
|
|
91
|
-
src:
|
|
92
|
-
ref:
|
|
93
|
-
onRender:
|
|
94
|
-
settings:
|
|
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
|
-
|
|
98
|
-
|
|
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:
|
|
105
|
-
children: /* @__PURE__ */
|
|
82
|
+
isVisible: p,
|
|
83
|
+
children: /* @__PURE__ */ l(F, { text: y, speed: 20 })
|
|
106
84
|
}
|
|
107
85
|
) })
|
|
108
86
|
]
|
|
109
87
|
}
|
|
110
88
|
);
|
|
111
|
-
},
|
|
89
|
+
}, U = N(k);
|
|
112
90
|
export {
|
|
113
|
-
|
|
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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9B;AAAA,MAET,UAAA;AAAA,QAAA,gBAAA+B,EAACC,GAAS,EAAA,QAAQ,KAAK,SAAS,KAC9B,UAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,KAAKC,EAAO;AAAA,YACZ,KAAKhC;AAAA,YACL,UAAUiB;AAAA,YACV,UAAU5B;AAAA,UAAA;AAAA,QAAA,GAEd;AAAA,QACCc,KACC,gBAAA0B,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,WAAW9B;AAAA,YAEX,UAAC,gBAAA0B,EAAAK,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,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EAAoB,EAAI,GACxBT,EAAc,EAAI;AAAA,EAAA,GACjB,CAACF,GAASE,CAAa,CAAC,GAGzB,gBAAAyB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,SAAStB;AAAA,MAET,UAAA;AAAA,QAAA,gBAAAuB,EAACC,GAAS,EAAA,QAAQ,IAAI,SAAS,IAC7B,UAAA,gBAAAD;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,QAAQ;AAAA,YACR,KAAKC,EAAO;AAAA,YACZ,KAAKzB;AAAA,YACL,UAAUQ;AAAA,YACV,UAAUjB;AAAA,UAAA;AAAA,QAAA,GAEd;AAAA,QACCY,KACC,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
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import P from "
|
|
8
|
-
|
|
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
|
-
},
|
|
12
|
+
}, k = ({
|
|
14
13
|
id: i,
|
|
15
|
-
label:
|
|
14
|
+
label: d,
|
|
16
15
|
selected: t = !1,
|
|
17
16
|
disabled: e = !1,
|
|
18
|
-
animatedLabel:
|
|
17
|
+
animatedLabel: u = "",
|
|
19
18
|
icon: r,
|
|
20
|
-
onClick:
|
|
21
|
-
tooltip:
|
|
22
|
-
width: A
|
|
23
|
-
analyticsLabel: g,
|
|
24
|
-
analyticsProps: v
|
|
19
|
+
onClick: a,
|
|
20
|
+
tooltip: c,
|
|
21
|
+
width: A
|
|
25
22
|
}) => {
|
|
26
|
-
const [
|
|
27
|
-
|
|
28
|
-
}, [i,
|
|
29
|
-
|
|
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
|
|
32
|
-
|
|
28
|
+
const T = setInterval(() => {
|
|
29
|
+
v((W) => !W);
|
|
33
30
|
}, 1e3);
|
|
34
|
-
return () => clearInterval(
|
|
31
|
+
return () => clearInterval(T);
|
|
35
32
|
}, [e, s]);
|
|
36
|
-
const
|
|
37
|
-
|
|
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:
|
|
42
|
-
onMouseEnter:
|
|
43
|
-
onMouseLeave:
|
|
38
|
+
onClick: $,
|
|
39
|
+
onMouseEnter: C,
|
|
40
|
+
onMouseLeave: E,
|
|
44
41
|
width: A,
|
|
45
|
-
borderColor:
|
|
46
|
-
children: /* @__PURE__ */
|
|
47
|
-
|
|
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(
|
|
51
|
+
r && /* @__PURE__ */ o(O, { $widthX: 1, $heightX: 1, $showLottie: m, children: /* @__PURE__ */ o(y, { src: r, settings: X }) }),
|
|
55
52
|
/* @__PURE__ */ o(
|
|
56
|
-
|
|
53
|
+
P,
|
|
57
54
|
{
|
|
58
|
-
shouldOffsetLabel:
|
|
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:
|
|
63
|
-
children:
|
|
59
|
+
textColor: w,
|
|
60
|
+
children: p
|
|
64
61
|
},
|
|
65
|
-
|
|
62
|
+
p
|
|
66
63
|
)
|
|
67
64
|
]
|
|
68
65
|
}
|
|
69
66
|
)
|
|
70
67
|
}
|
|
71
68
|
);
|
|
72
|
-
return e &&
|
|
73
|
-
},
|
|
69
|
+
return e && c ? /* @__PURE__ */ o(_, { renderAs: "primary", tooltipItem: c, position: "top", children: x }) : x;
|
|
70
|
+
}, K = H(k);
|
|
74
71
|
export {
|
|
75
|
-
|
|
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
|
|
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 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;AA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,GACxD,4BAACU,GAAgB,EAAA,KAAK7B,GAAM,UAAUP,EAAgB,CAAA,GACxD;AAAA,YAEF,gBAAA+B;AAAA,cAACM;AAAAA,cAAA;AAAA,gBAEC,mBAAmBX,KAAc,CAACnB;AAAA,gBAClC,UAAAH;AAAA,gBACA,UAAAC;AAAA,gBACA,WA5BaS,IAAkBV,IAAW,aAAa,QADnCA,IAAW,aAAa;AAAA,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
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
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
|
|
8
|
-
const
|
|
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 } =
|
|
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]),
|
|
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
|
-
|
|
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(
|
|
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:
|
|
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
|
-
},
|
|
68
|
+
}, F = g(I);
|
|
73
69
|
export {
|
|
74
|
-
|
|
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
|
|
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,kBAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,cAAAC,IAAe;AAAA,EACf,UAAAC;AAAA,EACA,UAAAC,IAAW;AAA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Ae,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
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
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:
|
|
9
|
+
title: u,
|
|
11
10
|
description: c,
|
|
12
11
|
icon: i,
|
|
13
12
|
selected: r,
|
|
14
|
-
onClick:
|
|
15
|
-
analyticsLabel: f,
|
|
16
|
-
analyticsProps: p
|
|
13
|
+
onClick: l
|
|
17
14
|
}) => {
|
|
18
|
-
const e =
|
|
19
|
-
|
|
20
|
-
}, [a,
|
|
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
|
-
}, []),
|
|
20
|
+
}, []), $ = t(() => {
|
|
27
21
|
var o;
|
|
28
22
|
r || (o = e.current) == null || o.stop();
|
|
29
|
-
}, [r]),
|
|
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__ */
|
|
38
|
-
|
|
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:
|
|
47
|
-
onClick:
|
|
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
|
-
|
|
47
|
+
x,
|
|
54
48
|
{
|
|
55
49
|
src: i,
|
|
56
50
|
ref: e,
|
|
57
|
-
settings:
|
|
51
|
+
settings: h,
|
|
58
52
|
width: 40,
|
|
59
53
|
height: 40
|
|
60
54
|
}
|
|
61
55
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */ n(
|
|
64
|
-
/* @__PURE__ */ n(
|
|
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
|
-
},
|
|
63
|
+
}, H = d(T);
|
|
70
64
|
export {
|
|
71
|
-
|
|
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
|
|
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(
|
|
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
|
);
|