@magmamath/students-features 0.9.110-rc.6 → 0.9.110-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js +3 -2
- package/dist/commonjs/features/openEnded/components/OpenEndedScoreLabel.js.map +1 -1
- package/dist/commonjs/shared/shared.constants.js +9 -0
- package/dist/commonjs/shared/shared.constants.js.map +1 -0
- package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js +4 -3
- package/dist/module/features/openEnded/components/OpenEndedScoreLabel.js.map +1 -1
- package/dist/module/shared/shared.constants.js +5 -0
- package/dist/module/shared/shared.constants.js.map +1 -0
- package/dist/typescript/commonjs/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/shared.constants.d.ts +2 -0
- package/dist/typescript/commonjs/shared/shared.constants.d.ts.map +1 -0
- package/dist/typescript/module/features/openEnded/components/OpenEndedScoreLabel.d.ts.map +1 -1
- package/dist/typescript/module/shared/shared.constants.d.ts +2 -0
- package/dist/typescript/module/shared/shared.constants.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/features/openEnded/components/OpenEndedScoreLabel.tsx +3 -2
- package/src/shared/shared.constants.ts +3 -0
|
@@ -8,6 +8,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
10
|
var _oeHelpers = require("../oe.helpers.js");
|
|
11
|
+
var _sharedConstants = require("../../../shared/shared.constants.js");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
const OpenEndedScoreLabel = ({
|
|
@@ -51,12 +52,12 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
51
52
|
flexDirection: 'row',
|
|
52
53
|
alignItems: 'center',
|
|
53
54
|
justifyContent: 'center',
|
|
54
|
-
width:
|
|
55
|
+
width: _sharedConstants.isWeb ? 20 : 24,
|
|
55
56
|
height: 32,
|
|
56
57
|
borderWidth: 1,
|
|
57
58
|
borderRadius: _reactNativeUi.BORDER_RADIUS[200],
|
|
58
59
|
borderColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
59
|
-
paddingVertical:
|
|
60
|
+
paddingVertical: _sharedConstants.isWeb ? _reactNativeUi.SPACING[50] : 0,
|
|
60
61
|
paddingHorizontal: _reactNativeUi.SPACING[100],
|
|
61
62
|
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
62
63
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_oeHelpers","_jsxRuntime","e","__esModule","default","OpenEndedScoreLabel","label","score","maxScore","disabled","variant","colors","getScoreLabelColor","jsxs","View","style","styles","container","children","jsx","Typography","HeadingVariants","H3","color","maxScoreText","exports","StyleSheet","create","alignItems","flexDirection","justifyContent","width","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_oeHelpers","_sharedConstants","_jsxRuntime","e","__esModule","default","OpenEndedScoreLabel","label","score","maxScore","disabled","variant","colors","getScoreLabelColor","jsxs","View","style","styles","container","children","jsx","Typography","HeadingVariants","H3","color","maxScoreText","exports","StyleSheet","create","alignItems","flexDirection","justifyContent","width","isWeb","height","borderWidth","borderRadius","BORDER_RADIUS","borderColor","COLORS","NEUTRAL_5","paddingVertical","SPACING","paddingHorizontal","backgroundColor","NEUTRAL_1","marginLeft"],"sourceRoot":"../../../../../src","sources":["features/openEnded/components/OpenEndedScoreLabel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAOA,IAAAG,UAAA,GAAAH,OAAA;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AS,EAAE;IACTW,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE;EACjB,CAAC;EACDtB,KAAK,EAAE;IACLsB,aAAa,EAAE,KAAK;IACpBD,UAAU,EAAE,QAAQ;IACpBE,cAAc,EAAE,QAAQ;IACxBC,KAAK,EAAEC,sBAAK,GAAG,EAAE,GAAG,EAAE;IACtBC,MAAM,EAAE,EAAE;IACVC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAEC,4BAAa,CAAC,GAAG,CAAC;IAChCC,WAAW,EAAEC,qBAAM,CAACC,SAAS;IAC7BC,eAAe,EAAER,sBAAK,GAAGS,sBAAO,CAAC,EAAE,CAAC,GAAG,CAAC;IACxCC,iBAAiB,EAAED,sBAAO,CAAC,GAAG,CAAC;IAC/BE,eAAe,EAAEL,qBAAM,CAACM;EAC1B,CAAC;EACDpB,YAAY,EAAE;IACZqB,UAAU,EAAEJ,sBAAO,CAAC,GAAG;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isWeb = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
const isWeb = exports.isWeb = _reactNative.Platform.OS === 'web';
|
|
9
|
+
//# sourceMappingURL=shared.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","isWeb","exports","Platform","OS"],"sourceRoot":"../../../src","sources":["shared/shared.constants.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEO,MAAMC,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAGE,qBAAQ,CAACC,EAAE,KAAK,KAAK","ignoreList":[]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import { View, StyleSheet
|
|
4
|
+
import { View, StyleSheet } from 'react-native';
|
|
5
5
|
import { Typography, HeadingVariants, SPACING, BORDER_RADIUS, COLORS } from '@magmamath/react-native-ui';
|
|
6
6
|
import { getScoreLabelColor } from "../oe.helpers.js";
|
|
7
|
+
import { isWeb } from "../../../shared/shared.constants.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
export const OpenEndedScoreLabel = ({
|
|
9
10
|
label,
|
|
@@ -45,12 +46,12 @@ const styles = StyleSheet.create({
|
|
|
45
46
|
flexDirection: 'row',
|
|
46
47
|
alignItems: 'center',
|
|
47
48
|
justifyContent: 'center',
|
|
48
|
-
width:
|
|
49
|
+
width: isWeb ? 20 : 24,
|
|
49
50
|
height: 32,
|
|
50
51
|
borderWidth: 1,
|
|
51
52
|
borderRadius: BORDER_RADIUS[200],
|
|
52
53
|
borderColor: COLORS.NEUTRAL_5,
|
|
53
|
-
paddingVertical:
|
|
54
|
+
paddingVertical: isWeb ? SPACING[50] : 0,
|
|
54
55
|
paddingHorizontal: SPACING[100],
|
|
55
56
|
backgroundColor: COLORS.NEUTRAL_1
|
|
56
57
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","StyleSheet","
|
|
1
|
+
{"version":3,"names":["React","View","StyleSheet","Typography","HeadingVariants","SPACING","BORDER_RADIUS","COLORS","getScoreLabelColor","isWeb","jsx","_jsx","jsxs","_jsxs","OpenEndedScoreLabel","label","score","maxScore","disabled","variant","colors","style","styles","container","children","H3","color","maxScoreText","create","alignItems","flexDirection","justifyContent","width","height","borderWidth","borderRadius","borderColor","NEUTRAL_5","paddingVertical","paddingHorizontal","backgroundColor","NEUTRAL_1","marginLeft"],"sourceRoot":"../../../../../src","sources":["features/openEnded/components/OpenEndedScoreLabel.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,UAAU,QAAkB,cAAc;AACz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AAE,QAAQ;IACxBC,KAAK,EAAEvB,KAAK,GAAG,EAAE,GAAG,EAAE;IACtBwB,MAAM,EAAE,EAAE;IACVC,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE7B,aAAa,CAAC,GAAG,CAAC;IAChC8B,WAAW,EAAE7B,MAAM,CAAC8B,SAAS;IAC7BC,eAAe,EAAE7B,KAAK,GAAGJ,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC;IACxCkC,iBAAiB,EAAElC,OAAO,CAAC,GAAG,CAAC;IAC/BmC,eAAe,EAAEjC,MAAM,CAACkC;EAC1B,CAAC;EACDd,YAAY,EAAE;IACZe,UAAU,EAAErC,OAAO,CAAC,GAAG;EACzB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","isWeb","OS"],"sourceRoot":"../../../src","sources":["shared/shared.constants.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,KAAK,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenEndedScoreLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/openEnded/components/OpenEndedScoreLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"OpenEndedScoreLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/openEnded/components/OpenEndedScoreLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAGxD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,0BAA0B,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mBAAmB,mDAM7B,wBAAwB,sBAiB1B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.constants.d.ts","sourceRoot":"","sources":["../../../../src/shared/shared.constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,SAAwB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenEndedScoreLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/openEnded/components/OpenEndedScoreLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"OpenEndedScoreLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/openEnded/components/OpenEndedScoreLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAGxD,KAAK,wBAAwB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,0BAA0B,CAAA;CACpC,CAAA;AAED,eAAO,MAAM,mBAAmB,mDAM7B,wBAAwB,sBAiB1B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.constants.d.ts","sourceRoot":"","sources":["../../../../src/shared/shared.constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,KAAK,SAAwB,CAAA"}
|
package/package.json
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
} from '@magmamath/react-native-ui'
|
|
10
10
|
import { getScoreLabelColor } from '../oe.helpers'
|
|
11
11
|
import { OpenEndedScoreLabelVariant } from '../oe.types'
|
|
12
|
+
import { isWeb } from '../../../shared/shared.constants'
|
|
12
13
|
|
|
13
14
|
type OpenEndedScoreLabelProps = {
|
|
14
15
|
label: string
|
|
@@ -52,12 +53,12 @@ const styles = StyleSheet.create({
|
|
|
52
53
|
flexDirection: 'row',
|
|
53
54
|
alignItems: 'center',
|
|
54
55
|
justifyContent: 'center',
|
|
55
|
-
width:
|
|
56
|
+
width: isWeb ? 20 : 24,
|
|
56
57
|
height: 32,
|
|
57
58
|
borderWidth: 1,
|
|
58
59
|
borderRadius: BORDER_RADIUS[200],
|
|
59
60
|
borderColor: COLORS.NEUTRAL_5,
|
|
60
|
-
paddingVertical:
|
|
61
|
+
paddingVertical: isWeb ? SPACING[50] : 0,
|
|
61
62
|
paddingHorizontal: SPACING[100],
|
|
62
63
|
backgroundColor: COLORS.NEUTRAL_1,
|
|
63
64
|
},
|