@micromag/screen-survey 0.3.51 → 0.3.52
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 +17 -3
- package/lib/index.js +17 -3
- package/package.json +3 -3
package/assets/css/styles.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.micromag-screen-survey-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-survey-disabled.micromag-screen-survey-container{overflow:hidden;pointer-events:none}.micromag-screen-survey-hidden.micromag-screen-survey-container{display:none;visibility:hidden}.micromag-screen-survey-placeholder.micromag-screen-survey-container .micromag-screen-survey-content{position:relative;padding:6px}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-survey-container .micromag-screen-survey-question{margin-bottom:20px}.micromag-screen-survey-container .micromag-screen-survey-answers,.micromag-screen-survey-container .micromag-screen-survey-items{position:relative}.micromag-screen-survey-container .micromag-screen-survey-item{padding:5px 0}.micromag-screen-survey-container .micromag-screen-survey-item:first-child .micromag-screen-survey-placeholderAnswer{width:80%}.micromag-screen-survey-container .micromag-screen-survey-item:last-child .micromag-screen-survey-placeholderAnswer{width:90%}.micromag-screen-survey-container .micromag-screen-survey-itemContent{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.micromag-screen-survey-container .micromag-screen-survey-resultContainer{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:15px 0;-webkit-transition-property:padding;-o-transition-property:padding;transition-property:padding;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.micromag-screen-survey-container .micromag-screen-survey-resultContent{width:0;height:1em;-webkit-transition-property:width opacity;-o-transition-property:width opacity;transition-property:width opacity;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;opacity:0}.micromag-screen-survey-container .micromag-screen-survey-result{position:relative;height:100%;background-color:#fff}.micromag-screen-survey-container .micromag-screen-survey-resultLabel{position:absolute;top:50%;left:100%;margin-left:5px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#fff}.micromag-screen-survey-container .micromag-screen-survey-itemInner{width:100%;-webkit-transition-property:width;-o-transition-property:width;transition-property:width;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.micromag-screen-survey-container .micromag-screen-survey-button{
|
|
1
|
+
.micromag-screen-survey-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-survey-disabled.micromag-screen-survey-container{overflow:hidden;pointer-events:none}.micromag-screen-survey-hidden.micromag-screen-survey-container{display:none;visibility:hidden}.micromag-screen-survey-placeholder.micromag-screen-survey-container .micromag-screen-survey-content{position:relative;padding:6px}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{margin:5px auto;border:2px dashed #343434;color:#343434}.micromag-screen-survey-container .micromag-screen-survey-question{margin-bottom:20px}.micromag-screen-survey-container .micromag-screen-survey-answers,.micromag-screen-survey-container .micromag-screen-survey-items{position:relative}.micromag-screen-survey-container .micromag-screen-survey-item{padding:5px 0}.micromag-screen-survey-container .micromag-screen-survey-item:first-child .micromag-screen-survey-placeholderAnswer{width:80%}.micromag-screen-survey-container .micromag-screen-survey-item:last-child .micromag-screen-survey-placeholderAnswer{width:90%}.micromag-screen-survey-container .micromag-screen-survey-itemContent{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-ms-flex-align:center;align-items:center}.micromag-screen-survey-container .micromag-screen-survey-resultContainer{-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center;padding:15px 0;-webkit-transition-property:padding;-o-transition-property:padding;transition-property:padding;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.micromag-screen-survey-container .micromag-screen-survey-resultContent{width:0;height:1em;-webkit-transition-property:width opacity;-o-transition-property:width opacity;transition-property:width opacity;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;opacity:0}.micromag-screen-survey-container .micromag-screen-survey-result{position:relative;height:100%;background-color:#fff}.micromag-screen-survey-container .micromag-screen-survey-resultLabel{position:absolute;top:50%;left:100%;margin-left:5px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#fff}.micromag-screen-survey-container .micromag-screen-survey-itemInner{width:100%;-webkit-transition-property:width;-o-transition-property:width;transition-property:width;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.micromag-screen-survey-container .micromag-screen-survey-button{display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;width:100%;padding:0;-webkit-transition:opacity .5s ease-out;-o-transition:opacity .5s ease-out;transition:opacity .5s ease-out;border:2px solid #6c6c6c}.micromag-screen-survey-container .micromag-screen-survey-button:disabled{opacity:1;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-itemLabel{display:inline-block;margin-left:50%;padding:10px;-webkit-transform:translate(-50%);-ms-transform:translate(-50%);transform:translate(-50%);-webkit-transition:margin-left .3s ease-out,-webkit-transform .3s ease-out;transition:margin-left .3s ease-out,-webkit-transform .3s ease-out;-o-transition:margin-left .3s ease-out,transform .3s ease-out;transition:margin-left .3s ease-out,transform .3s ease-out;transition:margin-left .3s ease-out,transform .3s ease-out,-webkit-transform .3s ease-out}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{width:100%;margin:0 auto}.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{height:75px}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer{height:50px}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultContainer{padding-right:50px;padding-left:15px}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultContent{width:100%;opacity:1}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-button{border-color:rgba(0,0,0,0);background-color:rgba(0,0,0,0)}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-button,.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-result,.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultLabel{opacity:.6}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-itemLabel{margin-left:0;-webkit-transform:translate(-10px);-ms-transform:translate(-10px);transform:translate(-10px);text-align:left}.micromag-screen-survey-container .micromag-screen-survey-userAnswer .micromag-screen-survey-button,.micromag-screen-survey-container .micromag-screen-survey-userAnswer .micromag-screen-survey-result,.micromag-screen-survey-container .micromag-screen-survey-userAnswer .micromag-screen-survey-resultLabel{opacity:1}.micromag-screen-survey-container.micromag-screen-survey-isPlaceholder .micromag-screen-survey-layout{padding:10px}.micromag-screen-survey-container.micromag-screen-survey-isPlaceholder .micromag-screen-survey-item{padding:1px 0}
|
package/es/index.js
CHANGED
|
@@ -36,6 +36,7 @@ var propTypes = {
|
|
|
36
36
|
background: PropTypes$1.backgroundElement,
|
|
37
37
|
callToAction: PropTypes$1.callToAction,
|
|
38
38
|
withPercentLabels: PropTypes.bool,
|
|
39
|
+
withoutResults: PropTypes.bool,
|
|
39
40
|
current: PropTypes.bool,
|
|
40
41
|
active: PropTypes.bool,
|
|
41
42
|
transitions: PropTypes$1.transitions,
|
|
@@ -55,6 +56,7 @@ var defaultProps = {
|
|
|
55
56
|
background: null,
|
|
56
57
|
callToAction: null,
|
|
57
58
|
withPercentLabels: true,
|
|
59
|
+
withoutResults: true,
|
|
58
60
|
current: true,
|
|
59
61
|
active: true,
|
|
60
62
|
transitions: null,
|
|
@@ -77,6 +79,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
77
79
|
background = _ref.background,
|
|
78
80
|
callToAction = _ref.callToAction,
|
|
79
81
|
withPercentLabels = _ref.withPercentLabels,
|
|
82
|
+
withoutResults = _ref.withoutResults,
|
|
80
83
|
current = _ref.current,
|
|
81
84
|
active = _ref.active,
|
|
82
85
|
transitions = _ref.transitions,
|
|
@@ -333,7 +336,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
333
336
|
}, /*#__PURE__*/React.createElement("div", {
|
|
334
337
|
className: styles.itemInner,
|
|
335
338
|
style: {
|
|
336
|
-
width: answered ? buttonMaxWidth : null,
|
|
339
|
+
width: answered && !withoutResults ? buttonMaxWidth : null,
|
|
337
340
|
transitionDuration: finalTransitionDuration
|
|
338
341
|
}
|
|
339
342
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -370,9 +373,9 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
370
373
|
}, /*#__PURE__*/React.createElement("div", {
|
|
371
374
|
className: styles.result,
|
|
372
375
|
style: _objectSpread({
|
|
373
|
-
width: "".concat(percent, "%")
|
|
376
|
+
width: !withoutResults ? "".concat(percent, "%") : null
|
|
374
377
|
}, getStyleFromColor(answered ? answerResultBarColor || resultsBarColor || labelColor : null, 'backgroundColor'))
|
|
375
|
-
}, withPercentLabels ? /*#__PURE__*/React.createElement("div", {
|
|
378
|
+
}, withPercentLabels && !withoutResults ? /*#__PURE__*/React.createElement("div", {
|
|
376
379
|
className: styles.resultLabel,
|
|
377
380
|
style: _objectSpread({}, getStyleFromColor(answered ? answerResultTextColor || resultsTextColor || answerResultBarColor || resultsBarColor || labelColor : null, 'color'))
|
|
378
381
|
}, "".concat(percent, "%")) : null))))) : null));
|
|
@@ -490,6 +493,17 @@ var definition = {
|
|
|
490
493
|
"value": "Answers"
|
|
491
494
|
}]
|
|
492
495
|
})
|
|
496
|
+
}, {
|
|
497
|
+
name: 'withoutResult',
|
|
498
|
+
type: 'toggle',
|
|
499
|
+
defaultValue: false,
|
|
500
|
+
label: defineMessage({
|
|
501
|
+
id: "W3aj7x",
|
|
502
|
+
defaultMessage: [{
|
|
503
|
+
"type": 0,
|
|
504
|
+
"value": "Without results"
|
|
505
|
+
}]
|
|
506
|
+
})
|
|
493
507
|
}, {
|
|
494
508
|
type: 'fields',
|
|
495
509
|
isList: true,
|
package/lib/index.js
CHANGED
|
@@ -57,6 +57,7 @@ var propTypes = {
|
|
|
57
57
|
background: core.PropTypes.backgroundElement,
|
|
58
58
|
callToAction: core.PropTypes.callToAction,
|
|
59
59
|
withPercentLabels: PropTypes__default["default"].bool,
|
|
60
|
+
withoutResults: PropTypes__default["default"].bool,
|
|
60
61
|
current: PropTypes__default["default"].bool,
|
|
61
62
|
active: PropTypes__default["default"].bool,
|
|
62
63
|
transitions: core.PropTypes.transitions,
|
|
@@ -76,6 +77,7 @@ var defaultProps = {
|
|
|
76
77
|
background: null,
|
|
77
78
|
callToAction: null,
|
|
78
79
|
withPercentLabels: true,
|
|
80
|
+
withoutResults: true,
|
|
79
81
|
current: true,
|
|
80
82
|
active: true,
|
|
81
83
|
transitions: null,
|
|
@@ -98,6 +100,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
98
100
|
background = _ref.background,
|
|
99
101
|
callToAction = _ref.callToAction,
|
|
100
102
|
withPercentLabels = _ref.withPercentLabels,
|
|
103
|
+
withoutResults = _ref.withoutResults,
|
|
101
104
|
current = _ref.current,
|
|
102
105
|
active = _ref.active,
|
|
103
106
|
transitions = _ref.transitions,
|
|
@@ -354,7 +357,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
354
357
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
355
358
|
className: styles.itemInner,
|
|
356
359
|
style: {
|
|
357
|
-
width: answered ? buttonMaxWidth : null,
|
|
360
|
+
width: answered && !withoutResults ? buttonMaxWidth : null,
|
|
358
361
|
transitionDuration: finalTransitionDuration
|
|
359
362
|
}
|
|
360
363
|
}, /*#__PURE__*/React__default["default"].createElement(Button__default["default"], {
|
|
@@ -391,9 +394,9 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
391
394
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
392
395
|
className: styles.result,
|
|
393
396
|
style: _objectSpread__default["default"]({
|
|
394
|
-
width: "".concat(percent, "%")
|
|
397
|
+
width: !withoutResults ? "".concat(percent, "%") : null
|
|
395
398
|
}, utils.getStyleFromColor(answered ? answerResultBarColor || resultsBarColor || labelColor : null, 'backgroundColor'))
|
|
396
|
-
}, withPercentLabels ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
399
|
+
}, withPercentLabels && !withoutResults ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
397
400
|
className: styles.resultLabel,
|
|
398
401
|
style: _objectSpread__default["default"]({}, utils.getStyleFromColor(answered ? answerResultTextColor || resultsTextColor || answerResultBarColor || resultsBarColor || labelColor : null, 'color'))
|
|
399
402
|
}, "".concat(percent, "%")) : null))))) : null));
|
|
@@ -511,6 +514,17 @@ var definition = {
|
|
|
511
514
|
"value": "Answers"
|
|
512
515
|
}]
|
|
513
516
|
})
|
|
517
|
+
}, {
|
|
518
|
+
name: 'withoutResult',
|
|
519
|
+
type: 'toggle',
|
|
520
|
+
defaultValue: false,
|
|
521
|
+
label: reactIntl.defineMessage({
|
|
522
|
+
id: "W3aj7x",
|
|
523
|
+
defaultMessage: [{
|
|
524
|
+
"type": 0,
|
|
525
|
+
"value": "Without results"
|
|
526
|
+
}]
|
|
527
|
+
})
|
|
514
528
|
}, {
|
|
515
529
|
type: 'fields',
|
|
516
530
|
isList: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-survey",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.52",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@micromag/data": "^0.3.42",
|
|
54
54
|
"@micromag/element-background": "^0.3.42",
|
|
55
55
|
"@micromag/element-button": "^0.3.45",
|
|
56
|
-
"@micromag/element-call-to-action": "^0.3.
|
|
56
|
+
"@micromag/element-call-to-action": "^0.3.52",
|
|
57
57
|
"@micromag/element-container": "^0.3.42",
|
|
58
58
|
"@micromag/element-heading": "^0.3.42",
|
|
59
59
|
"@micromag/element-layout": "^0.3.42",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"publishConfig": {
|
|
69
69
|
"access": "public"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "55e5140dad51adb6e1052f83b6fcb4db97437a6d"
|
|
72
72
|
}
|