@cuemath/leap 2.8.36-link.3 → 2.8.36-rj-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +0 -2
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/carat-left.js +26 -0
- package/dist/assets/line-icons/icons/carat-left.js.map +1 -0
- package/dist/assets/line-icons/icons/carat-right.js +26 -0
- package/dist/assets/line-icons/icons/carat-right.js.map +1 -0
- package/dist/assets/lottie/lottie.js +6 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js +53 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js +33 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js +7 -0
- package/dist/features/circle-games/game-launcher/comps/card-container/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +53 -47
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +6 -6
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +29 -73
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +87 -85
- package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js +20 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js +24 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js +54 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js +11 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js +16 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js +161 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js +245 -0
- package/dist/features/circle-games/game-launcher/comps/tables-card/tables-card.js.map +1 -0
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +25 -15
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/game-launcher/game-launcher.js +118 -65
- package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +8 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +217 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +6 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +13 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +197 -0
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -0
- package/dist/features/circle-games/games/web-view/enums/project-type-enum.js +1 -1
- package/dist/features/circle-games/games/web-view/enums/project-type-enum.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view.js +69 -82
- package/dist/features/circle-games/games/web-view/web-view.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/post-game-stats/accuracy/accuracy-styled.js +17 -16
- package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
- package/dist/features/post-game-stats/clock/clock-styled.js +11 -10
- package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
- package/dist/features/post-game-stats/points/points.js +25 -24
- package/dist/features/post-game-stats/points/points.js.map +1 -1
- package/dist/features/post-game-stats/post-game-stats-styled.js +1 -1
- package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
- package/dist/features/post-game-stats/streak/streak-styled.js +18 -17
- package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
- package/dist/features/trial-session/comps/trial-circle-game/constants.js.map +1 -1
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/index.d.ts +80 -150
- package/dist/index.js +194 -201
- package/dist/index.js.map +1 -1
- package/dist/static/advance-mode-segment-lottie.51ff6707.json +1 -0
- package/dist/static/infinite-button-bg.5909225e.json +1 -0
- package/dist/static/infinite-button-symbol.aa31350c.json +1 -0
- package/dist/static/random-mode-segment-lottie.79cf1c07.json +1 -0
- package/dist/static/sequence-mode-segment-lottie.11ac49e9.json +1 -0
- package/dist/static/table-mode-reveal.b44a82c3.json +1 -0
- package/package.json +3 -2
- package/dist/assets/sounds/sounds.js +0 -7
- package/dist/assets/sounds/sounds.js.map +0 -1
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js +0 -7
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/constants.js.map +0 -1
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js +0 -213
- package/dist/features/circle-games/game-launcher/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
- package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js +0 -14
- package/dist/features/circle-games/games/web-view/enums/project-ids-enum.js.map +0 -1
- package/dist/features/talk-meter/helper.js +0 -11
- package/dist/features/talk-meter/helper.js.map +0 -1
- package/dist/features/talk-meter/hooks/use-talk-meter.js +0 -112
- package/dist/features/talk-meter/hooks/use-talk-meter.js.map +0 -1
- package/dist/features/talk-meter/ripple/index.js +0 -62
- package/dist/features/talk-meter/ripple/index.js.map +0 -1
- package/dist/features/talk-meter/talk-meter-styled.js +0 -89
- package/dist/features/talk-meter/talk-meter-styled.js.map +0 -1
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view-styled.js +0 -22
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view-styled.js.map +0 -1
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js +0 -101
- package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js.map +0 -1
- package/dist/features/talk-meter/talk-meter.js +0 -73
- package/dist/features/talk-meter/talk-meter.js.map +0 -1
- package/dist/static/female-avatar.b8cd1012.svg +0 -1
- package/dist/static/male-avatar.2febc9eb.svg +0 -1
@@ -1,30 +1,11 @@
|
|
1
1
|
import o from "styled-components";
|
2
|
-
import
|
3
|
-
import p from "
|
4
|
-
import { GAME_LAUNCHER_SIZE as e, GAME_LAUNCHER_ASSET_PADDING as a, delta as l, ASSET_OFFSET_X as n, ASSET_OFFSET_Y as r, ASSET_CONTAINER_SIZE as i } from "./constants.js";
|
2
|
+
import { GAME_LAUNCHER_SIZE as e } from "../card-container/constants.js";
|
3
|
+
import { GAME_LAUNCHER_ASSET_PADDING as d, delta as p, ASSET_OFFSET_X as r, ASSET_OFFSET_Y as n, ASSET_CONTAINER_SIZE as i } from "./constants.js";
|
5
4
|
const g = o.div`
|
6
|
-
position: relative;
|
7
|
-
display: flex;
|
8
|
-
justify-content: center;
|
9
|
-
`, h = o.div`
|
10
|
-
position: relative;
|
11
|
-
border-radius: ${e}px;
|
12
|
-
height: ${e}px;
|
13
|
-
width: ${e}px;
|
14
|
-
display: flex;
|
15
|
-
flex-direction: column;
|
16
|
-
justify-content: center;
|
17
|
-
align-items: center;
|
18
|
-
overflow: hidden;
|
19
|
-
align-self: center;
|
20
|
-
backdrop-filter: blur(0px);
|
21
|
-
-webkit-backdrop-filter: blur(0px);
|
22
|
-
flex-shrink: 0;
|
23
|
-
`, b = o.div`
|
24
5
|
position: absolute;
|
25
6
|
z-index: 5;
|
26
|
-
height: ${e +
|
27
|
-
width: ${e +
|
7
|
+
height: ${e + d}px;
|
8
|
+
width: ${e + d}px;
|
28
9
|
pointer-events: none;
|
29
10
|
`, s = o.div`
|
30
11
|
height: ${e}px;
|
@@ -37,24 +18,24 @@ const g = o.div`
|
|
37
18
|
border: 2px solid ${({ theme: t }) => t.colors.WHITE};
|
38
19
|
backdrop-filter: blur(0px);
|
39
20
|
-webkit-backdrop-filter: blur(0px);
|
40
|
-
`,
|
21
|
+
`, h = o(s)`
|
41
22
|
transform-origin: bottom right;
|
42
23
|
transform: rotate(-32deg) skew(-32deg);
|
43
24
|
translate: -${e / 2}px -${e / 2}px;
|
44
25
|
border-right-width: 1px;
|
45
|
-
`,
|
26
|
+
`, c = o(s)`
|
46
27
|
transform-origin: bottom left;
|
47
28
|
transform: rotate(32deg) skew(32deg);
|
48
29
|
translate: ${e / 2}px -${e / 2}px;
|
49
30
|
border-left-width: 1px;
|
50
|
-
`,
|
31
|
+
`, f = o(s)`
|
51
32
|
height: ${e / 2}px;
|
52
33
|
width: ${e}px;
|
53
34
|
bottom: 0;
|
54
35
|
left: 0;
|
55
36
|
z-index: 1;
|
56
37
|
border: none;
|
57
|
-
`,
|
38
|
+
`, m = o.div`
|
58
39
|
height: inherit;
|
59
40
|
width: inherit;
|
60
41
|
overflow: hidden;
|
@@ -62,16 +43,16 @@ const g = o.div`
|
|
62
43
|
display: flex;
|
63
44
|
justify-content: center;
|
64
45
|
align-items: center;
|
65
|
-
`,
|
46
|
+
`, b = o.div`
|
66
47
|
flex: 1;
|
67
48
|
background: transparent;
|
68
|
-
height: ${e / 2 +
|
49
|
+
height: ${e / 2 + p}px;
|
69
50
|
width: ${e}px;
|
70
51
|
position: absolute;
|
71
52
|
display: flex;
|
72
53
|
justify-content: center;
|
73
54
|
align-items: center;
|
74
|
-
bottom: ${({ $segmentType: t = "bottom" }) => t === "bottom" ? "unset" : `-${
|
55
|
+
bottom: ${({ $segmentType: t = "bottom" }) => t === "bottom" ? "unset" : `-${p}px`};
|
75
56
|
transform-origin: ${({ $segmentType: t }) => {
|
76
57
|
switch (t) {
|
77
58
|
case "left":
|
@@ -92,11 +73,11 @@ const g = o.div`
|
|
92
73
|
return "none";
|
93
74
|
}
|
94
75
|
}};
|
95
|
-
`,
|
76
|
+
`, $ = o.div`
|
96
77
|
position: absolute;
|
97
|
-
right: ${({ $segmentType: t }) => t === "left" ? `-${
|
98
|
-
left: ${({ $segmentType: t }) => t === "right" ? `-${
|
99
|
-
bottom: ${({ $segmentType: t }) => t === "bottom" ? `-${
|
78
|
+
right: ${({ $segmentType: t }) => t === "left" ? `-${r}px` : "unset"};
|
79
|
+
left: ${({ $segmentType: t }) => t === "right" ? `-${r}px` : "unset"};
|
80
|
+
bottom: ${({ $segmentType: t }) => t === "bottom" ? `-${n}px` : `-${n}px`};
|
100
81
|
height: ${i}px;
|
101
82
|
width: ${i}px;
|
102
83
|
display: flex;
|
@@ -109,11 +90,11 @@ const g = o.div`
|
|
109
90
|
background: ${({ theme: t }) => t.colors.WHITE_T_15};
|
110
91
|
cursor: pointer;
|
111
92
|
}
|
112
|
-
`,
|
93
|
+
`, u = o.div`
|
113
94
|
position: absolute;
|
114
|
-
right: ${({ $segmentType: t }) => t === "left" ? `-${
|
115
|
-
left: ${({ $segmentType: t }) => t === "right" ? `-${
|
116
|
-
bottom: ${({ $segmentType: t }) => t === "bottom" ? `-${
|
95
|
+
right: ${({ $segmentType: t }) => t === "left" ? `-${r}px` : "unset"};
|
96
|
+
left: ${({ $segmentType: t }) => t === "right" ? `-${r}px` : "unset"};
|
97
|
+
bottom: ${({ $segmentType: t }) => t === "bottom" ? `-${n}px` : `-${n}px`};
|
117
98
|
height: ${i}px;
|
118
99
|
width: ${i}px;
|
119
100
|
z-index: 5;
|
@@ -123,44 +104,19 @@ const g = o.div`
|
|
123
104
|
display: flex;
|
124
105
|
align-items: center;
|
125
106
|
justify-content: center;
|
126
|
-
`,
|
107
|
+
`, w = o.div`
|
127
108
|
position: absolute;
|
128
109
|
z-index: 6;
|
129
|
-
`, _ = o(d)`
|
130
|
-
z-index: 1;
|
131
|
-
top: -28px;
|
132
|
-
`, A = o(p)`
|
133
|
-
transition: color 0.5s ease-in-out;
|
134
|
-
|
135
|
-
${({ isAnimated: t }) => t && `
|
136
|
-
animation: zoomInOut 1s ease-in-out infinite;
|
137
|
-
`}
|
138
|
-
|
139
|
-
@keyframes zoomInOut {
|
140
|
-
0% {
|
141
|
-
transform: scale(1);
|
142
|
-
}
|
143
|
-
50% {
|
144
|
-
transform: scale(1.05);
|
145
|
-
}
|
146
|
-
100% {
|
147
|
-
transform: scale(1);
|
148
|
-
}
|
149
|
-
}
|
150
110
|
`;
|
151
111
|
export {
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
E as SegmentOverlay,
|
162
|
-
$ as SegmentRight,
|
163
|
-
g as SegmentedCard,
|
164
|
-
h as SegmentedCardWrapper
|
112
|
+
g as CircularProgressLottieContainer,
|
113
|
+
w as IconWrapper,
|
114
|
+
$ as SegmentAssetContainer,
|
115
|
+
f as SegmentBottom,
|
116
|
+
m as SegmentContainer,
|
117
|
+
b as SegmentContentContainer,
|
118
|
+
h as SegmentLeft,
|
119
|
+
u as SegmentOverlay,
|
120
|
+
c as SegmentRight
|
165
121
|
};
|
166
122
|
//# sourceMappingURL=segmented-game-card-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"segmented-game-card-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.tsx"],"sourcesContent":["import type { TSegment } from './segmented-game-card-types';\n\nimport styled from 'styled-components';\n\nimport
|
1
|
+
{"version":3,"file":"segmented-game-card-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.tsx"],"sourcesContent":["import type { TSegment } from './segmented-game-card-types';\n\nimport styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../card-container/constants';\nimport {\n ASSET_CONTAINER_SIZE,\n delta,\n ASSET_OFFSET_X,\n ASSET_OFFSET_Y,\n GAME_LAUNCHER_ASSET_PADDING,\n} from './constants';\n\nexport const CircularProgressLottieContainer = styled.div`\n position: absolute;\n z-index: 5;\n height: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n width: ${GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING}px;\n pointer-events: none;\n`;\n\n// might be needed later-----\n// export const SegmentDevider = styled.div<{ angle: number }>`\n// width: ${GAME_LAUNCHER_SIZE / 2}px;\n// height: 2px;\n// position: absolute;\n// background: #fff;\n// transform-origin: left;\n// transform: ${({ angle }) => `rotate(${angle}deg)`};\n// `;\n\nconst Segment = styled.div`\n height: ${GAME_LAUNCHER_SIZE}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n overflow: hidden;\n display: flex;\n position: absolute;\n background: ${({ theme }) => theme.colors.BLACK_1};\n z-index: 2;\n border: 2px solid ${({ theme }) => theme.colors.WHITE};\n backdrop-filter: blur(0px);\n -webkit-backdrop-filter: blur(0px);\n`;\n\nexport const SegmentLeft = styled(Segment)<{\n $angle?: number;\n}>`\n transform-origin: bottom right;\n transform: rotate(-32deg) skew(-32deg);\n translate: -${GAME_LAUNCHER_SIZE / 2}px -${GAME_LAUNCHER_SIZE / 2}px;\n border-right-width: 1px;\n`;\n\nexport const SegmentRight = styled(Segment)<{\n $angle?: number;\n}>`\n transform-origin: bottom left;\n transform: rotate(32deg) skew(32deg);\n translate: ${GAME_LAUNCHER_SIZE / 2}px -${GAME_LAUNCHER_SIZE / 2}px;\n border-left-width: 1px;\n`;\n\nexport const SegmentBottom = styled(Segment)<{\n $angle?: number;\n}>`\n height: ${GAME_LAUNCHER_SIZE / 2}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n bottom: 0;\n left: 0;\n z-index: 1;\n border: none;\n`;\n\nexport const SegmentContainer = styled.div`\n height: inherit;\n width: inherit;\n overflow: hidden;\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n`;\n\nexport const SegmentContentContainer = styled.div<{ $segmentType?: TSegment }>`\n flex: 1;\n background: transparent;\n height: ${GAME_LAUNCHER_SIZE / 2 + delta}px;\n width: ${GAME_LAUNCHER_SIZE}px;\n position: absolute;\n display: flex;\n justify-content: center;\n align-items: center;\n bottom: ${({ $segmentType = 'bottom' }) => ($segmentType === 'bottom' ? 'unset' : `-${delta}px`)};\n transform-origin: ${({ $segmentType }) => {\n switch ($segmentType) {\n case 'left':\n return 'bottom right';\n case 'right':\n return 'bottom left';\n default:\n return 'unset';\n }\n }};\n transform: ${({ $segmentType = 'bottom' }) => {\n switch ($segmentType) {\n case 'left':\n return 'skew(32deg) rotate(32deg)';\n case 'right':\n return 'skew(-32deg) rotate(-32deg)';\n default:\n return 'none';\n }\n }};\n`;\n\nexport const SegmentAssetContainer = styled.div<{\n $segmentType?: TSegment;\n}>`\n position: absolute;\n right: ${({ $segmentType }) => ($segmentType === 'left' ? `-${ASSET_OFFSET_X}px` : 'unset')};\n left: ${({ $segmentType }) => ($segmentType === 'right' ? `-${ASSET_OFFSET_X}px` : 'unset')};\n bottom: ${({ $segmentType }) =>\n $segmentType === 'bottom' ? `-${ASSET_OFFSET_Y}px` : `-${ASSET_OFFSET_Y}px`};\n height: ${ASSET_CONTAINER_SIZE}px;\n width: ${ASSET_CONTAINER_SIZE}px;\n display: flex;\n align-items: center;\n overflow: hidden;\n background-color: transparent;\n z-index: 1;\n flex-shrink: 0;\n &:hover {\n background: ${({ theme }) => theme.colors.WHITE_T_15};\n cursor: pointer;\n }\n`;\n\nexport const SegmentOverlay = styled.div<{ $segmentType?: TSegment }>`\n position: absolute;\n right: ${({ $segmentType }) => ($segmentType === 'left' ? `-${ASSET_OFFSET_X}px` : 'unset')};\n left: ${({ $segmentType }) => ($segmentType === 'right' ? `-${ASSET_OFFSET_X}px` : 'unset')};\n bottom: ${({ $segmentType }) =>\n $segmentType === 'bottom' ? `-${ASSET_OFFSET_Y}px` : `-${ASSET_OFFSET_Y}px`};\n height: ${ASSET_CONTAINER_SIZE}px;\n width: ${ASSET_CONTAINER_SIZE}px;\n z-index: 5;\n backdrop-filter: blur(16px);\n -webkit-backdrop-filter: blur(16px);\n /* pointer-events: none; */\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const IconWrapper = styled.div`\n position: absolute;\n z-index: 6;\n`;\n"],"names":["CircularProgressLottieContainer","styled","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_ASSET_PADDING","Segment","theme","SegmentLeft","SegmentRight","SegmentBottom","SegmentContainer","SegmentContentContainer","delta","$segmentType","SegmentAssetContainer","ASSET_OFFSET_X","ASSET_OFFSET_Y","ASSET_CONTAINER_SIZE","SegmentOverlay","IconWrapper"],"mappings":";;;AAaO,MAAMA,IAAkCC,EAAO;AAAA;AAAA;AAAA,YAG1CC,IAAqBC,CAA2B;AAAA,WACjDD,IAAqBC,CAA2B;AAAA;AAAA,GAcrDC,I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CAAc,OAAO,OAAQ;AAAA,UACnF,CAAC,EAAE,cAAAF,EAAa,MAAOA,MAAiB,UAAU,IAAIE,CAAc,OAAO,OAAQ;AAAA,YACjF,CAAC,EAAE,cAAAF,EAAA,MACXA,MAAiB,WAAW,IAAIG,CAAc,OAAO,IAAIA,CAAc,IAAI;AAAA,YACnEC,CAAoB;AAAA,WACrBA,CAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAQb,CAAC,EAAE,OAAAX,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,GAK3CY,IAAiBhB,EAAO;AAAA;AAAA,WAE1B,CAAC,EAAE,cAAAW,EAAa,MAAOA,MAAiB,SAAS,IAAIE,CAAc,OAAO,OAAQ;AAAA,UACnF,CAAC,EAAE,cAAAF,EAAa,MAAOA,MAAiB,UAAU,IAAIE,CAAc,OAAO,OAAQ;AAAA,YACjF,CAAC,EAAE,cAAAF,EAAA,MACXA,MAAiB,WAAW,IAAIG,CAAc,OAAO,IAAIA,CAAc,IAAI;AAAA,YACnEC,CAAoB;AAAA,WACrBA,CAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUlBE,IAAcjB,EAAO;AAAA;AAAA;AAAA;"}
|
package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js
CHANGED
@@ -1,116 +1,118 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import { memo as
|
4
|
-
import
|
5
|
-
import { LOTTIE as
|
6
|
-
import { fetchLottie as
|
7
|
-
import
|
8
|
-
import {
|
1
|
+
import { jsxs as I, jsx as t } from "react/jsx-runtime";
|
2
|
+
import v from "lottie-web";
|
3
|
+
import { memo as H, forwardRef as w, useRef as T, useState as h, useCallback as c, useImperativeHandle as F, useMemo as E, useEffect as G } from "react";
|
4
|
+
import $ from "../../../../../assets/line-icons/icons/check.js";
|
5
|
+
import { LOTTIE as j } from "../../../../../assets/lottie/lottie.js";
|
6
|
+
import { fetchLottie as O } from "../../../../ui/lottie-animation/helper.js";
|
7
|
+
import U from "../../../../ui/lottie-animation/lottie-animation.js";
|
8
|
+
import { CardContainer as x } from "../card-container/card-container.js";
|
9
|
+
import { CircularProgressLottieContainer as B, SegmentLeft as D, SegmentRight as N, SegmentBottom as q, SegmentContainer as z, SegmentContentContainer as J, SegmentAssetContainer as K, SegmentOverlay as Q, IconWrapper as X } from "./segmented-game-card-styled.js";
|
9
10
|
const S = ({
|
10
|
-
segmentType:
|
11
|
+
segmentType: e,
|
11
12
|
isCompleted: i,
|
12
13
|
card: m,
|
13
14
|
name: l,
|
14
15
|
onMouseEnter: s
|
15
16
|
}) => {
|
16
|
-
const
|
17
|
-
|
17
|
+
const a = T(null);
|
18
|
+
G(() => {
|
18
19
|
let o = null;
|
19
20
|
return (async () => {
|
20
|
-
const
|
21
|
-
o =
|
22
|
-
container:
|
21
|
+
const p = await O(m);
|
22
|
+
o = v.loadAnimation({
|
23
|
+
container: a.current,
|
23
24
|
renderer: "canvas",
|
24
25
|
loop: !0,
|
25
26
|
autoplay: !0,
|
26
|
-
animationData:
|
27
|
+
animationData: p
|
27
28
|
});
|
28
29
|
})(), () => o == null ? void 0 : o.destroy();
|
29
30
|
}, [m]);
|
30
|
-
const
|
31
|
-
return /* @__PURE__ */
|
32
|
-
/* @__PURE__ */
|
33
|
-
i && /* @__PURE__ */
|
31
|
+
const d = c(() => s(l), [s, l]);
|
32
|
+
return /* @__PURE__ */ t(z, { children: /* @__PURE__ */ I(J, { $segmentType: e, onMouseEnter: d, children: [
|
33
|
+
/* @__PURE__ */ t(K, { ref: a, $segmentType: e }),
|
34
|
+
i && /* @__PURE__ */ t(Q, { $segmentType: e, children: /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t($, { color: "#fff", height: 40, width: 40 }) }) })
|
34
35
|
] }) });
|
35
|
-
},
|
36
|
-
const
|
37
|
-
|
38
|
-
}, []),
|
39
|
-
|
40
|
-
}, [i]),
|
41
|
-
|
42
|
-
|
43
|
-
|
36
|
+
}, Y = ({ data: e, label: i, initialValue: m = 0, value: l, maxValue: s = 1 }, a) => {
|
37
|
+
const d = T(null), o = T(null), [u, p] = h(i), [L, y] = h(!1), [R, P] = h("WHITE_T_87"), _ = u !== i, C = c((n) => {
|
38
|
+
p(n);
|
39
|
+
}, []), b = c(() => {
|
40
|
+
p(i);
|
41
|
+
}, [i]), g = c(
|
42
|
+
(n) => {
|
43
|
+
var r, f;
|
44
|
+
(f = (r = e[n]) == null ? void 0 : r.onPress) == null || f.call(r);
|
45
|
+
},
|
46
|
+
[e]
|
47
|
+
), M = c((n) => {
|
44
48
|
y(!0), P(n);
|
45
49
|
}, []);
|
46
|
-
|
47
|
-
labelRef:
|
50
|
+
F(a, () => ({
|
51
|
+
labelRef: d,
|
48
52
|
segmentedCardWrapperRef: o,
|
49
|
-
startLabelAnimation:
|
53
|
+
startLabelAnimation: M
|
50
54
|
}));
|
51
|
-
const
|
55
|
+
const A = E(() => {
|
52
56
|
if (s <= 0)
|
53
57
|
return;
|
54
|
-
const n = 92, r = n / s,
|
55
|
-
return [
|
56
|
-
}, [m, s, l]),
|
58
|
+
const n = 92, r = n / s, f = Math.min(r * m, n), k = Math.min(r * l + 1, n);
|
59
|
+
return [f, k];
|
60
|
+
}, [m, s, l]), W = E(
|
57
61
|
() => ({
|
58
62
|
renderer: "canvas",
|
59
63
|
autoplay: !0,
|
60
64
|
loop: !1,
|
61
|
-
initialSegment:
|
65
|
+
initialSegment: A
|
62
66
|
}),
|
63
|
-
[
|
67
|
+
[A]
|
64
68
|
);
|
65
|
-
return /* @__PURE__ */
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
] });
|
111
|
-
}, ce = v(H(ee));
|
69
|
+
return /* @__PURE__ */ I(
|
70
|
+
x,
|
71
|
+
{
|
72
|
+
ref: o,
|
73
|
+
labelRef: d,
|
74
|
+
label: u,
|
75
|
+
isAnimated: L,
|
76
|
+
onMouseLeave: b,
|
77
|
+
labelColor: L ? R : _ ? "WHITE_T_87" : "WHITE_T_60",
|
78
|
+
children: [
|
79
|
+
/* @__PURE__ */ t(B, { children: /* @__PURE__ */ t(U, { src: j.LEVELUP_RINGS, settings: W }) }),
|
80
|
+
/* @__PURE__ */ t(D, { onClick: () => g(0), children: /* @__PURE__ */ t(
|
81
|
+
S,
|
82
|
+
{
|
83
|
+
segmentType: "left",
|
84
|
+
card: e[0].card,
|
85
|
+
name: e[0].name,
|
86
|
+
isCompleted: e[0].isCompleted,
|
87
|
+
onMouseEnter: C
|
88
|
+
}
|
89
|
+
) }),
|
90
|
+
/* @__PURE__ */ t(N, { onClick: () => g(1), children: /* @__PURE__ */ t(
|
91
|
+
S,
|
92
|
+
{
|
93
|
+
segmentType: "right",
|
94
|
+
card: e[1].card,
|
95
|
+
name: e[1].name,
|
96
|
+
isCompleted: e[1].isCompleted,
|
97
|
+
onMouseEnter: C
|
98
|
+
}
|
99
|
+
) }),
|
100
|
+
/* @__PURE__ */ t(q, { onClick: () => g(2), children: /* @__PURE__ */ t(
|
101
|
+
S,
|
102
|
+
{
|
103
|
+
segmentType: "bottom",
|
104
|
+
card: e[2].card,
|
105
|
+
name: e[2].name,
|
106
|
+
isCompleted: e[2].isCompleted,
|
107
|
+
onMouseEnter: C
|
108
|
+
}
|
109
|
+
) })
|
110
|
+
]
|
111
|
+
}
|
112
|
+
);
|
113
|
+
}, me = H(w(Y));
|
112
114
|
export {
|
113
115
|
S as SegmentContent,
|
114
|
-
|
116
|
+
me as SegmentedGameCard
|
115
117
|
};
|
116
118
|
//# sourceMappingURL=segmented-game-card.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"segmented-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type {\n IGameCardSegmentContentProps,\n ISegmentedGameCardProps,\n ISegmentedGameCardRefs,\n} from './segmented-game-card-types';\nimport type { AnimationItem } from 'lottie-web';\nimport type { FC, ForwardRefRenderFunction } from 'react';\n\nimport Lottie from 'lottie-web';\nimport {\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { fetchLottie } from '../../../../ui/lottie-animation/helper';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './segmented-game-card-styled';\n\nexport const SegmentContent: FC<IGameCardSegmentContentProps> = ({\n segmentType,\n isCompleted,\n card,\n name,\n onMouseEnter,\n}) => {\n const lottieAnimationRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let animation: AnimationItem | null = null;\n\n const loadLottie = async () => {\n const lottie = await fetchLottie(card);\n\n animation = Lottie.loadAnimation({\n container: lottieAnimationRef.current as Element,\n renderer: 'canvas',\n loop: true,\n autoplay: true,\n animationData: lottie,\n });\n };\n\n loadLottie();\n\n return () => {\n return animation?.destroy();\n };\n }, [card]);\n\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer ref={lottieAnimationRef} $segmentType={segmentType} />\n {isCompleted && (\n <Styled.SegmentOverlay $segmentType={segmentType}>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.SegmentOverlay>\n )}\n </Styled.SegmentContentContainer>\n </Styled.SegmentContainer>\n );\n};\n\nconst SegmentedGameCardComponent: ForwardRefRenderFunction<\n ISegmentedGameCardRefs,\n ISegmentedGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null);\n const segmentedCardWrapperRef = useRef<HTMLDivElement>(null);\n\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n const isLabelHighlighted = label !== gameCategoryLabel;\n\n const onMouseEnter = useCallback((gameName: string) => {\n setLabel(gameName);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n\n const onSegmentPress = (index: number) => {\n data[index]?.onPress?.();\n };\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n segmentedCardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <Styled.SegmentedCard>\n <Styled.ExtendedFlexView $position=\"absolute\">\n <Styled.AnimatedLabel\n ref={labelRef}\n $renderAs=\"ac3\"\n $align=\"center\"\n $color={isAnimated ? animatedColor : isLabelHighlighted ? 'WHITE_T_87' : 'WHITE_T_60'}\n isAnimated={isAnimated}\n >\n {label}\n </Styled.AnimatedLabel>\n </Styled.ExtendedFlexView>\n <Styled.SegmentedCardWrapper ref={segmentedCardWrapperRef} onMouseLeave={onMouseLeave}>\n <Styled.CircularProgressLottieContainer>\n <LottieAnimation src={LOTTIE.LEVELUP_RINGS} settings={levelUpAnimationSettings} />\n </Styled.CircularProgressLottieContainer>\n {/* left segment */}\n <Styled.SegmentLeft onClick={() => onSegmentPress(0)}>\n <SegmentContent\n segmentType={'left'}\n card={data[0]!.card}\n name={data[0]!.name}\n isCompleted={data[0]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentLeft>\n\n {/* right segment */}\n <Styled.SegmentRight onClick={() => onSegmentPress(1)}>\n <SegmentContent\n segmentType={'right'}\n card={data[1]!.card}\n name={data[1]!.name}\n isCompleted={data[1]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentRight>\n\n {/* bottom segment */}\n <Styled.SegmentBottom onClick={() => onSegmentPress(2)}>\n <SegmentContent\n segmentType={'bottom'}\n card={data[2]!.card}\n name={data[2]!.name}\n isCompleted={data[2]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentBottom>\n </Styled.SegmentedCardWrapper>\n </Styled.SegmentedCard>\n );\n};\n\nexport const SegmentedGameCard = memo(forwardRef(SegmentedGameCardComponent));\n"],"names":["SegmentContent","segmentType","isCompleted","card","name","onMouseEnter","lottieAnimationRef","useRef","useEffect","animation","lottie","fetchLottie","Lottie","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","segmentedCardWrapperRef","label","setLabel","useState","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","isLabelHighlighted","gameName","onMouseLeave","onSegmentPress","index","_b","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","Styled.SegmentedCard","Styled.ExtendedFlexView","Styled.AnimatedLabel","Styled.SegmentedCardWrapper","Styled.CircularProgressLottieContainer","LottieAnimation","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","memo","forwardRef"],"mappings":";;;;;;;;AA2BO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACE,QAAAC,IAAqBC,EAAuB,IAAI;AAEtD,EAAAC,EAAU,MAAM;AACd,QAAIC,IAAkC;AAc3B,YAZQ,YAAY;AACvB,YAAAC,IAAS,MAAMC,EAAYR,CAAI;AAErC,MAAAM,IAAYG,EAAO,cAAc;AAAA,QAC/B,WAAWN,EAAmB;AAAA,QAC9B,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,eAAeI;AAAA,MAAA,CAChB;AAAA,IAAA,MAKI,MACED,KAAA,gBAAAA,EAAW;AAAA,EACpB,GACC,CAACN,CAAI,CAAC;AAEH,QAAAU,IAAmBC,EAAY,MAAMT,EAAaD,CAAI,GAAG,CAACC,GAAcD,CAAI,CAAC;AAGjF,SAAA,gBAAAW,EAACC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAA+B,cAAcjB,GAAa,cAAcY,GACvE,UAAA;AAAA,IAAA,gBAAAE,EAACI,GAAA,EAA6B,KAAKb,GAAoB,cAAcL,GAAa;AAAA,IACjFC,uBACEkB,GAAA,EAAsB,cAAcnB,GACnC,4BAACoB,GAAA,EACC,UAAC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AA,UACf,MAAMA,EAAK,CAAC,EAAG;AAAA,UACf,aAAaA,EAAK,CAAC,EAAG;AAAA,UACtB,cAAAnB;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,MAGA,gBAAAU,EAACkD,GAAA,EAAqB,SAAS,MAAMvB,EAAe,CAAC,GACnD,UAAA,gBAAA3B;AAAA,QAACf;AAAA,QAAA;AAAA,UACC,aAAa;AAAA,UACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,UACf,MAAMA,EAAK,CAAC,EAAG;AAAA,UACf,aAAaA,EAAK,CAAC,EAAG;AAAA,UACtB,cAAAnB;AAAA,QAAA;AAAA,MAAA,GAEJ;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEa6D,KAAoBC,EAAKC,EAAW7C,EAA0B,CAAC;"}
|
1
|
+
{"version":3,"file":"segmented-game-card.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type {\n IGameCardSegmentContentProps,\n ISegmentedGameCardProps,\n ISegmentedGameCardRefs,\n} from './segmented-game-card-types';\nimport type { AnimationItem } from 'lottie-web';\nimport type { FC, ForwardRefRenderFunction } from 'react';\n\nimport Lottie from 'lottie-web';\nimport {\n forwardRef,\n memo,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport CheckIcon from '../../../../../assets/line-icons/icons/check';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { fetchLottie } from '../../../../ui/lottie-animation/helper';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { CardContainer } from '../card-container/card-container';\nimport * as Styled from './segmented-game-card-styled';\n\nexport const SegmentContent: FC<IGameCardSegmentContentProps> = ({\n segmentType,\n isCompleted,\n card,\n name,\n onMouseEnter,\n}) => {\n const lottieAnimationRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n let animation: AnimationItem | null = null;\n\n const loadLottie = async () => {\n const lottie = await fetchLottie(card);\n\n animation = Lottie.loadAnimation({\n container: lottieAnimationRef.current as Element,\n renderer: 'canvas',\n loop: true,\n autoplay: true,\n animationData: lottie,\n });\n };\n\n loadLottie();\n\n return () => {\n return animation?.destroy();\n };\n }, [card]);\n\n const handleMouseEnter = useCallback(() => onMouseEnter(name), [onMouseEnter, name]);\n\n return (\n <Styled.SegmentContainer>\n <Styled.SegmentContentContainer $segmentType={segmentType} onMouseEnter={handleMouseEnter}>\n <Styled.SegmentAssetContainer ref={lottieAnimationRef} $segmentType={segmentType} />\n {isCompleted && (\n <Styled.SegmentOverlay $segmentType={segmentType}>\n <Styled.IconWrapper>\n <CheckIcon color=\"#fff\" height={40} width={40} />\n </Styled.IconWrapper>\n </Styled.SegmentOverlay>\n )}\n </Styled.SegmentContentContainer>\n </Styled.SegmentContainer>\n );\n};\n\nconst SegmentedGameCardComponent: ForwardRefRenderFunction<\n ISegmentedGameCardRefs,\n ISegmentedGameCardProps\n> = ({ data, label: gameCategoryLabel, initialValue = 0, value, maxValue = 1 }, ref) => {\n const labelRef = useRef<HTMLDivElement>(null);\n const cardWrapperRef = useRef<HTMLDivElement>(null);\n\n const [label, setLabel] = useState<string>(gameCategoryLabel);\n const [isAnimated, setIsAnimated] = useState(false);\n const [animatedColor, setAnimatedColor] = useState<TColorNames>('WHITE_T_87');\n\n const isLabelHighlighted = label !== gameCategoryLabel;\n\n const onMouseEnter = useCallback((gameName: string) => {\n setLabel(gameName);\n }, []);\n\n const onMouseLeave = useCallback(() => {\n setLabel(gameCategoryLabel);\n }, [gameCategoryLabel]);\n\n const onSegmentPress = useCallback(\n (index: number) => {\n data[index]?.onPress?.();\n },\n [data],\n );\n\n const startLabelAnimation = useCallback((color: TColorNames) => {\n setIsAnimated(true);\n setAnimatedColor(color);\n }, []);\n\n useImperativeHandle(ref, () => ({\n labelRef,\n segmentedCardWrapperRef: cardWrapperRef,\n startLabelAnimation,\n }));\n\n const animationSegments: [number, number] | undefined = useMemo(() => {\n if (maxValue <= 0) {\n return;\n }\n\n const totalFrames = 92;\n const framesPerValue = totalFrames / maxValue;\n\n const initialFrameToPlay = Math.min(framesPerValue * initialValue, totalFrames);\n const finalFrameToPlay = Math.min(framesPerValue * value + 1, totalFrames);\n\n return [initialFrameToPlay, finalFrameToPlay];\n }, [initialValue, maxValue, value]);\n\n const levelUpAnimationSettings = useMemo(\n () => ({\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n initialSegment: animationSegments,\n }),\n [animationSegments],\n );\n\n return (\n <CardContainer\n ref={cardWrapperRef}\n labelRef={labelRef}\n label={label}\n isAnimated={isAnimated}\n onMouseLeave={onMouseLeave}\n labelColor={isAnimated ? animatedColor : isLabelHighlighted ? 'WHITE_T_87' : 'WHITE_T_60'}\n >\n <Styled.CircularProgressLottieContainer>\n <LottieAnimation src={LOTTIE.LEVELUP_RINGS} settings={levelUpAnimationSettings} />\n </Styled.CircularProgressLottieContainer>\n {/* left segment */}\n <Styled.SegmentLeft onClick={() => onSegmentPress(0)}>\n <SegmentContent\n segmentType={'left'}\n card={data[0]!.card}\n name={data[0]!.name}\n isCompleted={data[0]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentLeft>\n\n {/* right segment */}\n <Styled.SegmentRight onClick={() => onSegmentPress(1)}>\n <SegmentContent\n segmentType={'right'}\n card={data[1]!.card}\n name={data[1]!.name}\n isCompleted={data[1]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentRight>\n\n {/* bottom segment */}\n <Styled.SegmentBottom onClick={() => onSegmentPress(2)}>\n <SegmentContent\n segmentType={'bottom'}\n card={data[2]!.card}\n name={data[2]!.name}\n isCompleted={data[2]!.isCompleted}\n onMouseEnter={onMouseEnter}\n />\n </Styled.SegmentBottom>\n </CardContainer>\n );\n};\n\nexport const SegmentedGameCard = memo(forwardRef(SegmentedGameCardComponent));\n"],"names":["SegmentContent","segmentType","isCompleted","card","name","onMouseEnter","lottieAnimationRef","useRef","useEffect","animation","lottie","fetchLottie","Lottie","handleMouseEnter","useCallback","jsx","Styled.SegmentContainer","jsxs","Styled.SegmentContentContainer","Styled.SegmentAssetContainer","Styled.SegmentOverlay","Styled.IconWrapper","CheckIcon","SegmentedGameCardComponent","data","gameCategoryLabel","initialValue","value","maxValue","ref","labelRef","cardWrapperRef","label","setLabel","useState","isAnimated","setIsAnimated","animatedColor","setAnimatedColor","isLabelHighlighted","gameName","onMouseLeave","onSegmentPress","index","_b","_a","startLabelAnimation","color","useImperativeHandle","animationSegments","useMemo","totalFrames","framesPerValue","initialFrameToPlay","finalFrameToPlay","levelUpAnimationSettings","CardContainer","Styled.CircularProgressLottieContainer","LottieAnimation","LOTTIE","Styled.SegmentLeft","Styled.SegmentRight","Styled.SegmentBottom","SegmentedGameCard","memo","forwardRef"],"mappings":";;;;;;;;;AA4BO,MAAMA,IAAmD,CAAC;AAAA,EAC/D,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AACF,MAAM;AACE,QAAAC,IAAqBC,EAAuB,IAAI;AAEtD,EAAAC,EAAU,MAAM;AACd,QAAIC,IAAkC;AAc3B,YAZQ,YAAY;AACvB,YAAAC,IAAS,MAAMC,EAAYR,CAAI;AAErC,MAAAM,IAAYG,EAAO,cAAc;AAAA,QAC/B,WAAWN,EAAmB;AAAA,QAC9B,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,eAAeI;AAAA,MAAA,CAChB;AAAA,IAAA,MAKI,MACED,KAAA,gBAAAA,EAAW;AAAA,EACpB,GACC,CAACN,CAAI,CAAC;AAEH,QAAAU,IAAmBC,EAAY,MAAMT,EAAaD,CAAI,GAAG,CAACC,GAAcD,CAAI,CAAC;AAGjF,SAAA,gBAAAW,EAACC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EAA+B,cAAcjB,GAAa,cAAcY,GACvE,UAA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MAAMwB,EAAK,CAAC,EAAG;AAAA,YACf,MAAMA,EAAK,CAAC,EAAG;AAAA,YACf,aAAaA,EAAK,CAAC,EAAG;AAAA,YACtB,cAAAnB;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,QAGA,gBAAAU,EAAC+C,GAAA,EAAqB,SAAS,MAAMpB,EAAe,CAAC,GACnD,UAAA,gBAAA3B;AAAA,UAACf;AAAA,UAAA;AAAA,YACC,aAAa;AAAA,YACb,MAAMwB,EAAK,CAAC,EAAG;AAAA,YACf,MAAMA,EAAK,CAAC,EAAG;AAAA,YACf,aAAaA,EAAK,CAAC,EAAG;AAAA,YACtB,cAAAnB;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEa0D,KAAoBC,EAAKC,EAAW1C,CAA0B,CAAC;"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
const _ = {
|
2
|
+
REVEAL: [0, 15],
|
3
|
+
REVEAL_CONTENT: [8, 15],
|
4
|
+
DISAPPEAR_CONTENT: [21, 29],
|
5
|
+
DISAPPEAR: [21, 38]
|
6
|
+
}, A = {
|
7
|
+
random: "BLUE_4",
|
8
|
+
sequence: "YELLOW_4",
|
9
|
+
advance: "PURPLE_4"
|
10
|
+
}, E = 50, L = E + 1, N = 100, I = 1, O = 2;
|
11
|
+
export {
|
12
|
+
O as ABSOLUTE_VIEW_Z_INDEX,
|
13
|
+
L as INFINITE_MODE_Z_INDEX,
|
14
|
+
E as TABLE_CARD_SHADOW_Z_INDEX,
|
15
|
+
N as TABLE_MODE_CONTAINER_Z_INDEX,
|
16
|
+
A as TABLE_MODE_LABEL_COLOR,
|
17
|
+
I as TABLE_MODE_OVERLAY_Z_INDEX,
|
18
|
+
_ as TABLE_REVEAL_ANIMATION
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/tables-card/constants.ts"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\nimport type { TTableMode } from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { AnimationSegment } from 'lottie-web';\n\nexport const TABLE_REVEAL_ANIMATION = {\n REVEAL: [0, 15] as AnimationSegment,\n REVEAL_CONTENT: [8, 15] as AnimationSegment,\n DISAPPEAR_CONTENT: [21, 29] as AnimationSegment,\n DISAPPEAR: [21, 38] as AnimationSegment,\n};\n\nexport const TABLE_MODE_LABEL_COLOR: Partial<Record<TTableMode, TColorNames>> = {\n random: 'BLUE_4',\n sequence: 'YELLOW_4',\n advance: 'PURPLE_4',\n};\n\n// z-index 1 to 20 are for table number arc segments\nexport const TABLE_CARD_SHADOW_Z_INDEX = 50;\nexport const INFINITE_MODE_Z_INDEX = TABLE_CARD_SHADOW_Z_INDEX + 1;\nexport const TABLE_MODE_CONTAINER_Z_INDEX = 100;\n\n// table modes\nexport const TABLE_MODE_OVERLAY_Z_INDEX = 1;\nexport const ABSOLUTE_VIEW_Z_INDEX = 2;\n"],"names":["TABLE_REVEAL_ANIMATION","TABLE_MODE_LABEL_COLOR","TABLE_CARD_SHADOW_Z_INDEX","INFINITE_MODE_Z_INDEX","TABLE_MODE_CONTAINER_Z_INDEX","TABLE_MODE_OVERLAY_Z_INDEX","ABSOLUTE_VIEW_Z_INDEX"],"mappings":"AAIO,MAAMA,IAAyB;AAAA,EACpC,QAAQ,CAAC,GAAG,EAAE;AAAA,EACd,gBAAgB,CAAC,GAAG,EAAE;AAAA,EACtB,mBAAmB,CAAC,IAAI,EAAE;AAAA,EAC1B,WAAW,CAAC,IAAI,EAAE;AACpB,GAEaC,IAAmE;AAAA,EAC9E,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AACX,GAGaC,IAA4B,IAC5BC,IAAwBD,IAA4B,GACpDE,IAA+B,KAG/BC,IAA6B,GAC7BC,IAAwB;"}
|
package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.js
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
import e from "styled-components";
|
2
|
+
import { GAME_LAUNCHER_SIZE as t } from "../../card-container/constants.js";
|
3
|
+
const n = e.div`
|
4
|
+
border: 1px solid ${({ theme: o }) => o.colors.WHITE};
|
5
|
+
border-right-width: ${({ $isBorderRightRequired: o }) => o ? "1px" : "0px"};
|
6
|
+
height: ${t * 8.1 / 100}px;
|
7
|
+
width: ${t * 8.1 / 100}px;
|
8
|
+
display: flex;
|
9
|
+
align-items: center;
|
10
|
+
justify-content: center;
|
11
|
+
background-color: ${({ theme: o }) => o.colors.BLACK_1};
|
12
|
+
position: relative;
|
13
|
+
`, d = e.div`
|
14
|
+
position: absolute;
|
15
|
+
height: auto;
|
16
|
+
width: ${t * 8.1 / 100}px;
|
17
|
+
right: ${({ $right: o = "0px" }) => o};
|
18
|
+
bottom: ${({ $bottom: o = "unset" }) => o};
|
19
|
+
`;
|
20
|
+
export {
|
21
|
+
n as ModeContentSquareBlock,
|
22
|
+
d as TableModeLottieContainer
|
23
|
+
};
|
24
|
+
//# sourceMappingURL=table-mode-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table-mode-styled.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../../card-container/constants';\n\nexport const ModeContentSquareBlock = styled.div<{ $isBorderRightRequired?: boolean }>`\n border: 1px solid ${({ theme }) => theme.colors.WHITE};\n border-right-width: ${({ $isBorderRightRequired }) => ($isBorderRightRequired ? '1px' : '0px')};\n height: ${(GAME_LAUNCHER_SIZE * 8.1) / 100}px;\n width: ${(GAME_LAUNCHER_SIZE * 8.1) / 100}px;\n display: flex;\n align-items: center;\n justify-content: center;\n background-color: ${({ theme }) => theme.colors.BLACK_1};\n position: relative;\n`;\n\nexport const TableModeLottieContainer = styled.div<{ $bottom?: string; $right?: string }>`\n position: absolute;\n height: auto;\n width: ${(GAME_LAUNCHER_SIZE * 8.1) / 100}px;\n right: ${({ $right = '0px' }) => $right};\n bottom: ${({ $bottom = 'unset' }) => $bottom};\n`;\n"],"names":["ModeContentSquareBlock","styled","theme","$isBorderRightRequired","GAME_LAUNCHER_SIZE","TableModeLottieContainer","$right","$bottom"],"mappings":";;AAIO,MAAMA,IAAyBC,EAAO;AAAA,sBACvB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA,wBAC/B,CAAC,EAAE,wBAAAC,EAAA,MAA8BA,IAAyB,QAAQ,KAAM;AAAA,YACnFC,IAAqB,MAAO,GAAG;AAAA,WAChCA,IAAqB,MAAO,GAAG;AAAA;AAAA;AAAA;AAAA,sBAIrB,CAAC,EAAE,OAAAF,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAI5CG,IAA2BJ,EAAO;AAAA;AAAA;AAAA,WAGnCG,IAAqB,MAAO,GAAG;AAAA,WAChC,CAAC,EAAE,QAAAE,IAAS,MAAA,MAAYA,CAAM;AAAA,YAC7B,CAAC,EAAE,SAAAC,IAAU,QAAA,MAAcA,CAAO;AAAA;"}
|
@@ -0,0 +1,54 @@
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { memo as T } from "react";
|
3
|
+
import { LOTTIE as e } from "../../../../../../assets/lottie/lottie.js";
|
4
|
+
import l from "../../../../../ui/layout/flex-view.js";
|
5
|
+
import d from "../../../../../ui/lottie-animation/lottie-animation.js";
|
6
|
+
import _ from "../../../../../ui/separator/separator.js";
|
7
|
+
import m from "../../../../../ui/text/text.js";
|
8
|
+
import { GAME_LAUNCHER_SIZE as E, GAME_LAUNCHER_SIZE_LARGE as i } from "../../card-container/constants.js";
|
9
|
+
import f from "../table-star/table-star.js";
|
10
|
+
import { ModeContentSquareBlock as t, TableModeLottieContainer as s } from "./table-mode-styled.js";
|
11
|
+
const I = {
|
12
|
+
sequence: e.SEQUENCE_MODE_SEGMENT_LOTTIE,
|
13
|
+
random: e.RANDOM_MODE_SEGMENT_LOTTIE,
|
14
|
+
advance: e.ADVANCE_MODE_SEGMENT_LOTTIE
|
15
|
+
}, G = T(({ tableNumber: c, isStarAchieved: n, type: o }) => /* @__PURE__ */ a(l, { $alignItems: "center", children: [
|
16
|
+
/* @__PURE__ */ r(
|
17
|
+
f,
|
18
|
+
{
|
19
|
+
fill: n ? "GREEN_4" : "WHITE_T_15",
|
20
|
+
bgFill: n ? "GREEN_6" : "WHITE_T_15"
|
21
|
+
}
|
22
|
+
),
|
23
|
+
/* @__PURE__ */ r(_, { height: E === i ? 22 : 16 }),
|
24
|
+
/* @__PURE__ */ a(l, { $flexDirection: "row", children: [
|
25
|
+
/* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(
|
26
|
+
m,
|
27
|
+
{
|
28
|
+
$renderAs: E === i ? "ac3-black" : "ab2-bold",
|
29
|
+
$color: "WHITE",
|
30
|
+
children: c
|
31
|
+
}
|
32
|
+
) }),
|
33
|
+
/* @__PURE__ */ r(t, { children: /* @__PURE__ */ r(
|
34
|
+
m,
|
35
|
+
{
|
36
|
+
$renderAs: E === i ? "ac3-black" : "ab2-bold",
|
37
|
+
$color: "WHITE",
|
38
|
+
children: "×"
|
39
|
+
}
|
40
|
+
) }),
|
41
|
+
/* @__PURE__ */ r(t, { $isBorderRightRequired: o === "advance", children: /* @__PURE__ */ r(
|
42
|
+
s,
|
43
|
+
{
|
44
|
+
$bottom: o === "advance" ? "-1px" : "unset",
|
45
|
+
$right: o === "advance" ? "-1px" : "unset",
|
46
|
+
children: /* @__PURE__ */ r(d, { src: I[o] ?? "" })
|
47
|
+
}
|
48
|
+
) })
|
49
|
+
] })
|
50
|
+
] }));
|
51
|
+
export {
|
52
|
+
G as default
|
53
|
+
};
|
54
|
+
//# sourceMappingURL=table-mode.js.map
|
package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table-mode.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.tsx"],"sourcesContent":["import type { TTableMode } from '../../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport type { ITableModeProps } from './table-mode-types';\nimport type { FC } from 'react';\n\nimport { memo } 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 Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\nimport { GAME_LAUNCHER_SIZE, GAME_LAUNCHER_SIZE_LARGE } from '../../card-container/constants';\nimport TableStar from '../table-star/table-star';\nimport * as Styled from './table-mode-styled';\n\nconst LOAD_LOTTIE: Partial<Record<TTableMode, string>> = {\n sequence: LOTTIE.SEQUENCE_MODE_SEGMENT_LOTTIE,\n random: LOTTIE.RANDOM_MODE_SEGMENT_LOTTIE,\n advance: LOTTIE.ADVANCE_MODE_SEGMENT_LOTTIE,\n};\n\nconst TableMode: FC<ITableModeProps> = memo(({ tableNumber, isStarAchieved, type }) => {\n return (\n <FlexView $alignItems=\"center\">\n <TableStar\n fill={isStarAchieved ? 'GREEN_4' : 'WHITE_T_15'}\n bgFill={isStarAchieved ? 'GREEN_6' : 'WHITE_T_15'}\n />\n <Separator height={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 22 : 16} />\n <FlexView $flexDirection=\"row\">\n <Styled.ModeContentSquareBlock>\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ab2-bold'}\n $color=\"WHITE\"\n >\n {tableNumber}\n </Text>\n </Styled.ModeContentSquareBlock>\n <Styled.ModeContentSquareBlock>\n <Text\n $renderAs={GAME_LAUNCHER_SIZE === GAME_LAUNCHER_SIZE_LARGE ? 'ac3-black' : 'ab2-bold'}\n $color=\"WHITE\"\n >\n ×\n </Text>\n </Styled.ModeContentSquareBlock>\n <Styled.ModeContentSquareBlock $isBorderRightRequired={type === 'advance'}>\n <Styled.TableModeLottieContainer\n $bottom={type === 'advance' ? '-1px' : 'unset'}\n $right={type === 'advance' ? '-1px' : 'unset'}\n >\n <LottieAnimation src={LOAD_LOTTIE[type] ?? ''} />\n </Styled.TableModeLottieContainer>\n </Styled.ModeContentSquareBlock>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default TableMode;\n"],"names":["LOAD_LOTTIE","LOTTIE","TableMode","memo","tableNumber","isStarAchieved","type","jsxs","FlexView","jsx","TableStar","Separator","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_SIZE_LARGE","Styled.ModeContentSquareBlock","Text","Styled.TableModeLottieContainer","LottieAnimation"],"mappings":";;;;;;;;;;AAeA,MAAMA,IAAmD;AAAA,EACvD,UAAUC,EAAO;AAAA,EACjB,QAAQA,EAAO;AAAA,EACf,SAASA,EAAO;AAClB,GAEMC,IAAiCC,EAAK,CAAC,EAAE,aAAAC,GAAa,gBAAAC,GAAgB,MAAAC,QAExE,gBAAAC,EAACC,GAAS,EAAA,aAAY,UACpB,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAML,IAAiB,YAAY;AAAA,MACnC,QAAQA,IAAiB,YAAY;AAAA,IAAA;AAAA,EACvC;AAAA,oBACCM,GAAU,EAAA,QAAQC,MAAuBC,IAA2B,KAAK,IAAI;AAAA,EAC9E,gBAAAN,EAACC,GAAS,EAAA,gBAAe,OACvB,UAAA;AAAA,IAAC,gBAAAC,EAAAK,GAAA,EACC,UAAA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,WAAWH,MAAuBC,IAA2B,cAAc;AAAA,QAC3E,QAAO;AAAA,QAEN,UAAAT;AAAA,MAAA;AAAA,IAAA,GAEL;AAAA,IACA,gBAAAK,EAACK,GAAA,EACC,UAAA,gBAAAL;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,WAAWH,MAAuBC,IAA2B,cAAc;AAAA,QAC3E,QAAO;AAAA,QACR,UAAA;AAAA,MAAA;AAAA,IAAA,GAGH;AAAA,sBACCC,GAAA,EAA8B,wBAAwBR,MAAS,WAC9D,UAAA,gBAAAG;AAAA,MAACO;AAAAA,MAAA;AAAA,QACC,SAASV,MAAS,YAAY,SAAS;AAAA,QACvC,QAAQA,MAAS,YAAY,SAAS;AAAA,QAEtC,4BAACW,GAAgB,EAAA,KAAKjB,EAAYM,CAAI,KAAK,IAAI;AAAA,MAAA;AAAA,IAAA,GAEnD;AAAA,EAAA,GACF;AACF,EAAA,CAAA,CAEH;"}
|
package/dist/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.js
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
import c from "styled-components";
|
2
|
+
const t = c.circle`
|
3
|
+
fill: ${({ $fill: l, theme: o }) => o.colors[l]};
|
4
|
+
`, i = c.path`
|
5
|
+
fill: ${({ $fill: l, theme: o }) => o.colors[l]};
|
6
|
+
`;
|
7
|
+
export {
|
8
|
+
t as Circle,
|
9
|
+
i as Path
|
10
|
+
};
|
11
|
+
//# sourceMappingURL=table-star-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"table-star-styled.js","sources":["../../../../../../../src/features/circle-games/game-launcher/comps/tables-card/table-star/table-star-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../../ui/types';\n\nimport styled from 'styled-components';\n\nexport const Circle = styled.circle<{ $fill: TColorNames }>`\n fill: ${({ $fill, theme }) => theme.colors[$fill]};\n`;\n\nexport const Path = styled.path<{ $fill: TColorNames }>`\n fill: ${({ $fill, theme }) => theme.colors[$fill]};\n`;\n"],"names":["Circle","styled","$fill","theme","Path"],"mappings":";AAIO,MAAMA,IAASC,EAAO;AAAA,UACnB,CAAC,EAAE,OAAAC,GAAO,OAAAC,EAAA,MAAYA,EAAM,OAAOD,CAAK,CAAC;AAAA,GAGtCE,IAAOH,EAAO;AAAA,UACjB,CAAC,EAAE,OAAAC,GAAO,OAAAC,EAAA,MAAYA,EAAM,OAAOD,CAAK,CAAC;AAAA;"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { Circle as L, Path as e } from "./table-star-styled.js";
|
3
|
+
const f = ({ fill: t, bgFill: l }) => /* @__PURE__ */ i("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: [
|
4
|
+
/* @__PURE__ */ r(L, { cx: "8", cy: "8", r: "8", $fill: l }),
|
5
|
+
/* @__PURE__ */ r(
|
6
|
+
e,
|
7
|
+
{
|
8
|
+
d: "M8 2L6.23664 5.57295L2.29366 6.1459L5.14683 8.92705L4.47329 12.8541L8 11L11.5267 12.8541L10.8532 8.92705L13.7063 6.1459L9.76336 5.57295L8 2Z",
|
9
|
+
$fill: t
|
10
|
+
}
|
11
|
+
)
|
12
|
+
] });
|
13
|
+
export {
|
14
|
+
f as default
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=table-star.js.map
|