@micromag/screen-quiz 0.3.622 → 0.3.628
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/index.js +178 -136
- package/package.json +15 -15
package/es/index.js
CHANGED
|
@@ -4,9 +4,9 @@ import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
|
4
4
|
import { faRedo } from '@fortawesome/free-solid-svg-icons/faRedo';
|
|
5
5
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
6
6
|
import classNames from 'classnames';
|
|
7
|
-
import PropTypes
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
8
|
import React, { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
|
9
|
-
import { PropTypes } from '@micromag/core';
|
|
9
|
+
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
10
10
|
import { ScreenElement, Transitions, Button as Button$1 } from '@micromag/core/components';
|
|
11
11
|
import { useScreenRenderContext, useScreenSize, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef, useScreenState } from '@micromag/core/contexts';
|
|
12
12
|
import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
|
|
@@ -32,26 +32,26 @@ import { TransitionGroup, CSSTransition } from 'react-transition-group';
|
|
|
32
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
|
-
items: PropTypes.quizAnswers.isRequired,
|
|
36
|
-
answeredIndex: PropTypes
|
|
37
|
-
answersCollapseDelay: PropTypes
|
|
38
|
-
buttonsStyle: PropTypes.boxStyle,
|
|
39
|
-
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
40
|
-
buttonsTextStyle: PropTypes.textStyle,
|
|
41
|
-
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
42
|
-
goodAnswerColor: PropTypes.color,
|
|
43
|
-
badAnswerColor: PropTypes.color,
|
|
44
|
-
showUserAnswer: PropTypes
|
|
45
|
-
withoutGoodAnswer: PropTypes
|
|
46
|
-
withoutIcon: PropTypes
|
|
47
|
-
focusable: PropTypes
|
|
48
|
-
animated: PropTypes
|
|
49
|
-
collapsed: PropTypes
|
|
50
|
-
onClick: PropTypes
|
|
51
|
-
onCollapse: PropTypes
|
|
52
|
-
onCollapsed: PropTypes
|
|
53
|
-
onTransitionEnd: PropTypes
|
|
54
|
-
className: PropTypes
|
|
35
|
+
items: PropTypes$1.quizAnswers.isRequired,
|
|
36
|
+
answeredIndex: PropTypes.number,
|
|
37
|
+
answersCollapseDelay: PropTypes.number,
|
|
38
|
+
buttonsStyle: PropTypes$1.boxStyle,
|
|
39
|
+
inactiveButtonsStyle: PropTypes$1.boxStyle,
|
|
40
|
+
buttonsTextStyle: PropTypes$1.textStyle,
|
|
41
|
+
inactiveButtonsTextStyle: PropTypes$1.textStyle,
|
|
42
|
+
goodAnswerColor: PropTypes$1.color,
|
|
43
|
+
badAnswerColor: PropTypes$1.color,
|
|
44
|
+
showUserAnswer: PropTypes.bool,
|
|
45
|
+
withoutGoodAnswer: PropTypes.bool,
|
|
46
|
+
withoutIcon: PropTypes.bool,
|
|
47
|
+
focusable: PropTypes.bool,
|
|
48
|
+
animated: PropTypes.bool,
|
|
49
|
+
collapsed: PropTypes.bool,
|
|
50
|
+
onClick: PropTypes.func,
|
|
51
|
+
onCollapse: PropTypes.func,
|
|
52
|
+
onCollapsed: PropTypes.func,
|
|
53
|
+
onTransitionEnd: PropTypes.func,
|
|
54
|
+
className: PropTypes.string
|
|
55
55
|
};
|
|
56
56
|
var defaultProps$5 = {
|
|
57
57
|
answeredIndex: null,
|
|
@@ -335,39 +335,40 @@ Answers.defaultProps = defaultProps$5;
|
|
|
335
335
|
var styles$3 = {"container":"micromag-screen-quiz-question-container","emptyQuestion":"micromag-screen-quiz-question-emptyQuestion","emptyResult":"micromag-screen-quiz-question-emptyResult","question":"micromag-screen-quiz-question-question","index":"micromag-screen-quiz-question-index","result":"micromag-screen-quiz-question-result","resultContent":"micromag-screen-quiz-question-resultContent","resultVisible":"micromag-screen-quiz-question-resultVisible","isPlaceholder":"micromag-screen-quiz-question-isPlaceholder"};
|
|
336
336
|
|
|
337
337
|
var propTypes$4 = {
|
|
338
|
-
question: PropTypes.textElement,
|
|
339
|
-
answers: PropTypes.quizAnswers,
|
|
340
|
-
result: PropTypes
|
|
341
|
-
image: PropTypes.imageElement,
|
|
342
|
-
text: PropTypes.textElement
|
|
338
|
+
question: PropTypes$1.textElement,
|
|
339
|
+
answers: PropTypes$1.quizAnswers,
|
|
340
|
+
result: PropTypes.shape({
|
|
341
|
+
image: PropTypes$1.imageElement,
|
|
342
|
+
text: PropTypes$1.textElement
|
|
343
343
|
}),
|
|
344
|
-
resultImage: PropTypes.visualElement,
|
|
345
|
-
index: PropTypes
|
|
346
|
-
totalCount: PropTypes
|
|
347
|
-
answeredIndex: PropTypes
|
|
348
|
-
buttonsStyle: PropTypes.boxStyle,
|
|
349
|
-
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
350
|
-
buttonsTextStyle: PropTypes.textStyle,
|
|
351
|
-
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
352
|
-
questionsHeadingStyle: PropTypes.textStyle,
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
344
|
+
resultImage: PropTypes$1.visualElement,
|
|
345
|
+
index: PropTypes.number,
|
|
346
|
+
totalCount: PropTypes.number,
|
|
347
|
+
answeredIndex: PropTypes.number,
|
|
348
|
+
buttonsStyle: PropTypes$1.boxStyle,
|
|
349
|
+
inactiveButtonsStyle: PropTypes$1.boxStyle,
|
|
350
|
+
buttonsTextStyle: PropTypes$1.textStyle,
|
|
351
|
+
inactiveButtonsTextStyle: PropTypes$1.textStyle,
|
|
352
|
+
questionsHeadingStyle: PropTypes$1.textStyle,
|
|
353
|
+
feedbackTextStyle: PropTypes$1.textStyle,
|
|
354
|
+
goodAnswerColor: PropTypes$1.color,
|
|
355
|
+
badAnswerColor: PropTypes$1.color,
|
|
356
|
+
focusable: PropTypes.bool,
|
|
357
|
+
animated: PropTypes.bool,
|
|
358
|
+
layout: PropTypes.string,
|
|
359
|
+
showInstantAnswer: PropTypes.bool,
|
|
360
|
+
withResult: PropTypes.bool,
|
|
361
|
+
withoutGoodAnswer: PropTypes.bool,
|
|
362
|
+
withoutTrueFalse: PropTypes.bool,
|
|
363
|
+
withoutIndex: PropTypes.bool,
|
|
364
|
+
transitions: PropTypes$1.transitions,
|
|
365
|
+
transitionPlaying: PropTypes.bool,
|
|
366
|
+
transitionStagger: PropTypes.number,
|
|
367
|
+
transitionDisabled: PropTypes.bool,
|
|
368
|
+
onAnswerClick: PropTypes.func,
|
|
369
|
+
onAnswerTransitionEnd: PropTypes.func,
|
|
370
|
+
className: PropTypes.string,
|
|
371
|
+
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
371
372
|
};
|
|
372
373
|
var defaultProps$4 = {
|
|
373
374
|
question: null,
|
|
@@ -382,6 +383,7 @@ var defaultProps$4 = {
|
|
|
382
383
|
buttonsTextStyle: null,
|
|
383
384
|
inactiveButtonsTextStyle: null,
|
|
384
385
|
questionsHeadingStyle: null,
|
|
386
|
+
feedbackTextStyle: null,
|
|
385
387
|
goodAnswerColor: null,
|
|
386
388
|
badAnswerColor: null,
|
|
387
389
|
focusable: false,
|
|
@@ -414,6 +416,7 @@ var Question = function Question(_ref) {
|
|
|
414
416
|
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
415
417
|
inactiveButtonsTextStyle = _ref.inactiveButtonsTextStyle,
|
|
416
418
|
questionsHeadingStyle = _ref.questionsHeadingStyle,
|
|
419
|
+
feedbackTextStyle = _ref.feedbackTextStyle,
|
|
417
420
|
goodAnswerColor = _ref.goodAnswerColor,
|
|
418
421
|
badAnswerColor = _ref.badAnswerColor,
|
|
419
422
|
focusable = _ref.focusable,
|
|
@@ -455,6 +458,10 @@ var Question = function Question(_ref) {
|
|
|
455
458
|
var hasResultVisual = isImageFilled(answerImage) || isImageFilled(resultImage);
|
|
456
459
|
var defaultResult = isTextFilled(result) ? result : null;
|
|
457
460
|
var customResult = isTextFilled(customAnswerLabel) ? customAnswerLabel : null;
|
|
461
|
+
var finalResult = customResult || defaultResult;
|
|
462
|
+
var _ref4 = finalResult || {},
|
|
463
|
+
_ref4$textStyle = _ref4.textStyle,
|
|
464
|
+
resultTextStyle = _ref4$textStyle === undefined ? null : _ref4$textStyle;
|
|
458
465
|
var onAnswersCollapse = useCallback(function () {
|
|
459
466
|
setResultVisible(true);
|
|
460
467
|
}, [setResultVisible]);
|
|
@@ -537,8 +544,9 @@ var Question = function Question(_ref) {
|
|
|
537
544
|
playing: transitionPlaying,
|
|
538
545
|
delay: (1 + answers.length) * transitionStagger,
|
|
539
546
|
disabled: transitionDisabled
|
|
540
|
-
}, hasResult ? /*#__PURE__*/React.createElement(Text, Object.assign({},
|
|
541
|
-
className: styles$3.resultText
|
|
547
|
+
}, hasResult ? /*#__PURE__*/React.createElement(Text, Object.assign({}, finalResult || {}, {
|
|
548
|
+
className: styles$3.resultText,
|
|
549
|
+
textStyle: _objectSpread(_objectSpread({}, feedbackTextStyle || null), resultTextStyle || null)
|
|
542
550
|
})) : null, hasResultVisual ? /*#__PURE__*/React.createElement(Visual, {
|
|
543
551
|
media: answerImage || resultImage,
|
|
544
552
|
width: "100%",
|
|
@@ -551,33 +559,34 @@ Question.defaultProps = defaultProps$4;
|
|
|
551
559
|
var styles$2 = {"container":"micromag-screen-quiz-container","background":"micromag-screen-quiz-background","disabled":"micromag-screen-quiz-disabled","hidden":"micromag-screen-quiz-hidden","placeholder":"micromag-screen-quiz-placeholder","content":"micromag-screen-quiz-content","reset":"micromag-screen-quiz-reset","points":"micromag-screen-quiz-points","layout":"micromag-screen-quiz-layout","header":"micromag-screen-quiz-header","footer":"micromag-screen-quiz-footer","transition":"micromag-screen-quiz-transition","question":"micromag-screen-quiz-question","results":"micromag-screen-quiz-results","intro":"micromag-screen-quiz-intro","enter":"micromag-screen-quiz-enter","left":"micromag-screen-quiz-left","enterActive":"micromag-screen-quiz-enterActive","exit":"micromag-screen-quiz-exit","exitActive":"micromag-screen-quiz-exitActive"};
|
|
552
560
|
|
|
553
561
|
var propTypes$3 = {
|
|
554
|
-
id: PropTypes
|
|
555
|
-
layout: PropTypes
|
|
556
|
-
question: PropTypes.textElement,
|
|
557
|
-
answers: PropTypes.quizAnswers,
|
|
558
|
-
result: PropTypes
|
|
559
|
-
image: PropTypes.imageElement,
|
|
560
|
-
text: PropTypes.textElement
|
|
562
|
+
id: PropTypes.string,
|
|
563
|
+
layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
|
|
564
|
+
question: PropTypes$1.textElement,
|
|
565
|
+
answers: PropTypes$1.quizAnswers,
|
|
566
|
+
result: PropTypes.shape({
|
|
567
|
+
image: PropTypes$1.imageElement,
|
|
568
|
+
text: PropTypes$1.textElement
|
|
561
569
|
}),
|
|
562
|
-
resultImage: PropTypes.visualElement,
|
|
563
|
-
buttonsStyle: PropTypes.boxStyle,
|
|
564
|
-
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
565
|
-
buttonsTextStyle: PropTypes.textStyle,
|
|
566
|
-
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
570
|
+
resultImage: PropTypes$1.visualElement,
|
|
571
|
+
buttonsStyle: PropTypes$1.boxStyle,
|
|
572
|
+
inactiveButtonsStyle: PropTypes$1.boxStyle,
|
|
573
|
+
buttonsTextStyle: PropTypes$1.textStyle,
|
|
574
|
+
inactiveButtonsTextStyle: PropTypes$1.textStyle,
|
|
575
|
+
feedbackTextStyle: PropTypes$1.textStyle,
|
|
576
|
+
goodAnswerColor: PropTypes$1.color,
|
|
577
|
+
badAnswerColor: PropTypes$1.color,
|
|
578
|
+
withoutTrueFalse: PropTypes.bool,
|
|
579
|
+
spacing: PropTypes.number,
|
|
580
|
+
background: PropTypes$1.backgroundElement,
|
|
581
|
+
header: PropTypes$1.header,
|
|
582
|
+
footer: PropTypes$1.footer,
|
|
583
|
+
current: PropTypes.bool,
|
|
584
|
+
preload: PropTypes.bool,
|
|
585
|
+
ready: PropTypes.bool,
|
|
586
|
+
transitions: PropTypes$1.transitions,
|
|
587
|
+
transitionStagger: PropTypes.number,
|
|
588
|
+
type: PropTypes.string,
|
|
589
|
+
className: PropTypes.string
|
|
581
590
|
};
|
|
582
591
|
var defaultProps$3 = {
|
|
583
592
|
id: null,
|
|
@@ -590,6 +599,7 @@ var defaultProps$3 = {
|
|
|
590
599
|
inactiveButtonsStyle: null,
|
|
591
600
|
buttonsTextStyle: null,
|
|
592
601
|
inactiveButtonsTextStyle: null,
|
|
602
|
+
feedbackTextStyle: null,
|
|
593
603
|
goodAnswerColor: null,
|
|
594
604
|
badAnswerColor: null,
|
|
595
605
|
withoutTrueFalse: false,
|
|
@@ -616,6 +626,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
616
626
|
inactiveButtonsStyle = _ref.inactiveButtonsStyle,
|
|
617
627
|
buttonsTextStyle = _ref.buttonsTextStyle,
|
|
618
628
|
inactiveButtonsTextStyle = _ref.inactiveButtonsTextStyle,
|
|
629
|
+
feedbackTextStyle = _ref.feedbackTextStyle,
|
|
619
630
|
goodAnswerColor = _ref.goodAnswerColor,
|
|
620
631
|
badAnswerColor = _ref.badAnswerColor,
|
|
621
632
|
withoutTrueFalse = _ref.withoutTrueFalse,
|
|
@@ -797,6 +808,7 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
797
808
|
buttonsTextStyle: buttonsTextStyle,
|
|
798
809
|
inactiveButtonsStyle: inactiveButtonsStyle,
|
|
799
810
|
inactiveButtonsTextStyle: inactiveButtonsTextStyle,
|
|
811
|
+
feedbackTextStyle: feedbackTextStyle,
|
|
800
812
|
goodAnswerColor: goodAnswerColor,
|
|
801
813
|
badAnswerColor: badAnswerColor,
|
|
802
814
|
withoutTrueFalse: withoutTrueFalse,
|
|
@@ -843,20 +855,20 @@ var QuizScreen = function QuizScreen(_ref) {
|
|
|
843
855
|
QuizScreen.propTypes = propTypes$3;
|
|
844
856
|
QuizScreen.defaultProps = defaultProps$3;
|
|
845
857
|
|
|
846
|
-
var styles$1 = {"container":"micromag-screen-quiz-results-container","emptyTitle":"micromag-screen-quiz-results-emptyTitle","emptyDescription":"micromag-screen-quiz-results-emptyDescription","title":"micromag-screen-quiz-results-title"
|
|
858
|
+
var styles$1 = {"container":"micromag-screen-quiz-results-container","emptyTitle":"micromag-screen-quiz-results-emptyTitle","emptyDescription":"micromag-screen-quiz-results-emptyDescription","title":"micromag-screen-quiz-results-title"};
|
|
847
859
|
|
|
848
860
|
var propTypes$2 = {
|
|
849
|
-
title: PropTypes.textElement,
|
|
850
|
-
description: PropTypes.textElement,
|
|
851
|
-
resultsHeadingStyle: PropTypes.textStyle,
|
|
852
|
-
resultsTextStyle: PropTypes.textStyle,
|
|
853
|
-
layout: PropTypes
|
|
854
|
-
transitions: PropTypes.transitions,
|
|
855
|
-
transitionPlaying: PropTypes
|
|
856
|
-
transitionStagger: PropTypes
|
|
857
|
-
transitionDisabled: PropTypes
|
|
858
|
-
className: PropTypes
|
|
859
|
-
style: PropTypes
|
|
861
|
+
title: PropTypes$1.textElement,
|
|
862
|
+
description: PropTypes$1.textElement,
|
|
863
|
+
resultsHeadingStyle: PropTypes$1.textStyle,
|
|
864
|
+
resultsTextStyle: PropTypes$1.textStyle,
|
|
865
|
+
layout: PropTypes.string,
|
|
866
|
+
transitions: PropTypes$1.transitions,
|
|
867
|
+
transitionPlaying: PropTypes.bool,
|
|
868
|
+
transitionStagger: PropTypes.number,
|
|
869
|
+
transitionDisabled: PropTypes.bool,
|
|
870
|
+
className: PropTypes.string,
|
|
871
|
+
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number]))
|
|
860
872
|
};
|
|
861
873
|
var defaultProps$2 = {
|
|
862
874
|
title: null,
|
|
@@ -944,18 +956,18 @@ var Results = function Results(_ref) {
|
|
|
944
956
|
Results.propTypes = propTypes$2;
|
|
945
957
|
Results.defaultProps = defaultProps$2;
|
|
946
958
|
|
|
947
|
-
var styles = {"container":"micromag-screen-quiz-title-container","emptyTitle":"micromag-screen-quiz-title-emptyTitle","emptyDescription":"micromag-screen-quiz-title-emptyDescription","title":"micromag-screen-quiz-title-title","description":"micromag-screen-quiz-title-description"
|
|
959
|
+
var styles = {"container":"micromag-screen-quiz-title-container","emptyTitle":"micromag-screen-quiz-title-emptyTitle","emptyDescription":"micromag-screen-quiz-title-emptyDescription","title":"micromag-screen-quiz-title-title","description":"micromag-screen-quiz-title-description"};
|
|
948
960
|
|
|
949
961
|
var propTypes$1 = {
|
|
950
|
-
title: PropTypes.textElement,
|
|
951
|
-
description: PropTypes.textElement,
|
|
952
|
-
button: PropTypes.textElement,
|
|
953
|
-
layout: PropTypes
|
|
954
|
-
focusable: PropTypes
|
|
955
|
-
buttonDisabled: PropTypes
|
|
956
|
-
className: PropTypes
|
|
957
|
-
style: PropTypes
|
|
958
|
-
onClickButton: PropTypes
|
|
962
|
+
title: PropTypes$1.textElement,
|
|
963
|
+
description: PropTypes$1.textElement,
|
|
964
|
+
button: PropTypes$1.textElement,
|
|
965
|
+
layout: PropTypes.string,
|
|
966
|
+
focusable: PropTypes.bool,
|
|
967
|
+
buttonDisabled: PropTypes.bool,
|
|
968
|
+
className: PropTypes.string,
|
|
969
|
+
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
970
|
+
onClickButton: PropTypes.func
|
|
959
971
|
};
|
|
960
972
|
var defaultProps$1 = {
|
|
961
973
|
title: null,
|
|
@@ -1042,40 +1054,40 @@ Title.propTypes = propTypes$1;
|
|
|
1042
1054
|
Title.defaultProps = defaultProps$1;
|
|
1043
1055
|
|
|
1044
1056
|
var propTypes = {
|
|
1045
|
-
id: PropTypes
|
|
1046
|
-
layout: PropTypes
|
|
1047
|
-
introLayout: PropTypes
|
|
1048
|
-
title: PropTypes.textElement,
|
|
1049
|
-
description: PropTypes.textElement,
|
|
1050
|
-
questions: PropTypes
|
|
1051
|
-
text: PropTypes.textElement,
|
|
1052
|
-
answers: PropTypes.quizAnswers
|
|
1057
|
+
id: PropTypes.string,
|
|
1058
|
+
layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
|
|
1059
|
+
introLayout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
|
|
1060
|
+
title: PropTypes$1.textElement,
|
|
1061
|
+
description: PropTypes$1.textElement,
|
|
1062
|
+
questions: PropTypes.arrayOf(PropTypes.shape({
|
|
1063
|
+
text: PropTypes$1.textElement,
|
|
1064
|
+
answers: PropTypes$1.quizAnswers
|
|
1053
1065
|
})),
|
|
1054
|
-
results: PropTypes
|
|
1055
|
-
title: PropTypes.textElement,
|
|
1056
|
-
description: PropTypes.textElement
|
|
1066
|
+
results: PropTypes.arrayOf(PropTypes.shape({
|
|
1067
|
+
title: PropTypes$1.textElement,
|
|
1068
|
+
description: PropTypes$1.textElement
|
|
1057
1069
|
})),
|
|
1058
|
-
buttonsStyle: PropTypes.boxStyle,
|
|
1059
|
-
inactiveButtonsStyle: PropTypes.boxStyle,
|
|
1060
|
-
buttonsTextStyle: PropTypes.textStyle,
|
|
1061
|
-
inactiveButtonsTextStyle: PropTypes.textStyle,
|
|
1062
|
-
questionsHeadingStyle: PropTypes.textStyle,
|
|
1063
|
-
resultsHeadingStyle: PropTypes.textStyle,
|
|
1064
|
-
resultsTextStyle: PropTypes.textStyle,
|
|
1065
|
-
goodAnswerColor: PropTypes.color,
|
|
1066
|
-
badAnswerColor: PropTypes.color,
|
|
1067
|
-
spacing: PropTypes
|
|
1068
|
-
background: PropTypes.backgroundElement,
|
|
1069
|
-
introButton: PropTypes.textElement,
|
|
1070
|
-
introBackground: PropTypes.backgroundElement,
|
|
1071
|
-
header: PropTypes.header,
|
|
1072
|
-
footer: PropTypes.footer,
|
|
1073
|
-
current: PropTypes
|
|
1074
|
-
active: PropTypes
|
|
1075
|
-
transitions: PropTypes.transitions,
|
|
1076
|
-
transitionStagger: PropTypes
|
|
1077
|
-
type: PropTypes
|
|
1078
|
-
className: PropTypes
|
|
1070
|
+
buttonsStyle: PropTypes$1.boxStyle,
|
|
1071
|
+
inactiveButtonsStyle: PropTypes$1.boxStyle,
|
|
1072
|
+
buttonsTextStyle: PropTypes$1.textStyle,
|
|
1073
|
+
inactiveButtonsTextStyle: PropTypes$1.textStyle,
|
|
1074
|
+
questionsHeadingStyle: PropTypes$1.textStyle,
|
|
1075
|
+
resultsHeadingStyle: PropTypes$1.textStyle,
|
|
1076
|
+
resultsTextStyle: PropTypes$1.textStyle,
|
|
1077
|
+
goodAnswerColor: PropTypes$1.color,
|
|
1078
|
+
badAnswerColor: PropTypes$1.color,
|
|
1079
|
+
spacing: PropTypes.number,
|
|
1080
|
+
background: PropTypes$1.backgroundElement,
|
|
1081
|
+
introButton: PropTypes$1.textElement,
|
|
1082
|
+
introBackground: PropTypes$1.backgroundElement,
|
|
1083
|
+
header: PropTypes$1.header,
|
|
1084
|
+
footer: PropTypes$1.footer,
|
|
1085
|
+
current: PropTypes.bool,
|
|
1086
|
+
active: PropTypes.bool,
|
|
1087
|
+
transitions: PropTypes$1.transitions,
|
|
1088
|
+
transitionStagger: PropTypes.number,
|
|
1089
|
+
type: PropTypes.string,
|
|
1090
|
+
className: PropTypes.string
|
|
1079
1091
|
};
|
|
1080
1092
|
var defaultProps = {
|
|
1081
1093
|
id: null,
|
|
@@ -1674,6 +1686,16 @@ var definition = [{
|
|
|
1674
1686
|
"value": "Inactive buttons"
|
|
1675
1687
|
}]
|
|
1676
1688
|
})
|
|
1689
|
+
}, {
|
|
1690
|
+
name: 'feedbackTextStyle',
|
|
1691
|
+
type: 'text-style-form',
|
|
1692
|
+
label: defineMessage({
|
|
1693
|
+
id: "4w7K2K",
|
|
1694
|
+
defaultMessage: [{
|
|
1695
|
+
"type": 0,
|
|
1696
|
+
"value": "Feedback text"
|
|
1697
|
+
}]
|
|
1698
|
+
})
|
|
1677
1699
|
}, {
|
|
1678
1700
|
name: 'goodAnswerColor',
|
|
1679
1701
|
type: 'color',
|
|
@@ -2004,6 +2026,26 @@ var definition = [{
|
|
|
2004
2026
|
"value": "Buttons text"
|
|
2005
2027
|
}]
|
|
2006
2028
|
})
|
|
2029
|
+
}, {
|
|
2030
|
+
name: 'inactiveButtonsTextStyle',
|
|
2031
|
+
type: 'text-style-form',
|
|
2032
|
+
label: defineMessage({
|
|
2033
|
+
id: "my7Kox",
|
|
2034
|
+
defaultMessage: [{
|
|
2035
|
+
"type": 0,
|
|
2036
|
+
"value": "Inactive buttons text"
|
|
2037
|
+
}]
|
|
2038
|
+
})
|
|
2039
|
+
}, {
|
|
2040
|
+
name: 'inactiveButtonsStyle',
|
|
2041
|
+
type: 'box-style-form',
|
|
2042
|
+
label: defineMessage({
|
|
2043
|
+
id: "xlFOg3",
|
|
2044
|
+
defaultMessage: [{
|
|
2045
|
+
"type": 0,
|
|
2046
|
+
"value": "Inactive buttons"
|
|
2047
|
+
}]
|
|
2048
|
+
})
|
|
2007
2049
|
}, {
|
|
2008
2050
|
name: 'questionsHeadingStyle',
|
|
2009
2051
|
type: 'text-style-form',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quiz",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.628",
|
|
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.628",
|
|
67
|
+
"@micromag/data": "^0.3.628",
|
|
68
|
+
"@micromag/element-background": "^0.3.628",
|
|
69
|
+
"@micromag/element-button": "^0.3.628",
|
|
70
|
+
"@micromag/element-container": "^0.3.628",
|
|
71
|
+
"@micromag/element-footer": "^0.3.628",
|
|
72
|
+
"@micromag/element-header": "^0.3.628",
|
|
73
|
+
"@micromag/element-heading": "^0.3.628",
|
|
74
|
+
"@micromag/element-layout": "^0.3.628",
|
|
75
|
+
"@micromag/element-scroll": "^0.3.628",
|
|
76
|
+
"@micromag/element-text": "^0.3.628",
|
|
77
|
+
"@micromag/element-visual": "^0.3.628",
|
|
78
|
+
"@micromag/transforms": "^0.3.628",
|
|
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": "6f1230244a2966c16e85b7d44583276421a38cca"
|
|
93
93
|
}
|