@instructure/quiz-core 22.13.2 → 22.14.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.
@@ -25,7 +25,7 @@ import PropTypes from 'prop-types';
25
25
  import ImmutablePropTypes from 'react-immutable-proptypes';
26
26
  import partial from 'lodash/partial';
27
27
  import { DragSource } from 'react-dnd';
28
- import { IconAiLine, IconBankLine } from '@instructure/ui-icons';
28
+ import { IconAiColoredSolid, IconBankLine } from '@instructure/ui-icons';
29
29
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
30
30
  import { jsx } from '@instructure/emotion';
31
31
  import { FillBlankInteractionType } from '@instructure/quiz-interactions';
@@ -40,6 +40,8 @@ import PositionBox from '../../../../../common/components/resources/positionBox/
40
40
  import DragAndDropZone from '../../../../../common/components/shared/drag_and_drop/DragAndDropZone';
41
41
  import generateStyle from './styles';
42
42
  import generateComponentTheme from './theme';
43
+ import { Tooltip } from '@instructure/ui-tooltip';
44
+ import { View } from '@instructure/ui-view';
43
45
  var QuizEntryShow = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_QuizEntryShow = /*#__PURE__*/function (_Component) {
44
46
  function QuizEntryShow() {
45
47
  var _this2;
@@ -210,11 +212,19 @@ var QuizEntryShow = (_dec = withStyleOverrides(generateStyle, generateComponentT
210
212
  }, {
211
213
  key: "renderAiGeneratedContent",
212
214
  value: function renderAiGeneratedContent() {
213
- if (this.props.quizEntry.isAiGenerated) {
214
- return jsx(IconAiLine, {
215
- title: t('AI generated')
216
- });
215
+ if (!this.props.quizEntry.isAiGenerated) {
216
+ return null;
217
217
  }
218
+ return jsx(View, {
219
+ stacking: "topmost"
220
+ }, jsx(Tooltip, {
221
+ renderTip: t('This question was generated using AI'),
222
+ placement: "top center",
223
+ on: ['hover', 'focus']
224
+ }, jsx(IconAiColoredSolid, {
225
+ color: "primary",
226
+ "aria-label": t('This question was generated using AI')
227
+ })));
218
228
  }
219
229
  }, {
220
230
  key: "renderLeftHeader",
@@ -31,6 +31,8 @@ var _PositionBox = _interopRequireDefault(require("../../../../../common/compone
31
31
  var _DragAndDropZone = _interopRequireDefault(require("../../../../../common/components/shared/drag_and_drop/DragAndDropZone"));
32
32
  var _styles = _interopRequireDefault(require("./styles"));
33
33
  var _theme = _interopRequireDefault(require("./theme"));
34
+ var _uiTooltip = require("@instructure/ui-tooltip");
35
+ var _uiView = require("@instructure/ui-view");
34
36
  var _dec, _class, _QuizEntryShow;
35
37
  /** @jsx jsx */
36
38
  function _callSuper(_this, derived, args) {
@@ -217,11 +219,19 @@ var QuizEntryShow = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default
217
219
  }, {
218
220
  key: "renderAiGeneratedContent",
219
221
  value: function renderAiGeneratedContent() {
220
- if (this.props.quizEntry.isAiGenerated) {
221
- return (0, _emotion.jsx)(_uiIcons.IconAiLine, {
222
- title: (0, _formatMessage["default"])('AI generated')
223
- });
222
+ if (!this.props.quizEntry.isAiGenerated) {
223
+ return null;
224
224
  }
225
+ return (0, _emotion.jsx)(_uiView.View, {
226
+ stacking: "topmost"
227
+ }, (0, _emotion.jsx)(_uiTooltip.Tooltip, {
228
+ renderTip: (0, _formatMessage["default"])('This question was generated using AI'),
229
+ placement: "top center",
230
+ on: ['hover', 'focus']
231
+ }, (0, _emotion.jsx)(_uiIcons.IconAiColoredSolid, {
232
+ color: "primary",
233
+ "aria-label": (0, _formatMessage["default"])('This question was generated using AI')
234
+ })));
225
235
  }
226
236
  }, {
227
237
  key: "renderLeftHeader",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "22.13.2",
3
+ "version": "22.14.0",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -111,12 +111,12 @@
111
111
  "store": "^1.3.20",
112
112
  "striptags": "^2.0.0",
113
113
  "uuid": "^3.2.1",
114
- "@instructure/quiz-common": "22.13.2",
115
- "@instructure/quiz-i18n": "22.13.2",
116
- "@instructure/quiz-interactions": "22.13.2",
117
- "@instructure/quiz-number-input": "22.13.2",
118
- "@instructure/quiz-rce": "22.13.2",
119
- "instructure-validations": "22.13.2"
114
+ "@instructure/quiz-common": "22.14.0",
115
+ "@instructure/quiz-i18n": "22.14.0",
116
+ "@instructure/quiz-interactions": "22.14.0",
117
+ "@instructure/quiz-number-input": "22.14.0",
118
+ "@instructure/quiz-rce": "22.14.0",
119
+ "instructure-validations": "22.14.0"
120
120
  },
121
121
  "devDependencies": {
122
122
  "@instructure/ui-axe-check": "10.17.0",
@@ -145,7 +145,7 @@
145
145
  "sinon": "^6.1.3",
146
146
  "sinon-chai": "^3.3.0",
147
147
  "@instructure/quiz-scripts": "21.0.0",
148
- "quiz-presets": "22.13.2"
148
+ "quiz-presets": "22.14.0"
149
149
  },
150
150
  "peerDependencies": {
151
151
  "react": "^15 || ^16"