@magmamath/students-features 0.9.113 → 0.9.114-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 (247) hide show
  1. package/dist/commonjs/features/pmProgress/PracticeProgress.js +264 -0
  2. package/dist/commonjs/features/pmProgress/PracticeProgress.js.map +1 -0
  3. package/dist/commonjs/features/pmProgress/chart/chart.helpers.js +24 -0
  4. package/dist/commonjs/features/pmProgress/chart/chart.helpers.js.map +1 -0
  5. package/dist/commonjs/features/pmProgress/chart/chart.types.js +2 -0
  6. package/dist/commonjs/features/pmProgress/chart/chart.types.js.map +1 -0
  7. package/dist/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.js +44 -0
  8. package/dist/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.js.map +1 -0
  9. package/dist/commonjs/features/pmProgress/chart/components/SlicesClipPaths.js +38 -0
  10. package/dist/commonjs/features/pmProgress/chart/components/SlicesClipPaths.js.map +1 -0
  11. package/dist/commonjs/features/pmProgress/chart/components/SlicesPaths.js +64 -0
  12. package/dist/commonjs/features/pmProgress/chart/components/SlicesPaths.js.map +1 -0
  13. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.js +38 -0
  14. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.js.map +1 -0
  15. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.js +21 -0
  16. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.js.map +1 -0
  17. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.js +49 -0
  18. package/dist/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.js.map +1 -0
  19. package/dist/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.js +49 -0
  20. package/dist/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.js.map +1 -0
  21. package/dist/commonjs/features/pmProgress/chart/model/PieChartManager.js +25 -0
  22. package/dist/commonjs/features/pmProgress/chart/model/PieChartManager.js.map +1 -0
  23. package/dist/commonjs/features/pmProgress/chart/model/SliceHighlight.js +20 -0
  24. package/dist/commonjs/features/pmProgress/chart/model/SliceHighlight.js.map +1 -0
  25. package/dist/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.js +67 -0
  26. package/dist/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.js.map +1 -0
  27. package/dist/commonjs/features/pmProgress/header/PracticeProgressHeader.js +180 -0
  28. package/dist/commonjs/features/pmProgress/header/PracticeProgressHeader.js.map +1 -0
  29. package/dist/commonjs/features/pmProgress/index.js +13 -0
  30. package/dist/commonjs/features/pmProgress/index.js.map +1 -0
  31. package/dist/commonjs/features/pmProgress/list/ListCard.js +128 -0
  32. package/dist/commonjs/features/pmProgress/list/ListCard.js.map +1 -0
  33. package/dist/commonjs/features/pmProgress/list/ListItem.js +128 -0
  34. package/dist/commonjs/features/pmProgress/list/ListItem.js.map +1 -0
  35. package/dist/commonjs/features/pmProgress/recs/TeacherRecs.js +17 -0
  36. package/dist/commonjs/features/pmProgress/recs/TeacherRecs.js.map +1 -0
  37. package/dist/commonjs/features/pmProgress/stats/PracticeProgressStats.js +63 -0
  38. package/dist/commonjs/features/pmProgress/stats/PracticeProgressStats.js.map +1 -0
  39. package/dist/commonjs/features/pmProgress/stats/StatsCard.js +66 -0
  40. package/dist/commonjs/features/pmProgress/stats/StatsCard.js.map +1 -0
  41. package/dist/commonjs/features/pmProgress/temp.js +74 -0
  42. package/dist/commonjs/features/pmProgress/temp.js.map +1 -0
  43. package/dist/commonjs/index.js +14 -2
  44. package/dist/commonjs/index.js.map +1 -1
  45. package/dist/commonjs/shared/icons/PentagonIcon.js +32 -0
  46. package/dist/commonjs/shared/icons/PentagonIcon.js.map +1 -0
  47. package/dist/commonjs/shared/icons/SketchArrowRight.js +33 -0
  48. package/dist/commonjs/shared/icons/SketchArrowRight.js.map +1 -0
  49. package/dist/commonjs/shared/icons/SliceDiamondIcon.js +32 -0
  50. package/dist/commonjs/shared/icons/SliceDiamondIcon.js.map +1 -0
  51. package/dist/commonjs/shared/icons/StarIcon.js +32 -0
  52. package/dist/commonjs/shared/icons/StarIcon.js.map +1 -0
  53. package/dist/commonjs/shared/icons/TimerIcon.js +35 -0
  54. package/dist/commonjs/shared/icons/TimerIcon.js.map +1 -0
  55. package/dist/module/features/pmProgress/PracticeProgress.js +258 -0
  56. package/dist/module/features/pmProgress/PracticeProgress.js.map +1 -0
  57. package/dist/module/features/pmProgress/chart/chart.helpers.js +16 -0
  58. package/dist/module/features/pmProgress/chart/chart.helpers.js.map +1 -0
  59. package/dist/module/features/pmProgress/chart/chart.types.js +2 -0
  60. package/dist/module/features/pmProgress/chart/chart.types.js.map +1 -0
  61. package/dist/module/features/pmProgress/chart/components/PracticeProgressPieChart.js +38 -0
  62. package/dist/module/features/pmProgress/chart/components/PracticeProgressPieChart.js.map +1 -0
  63. package/dist/module/features/pmProgress/chart/components/SlicesClipPaths.js +32 -0
  64. package/dist/module/features/pmProgress/chart/components/SlicesClipPaths.js.map +1 -0
  65. package/dist/module/features/pmProgress/chart/components/SlicesPaths.js +58 -0
  66. package/dist/module/features/pmProgress/chart/components/SlicesPaths.js.map +1 -0
  67. package/dist/module/features/pmProgress/chart/components/layers/SliceArcPattern.js +32 -0
  68. package/dist/module/features/pmProgress/chart/components/layers/SliceArcPattern.js.map +1 -0
  69. package/dist/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.js +15 -0
  70. package/dist/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.js.map +1 -0
  71. package/dist/module/features/pmProgress/chart/components/layers/SliceFillColor.js +43 -0
  72. package/dist/module/features/pmProgress/chart/components/layers/SliceFillColor.js.map +1 -0
  73. package/dist/module/features/pmProgress/chart/model/ArcPatternGenerator.js +44 -0
  74. package/dist/module/features/pmProgress/chart/model/ArcPatternGenerator.js.map +1 -0
  75. package/dist/module/features/pmProgress/chart/model/PieChartManager.js +20 -0
  76. package/dist/module/features/pmProgress/chart/model/PieChartManager.js.map +1 -0
  77. package/dist/module/features/pmProgress/chart/model/SliceHighlight.js +15 -0
  78. package/dist/module/features/pmProgress/chart/model/SliceHighlight.js.map +1 -0
  79. package/dist/module/features/pmProgress/chart/model/SliceShapeGenerator.js +62 -0
  80. package/dist/module/features/pmProgress/chart/model/SliceShapeGenerator.js.map +1 -0
  81. package/dist/module/features/pmProgress/header/PracticeProgressHeader.js +174 -0
  82. package/dist/module/features/pmProgress/header/PracticeProgressHeader.js.map +1 -0
  83. package/dist/module/features/pmProgress/index.js +4 -0
  84. package/dist/module/features/pmProgress/index.js.map +1 -0
  85. package/dist/module/features/pmProgress/list/ListCard.js +121 -0
  86. package/dist/module/features/pmProgress/list/ListCard.js.map +1 -0
  87. package/dist/module/features/pmProgress/list/ListItem.js +122 -0
  88. package/dist/module/features/pmProgress/list/ListItem.js.map +1 -0
  89. package/dist/module/features/pmProgress/recs/TeacherRecs.js +11 -0
  90. package/dist/module/features/pmProgress/recs/TeacherRecs.js.map +1 -0
  91. package/dist/module/features/pmProgress/stats/PracticeProgressStats.js +56 -0
  92. package/dist/module/features/pmProgress/stats/PracticeProgressStats.js.map +1 -0
  93. package/dist/module/features/pmProgress/stats/StatsCard.js +60 -0
  94. package/dist/module/features/pmProgress/stats/StatsCard.js.map +1 -0
  95. package/dist/module/features/pmProgress/temp.js +70 -0
  96. package/dist/module/features/pmProgress/temp.js.map +1 -0
  97. package/dist/module/index.js +1 -0
  98. package/dist/module/index.js.map +1 -1
  99. package/dist/module/shared/icons/PentagonIcon.js +24 -0
  100. package/dist/module/shared/icons/PentagonIcon.js.map +1 -0
  101. package/dist/module/shared/icons/SketchArrowRight.js +25 -0
  102. package/dist/module/shared/icons/SketchArrowRight.js.map +1 -0
  103. package/dist/module/shared/icons/SliceDiamondIcon.js +24 -0
  104. package/dist/module/shared/icons/SliceDiamondIcon.js.map +1 -0
  105. package/dist/module/shared/icons/StarIcon.js +24 -0
  106. package/dist/module/shared/icons/StarIcon.js.map +1 -0
  107. package/dist/module/shared/icons/TimerIcon.js +27 -0
  108. package/dist/module/shared/icons/TimerIcon.js.map +1 -0
  109. package/dist/typescript/commonjs/features/pmProgress/PracticeProgress.d.ts +3 -0
  110. package/dist/typescript/commonjs/features/pmProgress/PracticeProgress.d.ts.map +1 -0
  111. package/dist/typescript/commonjs/features/pmProgress/chart/chart.helpers.d.ts +5 -0
  112. package/dist/typescript/commonjs/features/pmProgress/chart/chart.helpers.d.ts.map +1 -0
  113. package/dist/typescript/commonjs/features/pmProgress/chart/chart.types.d.ts +35 -0
  114. package/dist/typescript/commonjs/features/pmProgress/chart/chart.types.d.ts.map +1 -0
  115. package/dist/typescript/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts +9 -0
  116. package/dist/typescript/commonjs/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
  117. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesClipPaths.d.ts +10 -0
  118. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesClipPaths.d.ts.map +1 -0
  119. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesPaths.d.ts +11 -0
  120. package/dist/typescript/commonjs/features/pmProgress/chart/components/SlicesPaths.d.ts.map +1 -0
  121. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts +12 -0
  122. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
  124. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.d.ts +13 -0
  126. package/dist/typescript/commonjs/features/pmProgress/chart/components/layers/SliceFillColor.d.ts.map +1 -0
  127. package/dist/typescript/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.d.ts +12 -0
  128. package/dist/typescript/commonjs/features/pmProgress/chart/model/ArcPatternGenerator.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/pmProgress/chart/model/PieChartManager.d.ts +16 -0
  130. package/dist/typescript/commonjs/features/pmProgress/chart/model/PieChartManager.d.ts.map +1 -0
  131. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceHighlight.d.ts +10 -0
  132. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceHighlight.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.d.ts +15 -0
  134. package/dist/typescript/commonjs/features/pmProgress/chart/model/SliceShapeGenerator.d.ts.map +1 -0
  135. package/dist/typescript/commonjs/features/pmProgress/header/PracticeProgressHeader.d.ts +12 -0
  136. package/dist/typescript/commonjs/features/pmProgress/header/PracticeProgressHeader.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/pmProgress/index.d.ts +2 -0
  138. package/dist/typescript/commonjs/features/pmProgress/index.d.ts.map +1 -0
  139. package/dist/typescript/commonjs/features/pmProgress/list/ListCard.d.ts +15 -0
  140. package/dist/typescript/commonjs/features/pmProgress/list/ListCard.d.ts.map +1 -0
  141. package/dist/typescript/commonjs/features/pmProgress/list/ListItem.d.ts +11 -0
  142. package/dist/typescript/commonjs/features/pmProgress/list/ListItem.d.ts.map +1 -0
  143. package/dist/typescript/commonjs/features/pmProgress/recs/TeacherRecs.d.ts +3 -0
  144. package/dist/typescript/commonjs/features/pmProgress/recs/TeacherRecs.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/features/pmProgress/stats/PracticeProgressStats.d.ts +3 -0
  146. package/dist/typescript/commonjs/features/pmProgress/stats/PracticeProgressStats.d.ts.map +1 -0
  147. package/dist/typescript/commonjs/features/pmProgress/stats/StatsCard.d.ts +10 -0
  148. package/dist/typescript/commonjs/features/pmProgress/stats/StatsCard.d.ts.map +1 -0
  149. package/dist/typescript/commonjs/features/pmProgress/temp.d.ts +4 -0
  150. package/dist/typescript/commonjs/features/pmProgress/temp.d.ts.map +1 -0
  151. package/dist/typescript/commonjs/index.d.ts +1 -0
  152. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  153. package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts +4 -0
  154. package/dist/typescript/commonjs/shared/icons/PentagonIcon.d.ts.map +1 -0
  155. package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts +4 -0
  156. package/dist/typescript/commonjs/shared/icons/SketchArrowRight.d.ts.map +1 -0
  157. package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts +4 -0
  158. package/dist/typescript/commonjs/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
  159. package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts +4 -0
  160. package/dist/typescript/commonjs/shared/icons/StarIcon.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts +4 -0
  162. package/dist/typescript/commonjs/shared/icons/TimerIcon.d.ts.map +1 -0
  163. package/dist/typescript/module/features/pmProgress/PracticeProgress.d.ts +3 -0
  164. package/dist/typescript/module/features/pmProgress/PracticeProgress.d.ts.map +1 -0
  165. package/dist/typescript/module/features/pmProgress/chart/chart.helpers.d.ts +5 -0
  166. package/dist/typescript/module/features/pmProgress/chart/chart.helpers.d.ts.map +1 -0
  167. package/dist/typescript/module/features/pmProgress/chart/chart.types.d.ts +35 -0
  168. package/dist/typescript/module/features/pmProgress/chart/chart.types.d.ts.map +1 -0
  169. package/dist/typescript/module/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts +9 -0
  170. package/dist/typescript/module/features/pmProgress/chart/components/PracticeProgressPieChart.d.ts.map +1 -0
  171. package/dist/typescript/module/features/pmProgress/chart/components/SlicesClipPaths.d.ts +10 -0
  172. package/dist/typescript/module/features/pmProgress/chart/components/SlicesClipPaths.d.ts.map +1 -0
  173. package/dist/typescript/module/features/pmProgress/chart/components/SlicesPaths.d.ts +11 -0
  174. package/dist/typescript/module/features/pmProgress/chart/components/SlicesPaths.d.ts.map +1 -0
  175. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts +12 -0
  176. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceArcPattern.d.ts.map +1 -0
  177. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts +8 -0
  178. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceBackgroundColor.d.ts.map +1 -0
  179. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceFillColor.d.ts +13 -0
  180. package/dist/typescript/module/features/pmProgress/chart/components/layers/SliceFillColor.d.ts.map +1 -0
  181. package/dist/typescript/module/features/pmProgress/chart/model/ArcPatternGenerator.d.ts +12 -0
  182. package/dist/typescript/module/features/pmProgress/chart/model/ArcPatternGenerator.d.ts.map +1 -0
  183. package/dist/typescript/module/features/pmProgress/chart/model/PieChartManager.d.ts +16 -0
  184. package/dist/typescript/module/features/pmProgress/chart/model/PieChartManager.d.ts.map +1 -0
  185. package/dist/typescript/module/features/pmProgress/chart/model/SliceHighlight.d.ts +10 -0
  186. package/dist/typescript/module/features/pmProgress/chart/model/SliceHighlight.d.ts.map +1 -0
  187. package/dist/typescript/module/features/pmProgress/chart/model/SliceShapeGenerator.d.ts +15 -0
  188. package/dist/typescript/module/features/pmProgress/chart/model/SliceShapeGenerator.d.ts.map +1 -0
  189. package/dist/typescript/module/features/pmProgress/header/PracticeProgressHeader.d.ts +12 -0
  190. package/dist/typescript/module/features/pmProgress/header/PracticeProgressHeader.d.ts.map +1 -0
  191. package/dist/typescript/module/features/pmProgress/index.d.ts +2 -0
  192. package/dist/typescript/module/features/pmProgress/index.d.ts.map +1 -0
  193. package/dist/typescript/module/features/pmProgress/list/ListCard.d.ts +15 -0
  194. package/dist/typescript/module/features/pmProgress/list/ListCard.d.ts.map +1 -0
  195. package/dist/typescript/module/features/pmProgress/list/ListItem.d.ts +11 -0
  196. package/dist/typescript/module/features/pmProgress/list/ListItem.d.ts.map +1 -0
  197. package/dist/typescript/module/features/pmProgress/recs/TeacherRecs.d.ts +3 -0
  198. package/dist/typescript/module/features/pmProgress/recs/TeacherRecs.d.ts.map +1 -0
  199. package/dist/typescript/module/features/pmProgress/stats/PracticeProgressStats.d.ts +3 -0
  200. package/dist/typescript/module/features/pmProgress/stats/PracticeProgressStats.d.ts.map +1 -0
  201. package/dist/typescript/module/features/pmProgress/stats/StatsCard.d.ts +10 -0
  202. package/dist/typescript/module/features/pmProgress/stats/StatsCard.d.ts.map +1 -0
  203. package/dist/typescript/module/features/pmProgress/temp.d.ts +4 -0
  204. package/dist/typescript/module/features/pmProgress/temp.d.ts.map +1 -0
  205. package/dist/typescript/module/index.d.ts +1 -0
  206. package/dist/typescript/module/index.d.ts.map +1 -1
  207. package/dist/typescript/module/shared/icons/PentagonIcon.d.ts +4 -0
  208. package/dist/typescript/module/shared/icons/PentagonIcon.d.ts.map +1 -0
  209. package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts +4 -0
  210. package/dist/typescript/module/shared/icons/SketchArrowRight.d.ts.map +1 -0
  211. package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts +4 -0
  212. package/dist/typescript/module/shared/icons/SliceDiamondIcon.d.ts.map +1 -0
  213. package/dist/typescript/module/shared/icons/StarIcon.d.ts +4 -0
  214. package/dist/typescript/module/shared/icons/StarIcon.d.ts.map +1 -0
  215. package/dist/typescript/module/shared/icons/TimerIcon.d.ts +4 -0
  216. package/dist/typescript/module/shared/icons/TimerIcon.d.ts.map +1 -0
  217. package/package.json +4 -2
  218. package/src/features/pmProgress/PracticeProgress.tsx +249 -0
  219. package/src/features/pmProgress/chart/chart.helpers.ts +15 -0
  220. package/src/features/pmProgress/chart/chart.types.ts +36 -0
  221. package/src/features/pmProgress/chart/components/PracticeProgressPieChart.tsx +32 -0
  222. package/src/features/pmProgress/chart/components/SlicesClipPaths.tsx +36 -0
  223. package/src/features/pmProgress/chart/components/SlicesPaths.tsx +67 -0
  224. package/src/features/pmProgress/chart/components/layers/SliceArcPattern.tsx +44 -0
  225. package/src/features/pmProgress/chart/components/layers/SliceBackgroundColor.tsx +11 -0
  226. package/src/features/pmProgress/chart/components/layers/SliceFillColor.tsx +55 -0
  227. package/src/features/pmProgress/chart/model/ArcPatternGenerator.ts +48 -0
  228. package/src/features/pmProgress/chart/model/PieChartManager.ts +20 -0
  229. package/src/features/pmProgress/chart/model/SliceHighlight.ts +17 -0
  230. package/src/features/pmProgress/chart/model/SliceShapeGenerator.ts +71 -0
  231. package/src/features/pmProgress/header/PracticeProgressHeader.tsx +178 -0
  232. package/src/features/pmProgress/index.ts +1 -0
  233. package/src/features/pmProgress/list/ListCard.tsx +133 -0
  234. package/src/features/pmProgress/list/ListItem.tsx +113 -0
  235. package/src/features/pmProgress/recs/TeacherRecs.tsx +10 -0
  236. package/src/features/pmProgress/stats/PracticeProgressStats.tsx +60 -0
  237. package/src/features/pmProgress/stats/StatsCard.tsx +58 -0
  238. package/src/features/pmProgress/temp.ts +67 -0
  239. package/src/index.ts +1 -0
  240. package/src/shared/icons/PentagonIcon.tsx +17 -0
  241. package/src/shared/icons/SketchArrowRight.tsx +18 -0
  242. package/src/shared/icons/SliceDiamondIcon.tsx +16 -0
  243. package/src/shared/icons/StarIcon.tsx +17 -0
  244. package/src/shared/icons/TimerIcon.tsx +21 -0
  245. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  246. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  247. package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
@@ -0,0 +1 @@
1
+ {"version":3,"names":["OuterArcPatternGenerator","constructor","config","generateArcPath","slice","radius","gapAngle","gapBetweenSlices","startAngle","endAngle","startPoint","polarToCartesian","endPoint","largeArcFlag","Math","PI","x","y","getPatternTrackSizes","outerRadius","outerArc","strokeWidth","getDashWidthForRadius","dashWidth","getDashOffset","rowIndex","dashAngle","dashWidthAtRadius","baseOffset","angleInRadians","sin","cos"],"sourceRoot":"../../../../../../src","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CAAC;EAC5E;EAEOK,aAAaA,CAACC,QAAgB,EAAEpB,MAAc,EAAE;IACrD,MAAMqB,SAAS,GAAG,IAAI,CAACxB,MAAM,CAACkB,QAAQ,CAACG,SAAS,GAAG,IAAI,CAACrB,MAAM,CAACiB,WAAW;IAC1E,MAAMQ,iBAAiB,GAAGD,SAAS,GAAGrB,MAAM;IAC5C,MAAMuB,UAAU,GAAGD,iBAAiB,GAAG,CAAC;IAExC,IAAIF,QAAQ,KAAK,CAAC,EAAE;MAClB,OAAOG,UAAU,GAAGD,iBAAiB;IACvC;IACA,OAAOC,UAAU;EACnB;EAEQjB,gBAAgBA,CAACN,MAAc,EAAEwB,cAAsB,EAAE;IAC/D,OAAO;MACLb,CAAC,EAAEX,MAAM,GAAGS,IAAI,CAACgB,GAAG,CAACD,cAAc,CAAC;MACpCZ,CAAC,EAAE,CAACZ,MAAM,GAAGS,IAAI,CAACiB,GAAG,CAACF,cAAc;IACtC,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ import { SliceShapeGenerator } from "./SliceShapeGenerator.js";
4
+ import { OuterArcPatternGenerator } from "./ArcPatternGenerator.js";
5
+ import { SliceHighlight } from "./SliceHighlight.js";
6
+ export class PieChartManager {
7
+ constructor(config) {
8
+ this.config = config;
9
+ this.shape = new SliceShapeGenerator(config);
10
+ this.pattern = new OuterArcPatternGenerator(config);
11
+ this.highlight = new SliceHighlight(config);
12
+ }
13
+ getCenter() {
14
+ return {
15
+ x: this.config.size / 2,
16
+ y: this.config.size / 2
17
+ };
18
+ }
19
+ }
20
+ //# sourceMappingURL=PieChartManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SliceShapeGenerator","OuterArcPatternGenerator","SliceHighlight","PieChartManager","constructor","config","shape","pattern","highlight","getCenter","x","size","y"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/model/PieChartManager.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,0BAAuB;AAC3D,SAASC,wBAAwB,QAAQ,0BAAuB;AAChE,SAASC,cAAc,QAAQ,qBAAkB;AAGjD,OAAO,MAAMC,eAAe,CAAC;EAK3BC,WAAWA,CAAiBC,MAA6B,EAAE;IAAA,KAA/BA,MAA6B,GAA7BA,MAA6B;IACvD,IAAI,CAACC,KAAK,GAAG,IAAIN,mBAAmB,CAACK,MAAM,CAAC;IAC5C,IAAI,CAACE,OAAO,GAAG,IAAIN,wBAAwB,CAACI,MAAM,CAAC;IACnD,IAAI,CAACG,SAAS,GAAG,IAAIN,cAAc,CAACG,MAAM,CAAC;EAC7C;EAEOI,SAASA,CAAA,EAAG;IACjB,OAAO;MAAEC,CAAC,EAAE,IAAI,CAACL,MAAM,CAACM,IAAI,GAAG,CAAC;MAAEC,CAAC,EAAE,IAAI,CAACP,MAAM,CAACM,IAAI,GAAG;IAAE,CAAC;EAC7D;AACF","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ import { createEvent, createStore } from 'effector';
4
+ export class SliceHighlight {
5
+ highlightSlice = createEvent();
6
+ resetHighlight = createEvent();
7
+ $highlightedIndex = createStore(null).on(this.highlightSlice, (_, index) => index).reset(this.resetHighlight);
8
+ constructor(config) {
9
+ this.config = config;
10
+ }
11
+ getTranslateY(isHighlighted) {
12
+ return isHighlighted ? -this.config.pressOffset : 0;
13
+ }
14
+ }
15
+ //# sourceMappingURL=SliceHighlight.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEvent","createStore","SliceHighlight","highlightSlice","resetHighlight","$highlightedIndex","on","_","index","reset","constructor","config","getTranslateY","isHighlighted","pressOffset"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/model/SliceHighlight.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,WAAW,QAAQ,UAAU;AAGnD,OAAO,MAAMC,cAAc,CAAC;EACVC,cAAc,GAAGH,WAAW,CAAS,CAAC;EACtCI,cAAc,GAAGJ,WAAW,CAAC,CAAC;EAE9BK,iBAAiB,GAAGJ,WAAW,CAAgB,IAAI,CAAC,CACjEK,EAAE,CAAC,IAAI,CAACH,cAAc,EAAE,CAACI,CAAC,EAAEC,KAAK,KAAKA,KAAK,CAAC,CAC5CC,KAAK,CAAC,IAAI,CAACL,cAAc,CAAC;EAE7BM,WAAWA,CAAkBC,MAA6B,EAAE;IAAA,KAA/BA,MAA6B,GAA7BA,MAA6B;EAAG;EAEtDC,aAAaA,CAACC,aAAsB,EAAU;IACnD,OAAOA,aAAa,GAAG,CAAC,IAAI,CAACF,MAAM,CAACG,WAAW,GAAG,CAAC;EACrD;AACF","ignoreList":[]}
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ import { arc, pie } from 'd3-shape';
4
+ export class SliceShapeGenerator {
5
+ innerRadius = 0;
6
+ d3Pie = pie().value(({
7
+ value
8
+ }) => value).sort(null);
9
+ constructor(config) {
10
+ this.config = config;
11
+ }
12
+ generateSlices(data) {
13
+ this.innerRadius = this.getInnerRadius(data.length);
14
+ return this.d3Pie(data).map((datum, index) => ({
15
+ index,
16
+ startAngle: datum.startAngle,
17
+ endAngle: datum.endAngle,
18
+ fillPercent: datum.data.fillPercent ?? 0,
19
+ backgroundColor: datum.data.backgroundColor ?? this.config.colors.background,
20
+ fillColor: datum.data.fillColor,
21
+ borderColor: datum.data.borderColor,
22
+ data: datum.data
23
+ }));
24
+ }
25
+ generateSlicePath(slice) {
26
+ const cornerRadius = this.getCornerRadius(100);
27
+ return this.buildArc(slice, this.config.outerRadius, cornerRadius);
28
+ }
29
+ generateFillPath(slice) {
30
+ const innerRadius = this.innerRadius;
31
+ const outerRadius = this.config.outerRadius;
32
+ const fillRadius = innerRadius + (outerRadius - innerRadius) * (slice.fillPercent / 100);
33
+ const radialThickness = fillRadius - innerRadius;
34
+ const cornerRadius = Math.min(this.getCornerRadius(slice.fillPercent), radialThickness / 2);
35
+ return this.buildArc(slice, fillRadius, cornerRadius);
36
+ }
37
+ getInnerRadius(sliceCount) {
38
+ const {
39
+ innerRadius
40
+ } = this.config;
41
+ return typeof innerRadius === 'function' ? innerRadius(sliceCount) : innerRadius;
42
+ }
43
+ getCornerRadius(fillPercent) {
44
+ const {
45
+ cornerRadius
46
+ } = this.config;
47
+ return typeof cornerRadius === 'function' ? cornerRadius(fillPercent) : cornerRadius;
48
+ }
49
+ get padAngle() {
50
+ return this.config.gapBetweenSlices / this.config.outerRadius;
51
+ }
52
+ buildArc(slice, outerRadius, cornerRadius) {
53
+ const innerRadius = this.innerRadius;
54
+ return arc().outerRadius(outerRadius).innerRadius(innerRadius).cornerRadius(cornerRadius).padAngle(this.padAngle).padRadius(this.config.outerRadius)({
55
+ startAngle: slice.startAngle,
56
+ endAngle: slice.endAngle,
57
+ innerRadius,
58
+ outerRadius
59
+ });
60
+ }
61
+ }
62
+ //# sourceMappingURL=SliceShapeGenerator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["arc","pie","SliceShapeGenerator","innerRadius","d3Pie","value","sort","constructor","config","generateSlices","data","getInnerRadius","length","map","datum","index","startAngle","endAngle","fillPercent","backgroundColor","colors","background","fillColor","borderColor","generateSlicePath","slice","cornerRadius","getCornerRadius","buildArc","outerRadius","generateFillPath","fillRadius","radialThickness","Math","min","sliceCount","padAngle","gapBetweenSlices","padRadius"],"sourceRoot":"../../../../../../src","sources":["features/pmProgress/chart/model/SliceShapeGenerator.ts"],"mappings":";;AAAA,SAASA,GAAG,EAAEC,GAAG,QAAQ,UAAU;AAGnC,OAAO,MAAMC,mBAAmB,CAAC;EACvBC,WAAW,GAAG,CAAC;EACNC,KAAK,GAAGH,GAAG,CAAiB,CAAC,CAC3CI,KAAK,CAAC,CAAC;IAAEA;EAAM,CAAC,KAAKA,KAAK,CAAC,CAC3BC,IAAI,CAAC,IAAI,CAAC;EAEbC,WAAWA,CAAkBC,MAA6B,EAAE;IAAA,KAA/BA,MAA6B,GAA7BA,MAA6B;EAAG;EAEtDC,cAAcA,CAACC,IAAsB,EAAgB;IAC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AAC;IAE3F,OAAO,IAAI,CAACJ,QAAQ,CAACH,KAAK,EAAEM,UAAU,EAAEL,YAAY,CAAC;EACvD;EAEQf,cAAcA,CAACwB,UAAkB,EAAU;IACjD,MAAM;MAAEhC;IAAY,CAAC,GAAG,IAAI,CAACK,MAAM;IACnC,OAAO,OAAOL,WAAW,KAAK,UAAU,GAAGA,WAAW,CAACgC,UAAU,CAAC,GAAGhC,WAAW;EAClF;EAEQwB,eAAeA,CAACT,WAAmB,EAAU;IACnD,MAAM;MAAEQ;IAAa,CAAC,GAAG,IAAI,CAAClB,MAAM;IACpC,OAAO,OAAOkB,YAAY,KAAK,UAAU,GAAGA,YAAY,CAACR,WAAW,CAAC,GAAGQ,YAAY;EACtF;EAEA,IAAYU,QAAQA,CAAA,EAAW;IAC7B,OAAO,IAAI,CAAC5B,MAAM,CAAC6B,gBAAgB,GAAG,IAAI,CAAC7B,MAAM,CAACqB,WAAW;EAC/D;EAEQD,QAAQA,CAACH,KAAiB,EAAEI,WAAmB,EAAEH,YAAoB,EAAU;IACrF,MAAMvB,WAAW,GAAG,IAAI,CAACA,WAAW;IAEpC,OAAOH,GAAG,CAAC,CAAC,CACT6B,WAAW,CAACA,WAAW,CAAC,CACxB1B,WAAW,CAACA,WAAW,CAAC,CACxBuB,YAAY,CAACA,YAAY,CAAC,CAC1BU,QAAQ,CAAC,IAAI,CAACA,QAAQ,CAAC,CACvBE,SAAS,CAAC,IAAI,CAAC9B,MAAM,CAACqB,WAAW,CAAC,CAAC;MACpCb,UAAU,EAAES,KAAK,CAACT,UAAU;MAC5BC,QAAQ,EAAEQ,KAAK,CAACR,QAAQ;MACxBd,WAAW;MACX0B;IACF,CAAC,CAAC;EACJ;AACF","ignoreList":[]}
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+
3
+ import React, { useState } from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { Dropdown, HeadingVariants, Menu, Typography, CaretDownIcon, CaretUpIcon, Button, ButtonVariant, SPACING, ButtonSize, PlayIcon, COLORS, ButtonColor } from '@magmamath/react-native-ui';
6
+ import { SketchArrowRight } from "../../../shared/icons/SketchArrowRight.js";
7
+ import { SliceDiamondIcon } from "../../../shared/icons/SliceDiamondIcon.js";
8
+
9
+ // TODO: temp, remove and pass from props
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const items = [{
12
+ key: 'item-1',
13
+ title: 'Grade1'
14
+ }, {
15
+ key: 'item-1',
16
+ title: 'Grade2'
17
+ }, {
18
+ key: 'item-1',
19
+ title: 'Grade3'
20
+ }];
21
+ export const PracticeProgressHeader = ({
22
+ title,
23
+ grade,
24
+ nextUp,
25
+ topic,
26
+ buttonLabel,
27
+ topicColor
28
+ }) => {
29
+ const [isDropdownOpen, setIsDropdownOpen] = useState(false);
30
+ const CaretIcon = isDropdownOpen ? CaretUpIcon : CaretDownIcon;
31
+ return /*#__PURE__*/_jsxs(View, {
32
+ style: styles.container,
33
+ children: [/*#__PURE__*/_jsxs(View, {
34
+ style: styles.title,
35
+ children: [/*#__PURE__*/_jsx(Typography, {
36
+ variant: HeadingVariants.H2,
37
+ style: styles.dark,
38
+ children: title
39
+ }), /*#__PURE__*/_jsx(Dropdown, {
40
+ isOpen: isDropdownOpen,
41
+ anchor: /*#__PURE__*/_jsxs(Button, {
42
+ variant: ButtonVariant.TERTIARY,
43
+ onPress: () => setIsDropdownOpen(prev => !prev),
44
+ children: [/*#__PURE__*/_jsx(Typography, {
45
+ variant: HeadingVariants.H8,
46
+ style: styles.dark,
47
+ children: grade
48
+ }), /*#__PURE__*/_jsx(View, {
49
+ style: styles.caret,
50
+ children: /*#__PURE__*/_jsx(CaretIcon, {
51
+ color: COLORS.NEUTRAL_9
52
+ })
53
+ })]
54
+ }),
55
+ children: /*#__PURE__*/_jsx(Menu, {
56
+ style: styles.menu,
57
+ items: items
58
+ })
59
+ })]
60
+ }), /*#__PURE__*/_jsxs(View, {
61
+ style: styles.nextUp,
62
+ children: [/*#__PURE__*/_jsxs(View, {
63
+ style: styles.content,
64
+ children: [/*#__PURE__*/_jsx(View, {
65
+ style: styles.subtitle,
66
+ children: /*#__PURE__*/_jsx(Typography, {
67
+ variant: HeadingVariants.H2,
68
+ style: styles.dark,
69
+ children: nextUp
70
+ })
71
+ }), /*#__PURE__*/_jsxs(View, {
72
+ style: [styles.row, styles.tilted],
73
+ children: [/*#__PURE__*/_jsx(Typography, {
74
+ variant: HeadingVariants.H7,
75
+ style: styles.muted,
76
+ children: topic
77
+ }), /*#__PURE__*/_jsx(View, {
78
+ style: styles.diamond,
79
+ children: /*#__PURE__*/_jsx(SliceDiamondIcon, {
80
+ color: topicColor
81
+ })
82
+ })]
83
+ })]
84
+ }), /*#__PURE__*/_jsx(View, {
85
+ style: styles.arrow,
86
+ children: /*#__PURE__*/_jsx(SketchArrowRight, {})
87
+ }), /*#__PURE__*/_jsx(Button, {
88
+ icon: /*#__PURE__*/_jsx(PlayIcon, {
89
+ size: 16,
90
+ color: COLORS.NEUTRAL_1
91
+ }),
92
+ variant: ButtonVariant.PRIMARY,
93
+ size: ButtonSize.LARGE,
94
+ colorScheme: ButtonColor.YELLOW,
95
+ raiseLevel: 6,
96
+ style: {
97
+ container: styles.startButton
98
+ },
99
+ children: /*#__PURE__*/_jsx(Typography, {
100
+ variant: HeadingVariants.H6,
101
+ style: styles.startButtonText,
102
+ children: buttonLabel
103
+ })
104
+ })]
105
+ })]
106
+ });
107
+ };
108
+ const styles = StyleSheet.create({
109
+ container: {
110
+ flexDirection: 'row',
111
+ justifyContent: 'space-between',
112
+ alignItems: 'center',
113
+ marginBottom: SPACING[400]
114
+ },
115
+ title: {
116
+ flexDirection: 'row',
117
+ alignItems: 'center',
118
+ gap: SPACING[200]
119
+ },
120
+ dark: {
121
+ color: COLORS.NEUTRAL_9
122
+ },
123
+ caret: {
124
+ marginLeft: SPACING[100]
125
+ },
126
+ menu: {
127
+ top: SPACING[100],
128
+ minWidth: 110
129
+ },
130
+ nextUp: {
131
+ flexDirection: 'row',
132
+ alignItems: 'center',
133
+ gap: SPACING[400]
134
+ },
135
+ content: {
136
+ alignItems: 'center',
137
+ gap: SPACING[100]
138
+ },
139
+ subtitle: {
140
+ transform: [{
141
+ rotate: '355deg'
142
+ }],
143
+ marginRight: SPACING[300]
144
+ },
145
+ tilted: {
146
+ transform: [{
147
+ rotate: '355deg'
148
+ }]
149
+ },
150
+ row: {
151
+ flexDirection: 'row',
152
+ gap: SPACING[100]
153
+ },
154
+ muted: {
155
+ color: COLORS.NEUTRAL_8
156
+ },
157
+ diamond: {
158
+ bottom: 10
159
+ },
160
+ arrow: {
161
+ transform: [{
162
+ rotate: '358deg'
163
+ }]
164
+ },
165
+ startButton: {
166
+ minWidth: 145
167
+ },
168
+ startButtonText: {
169
+ fontWeight: '700',
170
+ textTransform: 'uppercase',
171
+ color: COLORS.NEUTRAL_1
172
+ }
173
+ });
174
+ //# sourceMappingURL=PracticeProgressHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","View","StyleSheet","Dropdown","HeadingVariants","Menu","Typography","CaretDownIcon","CaretUpIcon","Button","ButtonVariant","SPACING","ButtonSize","PlayIcon","COLORS","ButtonColor","SketchArrowRight","SliceDiamondIcon","jsx","_jsx","jsxs","_jsxs","items","key","title","PracticeProgressHeader","grade","nextUp","topic","buttonLabel","topicColor","isDropdownOpen","setIsDropdownOpen","CaretIcon","style","styles","container","children","variant","H2","dark","isOpen","anchor","TERTIARY","onPress","prev","H8","caret","color","NEUTRAL_9","menu","content","subtitle","row","tilted","H7","muted","diamond","arrow","icon","size","NEUTRAL_1","PRIMARY","LARGE","colorScheme","YELLOW","raiseLevel","startButton","H6","startButtonText","create","flexDirection","justifyContent","alignItems","marginBottom","gap","marginLeft","top","minWidth","transform","rotate","marginRight","NEUTRAL_8","bottom","fontWeight","textTransform"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/header/PracticeProgressHeader.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,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@
1
+ "use strict";
2
+
3
+ export { PracticeProgress } from "./PracticeProgress.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PracticeProgress"],"sourceRoot":"../../../../src","sources":["features/pmProgress/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,uBAAoB","ignoreList":[]}
@@ -0,0 +1,121 @@
1
+ "use strict";
2
+
3
+ import React, { useState } from 'react';
4
+ import { Pressable, View, StyleSheet } from 'react-native';
5
+ import { BORDER_RADIUS, CaretDownIcon, CaretUpIcon, COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui';
6
+ import { ListItem } from "./ListItem.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ const HEADER_HEIGHT = 60;
9
+ const RADIUS = BORDER_RADIUS[200];
10
+ const PROGRESS_BAR_WIDTH = 50;
11
+ const PROGRESS_BAR_HEIGHT = 10;
12
+ export const ListCard = ({
13
+ title,
14
+ icon,
15
+ color,
16
+ items,
17
+ progress = 0,
18
+ rightContent,
19
+ isFirst,
20
+ isLast
21
+ }) => {
22
+ const [expanded, setExpanded] = useState(false);
23
+ const Caret = expanded ? CaretUpIcon : CaretDownIcon;
24
+ return /*#__PURE__*/_jsxs(View, {
25
+ style: [styles.container, isFirst && styles.first, isLast && styles.last],
26
+ children: [/*#__PURE__*/_jsxs(Pressable, {
27
+ style: styles.header,
28
+ onPress: () => setExpanded(prev => !prev),
29
+ children: [icon, /*#__PURE__*/_jsx(View, {
30
+ style: styles.caret,
31
+ children: /*#__PURE__*/_jsx(Caret, {
32
+ color: COLORS.NEUTRAL_9
33
+ })
34
+ }), /*#__PURE__*/_jsx(Typography, {
35
+ variant: HeadingVariants.H6,
36
+ style: styles.title,
37
+ children: title
38
+ }), rightContent ?? /*#__PURE__*/_jsxs(View, {
39
+ style: styles.progress,
40
+ children: [/*#__PURE__*/_jsxs(Typography, {
41
+ variant: HeadingVariants.H7,
42
+ style: [styles.percentage, {
43
+ color
44
+ }],
45
+ children: [Math.round(progress), "%"]
46
+ }), /*#__PURE__*/_jsx(View, {
47
+ style: styles.track,
48
+ children: /*#__PURE__*/_jsx(View, {
49
+ style: [styles.fill, {
50
+ width: `${progress}%`,
51
+ backgroundColor: color
52
+ }]
53
+ })
54
+ })]
55
+ })]
56
+ }), expanded && /*#__PURE__*/_jsx(View, {
57
+ style: styles.items,
58
+ children: items.map((item, index) => /*#__PURE__*/_jsx(ListItem, {
59
+ ...item
60
+ }, index))
61
+ })]
62
+ });
63
+ };
64
+ const styles = StyleSheet.create({
65
+ container: {
66
+ justifyContent: 'center',
67
+ backgroundColor: COLORS.NEUTRAL_2,
68
+ borderWidth: 1,
69
+ borderColor: COLORS.NEUTRAL_4,
70
+ borderTopWidth: 0,
71
+ overflow: 'hidden'
72
+ },
73
+ first: {
74
+ borderTopWidth: 1,
75
+ borderTopLeftRadius: RADIUS,
76
+ borderTopRightRadius: RADIUS
77
+ },
78
+ last: {
79
+ borderBottomLeftRadius: RADIUS,
80
+ borderBottomRightRadius: RADIUS
81
+ },
82
+ header: {
83
+ flexDirection: 'row',
84
+ alignItems: 'center',
85
+ height: HEADER_HEIGHT,
86
+ padding: SPACING[400],
87
+ backgroundColor: COLORS.NEUTRAL_2
88
+ },
89
+ caret: {
90
+ marginLeft: SPACING[400]
91
+ },
92
+ title: {
93
+ marginLeft: SPACING[200],
94
+ flex: 1
95
+ },
96
+ progress: {
97
+ flexDirection: 'row',
98
+ alignItems: 'center',
99
+ gap: SPACING[200]
100
+ },
101
+ percentage: {
102
+ textAlign: 'right'
103
+ },
104
+ track: {
105
+ width: PROGRESS_BAR_WIDTH,
106
+ height: PROGRESS_BAR_HEIGHT,
107
+ backgroundColor: COLORS.NEUTRAL_4,
108
+ borderRadius: BORDER_RADIUS[200],
109
+ overflow: 'hidden'
110
+ },
111
+ fill: {
112
+ height: '100%',
113
+ borderRadius: BORDER_RADIUS[200]
114
+ },
115
+ items: {
116
+ gap: SPACING[200],
117
+ padding: SPACING[200],
118
+ backgroundColor: COLORS.NEUTRAL_1
119
+ }
120
+ });
121
+ //# sourceMappingURL=ListCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useState","Pressable","View","StyleSheet","BORDER_RADIUS","CaretDownIcon","CaretUpIcon","COLORS","HeadingVariants","SPACING","Typography","ListItem","jsx","_jsx","jsxs","_jsxs","HEADER_HEIGHT","RADIUS","PROGRESS_BAR_WIDTH","PROGRESS_BAR_HEIGHT","ListCard","title","icon","color","items","progress","rightContent","isFirst","isLast","expanded","setExpanded","Caret","style","styles","container","first","last","children","header","onPress","prev","caret","NEUTRAL_9","variant","H6","H7","percentage","Math","round","track","fill","width","backgroundColor","map","item","index","create","justifyContent","NEUTRAL_2","borderWidth","borderColor","NEUTRAL_4","borderTopWidth","overflow","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","flexDirection","alignItems","height","padding","marginLeft","flex","gap","textAlign","borderRadius","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/list/ListCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,SAAS,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC1D,SACEC,aAAa,EACbC,aAAa,EACbC,WAAW,EACXC,MAAM,EACNC,eAAe,EACfC,OAAO,EACPC,UAAU,QACL,4BAA4B;AACnC,SAASC,QAAQ,QAA2B,eAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAExD,MAAMC,aAAa,GAAG,EAAE;AACxB,MAAMC,MAAM,GAAGb,aAAa,CAAC,GAAG,CAAC;AACjC,MAAMc,kBAAkB,GAAG,EAAE;AAC7B,MAAMC,mBAAmB,GAAG,EAAE;AAa9B,OAAO,MAAMC,QAAQ,GAAGA,CAAC;EACvBC,KAAK;EACLC,IAAI;EACJC,KAAK;EACLC,KAAK;EACLC,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OAAO,CAAC,GAAG;EACzB,CAAC;EACDY,KAAK,EAAE;IACLmD,UAAU,EAAE/D,OAAO,CAAC,GAAG,CAAC;IACxBgE,IAAI,EAAE;EACR,CAAC;EACDhD,QAAQ,EAAE;IACR2C,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBK,GAAG,EAAEjE,OAAO,CAAC,GAAG;EAClB,CAAC;EACDqC,UAAU,EAAE;IACV6B,SAAS,EAAE;EACb,CAAC;EACD1B,KAAK,EAAE;IACLE,KAAK,EAAEjC,kBAAkB;IACzBoD,MAAM,EAAEnD,mBAAmB;IAC3BiC,eAAe,EAAE7C,MAAM,CAACsD,SAAS;IACjCe,YAAY,EAAExE,aAAa,CAAC,GAAG,CAAC;IAChC2D,QAAQ,EAAE;EACZ,CAAC;EACDb,IAAI,EAAE;IACJoB,MAAM,EAAE,MAAM;IACdM,YAAY,EAAExE,aAAa,CAAC,GAAG;EACjC,CAAC;EACDoB,KAAK,EAAE;IACLkD,GAAG,EAAEjE,OAAO,CAAC,GAAG,CAAC;IACjB8D,OAAO,EAAE9D,OAAO,CAAC,GAAG,CAAC;IACrB2C,eAAe,EAAE7C,MAAM,CAACsE;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, Text, StyleSheet } from 'react-native';
5
+ import { ArrowRightIcon, CheckIcon } from '@magmamath/react-native-ui';
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const TEXT_COLOR = '#4D4D63';
8
+ const SUBTITLE_COLOR = '#80808F';
9
+ const FINISHED_BG = '#EFFBF5';
10
+ const FINISHED_TITLE = '#00804A';
11
+ const FINISHED_SUBTITLE = '#29A96F';
12
+ const FINISHED_ICON = '#5CD497';
13
+ const SHADOW_COLOR = '#333333';
14
+ const ICON_SIZE = 25;
15
+ const FONT_FAMILY = 'Buenos Aires';
16
+ export const ListItem = ({
17
+ title,
18
+ subtitle,
19
+ skillsLeft,
20
+ isFinished = false
21
+ }) => {
22
+ return /*#__PURE__*/_jsxs(View, {
23
+ style: [styles.card, isFinished && styles.finished],
24
+ children: [/*#__PURE__*/_jsxs(View, {
25
+ style: styles.content,
26
+ children: [/*#__PURE__*/_jsx(Text, {
27
+ style: [styles.title, isFinished && styles.titleFinished],
28
+ numberOfLines: 1,
29
+ children: title
30
+ }), /*#__PURE__*/_jsx(Text, {
31
+ style: [styles.subtitle, isFinished && styles.subtitleFinished],
32
+ numberOfLines: 1,
33
+ children: subtitle
34
+ })]
35
+ }), /*#__PURE__*/_jsxs(View, {
36
+ style: styles.trailing,
37
+ children: [!isFinished && /*#__PURE__*/_jsxs(Text, {
38
+ style: styles.skills,
39
+ children: [skillsLeft, " skills left"]
40
+ }), /*#__PURE__*/_jsx(View, {
41
+ style: styles.icon,
42
+ children: isFinished ? /*#__PURE__*/_jsx(CheckIcon, {
43
+ color: FINISHED_ICON
44
+ }) : /*#__PURE__*/_jsx(ArrowRightIcon, {
45
+ color: TEXT_COLOR
46
+ })
47
+ })]
48
+ })]
49
+ });
50
+ };
51
+ const styles = StyleSheet.create({
52
+ card: {
53
+ flexDirection: 'row',
54
+ alignItems: 'center',
55
+ paddingVertical: 8,
56
+ paddingLeft: 32,
57
+ paddingRight: 16,
58
+ backgroundColor: 'white',
59
+ borderRadius: 12,
60
+ gap: 8,
61
+ shadowColor: SHADOW_COLOR,
62
+ shadowOffset: {
63
+ width: 0,
64
+ height: 1
65
+ },
66
+ shadowOpacity: 0.25,
67
+ shadowRadius: 3,
68
+ elevation: 3
69
+ },
70
+ finished: {
71
+ backgroundColor: FINISHED_BG,
72
+ shadowOffset: {
73
+ width: 0,
74
+ height: 0
75
+ },
76
+ shadowOpacity: 0.4,
77
+ shadowRadius: 0.5,
78
+ elevation: 1
79
+ },
80
+ content: {
81
+ flex: 1
82
+ },
83
+ title: {
84
+ color: TEXT_COLOR,
85
+ fontSize: 13,
86
+ fontFamily: FONT_FAMILY,
87
+ fontWeight: '400',
88
+ lineHeight: 18.2
89
+ },
90
+ titleFinished: {
91
+ color: FINISHED_TITLE
92
+ },
93
+ subtitle: {
94
+ color: SUBTITLE_COLOR,
95
+ fontSize: 10,
96
+ fontFamily: FONT_FAMILY,
97
+ fontWeight: '400',
98
+ lineHeight: 14
99
+ },
100
+ subtitleFinished: {
101
+ color: FINISHED_SUBTITLE
102
+ },
103
+ trailing: {
104
+ flexDirection: 'row',
105
+ alignItems: 'center',
106
+ gap: 8
107
+ },
108
+ skills: {
109
+ color: TEXT_COLOR,
110
+ fontSize: 13,
111
+ fontFamily: FONT_FAMILY,
112
+ fontWeight: '400',
113
+ lineHeight: 18.2
114
+ },
115
+ icon: {
116
+ width: ICON_SIZE,
117
+ height: ICON_SIZE,
118
+ justifyContent: 'center',
119
+ alignItems: 'center'
120
+ }
121
+ });
122
+ //# sourceMappingURL=ListItem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","Text","StyleSheet","ArrowRightIcon","CheckIcon","jsx","_jsx","jsxs","_jsxs","TEXT_COLOR","SUBTITLE_COLOR","FINISHED_BG","FINISHED_TITLE","FINISHED_SUBTITLE","FINISHED_ICON","SHADOW_COLOR","ICON_SIZE","FONT_FAMILY","ListItem","title","subtitle","skillsLeft","isFinished","style","styles","card","finished","children","content","titleFinished","numberOfLines","subtitleFinished","trailing","skills","icon","color","create","flexDirection","alignItems","paddingVertical","paddingLeft","paddingRight","backgroundColor","borderRadius","gap","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","flex","fontSize","fontFamily","fontWeight","lineHeight","justifyContent"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/list/ListItem.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACrD,SAASC,cAAc,EAAEC,SAAS,QAAQ,4BAA4B;AAAA,SAAAC,GAAA,IAAAC,IAAA,E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;IACRe,KAAK,EAAEzB,cAAc;IACrB2C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAErC,WAAW;IACvBsC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd,CAAC;EACDzB,gBAAgB,EAAE;IAChBI,KAAK,EAAEtB;EACT,CAAC;EACDmB,QAAQ,EAAE;IACRK,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBM,GAAG,EAAE;EACP,CAAC;EACDX,MAAM,EAAE;IACNE,KAAK,EAAE1B,UAAU;IACjB4C,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAErC,WAAW;IACvBsC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd,CAAC;EACDtB,IAAI,EAAE;IACJa,KAAK,EAAE/B,SAAS;IAChBgC,MAAM,EAAEhC,SAAS;IACjByC,cAAc,EAAE,QAAQ;IACxBnB,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Text, View } from 'react-native';
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export const TeacherRecs = () => {
7
+ return /*#__PURE__*/_jsx(View, {
8
+ children: /*#__PURE__*/_jsx(Text, {})
9
+ });
10
+ };
11
+ //# sourceMappingURL=TeacherRecs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Text","View","jsx","_jsx","TeacherRecs","children"],"sourceRoot":"../../../../../src","sources":["features/pmProgress/recs/TeacherRecs.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAEzC,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAC/B,oBACED,IAAA,CAACF,IAAI;IAAAI,QAAA,eACHF,IAAA,CAACH,IAAI,IAAO;EAAC,CACT,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+
3
+ import React, { useState } from 'react';
4
+ import { StyleSheet, View } from 'react-native';
5
+ import { COLORS, SelectGroup, SelectOptionColor, SPACING } from '@magmamath/react-native-ui';
6
+ import { StatsCard } from "./StatsCard.js";
7
+ import { StarIcon } from "../../../shared/icons/StarIcon.js";
8
+ import { TimerIcon } from "../../../shared/icons/TimerIcon.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ const OPTIONS = [{
11
+ key: '1',
12
+ title: 'This week'
13
+ }, {
14
+ key: '2',
15
+ title: 'Last week'
16
+ }, {
17
+ key: '3',
18
+ title: 'All time'
19
+ }];
20
+ const DEFAULT_SELECTED = [OPTIONS[0]];
21
+ export const PracticeProgressStats = () => {
22
+ const [selected, setSelected] = useState(DEFAULT_SELECTED);
23
+ return /*#__PURE__*/_jsxs(View, {
24
+ style: styles.container,
25
+ children: [/*#__PURE__*/_jsxs(View, {
26
+ style: styles.cards,
27
+ children: [/*#__PURE__*/_jsx(StatsCard, {
28
+ value: "46",
29
+ label: "Practice stars",
30
+ color: COLORS.PRIMARY_YELLOW,
31
+ icon: /*#__PURE__*/_jsx(StarIcon, {})
32
+ }), /*#__PURE__*/_jsx(StatsCard, {
33
+ value: "24m",
34
+ label: "Practice time",
35
+ color: COLORS.PRIMARY_PURPLE,
36
+ icon: /*#__PURE__*/_jsx(TimerIcon, {})
37
+ })]
38
+ }), /*#__PURE__*/_jsx(SelectGroup, {
39
+ color: SelectOptionColor.GREY,
40
+ options: OPTIONS,
41
+ selectedOptions: selected,
42
+ onOptionChange: option => setSelected([option])
43
+ })]
44
+ });
45
+ };
46
+ const styles = StyleSheet.create({
47
+ container: {
48
+ gap: SPACING[100]
49
+ },
50
+ cards: {
51
+ flexDirection: 'row',
52
+ justifyContent: 'space-between',
53
+ gap: SPACING[300]
54
+ }
55
+ });
56
+ //# sourceMappingURL=PracticeProgressStats.js.map