@magmamath/students-features 0.5.6 → 0.5.7-rc-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.
Files changed (117) hide show
  1. package/dist/commonjs/features/celebrations/components/Spark.js +11 -8
  2. package/dist/commonjs/features/celebrations/components/Spark.js.map +1 -1
  3. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +6 -4
  4. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
  5. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +6 -4
  6. package/dist/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
  7. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js +21 -42
  8. package/dist/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  9. package/dist/commonjs/features/problemSelector/components/ProblemSelector.js +43 -0
  10. package/dist/commonjs/features/problemSelector/components/ProblemSelector.js.map +1 -0
  11. package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js +68 -0
  12. package/dist/commonjs/features/problemSelector/components/ProblemSelectorButton.js.map +1 -0
  13. package/dist/commonjs/features/problemSelector/constants.js +220 -0
  14. package/dist/commonjs/features/problemSelector/constants.js.map +1 -0
  15. package/dist/commonjs/features/problemSelector/index.js +20 -0
  16. package/dist/commonjs/features/problemSelector/index.js.map +1 -0
  17. package/dist/commonjs/features/problemSelector/types.js +6 -0
  18. package/dist/commonjs/features/problemSelector/types.js.map +1 -0
  19. package/dist/commonjs/index.js +12 -0
  20. package/dist/commonjs/index.js.map +1 -1
  21. package/dist/commonjs/shared/icons/LockIcon.js +31 -0
  22. package/dist/commonjs/shared/icons/LockIcon.js.map +1 -0
  23. package/dist/commonjs/shared/icons/Pi.js +3 -1
  24. package/dist/commonjs/shared/icons/Pi.js.map +1 -1
  25. package/dist/commonjs/shared/icons/Valentine.js +3 -1
  26. package/dist/commonjs/shared/icons/Valentine.js.map +1 -1
  27. package/dist/commonjs/shared/icons/Winter.js +3 -1
  28. package/dist/commonjs/shared/icons/Winter.js.map +1 -1
  29. package/dist/module/features/celebrations/components/Spark.js +11 -8
  30. package/dist/module/features/celebrations/components/Spark.js.map +1 -1
  31. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js +6 -4
  32. package/dist/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.js.map +1 -1
  33. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js +6 -4
  34. package/dist/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.js.map +1 -1
  35. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js +22 -43
  36. package/dist/module/features/endOfAssignment/components/NoAnswer/NoAnswer.js.map +1 -1
  37. package/dist/module/features/problemSelector/components/ProblemSelector.js +36 -0
  38. package/dist/module/features/problemSelector/components/ProblemSelector.js.map +1 -0
  39. package/dist/module/features/problemSelector/components/ProblemSelectorButton.js +62 -0
  40. package/dist/module/features/problemSelector/components/ProblemSelectorButton.js.map +1 -0
  41. package/dist/module/features/problemSelector/constants.js +216 -0
  42. package/dist/module/features/problemSelector/constants.js.map +1 -0
  43. package/dist/module/features/problemSelector/index.js +5 -0
  44. package/dist/module/features/problemSelector/index.js.map +1 -0
  45. package/dist/module/features/problemSelector/types.js +4 -0
  46. package/dist/module/features/problemSelector/types.js.map +1 -0
  47. package/dist/module/index.js +1 -0
  48. package/dist/module/index.js.map +1 -1
  49. package/dist/module/shared/icons/LockIcon.js +23 -0
  50. package/dist/module/shared/icons/LockIcon.js.map +1 -0
  51. package/dist/module/shared/icons/Pi.js +3 -1
  52. package/dist/module/shared/icons/Pi.js.map +1 -1
  53. package/dist/module/shared/icons/Valentine.js +3 -1
  54. package/dist/module/shared/icons/Valentine.js.map +1 -1
  55. package/dist/module/shared/icons/Winter.js +3 -1
  56. package/dist/module/shared/icons/Winter.js.map +1 -1
  57. package/dist/typescript/commonjs/features/celebrations/components/Spark.d.ts.map +1 -1
  58. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
  59. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
  60. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
  61. package/dist/typescript/commonjs/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
  62. package/dist/typescript/commonjs/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  63. package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelector.d.ts +8 -0
  64. package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelector.d.ts.map +1 -0
  65. package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts +4 -0
  66. package/dist/typescript/commonjs/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -0
  67. package/dist/typescript/commonjs/features/problemSelector/constants.d.ts +22 -0
  68. package/dist/typescript/commonjs/features/problemSelector/constants.d.ts.map +1 -0
  69. package/dist/typescript/commonjs/features/problemSelector/index.d.ts +4 -0
  70. package/dist/typescript/commonjs/features/problemSelector/index.d.ts.map +1 -0
  71. package/dist/typescript/commonjs/features/problemSelector/types.d.ts +11 -0
  72. package/dist/typescript/commonjs/features/problemSelector/types.d.ts.map +1 -0
  73. package/dist/typescript/commonjs/index.d.ts +1 -0
  74. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  75. package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts +4 -0
  76. package/dist/typescript/commonjs/shared/icons/LockIcon.d.ts.map +1 -0
  77. package/dist/typescript/commonjs/shared/icons/Pi.d.ts.map +1 -1
  78. package/dist/typescript/commonjs/shared/icons/Valentine.d.ts.map +1 -1
  79. package/dist/typescript/commonjs/shared/icons/Winter.d.ts.map +1 -1
  80. package/dist/typescript/module/features/celebrations/components/Spark.d.ts.map +1 -1
  81. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts +1 -1
  82. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/SunrisingIcon.d.ts.map +1 -1
  83. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts +1 -1
  84. package/dist/typescript/module/features/endOfAssignment/components/Modal/assets/TrophyIcon.d.ts.map +1 -1
  85. package/dist/typescript/module/features/endOfAssignment/components/NoAnswer/NoAnswer.d.ts.map +1 -1
  86. package/dist/typescript/module/features/problemSelector/components/ProblemSelector.d.ts +8 -0
  87. package/dist/typescript/module/features/problemSelector/components/ProblemSelector.d.ts.map +1 -0
  88. package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts +4 -0
  89. package/dist/typescript/module/features/problemSelector/components/ProblemSelectorButton.d.ts.map +1 -0
  90. package/dist/typescript/module/features/problemSelector/constants.d.ts +22 -0
  91. package/dist/typescript/module/features/problemSelector/constants.d.ts.map +1 -0
  92. package/dist/typescript/module/features/problemSelector/index.d.ts +4 -0
  93. package/dist/typescript/module/features/problemSelector/index.d.ts.map +1 -0
  94. package/dist/typescript/module/features/problemSelector/types.d.ts +11 -0
  95. package/dist/typescript/module/features/problemSelector/types.d.ts.map +1 -0
  96. package/dist/typescript/module/index.d.ts +1 -0
  97. package/dist/typescript/module/index.d.ts.map +1 -1
  98. package/dist/typescript/module/shared/icons/LockIcon.d.ts +4 -0
  99. package/dist/typescript/module/shared/icons/LockIcon.d.ts.map +1 -0
  100. package/dist/typescript/module/shared/icons/Pi.d.ts.map +1 -1
  101. package/dist/typescript/module/shared/icons/Valentine.d.ts.map +1 -1
  102. package/dist/typescript/module/shared/icons/Winter.d.ts.map +1 -1
  103. package/package.json +2 -2
  104. package/src/features/celebrations/components/Spark.tsx +17 -13
  105. package/src/features/endOfAssignment/components/Modal/assets/SunrisingIcon.tsx +76 -75
  106. package/src/features/endOfAssignment/components/Modal/assets/TrophyIcon.tsx +26 -25
  107. package/src/features/endOfAssignment/components/NoAnswer/NoAnswer.tsx +25 -52
  108. package/src/features/problemSelector/components/ProblemSelector.tsx +37 -0
  109. package/src/features/problemSelector/components/ProblemSelectorButton.tsx +77 -0
  110. package/src/features/problemSelector/constants.ts +216 -0
  111. package/src/features/problemSelector/index.ts +3 -0
  112. package/src/features/problemSelector/types.ts +13 -0
  113. package/src/index.ts +1 -0
  114. package/src/shared/icons/LockIcon.tsx +16 -0
  115. package/src/shared/icons/Pi.tsx +4 -1
  116. package/src/shared/icons/Valentine.tsx +4 -1
  117. package/src/shared/icons/Winter.tsx +5 -1
@@ -0,0 +1,77 @@
1
+ import React from 'react'
2
+ import { View, StyleSheet } from 'react-native'
3
+
4
+ import { UnreadMessagesBadge } from '@magmamath/students-features'
5
+ import {
6
+ Button,
7
+ ButtonSize,
8
+ ButtonStates,
9
+ ButtonVariant,
10
+ Typography,
11
+ } from '@magmamath/react-native-ui'
12
+
13
+ import { BADGE_COORDINATES, BUTTON_SIZE, COLOR_SCHEME_MAP, ICON_SIZE } from '../constants'
14
+ import { LockIcon } from '../../../shared/icons/LockIcon'
15
+
16
+ import { ProblemSelectorButtonProps } from '../types'
17
+
18
+ export const ProblemSelectorButton = ({
19
+ text,
20
+ state,
21
+ onClick,
22
+ badgeValue,
23
+ locked,
24
+ }: ProblemSelectorButtonProps) => {
25
+ const customColorScheme = COLOR_SCHEME_MAP[state]
26
+
27
+ return (
28
+ <View style={styles.wrapper}>
29
+ <Button
30
+ variant={ButtonVariant.PRIMARY}
31
+ size={ButtonSize.MEDIUM}
32
+ customColorScheme={customColorScheme}
33
+ onPress={onClick}
34
+ style={{
35
+ button: styles.button,
36
+ }}
37
+ disabled={locked}
38
+ icon={
39
+ locked ? (
40
+ <LockIcon {...ICON_SIZE} color={customColorScheme[ButtonStates.DISABLED]?.color} />
41
+ ) : (
42
+ <Typography
43
+ variant="h2"
44
+ style={{ color: customColorScheme[ButtonStates.DEFAULT]?.color }}
45
+ >
46
+ {text ?? ''}
47
+ </Typography>
48
+ )
49
+ }
50
+ />
51
+
52
+ {typeof badgeValue === 'number' && (
53
+ <UnreadMessagesBadge
54
+ badgeContent={badgeValue !== 0 ? badgeValue : undefined}
55
+ withBorder
56
+ style={[
57
+ styles.badge,
58
+ {
59
+ top: badgeValue ? 0 : BADGE_COORDINATES.top,
60
+ right: badgeValue ? 0 : BADGE_COORDINATES.right,
61
+ },
62
+ ]}
63
+ />
64
+ )}
65
+ </View>
66
+ )
67
+ }
68
+
69
+ const styles = StyleSheet.create({
70
+ wrapper: { position: 'relative' },
71
+ badge: { position: 'absolute' },
72
+ button: {
73
+ width: BUTTON_SIZE,
74
+ height: BUTTON_SIZE,
75
+ borderWidth: 2.75,
76
+ },
77
+ })
@@ -0,0 +1,216 @@
1
+ import { ButtonColorPreset, ButtonStates, COLORS } from '@magmamath/react-native-ui'
2
+ import { ProblemSelectorButtonState } from './types'
3
+
4
+ export const BUTTON_SIZE = 49.5
5
+ export const BADGE_COORDINATES = { top: 4, right: 4 }
6
+ export const ICON_SIZE = { width: 22, height: 24 }
7
+ export const PROBLEM_SELECTOR_CONTENT_WIDTH = 265
8
+
9
+ export const PROBLEM_SELECTOR_BUTTON_STATE = {
10
+ SELECTED: 'selected',
11
+ SOLVED: 'solved',
12
+ SOLVED_FIRST_ATTEMPT: 'solved-first-attempt',
13
+ NOT_SOLVED: 'not-solved',
14
+ MISTAKE: 'mistake',
15
+ EXAM: 'exam',
16
+ } as const
17
+
18
+ export const COLOR_SCHEME_MAP: Record<ProblemSelectorButtonState, ButtonColorPreset> = {
19
+ [PROBLEM_SELECTOR_BUTTON_STATE.SELECTED]: {
20
+ [ButtonStates.DEFAULT]: {
21
+ backgroundColor: COLORS.BLUE_1,
22
+ borderColor: COLORS.PRIMARY_BLUE,
23
+ color: COLORS.PRIMARY_BLUE,
24
+ raiseColor: COLORS.PRIMARY_BLUE,
25
+ },
26
+ [ButtonStates.HOVER]: {
27
+ backgroundColor: COLORS.BLUE_1,
28
+ borderColor: COLORS.BLUE_4,
29
+ color: COLORS.BLUE_4,
30
+ raiseColor: COLORS.BLUE_4,
31
+ },
32
+ [ButtonStates.ACTIVE]: {
33
+ backgroundColor: COLORS.BLUE_1,
34
+ borderColor: COLORS.BLUE_4,
35
+ color: COLORS.BLUE_4,
36
+ raiseColor: COLORS.BLUE_4,
37
+ },
38
+ [ButtonStates.PRESSED]: {
39
+ backgroundColor: COLORS.BLUE_1,
40
+ borderColor: COLORS.BLUE_4,
41
+ color: COLORS.BLUE_4,
42
+ raiseColor: COLORS.BLUE_4,
43
+ },
44
+ [ButtonStates.DISABLED]: {
45
+ backgroundColor: COLORS.BLUE_1,
46
+ borderColor: COLORS.BLUE_3,
47
+ color: COLORS.BLUE_3,
48
+ raiseColor: COLORS.BLUE_3,
49
+ },
50
+ },
51
+
52
+ [PROBLEM_SELECTOR_BUTTON_STATE.MISTAKE]: {
53
+ [ButtonStates.DEFAULT]: {
54
+ backgroundColor: COLORS.PRIMARY_RED,
55
+ borderColor: COLORS.PRIMARY_RED,
56
+ color: COLORS.NEUTRAL_1,
57
+ raiseColor: COLORS.PRIMARY_RED,
58
+ },
59
+ [ButtonStates.HOVER]: {
60
+ backgroundColor: COLORS.RED_4,
61
+ borderColor: COLORS.RED_4,
62
+ color: COLORS.NEUTRAL_1,
63
+ raiseColor: COLORS.RED_4,
64
+ },
65
+ [ButtonStates.ACTIVE]: {
66
+ backgroundColor: COLORS.RED_4,
67
+ borderColor: COLORS.RED_4,
68
+ color: COLORS.NEUTRAL_1,
69
+ raiseColor: COLORS.RED_4,
70
+ },
71
+ [ButtonStates.PRESSED]: {
72
+ backgroundColor: COLORS.RED_4,
73
+ borderColor: COLORS.RED_4,
74
+ color: COLORS.NEUTRAL_1,
75
+ raiseColor: COLORS.RED_4,
76
+ },
77
+ [ButtonStates.DISABLED]: {
78
+ backgroundColor: COLORS.RED_3,
79
+ borderColor: COLORS.RED_3,
80
+ color: COLORS.NEUTRAL_1,
81
+ raiseColor: COLORS.RED_3,
82
+ },
83
+ },
84
+
85
+ [PROBLEM_SELECTOR_BUTTON_STATE.SOLVED]: {
86
+ [ButtonStates.DEFAULT]: {
87
+ backgroundColor: COLORS.PRIMARY_YELLOW,
88
+ borderColor: COLORS.PRIMARY_YELLOW,
89
+ color: COLORS.NEUTRAL_1,
90
+ raiseColor: COLORS.PRIMARY_YELLOW,
91
+ },
92
+ [ButtonStates.HOVER]: {
93
+ backgroundColor: COLORS.YELLOW_4,
94
+ borderColor: COLORS.YELLOW_4,
95
+ color: COLORS.NEUTRAL_1,
96
+ raiseColor: COLORS.YELLOW_4,
97
+ },
98
+ [ButtonStates.ACTIVE]: {
99
+ backgroundColor: COLORS.YELLOW_4,
100
+ borderColor: COLORS.YELLOW_4,
101
+ color: COLORS.NEUTRAL_1,
102
+ raiseColor: COLORS.YELLOW_4,
103
+ },
104
+ [ButtonStates.PRESSED]: {
105
+ backgroundColor: COLORS.YELLOW_4,
106
+ borderColor: COLORS.YELLOW_4,
107
+ color: COLORS.NEUTRAL_1,
108
+ raiseColor: COLORS.YELLOW_4,
109
+ },
110
+ [ButtonStates.DISABLED]: {
111
+ backgroundColor: COLORS.YELLOW_3,
112
+ borderColor: COLORS.YELLOW_3,
113
+ color: COLORS.NEUTRAL_1,
114
+ raiseColor: COLORS.YELLOW_3,
115
+ },
116
+ },
117
+
118
+ [PROBLEM_SELECTOR_BUTTON_STATE.SOLVED_FIRST_ATTEMPT]: {
119
+ [ButtonStates.DEFAULT]: {
120
+ backgroundColor: COLORS.PRIMARY_GREEN,
121
+ borderColor: COLORS.PRIMARY_GREEN,
122
+ color: COLORS.NEUTRAL_1,
123
+ raiseColor: COLORS.PRIMARY_GREEN,
124
+ },
125
+ [ButtonStates.HOVER]: {
126
+ backgroundColor: COLORS.GREEN_4,
127
+ borderColor: COLORS.GREEN_4,
128
+ color: COLORS.NEUTRAL_1,
129
+ raiseColor: COLORS.GREEN_4,
130
+ },
131
+ [ButtonStates.ACTIVE]: {
132
+ backgroundColor: COLORS.GREEN_4,
133
+ borderColor: COLORS.GREEN_4,
134
+ color: COLORS.NEUTRAL_1,
135
+ raiseColor: COLORS.GREEN_4,
136
+ },
137
+ [ButtonStates.PRESSED]: {
138
+ backgroundColor: COLORS.GREEN_4,
139
+ borderColor: COLORS.GREEN_4,
140
+ color: COLORS.NEUTRAL_1,
141
+ raiseColor: COLORS.GREEN_4,
142
+ },
143
+ [ButtonStates.DISABLED]: {
144
+ backgroundColor: COLORS.GREEN_3,
145
+ borderColor: COLORS.GREEN_3,
146
+ color: COLORS.NEUTRAL_1,
147
+ raiseColor: COLORS.GREEN_3,
148
+ },
149
+ },
150
+
151
+ [PROBLEM_SELECTOR_BUTTON_STATE.NOT_SOLVED]: {
152
+ [ButtonStates.DEFAULT]: {
153
+ backgroundColor: COLORS.NEUTRAL_4,
154
+ borderColor: COLORS.NEUTRAL_4,
155
+ color: COLORS.NEUTRAL_10,
156
+ raiseColor: COLORS.NEUTRAL_4,
157
+ },
158
+ [ButtonStates.HOVER]: {
159
+ backgroundColor: COLORS.NEUTRAL_3,
160
+ borderColor: COLORS.NEUTRAL_3,
161
+ color: COLORS.NEUTRAL_10,
162
+ raiseColor: COLORS.NEUTRAL_3,
163
+ },
164
+ [ButtonStates.ACTIVE]: {
165
+ backgroundColor: COLORS.NEUTRAL_3,
166
+ borderColor: COLORS.NEUTRAL_3,
167
+ color: COLORS.NEUTRAL_10,
168
+ raiseColor: COLORS.NEUTRAL_3,
169
+ },
170
+ [ButtonStates.PRESSED]: {
171
+ backgroundColor: COLORS.NEUTRAL_3,
172
+ borderColor: COLORS.NEUTRAL_3,
173
+ color: COLORS.NEUTRAL_10,
174
+ raiseColor: COLORS.NEUTRAL_3,
175
+ },
176
+ [ButtonStates.DISABLED]: {
177
+ backgroundColor: COLORS.NEUTRAL_3,
178
+ borderColor: COLORS.NEUTRAL_3,
179
+ color: COLORS.NEUTRAL_6,
180
+ raiseColor: COLORS.NEUTRAL_3,
181
+ },
182
+ },
183
+
184
+ [PROBLEM_SELECTOR_BUTTON_STATE.EXAM]: {
185
+ [ButtonStates.DEFAULT]: {
186
+ backgroundColor: COLORS.PRIMARY_PURPLE,
187
+ borderColor: COLORS.PRIMARY_PURPLE,
188
+ color: COLORS.NEUTRAL_1,
189
+ raiseColor: COLORS.PRIMARY_PURPLE,
190
+ },
191
+ [ButtonStates.HOVER]: {
192
+ backgroundColor: COLORS.PURPLE_4,
193
+ borderColor: COLORS.PURPLE_4,
194
+ color: COLORS.NEUTRAL_1,
195
+ raiseColor: COLORS.PURPLE_4,
196
+ },
197
+ [ButtonStates.ACTIVE]: {
198
+ backgroundColor: COLORS.PRIMARY_PURPLE,
199
+ borderColor: COLORS.PRIMARY_PURPLE,
200
+ color: COLORS.NEUTRAL_1,
201
+ raiseColor: COLORS.PRIMARY_PURPLE,
202
+ },
203
+ [ButtonStates.PRESSED]: {
204
+ backgroundColor: COLORS.PRIMARY_PURPLE,
205
+ borderColor: COLORS.PRIMARY_PURPLE,
206
+ color: COLORS.NEUTRAL_1,
207
+ raiseColor: COLORS.PRIMARY_PURPLE,
208
+ },
209
+ [ButtonStates.DISABLED]: {
210
+ backgroundColor: COLORS.PURPLE_3,
211
+ borderColor: COLORS.PURPLE_3,
212
+ color: COLORS.NEUTRAL_1,
213
+ raiseColor: COLORS.PURPLE_3,
214
+ },
215
+ },
216
+ }
@@ -0,0 +1,3 @@
1
+ export { ProblemSelector } from './components/ProblemSelector'
2
+ export { PROBLEM_SELECTOR_BUTTON_STATE } from './constants'
3
+ export type { ProblemSelectorButtonProps, ProblemSelectorButtonState } from './types'
@@ -0,0 +1,13 @@
1
+ import { PROBLEM_SELECTOR_BUTTON_STATE } from './constants'
2
+
3
+ export type ProblemSelectorButtonState =
4
+ (typeof PROBLEM_SELECTOR_BUTTON_STATE)[keyof typeof PROBLEM_SELECTOR_BUTTON_STATE]
5
+
6
+ export type ProblemSelectorButtonProps = {
7
+ key: string
8
+ text: string
9
+ state: ProblemSelectorButtonState
10
+ locked: boolean
11
+ onClick: () => void
12
+ badgeValue?: number
13
+ }
package/src/index.ts CHANGED
@@ -4,3 +4,4 @@ export * from './features/chatbot'
4
4
  export * from './features/feedback'
5
5
  export * from './features/celebrations'
6
6
  export * from './features/endOfAssignment'
7
+ export * from './features/problemSelector'
@@ -0,0 +1,16 @@
1
+ import React from 'react'
2
+ import Svg, { Path } from 'react-native-svg'
3
+ import { COLORS } from '@magmamath/react-native-ui'
4
+
5
+ import { IconProps } from './icon.types'
6
+
7
+ export const LockIcon = ({ width = 22, height = 24, color = COLORS.NEUTRAL_6 }: IconProps) => (
8
+ <Svg width={width} height={height} viewBox="0 0 22 24" fill="none">
9
+ <Path
10
+ fillRule="evenodd"
11
+ clipRule="evenodd"
12
+ d="M4.183 8.91H3.44A2.578 2.578 0 00.862 11.49v11.068a2.578 2.578 0 002.578 2.578h17.12a2.578 2.578 0 002.578-2.578V11.49a2.578 2.578 0 00-2.578-2.578h-.743c-.119-1.421-.391-3.307-1.374-4.897C17.304 2.172 15.303.864 12 .864c-3.304 0-5.304 1.308-6.443 3.15-.983 1.59-1.255 3.476-1.374 4.897zm2.008 0h11.618c-.12-1.303-.369-2.714-1.067-3.844C16.002 3.87 14.68 2.864 12 2.864c-2.68 0-4.003 1.006-4.742 2.202-.699 1.13-.947 2.54-1.067 3.845zm-2.75 2H20.56c.319 0 .578.26.578.579v11.068c0 .32-.26.578-.578.578H3.44a.578.578 0 01-.578-.578V11.49c0-.32.26-.578.578-.578z"
13
+ fill={color}
14
+ />
15
+ </Svg>
16
+ )
@@ -3,8 +3,11 @@ import Svg, { Path } from 'react-native-svg'
3
3
  import { COLORS, IconProps } from '@magmamath/react-native-ui'
4
4
 
5
5
  function Pi({ size = 57, color = COLORS.NEUTRAL_8 }: IconProps) {
6
+ const actualSize = typeof size === 'number' ? size : 0
7
+ const height = actualSize * 0.8421
8
+
6
9
  return (
7
- <Svg width={57} height={size * 0.8421} viewBox="0 0 57 48" fill="none">
10
+ <Svg width={57} height={height} viewBox="0 0 57 48" fill="none">
8
11
  <Path
9
12
  d="M2.311 10.528a5.23 5.23 0 00.244 7.63c2.166 1.926 5.52 1.836 7.572-.23l4.685-4.719a5.09 5.09 0 01.04-.04c.557-.55 1.37-.044 1.302.735a96.284 96.284 0 01-.666 5.732c-.546 3.688-1.358 7.523-2.543 10.924-1.209 3.468-2.669 6.084-4.272 7.7a5.23 5.23 0 00.246 7.63c2.167 1.925 5.52 1.835 7.572-.233 3.195-3.219 5.307-7.505 6.759-11.67 1.475-4.232 2.41-8.76 3.012-12.831.483-3.272.763-6.327.926-8.813a1.006 1.006 0 011.002-.942h2.357a1 1 0 011 1v23.505c0 6.436 5.464 11.367 11.84 11.367 7.233 0 13.389-5.587 13.389-12.831v-.872c0-3.093-2.6-5.315-5.443-5.315-2.843 0-5.443 2.222-5.443 5.315v.872c0 1.058-.958 2.202-2.502 2.202-.69 0-.955-.489-.955-.738V12.401a1 1 0 011-1h7.9c2.844 0 5.443-2.221 5.443-5.315 0-3.093-2.6-5.315-5.443-5.315H19.267c-4.614 0-9.059 1.803-12.27 5.038L2.31 10.528z"
10
13
  fill={color}
@@ -3,8 +3,11 @@ import Svg, { Path } from 'react-native-svg'
3
3
  import { COLORS, IconProps } from '@magmamath/react-native-ui'
4
4
 
5
5
  function Valentine({ size = 57, color = COLORS.NEUTRAL_8 }: IconProps) {
6
+ const actualSize = typeof size === 'number' ? size : 0
7
+ const height = actualSize * 0.8421
8
+
6
9
  return (
7
- <Svg width={size} height={size * 0.8421} viewBox="0 0 57 48" fill="none">
10
+ <Svg width={size} height={height} viewBox="0 0 57 48" fill="none">
8
11
  <Path
9
12
  d="M52.473 24.947L29.763 47.5a1.4 1.4 0 01-1.973 0L5.08 24.947A14.57 14.57 0 013.567 6.032C8.604-.884 18.487-1.994 24.931 3.633l2.924 2.554a1.4 1.4 0 001.842 0l2.924-2.554c6.444-5.627 16.327-4.517 21.363 2.399a14.57 14.57 0 01-1.511 18.915z"
10
13
  fill={color}
@@ -4,8 +4,12 @@ import Svg, { Path } from 'react-native-svg'
4
4
  import { COLORS, IconProps } from '@magmamath/react-native-ui'
5
5
 
6
6
  function Winter({ size = 50, color = COLORS.NEUTRAL_8 }: IconProps) {
7
+ const actualSize = typeof size === 'number' ? size : 0
8
+
9
+ const height = actualSize * 1.14
10
+
7
11
  return (
8
- <Svg width={size} height={size * 1.14} viewBox="0 0 50 57" fill="none">
12
+ <Svg width={size} height={height} viewBox="0 0 50 57" fill="none">
9
13
  <Path
10
14
  fillRule="evenodd"
11
15
  clipRule="evenodd"