@instructure/quiz-core 18.3.1-rc.2 → 18.3.1-rc.21
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/api/banks.js +2 -0
- package/es/banks/api/copyingBanksPoller.js +7 -8
- package/es/banks/components/AddToBankModal/presenter.js +1 -1
- package/es/banks/components/Bank/presenter.js +3 -3
- package/es/banks/components/BankEntry/presenter.js +7 -5
- package/es/banks/components/BankEntryRow/presenter.js +30 -22
- package/es/banks/components/BankSearch/presenter.js +6 -7
- package/es/banks/components/Banks/presenter.js +3 -3
- package/es/banks/components/BanksList/presenter.js +32 -24
- package/es/banks/components/CopyMoveBankEntryModal/presenter.js +1 -1
- package/es/banks/components/CreateBankModal/presenter.js +1 -1
- package/es/banks/components/EditBankModal/presenter.js +1 -1
- package/es/banks/components/HeaderMenu/presenter.js +7 -6
- package/es/banks/components/NavWrapper/presenter.js +1 -1
- package/es/banks/components/SharingModal/{ContextualButton → ContextualIconButton}/index.js +14 -12
- package/es/banks/components/SharingModal/ShareList/index.js +9 -9
- package/es/banks/components/SharingModal/presenter.js +4 -4
- package/es/building/components/layout/header/BuildingButtons/presenter.js +8 -7
- package/es/building/components/resources/ActionButtons/presenter.js +20 -15
- package/es/building/components/resources/AddToBankOptions/index.js +8 -12
- package/es/building/components/resources/BanksTray/presenter.js +1 -1
- package/es/building/components/resources/DeleteStimulusModal/presenter.js +1 -1
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +1 -1
- package/es/building/components/resources/MoveImmutableModal/presenter.js +1 -1
- package/es/building/components/resources/quiz/editButton/EditButton.js +8 -6
- package/es/building/components/resources/quiz/instructions/Edit/presenter.js +1 -1
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +7 -5
- package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +3 -3
- package/es/common/components/ConfirmationModal/presenter.js +1 -1
- package/es/common/components/ImportModal/presenter.js +4 -4
- package/es/common/components/Pin/presenter.js +9 -12
- package/es/common/components/PrintFontSizeModal/presenter.js +2 -2
- package/es/common/components/layout/header/Calculator/presenter.js +1 -1
- package/es/common/components/layout/header/Timer/presenter.js +2 -2
- package/es/common/components/layout/sidebar/Sidebar/Pin.js +4 -6
- package/es/common/components/layout/sidebar/Sidebar/index.js +24 -22
- package/es/common/components/layout/sidebar/Sidebar/theme.js +2 -0
- package/es/common/components/layout/sidebar/SidebarItem/presenter.js +2 -2
- package/es/common/components/layout/sidebar/Stimulus/Collection/presenter.js +13 -10
- package/es/common/components/layout/sidebar/Stimulus/presenter.js +2 -2
- package/es/common/components/resources/WarningWrapper/index.js +1 -1
- package/es/common/components/resources/entry/EntrySave/presenter.js +1 -1
- package/es/common/components/resources/quiz/AddContent/Body/presenter.js +3 -1
- package/es/common/components/resources/quiz/AddContent/Button/index.js +1 -1
- package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +12 -10
- package/es/common/components/resources/quizSessionResult/Info/index.js +10 -9
- package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +1 -1
- package/es/common/components/shared/ExpandButton/index.js +8 -7
- package/es/common/components/shared/InteractionTypes/presenter.js +3 -2
- package/es/common/components/shared/drag_and_drop/DragHandle/presenter.js +8 -7
- package/es/moderating/components/resources/AccommodationsModal/index.js +1 -1
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +10 -8
- package/es/moderating/components/resources/OutstandingQuizzesModal/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/presenter.js +6 -6
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/ChoiceInfo → AnswerFrequencySummary/ChoiceType}/presenter.js +46 -28
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +54 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +1 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +22 -26
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg +58 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +9 -3
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +7 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +19 -13
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +2 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/generateReports.js +5 -4
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +92 -30
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +8 -6
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +13 -3
- package/lib/banks/api/banks.js +3 -0
- package/lib/banks/api/copyingBanksPoller.js +11 -9
- package/lib/banks/components/AddToBankModal/presenter.js +1 -1
- package/lib/banks/components/Bank/presenter.js +3 -3
- package/lib/banks/components/BankEntry/presenter.js +6 -4
- package/lib/banks/components/BankEntryRow/presenter.js +28 -20
- package/lib/banks/components/BankSearch/presenter.js +5 -6
- package/lib/banks/components/Banks/presenter.js +3 -3
- package/lib/banks/components/BanksList/presenter.js +31 -23
- package/lib/banks/components/CopyMoveBankEntryModal/presenter.js +1 -1
- package/lib/banks/components/CreateBankModal/presenter.js +1 -1
- package/lib/banks/components/EditBankModal/presenter.js +1 -1
- package/lib/banks/components/HeaderMenu/presenter.js +6 -6
- package/lib/banks/components/NavWrapper/presenter.js +1 -1
- package/lib/banks/components/SharingModal/{ContextualButton → ContextualIconButton}/index.js +15 -13
- package/lib/banks/components/SharingModal/ShareList/index.js +9 -9
- package/lib/banks/components/SharingModal/presenter.js +4 -4
- package/lib/building/components/layout/header/BuildingButtons/presenter.js +7 -7
- package/lib/building/components/resources/ActionButtons/presenter.js +19 -15
- package/lib/building/components/resources/AddToBankOptions/index.js +7 -11
- package/lib/building/components/resources/BanksTray/presenter.js +1 -1
- package/lib/building/components/resources/DeleteStimulusModal/presenter.js +1 -1
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +1 -1
- package/lib/building/components/resources/MoveImmutableModal/presenter.js +1 -1
- package/lib/building/components/resources/quiz/editButton/EditButton.js +7 -6
- package/lib/building/components/resources/quiz/instructions/Edit/presenter.js +1 -1
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +6 -4
- package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/index.js +2 -2
- package/lib/common/components/ConfirmationModal/presenter.js +1 -1
- package/lib/common/components/ImportModal/presenter.js +3 -3
- package/lib/common/components/Pin/presenter.js +8 -12
- package/lib/common/components/PrintFontSizeModal/presenter.js +2 -2
- package/lib/common/components/layout/header/Calculator/presenter.js +1 -1
- package/lib/common/components/layout/header/Timer/presenter.js +2 -2
- package/lib/common/components/layout/sidebar/Sidebar/Pin.js +4 -6
- package/lib/common/components/layout/sidebar/Sidebar/index.js +23 -21
- package/lib/common/components/layout/sidebar/Sidebar/theme.js +2 -0
- package/lib/common/components/layout/sidebar/SidebarItem/presenter.js +2 -2
- package/lib/common/components/layout/sidebar/Stimulus/Collection/presenter.js +12 -10
- package/lib/common/components/layout/sidebar/Stimulus/presenter.js +2 -2
- package/lib/common/components/resources/WarningWrapper/index.js +1 -1
- package/lib/common/components/resources/entry/EntrySave/presenter.js +1 -1
- package/lib/common/components/resources/quiz/AddContent/Body/presenter.js +3 -1
- package/lib/common/components/resources/quiz/AddContent/Button/index.js +1 -1
- package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +12 -10
- package/lib/common/components/resources/quizSessionResult/Info/index.js +9 -8
- package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +1 -1
- package/lib/common/components/shared/ExpandButton/index.js +7 -7
- package/lib/common/components/shared/InteractionTypes/presenter.js +3 -2
- package/lib/common/components/shared/drag_and_drop/DragHandle/presenter.js +7 -7
- package/lib/moderating/components/resources/AccommodationsModal/index.js +1 -1
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +8 -6
- package/lib/moderating/components/resources/OutstandingQuizzesModal/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/presenter.js +8 -8
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ChoiceType/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/ChoiceInfo → AnswerFrequencySummary/ChoiceType}/presenter.js +53 -32
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/index.js +13 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/presenter.js +75 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/index.js +1 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +21 -25
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/presenter.js +3 -2
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg +58 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorCodes.js +14 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/errorMessages.js +15 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReports.js +19 -13
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/fetchReportsStatus.js +2 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/generateReports.js +6 -4
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +95 -30
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/propTypes.js +12 -6
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/withAnalysisStatePresenter.js +14 -2
- package/package.json +12 -11
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/AnswerSummaryTableRow/index.js +0 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/ChoiceInfo/index.js +0 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/index.js +0 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js +0 -65
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/AnswerSummaryTableRow/index.js +0 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/ChoiceInfo/index.js +0 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/index.js +0 -11
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerSummaryTable/presenter.js +0 -87
- /package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/theme.js +0 -0
- /package/es/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable → AnswerFrequencySummary/ChoiceType}/theme.js +0 -0
- /package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable/AnswerSummaryTableRow → AnswerFrequencySummary/ChoiceType/ChoiceTypeTableRow}/theme.js +0 -0
- /package/lib/reporting/components/resources/NewQuizAndItemAnalysis/{AnswerSummaryTable → AnswerFrequencySummary/ChoiceType}/theme.js +0 -0
|
@@ -10,9 +10,8 @@ import React, { Component } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
12
12
|
import classnames from 'classnames';
|
|
13
|
-
import {
|
|
13
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
14
14
|
import { IconEditLine, IconTrashLine, IconDuplicateLine } from '@instructure/ui-icons';
|
|
15
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
16
15
|
import { themeable } from '@instructure/ui-themeable';
|
|
17
16
|
import DragHandle from "../../../../common/components/shared/drag_and_drop/DragHandle/index.js";
|
|
18
17
|
import makeScrollable from "../../../../common/components/shared/functionality/makeScrollable.js";
|
|
@@ -28,7 +27,7 @@ var styles = {
|
|
|
28
27
|
'hide': 'gEXZO_bBLs'
|
|
29
28
|
};
|
|
30
29
|
import theme from "./theme.js";
|
|
31
|
-
var ScrollTargetButton = makeScrollable(
|
|
30
|
+
var ScrollTargetButton = makeScrollable(IconButton);
|
|
32
31
|
export var ActionButtons = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
33
32
|
_inherits(ActionButtons, _Component);
|
|
34
33
|
|
|
@@ -102,34 +101,40 @@ export var ActionButtons = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
102
101
|
as: "div",
|
|
103
102
|
onClick: this.switchOnEditing,
|
|
104
103
|
scrollKey: this.props.scrollKey,
|
|
105
|
-
variant: "icon",
|
|
106
|
-
icon: IconEditLine,
|
|
107
104
|
size: "small",
|
|
105
|
+
withBackground: false,
|
|
106
|
+
withBorder: false,
|
|
107
|
+
renderIcon: IconEditLine,
|
|
108
108
|
"data-automation": "sdk-edit-question-button",
|
|
109
109
|
shouldFocusOnMount: this.shouldFocusOnMount(),
|
|
110
|
+
screenReaderLabel: this.props.quizEntry.generateScreenReaderText(this.props.displayPosition, EDIT),
|
|
110
111
|
ref: this.setEditRef
|
|
111
|
-
}
|
|
112
|
+
})), this.props.questionCopyEnabled && this.props.onCopy && /*#__PURE__*/React.createElement(IconButton, {
|
|
112
113
|
as: "div",
|
|
113
114
|
onClick: this.props.onCopy,
|
|
114
115
|
disabled: this.props.shouldDisableCopy,
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
renderIcon: IconDuplicateLine,
|
|
117
|
+
withBackground: false,
|
|
118
|
+
withBorder: false,
|
|
117
119
|
size: "small",
|
|
118
|
-
"data-automation": "sdk-copy-question-button"
|
|
119
|
-
|
|
120
|
+
"data-automation": "sdk-copy-question-button",
|
|
121
|
+
screenReaderLabel: this.props.quizEntry.generateScreenReaderText(this.props.displayPosition, COPY)
|
|
122
|
+
}), this.connectDragSource( /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(DragHandle, {
|
|
120
123
|
displayPosition: this.props.displayPosition,
|
|
121
124
|
quizEntry: this.props.quizEntry,
|
|
122
125
|
quizEntries: this.props.quizEntries,
|
|
123
126
|
disabled: this.props.shouldDisableDragHandle
|
|
124
|
-
}))), this.props.shouldRenderDelete && /*#__PURE__*/React.createElement(
|
|
127
|
+
}))), this.props.shouldRenderDelete && /*#__PURE__*/React.createElement(IconButton, {
|
|
125
128
|
as: "div",
|
|
126
129
|
onClick: this.props.onDelete,
|
|
127
130
|
disabled: this.props.shouldDisableDeleteButton,
|
|
128
|
-
|
|
129
|
-
|
|
131
|
+
renderIcon: IconTrashLine,
|
|
132
|
+
withBackground: false,
|
|
133
|
+
withBorder: false,
|
|
130
134
|
size: "small",
|
|
131
|
-
"data-automation": "sdk-delete-question-button"
|
|
132
|
-
|
|
135
|
+
"data-automation": "sdk-delete-question-button",
|
|
136
|
+
screenReaderLabel: this.props.quizEntry.generateScreenReaderText(this.props.displayPosition, REMOVE)
|
|
137
|
+
}));
|
|
133
138
|
}
|
|
134
139
|
}]);
|
|
135
140
|
|
|
@@ -8,15 +8,15 @@ var _dec, _class, _class2, _temp;
|
|
|
8
8
|
import React, { Component } from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
10
|
import { View } from '@instructure/ui-view';
|
|
11
|
-
import {
|
|
11
|
+
import { CondensedButton } from '@instructure/ui-buttons';
|
|
12
12
|
import { themeable } from '@instructure/ui-themeable';
|
|
13
13
|
import { ADD_TO_BANK_MODAL } from '@instructure/quiz-common';
|
|
14
14
|
var styles = {
|
|
15
|
-
componentId: '
|
|
15
|
+
componentId: 'bsvMb',
|
|
16
16
|
template: function template(theme) {
|
|
17
|
-
return "\n\n.
|
|
17
|
+
return "\n\n.bsvMb_dNGs{background-color:".concat(theme.addToBankBackgroundColor || 'inherit', ";border:1px dashed ").concat(theme.addToBankBorderColor || 'inherit', ";text-align:center}\n\n[dir=ltr] .bsvMb_dNGs,[dir=rtl] .bsvMb_dNGs{text-align:center}");
|
|
18
18
|
},
|
|
19
|
-
'addToBank': '
|
|
19
|
+
'addToBank': 'bsvMb_dNGs'
|
|
20
20
|
};
|
|
21
21
|
import theme from "./theme.js";
|
|
22
22
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
@@ -68,17 +68,13 @@ export var AddToBankOptions = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
68
68
|
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(View, {
|
|
69
69
|
as: "div",
|
|
70
70
|
className: styles.addToBank
|
|
71
|
-
}, /*#__PURE__*/React.createElement(
|
|
72
|
-
|
|
71
|
+
}, /*#__PURE__*/React.createElement(CondensedButton, {
|
|
72
|
+
color: "primary",
|
|
73
73
|
ref: this.storeAddToBankLinkRef,
|
|
74
74
|
onClick: this.openAddToBankModal,
|
|
75
75
|
"data-automation": "sdk-add-to-bank-link",
|
|
76
|
-
|
|
77
|
-
},
|
|
78
|
-
as: "div",
|
|
79
|
-
textAlign: "center",
|
|
80
|
-
padding: "xx-small"
|
|
81
|
-
}, t('Add to Bank')))));
|
|
76
|
+
margin: "small"
|
|
77
|
+
}, t('Add to Bank'))));
|
|
82
78
|
}
|
|
83
79
|
}]);
|
|
84
80
|
|
|
@@ -142,7 +142,7 @@ export var BanksTray = /*#__PURE__*/function (_Component) {
|
|
|
142
142
|
color: "primary"
|
|
143
143
|
}, alertBody), _ref2, /*#__PURE__*/React.createElement(Button, {
|
|
144
144
|
margin: "small 0 0 0",
|
|
145
|
-
|
|
145
|
+
color: "primary",
|
|
146
146
|
size: "small",
|
|
147
147
|
onClick: this.handleCloseAlert
|
|
148
148
|
}, t('Ok'))))));
|
|
@@ -190,7 +190,7 @@ export var DeleteStimulusModal = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
190
190
|
var disabled = !deletionMode && childEntries.size > 0;
|
|
191
191
|
return /*#__PURE__*/React.createElement(Button, {
|
|
192
192
|
disabled: disabled,
|
|
193
|
-
|
|
193
|
+
color: "primary",
|
|
194
194
|
onClick: this.handleSubmit,
|
|
195
195
|
margin: XSMALL_SIDE_MARGIN,
|
|
196
196
|
"data-automation": "sdk-stimulus-doneButton"
|
|
@@ -88,7 +88,7 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
88
88
|
key: "doneButton",
|
|
89
89
|
value: function doneButton() {
|
|
90
90
|
return /*#__PURE__*/React.createElement(Button, {
|
|
91
|
-
|
|
91
|
+
color: "primary",
|
|
92
92
|
onClick: this.continueAction,
|
|
93
93
|
margin: XSMALL_SIDE_MARGIN
|
|
94
94
|
}, t('Done'));
|
|
@@ -59,7 +59,7 @@ export var MoveImmutableModal = /*#__PURE__*/function (_Component) {
|
|
|
59
59
|
key: "doneButton",
|
|
60
60
|
value: function doneButton() {
|
|
61
61
|
return /*#__PURE__*/React.createElement(Button, {
|
|
62
|
-
|
|
62
|
+
color: "primary",
|
|
63
63
|
onClick: this.handleSubmit,
|
|
64
64
|
margin: XSMALL_SIDE_MARGIN
|
|
65
65
|
}, t('Clone and Move'));
|
|
@@ -4,9 +4,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import {
|
|
7
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
8
8
|
import { IconEditLine } from '@instructure/ui-icons';
|
|
9
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
10
9
|
import makeScrollable from "../../../../../common/components/shared/functionality/makeScrollable.js";
|
|
11
10
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
12
11
|
import { omitProps } from '@instructure/ui-react-utils';
|
|
@@ -41,13 +40,16 @@ var EditButton = /*#__PURE__*/function (_Component) {
|
|
|
41
40
|
_createClass(EditButton, [{
|
|
42
41
|
key: "render",
|
|
43
42
|
value: function render() {
|
|
44
|
-
return /*#__PURE__*/React.createElement(
|
|
43
|
+
return /*#__PURE__*/React.createElement(IconButton, Object.assign({
|
|
45
44
|
ref: this.handleButtonRef,
|
|
46
|
-
variant: "icon",
|
|
47
45
|
size: "small",
|
|
48
|
-
|
|
46
|
+
withBackground: false,
|
|
47
|
+
withBorder: false,
|
|
48
|
+
renderIcon: IconEditLine,
|
|
49
49
|
onClick: this.props.onClick
|
|
50
|
-
}, omitProps(this.props, this.constructor.propTypes)
|
|
50
|
+
}, omitProps(this.props, this.constructor.propTypes), {
|
|
51
|
+
screenReaderLabel: this.props.screenreaderText
|
|
52
|
+
}));
|
|
51
53
|
}
|
|
52
54
|
}]);
|
|
53
55
|
|
|
@@ -95,7 +95,7 @@ var QuizInstructionsEdit = (_dec = themeable(theme, styles), _dec(_class = (_tem
|
|
|
95
95
|
margin: "0 x-small",
|
|
96
96
|
onClick: this.props.endEditing
|
|
97
97
|
}, t('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
98
|
-
|
|
98
|
+
color: "primary",
|
|
99
99
|
onClick: this.props.saveAndPreview,
|
|
100
100
|
"data-automation": "instructions-done"
|
|
101
101
|
}, t('Done'))));
|
|
@@ -14,7 +14,7 @@ import { Flex } from '@instructure/ui-flex';
|
|
|
14
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
15
|
import { Text } from '@instructure/ui-text';
|
|
16
16
|
import NumberInput from '@instructure/quiz-number-input';
|
|
17
|
-
import {
|
|
17
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
18
18
|
import { themeable } from '@instructure/ui-themeable';
|
|
19
19
|
import { IconDiscussionLine, IconDiscussionSolid } from '@instructure/ui-icons';
|
|
20
20
|
import { interactionPoints } from '@instructure/quiz-interactions';
|
|
@@ -165,14 +165,16 @@ export var QuizEntryEditFooter = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
165
165
|
return /*#__PURE__*/React.createElement("div", {
|
|
166
166
|
className: styles.feedbackSection,
|
|
167
167
|
"data-automation": "sdk-quiz-entry-edit-footer-feedback-section"
|
|
168
|
-
}, /*#__PURE__*/React.createElement(
|
|
169
|
-
variant: "icon",
|
|
168
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
170
169
|
onClick: this.openFeedbackModal,
|
|
170
|
+
withBackground: false,
|
|
171
|
+
withBorder: false,
|
|
171
172
|
disabled: disabled,
|
|
172
173
|
ref: this.handleButtonRef,
|
|
173
174
|
"data-automation": "sdk-open-feedback-modal-button",
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
renderIcon: icon,
|
|
176
|
+
screenReaderLabel: text
|
|
177
|
+
}));
|
|
176
178
|
}
|
|
177
179
|
}, {
|
|
178
180
|
key: "renderPointsSection",
|
|
@@ -12,7 +12,7 @@ import PropTypes from 'prop-types';
|
|
|
12
12
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
13
13
|
import partial from 'lodash/partial';
|
|
14
14
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
|
-
import {
|
|
15
|
+
import { CondensedButton } from '@instructure/ui-buttons';
|
|
16
16
|
import { TextInput } from '@instructure/ui-text-input';
|
|
17
17
|
import { themeable } from '@instructure/ui-themeable';
|
|
18
18
|
import { FillBlankInteractionType } from '@instructure/quiz-interactions';
|
|
@@ -239,9 +239,9 @@ var QuizEntryHeader = (_dec = themeable(theme, styles), _dec(_class = (_temp = _
|
|
|
239
239
|
key: "renderName",
|
|
240
240
|
value: function renderName() {
|
|
241
241
|
if (this.props.quizEntry.isBank && this.props.newActiveBank) {
|
|
242
|
-
return /*#__PURE__*/React.createElement(
|
|
243
|
-
variant: "link",
|
|
242
|
+
return /*#__PURE__*/React.createElement(CondensedButton, {
|
|
244
243
|
size: "small",
|
|
244
|
+
margin: "0 0 0 x-small",
|
|
245
245
|
onClick: this.handleBankClick,
|
|
246
246
|
"data-automation": "sdk-quiz-entry-interaction-type"
|
|
247
247
|
}, this.props.name);
|
|
@@ -94,7 +94,7 @@ export var ConfirmationModal = /*#__PURE__*/function (_Component) {
|
|
|
94
94
|
margin: XSMALL_SIDE_MARGIN,
|
|
95
95
|
"data-automation": "sdk-confirmation-modal-cancel"
|
|
96
96
|
}, cancelText || t('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
97
|
-
|
|
97
|
+
color: continueVariant || 'primary',
|
|
98
98
|
onClick: this.continueAction,
|
|
99
99
|
margin: XSMALL_SIDE_MARGIN,
|
|
100
100
|
"data-automation": "sdk-confirmation-modal-confirm"
|
|
@@ -11,7 +11,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
11
11
|
import { Alert } from '@instructure/ui-alerts';
|
|
12
12
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
13
13
|
import { Text } from '@instructure/ui-text';
|
|
14
|
-
import {
|
|
14
|
+
import { ProgressBar } from '@instructure/ui-progress';
|
|
15
15
|
import { Heading } from '@instructure/ui-heading';
|
|
16
16
|
import { Tabs } from '@instructure/ui-tabs';
|
|
17
17
|
import { ToggleDetails } from '@instructure/ui-toggle-details';
|
|
@@ -208,7 +208,7 @@ export var ImportModal = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
208
208
|
value: function continueButton() {
|
|
209
209
|
return /*#__PURE__*/React.createElement(Button, {
|
|
210
210
|
onClick: this.continueAction,
|
|
211
|
-
|
|
211
|
+
color: "primary",
|
|
212
212
|
disabled: this.disableContinueButton(),
|
|
213
213
|
margin: XSMALL_SIDE_MARGIN,
|
|
214
214
|
ref: this.setRef('confirmButton'),
|
|
@@ -269,8 +269,8 @@ export var ImportModal = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
269
269
|
}, {
|
|
270
270
|
key: "renderImportingContent",
|
|
271
271
|
value: function renderImportingContent() {
|
|
272
|
-
return /*#__PURE__*/React.createElement(
|
|
273
|
-
|
|
272
|
+
return /*#__PURE__*/React.createElement(ProgressBar, {
|
|
273
|
+
screenReaderLabel: t('Import process completion'),
|
|
274
274
|
valueNow: this.props.progressValue,
|
|
275
275
|
ref: this.setRef('progressBar')
|
|
276
276
|
});
|
|
@@ -4,9 +4,8 @@ import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import {
|
|
7
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
8
8
|
import { IconPinLine, IconPinSolid } from '@instructure/ui-icons';
|
|
9
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
10
9
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
11
10
|
export var Pin = /*#__PURE__*/function (_Component) {
|
|
12
11
|
_inherits(Pin, _Component);
|
|
@@ -41,12 +40,14 @@ export var Pin = /*#__PURE__*/function (_Component) {
|
|
|
41
40
|
}) : t('Question {position, number} is unpinned. Click to pin.', {
|
|
42
41
|
position: this.props.position
|
|
43
42
|
});
|
|
44
|
-
return /*#__PURE__*/React.createElement(
|
|
45
|
-
onClick: this.handleClick,
|
|
46
|
-
variant: this.props.variant,
|
|
43
|
+
return /*#__PURE__*/React.createElement(IconButton, {
|
|
47
44
|
size: "small",
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
onClick: this.handleClick,
|
|
46
|
+
withBackground: false,
|
|
47
|
+
withBorder: false,
|
|
48
|
+
renderIcon: this.props.isPinned ? IconPinSolid : IconPinLine,
|
|
49
|
+
screenReaderLabel: message
|
|
50
|
+
});
|
|
50
51
|
}
|
|
51
52
|
}]);
|
|
52
53
|
|
|
@@ -56,10 +57,6 @@ export var Pin = /*#__PURE__*/function (_Component) {
|
|
|
56
57
|
Pin.propTypes = {
|
|
57
58
|
isPinned: PropTypes.bool.isRequired,
|
|
58
59
|
pinSessionItem: PropTypes.func.isRequired,
|
|
59
|
-
position: PropTypes.number.isRequired
|
|
60
|
-
variant: PropTypes.oneOf(['default', 'primary', 'success', 'danger', 'light', 'ghost', 'ghost-inverse', 'link', 'link-inverse', 'circle-default', 'circle-primary', 'circle-danger', 'icon', 'icon-inverse'])
|
|
61
|
-
};
|
|
62
|
-
Pin.defaultProps = {
|
|
63
|
-
variant: 'icon'
|
|
60
|
+
position: PropTypes.number.isRequired
|
|
64
61
|
};
|
|
65
62
|
export default Pin;
|
|
@@ -153,12 +153,12 @@ export var PrintFontSizeModal = (_dec = themeable(theme, styles), _dec(_class =
|
|
|
153
153
|
onChange: this.handleRememberFontSize
|
|
154
154
|
})), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
155
155
|
"data-automation": "sdk-print-font-size-cancel-button",
|
|
156
|
-
|
|
156
|
+
color: "primary-inverse",
|
|
157
157
|
onClick: this.props.onCancel,
|
|
158
158
|
margin: "0 x-small 0 0"
|
|
159
159
|
}, this.text.cancel), /*#__PURE__*/React.createElement(Button, {
|
|
160
160
|
"data-automation": "sdk-print-font-size-print-preview-button",
|
|
161
|
-
|
|
161
|
+
color: "primary",
|
|
162
162
|
onClick: this.handleSubmit,
|
|
163
163
|
margin: "0 x-small 0 0"
|
|
164
164
|
}, this.text.printPreview)));
|
|
@@ -14,7 +14,7 @@ var CalculatorButton = function CalculatorButton(_ref) {
|
|
|
14
14
|
var toggleCalculator = _ref.toggleCalculator,
|
|
15
15
|
enabled = _ref.enabled;
|
|
16
16
|
return /*#__PURE__*/React.createElement(Button, {
|
|
17
|
-
|
|
17
|
+
renderIcon: IconCalculatorLine,
|
|
18
18
|
onClick: toggleCalculator,
|
|
19
19
|
disabled: !enabled
|
|
20
20
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Calculator')));
|
|
@@ -120,7 +120,7 @@ export var Timer = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
120
120
|
}, this.renderHelpScreenreaderText(), /*#__PURE__*/React.createElement(Button, {
|
|
121
121
|
"aria-expanded": "false",
|
|
122
122
|
ref: this.showTimerRef,
|
|
123
|
-
|
|
123
|
+
renderIcon: IconClockLine,
|
|
124
124
|
onClick: partial(this.props.updateTimerMinimized, false)
|
|
125
125
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Show Timer'))));
|
|
126
126
|
}
|
|
@@ -142,7 +142,7 @@ export var Timer = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
142
142
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
143
143
|
"aria-expanded": "true",
|
|
144
144
|
ref: this.hideTimerRef,
|
|
145
|
-
|
|
145
|
+
renderIcon: IconArrowOpenStartLine,
|
|
146
146
|
onClick: partial(this.props.updateTimerMinimized, true)
|
|
147
147
|
}, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Hide Timer')))));
|
|
148
148
|
}
|
|
@@ -5,7 +5,7 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
import React, { Component } from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
7
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
8
|
-
import {
|
|
8
|
+
import { Link } from '@instructure/ui-link'; // Component exists to prevent the recreation of the scroll function with each render,
|
|
9
9
|
// which would cause a new rerender on each data change
|
|
10
10
|
|
|
11
11
|
export var Pin = /*#__PURE__*/function (_Component) {
|
|
@@ -34,12 +34,10 @@ export var Pin = /*#__PURE__*/function (_Component) {
|
|
|
34
34
|
_createClass(Pin, [{
|
|
35
35
|
key: "render",
|
|
36
36
|
value: function render() {
|
|
37
|
-
return /*#__PURE__*/React.createElement(
|
|
38
|
-
variant: "link",
|
|
37
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
39
38
|
onClick: this.scroll,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
fluidWidth: true
|
|
39
|
+
isWithinText: false,
|
|
40
|
+
display: "block"
|
|
43
41
|
}, t('Question {position, number}', {
|
|
44
42
|
position: this.props.position
|
|
45
43
|
}));
|
|
@@ -14,7 +14,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
14
14
|
import classNames from 'classnames';
|
|
15
15
|
import { IconMoveStartLine, IconMoveEndLine, IconPinSolid, IconQuizInstructionsLine, IconQuizTitleLine } from '@instructure/ui-icons';
|
|
16
16
|
import { AccessibleContent, ScreenReaderContent, PresentationContent } from '@instructure/ui-a11y-content';
|
|
17
|
-
import {
|
|
17
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
18
18
|
import { Link } from '@instructure/ui-link';
|
|
19
19
|
import { Text } from '@instructure/ui-text';
|
|
20
20
|
import { View } from '@instructure/ui-view';
|
|
@@ -27,23 +27,24 @@ import CustomPropTypes from "../../../../util/CustomPropTypes.js";
|
|
|
27
27
|
import noop from "../../../../util/noop.js";
|
|
28
28
|
import Pin from "./Pin.js";
|
|
29
29
|
var styles = {
|
|
30
|
-
componentId: '
|
|
30
|
+
componentId: 'bPuQe',
|
|
31
31
|
template: function template(theme) {
|
|
32
|
-
return "\n\n.
|
|
32
|
+
return "\n\n.bPuQe_bObp{background-color:".concat(theme.sidebarBackgroundColor || 'inherit', ";border:").concat(theme.sidebarBorderWidth || 'inherit', " solid ").concat(theme.sidebarBorderColor || 'inherit', ";box-sizing:border-box;color:").concat(theme.sidebarColor || 'inherit', ";height:100%;overflow:hidden;position:relative;transition:").concat(theme.sidebarTransitionDuration || 'inherit', " ease;width:").concat(theme.sidebarWidthClosed || 'inherit', ";z-index:").concat(theme.sidebarZIndex || 'inherit', "}\n\nbody.tox-fullscreen .bPuQe_bObp{z-index:0}\n\n.bPuQe_crKy{display:flex;flex-direction:column;height:100%}\n\n.bPuQe_eYGv{overflow-x:hidden;overflow-y:auto}\n\n.bPuQe_eeTU{border-bottom:").concat(theme.sidebarHeaderBorderWidth || 'inherit', " solid ").concat(theme.sidebarHeaderBorderColor || 'inherit', ";border-right:").concat(theme.actionableInfoBorderWidth || 'inherit', " solid ").concat(theme.sidebarBackgroundColor || 'inherit', ";text-align:center}\n\n[dir=ltr] .bPuQe_eeTU,[dir=rtl] .bPuQe_eeTU{text-align:center}\n\n.bPuQe_eeTU:hover{border-right:").concat(theme.actionableInfoBorderWidth || 'inherit', " solid ").concat(theme.actionableInfoHoverBorderColor || 'inherit', "}\n\n.bPuQe_difO{color:").concat(theme.descriptionFontColor || 'inherit', ";display:none;font-size:").concat(theme.descriptionFontSize || 'inherit', "}\n\n.bPuQe_cjDf{display:flex;flex-direction:row;flex-shrink:0;padding:").concat(theme.headerSpacingPadding || 'inherit', "}\n\n.bPuQe_cjDf h2{padding-top:0.3em}\n\n.bPuQe_fuFE{border-bottom:solid ").concat(theme.sidebarHeaderBorderWidth || 'inherit', ";border-color:").concat(theme.sidebarHeaderBorderColor || 'inherit', "}\n\n.bPuQe_cvRx{margin-left:auto}\n\n.bPuQe_fwEb{background-color:").concat(theme.pinnedSectionBackgroundColor || 'inherit', ";width:100%}\n\n.bPuQe_fwEb .bPuQe_cjDf{flex-grow:1}\n\n.bPuQe_ftzv{padding-top:").concat(theme.questionNavigatorPadding || 'inherit', "}\n\n.bPuQe_bObp.bPuQe_eNNp{opacity:1;transition:").concat(theme.sidebarTransitionDuration || 'inherit', " ease;width:").concat(theme.sidebarWidthOpen || 'inherit', "}\n\n.bPuQe_eNNp .bPuQe_difO{cursor:pointer;display:inline-block}\n\n.bPuQe_eNNp .bPuQe_eeTU,[dir=ltr] .bPuQe_eNNp .bPuQe_eeTU,[dir=rtl] .bPuQe_eNNp .bPuQe_eeTU{text-align:inherit}\n\n.bPuQe_eQGE{display:none}\n\n.bPuQe_eQGE.bPuQe_cvRx{display:block;margin:auto}\n\n.bPuQe_nqth button{font-size:").concat(theme.pinnedQuestionFontSize || 'inherit', ";padding-bottom:").concat(theme.pinnedQuestionSpacing || 'inherit', ";padding-left:").concat(theme.pinnedQuestionSpacing || 'inherit', "}\n\n.bPuQe_eYHq{height:100%}\n\n@media screen and (--phoneBreakPoint){.bPuQe_eYHq{position:relative}.bPuQe_bObp{position:absolute;width:0}.bPuQe_bObp,.bPuQe_bObp.bPuQe_eNNp{transition:").concat(theme.sidebarTransitionDuration || 'inherit', " ease}.bPuQe_bObp.bPuQe_eNNp{display:inline;max-width:100vw;width:100vw}}\n\n@media print{.bPuQe_eYHq{display:none}}");
|
|
33
33
|
},
|
|
34
|
-
'sidebar': '
|
|
35
|
-
'sidebarWrapper': '
|
|
36
|
-
'sidebarContent': '
|
|
37
|
-
'actionableInfo': '
|
|
38
|
-
'description': '
|
|
39
|
-
'headerSpacing': '
|
|
40
|
-
'headerBottomBorder': '
|
|
41
|
-
'iconWrapper': '
|
|
42
|
-
'pinnedSection': '
|
|
43
|
-
'questionNavigatorPadding': '
|
|
44
|
-
'sidebarIsOpen': '
|
|
45
|
-
'sidebarClosed': '
|
|
46
|
-
'
|
|
34
|
+
'sidebar': 'bPuQe_bObp',
|
|
35
|
+
'sidebarWrapper': 'bPuQe_crKy',
|
|
36
|
+
'sidebarContent': 'bPuQe_eYGv',
|
|
37
|
+
'actionableInfo': 'bPuQe_eeTU',
|
|
38
|
+
'description': 'bPuQe_difO',
|
|
39
|
+
'headerSpacing': 'bPuQe_cjDf',
|
|
40
|
+
'headerBottomBorder': 'bPuQe_fuFE',
|
|
41
|
+
'iconWrapper': 'bPuQe_cvRx',
|
|
42
|
+
'pinnedSection': 'bPuQe_fwEb',
|
|
43
|
+
'questionNavigatorPadding': 'bPuQe_ftzv',
|
|
44
|
+
'sidebarIsOpen': 'bPuQe_eNNp',
|
|
45
|
+
'sidebarClosed': 'bPuQe_eQGE',
|
|
46
|
+
'buttonWrapper': 'bPuQe_nqth',
|
|
47
|
+
'commonContainer': 'bPuQe_eYHq'
|
|
47
48
|
};
|
|
48
49
|
import theme from "./theme.js";
|
|
49
50
|
|
|
@@ -216,15 +217,16 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
|
|
|
216
217
|
as: "h2"
|
|
217
218
|
}, t('Question Navigator'))), /*#__PURE__*/React.createElement("div", {
|
|
218
219
|
className: iconClasses
|
|
219
|
-
}, /*#__PURE__*/React.createElement(
|
|
220
|
-
variant: "icon",
|
|
220
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
221
221
|
onClick: this.toggleSidebar,
|
|
222
222
|
size: "small",
|
|
223
223
|
margin: "none",
|
|
224
|
+
renderIcon: SidebarIcon,
|
|
225
|
+
withBackground: false,
|
|
226
|
+
withBorder: false,
|
|
227
|
+
screenReaderLabel: sidebarOpen ? t('Hide Question Navigator Menu') : t('Show Question Navigator Menu'),
|
|
224
228
|
"data-automation": "sidebar-toggle-button"
|
|
225
|
-
}
|
|
226
|
-
size: "small"
|
|
227
|
-
}, /*#__PURE__*/React.createElement(SidebarIcon, null)), /*#__PURE__*/React.createElement(ScreenReaderContent, null, sidebarOpen ? t('Hide Question Navigator Menu') : t('Show Question Navigator Menu')))));
|
|
229
|
+
})));
|
|
228
230
|
}
|
|
229
231
|
}, {
|
|
230
232
|
key: "renderTotalPointsPossible",
|
|
@@ -279,7 +281,7 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
|
|
|
279
281
|
return;
|
|
280
282
|
}
|
|
281
283
|
|
|
282
|
-
var closedClasses = classNames(_defineProperty({}, styles.sidebarClosed, !sidebarOpen));
|
|
284
|
+
var closedClasses = classNames(styles.buttonWrapper, _defineProperty({}, styles.sidebarClosed, !sidebarOpen));
|
|
283
285
|
var iconClasses = classNames(styles.iconWrapper, _defineProperty({}, styles.sidebarClosed, !sidebarOpen));
|
|
284
286
|
return /*#__PURE__*/React.createElement("div", {
|
|
285
287
|
className: classNames(styles.pinnedSection, styles.headerBottomBorder)
|
|
@@ -24,6 +24,8 @@ export default function generator(_ref) {
|
|
|
24
24
|
questionNavigatorPadding: spacing.xxxSmall,
|
|
25
25
|
headerSpacingPadding: "".concat(spacing.small, " ").concat(spacing.xSmall),
|
|
26
26
|
pinnedSectionBackgroundColor: colors.porcelain,
|
|
27
|
+
pinnedQuestionSpacing: spacing.small,
|
|
28
|
+
pinnedQuestionFontSize: typography.fontSizeSmall,
|
|
27
29
|
sidebarHeaderBorderWidth: borders.widthSmall,
|
|
28
30
|
sidebarHeaderBorderColor: colors.tiara,
|
|
29
31
|
descriptionFontSize: typography.fontSizeXSmall,
|
|
@@ -144,8 +144,8 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
144
144
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
145
145
|
justifyItems: "space-between"
|
|
146
146
|
}, /*#__PURE__*/React.createElement(Flex.Item, null, this.renderButton()), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
shouldGrow: true,
|
|
148
|
+
shouldShrink: true,
|
|
149
149
|
onClick: this.scrollToItem,
|
|
150
150
|
tabIndex: "-1"
|
|
151
151
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -12,8 +12,7 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
12
12
|
import classNames from 'classnames';
|
|
13
13
|
import { IconArrowOpenDownLine, IconArrowOpenUpLine } from '@instructure/ui-icons';
|
|
14
14
|
import { Transition } from '@instructure/ui-motion';
|
|
15
|
-
import {
|
|
16
|
-
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
15
|
+
import { IconButton } from '@instructure/ui-buttons';
|
|
17
16
|
import { themeable } from '@instructure/ui-themeable';
|
|
18
17
|
import PositionSummary from "../../PositionSummary/index.js";
|
|
19
18
|
import { DISPLAY_AS_SUMMARY_LIMIT } from "../presenter.js";
|
|
@@ -98,11 +97,13 @@ export var Collection = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
98
97
|
className: styles.sidebarIsOpen
|
|
99
98
|
}, /*#__PURE__*/React.createElement("div", {
|
|
100
99
|
className: sidebarItemsStyles
|
|
101
|
-
}, /*#__PURE__*/React.createElement(
|
|
102
|
-
variant: "icon",
|
|
100
|
+
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
103
101
|
onClick: this.handleSidebarHideItems,
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
withBackground: false,
|
|
103
|
+
withBorder: false,
|
|
104
|
+
renderIcon: IconArrowOpenUpLine,
|
|
105
|
+
screenReaderLabel: t('Collapse stimulus questions')
|
|
106
|
+
})), /*#__PURE__*/React.createElement("div", null, itemComponents)));
|
|
106
107
|
}
|
|
107
108
|
}, {
|
|
108
109
|
key: "renderItemSummaryOnClosedSidear",
|
|
@@ -120,11 +121,13 @@ export var Collection = (_dec = themeable(theme, styles), _dec(_class = (_temp =
|
|
|
120
121
|
}, /*#__PURE__*/React.createElement(PositionSummary, {
|
|
121
122
|
firstPosition: firstPosition,
|
|
122
123
|
lastPosition: firstPosition + itemCollection.size - 1
|
|
123
|
-
}), /*#__PURE__*/React.createElement(
|
|
124
|
-
variant: "icon",
|
|
124
|
+
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
125
125
|
onClick: this.handleSidebarShowItems,
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
withBackground: false,
|
|
127
|
+
withBorder: false,
|
|
128
|
+
renderIcon: IconArrowOpenDownLine,
|
|
129
|
+
screenReaderLabel: t('Expand stimulus questions')
|
|
130
|
+
})));
|
|
128
131
|
}
|
|
129
132
|
}, {
|
|
130
133
|
key: "render",
|
|
@@ -131,8 +131,8 @@ export var SidebarStimulus = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
131
131
|
}, /*#__PURE__*/React.createElement(Flex, {
|
|
132
132
|
justifyItems: "space-between"
|
|
133
133
|
}, /*#__PURE__*/React.createElement(Flex.Item, null, this.renderButton()), /*#__PURE__*/React.createElement(Flex.Item, {
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
shouldGrow: true,
|
|
135
|
+
shouldShrink: true,
|
|
136
136
|
onClick: this.scrollToItem,
|
|
137
137
|
tabIndex: "-1"
|
|
138
138
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
@@ -71,7 +71,7 @@ export var WarningWrapper = (_dec = themeable(theme, styles), _dec(_class = (_te
|
|
|
71
71
|
}, this.props.cancelActionText), /*#__PURE__*/React.createElement(Button, {
|
|
72
72
|
size: "small",
|
|
73
73
|
margin: "x-small",
|
|
74
|
-
|
|
74
|
+
color: "primary",
|
|
75
75
|
onClick: this.props.defaultActionCallback
|
|
76
76
|
}, this.props.defaultActionText));
|
|
77
77
|
}
|
|
@@ -221,7 +221,7 @@ export var EntrySave = /*#__PURE__*/function (_Component) {
|
|
|
221
221
|
margin: "none none none x-small"
|
|
222
222
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
223
223
|
type: "button",
|
|
224
|
-
|
|
224
|
+
color: "primary",
|
|
225
225
|
onClick: this.onSubmit,
|
|
226
226
|
disabled: !this.state.canSubmit || this.props.disableSubmit,
|
|
227
227
|
"data-automation": "sdk-done-button"
|
|
@@ -133,7 +133,9 @@ export var AddContentBody = (_dec = themeable(theme, styles), _dec(_class = (_te
|
|
|
133
133
|
key: "render",
|
|
134
134
|
value: function render() {
|
|
135
135
|
return /*#__PURE__*/React.createElement("div", {
|
|
136
|
-
className: styles.popoverContent
|
|
136
|
+
className: styles.popoverContent,
|
|
137
|
+
role: "dialog",
|
|
138
|
+
"aria-label": t('Insert Content')
|
|
137
139
|
}, this.renderPopoverHeader(), /*#__PURE__*/React.createElement(View, {
|
|
138
140
|
padding: "small"
|
|
139
141
|
}, /*#__PURE__*/React.createElement(InteractionTypes, {
|
|
@@ -60,7 +60,7 @@ export var AddContentButton = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
60
60
|
className: styles.attachQuestionButtonHolder
|
|
61
61
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
62
62
|
ref: this.storeButtonElemRef,
|
|
63
|
-
|
|
63
|
+
color: "primary",
|
|
64
64
|
margin: "medium",
|
|
65
65
|
onClick: this.props.onClick,
|
|
66
66
|
"data-automation": "sdk-attach-question-button"
|