@micromag/screen-quiz 0.3.606 → 0.3.607
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/assets/css/styles.css +1 -1
- package/es/index.js +79 -19
- package/package.json +15 -15
package/assets/css/styles.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.micromag-screen-quiz-answers-emptyAnswer{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-quiz-answers-button:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-quiz-answers-container,.micromag-screen-quiz-answers-items{position:relative}.micromag-screen-quiz-answers-emptyAnswer{font-size:.75em;height:40px;margin:0 auto;width:100%}.micromag-screen-quiz-answers-item{margin:0;padding:0;position:relative;-webkit-transition:opacity .6s ease-out;transition:opacity .6s ease-out}.micromag-screen-quiz-answers-isPlaceholder .micromag-screen-quiz-answers-item{padding:1px 0}.micromag-screen-quiz-answers-item.micromag-screen-quiz-answers-userAnswer{opacity:1!important}.micromag-screen-quiz-answers-item.micromag-screen-quiz-answers-otherAnswer{opacity:.6!important}.micromag-screen-quiz-answers-button{color:#fff;padding:10px;position:relative;width:100%}.micromag-screen-quiz-answers-button:disabled{opacity:1;pointer-events:none}.micromag-screen-quiz-answers-withIcon .micromag-screen-quiz-answers-button{padding-left:42px;padding-right:42px}.micromag-screen-quiz-answers-resultIcon{display:-ms-flexbox;display:flex;left:5px;position:absolute;top:50%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;background-color:#ff2945;border:2px solid #1c1c1c;border-radius:50%;height:32px;justify-content:center;margin-top:-16px;opacity:0;padding:5px;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;width:32px}.micromag-screen-quiz-answers-answered .micromag-screen-quiz-answers-resultIcon{opacity:1}.micromag-screen-quiz-answers-rightAnswer .micromag-screen-quiz-answers-resultIcon{background-color:#0ed88f}.micromag-screen-quiz-answers-resultIcon .micromag-screen-quiz-answers-faIcon{display:block}.micromag-screen-quiz-answers-itemContent{padding:5px 0}
|
|
1
|
+
.micromag-screen-quiz-answers-emptyAnswer{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-quiz-answers-button:focus-visible{outline:3px solid #a13dff;outline-offset:4px}.micromag-screen-quiz-answers-container,.micromag-screen-quiz-answers-items{position:relative}.micromag-screen-quiz-answers-emptyAnswer{font-size:.75em;height:40px;margin:0 auto;width:100%}.micromag-screen-quiz-answers-item{margin:0;padding:0;position:relative;-webkit-transition:opacity .6s ease-out;transition:opacity .6s ease-out}.micromag-screen-quiz-answers-isPlaceholder .micromag-screen-quiz-answers-item{padding:1px 0}.micromag-screen-quiz-answers-item.micromag-screen-quiz-answers-userAnswer{opacity:1!important}.micromag-screen-quiz-answers-item.micromag-screen-quiz-answers-otherAnswer{opacity:.6!important}.micromag-screen-quiz-answers-item.micromag-screen-quiz-answers-withoutOpacity{opacity:1!important}.micromag-screen-quiz-answers-button{color:#fff;padding:10px;position:relative;width:100%}.micromag-screen-quiz-answers-button:disabled{opacity:1;pointer-events:none}.micromag-screen-quiz-answers-withIcon .micromag-screen-quiz-answers-button{padding-left:42px;padding-right:42px}.micromag-screen-quiz-answers-resultIcon{display:-ms-flexbox;display:flex;left:5px;position:absolute;top:50%;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;background-color:#ff2945;border:2px solid #1c1c1c;border-radius:50%;height:32px;justify-content:center;margin-top:-16px;opacity:0;padding:5px;-webkit-transition:opacity .15s ease;transition:opacity .15s ease;width:32px}.micromag-screen-quiz-answers-answered .micromag-screen-quiz-answers-resultIcon{opacity:1}.micromag-screen-quiz-answers-rightAnswer .micromag-screen-quiz-answers-resultIcon{background-color:#0ed88f}.micromag-screen-quiz-answers-resultIcon .micromag-screen-quiz-answers-faIcon{display:block}.micromag-screen-quiz-answers-itemContent{padding:5px 0}
|
|
2
2
|
.micromag-screen-quiz-question-container .micromag-screen-quiz-question-emptyQuestion,.micromag-screen-quiz-question-container .micromag-screen-quiz-question-emptyResult{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-question{margin-bottom:10px}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-index{display:block;margin-bottom:1em;text-align:center;width:100%}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-result{opacity:0;pointer-events:none;position:absolute;-webkit-transition:opacity .5s ease;transition:opacity .5s ease;-webkit-transition-delay:.3s;transition-delay:.3s}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-resultContent{padding:20px 0}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-emptyQuestion,.micromag-screen-quiz-question-container .micromag-screen-quiz-question-emptyResult{margin:0 auto;width:100%}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-emptyQuestion{height:60px;margin-bottom:10px}.micromag-screen-quiz-question-container .micromag-screen-quiz-question-emptyResult{height:100px}.micromag-screen-quiz-question-container.micromag-screen-quiz-question-resultVisible .micromag-screen-quiz-question-result{opacity:1;pointer-events:all;position:relative}.micromag-screen-quiz-question-container.micromag-screen-quiz-question-isPlaceholder{padding:10px}.micromag-screen-quiz-question-container.micromag-screen-quiz-question-isPlaceholder .micromag-screen-quiz-question-index{color:hsla(0,0%,100%,.6);font-size:8px;mix-blend-mode:difference}
|
|
3
3
|
.micromag-screen-quiz-container .micromag-screen-quiz-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-quiz-container{height:100%;overflow:hidden;position:relative;width:100%}.micromag-screen-quiz-disabled.micromag-screen-quiz-container{overflow:hidden;pointer-events:none}.micromag-screen-quiz-hidden.micromag-screen-quiz-container{display:none;visibility:hidden}.micromag-screen-quiz-placeholder.micromag-screen-quiz-container .micromag-screen-quiz-content{padding:6px;position:relative}.micromag-screen-quiz-container .micromag-screen-quiz-background{z-index:0}.micromag-screen-quiz-container .micromag-screen-quiz-content{z-index:2}.micromag-screen-quiz-container.micromag-screen-quiz-disabled{pointer-events:none}.micromag-screen-quiz-reset{border:0;padding:10px;position:absolute;right:0;top:0;-webkit-transform-origin:center;-ms-transform-origin:center;transform-origin:center;-webkit-transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,-webkit-transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out;transition:opacity .15s ease-out,transform .15s ease-out,-webkit-transform .15s ease-out;z-index:1000}.micromag-screen-quiz-reset:hover{border:0;opacity:.8}.micromag-screen-quiz-reset:hover:active{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}.micromag-screen-quiz-points{color:#fff;left:0;padding:10px;position:absolute;top:0;z-index:1000}.micromag-screen-quiz-layout{bottom:0;left:0;position:absolute;right:0;top:0}.micromag-screen-quiz-header{left:0;position:absolute;top:0;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-quiz-header.micromag-screen-quiz-disabled{opacity:0;pointer-events:none}.micromag-screen-quiz-footer{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-quiz-footer a{padding:0}.micromag-screen-quiz-footer.micromag-screen-quiz-disabled{opacity:0;pointer-events:none}.micromag-screen-quiz-transition{bottom:0;left:0;position:absolute;right:0;top:0}.micromag-screen-quiz-intro,.micromag-screen-quiz-question,.micromag-screen-quiz-results{overflow:hidden}.micromag-screen-quiz-intro.micromag-screen-quiz-enter,.micromag-screen-quiz-question.micromag-screen-quiz-enter,.micromag-screen-quiz-results.micromag-screen-quiz-enter{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.micromag-screen-quiz-left .micromag-screen-quiz-intro.micromag-screen-quiz-enter,.micromag-screen-quiz-left .micromag-screen-quiz-question.micromag-screen-quiz-enter,.micromag-screen-quiz-left .micromag-screen-quiz-results.micromag-screen-quiz-enter{-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%)}.micromag-screen-quiz-intro.micromag-screen-quiz-enterActive,.micromag-screen-quiz-left .micromag-screen-quiz-intro.micromag-screen-quiz-enterActive,.micromag-screen-quiz-left .micromag-screen-quiz-question.micromag-screen-quiz-enterActive,.micromag-screen-quiz-left .micromag-screen-quiz-results.micromag-screen-quiz-enterActive,.micromag-screen-quiz-question.micromag-screen-quiz-enterActive,.micromag-screen-quiz-results.micromag-screen-quiz-enterActive{left:0;min-height:100%;position:absolute;top:0;-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0);-webkit-transition:-webkit-transform 1s ease;transition:-webkit-transform 1s ease;transition:transform 1s ease;transition:transform 1s ease,-webkit-transform 1s ease;width:100%}.micromag-screen-quiz-intro.micromag-screen-quiz-exit,.micromag-screen-quiz-question.micromag-screen-quiz-exit,.micromag-screen-quiz-results.micromag-screen-quiz-exit{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}.micromag-screen-quiz-intro.micromag-screen-quiz-exitActive,.micromag-screen-quiz-question.micromag-screen-quiz-exitActive,.micromag-screen-quiz-results.micromag-screen-quiz-exitActive{left:0;min-height:100%;position:absolute;top:0;-webkit-transform:translateX(-100%);-ms-transform:translateX(-100%);transform:translateX(-100%);-webkit-transition:-webkit-transform 1s ease;transition:-webkit-transform 1s ease;transition:transform 1s ease;transition:transform 1s ease,-webkit-transform 1s ease;width:100%}.micromag-screen-quiz-left .micromag-screen-quiz-intro.micromag-screen-quiz-exitActive,.micromag-screen-quiz-left .micromag-screen-quiz-question.micromag-screen-quiz-exitActive,.micromag-screen-quiz-left .micromag-screen-quiz-results.micromag-screen-quiz-exitActive{-webkit-transform:translateX(100%);-ms-transform:translateX(100%);transform:translateX(100%)}.micromag-screen-quiz-background.micromag-screen-quiz-enter{opacity:0}.micromag-screen-quiz-background.micromag-screen-quiz-enterActive{opacity:1;-webkit-transition:opacity 1s ease;transition:opacity 1s ease;z-index:1}.micromag-screen-quiz-background.micromag-screen-quiz-exit{opacity:1}.micromag-screen-quiz-background.micromag-screen-quiz-exitActive{opacity:0;-webkit-transition:opacity 1s ease;transition:opacity 1s ease;z-index:0}
|
|
4
4
|
.micromag-screen-quiz-results-container .micromag-screen-quiz-results-emptyDescription,.micromag-screen-quiz-results-container .micromag-screen-quiz-results-emptyTitle{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-quiz-results-container .micromag-screen-quiz-results-title{margin-bottom:10px}.micromag-screen-quiz-results-container .micromag-screen-quiz-results-emptyDescription,.micromag-screen-quiz-results-container .micromag-screen-quiz-results-emptyTitle{margin:0 auto;width:100%}.micromag-screen-quiz-results-container .micromag-screen-quiz-results-emptyTitle{height:60px}.micromag-screen-quiz-results-container .micromag-screen-quiz-results-emptyDescription{height:100px}.micromag-screen-quiz-results-container.micromag-screen-quiz-results-isPlaceholder{padding:10px}
|
package/es/index.js
CHANGED
|
@@ -29,14 +29,16 @@ import { animated, useTransition, easings } from '@react-spring/web';
|
|
|
29
29
|
import Button from '@micromag/element-button';
|
|
30
30
|
import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
|
31
31
|
|
|
32
|
-
var styles$4 = {"emptyAnswer":"micromag-screen-quiz-answers-emptyAnswer","button":"micromag-screen-quiz-answers-button","container":"micromag-screen-quiz-answers-container","items":"micromag-screen-quiz-answers-items","item":"micromag-screen-quiz-answers-item","isPlaceholder":"micromag-screen-quiz-answers-isPlaceholder","userAnswer":"micromag-screen-quiz-answers-userAnswer","otherAnswer":"micromag-screen-quiz-answers-otherAnswer","withIcon":"micromag-screen-quiz-answers-withIcon","resultIcon":"micromag-screen-quiz-answers-resultIcon","answered":"micromag-screen-quiz-answers-answered","rightAnswer":"micromag-screen-quiz-answers-rightAnswer","faIcon":"micromag-screen-quiz-answers-faIcon","itemContent":"micromag-screen-quiz-answers-itemContent"};
|
|
32
|
+
var styles$4 = {"emptyAnswer":"micromag-screen-quiz-answers-emptyAnswer","button":"micromag-screen-quiz-answers-button","container":"micromag-screen-quiz-answers-container","items":"micromag-screen-quiz-answers-items","item":"micromag-screen-quiz-answers-item","isPlaceholder":"micromag-screen-quiz-answers-isPlaceholder","userAnswer":"micromag-screen-quiz-answers-userAnswer","otherAnswer":"micromag-screen-quiz-answers-otherAnswer","withoutOpacity":"micromag-screen-quiz-answers-withoutOpacity","withIcon":"micromag-screen-quiz-answers-withIcon","resultIcon":"micromag-screen-quiz-answers-resultIcon","answered":"micromag-screen-quiz-answers-answered","rightAnswer":"micromag-screen-quiz-answers-rightAnswer","faIcon":"micromag-screen-quiz-answers-faIcon","itemContent":"micromag-screen-quiz-answers-itemContent"};
|
|
33
33
|
|
|
34
34
|
var propTypes$5 = {
|
|
35
35
|
items: PropTypes.quizAnswers.isRequired,
|
|
36
36
|
answeredIndex: PropTypes$1.number,
|
|
37
37
|
answersCollapseDelay: PropTypes$1.number,
|
|
38
38
|
buttonsStyle: PropTypes.boxStyle,
|
|
39
|
+
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
39
40
|
buttonsTextStyle: PropTypes.textStyle,
|
|
41
|
+
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
40
42
|
goodAnswerColor: PropTypes.color,
|
|
41
43
|
badAnswerColor: PropTypes.color,
|
|
42
44
|
showUserAnswer: PropTypes$1.bool,
|
|
@@ -55,7 +57,9 @@ var defaultProps$5 = {
|
|
|
55
57
|
answeredIndex: null,
|
|
56
58
|
answersCollapseDelay: 1000,
|
|
57
59
|
buttonsStyle: null,
|
|
60
|
+
inactiveButtonsStyle: null,
|
|
58
61
|
buttonsTextStyle: null,
|
|
62
|
+
inactiveButtonsTextStyle: null,
|
|
59
63
|
goodAnswerColor: null,
|
|
60
64
|
badAnswerColor: null,
|
|
61
65
|
showUserAnswer: false,
|
|
@@ -75,7 +79,9 @@ var Answers = function Answers(_ref) {
|
|
|
75
79
|
answeredIndex = _ref.answeredIndex,
|
|
76
80
|
answersCollapseDelay = _ref.answersCollapseDelay,
|
|
77
81
|
buttonsStyle = _ref.buttonsStyle,
|
|
82
|
+
inactiveButtonsStyle = _ref.inactiveButtonsStyle,
|
|
78
83
|
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
84
|
+
inactiveButtonsTextStyle = _ref.inactiveButtonsTextStyle,
|
|
79
85
|
goodAnswerColor = _ref.goodAnswerColor,
|
|
80
86
|
badAnswerColor = _ref.badAnswerColor,
|
|
81
87
|
showUserAnswer = _ref.showUserAnswer,
|
|
@@ -236,28 +242,38 @@ var Answers = function Answers(_ref) {
|
|
|
236
242
|
onTransitionEnd();
|
|
237
243
|
}
|
|
238
244
|
}, [transitioned, onTransitionEnd]);
|
|
245
|
+
var hasOpacity = useMemo(function () {
|
|
246
|
+
var _ref8 = inactiveButtonsStyle || {},
|
|
247
|
+
_ref8$backgroundColor = _ref8.backgroundColor,
|
|
248
|
+
backgroundColor = _ref8$backgroundColor === void 0 ? null : _ref8$backgroundColor;
|
|
249
|
+
return backgroundColor === null;
|
|
250
|
+
}, [inactiveButtonsStyle]);
|
|
239
251
|
return /*#__PURE__*/React.createElement("div", {
|
|
240
252
|
className: classNames([styles$4.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$4.answered, answered), styles$4.withIcon, !withoutIcon), styles$4.isPlaceholder, isPlaceholder), className, className !== null)])
|
|
241
253
|
}, filteredListOfItems !== null || isPlaceholder ? /*#__PURE__*/React.createElement("div", {
|
|
242
254
|
className: styles$4.items
|
|
243
255
|
}, transitions(function (style, answer, t, answerI) {
|
|
244
256
|
var userAnswer = answerI === answeredIndex;
|
|
245
|
-
var
|
|
246
|
-
|
|
247
|
-
rightAnswer =
|
|
248
|
-
|
|
249
|
-
label =
|
|
250
|
-
|
|
251
|
-
answerButtonStyle =
|
|
252
|
-
_ref9$textStyle = _ref9.textStyle,
|
|
253
|
-
answerButtonTextStyle = _ref9$textStyle === void 0 ? null : _ref9$textStyle;
|
|
254
|
-
var _ref10 = label || {},
|
|
257
|
+
var _ref10 = answer || {},
|
|
258
|
+
_ref10$good = _ref10.good,
|
|
259
|
+
rightAnswer = _ref10$good === void 0 ? null : _ref10$good,
|
|
260
|
+
_ref10$label = _ref10.label,
|
|
261
|
+
label = _ref10$label === void 0 ? null : _ref10$label,
|
|
262
|
+
_ref10$buttonStyle = _ref10.buttonStyle,
|
|
263
|
+
answerButtonStyle = _ref10$buttonStyle === void 0 ? null : _ref10$buttonStyle,
|
|
255
264
|
_ref10$textStyle = _ref10.textStyle,
|
|
256
|
-
|
|
265
|
+
answerButtonTextStyle = _ref10$textStyle === void 0 ? null : _ref10$textStyle;
|
|
266
|
+
var _ref11 = label || {},
|
|
267
|
+
_ref11$textStyle = _ref11.textStyle,
|
|
268
|
+
textStyle = _ref11$textStyle === void 0 ? null : _ref11$textStyle;
|
|
257
269
|
var hasAnswer = isTextFilled(label);
|
|
270
|
+
var isUserAnswer = withoutGoodAnswer && userAnswer;
|
|
271
|
+
var isOtherAnswer = withoutGoodAnswer && !userAnswer;
|
|
272
|
+
var inactiveButtonStyle = isOtherAnswer ? inactiveButtonsStyle : null;
|
|
273
|
+
var inactiveButtonTextStyle = isOtherAnswer ? inactiveButtonsTextStyle : null;
|
|
258
274
|
return /*#__PURE__*/React.createElement(animated.div, {
|
|
259
275
|
key: "answer-".concat(answerI),
|
|
260
|
-
className: classNames([styles$4.item, _defineProperty(_defineProperty(_defineProperty({}, styles$4.rightAnswer, !withoutGoodAnswer && rightAnswer === true), styles$4.userAnswer,
|
|
276
|
+
className: classNames([styles$4.item, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$4.rightAnswer, !withoutGoodAnswer && rightAnswer === true), styles$4.userAnswer, isUserAnswer), styles$4.otherAnswer, isOtherAnswer), styles$4.withoutOpacity, !hasOpacity)]),
|
|
261
277
|
onTransitionEnd: onAnswerTransitionEnd,
|
|
262
278
|
style: _objectSpread({}, style)
|
|
263
279
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -292,8 +308,8 @@ var Answers = function Answers(_ref) {
|
|
|
292
308
|
},
|
|
293
309
|
disabled: !visible || isPreview || answered,
|
|
294
310
|
focusable: focusable,
|
|
295
|
-
buttonStyle: _objectSpread(_objectSpread({}, buttonsStyle), answerButtonStyle),
|
|
296
|
-
textStyle: _objectSpread(_objectSpread({}, buttonsTextStyle), answerButtonTextStyle)
|
|
311
|
+
buttonStyle: _objectSpread(_objectSpread(_objectSpread({}, buttonsStyle), inactiveButtonStyle), answerButtonStyle),
|
|
312
|
+
textStyle: _objectSpread(_objectSpread(_objectSpread({}, buttonsTextStyle), inactiveButtonTextStyle), answerButtonTextStyle)
|
|
297
313
|
}, answered && !withoutIcon && rightAnswer === true ? /*#__PURE__*/React.createElement("span", {
|
|
298
314
|
className: styles$4.resultIcon,
|
|
299
315
|
style: getStyleFromColor(goodAnswerColor, 'backgroundColor')
|
|
@@ -329,7 +345,9 @@ var propTypes$4 = {
|
|
|
329
345
|
totalCount: PropTypes$1.number,
|
|
330
346
|
answeredIndex: PropTypes$1.number,
|
|
331
347
|
buttonsStyle: PropTypes.boxStyle,
|
|
348
|
+
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
332
349
|
buttonsTextStyle: PropTypes.textStyle,
|
|
350
|
+
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
333
351
|
questionsHeadingStyle: PropTypes.textStyle,
|
|
334
352
|
goodAnswerColor: PropTypes.color,
|
|
335
353
|
badAnswerColor: PropTypes.color,
|
|
@@ -359,7 +377,9 @@ var defaultProps$4 = {
|
|
|
359
377
|
totalCount: null,
|
|
360
378
|
answeredIndex: null,
|
|
361
379
|
buttonsStyle: null,
|
|
380
|
+
inactiveButtonsStyle: null,
|
|
362
381
|
buttonsTextStyle: null,
|
|
382
|
+
inactiveButtonsTextStyle: null,
|
|
363
383
|
questionsHeadingStyle: null,
|
|
364
384
|
goodAnswerColor: null,
|
|
365
385
|
badAnswerColor: null,
|
|
@@ -389,7 +409,9 @@ var Question = function Question(_ref) {
|
|
|
389
409
|
totalCount = _ref.totalCount,
|
|
390
410
|
answeredIndex = _ref.answeredIndex,
|
|
391
411
|
buttonsStyle = _ref.buttonsStyle,
|
|
412
|
+
inactiveButtonsStyle = _ref.inactiveButtonsStyle,
|
|
392
413
|
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
414
|
+
inactiveButtonsTextStyle = _ref.inactiveButtonsTextStyle,
|
|
393
415
|
questionsHeadingStyle = _ref.questionsHeadingStyle,
|
|
394
416
|
goodAnswerColor = _ref.goodAnswerColor,
|
|
395
417
|
badAnswerColor = _ref.badAnswerColor,
|
|
@@ -482,7 +504,9 @@ var Question = function Question(_ref) {
|
|
|
482
504
|
withoutIcon: withoutTrueFalse,
|
|
483
505
|
showUserAnswer: withoutTrueFalse,
|
|
484
506
|
buttonsStyle: buttonsStyle,
|
|
507
|
+
inactiveButtonsStyle: inactiveButtonsStyle,
|
|
485
508
|
buttonsTextStyle: buttonsTextStyle,
|
|
509
|
+
inactiveButtonsTextStyle: inactiveButtonsTextStyle,
|
|
486
510
|
focusable: focusable,
|
|
487
511
|
animated: animated,
|
|
488
512
|
transitions: transitions,
|
|
@@ -536,7 +560,9 @@ var propTypes$3 = {
|
|
|
536
560
|
}),
|
|
537
561
|
resultImage: PropTypes.visualElement,
|
|
538
562
|
buttonsStyle: PropTypes.boxStyle,
|
|
563
|
+
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
539
564
|
buttonsTextStyle: PropTypes.textStyle,
|
|
565
|
+
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
540
566
|
goodAnswerColor: PropTypes.color,
|
|
541
567
|
badAnswerColor: PropTypes.color,
|
|
542
568
|
withoutTrueFalse: PropTypes$1.bool,
|
|
@@ -560,7 +586,9 @@ var defaultProps$3 = {
|
|
|
560
586
|
result: null,
|
|
561
587
|
resultImage: null,
|
|
562
588
|
buttonsStyle: null,
|
|
589
|
+
inactiveButtonsStyle: null,
|
|
563
590
|
buttonsTextStyle: null,
|
|
591
|
+
inactiveButtonsTextStyle: null,
|
|
564
592
|
goodAnswerColor: null,
|
|
565
593
|
badAnswerColor: null,
|
|
566
594
|
withoutTrueFalse: false,
|
|
@@ -584,7 +612,9 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
584
612
|
result = _ref.result,
|
|
585
613
|
resultImage = _ref.resultImage,
|
|
586
614
|
buttonsStyle = _ref.buttonsStyle,
|
|
615
|
+
inactiveButtonsStyle = _ref.inactiveButtonsStyle,
|
|
587
616
|
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
617
|
+
inactiveButtonsTextStyle = _ref.inactiveButtonsTextStyle,
|
|
588
618
|
goodAnswerColor = _ref.goodAnswerColor,
|
|
589
619
|
badAnswerColor = _ref.badAnswerColor,
|
|
590
620
|
withoutTrueFalse = _ref.withoutTrueFalse,
|
|
@@ -764,6 +794,8 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
764
794
|
answeredIndex: userAnswerIndex,
|
|
765
795
|
buttonsStyle: buttonsStyle,
|
|
766
796
|
buttonsTextStyle: buttonsTextStyle,
|
|
797
|
+
inactiveButtonsStyle: inactiveButtonsStyle,
|
|
798
|
+
inactiveButtonsTextStyle: inactiveButtonsTextStyle,
|
|
767
799
|
goodAnswerColor: goodAnswerColor,
|
|
768
800
|
badAnswerColor: badAnswerColor,
|
|
769
801
|
withoutTrueFalse: withoutTrueFalse,
|
|
@@ -1023,7 +1055,9 @@ var propTypes = {
|
|
|
1023
1055
|
description: PropTypes.textElement
|
|
1024
1056
|
})),
|
|
1025
1057
|
buttonsStyle: PropTypes.boxStyle,
|
|
1058
|
+
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
1026
1059
|
buttonsTextStyle: PropTypes.textStyle,
|
|
1060
|
+
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
1027
1061
|
questionsHeadingStyle: PropTypes.textStyle,
|
|
1028
1062
|
resultsHeadingStyle: PropTypes.textStyle,
|
|
1029
1063
|
resultsTextStyle: PropTypes.textStyle,
|
|
@@ -1051,7 +1085,9 @@ var defaultProps = {
|
|
|
1051
1085
|
questions: null,
|
|
1052
1086
|
results: null,
|
|
1053
1087
|
buttonsStyle: null,
|
|
1088
|
+
inactiveButtonsStyle: null,
|
|
1054
1089
|
buttonsTextStyle: null,
|
|
1090
|
+
inactiveButtonsTextStyle: null,
|
|
1055
1091
|
questionsHeadingStyle: null,
|
|
1056
1092
|
resultsHeadingStyle: null,
|
|
1057
1093
|
resultsTextStyle: null,
|
|
@@ -1079,7 +1115,9 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
|
|
|
1079
1115
|
questions = _ref.questions,
|
|
1080
1116
|
results = _ref.results,
|
|
1081
1117
|
buttonsStyle = _ref.buttonsStyle,
|
|
1118
|
+
inactiveButtonsStyle = _ref.inactiveButtonsStyle,
|
|
1082
1119
|
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
1120
|
+
inactiveButtonsTextStyle = _ref.inactiveButtonsTextStyle,
|
|
1083
1121
|
questionsHeadingStyle = _ref.questionsHeadingStyle,
|
|
1084
1122
|
resultsHeadingStyle = _ref.resultsHeadingStyle,
|
|
1085
1123
|
resultsTextStyle = _ref.resultsTextStyle,
|
|
@@ -1420,7 +1458,9 @@ var QuizMultipleScreen = function QuizMultipleScreen(_ref) {
|
|
|
1420
1458
|
answers: answers,
|
|
1421
1459
|
answeredIndex: currentAnsweredIndex,
|
|
1422
1460
|
buttonsStyle: buttonsStyle,
|
|
1461
|
+
inactiveButtonsStyle: inactiveButtonsStyle,
|
|
1423
1462
|
buttonsTextStyle: buttonsTextStyle,
|
|
1463
|
+
inactiveButtonsTextStyle: inactiveButtonsTextStyle,
|
|
1424
1464
|
questionsHeadingStyle: questionsHeadingStyle,
|
|
1425
1465
|
goodAnswerColor: goodAnswerColor,
|
|
1426
1466
|
badAnswerColor: badAnswerColor,
|
|
@@ -1613,24 +1653,44 @@ var definition = [{
|
|
|
1613
1653
|
"value": "Buttons"
|
|
1614
1654
|
}]
|
|
1615
1655
|
})
|
|
1656
|
+
}, {
|
|
1657
|
+
name: 'inactiveButtonsTextStyle',
|
|
1658
|
+
type: 'text-style-form',
|
|
1659
|
+
label: defineMessage({
|
|
1660
|
+
id: "my7Kox",
|
|
1661
|
+
defaultMessage: [{
|
|
1662
|
+
"type": 0,
|
|
1663
|
+
"value": "Inactive buttons text"
|
|
1664
|
+
}]
|
|
1665
|
+
})
|
|
1666
|
+
}, {
|
|
1667
|
+
name: 'inactiveButtonsStyle',
|
|
1668
|
+
type: 'box-style-form',
|
|
1669
|
+
label: defineMessage({
|
|
1670
|
+
id: "xlFOg3",
|
|
1671
|
+
defaultMessage: [{
|
|
1672
|
+
"type": 0,
|
|
1673
|
+
"value": "Inactive buttons"
|
|
1674
|
+
}]
|
|
1675
|
+
})
|
|
1616
1676
|
}, {
|
|
1617
1677
|
name: 'goodAnswerColor',
|
|
1618
1678
|
type: 'color',
|
|
1619
1679
|
label: defineMessage({
|
|
1620
|
-
id: "
|
|
1680
|
+
id: "hZcXoa",
|
|
1621
1681
|
defaultMessage: [{
|
|
1622
1682
|
"type": 0,
|
|
1623
|
-
"value": "Good answer color"
|
|
1683
|
+
"value": "Good answer icon color"
|
|
1624
1684
|
}]
|
|
1625
1685
|
})
|
|
1626
1686
|
}, {
|
|
1627
1687
|
name: 'badAnswerColor',
|
|
1628
1688
|
type: 'color',
|
|
1629
1689
|
label: defineMessage({
|
|
1630
|
-
id: "
|
|
1690
|
+
id: "NbTtNk",
|
|
1631
1691
|
defaultMessage: [{
|
|
1632
1692
|
"type": 0,
|
|
1633
|
-
"value": "Bad answer color"
|
|
1693
|
+
"value": "Bad answer icon color"
|
|
1634
1694
|
}]
|
|
1635
1695
|
})
|
|
1636
1696
|
}]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quiz",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.607",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -63,19 +63,19 @@
|
|
|
63
63
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
64
64
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
65
65
|
"@fortawesome/react-fontawesome": "^0.2.0",
|
|
66
|
-
"@micromag/core": "^0.3.
|
|
67
|
-
"@micromag/data": "^0.3.
|
|
68
|
-
"@micromag/element-background": "^0.3.
|
|
69
|
-
"@micromag/element-button": "^0.3.
|
|
70
|
-
"@micromag/element-container": "^0.3.
|
|
71
|
-
"@micromag/element-footer": "^0.3.
|
|
72
|
-
"@micromag/element-header": "^0.3.
|
|
73
|
-
"@micromag/element-heading": "^0.3.
|
|
74
|
-
"@micromag/element-layout": "^0.3.
|
|
75
|
-
"@micromag/element-scroll": "^0.3.
|
|
76
|
-
"@micromag/element-text": "^0.3.
|
|
77
|
-
"@micromag/element-visual": "^0.3.
|
|
78
|
-
"@micromag/transforms": "^0.3.
|
|
66
|
+
"@micromag/core": "^0.3.607",
|
|
67
|
+
"@micromag/data": "^0.3.607",
|
|
68
|
+
"@micromag/element-background": "^0.3.607",
|
|
69
|
+
"@micromag/element-button": "^0.3.607",
|
|
70
|
+
"@micromag/element-container": "^0.3.607",
|
|
71
|
+
"@micromag/element-footer": "^0.3.607",
|
|
72
|
+
"@micromag/element-header": "^0.3.607",
|
|
73
|
+
"@micromag/element-heading": "^0.3.607",
|
|
74
|
+
"@micromag/element-layout": "^0.3.607",
|
|
75
|
+
"@micromag/element-scroll": "^0.3.607",
|
|
76
|
+
"@micromag/element-text": "^0.3.607",
|
|
77
|
+
"@micromag/element-visual": "^0.3.607",
|
|
78
|
+
"@micromag/transforms": "^0.3.607",
|
|
79
79
|
"@react-spring/core": "^9.6.1",
|
|
80
80
|
"@react-spring/web": "^9.6.1",
|
|
81
81
|
"classnames": "^2.2.6",
|
|
@@ -89,5 +89,5 @@
|
|
|
89
89
|
"access": "public",
|
|
90
90
|
"registry": "https://registry.npmjs.org/"
|
|
91
91
|
},
|
|
92
|
-
"gitHead": "
|
|
92
|
+
"gitHead": "635ee4c6bf057273a9c90bde7c80134ad92ebb9c"
|
|
93
93
|
}
|