@instructure/quiz-core 20.35.1-rc.11 → 20.35.1-rc.6

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.
@@ -147,6 +147,7 @@ export var QuizEntryEditFooter = (_dec = withStyleOverrides(generateStyle, gener
147
147
  }, {
148
148
  key: "renderPointsSection",
149
149
  value: function renderPointsSection() {
150
+ var currentPointsValue = this.state.points;
150
151
  return jsx("div", {
151
152
  css: this.props.styles.pointsSection
152
153
  }, jsx("span", {
@@ -155,9 +156,10 @@ export var QuizEntryEditFooter = (_dec = withStyleOverrides(generateStyle, gener
155
156
  renderLabel: jsx(ScreenReaderContent, null, t('Points Possible Input')),
156
157
  onChange: this.handlePointsChange,
157
158
  onBlur: this.handlePointsBlur,
158
- value: this.state.points,
159
+ value: currentPointsValue,
159
160
  disabled: this.pointsDisabled(),
160
- "data-automation": "sdk-points-possible-numberinput"
161
+ "data-automation": "sdk-points-possible-numberinput",
162
+ "aria-valuetext": "".concat(currentPointsValue, " ").concat(t('Points'))
161
163
  })), jsx(View, {
162
164
  margin: "none none none x-small"
163
165
  }, jsx(Text, {
@@ -17,7 +17,16 @@ var generateStyle = function generateStyle(componentTheme, props) {
17
17
  overflowY: 'auto'
18
18
  }), {}, {
19
19
  transition: componentTheme.contentTransition,
20
- width: '100%'
20
+ width: '100%',
21
+ '.user_content p': {
22
+ margin: componentTheme.userContentMargin,
23
+ '&:first-of-type': {
24
+ marginTop: componentTheme.userContentZeroMargin
25
+ },
26
+ '&:last-child': {
27
+ marginBottom: componentTheme.userContentZeroMargin
28
+ }
29
+ }
21
30
  })
22
31
  };
23
32
  };
@@ -1,10 +1,13 @@
1
1
  var generateComponentTheme = function generateComponentTheme(_ref) {
2
2
  var typography = _ref.typography,
3
3
  breakpoints = _ref.breakpoints,
4
- transitions = _ref.transitions;
4
+ transitions = _ref.transitions,
5
+ spacing = _ref.spacing;
5
6
  return {
6
7
  fontFamily: typography.fontFamily,
7
- contentTransition: "transform ".concat(transitions.duration)
8
+ contentTransition: "transform ".concat(transitions.duration),
9
+ userContentMargin: spacing.mediumSmall,
10
+ userContentZeroMargin: 0
8
11
  };
9
12
  };
10
13
  export default generateComponentTheme;
@@ -10,6 +10,15 @@ var generateStyle = function generateStyle(componentTheme) {
10
10
  clear: 'both',
11
11
  content: '""',
12
12
  display: 'table'
13
+ },
14
+ '.user_content p': {
15
+ margin: componentTheme.userContentMargin,
16
+ '&:first-of-type': {
17
+ marginTop: componentTheme.userContentZeroMargin
18
+ },
19
+ '&:last-child': {
20
+ marginBottom: componentTheme.userContentMargin
21
+ }
13
22
  }
14
23
  },
15
24
  text: {
@@ -3,7 +3,9 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  typography = _ref.typography;
4
4
  return {
5
5
  wrapperPadding: spacing.large,
6
- textFontSize: typography.fontSizeMedium
6
+ textFontSize: typography.fontSizeMedium,
7
+ userContentMargin: spacing.mediumSmall,
8
+ userContentZeroMargin: 0
7
9
  };
8
10
  };
9
11
  export default generateComponentTheme;
@@ -154,6 +154,7 @@ var QuizEntryEditFooter = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.de
154
154
  }, {
155
155
  key: "renderPointsSection",
156
156
  value: function renderPointsSection() {
157
+ var currentPointsValue = this.state.points;
157
158
  return (0, _emotion.jsx)("div", {
158
159
  css: this.props.styles.pointsSection
159
160
  }, (0, _emotion.jsx)("span", {
@@ -162,9 +163,10 @@ var QuizEntryEditFooter = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.de
162
163
  renderLabel: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Points Possible Input')),
163
164
  onChange: this.handlePointsChange,
164
165
  onBlur: this.handlePointsBlur,
165
- value: this.state.points,
166
+ value: currentPointsValue,
166
167
  disabled: this.pointsDisabled(),
167
- "data-automation": "sdk-points-possible-numberinput"
168
+ "data-automation": "sdk-points-possible-numberinput",
169
+ "aria-valuetext": "".concat(currentPointsValue, " ").concat((0, _formatMessage.default)('Points'))
168
170
  })), (0, _emotion.jsx)(_uiView.View, {
169
171
  margin: "none none none x-small"
170
172
  }, (0, _emotion.jsx)(_uiText.Text, {
@@ -24,7 +24,16 @@ var generateStyle = function generateStyle(componentTheme, props) {
24
24
  overflowY: 'auto'
25
25
  }), {}, {
26
26
  transition: componentTheme.contentTransition,
27
- width: '100%'
27
+ width: '100%',
28
+ '.user_content p': {
29
+ margin: componentTheme.userContentMargin,
30
+ '&:first-of-type': {
31
+ marginTop: componentTheme.userContentZeroMargin
32
+ },
33
+ '&:last-child': {
34
+ marginBottom: componentTheme.userContentZeroMargin
35
+ }
36
+ }
28
37
  })
29
38
  };
30
39
  };
@@ -7,10 +7,13 @@ exports.default = void 0;
7
7
  var generateComponentTheme = function generateComponentTheme(_ref) {
8
8
  var typography = _ref.typography,
9
9
  breakpoints = _ref.breakpoints,
10
- transitions = _ref.transitions;
10
+ transitions = _ref.transitions,
11
+ spacing = _ref.spacing;
11
12
  return {
12
13
  fontFamily: typography.fontFamily,
13
- contentTransition: "transform ".concat(transitions.duration)
14
+ contentTransition: "transform ".concat(transitions.duration),
15
+ userContentMargin: spacing.mediumSmall,
16
+ userContentZeroMargin: 0
14
17
  };
15
18
  };
16
19
  var _default = generateComponentTheme;
@@ -16,6 +16,15 @@ var generateStyle = function generateStyle(componentTheme) {
16
16
  clear: 'both',
17
17
  content: '""',
18
18
  display: 'table'
19
+ },
20
+ '.user_content p': {
21
+ margin: componentTheme.userContentMargin,
22
+ '&:first-of-type': {
23
+ marginTop: componentTheme.userContentZeroMargin
24
+ },
25
+ '&:last-child': {
26
+ marginBottom: componentTheme.userContentMargin
27
+ }
19
28
  }
20
29
  },
21
30
  text: {
@@ -9,7 +9,9 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
9
9
  typography = _ref.typography;
10
10
  return {
11
11
  wrapperPadding: spacing.large,
12
- textFontSize: typography.fontSizeMedium
12
+ textFontSize: typography.fontSizeMedium,
13
+ userContentMargin: spacing.mediumSmall,
14
+ userContentZeroMargin: 0
13
15
  };
14
16
  };
15
17
  var _default = generateComponentTheme;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.35.1-rc.11+d90ba36be",
3
+ "version": "20.35.1-rc.6+06c17cd73",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -46,11 +46,11 @@
46
46
  "@instructure/emotion": "^8.56.3",
47
47
  "@instructure/grading-utils": "^1.0.0",
48
48
  "@instructure/outcomes-ui": "^3.2.2",
49
- "@instructure/quiz-common": "^20.35.1-rc.11+d90ba36be",
50
- "@instructure/quiz-i18n": "^20.35.1-rc.11+d90ba36be",
51
- "@instructure/quiz-interactions": "^20.35.1-rc.11+d90ba36be",
52
- "@instructure/quiz-number-input": "^20.35.1-rc.11+d90ba36be",
53
- "@instructure/quiz-rce": "^20.35.1-rc.11+d90ba36be",
49
+ "@instructure/quiz-common": "^20.35.1-rc.6+06c17cd73",
50
+ "@instructure/quiz-i18n": "^20.35.1-rc.6+06c17cd73",
51
+ "@instructure/quiz-interactions": "^20.35.1-rc.6+06c17cd73",
52
+ "@instructure/quiz-number-input": "^20.35.1-rc.6+06c17cd73",
53
+ "@instructure/quiz-rce": "^20.35.1-rc.6+06c17cd73",
54
54
  "@instructure/ui-a11y-content": "^8.56.3",
55
55
  "@instructure/ui-alerts": "^8.56.3",
56
56
  "@instructure/ui-avatar": "^8.56.3",
@@ -114,7 +114,7 @@
114
114
  "file-saver": "~2.0.5",
115
115
  "humps": "^2.0.0",
116
116
  "immutable": "^3.8.1",
117
- "instructure-validations": "^20.35.1-rc.11+d90ba36be",
117
+ "instructure-validations": "^20.35.1-rc.6+06c17cd73",
118
118
  "ipaddr.js": "^1.5.4",
119
119
  "isomorphic-fetch": "^2.2.0",
120
120
  "isuuid": "^0.1.0",
@@ -163,7 +163,7 @@
163
163
  "jquery": "^2.2.3",
164
164
  "karma-junit-reporter": "^2.0.1",
165
165
  "most-subject": "^5.3.0",
166
- "quiz-presets": "^20.35.1-rc.11+d90ba36be",
166
+ "quiz-presets": "^20.35.1-rc.6+06c17cd73",
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": "d90ba36bea907937551c964e7848e60bdb1c133f"
182
+ "gitHead": "06c17cd733404755a3dffb8730f5e3b0cb0808b4"
183
183
  }