@instructure/quiz-core 20.38.0 → 21.0.1-rc.0

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 (167) hide show
  1. package/es/banks/components/Bank/theme.js +1 -1
  2. package/es/banks/components/BankEntry/theme.js +5 -5
  3. package/es/banks/components/BankEntryRow/styles.js +0 -1
  4. package/es/banks/components/BankEntryRow/theme.js +4 -4
  5. package/es/banks/components/Banks/theme.js +2 -2
  6. package/es/banks/components/BanksList/theme.js +4 -4
  7. package/es/banks/components/CreateBankModal/presenter.js +22 -24
  8. package/es/banks/components/EditBankModal/presenter.js +24 -22
  9. package/es/banks/components/NavWrapper/theme.js +3 -3
  10. package/es/banks/components/SharingModal/presenter.js +0 -4
  11. package/es/banks/components/SharingModal/theme.js +1 -1
  12. package/es/building/components/resources/ActionButtons/theme.js +1 -1
  13. package/es/building/components/resources/AddToBankOptions/theme.js +2 -2
  14. package/es/building/components/resources/quiz/instructions/Instructions/theme.js +1 -1
  15. package/es/building/components/resources/quiz/title/Edit/theme.js +1 -1
  16. package/es/building/components/resources/quiz/title/Title/theme.js +3 -3
  17. package/es/building/components/resources/quizEntry/QuizEntry/theme.js +1 -1
  18. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +3 -3
  19. package/es/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +2 -2
  20. package/es/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +2 -2
  21. package/es/building/components/resources/quizEntry/QuizEntryShow/theme.js +5 -5
  22. package/es/common/components/ConfirmationModal/presenter.js +10 -7
  23. package/es/common/components/ImportModal/ImportFileSelector/theme.js +4 -4
  24. package/es/common/components/PrintFontSizeModal/theme.js +1 -1
  25. package/es/common/components/layout/header/HeaderMenuButton/theme.js +1 -1
  26. package/es/common/components/layout/header/Timer/theme.js +3 -3
  27. package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +13 -32
  28. package/es/common/components/layout/navbar/index.js +0 -3
  29. package/es/common/components/layout/navbar/theme.js +1 -1
  30. package/es/common/components/layout/sidebar/PositionSummary/theme.js +2 -2
  31. package/es/common/components/layout/sidebar/Sidebar/theme.js +10 -10
  32. package/es/common/components/layout/sidebar/SidebarItem/theme.js +5 -5
  33. package/es/common/components/layout/sidebar/Stimulus/Collection/theme.js +1 -1
  34. package/es/common/components/layout/sidebar/Stimulus/Summary/theme.js +2 -2
  35. package/es/common/components/layout/sidebar/Stimulus/theme.js +4 -4
  36. package/es/common/components/resources/WarningWrapper/theme.js +1 -1
  37. package/es/common/components/resources/item/ItemEdit/presenter.js +0 -5
  38. package/es/common/components/resources/positionBox/theme.js +2 -2
  39. package/es/common/components/resources/quiz/AddContent/Body/theme.js +1 -1
  40. package/es/common/components/resources/quiz/AddContent/Button/theme.js +4 -4
  41. package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +0 -4
  42. package/es/common/components/resources/quiz/AddContent/Popover/theme.js +1 -1
  43. package/es/common/components/resources/sessionItemResult/ResultStimulus/theme.js +4 -4
  44. package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +1 -1
  45. package/es/common/components/resources/sessionItemResult/SessionItemResult/theme.js +4 -4
  46. package/es/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +1 -1
  47. package/es/common/components/resources/stimulus/Stimulus/presenter.js +11 -5
  48. package/es/common/components/resources/stimulus/Stimulus/theme.js +1 -1
  49. package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +17 -9
  50. package/es/common/components/resources/stimulus/StimulusEdit/theme.js +1 -1
  51. package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -1
  52. package/es/common/components/resources/stimulus/StimulusEditInfo/theme.js +1 -1
  53. package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +7 -5
  54. package/es/common/components/shared/Card/CardContent/theme.js +2 -2
  55. package/es/common/components/shared/InteractionTypes/theme.js +1 -1
  56. package/es/common/components/shared/PaginatedCollection/theme.js +1 -1
  57. package/es/common/components/shared/PrintTrigger/presenter.js +0 -5
  58. package/es/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +5 -5
  59. package/es/common/components/shared/errors/theme.js +1 -1
  60. package/es/common/components/shared/file_selector/theme.js +2 -2
  61. package/es/common/components/shared/overlay/theme.js +1 -1
  62. package/es/moderating/components/events/theme.js +1 -1
  63. package/es/moderating/components/resources/ModerateTable/theme.js +1 -1
  64. package/es/reporting/components/charts/Distribution/theme.js +2 -2
  65. package/es/reporting/components/charts/Legend/theme.js +2 -2
  66. package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +8 -8
  67. package/es/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +4 -4
  68. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +1 -1
  69. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +5 -5
  70. package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +2 -2
  71. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +1 -1
  72. package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +1 -1
  73. package/es/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +1 -1
  74. package/es/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +2 -2
  75. package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +1 -11
  76. package/es/reporting/components/resources/QuizAndItemAnalysis/theme.js +1 -1
  77. package/es/reporting/components/resources/StudentAnalysis/ReportCard/theme.js +1 -1
  78. package/lib/banks/components/Bank/theme.js +1 -1
  79. package/lib/banks/components/BankEntry/theme.js +5 -5
  80. package/lib/banks/components/BankEntryRow/styles.js +0 -1
  81. package/lib/banks/components/BankEntryRow/theme.js +4 -4
  82. package/lib/banks/components/Banks/theme.js +2 -2
  83. package/lib/banks/components/BanksList/theme.js +4 -4
  84. package/lib/banks/components/CreateBankModal/presenter.js +23 -24
  85. package/lib/banks/components/EditBankModal/presenter.js +25 -22
  86. package/lib/banks/components/NavWrapper/theme.js +3 -3
  87. package/lib/banks/components/SharingModal/presenter.js +0 -4
  88. package/lib/banks/components/SharingModal/theme.js +1 -1
  89. package/lib/building/components/resources/ActionButtons/theme.js +1 -1
  90. package/lib/building/components/resources/AddToBankOptions/theme.js +2 -2
  91. package/lib/building/components/resources/quiz/instructions/Instructions/theme.js +1 -1
  92. package/lib/building/components/resources/quiz/title/Edit/theme.js +1 -1
  93. package/lib/building/components/resources/quiz/title/Title/theme.js +3 -3
  94. package/lib/building/components/resources/quizEntry/QuizEntry/theme.js +1 -1
  95. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankEdit/theme.js +3 -3
  96. package/lib/building/components/resources/quizEntry/QuizEntryBank/QuizEntryBankShow/theme.js +2 -2
  97. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Header/theme.js +2 -2
  98. package/lib/building/components/resources/quizEntry/QuizEntryShow/theme.js +5 -5
  99. package/lib/common/components/ConfirmationModal/presenter.js +10 -7
  100. package/lib/common/components/ImportModal/ImportFileSelector/theme.js +4 -4
  101. package/lib/common/components/PrintFontSizeModal/theme.js +1 -1
  102. package/lib/common/components/layout/header/HeaderMenuButton/theme.js +1 -1
  103. package/lib/common/components/layout/header/Timer/theme.js +3 -3
  104. package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +13 -32
  105. package/lib/common/components/layout/navbar/index.js +0 -3
  106. package/lib/common/components/layout/navbar/theme.js +1 -1
  107. package/lib/common/components/layout/sidebar/PositionSummary/theme.js +2 -2
  108. package/lib/common/components/layout/sidebar/Sidebar/theme.js +10 -10
  109. package/lib/common/components/layout/sidebar/SidebarItem/theme.js +5 -5
  110. package/lib/common/components/layout/sidebar/Stimulus/Collection/theme.js +1 -1
  111. package/lib/common/components/layout/sidebar/Stimulus/Summary/theme.js +2 -2
  112. package/lib/common/components/layout/sidebar/Stimulus/theme.js +4 -4
  113. package/lib/common/components/resources/WarningWrapper/theme.js +1 -1
  114. package/lib/common/components/resources/item/ItemEdit/presenter.js +0 -5
  115. package/lib/common/components/resources/positionBox/theme.js +2 -2
  116. package/lib/common/components/resources/quiz/AddContent/Body/theme.js +1 -1
  117. package/lib/common/components/resources/quiz/AddContent/Button/theme.js +4 -4
  118. package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +0 -4
  119. package/lib/common/components/resources/quiz/AddContent/Popover/theme.js +1 -1
  120. package/lib/common/components/resources/sessionItemResult/ResultStimulus/theme.js +4 -4
  121. package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +1 -1
  122. package/lib/common/components/resources/sessionItemResult/SessionItemResult/theme.js +4 -4
  123. package/lib/common/components/resources/sessionItemResult/SessionItemResultsList/theme.js +1 -1
  124. package/lib/common/components/resources/stimulus/Stimulus/presenter.js +11 -5
  125. package/lib/common/components/resources/stimulus/Stimulus/theme.js +1 -1
  126. package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +17 -9
  127. package/lib/common/components/resources/stimulus/StimulusEdit/theme.js +1 -1
  128. package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -1
  129. package/lib/common/components/resources/stimulus/StimulusEditInfo/theme.js +1 -1
  130. package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +7 -5
  131. package/lib/common/components/shared/Card/CardContent/theme.js +2 -2
  132. package/lib/common/components/shared/InteractionTypes/theme.js +1 -1
  133. package/lib/common/components/shared/PaginatedCollection/theme.js +1 -1
  134. package/lib/common/components/shared/PrintTrigger/presenter.js +0 -5
  135. package/lib/common/components/shared/drag_and_drop/DragAndDropZone/theme.js +5 -5
  136. package/lib/common/components/shared/errors/theme.js +1 -1
  137. package/lib/common/components/shared/file_selector/theme.js +2 -2
  138. package/lib/common/components/shared/overlay/theme.js +1 -1
  139. package/lib/moderating/components/events/theme.js +1 -1
  140. package/lib/moderating/components/resources/ModerateTable/theme.js +1 -1
  141. package/lib/reporting/components/charts/Distribution/theme.js +2 -2
  142. package/lib/reporting/components/charts/Legend/theme.js +2 -2
  143. package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/theme.js +8 -8
  144. package/lib/reporting/components/itemAnalysis/ItemAnalysisRow/theme.js +4 -4
  145. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/ChoiceTypeTableRow/theme.js +1 -1
  146. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/theme.js +5 -5
  147. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/theme.js +2 -2
  148. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/BlankIcon/theme.js +1 -1
  149. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +1 -1
  150. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/ReportCard/theme.js +1 -1
  151. package/lib/reporting/components/resources/NewQuizAndItemAnalysis/charts/ScoreDistribution/theme.js +2 -2
  152. package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +1 -11
  153. package/lib/reporting/components/resources/QuizAndItemAnalysis/theme.js +1 -1
  154. package/lib/reporting/components/resources/StudentAnalysis/ReportCard/theme.js +1 -1
  155. package/package.json +78 -78
  156. package/es/banks/components/CreateBankModal/styles.js +0 -15
  157. package/es/banks/components/CreateBankModal/theme.js +0 -10
  158. package/es/banks/components/EditBankModal/styles.js +0 -12
  159. package/es/banks/components/EditBankModal/theme.js +0 -9
  160. package/es/common/components/layout/navbar/SecondaryNavBarButton/styles.js +0 -9
  161. package/es/common/components/layout/navbar/SecondaryNavBarButton/theme.js +0 -10
  162. package/lib/banks/components/CreateBankModal/styles.js +0 -22
  163. package/lib/banks/components/CreateBankModal/theme.js +0 -17
  164. package/lib/banks/components/EditBankModal/styles.js +0 -19
  165. package/lib/banks/components/EditBankModal/theme.js +0 -16
  166. package/lib/common/components/layout/navbar/SecondaryNavBarButton/styles.js +0 -16
  167. package/lib/common/components/layout/navbar/SecondaryNavBarButton/theme.js +0 -17
@@ -3,7 +3,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  colors = _ref.colors,
4
4
  breakpoints = _ref.breakpoints;
5
5
  return {
6
- contentBackgroundColor: colors.white,
6
+ contentBackgroundColor: colors.contrasts.white1010,
7
7
  contentPaddingTopBottom: spacing.medium,
8
8
  contentPaddingLeftRight: spacing.medium,
9
9
  breadCrumbMarginBottom: spacing.large,
@@ -4,17 +4,17 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
4
4
  typography = _ref.typography,
5
5
  borders = _ref.borders;
6
6
  return {
7
- contentBackgroundColor: colors.white,
7
+ contentBackgroundColor: colors.contrasts.white1010,
8
8
  contentPaddingTopBottom: 0,
9
9
  contentPaddingLeftRight: 0,
10
10
  breadCrumbMarginBottom: spacing.large,
11
11
  entryRowMargin: spacing.small,
12
- headerRowColor: colors.ash,
12
+ headerRowColor: colors.contrasts.grey4570,
13
13
  headerRowPadding: spacing.small,
14
14
  headerTextFontSize: typography.fontSizeSmall,
15
15
  leftHeaderMargin: spacing.small,
16
- headerBackgroundColor: colors.porcelain,
17
- headerColor: colors.licorice,
16
+ headerBackgroundColor: colors.contrasts.grey1111,
17
+ headerColor: colors.contrasts.grey125125,
18
18
  headerPaddingTopBottom: spacing.xSmall,
19
19
  headerPaddingLeftRight: spacing.small,
20
20
  footerPaddingBottom: spacing.xSmall,
@@ -22,7 +22,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
22
22
  rightHeaderPaddingLeft: spacing.xSmall,
23
23
  rightFooterPaddingLeftRight: spacing.small,
24
24
  entryEditBorderWidth: borders.widthSmall,
25
- entryEditBorderColor: colors.tiara
25
+ entryEditBorderColor: colors.contrasts.grey1214
26
26
  };
27
27
  };
28
28
  export default generateComponentTheme;
@@ -32,7 +32,6 @@ var generateStyle = function generateStyle(componentTheme) {
32
32
  fontSize: componentTheme.headerTextFontSize
33
33
  },
34
34
  stem: {
35
- overflowX: 'auto',
36
35
  fontSize: componentTheme.stemFontSize,
37
36
  lineHeight: componentTheme.stemLineHeight,
38
37
  '& p': {
@@ -5,18 +5,18 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
5
5
  typography = _ref.typography;
6
6
  return {
7
7
  entryDetailPadding: spacing.small,
8
- headerRowColor: colors.ash,
8
+ headerRowColor: colors.contrasts.grey4570,
9
9
  buttonsZIndex: '3333',
10
10
  expandButtonContainerBorderWidth: borders.widthMedium,
11
- expandButtonContainerBorderColor: colors.tiara,
11
+ expandButtonContainerBorderColor: colors.contrasts.grey1214,
12
12
  addButtonMargin: spacing.small,
13
- headerTextColor: colors.ash,
13
+ headerTextColor: colors.contrasts.grey4570,
14
14
  headerTextFontSize: typography.fontSizeXSmall,
15
15
  stemFontSize: typography.fontSizeMedium,
16
16
  stemLineHeight: typography.lineHeight,
17
17
  footerPadding: spacing.medium,
18
18
  footerBorderWidth: borders.widthSmall,
19
- footerBorderColor: colors.tiara,
19
+ footerBorderColor: colors.contrasts.grey1214,
20
20
  footerFontSize: typography.fontSizeXSmall,
21
21
  deletePrefaceMargin: spacing.xxSmall
22
22
  };
@@ -3,13 +3,13 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  spacing = _ref.spacing,
4
4
  borders = _ref.borders;
5
5
  return {
6
- contentBackgroundColor: colors.white,
6
+ contentBackgroundColor: colors.contrasts.white1010,
7
7
  contentPaddingTopBottom: spacing.medium,
8
8
  contentPaddingLeftRight: spacing.xLarge,
9
9
  breadCrumbMarginBottom: spacing.large,
10
10
  headerPaddingBottom: spacing.large,
11
11
  headerBorderWidth: borders.widthSmall,
12
- headerBorderColor: colors.tiara
12
+ headerBorderColor: colors.contrasts.grey1214
13
13
  };
14
14
  };
15
15
  export default generateComponentTheme;
@@ -5,13 +5,13 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
5
5
  spacing = _ref.spacing;
6
6
  return {
7
7
  bankRowBorderWidth: borders.widthSmall,
8
- bankRowBorderColor: colors.tiara,
8
+ bankRowBorderColor: colors.contrasts.grey1214,
9
9
  bankInfoMargin: spacing.small,
10
10
  bankTitleFontSize: typography.fontSizeSmall,
11
11
  bankTitlePadding: spacing.xSmall,
12
- bankTitleLinkColor: colors.licorice,
13
- bankTitleLinkHoverColor: colors.licorice,
14
- bankDetailsColor: colors.ash,
12
+ bankTitleLinkColor: colors.contrasts.grey125125,
13
+ bankTitleLinkHoverColor: colors.contrasts.grey125125,
14
+ bankDetailsColor: colors.contrasts.grey4570,
15
15
  bankDetailsFontSize: typography.fontSizeXSmall,
16
16
  bankOptionsMargin: spacing.small,
17
17
  BankOptionIconMargin: spacing.xSmall,
@@ -2,9 +2,9 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
- var _dec, _class, _CreateBankModal;
5
+ var _CreateBankModal;
6
6
  /** @jsx jsx */
7
- import { Component } from 'react';
7
+ import React, { Component } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { Button, CloseButton } from '@instructure/ui-buttons';
10
10
  import { Checkbox } from '@instructure/ui-checkbox';
@@ -14,19 +14,14 @@ import { jsx } from '@instructure/emotion';
14
14
  import t from '@instructure/quiz-i18n/es/format-message';
15
15
  import Bank from "../../../common/records/Bank.js";
16
16
  import { toErrors } from "../../../common/util/instUIMessages.js";
17
- import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
18
- import generateStyle from "./styles.js";
19
- import generateComponentTheme from "./theme.js";
20
- export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_CreateBankModal = /*#__PURE__*/function (_Component) {
17
+ import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
18
+ export var CreateBankModal = /*#__PURE__*/function (_Component) {
21
19
  _inherits(CreateBankModal, _Component);
22
20
  var _super = _createSuper(CreateBankModal);
23
- function CreateBankModal() {
21
+ function CreateBankModal(props) {
24
22
  var _this;
25
23
  _classCallCheck(this, CreateBankModal);
26
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
- args[_key] = arguments[_key];
28
- }
29
- _this = _super.call.apply(_super, [this].concat(args));
24
+ _this = _super.call(this, props);
30
25
  _this.state = {
31
26
  shareWithCourse: false
32
27
  };
@@ -38,7 +33,8 @@ export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateC
38
33
  _this.props.onCreateBank();
39
34
  _this.closeAction();
40
35
  } else {
41
- _this.props.screenreaderNotification(t('Bank name cannot be blank.'));
36
+ var _this$bankNameInput$c;
37
+ (_this$bankNameInput$c = _this.bankNameInput.current) === null || _this$bankNameInput$c === void 0 ? void 0 : _this$bankNameInput$c.focus();
42
38
  }
43
39
  };
44
40
  _this.closeAction = function () {
@@ -68,6 +64,7 @@ export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateC
68
64
  shareWithCourse: event.target.checked
69
65
  });
70
66
  };
67
+ _this.bankNameInput = /*#__PURE__*/React.createRef();
71
68
  return _this;
72
69
  }
73
70
  _createClass(CreateBankModal, [{
@@ -92,17 +89,14 @@ export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateC
92
89
  }, {
93
90
  key: "renderContent",
94
91
  value: function renderContent() {
95
- return jsx("div", {
96
- css: this.props.styles.bankNameInput
97
- }, jsx(TextInput, {
92
+ return jsx("div", null, jsx(TextInput, {
98
93
  messages: this.getErrors(),
99
94
  onChange: this.onNameChange,
100
- renderLabel: jsx("div", {
101
- css: this.props.styles.bankNameLabel
102
- }, t('Bank Name')),
95
+ renderLabel: t('Bank Name'),
96
+ isRequired: true,
103
97
  type: "text",
104
- placeholder: t('Enter a name...'),
105
- "data-automation": "sdk-create-bank-name-textinput"
98
+ "data-automation": "sdk-create-bank-name-textinput",
99
+ ref: this.bankNameInput
106
100
  }), this.renderCheckbox());
107
101
  }
108
102
  }, {
@@ -134,7 +128,6 @@ export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateC
134
128
  label: t('Item Bank'),
135
129
  "data-automation": "sdk-create-bank-modal"
136
130
  }, jsx(ModalHeader, null, jsx(Heading, {
137
- level: "reset",
138
131
  as: "h2"
139
132
  }, t('New Item Bank')), jsx(CloseButton, {
140
133
  onClick: this.closeAction,
@@ -146,7 +139,11 @@ export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateC
146
139
  }]);
147
140
  CreateBankModal.displayName = "CreateBankModal";
148
141
  return CreateBankModal;
149
- }(Component), _CreateBankModal.displayName = 'CreateBankModal', _CreateBankModal.componentId = "Quizzes".concat(_CreateBankModal.displayName), _CreateBankModal.propTypes = {
142
+ }(Component);
143
+ _CreateBankModal = CreateBankModal;
144
+ CreateBankModal.displayName = 'CreateBankModal';
145
+ CreateBankModal.componentId = "Quizzes".concat(_CreateBankModal.displayName);
146
+ CreateBankModal.propTypes = {
150
147
  modalOpen: PropTypes.bool.isRequired,
151
148
  modalTrigger: PropTypes.instanceOf(Component),
152
149
  temporaryBank: PropTypes.instanceOf(Bank).isRequired,
@@ -169,11 +166,12 @@ export var CreateBankModal = (_dec = withStyleOverrides(generateStyle, generateC
169
166
  root_account_name: PropTypes.string
170
167
  }),
171
168
  styles: PropTypes.object
172
- }, _CreateBankModal.defaultProps = {
169
+ };
170
+ CreateBankModal.defaultProps = {
173
171
  displayError: false,
174
172
  modalTrigger: null,
175
173
  showShareBankOnCreate: false,
176
174
  itemBanksScope: {},
177
175
  onCreateBank: function onCreateBank() {}
178
- }, _CreateBankModal)) || _class);
176
+ };
179
177
  export default CreateBankModal;
@@ -2,34 +2,32 @@ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
2
  import _createClass from "@babel/runtime/helpers/esm/createClass";
3
3
  import _inherits from "@babel/runtime/helpers/esm/inherits";
4
4
  import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
- var _dec, _class, _EditBankModal;
5
+ var _EditBankModal;
6
6
  /** @jsx jsx */
7
- import { Component } from 'react';
7
+ import React, { Component } from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import { Button, CloseButton } from '@instructure/ui-buttons';
10
10
  import { Heading } from '@instructure/ui-heading';
11
11
  import { jsx } from '@instructure/emotion';
12
12
  import t from '@instructure/quiz-i18n/es/format-message';
13
13
  import { toErrors } from "../../../common/util/instUIMessages.js";
14
- import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN, withStyleOverrides } from '@instructure/quiz-common';
14
+ import { Modal, ModalHeader, ModalBody, ModalFooter, TextInput, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
15
15
  import Bank from "../../../common/records/Bank.js";
16
- import generateStyle from "./styles.js";
17
- import generateComponentTheme from "./theme.js";
18
- export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_EditBankModal = /*#__PURE__*/function (_Component) {
16
+ export var EditBankModal = /*#__PURE__*/function (_Component) {
19
17
  _inherits(EditBankModal, _Component);
20
18
  var _super = _createSuper(EditBankModal);
21
- function EditBankModal() {
19
+ function EditBankModal(props) {
22
20
  var _this;
23
21
  _classCallCheck(this, EditBankModal);
24
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
25
- args[_key] = arguments[_key];
26
- }
27
- _this = _super.call.apply(_super, [this].concat(args));
22
+ _this = _super.call(this, props);
28
23
  _this.continueAction = function () {
29
24
  _this.props.showError(_this.props.errorKey);
30
25
  if (_this.props.workingBank.isValid()) {
31
26
  _this.props.updateBank(_this.props.workingBank);
32
27
  _this.closeAction();
28
+ } else {
29
+ var _this$bankNameInput$c;
30
+ (_this$bankNameInput$c = _this.bankNameInput.current) === null || _this$bankNameInput$c === void 0 ? void 0 : _this$bankNameInput$c.focus();
33
31
  }
34
32
  };
35
33
  _this.closeAction = function () {
@@ -51,6 +49,7 @@ export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateCom
51
49
  return toErrors(_this.props.workingBank.errorsFor('title').toJS());
52
50
  }
53
51
  };
52
+ _this.bankNameInput = /*#__PURE__*/React.createRef();
54
53
  return _this;
55
54
  }
56
55
  _createClass(EditBankModal, [{
@@ -75,17 +74,16 @@ export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateCom
75
74
  }, {
76
75
  key: "renderContent",
77
76
  value: function renderContent() {
78
- return jsx("div", {
79
- css: this.props.styles.bankNameInput
80
- }, jsx(TextInput, {
77
+ return jsx(TextInput, {
81
78
  value: this.props.workingBank.title,
82
79
  messages: this.getErrors(),
83
80
  onChange: this.onNameChange,
84
- renderLabel: jsx("div", null, t('Bank Name')),
81
+ renderLabel: t('Bank Name'),
85
82
  type: "text",
86
- placeholder: t('Enter a name...'),
87
- "data-automation": "sdk-edit-bank-name-textinput"
88
- }));
83
+ isRequired: true,
84
+ "data-automation": "sdk-edit-bank-name-textinput",
85
+ ref: this.bankNameInput
86
+ });
89
87
  }
90
88
  }, {
91
89
  key: "render",
@@ -97,7 +95,6 @@ export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateCom
97
95
  label: t('Item Bank'),
98
96
  "data-automation": "sdk-edit-bank-modal"
99
97
  }, jsx(ModalHeader, null, jsx(Heading, {
100
- level: "reset",
101
98
  as: "h2"
102
99
  }, t('Edit Item Bank')), jsx(CloseButton, {
103
100
  onClick: this.closeAction,
@@ -109,7 +106,11 @@ export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateCom
109
106
  }]);
110
107
  EditBankModal.displayName = "EditBankModal";
111
108
  return EditBankModal;
112
- }(Component), _EditBankModal.displayName = 'EditBankModal', _EditBankModal.componentId = "Quizzes".concat(_EditBankModal.displayName), _EditBankModal.propTypes = {
109
+ }(Component);
110
+ _EditBankModal = EditBankModal;
111
+ EditBankModal.displayName = 'EditBankModal';
112
+ EditBankModal.componentId = "Quizzes".concat(_EditBankModal.displayName);
113
+ EditBankModal.propTypes = {
113
114
  modalOpen: PropTypes.bool.isRequired,
114
115
  modalTrigger: PropTypes.instanceOf(Component),
115
116
  workingBank: PropTypes.instanceOf(Bank).isRequired,
@@ -122,8 +123,9 @@ export var EditBankModal = (_dec = withStyleOverrides(generateStyle, generateCom
122
123
  hideError: PropTypes.func.isRequired,
123
124
  closeModal: PropTypes.func.isRequired,
124
125
  styles: PropTypes.object
125
- }, _EditBankModal.defaultProps = {
126
+ };
127
+ EditBankModal.defaultProps = {
126
128
  displayError: false,
127
129
  modalTrigger: null
128
- }, _EditBankModal)) || _class);
130
+ };
129
131
  export default EditBankModal;
@@ -8,9 +8,9 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
8
8
  navPaddingTopBottom: spacing.small,
9
9
  navPaddingLeftRight: spacing.xLarge,
10
10
  navBorderWidth: borders.widthSmall,
11
- navBorderColor: colors.tiara,
12
- navBackgroundColor: colors.white,
13
- bankIconColor: colors.electric,
11
+ navBorderColor: colors.contrasts.grey1214,
12
+ navBackgroundColor: colors.contrasts.white1010,
13
+ bankIconColor: colors.contrasts.blue4570,
14
14
  bankIconFontSize: typography.fontSizeLarge,
15
15
  bankIconPadding: spacing.xSmall
16
16
  };
@@ -22,7 +22,6 @@ import { Grid } from '@instructure/ui-grid';
22
22
  import { Tabs } from '@instructure/ui-tabs';
23
23
  import { Text } from '@instructure/ui-text';
24
24
  import { jsx } from '@instructure/emotion';
25
- import elementsForSelectors from "../../../common/util/ElementsForSelectors.js";
26
25
  import CustomPropTypes from "../../../common/util/CustomPropTypes.js";
27
26
  import ShareList from "./ShareList/index.js";
28
27
  import AsyncSearch from "../AsyncSearch/index.js";
@@ -54,9 +53,6 @@ export var SharingModalPresenter = (_dec = withStyleOverrides(generateStyle, gen
54
53
  };
55
54
  _this.shareListRef = null;
56
55
  _this.shareButtonRef = null;
57
- _this.applicationElement = function () {
58
- return elementsForSelectors(_this.props.appContainer);
59
- };
60
56
  // =============
61
57
  // LIFECYCLE
62
58
  // =============
@@ -3,7 +3,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  borders = _ref.borders,
4
4
  spacing = _ref.spacing;
5
5
  return {
6
- separatorColor: colors.tiara,
6
+ separatorColor: colors.contrasts.grey1214,
7
7
  separatorBorderWidth: borders.widthSmall,
8
8
  separatorMargin: spacing.medium
9
9
  };
@@ -3,7 +3,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  colors = _ref.colors;
4
4
  return {
5
5
  buttonsZIndex: '3333',
6
- buttonsColor: colors.oxford,
6
+ buttonsColor: colors.contrasts.grey100100,
7
7
  buttonsPadding: spacing.xSmall
8
8
  };
9
9
  };
@@ -2,8 +2,8 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
2
2
  var spacing = _ref.spacing,
3
3
  colors = _ref.colors;
4
4
  return {
5
- addToBankBackgroundColor: colors.porcelain,
6
- addToBankBorderColor: colors.oxford
5
+ addToBankBackgroundColor: colors.contrasts.grey1111,
6
+ addToBankBorderColor: colors.contrasts.grey100100
7
7
  };
8
8
  };
9
9
  export default generateComponentTheme;
@@ -7,7 +7,7 @@ export default function generator(_ref) {
7
7
  labelLeftPadding: spacing.large,
8
8
  labelBottomPadding: spacing.xxSmall,
9
9
  labelFontSize: typography.fontSizeSmall,
10
- labelColor: colors.slate,
10
+ labelColor: colors.contrasts.grey4570,
11
11
  editButtonWrapperRightMargin: spacing.large
12
12
  };
13
13
  }
@@ -10,7 +10,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
10
10
  titleEditInputFontSize: typography.fontSizeXLarge,
11
11
  errorBorderMargin: spacing.xxSmall,
12
12
  errorBorderPadding: spacing.xxSmall,
13
- errorBorderColor: colors.crimson,
13
+ errorBorderColor: colors.contrasts.red4570,
14
14
  errorBorderBorderRadius: borders.radiusSmall
15
15
  };
16
16
  };
@@ -8,10 +8,10 @@ export default function generator(_ref) {
8
8
  labelLeftPadding: spacing.large,
9
9
  labelBottomPadding: spacing.xxSmall,
10
10
  labelFontSize: typography.fontSizeSmall,
11
- labelColor: colors.slate,
11
+ labelColor: colors.contrasts.grey4570,
12
12
  editButtonWrapperRightMargin: spacing.large,
13
- titleShowWrapperBottomBorder: "".concat(borders.widthMedium, " ").concat(borders.style, " ").concat(colors.porcelain),
13
+ titleShowWrapperBottomBorder: "".concat(borders.widthMedium, " ").concat(borders.style, " ").concat(colors.contrasts.grey1111),
14
14
  titleEditWrapperBorderWidth: borders.widthSmall,
15
- titleEditWrapperBorderColor: colors.ash
15
+ titleEditWrapperBorderColor: colors.contrasts.grey4570
16
16
  };
17
17
  }
@@ -6,7 +6,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
6
6
  return {
7
7
  footerPadding: spacing.small,
8
8
  footerBorderWidth: borders.widthSmall,
9
- footerBorderColor: colors.tiara,
9
+ footerBorderColor: colors.contrasts.grey1214,
10
10
  footerFontSize: typography.fontSizeXSmall
11
11
  };
12
12
  };
@@ -5,9 +5,9 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
5
5
  borders = _ref.borders;
6
6
  return {
7
7
  marginAddMargin: spacing.xSmall,
8
- quizEntryBankEditBackgroundColor: colors.white,
8
+ quizEntryBankEditBackgroundColor: colors.contrasts.white1010,
9
9
  quizEntryBankEditBorderSize: borders.widthSmall,
10
- quizEntryBankEditBorderColor: colors.oxford,
10
+ quizEntryBankEditBorderColor: colors.contrasts.grey100100,
11
11
  quizEntryBankEditPadding: borders.small,
12
12
  quizEntryBankEditMargin: spacing.medium,
13
13
  numberInputFontSize: typography.fontSizeMedium,
@@ -16,7 +16,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
16
16
  borderLineTopMargin: spacing.small,
17
17
  borderLineBottomMargin: spacing.small,
18
18
  borderLineBottomBorderSize: borders.widthSmall,
19
- borderLineBottomBorderColor: colors.ash
19
+ borderLineBottomBorderColor: colors.contrasts.grey4570
20
20
  };
21
21
  };
22
22
  export default generateComponentTheme;
@@ -4,8 +4,8 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
4
4
  typography = _ref.typography,
5
5
  borders = _ref.borders;
6
6
  return {
7
- quizEntryBankBackgroundColor: colors.white,
8
- quizEntryBankBorder: "".concat(borders.widthSmall, " dashed ").concat(colors.oxford),
7
+ quizEntryBankBackgroundColor: colors.contrasts.white1010,
8
+ quizEntryBankBorder: "".concat(borders.widthSmall, " dashed ").concat(colors.contrasts.grey100100),
9
9
  quizEntryBankPadding: "".concat(spacing.xxSmall, " ").concat(spacing.medium),
10
10
  quizEntryBankTopMargin: spacing.small,
11
11
  alertWrapperMargin: spacing.small
@@ -3,8 +3,8 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  colors = _ref.colors,
4
4
  typography = _ref.typography;
5
5
  return {
6
- headerBackgroundColor: colors.porcelain,
7
- headerColor: colors.oxford,
6
+ headerBackgroundColor: colors.contrasts.grey1111,
7
+ headerColor: colors.contrasts.grey100100,
8
8
  headerPadding: "".concat(spacing.xSmall, " ").concat(spacing.small)
9
9
  };
10
10
  };
@@ -6,13 +6,13 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
6
6
  breakpoints = _ref.breakpoints;
7
7
  return {
8
8
  quizEntryShowPadding: "".concat(spacing.large, " ").concat(spacing.small),
9
- quizEntryShowBackgroundColor: colors.white,
9
+ quizEntryShowBackgroundColor: colors.contrasts.white1010,
10
10
  headerHeight: '2rem',
11
11
  headerRightPadding: spacing.xSmall,
12
- dndBorder: "".concat(borders.style, " ").concat(borders.widthSmall, " ").concat(colors.brand),
12
+ dndBorder: "".concat(borders.style, " ").concat(borders.widthSmall, " ").concat(colors.contrasts.blue4570),
13
13
  rightHeaderZIndex: '3333',
14
- rightHeaderColor: colors.oxford,
15
- titleInteractionTypeNamePointsColor: colors.slate,
14
+ rightHeaderColor: colors.contrasts.grey100100,
15
+ titleInteractionTypeNamePointsColor: colors.contrasts.grey4570,
16
16
  titleInteractionTypeNamePointsFontSize: typography.fontSizeSmall,
17
17
  titleInteractionTypeNamePointsLeftMargin: spacing.xSmall,
18
18
  titleInteractionTypeNamePointsRightMargin: spacing.xSmall,
@@ -20,7 +20,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
20
20
  optionsButtonDragDropHandleFontSize: typography.fontSizeMedium,
21
21
  optionsButtonDragDropHandleMargin: spacing.xSmall,
22
22
  phoneConnectingLinesBorderWidth: borders.widthSmall,
23
- phoneConnectingLinesBorderColor: colors.ash,
23
+ phoneConnectingLinesBorderColor: colors.contrasts.grey4570,
24
24
  phoneBreakPoint: "max-width: ".concat(breakpoints.medium)
25
25
  };
26
26
  };
@@ -57,19 +57,20 @@ export var ConfirmationModal = /*#__PURE__*/function (_Component) {
57
57
  continueText = _this$props2.continueText,
58
58
  size = _this$props2.size,
59
59
  shouldReturnFocus = _this$props2.shouldReturnFocus,
60
- continueVariant = _this$props2.continueVariant;
60
+ continueVariant = _this$props2.continueVariant,
61
+ automationPrefix = _this$props2.automationPrefix;
61
62
  return /*#__PURE__*/React.createElement(ImportantModal, {
62
63
  open: this.props.modalOpen,
63
64
  size: size || 'small',
64
65
  label: title || t('Confirm'),
65
66
  onDismiss: this.cancelAction,
66
- "data-automation": "sdk-confirmation-modal",
67
+ "data-automation": automationPrefix ? "sdk-".concat(automationPrefix, "-confirmation-modal") : 'sdk-confirmation-modal',
67
68
  shouldReturnFocus: shouldReturnFocus,
68
69
  onClose: this.doAction
69
70
  }, /*#__PURE__*/React.createElement(ModalHeader, null, /*#__PURE__*/React.createElement(Heading, {
70
71
  level: "reset",
71
72
  as: "h2",
72
- "data-automation": "sdk-confirmation-modal-heading"
73
+ "data-automation": automationPrefix ? "sdk-".concat(automationPrefix, "-confirmation-modal-heading") : 'sdk-confirmation-modal-heading'
73
74
  }, title || t('Confirm')), /*#__PURE__*/React.createElement(CloseButton, {
74
75
  onClick: this.cancelAction,
75
76
  placement: "end",
@@ -80,12 +81,12 @@ export var ConfirmationModal = /*#__PURE__*/function (_Component) {
80
81
  }, text || t('Are you sure?'))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
81
82
  onClick: this.cancelAction,
82
83
  margin: XSMALL_SIDE_MARGIN,
83
- "data-automation": "sdk-confirmation-modal-cancel"
84
+ "data-automation": automationPrefix ? "sdk-".concat(automationPrefix, "-confirmation-modal-cancel") : 'sdk-confirmation-modal-cancel'
84
85
  }, cancelText || t('Cancel')), /*#__PURE__*/React.createElement(Button, {
85
86
  color: continueVariant || 'primary',
86
87
  onClick: this.continueAction,
87
88
  margin: XSMALL_SIDE_MARGIN,
88
- "data-automation": "sdk-confirmation-modal-confirm"
89
+ "data-automation": automationPrefix ? "sdk-".concat(automationPrefix, "-confirmation-modal-confirm") : 'sdk-confirmation-modal-confirm'
89
90
  }, continueText || t('Confirm'))));
90
91
  }
91
92
  }]);
@@ -103,7 +104,8 @@ ConfirmationModal.propTypes = {
103
104
  size: PropTypes.string,
104
105
  shouldReturnFocus: PropTypes.bool,
105
106
  onContinue: PropTypes.func,
106
- onCancel: PropTypes.func
107
+ onCancel: PropTypes.func,
108
+ automationPrefix: PropTypes.string
107
109
  };
108
110
  ConfirmationModal.defaultProps = {
109
111
  title: null,
@@ -114,6 +116,7 @@ ConfirmationModal.defaultProps = {
114
116
  size: null,
115
117
  shouldReturnFocus: true,
116
118
  onContinue: null,
117
- onCancel: null
119
+ onCancel: null,
120
+ automationPrefix: null
118
121
  };
119
122
  export default ConfirmationModal;
@@ -3,15 +3,15 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  colors = _ref.colors,
4
4
  typography = _ref.typography;
5
5
  return {
6
- uploadIconContainerColor: colors.ash,
6
+ uploadIconContainerColor: colors.contrasts.grey4570,
7
7
  uploadIconContainerColorFontSize: typography.fontSizeXLarge,
8
8
  checkIconContainerFontSize: typography.fontSizeXLarge,
9
- checkIconContainerColor: colors.shamrock,
9
+ checkIconContainerColor: colors.contrasts.green4570,
10
10
  smallTextFontSize: typography.fontSizeXSmall,
11
- smallTextColor: colors.ash,
11
+ smallTextColor: colors.contrasts.grey4570,
12
12
  smallTextPadding: spacing.xSmall,
13
13
  selectorMargin: spacing.xSmall,
14
- fileListSuccessColor: colors.shamrock
14
+ fileListSuccessColor: colors.contrasts.green4570
15
15
  };
16
16
  };
17
17
  export default generateComponentTheme;
@@ -3,7 +3,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
3
3
  borders = _ref.borders,
4
4
  spacing = _ref.spacing;
5
5
  return {
6
- separatorColor: colors.tiara,
6
+ separatorColor: colors.contrasts.grey1214,
7
7
  separatorBorderWidth: borders.widthSmall,
8
8
  separatorMargin: spacing.medium
9
9
  };
@@ -5,7 +5,7 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
5
5
  return {
6
6
  phoneBreakPoint: "max-width: ".concat(breakpoints.medium),
7
7
  menuButtonFontSize: typography.fontSizeLarge,
8
- menuButtonColor: colors.licorice,
8
+ menuButtonColor: colors.contrasts.grey125125,
9
9
  menuButtonHoverOpacity: '0.6'
10
10
  };
11
11
  };
@@ -4,10 +4,10 @@ var generateComponentTheme = function generateComponentTheme(_ref) {
4
4
  colors = _ref.colors,
5
5
  typography = _ref.typography;
6
6
  return {
7
- timerBackgroundColor: colors.porcelain,
8
- timerColor: colors.ash,
7
+ timerBackgroundColor: colors.contrasts.grey1111,
8
+ timerColor: colors.contrasts.grey4570,
9
9
  timerBorderWidth: borders.widthSmall,
10
- timerBorderColor: colors.tiara,
10
+ timerBorderColor: colors.contrasts.grey1214,
11
11
  timerBorderRadius: borders.radiusMedium,
12
12
  timerFontSize: typography.fontSizeMedium,
13
13
  timerPadding: spacing.xxSmall,