react-native-elearn-ui 0.1.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 (100) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +37 -0
  3. package/lib/module/components/Button.js +82 -0
  4. package/lib/module/components/Button.js.map +1 -0
  5. package/lib/module/components/Card.js +49 -0
  6. package/lib/module/components/Card.js.map +1 -0
  7. package/lib/module/components/CircularProgress.js +80 -0
  8. package/lib/module/components/CircularProgress.js.map +1 -0
  9. package/lib/module/components/Icon.js +268 -0
  10. package/lib/module/components/Icon.js.map +1 -0
  11. package/lib/module/components/ProgressBar.js +39 -0
  12. package/lib/module/components/ProgressBar.js.map +1 -0
  13. package/lib/module/components/Typography.js +102 -0
  14. package/lib/module/components/Typography.js.map +1 -0
  15. package/lib/module/components/index.js +10 -0
  16. package/lib/module/components/index.js.map +1 -0
  17. package/lib/module/context/ElearnConfigContext.js +76 -0
  18. package/lib/module/context/ElearnConfigContext.js.map +1 -0
  19. package/lib/module/context/ThemeContext.js +45 -0
  20. package/lib/module/context/ThemeContext.js.map +1 -0
  21. package/lib/module/index.js +13 -0
  22. package/lib/module/index.js.map +1 -0
  23. package/lib/module/multiply.js +6 -0
  24. package/lib/module/multiply.js.map +1 -0
  25. package/lib/module/package.json +1 -0
  26. package/lib/module/screens/HomeScreen.js +330 -0
  27. package/lib/module/screens/HomeScreen.js.map +1 -0
  28. package/lib/module/screens/QbankScreen.js +200 -0
  29. package/lib/module/screens/QbankScreen.js.map +1 -0
  30. package/lib/module/screens/QuestionScreen.js +383 -0
  31. package/lib/module/screens/QuestionScreen.js.map +1 -0
  32. package/lib/module/screens/QuizStartScreen.js +230 -0
  33. package/lib/module/screens/QuizStartScreen.js.map +1 -0
  34. package/lib/module/screens/ResultScreen.js +318 -0
  35. package/lib/module/screens/ResultScreen.js.map +1 -0
  36. package/lib/module/screens/TopicListScreen.js +222 -0
  37. package/lib/module/screens/TopicListScreen.js.map +1 -0
  38. package/lib/module/screens/index.js +9 -0
  39. package/lib/module/screens/index.js.map +1 -0
  40. package/lib/module/types/index.js +2 -0
  41. package/lib/module/types/index.js.map +1 -0
  42. package/lib/typescript/package.json +1 -0
  43. package/lib/typescript/src/components/Button.d.ts +14 -0
  44. package/lib/typescript/src/components/Button.d.ts.map +1 -0
  45. package/lib/typescript/src/components/Card.d.ts +12 -0
  46. package/lib/typescript/src/components/Card.d.ts.map +1 -0
  47. package/lib/typescript/src/components/CircularProgress.d.ts +15 -0
  48. package/lib/typescript/src/components/CircularProgress.d.ts.map +1 -0
  49. package/lib/typescript/src/components/Icon.d.ts +11 -0
  50. package/lib/typescript/src/components/Icon.d.ts.map +1 -0
  51. package/lib/typescript/src/components/ProgressBar.d.ts +11 -0
  52. package/lib/typescript/src/components/ProgressBar.d.ts.map +1 -0
  53. package/lib/typescript/src/components/Typography.d.ts +12 -0
  54. package/lib/typescript/src/components/Typography.d.ts.map +1 -0
  55. package/lib/typescript/src/components/index.d.ts +9 -0
  56. package/lib/typescript/src/components/index.d.ts.map +1 -0
  57. package/lib/typescript/src/context/ElearnConfigContext.d.ts +22 -0
  58. package/lib/typescript/src/context/ElearnConfigContext.d.ts.map +1 -0
  59. package/lib/typescript/src/context/ThemeContext.d.ts +11 -0
  60. package/lib/typescript/src/context/ThemeContext.d.ts.map +1 -0
  61. package/lib/typescript/src/index.d.ts +6 -0
  62. package/lib/typescript/src/index.d.ts.map +1 -0
  63. package/lib/typescript/src/multiply.d.ts +2 -0
  64. package/lib/typescript/src/multiply.d.ts.map +1 -0
  65. package/lib/typescript/src/screens/HomeScreen.d.ts +3 -0
  66. package/lib/typescript/src/screens/HomeScreen.d.ts.map +1 -0
  67. package/lib/typescript/src/screens/QbankScreen.d.ts +3 -0
  68. package/lib/typescript/src/screens/QbankScreen.d.ts.map +1 -0
  69. package/lib/typescript/src/screens/QuestionScreen.d.ts +11 -0
  70. package/lib/typescript/src/screens/QuestionScreen.d.ts.map +1 -0
  71. package/lib/typescript/src/screens/QuizStartScreen.d.ts +10 -0
  72. package/lib/typescript/src/screens/QuizStartScreen.d.ts.map +1 -0
  73. package/lib/typescript/src/screens/ResultScreen.d.ts +11 -0
  74. package/lib/typescript/src/screens/ResultScreen.d.ts.map +1 -0
  75. package/lib/typescript/src/screens/TopicListScreen.d.ts +9 -0
  76. package/lib/typescript/src/screens/TopicListScreen.d.ts.map +1 -0
  77. package/lib/typescript/src/screens/index.d.ts +7 -0
  78. package/lib/typescript/src/screens/index.d.ts.map +1 -0
  79. package/lib/typescript/src/types/index.d.ts +107 -0
  80. package/lib/typescript/src/types/index.d.ts.map +1 -0
  81. package/package.json +121 -0
  82. package/src/components/Button.tsx +101 -0
  83. package/src/components/Card.tsx +57 -0
  84. package/src/components/CircularProgress.tsx +93 -0
  85. package/src/components/Icon.tsx +338 -0
  86. package/src/components/ProgressBar.tsx +47 -0
  87. package/src/components/Typography.tsx +112 -0
  88. package/src/components/index.ts +8 -0
  89. package/src/context/ElearnConfigContext.tsx +90 -0
  90. package/src/context/ThemeContext.tsx +37 -0
  91. package/src/index.tsx +33 -0
  92. package/src/multiply.tsx +3 -0
  93. package/src/screens/HomeScreen.tsx +291 -0
  94. package/src/screens/QbankScreen.tsx +176 -0
  95. package/src/screens/QuestionScreen.tsx +402 -0
  96. package/src/screens/QuizStartScreen.tsx +215 -0
  97. package/src/screens/ResultScreen.tsx +303 -0
  98. package/src/screens/TopicListScreen.tsx +200 -0
  99. package/src/screens/index.ts +6 -0
  100. package/src/types/index.ts +122 -0
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Antigravity
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # react-native-elearn-ui
2
+
3
+ Enterprise E-Learning UI library for React Native
4
+
5
+ ## Installation
6
+
7
+
8
+ ```sh
9
+ npm install react-native-elearn-ui
10
+ ```
11
+
12
+
13
+ ## Usage
14
+
15
+
16
+ ```js
17
+ import { multiply } from 'react-native-elearn-ui';
18
+
19
+ // ...
20
+
21
+ const result = multiply(3, 7);
22
+ ```
23
+
24
+
25
+ ## Contributing
26
+
27
+ - [Development workflow](CONTRIBUTING.md#development-workflow)
28
+ - [Sending a pull request](CONTRIBUTING.md#sending-a-pull-request)
29
+ - [Code of conduct](CODE_OF_CONDUCT.md)
30
+
31
+ ## License
32
+
33
+ MIT
34
+
35
+ ---
36
+
37
+ Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { TouchableOpacity, StyleSheet, ActivityIndicator } from 'react-native';
5
+ import { useTheme } from "../context/ThemeContext.js";
6
+ import { Typography } from "./Typography.js";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export const Button = ({
9
+ onPress,
10
+ title,
11
+ variant = 'primary',
12
+ disabled = false,
13
+ loading = false,
14
+ style,
15
+ textStyle
16
+ }) => {
17
+ const theme = useTheme();
18
+ const getButtonStyle = () => {
19
+ switch (variant) {
20
+ case 'primary':
21
+ return {
22
+ backgroundColor: theme.primary
23
+ };
24
+ case 'secondary':
25
+ return {
26
+ backgroundColor: theme.secondary
27
+ };
28
+ case 'outline':
29
+ return {
30
+ backgroundColor: 'transparent',
31
+ borderWidth: 1.5,
32
+ borderColor: theme.primary
33
+ };
34
+ default:
35
+ return {};
36
+ }
37
+ };
38
+ const getTextColor = () => {
39
+ if (disabled) return theme.textSecondary;
40
+ switch (variant) {
41
+ case 'primary':
42
+ return theme.textInverse;
43
+ case 'secondary':
44
+ case 'outline':
45
+ return theme.primary;
46
+ default:
47
+ return theme.textInverse;
48
+ }
49
+ };
50
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
51
+ activeOpacity: 0.8,
52
+ onPress: onPress,
53
+ disabled: disabled || loading,
54
+ style: [styles.button, getButtonStyle(), disabled && {
55
+ backgroundColor: theme.border,
56
+ borderColor: theme.border
57
+ }, style],
58
+ children: loading ? /*#__PURE__*/_jsx(ActivityIndicator, {
59
+ color: getTextColor()
60
+ }) : /*#__PURE__*/_jsx(Typography, {
61
+ variant: "button",
62
+ color: getTextColor(),
63
+ style: [styles.text, textStyle],
64
+ children: title
65
+ })
66
+ });
67
+ };
68
+ const styles = StyleSheet.create({
69
+ button: {
70
+ height: 48,
71
+ borderRadius: 24,
72
+ // Rounded pill design
73
+ justifyContent: 'center',
74
+ alignItems: 'center',
75
+ paddingHorizontal: 24,
76
+ flexDirection: 'row'
77
+ },
78
+ text: {
79
+ letterSpacing: 0.2
80
+ }
81
+ });
82
+ //# sourceMappingURL=Button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","TouchableOpacity","StyleSheet","ActivityIndicator","useTheme","Typography","jsx","_jsx","Button","onPress","title","variant","disabled","loading","style","textStyle","theme","getButtonStyle","backgroundColor","primary","secondary","borderWidth","borderColor","getTextColor","textSecondary","textInverse","activeOpacity","styles","button","border","children","color","text","create","height","borderRadius","justifyContent","alignItems","paddingHorizontal","flexDirection","letterSpacing"],"sourceRoot":"../../../src","sources":["components/Button.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,EAAEC,UAAU,EAAEC,iBAAiB,QAAQ,cAAc;AAE9E,SAASC,QAAQ,QAAQ,4BAAyB;AAClD,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY1C,OAAO,MAAMC,MAA6B,GAAGA,CAAC;EAC5CC,OAAO;EACPC,KAAK;EACLC,OAAO,GAAG,SAAS;EACnBC,QAAQ,GAAG,KAAK;EAChBC,OAAO,GAAG,KAAK;EACfC,KAAK;EACLC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGZ,QAAQ,CAAC,CAAC;EAExB,MAAMa,cAAc,GAAGA,CAAA,KAAM;IAC3B,QAAQN,OAAO;MACb,KAAK,SAAS;QACZ,OAAO;UACLO,eAAe,EAAEF,KAAK,CAACG;QACzB,CAAC;MACH,KAAK,WAAW;QACd,OAAO;UACLD,eAAe,EAAEF,KAAK,CAACI;QACzB,CAAC;MACH,KAAK,SAAS;QACZ,OAAO;UACLF,eAAe,EAAE,aAAa;UAC9BG,WAAW,EAAE,GAAG;UAChBC,WAAW,EAAEN,KAAK,CAACG;QACrB,CAAC;MACH;QACE,OAAO,CAAC,CAAC;IACb;EACF,CAAC;EAED,MAAMI,YAAY,GAAGA,CAAA,KAAM;IACzB,IAAIX,QAAQ,EAAE,OAAOI,KAAK,CAACQ,aAAa;IACxC,QAAQb,OAAO;MACb,KAAK,SAAS;QACZ,OAAOK,KAAK,CAACS,WAAW;MAC1B,KAAK,WAAW;MAChB,KAAK,SAAS;QACZ,OAAOT,KAAK,CAACG,OAAO;MACtB;QACE,OAAOH,KAAK,CAACS,WAAW;IAC5B;EACF,CAAC;EAED,oBACElB,IAAA,CAACN,gBAAgB;IACfyB,aAAa,EAAE,GAAI;IACnBjB,OAAO,EAAEA,OAAQ;IACjBG,QAAQ,EAAEA,QAAQ,IAAIC,OAAQ;IAC9BC,KAAK,EAAE,CACLa,MAAM,CAACC,MAAM,EACbX,cAAc,CAAC,CAAC,EAChBL,QAAQ,IAAI;MAAEM,eAAe,EAAEF,KAAK,CAACa,MAAM;MAAEP,WAAW,EAAEN,KAAK,CAACa;IAAO,CAAC,EACxEf,KAAK,CACL;IAAAgB,QAAA,EAEDjB,OAAO,gBACNN,IAAA,CAACJ,iBAAiB;MAAC4B,KAAK,EAAER,YAAY,CAAC;IAAE,CAAE,CAAC,gBAE5ChB,IAAA,CAACF,UAAU;MACTM,OAAO,EAAC,QAAQ;MAChBoB,KAAK,EAAER,YAAY,CAAC,CAAE;MACtBT,KAAK,EAAE,CAACa,MAAM,CAACK,IAAI,EAAEjB,SAAS,CAAE;MAAAe,QAAA,EAE/BpB;IAAK,CACI;EACb,CACe,CAAC;AAEvB,CAAC;AAED,MAAMiB,MAAM,GAAGzB,UAAU,CAAC+B,MAAM,CAAC;EAC/BL,MAAM,EAAE;IACNM,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAAE;IAClBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE;EACjB,CAAC;EACDP,IAAI,EAAE;IACJQ,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet, TouchableOpacity } from 'react-native';
5
+ import { useTheme } from "../context/ThemeContext.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const Card = ({
8
+ children,
9
+ style,
10
+ onPress,
11
+ bordered = false,
12
+ elevation = 1
13
+ }) => {
14
+ const theme = useTheme();
15
+ const cardStyle = [styles.card, {
16
+ backgroundColor: theme.cardBackground,
17
+ borderColor: theme.border,
18
+ borderWidth: bordered ? 1 : 0
19
+ }, elevation > 0 && {
20
+ shadowColor: '#0F172A',
21
+ shadowOffset: {
22
+ width: 0,
23
+ height: elevation * 2
24
+ },
25
+ shadowOpacity: 0.05 * elevation,
26
+ shadowRadius: elevation * 3,
27
+ elevation: elevation * 2
28
+ }, style];
29
+ if (onPress) {
30
+ return /*#__PURE__*/_jsx(TouchableOpacity, {
31
+ activeOpacity: 0.9,
32
+ onPress: onPress,
33
+ style: cardStyle,
34
+ children: children
35
+ });
36
+ }
37
+ return /*#__PURE__*/_jsx(View, {
38
+ style: cardStyle,
39
+ children: children
40
+ });
41
+ };
42
+ const styles = StyleSheet.create({
43
+ card: {
44
+ borderRadius: 16,
45
+ padding: 16,
46
+ marginVertical: 8
47
+ }
48
+ });
49
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","TouchableOpacity","useTheme","jsx","_jsx","Card","children","style","onPress","bordered","elevation","theme","cardStyle","styles","card","backgroundColor","cardBackground","borderColor","border","borderWidth","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","activeOpacity","create","borderRadius","padding","marginVertical"],"sourceRoot":"../../../src","sources":["components/Card.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,EAAEC,gBAAgB,QAAQ,cAAc;AAEjE,SAASC,QAAQ,QAAQ,4BAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAUnD,OAAO,MAAMC,IAAyB,GAAGA,CAAC;EACxCC,QAAQ;EACRC,KAAK;EACLC,OAAO;EACPC,QAAQ,GAAG,KAAK;EAChBC,SAAS,GAAG;AACd,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGT,QAAQ,CAAC,CAAC;EAExB,MAAMU,SAAS,GAAG,CAChBC,MAAM,CAACC,IAAI,EACX;IACEC,eAAe,EAAEJ,KAAK,CAACK,cAAc;IACrCC,WAAW,EAAEN,KAAK,CAACO,MAAM;IACzBC,WAAW,EAAEV,QAAQ,GAAG,CAAC,GAAG;EAC9B,CAAC,EACDC,SAAS,GAAG,CAAC,IAAI;IACfU,WAAW,EAAE,SAAS;IACtBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAEb,SAAS,GAAG;IAAE,CAAC;IACjDc,aAAa,EAAE,IAAI,GAAGd,SAAS;IAC/Be,YAAY,EAAEf,SAAS,GAAG,CAAC;IAC3BA,SAAS,EAAEA,SAAS,GAAG;EACzB,CAAC,EACDH,KAAK,CACN;EAED,IAAIC,OAAO,EAAE;IACX,oBACEJ,IAAA,CAACH,gBAAgB;MAACyB,aAAa,EAAE,GAAI;MAAClB,OAAO,EAAEA,OAAQ;MAACD,KAAK,EAAEK,SAAU;MAAAN,QAAA,EACtEA;IAAQ,CACO,CAAC;EAEvB;EAEA,oBAAOF,IAAA,CAACL,IAAI;IAACQ,KAAK,EAAEK,SAAU;IAAAN,QAAA,EAAEA;EAAQ,CAAO,CAAC;AAClD,CAAC;AAED,MAAMO,MAAM,GAAGb,UAAU,CAAC2B,MAAM,CAAC;EAC/Bb,IAAI,EAAE;IACJc,YAAY,EAAE,EAAE;IAChBC,OAAO,EAAE,EAAE;IACXC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import Svg, { Circle } from 'react-native-svg';
6
+ import { useTheme } from "../context/ThemeContext.js";
7
+ import { Typography } from "./Typography.js";
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ export const CircularProgress = ({
10
+ progress,
11
+ size = 64,
12
+ strokeWidth = 6,
13
+ color,
14
+ backgroundColor,
15
+ showText = true,
16
+ textStyle,
17
+ style
18
+ }) => {
19
+ const theme = useTheme();
20
+ const cappedProgress = Math.max(0, Math.min(1, progress));
21
+ const radius = (size - strokeWidth) / 2;
22
+ const circumference = radius * 2 * Math.PI;
23
+ const strokeDashoffset = circumference - cappedProgress * circumference;
24
+ const progressColor = color || theme.primary;
25
+ const bgStrokeColor = backgroundColor || theme.secondary;
26
+ return /*#__PURE__*/_jsxs(View, {
27
+ style: [styles.container, {
28
+ width: size,
29
+ height: size
30
+ }, style],
31
+ children: [/*#__PURE__*/_jsxs(Svg, {
32
+ width: size,
33
+ height: size,
34
+ children: [/*#__PURE__*/_jsx(Circle, {
35
+ cx: size / 2,
36
+ cy: size / 2,
37
+ r: radius,
38
+ stroke: bgStrokeColor,
39
+ strokeWidth: strokeWidth,
40
+ fill: "transparent"
41
+ }), /*#__PURE__*/_jsx(Circle, {
42
+ cx: size / 2,
43
+ cy: size / 2,
44
+ r: radius,
45
+ stroke: progressColor,
46
+ strokeWidth: strokeWidth,
47
+ fill: "transparent",
48
+ strokeDasharray: circumference,
49
+ strokeDashoffset: strokeDashoffset,
50
+ strokeLinecap: "round",
51
+ transform: `rotate(-90 ${size / 2} ${size / 2})`
52
+ })]
53
+ }), showText && /*#__PURE__*/_jsx(View, {
54
+ style: styles.textContainer,
55
+ children: /*#__PURE__*/_jsx(Typography, {
56
+ variant: "label",
57
+ bold: true,
58
+ color: theme.textPrimary,
59
+ style: [styles.text, textStyle],
60
+ children: `${Math.round(cappedProgress * 100)}%`
61
+ })
62
+ })]
63
+ });
64
+ };
65
+ const styles = StyleSheet.create({
66
+ container: {
67
+ justifyContent: 'center',
68
+ alignItems: 'center',
69
+ position: 'relative'
70
+ },
71
+ textContainer: {
72
+ position: 'absolute',
73
+ justifyContent: 'center',
74
+ alignItems: 'center'
75
+ },
76
+ text: {
77
+ textAlign: 'center'
78
+ }
79
+ });
80
+ //# sourceMappingURL=CircularProgress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","Svg","Circle","useTheme","Typography","jsx","_jsx","jsxs","_jsxs","CircularProgress","progress","size","strokeWidth","color","backgroundColor","showText","textStyle","style","theme","cappedProgress","Math","max","min","radius","circumference","PI","strokeDashoffset","progressColor","primary","bgStrokeColor","secondary","styles","container","width","height","children","cx","cy","r","stroke","fill","strokeDasharray","strokeLinecap","transform","textContainer","variant","bold","textPrimary","text","round","create","justifyContent","alignItems","position","textAlign"],"sourceRoot":"../../../src","sources":["components/CircularProgress.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,OAAOC,GAAG,IAAIC,MAAM,QAAQ,kBAAkB;AAC9C,SAASC,QAAQ,QAAQ,4BAAyB;AAClD,SAASC,UAAU,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAa1C,OAAO,MAAMC,gBAAiD,GAAGA,CAAC;EAChEC,QAAQ;EACRC,IAAI,GAAG,EAAE;EACTC,WAAW,GAAG,CAAC;EACfC,KAAK;EACLC,eAAe;EACfC,QAAQ,GAAG,IAAI;EACfC,SAAS;EACTC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGf,QAAQ,CAAC,CAAC;EAExB,MAAMgB,cAAc,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAEZ,QAAQ,CAAC,CAAC;EACzD,MAAMa,MAAM,GAAG,CAACZ,IAAI,GAAGC,WAAW,IAAI,CAAC;EACvC,MAAMY,aAAa,GAAGD,MAAM,GAAG,CAAC,GAAGH,IAAI,CAACK,EAAE;EAC1C,MAAMC,gBAAgB,GAAGF,aAAa,GAAGL,cAAc,GAAGK,aAAa;EAEvE,MAAMG,aAAa,GAAGd,KAAK,IAAIK,KAAK,CAACU,OAAO;EAC5C,MAAMC,aAAa,GAAGf,eAAe,IAAII,KAAK,CAACY,SAAS;EAExD,oBACEtB,KAAA,CAACT,IAAI;IAACkB,KAAK,EAAE,CAACc,MAAM,CAACC,SAAS,EAAE;MAAEC,KAAK,EAAEtB,IA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AU,CAACkD,MAAM,CAAC;EAC/BlB,SAAS,EAAE;IACTmB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,QAAQ,EAAE;EACZ,CAAC;EACDT,aAAa,EAAE;IACbS,QAAQ,EAAE,UAAU;IACpBF,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDJ,IAAI,EAAE;IACJM,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,268 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import Svg, { Path, Circle, G } from 'react-native-svg';
5
+ import { useTheme } from "../context/ThemeContext.js";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ export const Icon = ({
8
+ name,
9
+ size = 24,
10
+ color,
11
+ strokeWidth = 2
12
+ }) => {
13
+ const theme = useTheme();
14
+ const iconColor = color || theme.textPrimary;
15
+ const renderIconContent = () => {
16
+ switch (name) {
17
+ case 'bell':
18
+ return /*#__PURE__*/_jsx(Path, {
19
+ d: "M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9M13.73 21a2 2 0 0 1-3.46 0",
20
+ stroke: iconColor,
21
+ strokeWidth: strokeWidth,
22
+ strokeLinecap: "round",
23
+ strokeLinejoin: "round",
24
+ fill: "none"
25
+ });
26
+ case 'user':
27
+ return /*#__PURE__*/_jsxs(G, {
28
+ children: [/*#__PURE__*/_jsx(Path, {
29
+ d: "M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2",
30
+ stroke: iconColor,
31
+ strokeWidth: strokeWidth,
32
+ strokeLinecap: "round",
33
+ strokeLinejoin: "round",
34
+ fill: "none"
35
+ }), /*#__PURE__*/_jsx(Circle, {
36
+ cx: "12",
37
+ cy: "7",
38
+ r: "4",
39
+ stroke: iconColor,
40
+ strokeWidth: strokeWidth,
41
+ strokeLinecap: "round",
42
+ strokeLinejoin: "round",
43
+ fill: "none"
44
+ })]
45
+ });
46
+ case 'chevron-right':
47
+ return /*#__PURE__*/_jsx(Path, {
48
+ d: "M9 18l6-6-6-6",
49
+ stroke: iconColor,
50
+ strokeWidth: strokeWidth,
51
+ strokeLinecap: "round",
52
+ strokeLinejoin: "round",
53
+ fill: "none"
54
+ });
55
+ case 'chevron-left':
56
+ return /*#__PURE__*/_jsx(Path, {
57
+ d: "M15 18l-6-6 6-6",
58
+ stroke: iconColor,
59
+ strokeWidth: strokeWidth,
60
+ strokeLinecap: "round",
61
+ strokeLinejoin: "round",
62
+ fill: "none"
63
+ });
64
+ case 'arrow-left':
65
+ return /*#__PURE__*/_jsx(Path, {
66
+ d: "M19 12H5M12 19l-7-7 7-7",
67
+ stroke: iconColor,
68
+ strokeWidth: strokeWidth,
69
+ strokeLinecap: "round",
70
+ strokeLinejoin: "round",
71
+ fill: "none"
72
+ });
73
+ case 'book-open':
74
+ return /*#__PURE__*/_jsx(Path, {
75
+ d: "M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2zM22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",
76
+ stroke: iconColor,
77
+ strokeWidth: strokeWidth,
78
+ strokeLinecap: "round",
79
+ strokeLinejoin: "round",
80
+ fill: "none"
81
+ });
82
+ case 'check-circle':
83
+ return /*#__PURE__*/_jsxs(G, {
84
+ children: [/*#__PURE__*/_jsx(Circle, {
85
+ cx: "12",
86
+ cy: "12",
87
+ r: "10",
88
+ stroke: iconColor,
89
+ strokeWidth: strokeWidth,
90
+ fill: "none"
91
+ }), /*#__PURE__*/_jsx(Path, {
92
+ d: "M9 11l3 3 6-6",
93
+ stroke: iconColor,
94
+ strokeWidth: strokeWidth,
95
+ strokeLinecap: "round",
96
+ strokeLinejoin: "round",
97
+ fill: "none"
98
+ })]
99
+ });
100
+ case 'x-circle':
101
+ return /*#__PURE__*/_jsxs(G, {
102
+ children: [/*#__PURE__*/_jsx(Circle, {
103
+ cx: "12",
104
+ cy: "12",
105
+ r: "10",
106
+ stroke: iconColor,
107
+ strokeWidth: strokeWidth,
108
+ fill: "none"
109
+ }), /*#__PURE__*/_jsx(Path, {
110
+ d: "M15 9l-6 6M9 9l6 6",
111
+ stroke: iconColor,
112
+ strokeWidth: strokeWidth,
113
+ strokeLinecap: "round",
114
+ strokeLinejoin: "round",
115
+ fill: "none"
116
+ })]
117
+ });
118
+ case 'clock':
119
+ return /*#__PURE__*/_jsxs(G, {
120
+ children: [/*#__PURE__*/_jsx(Circle, {
121
+ cx: "12",
122
+ cy: "12",
123
+ r: "10",
124
+ stroke: iconColor,
125
+ strokeWidth: strokeWidth,
126
+ fill: "none"
127
+ }), /*#__PURE__*/_jsx(Path, {
128
+ d: "M12 6v6l4 2",
129
+ stroke: iconColor,
130
+ strokeWidth: strokeWidth,
131
+ strokeLinecap: "round",
132
+ strokeLinejoin: "round",
133
+ fill: "none"
134
+ })]
135
+ });
136
+ case 'award':
137
+ return /*#__PURE__*/_jsxs(G, {
138
+ children: [/*#__PURE__*/_jsx(Circle, {
139
+ cx: "12",
140
+ cy: "8",
141
+ r: "7",
142
+ stroke: iconColor,
143
+ strokeWidth: strokeWidth,
144
+ fill: "none"
145
+ }), /*#__PURE__*/_jsx(Path, {
146
+ d: "M8.21 13.89L7 23l5-3 5 3-1.21-9.12",
147
+ stroke: iconColor,
148
+ strokeWidth: strokeWidth,
149
+ strokeLinecap: "round",
150
+ strokeLinejoin: "round",
151
+ fill: "none"
152
+ })]
153
+ });
154
+ case 'search':
155
+ return /*#__PURE__*/_jsxs(G, {
156
+ children: [/*#__PURE__*/_jsx(Circle, {
157
+ cx: "11",
158
+ cy: "11",
159
+ r: "8",
160
+ stroke: iconColor,
161
+ strokeWidth: strokeWidth,
162
+ fill: "none"
163
+ }), /*#__PURE__*/_jsx(Path, {
164
+ d: "M21 21l-4.35-4.35",
165
+ stroke: iconColor,
166
+ strokeWidth: strokeWidth,
167
+ strokeLinecap: "round",
168
+ strokeLinejoin: "round",
169
+ fill: "none"
170
+ })]
171
+ });
172
+ case 'flask':
173
+ return /*#__PURE__*/_jsx(Path, {
174
+ d: "M6 3h12M12 3v11M9 3v11M15 3v11M10 9h4M12 21a7 7 0 0 1-7-7c0-2 1-3.9 3-5V3h8v6c2 1.1 3 3 3 5a7 7 0 0 1-7 7z",
175
+ stroke: iconColor,
176
+ strokeWidth: strokeWidth,
177
+ strokeLinecap: "round",
178
+ strokeLinejoin: "round",
179
+ fill: "none"
180
+ });
181
+ case 'atom':
182
+ return /*#__PURE__*/_jsxs(G, {
183
+ children: [/*#__PURE__*/_jsx(Circle, {
184
+ cx: "12",
185
+ cy: "12",
186
+ r: "2",
187
+ stroke: iconColor,
188
+ strokeWidth: strokeWidth,
189
+ fill: iconColor
190
+ }), /*#__PURE__*/_jsx(Path, {
191
+ d: "M12 22C4 22 2 17 2 12S4 2 12 2s10 5 10 10-2 10-10 10z",
192
+ stroke: iconColor,
193
+ strokeWidth: strokeWidth,
194
+ strokeDasharray: "4 4",
195
+ fill: "none"
196
+ }), /*#__PURE__*/_jsx(Path, {
197
+ d: "M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",
198
+ stroke: iconColor,
199
+ strokeWidth: strokeWidth,
200
+ fill: "none"
201
+ })]
202
+ });
203
+ case 'dna':
204
+ return /*#__PURE__*/_jsx(Path, {
205
+ d: "M4.5 10.5C6 12 8 13.5 10 15s4.5 3 6.5 4.5M19.5 4.5C18 3 16 1.5 14 0s-4.5 1.5-6.5 3M4.5 4.5c3 3 6 6 9 9m-9 0c3-3 6-6 9-9M12 12l2.5 2.5m-5 0L12 12",
206
+ stroke: iconColor,
207
+ strokeWidth: strokeWidth,
208
+ strokeLinecap: "round",
209
+ strokeLinejoin: "round",
210
+ fill: "none"
211
+ });
212
+ case 'folder':
213
+ return /*#__PURE__*/_jsx(Path, {
214
+ d: "M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z",
215
+ stroke: iconColor,
216
+ strokeWidth: strokeWidth,
217
+ strokeLinecap: "round",
218
+ strokeLinejoin: "round",
219
+ fill: "none"
220
+ });
221
+ case 'info':
222
+ return /*#__PURE__*/_jsxs(G, {
223
+ children: [/*#__PURE__*/_jsx(Circle, {
224
+ cx: "12",
225
+ cy: "12",
226
+ r: "10",
227
+ stroke: iconColor,
228
+ strokeWidth: strokeWidth,
229
+ fill: "none"
230
+ }), /*#__PURE__*/_jsx(Path, {
231
+ d: "M12 16v-4M12 8h.01",
232
+ stroke: iconColor,
233
+ strokeWidth: strokeWidth + 0.5,
234
+ strokeLinecap: "round",
235
+ strokeLinejoin: "round",
236
+ fill: "none"
237
+ })]
238
+ });
239
+ case 'play':
240
+ return /*#__PURE__*/_jsx(Path, {
241
+ d: "M5 3l14 9-14 9V3z",
242
+ stroke: iconColor,
243
+ strokeWidth: strokeWidth,
244
+ strokeLinecap: "round",
245
+ strokeLinejoin: "round",
246
+ fill: "none"
247
+ });
248
+ case 'star':
249
+ return /*#__PURE__*/_jsx(Path, {
250
+ d: "M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z",
251
+ stroke: iconColor,
252
+ strokeWidth: strokeWidth,
253
+ strokeLinecap: "round",
254
+ strokeLinejoin: "round",
255
+ fill: "none"
256
+ });
257
+ default:
258
+ return null;
259
+ }
260
+ };
261
+ return /*#__PURE__*/_jsx(Svg, {
262
+ width: size,
263
+ height: size,
264
+ viewBox: "0 0 24 24",
265
+ children: renderIconContent()
266
+ });
267
+ };
268
+ //# sourceMappingURL=Icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Svg","Path","Circle","G","useTheme","jsx","_jsx","jsxs","_jsxs","Icon","name","size","color","strokeWidth","theme","iconColor","textPrimary","renderIconContent","d","stroke","strokeLinecap","strokeLinejoin","fill","children","cx","cy","r","strokeDasharray","width","height","viewBox"],"sourceRoot":"../../../src","sources":["components/Icon.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,GAAG,IAAIC,IAAI,EAAEC,MAAM,EAAEC,CAAC,QAAQ,kBAAkB;AACvD,SAASC,QAAQ,QAAQ,4BAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA6BnD,OAAO,MAAMC,IAAyB,GAAGA,CAAC;EACxCC,IAAI;EACJC,IAAI,GAAG,EAAE;EACTC,KAAK;EACLC,WAAW,GAAG;AAChB,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGV,QAAQ,CAAC,CAAC;EACxB,MAAMW,SAAS,GAAGH,KAAK,IAAIE,KAAK,CAACE,WAAW;EAE5C,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;IAC9B,QAAQP,IAAI;MACV,KAAK,MAAM;QACT,oBACEJ,IAAA,CAACL,IAAI;UACHiB,CAAC,EAAC,uEAAuE;UACzEC,MAAM,EAAEJ,SAAU;UAClBF,WAAW,EAAEA,WAAY;UACzBO,aAAa,EAAC,OAAO;UACrBC,cAAc,EAAC,OAAO;UACtBC,IAAI,EAAC;QAAM,CACZ,CAAC;MAEN,KAAK,MAAM;QACT,oBACEd,KAAA,CAACL,CAAC;UAAAoB,QAAA,gBACAjB,IAAA,CAACL,IAAI;YACHiB,CAAC,EAAC,2CAA2C;YAC7CC,MAAM,EAAEJ,SAAU;YAClBF,WAAW,EAAEA,WAAY;YACzBO,aAAa,EAAC,OAAO;YACrBC,cAAc,EAAC,OAAO;YACtBC,IAAI,EAAC;UAAM,CACZ,CAAC,eACFhB,IAAA,CAACJ,MAAM;YACLsB,EAAE,EAAC,IAAI;YACPC,EAAE,EAAC,GAAG;YACNC,CAAC,EAAC,GAAG;YACLP,MAAM,EAAEJ,SAAU;YAClBF,WAAW,EAAEA,WAAY;YACzBO,aAAa,EAAC,OAAO;YACrBC,c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C,OAAO;YACtBC,IAAI,EAAC;UAAM,CACZ,CAAC;QAAA,CACD,CAAC;MAER,KAAK,MAAM;QACT,oBACEhB,IAAA,CAACL,IAAI;UACHiB,CAAC,EAAC,mBAAmB;UACrBC,MAAM,EAAEJ,SAAU;UAClBF,WAAW,EAAEA,WAAY;UACzBO,aAAa,EAAC,OAAO;UACrBC,cAAc,EAAC,OAAO;UACtBC,IAAI,EAAC;QAAM,CACZ,CAAC;MAEN,KAAK,MAAM;QACT,oBACEhB,IAAA,CAACL,IAAI;UACHiB,CAAC,EAAC,8FAA8F;UAChGC,MAAM,EAAEJ,SAAU;UAClBF,WAAW,EAAEA,WAAY;UACzBO,aAAa,EAAC,OAAO;UACrBC,cAAc,EAAC,OAAO;UACtBC,IAAI,EAAC;QAAM,CACZ,CAAC;MAEN;QACE,OAAO,IAAI;IACf;EACF,CAAC;EAED,oBACEhB,IAAA,CAACN,GAAG;IAAC4B,KAAK,EAAEjB,IAAK;IAACkB,MAAM,EAAElB,IAAK;IAACmB,OAAO,EAAC,WAAW;IAAAP,QAAA,EAChDN,iBAAiB,CAAC;EAAC,CACjB,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { View, StyleSheet } from 'react-native';
5
+ import { useTheme } from "../context/ThemeContext.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const ProgressBar = ({
8
+ progress,
9
+ color,
10
+ height = 8,
11
+ style
12
+ }) => {
13
+ const theme = useTheme();
14
+ const cappedProgress = Math.max(0, Math.min(1, progress));
15
+ return /*#__PURE__*/_jsx(View, {
16
+ style: [styles.container, {
17
+ height,
18
+ backgroundColor: theme.border
19
+ }, style],
20
+ children: /*#__PURE__*/_jsx(View, {
21
+ style: [styles.fill, {
22
+ width: `${cappedProgress * 100}%`,
23
+ backgroundColor: color || theme.primary,
24
+ borderRadius: height / 2
25
+ }]
26
+ })
27
+ });
28
+ };
29
+ const styles = StyleSheet.create({
30
+ container: {
31
+ width: '100%',
32
+ borderRadius: 999,
33
+ overflow: 'hidden'
34
+ },
35
+ fill: {
36
+ height: '100%'
37
+ }
38
+ });
39
+ //# sourceMappingURL=ProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","View","StyleSheet","useTheme","jsx","_jsx","ProgressBar","progress","color","height","style","theme","cappedProgress","Math","max","min","styles","container","backgroundColor","border","children","fill","width","primary","borderRadius","create","overflow"],"sourceRoot":"../../../src","sources":["components/ProgressBar.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAE/C,SAASC,QAAQ,QAAQ,4BAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASnD,OAAO,MAAMC,WAAuC,GAAGA,CAAC;EACtDC,QAAQ;EACRC,KAAK;EACLC,MAAM,GAAG,CAAC;EACVC;AACF,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGR,QAAQ,CAAC,CAAC;EACxB,MAAMS,cAAc,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAAC,CAAC,EAAER,QAAQ,CAAC,CAAC;EAEzD,oBACEF,IAAA,CAACJ,IAAI;IAACS,KAAK,EAAE,CAACM,MAAM,CAACC,SAAS,EAAE;MAAER,MAAM;MAAES,eAAe,EAAEP,KAAK,CAACQ;IAAO,CAAC,EAAET,KAAK,CAAE;IAAAU,QAAA,eAChFf,IAAA,CAACJ,IAAI;MACHS,KAAK,EAAE,CACLM,MAAM,CAACK,IAAI,EACX;QACEC,KAAK,EAAE,GAAGV,cAAc,GAAG,GAAG,GAAG;QACjCM,eAAe,EAAEV,KAAK,IAAIG,KAAK,CAACY,OAAO;QACvCC,YAAY,EAAEf,MAAM,GAAG;MACzB,CAAC;IACD,CACH;EAAC,CACE,CAAC;AAEX,CAAC;AAED,MAAMO,MAAM,GAAGd,UAAU,CAACuB,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTK,KAAK,EAAE,MAAM;IACbE,YAAY,EAAE,GAAG;IACjBE,QAAQ,EAAE;EACZ,CAAC;EACDL,IAAI,EAAE;IACJZ,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}