@instructure/quiz-core 20.11.5-rc.0 → 20.11.5-rc.10

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 (85) hide show
  1. package/es/banks/components/BankEntryRow/presenter.js +3 -3
  2. package/es/building/components/resources/ItemFeedbackModal/presenter.js +2 -2
  3. package/es/building/components/resources/quiz/instructions/Show/index.js +4 -4
  4. package/es/building/components/resources/quiz/title/Show/index.js +2 -2
  5. package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +2 -2
  6. package/es/common/components/ImportModal/ImportFileSelector/index.js +71 -72
  7. package/es/common/components/ImportModal/ImportFileSelector/styles.js +27 -0
  8. package/es/common/components/ImportModal/ImportFileSelector/theme.js +4 -2
  9. package/es/common/components/resources/quiz/instructions/Instructions.js +2 -2
  10. package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +3 -3
  11. package/es/common/components/resources/stimulus/StimulusShow/index.js +2 -2
  12. package/es/common/components/shared/Card/CardContent/index.js +16 -18
  13. package/es/common/components/shared/Card/CardContent/theme.js +4 -2
  14. package/es/common/components/shared/Card/CardWrapper/index.js +13 -17
  15. package/es/common/components/shared/Card/CardWrapper/theme.js +4 -2
  16. package/es/common/components/shared/Card/index.js +7 -7
  17. package/es/common/components/shared/{overlayEmotion → overlay}/index.js +9 -9
  18. package/{lib/common/components/shared/overlayEmotion → es/common/components/shared/overlay}/styles.js +7 -10
  19. package/es/common/components/shared/overlay/theme.js +4 -2
  20. package/es/reporting/components/MetricsListItem/index.js +13 -19
  21. package/es/reporting/components/MetricsListItem/styles.js +12 -0
  22. package/es/reporting/components/MetricsListItem/theme.js +0 -3
  23. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +33 -61
  24. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +45 -0
  25. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +4 -2
  26. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +4 -4
  27. package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +9 -9
  28. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +1 -1
  29. package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +46 -50
  30. package/es/reporting/components/resources/QuizAndItemAnalysis/styles.js +18 -0
  31. package/es/reporting/components/resources/QuizAndItemAnalysis/theme.js +4 -2
  32. package/es/reporting/components/resources/ReportCard/index.js +1 -1
  33. package/es/taking/api/taking.js +2 -1
  34. package/lib/banks/components/BankEntryRow/presenter.js +4 -4
  35. package/lib/building/components/resources/ItemFeedbackModal/presenter.js +1 -1
  36. package/lib/building/components/resources/quiz/instructions/Show/index.js +2 -2
  37. package/lib/building/components/resources/quiz/title/Show/index.js +1 -1
  38. package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +1 -1
  39. package/lib/common/components/ImportModal/ImportFileSelector/index.js +69 -74
  40. package/lib/common/components/ImportModal/ImportFileSelector/styles.js +35 -0
  41. package/lib/common/components/ImportModal/ImportFileSelector/theme.js +6 -3
  42. package/lib/common/components/resources/quiz/instructions/Instructions.js +1 -1
  43. package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +2 -2
  44. package/lib/common/components/resources/stimulus/StimulusShow/index.js +1 -1
  45. package/lib/common/components/shared/Card/CardContent/index.js +16 -21
  46. package/lib/common/components/shared/Card/CardContent/theme.js +6 -3
  47. package/lib/common/components/shared/Card/CardWrapper/index.js +13 -19
  48. package/lib/common/components/shared/Card/CardWrapper/theme.js +6 -3
  49. package/lib/common/components/shared/Card/index.js +7 -7
  50. package/lib/common/components/shared/{overlayEmotion → overlay}/index.js +9 -9
  51. package/{es/common/components/shared/overlayEmotion → lib/common/components/shared/overlay}/styles.js +18 -3
  52. package/lib/common/components/shared/overlay/theme.js +6 -3
  53. package/lib/reporting/components/MetricsListItem/index.js +12 -22
  54. package/lib/reporting/components/MetricsListItem/styles.js +20 -0
  55. package/lib/reporting/components/MetricsListItem/theme.js +1 -10
  56. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +32 -64
  57. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/styles.js +56 -0
  58. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +6 -3
  59. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +4 -4
  60. package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +9 -9
  61. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +1 -1
  62. package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +45 -54
  63. package/lib/reporting/components/resources/QuizAndItemAnalysis/styles.js +26 -0
  64. package/lib/reporting/components/resources/QuizAndItemAnalysis/theme.js +6 -3
  65. package/lib/reporting/components/resources/ReportCard/index.js +1 -1
  66. package/lib/taking/api/taking.js +2 -1
  67. package/package.json +9 -9
  68. package/es/common/components/shared/CardEmotion/CardContent/index.js +0 -48
  69. package/es/common/components/shared/CardEmotion/CardContent/theme.js +0 -20
  70. package/es/common/components/shared/CardEmotion/CardWrapper/index.js +0 -48
  71. package/es/common/components/shared/CardEmotion/CardWrapper/theme.js +0 -13
  72. package/es/common/components/shared/CardEmotion/index.js +0 -28
  73. package/es/common/components/shared/overlay/Overlay.js +0 -85
  74. package/es/common/components/shared/overlayEmotion/theme.js +0 -12
  75. package/lib/common/components/shared/CardEmotion/CardContent/index.js +0 -67
  76. package/lib/common/components/shared/CardEmotion/CardContent/theme.js +0 -28
  77. package/lib/common/components/shared/CardEmotion/CardWrapper/index.js +0 -66
  78. package/lib/common/components/shared/CardEmotion/CardWrapper/theme.js +0 -21
  79. package/lib/common/components/shared/CardEmotion/index.js +0 -46
  80. package/lib/common/components/shared/overlay/Overlay.js +0 -95
  81. package/lib/common/components/shared/overlayEmotion/theme.js +0 -20
  82. /package/es/common/components/shared/{CardEmotion → Card}/CardContent/styles.js +0 -0
  83. /package/es/common/components/shared/{CardEmotion → Card}/CardWrapper/styles.js +0 -0
  84. /package/lib/common/components/shared/{CardEmotion → Card}/CardContent/styles.js +0 -0
  85. /package/lib/common/components/shared/{CardEmotion → Card}/CardWrapper/styles.js +0 -0
@@ -22,18 +22,18 @@ import { PresentationContent } from '@instructure/ui-a11y-content';
22
22
  import { Alert } from '@instructure/ui-alerts';
23
23
  import { withStyle, jsx } from '@instructure/emotion';
24
24
  import { BUILD_TRAY_POSITION, COPY_MOVE_BANK_ENTRY_MODAL, SET_EDIT_BUTTON_FOCUS, withI18nSupport } from '@instructure/quiz-common';
25
- import { RichContentRendererEmotion } from '@instructure/quiz-rce';
25
+ import { RichContentRenderer } from '@instructure/quiz-rce';
26
26
  import { extractTextFromHtml } from '@instructure/quiz-interactions';
27
27
  import t from '@instructure/quiz-i18n/es/format-message';
28
28
  import CopyMoveBankEntryModal from "../CopyMoveBankEntryModal/index.js";
29
29
  import ExpandButton from "../../../common/components/shared/ExpandButton/index.js";
30
30
  import QuizEntry from "../../../common/records/QuizEntry.js";
31
- import Overlay from "../../../common/components/shared/overlay/Overlay.js";
32
31
  import ItemShow from "../../../common/components/resources/item/ItemShow/index.js";
33
32
  import StimulusShowInfo from "../../../common/components/resources/stimulus/StimulusShowInfo/index.js";
34
33
  import TagDisplay from "../../../common/components/shared/TagDisplay/index.js";
35
34
  import generateStyle from "./styles.js";
36
35
  import generateComponentTheme from "./theme.js";
36
+ import Overlay from "../../../common/components/shared/overlay/index.js";
37
37
 
38
38
  var _ref2 = jsx("div", null);
39
39
 
@@ -271,7 +271,7 @@ export var BankEntryRow = (_dec = withStyle(generateStyle, generateComponentThem
271
271
  // or title plain text
272
272
 
273
273
  if (itemOrStimulus.itemBody) {
274
- return jsx(RichContentRendererEmotion, {
274
+ return jsx(RichContentRenderer, {
275
275
  customStyles: this.props.styles.stem,
276
276
  content: itemOrStimulus.itemBody
277
277
  });
@@ -12,7 +12,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
12
12
  import { Button, CloseButton } from '@instructure/ui-buttons';
13
13
  import { Heading } from '@instructure/ui-heading';
14
14
  import { withStyle, jsx } from '@instructure/emotion';
15
- import { RichContentRendererEmotion, RichContentInput, RCE_THREE_LINES_HEIGHT } from '@instructure/quiz-rce';
15
+ import { RichContentRenderer, RichContentInput, RCE_THREE_LINES_HEIGHT } from '@instructure/quiz-rce';
16
16
  import t from '@instructure/quiz-i18n/es/format-message';
17
17
  import { Modal, ModalHeader, ModalBody, ModalFooter, ITEM_FEEDBACK_MODAL_FEEDBACK, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
18
18
  import generateStyle from "./styles.js";
@@ -97,7 +97,7 @@ export var ItemFeedbackModal = (_dec = withStyle(generateStyle, generateComponen
97
97
  }, {
98
98
  key: "renderContent",
99
99
  value: function renderContent() {
100
- return jsx("div", null, jsx(RichContentRendererEmotion, {
100
+ return jsx("div", null, jsx(RichContentRenderer, {
101
101
  customStyles: this.props.styles.itemStem,
102
102
  content: this.props.item.itemBody
103
103
  }), this.renderRichContentInput('correct', t('For a correct answer')), this.renderRichContentInput('incorrect', t('For an incorrect answer')), this.renderRichContentInput('neutral', t('Provide general feedback (regardless of answer)')));
@@ -9,8 +9,8 @@ var _dec, _class, _class2, _temp;
9
9
  import { Component } from 'react';
10
10
  import PropTypes from 'prop-types';
11
11
  import { withStyle, jsx } from '@instructure/emotion';
12
- import { RichContentRendererEmotion } from '@instructure/quiz-rce';
13
- import OverlayEmotion from "../../../../../../common/components/shared/overlayEmotion/index.js";
12
+ import { RichContentRenderer } from '@instructure/quiz-rce';
13
+ import Overlay from "../../../../../../common/components/shared/overlay/index.js";
14
14
  import makeScrollable from "../../../../../../common/components/shared/functionality/makeScrollable.js";
15
15
  import generateStyle from "./styles.js";
16
16
  import generateComponentTheme from "./theme.js";
@@ -48,14 +48,14 @@ export var QuizInstructionsShow = (_dec = withStyle(generateStyle, generateCompo
48
48
  value: function render() {
49
49
  return jsx("span", {
50
50
  "data-automation": "sdk-quiz-instructions-show-wrapper"
51
- }, jsx(OverlayEmotion, {
51
+ }, jsx(Overlay, {
52
52
  wrapperStyles: this.props.styles.instructionsShowWrapper,
53
53
  onClick: this.switchOnEditing,
54
54
  tabIndex: "-1",
55
55
  hideOverlay: this.props.contentLocked
56
56
  }, jsx("div", {
57
57
  "data-automation": "instructions-show-text"
58
- }, jsx(RichContentRendererEmotion, {
58
+ }, jsx(RichContentRenderer, {
59
59
  customStyles: this.props.styles.instructionsShowText,
60
60
  content: this.props.instructions || t('Add Instructions...')
61
61
  }))));
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
11
11
  import { withStyle, jsx } from '@instructure/emotion';
12
12
  import { TruncateText } from '@instructure/ui-truncate-text';
13
13
  import { Text } from '@instructure/ui-text';
14
- import OverlayEmotion from "../../../../../../common/components/shared/overlayEmotion/index.js";
14
+ import Overlay from "../../../../../../common/components/shared/overlay/index.js";
15
15
  import makeScrollable from "../../../../../../common/components/shared/functionality/makeScrollable.js";
16
16
  import generateStyle from "./styles.js";
17
17
  import generateComponentTheme from "./theme.js"; // ====================================
@@ -49,7 +49,7 @@ export var QuizTitleShow = (_dec = withStyle(generateStyle, generateComponentThe
49
49
  value: function render() {
50
50
  return jsx("span", {
51
51
  "data-automation": "sdk-quiz-title-show-wrapper"
52
- }, jsx(OverlayEmotion, {
52
+ }, jsx(Overlay, {
53
53
  wrapperStyles: this.props.styles.titleShowWrapper,
54
54
  onClick: this.switchOnEditing,
55
55
  tabIndex: "-1",
@@ -19,7 +19,7 @@ import { TOP } from '@instructure/quiz-common';
19
19
  import t from '@instructure/quiz-i18n/es/format-message';
20
20
  import { convertFITBtoRich } from "../../../../../common/util/fitbCopyHelper.js";
21
21
  import Item from "../../../../../common/records/Item.js";
22
- import OverlayEmotion from "../../../../../common/components/shared/overlayEmotion/index.js";
22
+ import Overlay from "../../../../../common/components/shared/overlay/index.js";
23
23
  import ActionButtons from "../../ActionButtons/index.js";
24
24
  import { ItemTypes, dragSource, collectDrag } from "../../../../../common/components/shared/drag_and_drop/dragAndDropUtils.js";
25
25
  import PositionBox from "../../../../../common/components/resources/positionBox/PositionBox.js";
@@ -262,7 +262,7 @@ var QuizEntryShow = (_dec = withStyle(generateStyle, generateComponentTheme), _d
262
262
  var shouldLockQuizEntry = lockBlueprintContentEnabled && isContentLockedByBlueprint; // Overlay gets tabIndex === "-1" so that the drag handle is tabbable before
263
263
  // the Overlay get focus and opens the quizEntry in edit mode
264
264
 
265
- return jsx(OverlayEmotion, {
265
+ return jsx(Overlay, {
266
266
  onClick: this.editingOn,
267
267
  wrapperStyles: this.props.styles.quizEntryWrapper,
268
268
  tabIndex: "-1",
@@ -5,129 +5,127 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
 
6
6
  var _dec, _class, _class2, _temp;
7
7
 
8
- import React, { Component } from 'react';
8
+ /** @jsx jsx */
9
+ import { Component } from 'react';
9
10
  import PropTypes from 'prop-types';
10
11
  import ImmutablePropTypes from 'react-immutable-proptypes';
11
12
  import { Button } from '@instructure/ui-buttons';
12
13
  import { Grid } from '@instructure/ui-grid';
13
- import { themeable } from '@instructure/ui-themeable';
14
+ import { withStyle, jsx } from '@instructure/emotion';
14
15
  import { IconUploadLine, IconCompleteLine } from '@instructure/ui-icons';
15
16
  import t from '@instructure/quiz-i18n/es/format-message';
16
17
  import FileSelector from "../../../../common/components/shared/file_selector/FileSelector.js";
17
- var styles = {
18
- componentId: 'fqArL',
19
- template: function template(theme) {
20
- return "\n\n.fqArL_dVrD{color:".concat(theme.uploadIconContainerColor || 'inherit', ";font-size:").concat(theme.uploadIconContainerColorFontSize || 'inherit', ";text-align:right}\n\n[dir=ltr] .fqArL_dVrD,[dir=rtl] .fqArL_dVrD{text-align:right}\n\n.fqArL_brQK{color:").concat(theme.checkIconContainerColor || 'inherit', ";font-size:").concat(theme.checkIconContainerFontSize || 'inherit', ";text-align:right}\n\n[dir=ltr] .fqArL_brQK,[dir=rtl] .fqArL_brQK{text-align:right}\n\n.fqArL_kOWE{color:").concat(theme.smallTextColor || 'inherit', ";font-size:").concat(theme.smallTextFontSize || 'inherit', ";padding:0 ").concat(theme.smallTextPadding || 'inherit', "}\n\n.fqArL_ddCj{margin-top:").concat(theme.selectorMargin || 'inherit', "}\n\n.fqArL_cHlQ{color:").concat(theme.fileListSuccessColor || 'inherit', "}");
21
- },
22
- 'uploadIconContainer': 'fqArL_dVrD',
23
- 'checkIconContainer': 'fqArL_brQK',
24
- 'smallText': 'fqArL_kOWE',
25
- 'selector': 'fqArL_ddCj',
26
- 'fileListSuccess': 'fqArL_cHlQ'
27
- };
28
- import theme from "./theme.js";
18
+ import generateStyle from "./styles.js";
19
+ import generateComponentTheme from "./theme.js";
29
20
 
30
- var _ref3 = /*#__PURE__*/React.createElement(IconUploadLine, null);
21
+ var _ref = jsx(IconUploadLine, null);
31
22
 
32
- var _ref4 = /*#__PURE__*/React.createElement(IconCompleteLine, null);
23
+ var _ref2 = jsx(IconCompleteLine, null);
33
24
 
34
- export var ImportFileSelector = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
25
+ export var ImportFileSelector = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
35
26
  _inherits(ImportFileSelector, _Component);
36
27
 
37
28
  var _super = _createSuper(ImportFileSelector);
38
29
 
39
30
  function ImportFileSelector() {
40
- var _this;
41
-
42
31
  _classCallCheck(this, ImportFileSelector);
43
32
 
44
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
45
- args[_key] = arguments[_key];
46
- }
47
-
48
- _this = _super.call.apply(_super, [this].concat(args));
49
-
50
- _this.renderFileList = function () {
51
- var fileName = _this.props.files.get(0).name;
33
+ return _super.apply(this, arguments);
34
+ }
52
35
 
53
- return /*#__PURE__*/React.createElement("div", null, t.rich('<0>{fileName}</0> <1>is ready.</1>', {
54
- 0: function _(_ref) {
55
- var children = _ref.children;
56
- return /*#__PURE__*/React.createElement("span", {
57
- className: styles.fileListSuccess,
36
+ _createClass(ImportFileSelector, [{
37
+ key: "renderUploadIcon",
38
+ value: function renderUploadIcon(styles) {
39
+ return jsx("div", {
40
+ css: this.props.styles.uploadIconContainer
41
+ }, _ref);
42
+ }
43
+ }, {
44
+ key: "renderCheckmarkIcon",
45
+ value: function renderCheckmarkIcon(styles) {
46
+ return jsx("div", {
47
+ css: styles.checkIconContainer
48
+ }, _ref2);
49
+ }
50
+ }, {
51
+ key: "renderFileList",
52
+ value: function renderFileList(styles) {
53
+ var fileName = this.props.files.get(0).name;
54
+ return jsx("div", null, t.rich('<0>{fileName}</0> <1>is ready.</1>', {
55
+ 0: function _(_ref3) {
56
+ var children = _ref3.children;
57
+ return jsx("span", {
58
+ css: styles.fileListSuccess,
58
59
  key: "0"
59
60
  }, children);
60
61
  },
61
- 1: function _(_ref2) {
62
- var children = _ref2.children;
63
- return /*#__PURE__*/React.createElement("span", {
62
+ 1: function _(_ref4) {
63
+ var children = _ref4.children;
64
+ return jsx("span", {
64
65
  key: "1"
65
66
  }, children);
66
67
  },
67
68
  fileName: fileName
68
69
  }));
69
- };
70
-
71
- return _this;
72
- }
73
-
74
- _createClass(ImportFileSelector, [{
75
- key: "renderUploadIcon",
76
- value: function renderUploadIcon() {
77
- return /*#__PURE__*/React.createElement("div", {
78
- className: styles.uploadIconContainer
79
- }, _ref3);
80
- }
81
- }, {
82
- key: "renderCheckmarkIcon",
83
- value: function renderCheckmarkIcon() {
84
- return /*#__PURE__*/React.createElement("div", {
85
- className: styles.checkIconContainer
86
- }, _ref4);
87
70
  }
88
71
  }, {
89
72
  key: "renderFilePickerText",
90
- value: function renderFilePickerText() {
91
- return /*#__PURE__*/React.createElement("div", null, t.rich('Drag & Drop here <0>or</0> <1>Browse</1>', [function (_ref5) {
73
+ value: function renderFilePickerText(styles) {
74
+ return jsx("div", null, t.rich('Drag & Drop here <0>or</0> <1>Browse</1>', [function (_ref5) {
92
75
  var children = _ref5.children;
93
- return /*#__PURE__*/React.createElement("span", {
94
- className: styles.smallText,
76
+ return jsx("span", {
77
+ css: styles.smallText,
95
78
  key: "0"
96
79
  }, children);
97
80
  }, function (_ref6) {
98
81
  var children = _ref6.children;
99
- return /*#__PURE__*/React.createElement(Button, {
82
+ return jsx(Button, {
100
83
  key: "1"
101
84
  }, children);
102
85
  }]));
103
86
  }
104
87
  }, {
105
- key: "renderWrapper",
106
- value: function renderWrapper(renderIcon, renderText) {
107
- return /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Row, {
88
+ key: "renderWrapperWithList",
89
+ value: function renderWrapperWithList(styles) {
90
+ return jsx(Grid, null, jsx(Grid.Row, {
91
+ vAlign: "middle"
92
+ }, jsx(Grid.Col, {
93
+ width: 3
94
+ }, this.renderCheckmarkIcon(styles)), jsx(Grid.Col, null, this.renderFileList(styles))));
95
+ }
96
+ }, {
97
+ key: "renderWrapperWithText",
98
+ value: function renderWrapperWithText(styles) {
99
+ return jsx(Grid, null, jsx(Grid.Row, {
108
100
  vAlign: "middle"
109
- }, /*#__PURE__*/React.createElement(Grid.Col, {
101
+ }, jsx(Grid.Col, {
110
102
  width: 3
111
- }, renderIcon()), /*#__PURE__*/React.createElement(Grid.Col, null, renderText())));
103
+ }, this.renderUploadIcon(styles)), jsx(Grid.Col, null, this.renderFilePickerText(styles))));
112
104
  }
113
105
  }, {
114
106
  key: "renderContent",
115
107
  value: function renderContent() {
116
- if (this.props.files && this.props.files.size) {
117
- return this.renderWrapper(this.renderCheckmarkIcon, this.renderFileList);
108
+ var files = this.props.files;
109
+
110
+ if (files && files.size) {
111
+ return this.renderWrapperWithList(this.props.styles);
118
112
  } else {
119
- return this.renderWrapper(this.renderUploadIcon, this.renderFilePickerText);
113
+ return this.renderWrapperWithText(this.props.styles);
120
114
  }
121
115
  }
122
116
  }, {
123
117
  key: "render",
124
118
  value: function render() {
125
- return /*#__PURE__*/React.createElement("div", {
126
- className: styles.selector
127
- }, /*#__PURE__*/React.createElement(FileSelector, {
119
+ var _this$props = this.props,
120
+ styles = _this$props.styles,
121
+ receiveFile = _this$props.receiveFile,
122
+ acceptAttribute = _this$props.acceptAttribute;
123
+ return jsx("div", {
124
+ css: styles.selector
125
+ }, jsx(FileSelector, {
128
126
  content: this.renderContent(),
129
- fileHandler: this.props.receiveFile,
130
- acceptAttribute: this.props.acceptAttribute
127
+ fileHandler: receiveFile,
128
+ acceptAttribute: acceptAttribute
131
129
  }));
132
130
  }
133
131
  }]);
@@ -137,6 +135,7 @@ export var ImportFileSelector = (_dec = themeable(theme, styles), _dec(_class =
137
135
  }(Component), _class2.propTypes = {
138
136
  files: ImmutablePropTypes.list.isRequired,
139
137
  receiveFile: PropTypes.func.isRequired,
140
- acceptAttribute: PropTypes.string.isRequired
138
+ acceptAttribute: PropTypes.string.isRequired,
139
+ styles: PropTypes.object
141
140
  }, _temp)) || _class);
142
141
  export default ImportFileSelector;
@@ -0,0 +1,27 @@
1
+ var generateStyle = function generateStyle(componentTheme) {
2
+ return {
3
+ uploadIconContainer: {
4
+ color: componentTheme.uploadIconContainerColor,
5
+ fontSize: componentTheme.uploadIconContainerColorFontSize,
6
+ textAlign: 'right'
7
+ },
8
+ checkIconContainer: {
9
+ color: componentTheme.checkIconContainerColor,
10
+ fontSize: componentTheme.checkIconContainerFontSize,
11
+ textAlign: 'right'
12
+ },
13
+ smallText: {
14
+ padding: "0 ".concat(componentTheme.smallTextPadding),
15
+ fontSize: componentTheme.smallTextFontSize,
16
+ color: componentTheme.smallTextColor
17
+ },
18
+ selector: {
19
+ marginTop: componentTheme.selectorMargin
20
+ },
21
+ fileListSuccess: {
22
+ color: componentTheme.fileListSuccessColor
23
+ }
24
+ };
25
+ };
26
+
27
+ export default generateStyle;
@@ -1,4 +1,4 @@
1
- export default function generator(_ref) {
1
+ var generateComponentTheme = function generateComponentTheme(_ref) {
2
2
  var spacing = _ref.spacing,
3
3
  colors = _ref.colors,
4
4
  typography = _ref.typography;
@@ -13,4 +13,6 @@ export default function generator(_ref) {
13
13
  selectorMargin: spacing.xSmall,
14
14
  fileListSuccessColor: colors.shamrock
15
15
  };
16
- }
16
+ };
17
+
18
+ export default generateComponentTheme;
@@ -12,7 +12,7 @@ import { Component } from 'react';
12
12
  import ImmutablePropTypes from 'react-immutable-proptypes';
13
13
  import PropTypes from 'prop-types';
14
14
  import { withStyle, jsx } from '@instructure/emotion';
15
- import { RichContentRendererEmotion } from '@instructure/quiz-rce';
15
+ import { RichContentRenderer } from '@instructure/quiz-rce';
16
16
  import makeScrollable from "../../../shared/functionality/makeScrollable.js"; // ================================
17
17
  // renders the quiz instructions on
18
18
  // the Preview and Take pages
@@ -38,7 +38,7 @@ export var QuizInstructions = (_dec = withStyle(generateStyle, generateComponent
38
38
  "data-testid": "instructionsWrapper",
39
39
  css: this.props.styles.wrapper,
40
40
  tabIndex: "-1"
41
- }, jsx(RichContentRendererEmotion, {
41
+ }, jsx(RichContentRenderer, {
42
42
  customStyles: this.props.styles.text,
43
43
  content: this.props.quiz.instructions
44
44
  }));
@@ -17,7 +17,7 @@ import { Heading } from '@instructure/ui-heading';
17
17
  import { View } from '@instructure/ui-view';
18
18
  import { PresentationContent } from '@instructure/ui-a11y-content';
19
19
  import { withStyle, jsx } from '@instructure/emotion';
20
- import { RichContentRendererEmotion } from '@instructure/quiz-rce';
20
+ import { RichContentRenderer } from '@instructure/quiz-rce';
21
21
  import t from '@instructure/quiz-i18n/es/format-message';
22
22
  import PositionBox from "../../positionBox/PositionBox.js";
23
23
  import { COMPONENT_RESULT } from '@instructure/quiz-common';
@@ -184,7 +184,7 @@ export var SessionItemResult = (_dec = withStyle(generateStyle, generateComponen
184
184
  margin: "xx-small small"
185
185
  }, formattedFeedbackTitle), jsx("div", {
186
186
  css: this.props.styles.textPadding
187
- }, jsx(RichContentRendererEmotion, {
187
+ }, jsx(RichContentRenderer, {
188
188
  customStyles: this.props.styles.itemFeedbackText,
189
189
  content: feedbackContent
190
190
  })));
@@ -228,7 +228,7 @@ export var SessionItemResult = (_dec = withStyle(generateStyle, generateComponen
228
228
  tabIndex: "0"
229
229
  }, jsx("div", {
230
230
  css: this.props.styles.itemFeedbackLabel
231
- }, t('Feedback from grader')), jsx(RichContentRendererEmotion, {
231
+ }, t('Feedback from grader')), jsx(RichContentRenderer, {
232
232
  customStyles: this.props.styles.itemFeedbackText,
233
233
  content: graderFeedback.content
234
234
  }));
@@ -18,7 +18,7 @@ import ActionButtons from "../../../../../building/components/resources/ActionBu
18
18
  import t from '@instructure/quiz-i18n/es/format-message';
19
19
  import generateStyle from "./styles.js";
20
20
  import generateComponentTheme from "./theme.js";
21
- import OverlayEmotion from "../../../shared/overlayEmotion/index.js";
21
+ import Overlay from "../../../shared/overlay/index.js";
22
22
 
23
23
  var _ref = jsx(IconBankLine, null);
24
24
 
@@ -55,7 +55,7 @@ export var StimulusShow = (_dec = withStyle(generateStyle, generateComponentThem
55
55
  }, {
56
56
  key: "render",
57
57
  value: function render() {
58
- return jsx(OverlayEmotion, {
58
+ return jsx(Overlay, {
59
59
  onClick: this.switchOnEditing,
60
60
  wrapperStyles: this.props.styles.stimulusWrapper,
61
61
  tabIndex: "-1",
@@ -1,3 +1,4 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
4
  import _inherits from "@babel/runtime/helpers/esm/inherits";
@@ -5,21 +6,14 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
6
 
6
7
  var _dec, _class, _class2, _temp;
7
8
 
8
- import React, { Component } from 'react';
9
+ /** @jsx jsx */
10
+ import { Component } from 'react';
9
11
  import PropTypes from 'prop-types';
10
- import classNames from 'classnames';
11
- import omit from 'lodash/omit';
12
- import { themeable } from '@instructure/ui-themeable';
12
+ import { withStyle, jsx } from '@instructure/emotion';
13
13
  import { View } from '@instructure/ui-view';
14
- var styles = {
15
- componentId: 'fGJav',
16
- template: function template(theme) {
17
- return "\n\n.fGJav_caGd{background-color:".concat(theme.contentBackgroundColor || 'inherit', ";border:1px solid ").concat(theme.contentBorderColor || 'inherit', ";border-radius:").concat(theme.contentBorderRadius || 'inherit', ";box-shadow:").concat(theme.contentBoxShadow || 'inherit', ";margin:").concat(theme.contentMargin || 'inherit', " auto;max-width:").concat(theme.contentMaxWidth || 'inherit', ";transition:").concat(theme.contentTransitionDuration || 'inherit', " ease}\n\n@media screen and (--phoneBreakPoint){.fGJav_caGd{margin:").concat(theme.phoneContentMargin || 'inherit', " auto}}");
18
- },
19
- 'content': 'fGJav_caGd'
20
- };
21
- import theme from "./theme.js";
22
- export var CardContent = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
14
+ import generateStyle from "./styles.js";
15
+ import generateComponentTheme from "./theme.js";
16
+ export var CardContent = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
23
17
  _inherits(CardContent, _Component);
24
18
 
25
19
  var _super = _createSuper(CardContent);
@@ -33,11 +27,12 @@ export var CardContent = (_dec = themeable(theme, styles), _dec(_class = (_temp
33
27
  _createClass(CardContent, [{
34
28
  key: "render",
35
29
  value: function render() {
36
- return /*#__PURE__*/React.createElement(View, {
30
+ return jsx(View, {
37
31
  as: "div"
38
- }, /*#__PURE__*/React.createElement("div", Object.assign({
39
- className: classNames(styles.content, this.props.className)
40
- }, omit(this.props, Object.keys(CardContent.propTypes))), this.props.children));
32
+ }, jsx("div", {
33
+ css: _objectSpread(_objectSpread({}, this.props.styles.content), this.props.customStyles),
34
+ className: this.props.className
35
+ }, this.props.children));
41
36
  }
42
37
  }]);
43
38
 
@@ -45,8 +40,11 @@ export var CardContent = (_dec = themeable(theme, styles), _dec(_class = (_temp
45
40
  return CardContent;
46
41
  }(Component), _class2.propTypes = {
47
42
  children: PropTypes.node.isRequired,
43
+ customStyles: PropTypes.object,
44
+ styles: PropTypes.object,
48
45
  className: PropTypes.string
49
46
  }, _class2.defaultProps = {
50
- className: null
47
+ customStyles: {},
48
+ className: ''
51
49
  }, _temp)) || _class);
52
50
  export default CardContent;
@@ -1,4 +1,4 @@
1
- export default function generator(_ref) {
1
+ var generateComponentTheme = function generateComponentTheme(_ref) {
2
2
  var spacing = _ref.spacing,
3
3
  shadows = _ref.shadows,
4
4
  colors = _ref.colors,
@@ -15,4 +15,6 @@ export default function generator(_ref) {
15
15
  contentBorderColor: colors.tiara,
16
16
  contentBorderRadius: '4px'
17
17
  };
18
- }
18
+ };
19
+
20
+ export default generateComponentTheme;
@@ -1,3 +1,4 @@
1
+ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
1
2
  import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
3
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
4
  import _inherits from "@babel/runtime/helpers/esm/inherits";
@@ -5,20 +6,14 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
6
 
6
7
  var _dec, _class, _class2, _temp;
7
8
 
8
- import React, { Component } from 'react';
9
+ /** @jsx jsx */
10
+ import { Component } from 'react';
9
11
  import PropTypes from 'prop-types';
10
- import classNames from 'classnames';
11
- import { themeable } from '@instructure/ui-themeable';
12
+ import { withStyle, jsx } from '@instructure/emotion';
12
13
  import { View } from '@instructure/ui-view';
13
- var styles = {
14
- componentId: 'fVYAO',
15
- template: function template(theme) {
16
- return "\n\n.fVYAO_gasz{box-sizing:border-box;min-height:100%;padding:".concat(theme.wrapperPadding || 'inherit', ";transition:").concat(theme.wrapperTransitionDuration || 'inherit', " ease}\n\n@media screen and (--phoneBreakPoint){.fVYAO_gasz{padding:").concat(theme.phoneWrapperPadding || 'inherit', " 0}}");
17
- },
18
- 'wrapper': 'fVYAO_gasz'
19
- };
20
- import theme from "./theme.js";
21
- export var CardWrapper = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
14
+ import generateStyle from "./styles.js";
15
+ import generateComponentTheme from "./theme.js";
16
+ export var CardWrapper = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
22
17
  _inherits(CardWrapper, _Component);
23
18
 
24
19
  var _super = _createSuper(CardWrapper);
@@ -32,11 +27,11 @@ export var CardWrapper = (_dec = themeable(theme, styles), _dec(_class = (_temp
32
27
  _createClass(CardWrapper, [{
33
28
  key: "render",
34
29
  value: function render() {
35
- return /*#__PURE__*/React.createElement(View, {
30
+ return jsx(View, {
36
31
  as: "div",
37
32
  height: "100%"
38
- }, /*#__PURE__*/React.createElement("div", {
39
- className: classNames(styles.wrapper, this.props.className)
33
+ }, jsx("div", {
34
+ css: _objectSpread(_objectSpread({}, this.props.styles.wrapper), this.props.customStyles)
40
35
  }, this.props.children));
41
36
  }
42
37
  }]);
@@ -45,8 +40,9 @@ export var CardWrapper = (_dec = themeable(theme, styles), _dec(_class = (_temp
45
40
  return CardWrapper;
46
41
  }(Component), _class2.propTypes = {
47
42
  children: PropTypes.node.isRequired,
48
- className: PropTypes.string
43
+ customStyles: PropTypes.object,
44
+ styles: PropTypes.object
49
45
  }, _class2.defaultProps = {
50
- className: null
46
+ customStyles: {}
51
47
  }, _temp)) || _class);
52
48
  export default CardWrapper;
@@ -1,4 +1,4 @@
1
- export default function generator(_ref) {
1
+ var generateComponentTheme = function generateComponentTheme(_ref) {
2
2
  var spacing = _ref.spacing,
3
3
  breakpoints = _ref.breakpoints,
4
4
  transitions = _ref.transitions;
@@ -8,4 +8,6 @@ export default function generator(_ref) {
8
8
  phoneBreakPoint: "max-width: ".concat(breakpoints.medium),
9
9
  phoneWrapperPadding: spacing.medium
10
10
  };
11
- }
11
+ };
12
+
13
+ export default generateComponentTheme;
@@ -6,23 +6,23 @@ import CardWrapper from "./CardWrapper/index.js";
6
6
  export function Card(_ref) {
7
7
  var children = _ref.children,
8
8
  wrapped = _ref.wrapped,
9
- wrapperClassName = _ref.wrapperClassName,
10
- props = _objectWithoutProperties(_ref, ["children", "wrapped", "wrapperClassName"]);
9
+ wrapperStyles = _ref.wrapperStyles,
10
+ props = _objectWithoutProperties(_ref, ["children", "wrapped", "wrapperStyles"]);
11
11
 
12
12
  var card = /*#__PURE__*/React.createElement(CardContent, props, children);
13
13
  return wrapped ? /*#__PURE__*/React.createElement(CardWrapper, {
14
- className: wrapperClassName
14
+ customStyles: wrapperStyles
15
15
  }, card) : card;
16
16
  }
17
17
  Card.propTypes = {
18
18
  children: PropTypes.node.isRequired,
19
- className: PropTypes.string,
20
- wrapperClassName: PropTypes.string,
19
+ customStyles: PropTypes.object,
20
+ wrapperStyles: PropTypes.object,
21
21
  wrapped: PropTypes.bool
22
22
  };
23
23
  Card.defaultProps = {
24
24
  wrapped: false,
25
- className: null,
26
- wrapperClassName: null
25
+ customStyles: null,
26
+ wrapperStyles: null
27
27
  };
28
28
  export default Card;