@instructure/quiz-core 20.11.4-rc.2 → 20.11.4-rc.4

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.
@@ -61,7 +61,8 @@ export var ResultStimulus = (_dec = withStyle(generateStyle, generateComponentTh
61
61
 
62
62
  return this.props.sessionItem.getNestedEntries().toArray().map(function (sessionItem, i) {
63
63
  return jsx("div", {
64
- key: sessionItem.position
64
+ key: sessionItem.position,
65
+ css: _this.props.styles.item
65
66
  }, jsx("div", {
66
67
  css: _this.props.styles.connectingLines
67
68
  }), jsx("div", {
@@ -1,7 +1,19 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
2
3
 
3
- var generateStyle = function generateStyle(componentTheme) {
4
- var mq = "screen and (".concat(componentTheme.phoneBreakPoint, ")");
4
+ var generateStyle = function generateStyle(componentTheme, props) {
5
+ var mq = "@media screen and (".concat(componentTheme.phoneBreakPoint, ")");
6
+ var orientVertically = props.stimulus.orientation === 'top';
7
+ var connectingLines = {
8
+ flex: '0 0 1rem',
9
+ borderLeft: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
10
+ borderBottom: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
11
+ borderColor: componentTheme.phoneConnectingLinesBorderColor,
12
+ marginrTop: componentTheme.phoneConnectingLinesMargin,
13
+ marginRight: componentTheme.phoneConnectingLinesMargin,
14
+ height: '2rem',
15
+ width: '1.5rem'
16
+ };
5
17
  return {
6
18
  root: {
7
19
  borderBottom: "".concat(componentTheme.rootBorderWidth, " solid ").concat(componentTheme.rootBorderColor),
@@ -33,36 +45,36 @@ var generateStyle = function generateStyle(componentTheme) {
33
45
  fontSize: componentTheme.titleFontSize,
34
46
  fontWeight: componentTheme.titleFontWeight
35
47
  },
36
- items: _defineProperty({
48
+ item: {
49
+ display: 'flex'
50
+ },
51
+ items: _objectSpread(_objectSpread({
37
52
  padding: componentTheme.itemsPadding,
38
53
  width: '50%'
39
- }, mq, {
54
+ }, orientVertically && {
40
55
  width: '100%'
41
- }),
56
+ }), {}, _defineProperty({}, mq, {
57
+ width: '100%'
58
+ })),
42
59
  stimulusItem: {
43
60
  flex: '1 1 auto'
44
61
  },
45
- stimulusGroup: _defineProperty({
62
+ stimulusGroup: _objectSpread(_objectSpread({
46
63
  display: 'flex',
47
64
  flexDirection: 'row'
48
- }, mq, {
65
+ }, orientVertically && {
49
66
  flexDirection: 'column'
50
- }),
51
- stimulusInfo: _defineProperty({
67
+ }), {}, _defineProperty({}, mq, {
68
+ flexDirection: 'column'
69
+ })),
70
+ stimulusInfo: _objectSpread(_objectSpread({
52
71
  width: '50%'
53
- }, mq, {
72
+ }, orientVertically && {
54
73
  width: '100%'
55
- }),
56
- connectingLines: _defineProperty({}, mq, {
57
- flex: '0 0 1rem',
58
- borderLeft: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
59
- borderBottom: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
60
- borderColor: componentTheme.phoneConnectingLinesBorderColor,
61
- marginrTop: componentTheme.phoneConnectingLinesMargin,
62
- marginRight: componentTheme.phoneConnectingLinesMargin,
63
- height: '2rem',
64
- width: '1.5rem'
65
- })
74
+ }), {}, _defineProperty({}, mq, {
75
+ width: '100%'
76
+ })),
77
+ connectingLines: _objectSpread(_objectSpread({}, orientVertically && connectingLines), {}, _defineProperty({}, mq, connectingLines))
66
78
  };
67
79
  };
68
80
 
@@ -79,7 +79,8 @@ var ResultStimulus = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
79
79
 
80
80
  return this.props.sessionItem.getNestedEntries().toArray().map(function (sessionItem, i) {
81
81
  return (0, _emotion.jsx)("div", {
82
- key: sessionItem.position
82
+ key: sessionItem.position,
83
+ css: _this.props.styles.item
83
84
  }, (0, _emotion.jsx)("div", {
84
85
  css: _this.props.styles.connectingLines
85
86
  }), (0, _emotion.jsx)("div", {
@@ -7,10 +7,23 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.default = void 0;
9
9
 
10
+ var _objectSpread6 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
11
+
10
12
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
13
 
12
- var generateStyle = function generateStyle(componentTheme) {
13
- var mq = "screen and (".concat(componentTheme.phoneBreakPoint, ")");
14
+ var generateStyle = function generateStyle(componentTheme, props) {
15
+ var mq = "@media screen and (".concat(componentTheme.phoneBreakPoint, ")");
16
+ var orientVertically = props.stimulus.orientation === 'top';
17
+ var connectingLines = {
18
+ flex: '0 0 1rem',
19
+ borderLeft: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
20
+ borderBottom: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
21
+ borderColor: componentTheme.phoneConnectingLinesBorderColor,
22
+ marginrTop: componentTheme.phoneConnectingLinesMargin,
23
+ marginRight: componentTheme.phoneConnectingLinesMargin,
24
+ height: '2rem',
25
+ width: '1.5rem'
26
+ };
14
27
  return {
15
28
  root: {
16
29
  borderBottom: "".concat(componentTheme.rootBorderWidth, " solid ").concat(componentTheme.rootBorderColor),
@@ -42,36 +55,36 @@ var generateStyle = function generateStyle(componentTheme) {
42
55
  fontSize: componentTheme.titleFontSize,
43
56
  fontWeight: componentTheme.titleFontWeight
44
57
  },
45
- items: (0, _defineProperty2.default)({
58
+ item: {
59
+ display: 'flex'
60
+ },
61
+ items: (0, _objectSpread6.default)((0, _objectSpread6.default)({
46
62
  padding: componentTheme.itemsPadding,
47
63
  width: '50%'
48
- }, mq, {
64
+ }, orientVertically && {
49
65
  width: '100%'
50
- }),
66
+ }), {}, (0, _defineProperty2.default)({}, mq, {
67
+ width: '100%'
68
+ })),
51
69
  stimulusItem: {
52
70
  flex: '1 1 auto'
53
71
  },
54
- stimulusGroup: (0, _defineProperty2.default)({
72
+ stimulusGroup: (0, _objectSpread6.default)((0, _objectSpread6.default)({
55
73
  display: 'flex',
56
74
  flexDirection: 'row'
57
- }, mq, {
75
+ }, orientVertically && {
58
76
  flexDirection: 'column'
59
- }),
60
- stimulusInfo: (0, _defineProperty2.default)({
77
+ }), {}, (0, _defineProperty2.default)({}, mq, {
78
+ flexDirection: 'column'
79
+ })),
80
+ stimulusInfo: (0, _objectSpread6.default)((0, _objectSpread6.default)({
61
81
  width: '50%'
62
- }, mq, {
82
+ }, orientVertically && {
63
83
  width: '100%'
64
- }),
65
- connectingLines: (0, _defineProperty2.default)({}, mq, {
66
- flex: '0 0 1rem',
67
- borderLeft: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
68
- borderBottom: "".concat(componentTheme.phoneConnectingLinesBorderWidth, " dotted"),
69
- borderColor: componentTheme.phoneConnectingLinesBorderColor,
70
- marginrTop: componentTheme.phoneConnectingLinesMargin,
71
- marginRight: componentTheme.phoneConnectingLinesMargin,
72
- height: '2rem',
73
- width: '1.5rem'
74
- })
84
+ }), {}, (0, _defineProperty2.default)({}, mq, {
85
+ width: '100%'
86
+ })),
87
+ connectingLines: (0, _objectSpread6.default)((0, _objectSpread6.default)({}, orientVertically && connectingLines), {}, (0, _defineProperty2.default)({}, mq, connectingLines))
75
88
  };
76
89
  };
77
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.11.4-rc.2+551dd5b47",
3
+ "version": "20.11.4-rc.4+6259006fa",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -44,11 +44,11 @@
44
44
  "@instructure/emotion": "^8.51.0",
45
45
  "@instructure/grading-utils": "^1.0.0",
46
46
  "@instructure/outcomes-ui": "^3.2.1",
47
- "@instructure/quiz-common": "20.11.4-rc.2+551dd5b47",
48
- "@instructure/quiz-i18n": "20.11.4-rc.2+551dd5b47",
49
- "@instructure/quiz-interactions": "20.11.4-rc.2+551dd5b47",
50
- "@instructure/quiz-number-input": "20.11.4-rc.2+551dd5b47",
51
- "@instructure/quiz-rce": "20.11.4-rc.2+551dd5b47",
47
+ "@instructure/quiz-common": "20.11.4-rc.4+6259006fa",
48
+ "@instructure/quiz-i18n": "20.11.4-rc.4+6259006fa",
49
+ "@instructure/quiz-interactions": "20.11.4-rc.4+6259006fa",
50
+ "@instructure/quiz-number-input": "20.11.4-rc.4+6259006fa",
51
+ "@instructure/quiz-rce": "20.11.4-rc.4+6259006fa",
52
52
  "@instructure/ui-a11y-content": "^8.51.0",
53
53
  "@instructure/ui-alerts": "^8.51.0",
54
54
  "@instructure/ui-avatar": "^8.51.0",
@@ -112,7 +112,7 @@
112
112
  "file-saver": "~2.0.5",
113
113
  "humps": "^2.0.0",
114
114
  "immutable": "^3.8.1",
115
- "instructure-validations": "20.11.4-rc.2+551dd5b47",
115
+ "instructure-validations": "20.11.4-rc.4+6259006fa",
116
116
  "ipaddr.js": "^1.5.4",
117
117
  "isomorphic-fetch": "^2.2.0",
118
118
  "isuuid": "^0.1.0",
@@ -163,7 +163,7 @@
163
163
  "intl": "^1.2.4",
164
164
  "jquery": "^2.2.3",
165
165
  "most-subject": "^5.3.0",
166
- "quiz-presets": "20.11.4-rc.2+551dd5b47",
166
+ "quiz-presets": "20.11.4-rc.4+6259006fa",
167
167
  "react": "^16.8.6",
168
168
  "react-addons-test-utils": "^15.6.2",
169
169
  "react-dom": "^16.8.6",
@@ -179,5 +179,5 @@
179
179
  "publishConfig": {
180
180
  "access": "public"
181
181
  },
182
- "gitHead": "551dd5b477a4d76280ae3c35fb5321decc34a49c"
182
+ "gitHead": "6259006faed5c298b839380c74085fe49a9b2c53"
183
183
  }