@instructure/quiz-core 20.11.5-rc.1 → 20.11.5-rc.2
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/es/banks/components/BankEntryRow/presenter.js +3 -3
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +2 -2
- package/es/building/components/resources/quiz/instructions/Show/index.js +4 -4
- package/es/building/components/resources/quiz/title/Show/index.js +2 -2
- package/es/building/components/resources/quizEntry/QuizEntryShow/presenter.js +2 -2
- package/es/common/components/resources/quiz/instructions/Instructions.js +2 -2
- package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +3 -3
- package/es/common/components/resources/stimulus/StimulusShow/index.js +2 -2
- package/es/common/components/shared/{overlayEmotion → overlay}/index.js +9 -9
- package/{lib/common/components/shared/overlayEmotion → es/common/components/shared/overlay}/styles.js +7 -10
- package/es/common/components/shared/overlay/theme.js +4 -2
- package/es/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +2 -2
- package/lib/banks/components/BankEntryRow/presenter.js +4 -4
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +1 -1
- package/lib/building/components/resources/quiz/instructions/Show/index.js +2 -2
- package/lib/building/components/resources/quiz/title/Show/index.js +1 -1
- package/lib/building/components/resources/quizEntry/QuizEntryShow/presenter.js +1 -1
- package/lib/common/components/resources/quiz/instructions/Instructions.js +1 -1
- package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +2 -2
- package/lib/common/components/resources/stimulus/StimulusShow/index.js +1 -1
- package/lib/common/components/shared/{overlayEmotion → overlay}/index.js +9 -9
- package/{es/common/components/shared/overlayEmotion → lib/common/components/shared/overlay}/styles.js +18 -3
- package/lib/common/components/shared/overlay/theme.js +6 -3
- package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/presenter.js +1 -1
- package/package.json +9 -9
- package/es/common/components/shared/overlay/Overlay.js +0 -85
- package/es/common/components/shared/overlayEmotion/theme.js +0 -12
- package/lib/common/components/shared/overlay/Overlay.js +0 -95
- package/lib/common/components/shared/overlayEmotion/theme.js +0 -20
|
@@ -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 {
|
|
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(
|
|
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 {
|
|
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(
|
|
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 {
|
|
13
|
-
import
|
|
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(
|
|
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(
|
|
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
|
|
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(
|
|
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
|
|
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(
|
|
265
|
+
return jsx(Overlay, {
|
|
266
266
|
onClick: this.editingOn,
|
|
267
267
|
wrapperStyles: this.props.styles.quizEntryWrapper,
|
|
268
268
|
tabIndex: "-1",
|
|
@@ -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 {
|
|
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(
|
|
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 {
|
|
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(
|
|
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(
|
|
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
|
|
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(
|
|
58
|
+
return jsx(Overlay, {
|
|
59
59
|
onClick: this.switchOnEditing,
|
|
60
60
|
wrapperStyles: this.props.styles.stimulusWrapper,
|
|
61
61
|
tabIndex: "-1",
|
|
@@ -22,18 +22,18 @@ import PropTypes from 'prop-types';
|
|
|
22
22
|
import { withStyle, jsx, Global } from '@instructure/emotion';
|
|
23
23
|
import generateStyle from "./styles.js";
|
|
24
24
|
import generateComponentTheme from "./theme.js";
|
|
25
|
-
var
|
|
26
|
-
_inherits(
|
|
25
|
+
var Overlay = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
26
|
+
_inherits(Overlay, _Component);
|
|
27
27
|
|
|
28
|
-
var _super = _createSuper(
|
|
28
|
+
var _super = _createSuper(Overlay);
|
|
29
29
|
|
|
30
|
-
function
|
|
31
|
-
_classCallCheck(this,
|
|
30
|
+
function Overlay() {
|
|
31
|
+
_classCallCheck(this, Overlay);
|
|
32
32
|
|
|
33
33
|
return _super.apply(this, arguments);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
_createClass(
|
|
36
|
+
_createClass(Overlay, [{
|
|
37
37
|
key: "overlayDiv",
|
|
38
38
|
value: function overlayDiv() {
|
|
39
39
|
if (this.props.hideOverlay) {
|
|
@@ -71,8 +71,8 @@ var OverlayEmotion = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
71
71
|
}
|
|
72
72
|
}]);
|
|
73
73
|
|
|
74
|
-
|
|
75
|
-
return
|
|
74
|
+
Overlay.displayName = "Overlay";
|
|
75
|
+
return Overlay;
|
|
76
76
|
}(Component), _class2.propTypes = {
|
|
77
77
|
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired,
|
|
78
78
|
hideOverlay: PropTypes.bool,
|
|
@@ -87,4 +87,4 @@ var OverlayEmotion = (_dec = withStyle(generateStyle, generateComponentTheme), _
|
|
|
87
87
|
wrapperStyles: {},
|
|
88
88
|
ariaLabel: void 0
|
|
89
89
|
}, _temp)) || _class);
|
|
90
|
-
export default
|
|
90
|
+
export default Overlay;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
7
2
|
|
|
8
3
|
var generateStyle = function generateStyle(componentTheme) {
|
|
4
|
+
var printMq = '@media print';
|
|
9
5
|
return {
|
|
10
6
|
root: {
|
|
11
7
|
position: 'relative',
|
|
@@ -19,13 +15,14 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
19
15
|
zIndex: componentTheme.overlayZIndex,
|
|
20
16
|
height: '100%',
|
|
21
17
|
width: '100%',
|
|
22
|
-
'&:hover': {
|
|
18
|
+
'&:hover': _defineProperty({
|
|
23
19
|
boxSizing: 'border-box',
|
|
24
20
|
borderLeft: "".concat(componentTheme.overlayBarSize, " solid ").concat(componentTheme.overlayBarColor)
|
|
25
|
-
}
|
|
21
|
+
}, printMq, {
|
|
22
|
+
borderLeft: 'none'
|
|
23
|
+
})
|
|
26
24
|
}
|
|
27
25
|
};
|
|
28
26
|
};
|
|
29
27
|
|
|
30
|
-
|
|
31
|
-
exports.default = _default;
|
|
28
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var colors = _ref.colors,
|
|
3
3
|
borders = _ref.borders,
|
|
4
4
|
spacing = _ref.spacing;
|
|
@@ -7,4 +7,6 @@ export default function generator(_ref) {
|
|
|
7
7
|
overlayBarColor: colors.electric,
|
|
8
8
|
overlayBarSize: '0.3rem'
|
|
9
9
|
};
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default generateComponentTheme;
|
|
@@ -14,7 +14,7 @@ import { MetricGroup } from '@instructure/ui-metric';
|
|
|
14
14
|
import { Heading } from '@instructure/ui-heading';
|
|
15
15
|
import { ScreenReaderContent, PresentationContent } from '@instructure/ui-a11y-content';
|
|
16
16
|
import { withStyle, jsx } from '@instructure/emotion';
|
|
17
|
-
import {
|
|
17
|
+
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
18
18
|
import Card from "../../../../common/components/shared/Card/index.js";
|
|
19
19
|
import ExpandButton from "../../../../common/components/shared/ExpandButton/index.js";
|
|
20
20
|
import Spinner from "../../../../common/components/shared/spinner/Spinner.js";
|
|
@@ -103,7 +103,7 @@ export var ItemAnalysisRow = (_dec = withStyle(generateStyle, generateComponentT
|
|
|
103
103
|
}, {
|
|
104
104
|
key: "renderStem",
|
|
105
105
|
value: function renderStem() {
|
|
106
|
-
return jsx(
|
|
106
|
+
return jsx(RichContentRenderer, {
|
|
107
107
|
customStyles: this.props.styles.stem,
|
|
108
108
|
content: this.props.itemAnalysis.itemBody
|
|
109
109
|
});
|
|
@@ -57,8 +57,6 @@ var _index2 = _interopRequireDefault(require("../../../common/components/shared/
|
|
|
57
57
|
|
|
58
58
|
var _QuizEntry = _interopRequireDefault(require("../../../common/records/QuizEntry.js"));
|
|
59
59
|
|
|
60
|
-
var _Overlay = _interopRequireDefault(require("../../../common/components/shared/overlay/Overlay.js"));
|
|
61
|
-
|
|
62
60
|
var _index3 = _interopRequireDefault(require("../../../common/components/resources/item/ItemShow/index.js"));
|
|
63
61
|
|
|
64
62
|
var _index4 = _interopRequireDefault(require("../../../common/components/resources/stimulus/StimulusShowInfo/index.js"));
|
|
@@ -69,6 +67,8 @@ var _styles = _interopRequireDefault(require("./styles.js"));
|
|
|
69
67
|
|
|
70
68
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
71
69
|
|
|
70
|
+
var _index6 = _interopRequireDefault(require("../../../common/components/shared/overlay/index.js"));
|
|
71
|
+
|
|
72
72
|
var _dec, _class, _class2, _temp;
|
|
73
73
|
|
|
74
74
|
var _ref2 = (0, _emotion.jsx)("div", null);
|
|
@@ -307,7 +307,7 @@ var BankEntryRow = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defau
|
|
|
307
307
|
// or title plain text
|
|
308
308
|
|
|
309
309
|
if (itemOrStimulus.itemBody) {
|
|
310
|
-
return (0, _emotion.jsx)(_quizRce.
|
|
310
|
+
return (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
311
311
|
customStyles: this.props.styles.stem,
|
|
312
312
|
content: itemOrStimulus.itemBody
|
|
313
313
|
});
|
|
@@ -385,7 +385,7 @@ var BankEntryRow = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defau
|
|
|
385
385
|
key: "render",
|
|
386
386
|
value: function render() {
|
|
387
387
|
var isExpanded = this.props.isExpanded;
|
|
388
|
-
return (0, _emotion.jsx)(
|
|
388
|
+
return (0, _emotion.jsx)(_index6.default, {
|
|
389
389
|
onClick: this.props.toggleExpanded,
|
|
390
390
|
tabIndex: "-1",
|
|
391
391
|
ariaLabel: this.entryIdentifier()
|
|
@@ -118,7 +118,7 @@ var ItemFeedbackModal = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
118
118
|
}, {
|
|
119
119
|
key: "renderContent",
|
|
120
120
|
value: function renderContent() {
|
|
121
|
-
return (0, _emotion.jsx)("div", null, (0, _emotion.jsx)(_quizRce.
|
|
121
|
+
return (0, _emotion.jsx)("div", null, (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
122
122
|
customStyles: this.props.styles.itemStem,
|
|
123
123
|
content: this.props.item.itemBody
|
|
124
124
|
}), this.renderRichContentInput('correct', (0, _formatMessage.default)('For a correct answer')), this.renderRichContentInput('incorrect', (0, _formatMessage.default)('For an incorrect answer')), this.renderRichContentInput('neutral', (0, _formatMessage.default)('Provide general feedback (regardless of answer)')));
|
|
@@ -23,7 +23,7 @@ var _emotion = require("@instructure/emotion");
|
|
|
23
23
|
|
|
24
24
|
var _quizRce = require("@instructure/quiz-rce");
|
|
25
25
|
|
|
26
|
-
var _index = _interopRequireDefault(require("../../../../../../common/components/shared/
|
|
26
|
+
var _index = _interopRequireDefault(require("../../../../../../common/components/shared/overlay/index.js"));
|
|
27
27
|
|
|
28
28
|
var _makeScrollable = _interopRequireDefault(require("../../../../../../common/components/shared/functionality/makeScrollable.js"));
|
|
29
29
|
|
|
@@ -75,7 +75,7 @@ var QuizInstructionsShow = (_dec = (0, _emotion.withStyle)(_styles.default, _the
|
|
|
75
75
|
hideOverlay: this.props.contentLocked
|
|
76
76
|
}, (0, _emotion.jsx)("div", {
|
|
77
77
|
"data-automation": "instructions-show-text"
|
|
78
|
-
}, (0, _emotion.jsx)(_quizRce.
|
|
78
|
+
}, (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
79
79
|
customStyles: this.props.styles.instructionsShowText,
|
|
80
80
|
content: this.props.instructions || (0, _formatMessage.default)('Add Instructions...')
|
|
81
81
|
}))));
|
|
@@ -25,7 +25,7 @@ var _uiTruncateText = require("@instructure/ui-truncate-text");
|
|
|
25
25
|
|
|
26
26
|
var _uiText = require("@instructure/ui-text");
|
|
27
27
|
|
|
28
|
-
var _index = _interopRequireDefault(require("../../../../../../common/components/shared/
|
|
28
|
+
var _index = _interopRequireDefault(require("../../../../../../common/components/shared/overlay/index.js"));
|
|
29
29
|
|
|
30
30
|
var _makeScrollable = _interopRequireDefault(require("../../../../../../common/components/shared/functionality/makeScrollable.js"));
|
|
31
31
|
|
|
@@ -41,7 +41,7 @@ var _fitbCopyHelper = require("../../../../../common/util/fitbCopyHelper.js");
|
|
|
41
41
|
|
|
42
42
|
var _Item = _interopRequireDefault(require("../../../../../common/records/Item.js"));
|
|
43
43
|
|
|
44
|
-
var _index = _interopRequireDefault(require("../../../../../common/components/shared/
|
|
44
|
+
var _index = _interopRequireDefault(require("../../../../../common/components/shared/overlay/index.js"));
|
|
45
45
|
|
|
46
46
|
var _index2 = _interopRequireDefault(require("../../ActionButtons/index.js"));
|
|
47
47
|
|
|
@@ -50,7 +50,7 @@ var QuizInstructions = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.d
|
|
|
50
50
|
"data-testid": "instructionsWrapper",
|
|
51
51
|
css: this.props.styles.wrapper,
|
|
52
52
|
tabIndex: "-1"
|
|
53
|
-
}, (0, _emotion.jsx)(_quizRce.
|
|
53
|
+
}, (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
54
54
|
customStyles: this.props.styles.text,
|
|
55
55
|
content: this.props.quiz.instructions
|
|
56
56
|
}));
|
|
@@ -211,7 +211,7 @@ var SessionItemResult = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
211
211
|
margin: "xx-small small"
|
|
212
212
|
}, formattedFeedbackTitle), (0, _emotion.jsx)("div", {
|
|
213
213
|
css: this.props.styles.textPadding
|
|
214
|
-
}, (0, _emotion.jsx)(_quizRce.
|
|
214
|
+
}, (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
215
215
|
customStyles: this.props.styles.itemFeedbackText,
|
|
216
216
|
content: feedbackContent
|
|
217
217
|
})));
|
|
@@ -255,7 +255,7 @@ var SessionItemResult = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.
|
|
|
255
255
|
tabIndex: "0"
|
|
256
256
|
}, (0, _emotion.jsx)("div", {
|
|
257
257
|
css: this.props.styles.itemFeedbackLabel
|
|
258
|
-
}, (0, _formatMessage.default)('Feedback from grader')), (0, _emotion.jsx)(_quizRce.
|
|
258
|
+
}, (0, _formatMessage.default)('Feedback from grader')), (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
259
259
|
customStyles: this.props.styles.itemFeedbackText,
|
|
260
260
|
content: graderFeedback.content
|
|
261
261
|
}));
|
|
@@ -35,7 +35,7 @@ var _styles = _interopRequireDefault(require("./styles.js"));
|
|
|
35
35
|
|
|
36
36
|
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
37
37
|
|
|
38
|
-
var _index3 = _interopRequireDefault(require("../../../shared/
|
|
38
|
+
var _index3 = _interopRequireDefault(require("../../../shared/overlay/index.js"));
|
|
39
39
|
|
|
40
40
|
var _dec, _class, _class2, _temp;
|
|
41
41
|
|
|
@@ -29,17 +29,17 @@ var _theme = _interopRequireDefault(require("./theme.js"));
|
|
|
29
29
|
|
|
30
30
|
var _dec, _class, _class2, _temp;
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
(0, _inherits2.default)(
|
|
32
|
+
var Overlay = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
33
|
+
(0, _inherits2.default)(Overlay, _Component);
|
|
34
34
|
|
|
35
|
-
var _super = (0, _createSuper2.default)(
|
|
35
|
+
var _super = (0, _createSuper2.default)(Overlay);
|
|
36
36
|
|
|
37
|
-
function
|
|
38
|
-
(0, _classCallCheck2.default)(this,
|
|
37
|
+
function Overlay() {
|
|
38
|
+
(0, _classCallCheck2.default)(this, Overlay);
|
|
39
39
|
return _super.apply(this, arguments);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
(0, _createClass2.default)(
|
|
42
|
+
(0, _createClass2.default)(Overlay, [{
|
|
43
43
|
key: "overlayDiv",
|
|
44
44
|
value: function overlayDiv() {
|
|
45
45
|
if (this.props.hideOverlay) {
|
|
@@ -76,8 +76,8 @@ var OverlayEmotion = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
76
76
|
}, this.overlayDiv(), children));
|
|
77
77
|
}
|
|
78
78
|
}]);
|
|
79
|
-
|
|
80
|
-
return
|
|
79
|
+
Overlay.displayName = "Overlay";
|
|
80
|
+
return Overlay;
|
|
81
81
|
}(_react.Component), _class2.propTypes = {
|
|
82
82
|
children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.arrayOf(_propTypes.default.element)]).isRequired,
|
|
83
83
|
hideOverlay: _propTypes.default.bool,
|
|
@@ -92,5 +92,5 @@ var OverlayEmotion = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.def
|
|
|
92
92
|
wrapperStyles: {},
|
|
93
93
|
ariaLabel: void 0
|
|
94
94
|
}, _temp)) || _class);
|
|
95
|
-
var _default =
|
|
95
|
+
var _default = Overlay;
|
|
96
96
|
exports.default = _default;
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
|
|
10
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
+
|
|
1
12
|
var generateStyle = function generateStyle(componentTheme) {
|
|
13
|
+
var printMq = '@media print';
|
|
2
14
|
return {
|
|
3
15
|
root: {
|
|
4
16
|
position: 'relative',
|
|
@@ -12,12 +24,15 @@ var generateStyle = function generateStyle(componentTheme) {
|
|
|
12
24
|
zIndex: componentTheme.overlayZIndex,
|
|
13
25
|
height: '100%',
|
|
14
26
|
width: '100%',
|
|
15
|
-
'&:hover': {
|
|
27
|
+
'&:hover': (0, _defineProperty2.default)({
|
|
16
28
|
boxSizing: 'border-box',
|
|
17
29
|
borderLeft: "".concat(componentTheme.overlayBarSize, " solid ").concat(componentTheme.overlayBarColor)
|
|
18
|
-
}
|
|
30
|
+
}, printMq, {
|
|
31
|
+
borderLeft: 'none'
|
|
32
|
+
})
|
|
19
33
|
}
|
|
20
34
|
};
|
|
21
35
|
};
|
|
22
36
|
|
|
23
|
-
|
|
37
|
+
var _default = generateStyle;
|
|
38
|
+
exports.default = _default;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default =
|
|
6
|
+
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
function
|
|
8
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
9
|
var colors = _ref.colors,
|
|
10
10
|
borders = _ref.borders,
|
|
11
11
|
spacing = _ref.spacing;
|
|
@@ -14,4 +14,7 @@ function generator(_ref) {
|
|
|
14
14
|
overlayBarColor: colors.electric,
|
|
15
15
|
overlayBarSize: '0.3rem'
|
|
16
16
|
};
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
var _default = generateComponentTheme;
|
|
20
|
+
exports.default = _default;
|
|
@@ -136,7 +136,7 @@ var ItemAnalysisRow = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.de
|
|
|
136
136
|
}, {
|
|
137
137
|
key: "renderStem",
|
|
138
138
|
value: function renderStem() {
|
|
139
|
-
return (0, _emotion.jsx)(_quizRce.
|
|
139
|
+
return (0, _emotion.jsx)(_quizRce.RichContentRenderer, {
|
|
140
140
|
customStyles: this.props.styles.stem,
|
|
141
141
|
content: this.props.itemAnalysis.itemBody
|
|
142
142
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.11.5-rc.
|
|
3
|
+
"version": "20.11.5-rc.2+da4c513cc",
|
|
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.2",
|
|
47
|
-
"@instructure/quiz-common": "20.11.5-rc.
|
|
48
|
-
"@instructure/quiz-i18n": "20.11.5-rc.
|
|
49
|
-
"@instructure/quiz-interactions": "20.11.5-rc.
|
|
50
|
-
"@instructure/quiz-number-input": "20.11.5-rc.
|
|
51
|
-
"@instructure/quiz-rce": "20.11.5-rc.
|
|
47
|
+
"@instructure/quiz-common": "20.11.5-rc.2+da4c513cc",
|
|
48
|
+
"@instructure/quiz-i18n": "20.11.5-rc.2+da4c513cc",
|
|
49
|
+
"@instructure/quiz-interactions": "20.11.5-rc.2+da4c513cc",
|
|
50
|
+
"@instructure/quiz-number-input": "20.11.5-rc.2+da4c513cc",
|
|
51
|
+
"@instructure/quiz-rce": "20.11.5-rc.2+da4c513cc",
|
|
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.5-rc.
|
|
115
|
+
"instructure-validations": "20.11.5-rc.2+da4c513cc",
|
|
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.5-rc.
|
|
166
|
+
"quiz-presets": "20.11.5-rc.2+da4c513cc",
|
|
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": "
|
|
182
|
+
"gitHead": "da4c513ccef6feab44eccfd4f0f772de3fa43fec"
|
|
183
183
|
}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
-
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
-
|
|
6
|
-
var _dec, _class, _class2, _temp;
|
|
7
|
-
|
|
8
|
-
/* eslint "jsx-a11y/click-events-have-key-events": "warn" */
|
|
9
|
-
|
|
10
|
-
/* eslint "jsx-a11y/no-static-element-interactions": "warn" */
|
|
11
|
-
import React, { Component } from 'react';
|
|
12
|
-
import PropTypes from 'prop-types';
|
|
13
|
-
import classNames from 'classnames';
|
|
14
|
-
/*
|
|
15
|
-
* We might be able to do the mouse over stuff automatically inside of this
|
|
16
|
-
* component but it seems like this is the simplest and best choice for now.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
import { themeable } from '@instructure/ui-themeable';
|
|
20
|
-
var styles = {
|
|
21
|
-
componentId: 'PuSJn',
|
|
22
|
-
template: function template(theme) {
|
|
23
|
-
return "\n\n.PuSJn_bGBk{align-self:center;position:relative}\n\n.PuSJn_cYkL{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:".concat(theme.overlayZIndex || 'inherit', "}\n\n.PuSJn_cYkL:hover{border-left:").concat(theme.overlayBarSize || 'inherit', " solid ").concat(theme.overlayBarColor || 'inherit', ";box-sizing:border-box}\n\nbody.tox-fullscreen .PuSJn_cYkL{z-index:0}\n\n@media print{.PuSJn_cYkL:hover{border-left:none}}");
|
|
24
|
-
},
|
|
25
|
-
'root': 'PuSJn_bGBk',
|
|
26
|
-
'overlay': 'PuSJn_cYkL'
|
|
27
|
-
};
|
|
28
|
-
import theme from "./theme.js";
|
|
29
|
-
var Overlay = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
30
|
-
_inherits(Overlay, _Component);
|
|
31
|
-
|
|
32
|
-
var _super = _createSuper(Overlay);
|
|
33
|
-
|
|
34
|
-
function Overlay() {
|
|
35
|
-
_classCallCheck(this, Overlay);
|
|
36
|
-
|
|
37
|
-
return _super.apply(this, arguments);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
_createClass(Overlay, [{
|
|
41
|
-
key: "overlayDiv",
|
|
42
|
-
value: function overlayDiv() {
|
|
43
|
-
if (this.props.hideOverlay) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
48
|
-
role: "presentation",
|
|
49
|
-
className: styles.overlay,
|
|
50
|
-
onClick: this.props.onClick,
|
|
51
|
-
"data-automation": "sdk-overlay"
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
}, {
|
|
55
|
-
key: "render",
|
|
56
|
-
value: function render() {
|
|
57
|
-
var _this$props = this.props,
|
|
58
|
-
wrapperClassName = _this$props.wrapperClassName,
|
|
59
|
-
children = _this$props.children,
|
|
60
|
-
tabIndex = _this$props.tabIndex,
|
|
61
|
-
ariaLabel = _this$props.ariaLabel;
|
|
62
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
63
|
-
className: classNames(styles.root, wrapperClassName),
|
|
64
|
-
tabIndex: tabIndex,
|
|
65
|
-
"aria-label": ariaLabel
|
|
66
|
-
}, this.overlayDiv(), children);
|
|
67
|
-
}
|
|
68
|
-
}]);
|
|
69
|
-
|
|
70
|
-
Overlay.displayName = "Overlay";
|
|
71
|
-
return Overlay;
|
|
72
|
-
}(Component), _class2.propTypes = {
|
|
73
|
-
children: PropTypes.oneOfType([PropTypes.element, PropTypes.arrayOf(PropTypes.element)]).isRequired,
|
|
74
|
-
hideOverlay: PropTypes.bool,
|
|
75
|
-
onClick: PropTypes.func.isRequired,
|
|
76
|
-
wrapperClassName: PropTypes.string,
|
|
77
|
-
tabIndex: PropTypes.string,
|
|
78
|
-
ariaLabel: PropTypes.string
|
|
79
|
-
}, _class2.defaultProps = {
|
|
80
|
-
hideOverlay: false,
|
|
81
|
-
tabIndex: '0',
|
|
82
|
-
wrapperClassName: '',
|
|
83
|
-
ariaLabel: void 0
|
|
84
|
-
}, _temp)) || _class);
|
|
85
|
-
export default Overlay;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
|
-
var colors = _ref.colors,
|
|
3
|
-
borders = _ref.borders,
|
|
4
|
-
spacing = _ref.spacing;
|
|
5
|
-
return {
|
|
6
|
-
overlayZIndex: '2222',
|
|
7
|
-
overlayBarColor: colors.electric,
|
|
8
|
-
overlayBarSize: '0.3rem'
|
|
9
|
-
};
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export default generateComponentTheme;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", {
|
|
8
|
-
value: true
|
|
9
|
-
});
|
|
10
|
-
exports.default = void 0;
|
|
11
|
-
|
|
12
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
13
|
-
|
|
14
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
|
-
var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
|
|
19
|
-
|
|
20
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
21
|
-
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
|
|
24
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
25
|
-
|
|
26
|
-
var _uiThemeable = require("@instructure/ui-themeable");
|
|
27
|
-
|
|
28
|
-
var _theme = _interopRequireDefault(require("./theme.js"));
|
|
29
|
-
|
|
30
|
-
var _dec, _class, _class2, _temp;
|
|
31
|
-
|
|
32
|
-
var styles = {
|
|
33
|
-
componentId: 'PuSJn',
|
|
34
|
-
template: function template(theme) {
|
|
35
|
-
return "\n\n.PuSJn_bGBk{align-self:center;position:relative}\n\n.PuSJn_cYkL{cursor:pointer;height:100%;left:0;position:absolute;top:0;width:100%;z-index:".concat(theme.overlayZIndex || 'inherit', "}\n\n.PuSJn_cYkL:hover{border-left:").concat(theme.overlayBarSize || 'inherit', " solid ").concat(theme.overlayBarColor || 'inherit', ";box-sizing:border-box}\n\nbody.tox-fullscreen .PuSJn_cYkL{z-index:0}\n\n@media print{.PuSJn_cYkL:hover{border-left:none}}");
|
|
36
|
-
},
|
|
37
|
-
'root': 'PuSJn_bGBk',
|
|
38
|
-
'overlay': 'PuSJn_cYkL'
|
|
39
|
-
};
|
|
40
|
-
var Overlay = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
41
|
-
(0, _inherits2.default)(Overlay, _Component);
|
|
42
|
-
|
|
43
|
-
var _super = (0, _createSuper2.default)(Overlay);
|
|
44
|
-
|
|
45
|
-
function Overlay() {
|
|
46
|
-
(0, _classCallCheck2.default)(this, Overlay);
|
|
47
|
-
return _super.apply(this, arguments);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
(0, _createClass2.default)(Overlay, [{
|
|
51
|
-
key: "overlayDiv",
|
|
52
|
-
value: function overlayDiv() {
|
|
53
|
-
if (this.props.hideOverlay) {
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
58
|
-
role: "presentation",
|
|
59
|
-
className: styles.overlay,
|
|
60
|
-
onClick: this.props.onClick,
|
|
61
|
-
"data-automation": "sdk-overlay"
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
}, {
|
|
65
|
-
key: "render",
|
|
66
|
-
value: function render() {
|
|
67
|
-
var _this$props = this.props,
|
|
68
|
-
wrapperClassName = _this$props.wrapperClassName,
|
|
69
|
-
children = _this$props.children,
|
|
70
|
-
tabIndex = _this$props.tabIndex,
|
|
71
|
-
ariaLabel = _this$props.ariaLabel;
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
73
|
-
className: (0, _classnames.default)(styles.root, wrapperClassName),
|
|
74
|
-
tabIndex: tabIndex,
|
|
75
|
-
"aria-label": ariaLabel
|
|
76
|
-
}, this.overlayDiv(), children);
|
|
77
|
-
}
|
|
78
|
-
}]);
|
|
79
|
-
Overlay.displayName = "Overlay";
|
|
80
|
-
return Overlay;
|
|
81
|
-
}(_react.Component), _class2.propTypes = {
|
|
82
|
-
children: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.arrayOf(_propTypes.default.element)]).isRequired,
|
|
83
|
-
hideOverlay: _propTypes.default.bool,
|
|
84
|
-
onClick: _propTypes.default.func.isRequired,
|
|
85
|
-
wrapperClassName: _propTypes.default.string,
|
|
86
|
-
tabIndex: _propTypes.default.string,
|
|
87
|
-
ariaLabel: _propTypes.default.string
|
|
88
|
-
}, _class2.defaultProps = {
|
|
89
|
-
hideOverlay: false,
|
|
90
|
-
tabIndex: '0',
|
|
91
|
-
wrapperClassName: '',
|
|
92
|
-
ariaLabel: void 0
|
|
93
|
-
}, _temp)) || _class);
|
|
94
|
-
var _default = Overlay;
|
|
95
|
-
exports.default = _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
9
|
-
var colors = _ref.colors,
|
|
10
|
-
borders = _ref.borders,
|
|
11
|
-
spacing = _ref.spacing;
|
|
12
|
-
return {
|
|
13
|
-
overlayZIndex: '2222',
|
|
14
|
-
overlayBarColor: colors.electric,
|
|
15
|
-
overlayBarSize: '0.3rem'
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
var _default = generateComponentTheme;
|
|
20
|
-
exports.default = _default;
|