@micromag/screen-survey 0.2.412 → 0.3.3
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 +5 -5
- package/lib/index.js +4 -4
- package/package.json +12 -12
package/es/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
|
7
7
|
import { ScreenElement, Transitions } from '@micromag/core/components';
|
|
8
8
|
import { useScreenSize, useViewer, useScreenRenderContext } from '@micromag/core/contexts';
|
|
9
9
|
import { useTrackScreenEvent } from '@micromag/core/hooks';
|
|
10
|
-
import { isTextFilled, getLargestRemainderRound,
|
|
10
|
+
import { isTextFilled, getLargestRemainderRound, getStyleFromBox, getStyleFromColor } from '@micromag/core/utils';
|
|
11
11
|
import { useQuizCreate, useQuiz } from '@micromag/data';
|
|
12
12
|
import Background from '@micromag/element-background';
|
|
13
13
|
import Button from '@micromag/element-button';
|
|
@@ -27,7 +27,7 @@ var propTypes = {
|
|
|
27
27
|
layout: PropTypes.oneOf(['top', 'middle', 'bottom', 'split']),
|
|
28
28
|
question: PropTypes$1.textElement,
|
|
29
29
|
answers: PropTypes$1.answers,
|
|
30
|
-
buttonsStyle: PropTypes$1.
|
|
30
|
+
buttonsStyle: PropTypes$1.boxStyle,
|
|
31
31
|
resultsStyle: PropTypes.shape({
|
|
32
32
|
barColor: PropTypes$1.color,
|
|
33
33
|
textColor: PropTypes$1.color
|
|
@@ -346,7 +346,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
346
346
|
},
|
|
347
347
|
disabled: isPreview,
|
|
348
348
|
focusable: current && isView,
|
|
349
|
-
buttonStyle: !answered ? _objectSpread(_objectSpread({},
|
|
349
|
+
buttonStyle: !answered ? _objectSpread(_objectSpread({}, getStyleFromBox(buttonsStyle)), getStyleFromBox(answerButtonStyle)) : null
|
|
350
350
|
}, /*#__PURE__*/React.createElement("span", {
|
|
351
351
|
className: styles.itemLabel,
|
|
352
352
|
ref: function ref(el) {
|
|
@@ -430,7 +430,7 @@ var definition = {
|
|
|
430
430
|
type: 'screen',
|
|
431
431
|
group: {
|
|
432
432
|
label: defineMessage({
|
|
433
|
-
id: "
|
|
433
|
+
id: "ZiWlL6",
|
|
434
434
|
defaultMessage: [{
|
|
435
435
|
"type": 0,
|
|
436
436
|
"value": "Questions"
|
|
@@ -514,7 +514,7 @@ var definition = {
|
|
|
514
514
|
}]
|
|
515
515
|
}),
|
|
516
516
|
field: {
|
|
517
|
-
type: '
|
|
517
|
+
type: 'box-style'
|
|
518
518
|
}
|
|
519
519
|
}, {
|
|
520
520
|
name: 'resultsStyle',
|
package/lib/index.js
CHANGED
|
@@ -48,7 +48,7 @@ var propTypes = {
|
|
|
48
48
|
layout: PropTypes__default["default"].oneOf(['top', 'middle', 'bottom', 'split']),
|
|
49
49
|
question: core.PropTypes.textElement,
|
|
50
50
|
answers: core.PropTypes.answers,
|
|
51
|
-
buttonsStyle: core.PropTypes.
|
|
51
|
+
buttonsStyle: core.PropTypes.boxStyle,
|
|
52
52
|
resultsStyle: PropTypes__default["default"].shape({
|
|
53
53
|
barColor: core.PropTypes.color,
|
|
54
54
|
textColor: core.PropTypes.color
|
|
@@ -367,7 +367,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
367
367
|
},
|
|
368
368
|
disabled: isPreview,
|
|
369
369
|
focusable: current && isView,
|
|
370
|
-
buttonStyle: !answered ? _objectSpread__default["default"](_objectSpread__default["default"]({}, utils.
|
|
370
|
+
buttonStyle: !answered ? _objectSpread__default["default"](_objectSpread__default["default"]({}, utils.getStyleFromBox(buttonsStyle)), utils.getStyleFromBox(answerButtonStyle)) : null
|
|
371
371
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
372
372
|
className: styles.itemLabel,
|
|
373
373
|
ref: function ref(el) {
|
|
@@ -451,7 +451,7 @@ var definition = {
|
|
|
451
451
|
type: 'screen',
|
|
452
452
|
group: {
|
|
453
453
|
label: reactIntl.defineMessage({
|
|
454
|
-
id: "
|
|
454
|
+
id: "ZiWlL6",
|
|
455
455
|
defaultMessage: [{
|
|
456
456
|
"type": 0,
|
|
457
457
|
"value": "Questions"
|
|
@@ -535,7 +535,7 @@ var definition = {
|
|
|
535
535
|
}]
|
|
536
536
|
}),
|
|
537
537
|
field: {
|
|
538
|
-
type: '
|
|
538
|
+
type: 'box-style'
|
|
539
539
|
}
|
|
540
540
|
}, {
|
|
541
541
|
name: 'resultsStyle',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-survey",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,16 +49,16 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.
|
|
53
|
-
"@micromag/data": "^0.
|
|
54
|
-
"@micromag/element-background": "^0.
|
|
55
|
-
"@micromag/element-button": "^0.
|
|
56
|
-
"@micromag/element-call-to-action": "^0.
|
|
57
|
-
"@micromag/element-container": "^0.
|
|
58
|
-
"@micromag/element-heading": "^0.
|
|
59
|
-
"@micromag/element-layout": "^0.
|
|
60
|
-
"@micromag/element-text": "^0.
|
|
61
|
-
"@micromag/transforms": "^0.
|
|
52
|
+
"@micromag/core": "^0.3.3",
|
|
53
|
+
"@micromag/data": "^0.3.3",
|
|
54
|
+
"@micromag/element-background": "^0.3.3",
|
|
55
|
+
"@micromag/element-button": "^0.3.3",
|
|
56
|
+
"@micromag/element-call-to-action": "^0.3.3",
|
|
57
|
+
"@micromag/element-container": "^0.3.3",
|
|
58
|
+
"@micromag/element-heading": "^0.3.3",
|
|
59
|
+
"@micromag/element-layout": "^0.3.3",
|
|
60
|
+
"@micromag/element-text": "^0.3.3",
|
|
61
|
+
"@micromag/transforms": "^0.3.3",
|
|
62
62
|
"classnames": "^2.2.6",
|
|
63
63
|
"lodash": "^4.17.21",
|
|
64
64
|
"prop-types": "^15.7.2",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "ef24df84658db4b5b6e63dc426e8299e5534d785"
|
|
72
72
|
}
|