@micromag/screen-survey 0.3.88 → 0.3.91

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.
@@ -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-resultBar{position:absolute;top:0;left:0;height:100%;background-color:hsla(0,0%,100%,.3)}.micromag-screen-survey-container .micromag-screen-survey-resultLabel{position:absolute;top:50%;right:0;width:4em;padding:0 5px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#fff;text-align:right}.micromag-screen-survey-container .micromag-screen-survey-itemInner{width:100%}.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}.micromag-screen-survey-container .micromag-screen-survey-button:disabled{opacity:1;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-itemLabel{width:100%;padding:10px}.micromag-screen-survey-container .micromag-screen-survey-itemLabel,.micromag-screen-survey-container .micromag-screen-survey-itemText{display:inline-block;-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-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!important}.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-right:0;margin-left:0;text-align:left}.micromag-screen-survey-container.micromag-screen-survey-answered.micromag-screen-survey-withPercentage .micromag-screen-survey-itemText{-webkit-transform:translate(-2em);-ms-transform:translate(-2em);transform:translate(-2em)}.micromag-screen-survey-container.micromag-screen-survey-withPercentage .micromag-screen-survey-itemLabel{margin-right:2em;margin-left:2em}.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}
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-resultBar{position:absolute;top:0;left:0;height:100%;background-color:hsla(0,0%,100%,.2)}.micromag-screen-survey-container .micromag-screen-survey-resultLabel{position:absolute;top:50%;right:0;width:4em;padding:0 5px;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);color:#fff;text-align:right}.micromag-screen-survey-container .micromag-screen-survey-itemInner{width:100%}.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}.micromag-screen-survey-container .micromag-screen-survey-button:disabled{opacity:1;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-itemLabel{width:100%;padding:10px}.micromag-screen-survey-container .micromag-screen-survey-itemLabel,.micromag-screen-survey-container .micromag-screen-survey-itemText{display:inline-block;-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-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!important}.micromag-screen-survey-container.micromag-screen-survey-answered{line-height:1}.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-right:0;margin-left:0;text-align:left}.micromag-screen-survey-container.micromag-screen-survey-answered.micromag-screen-survey-withPercentage .micromag-screen-survey-itemText{-webkit-transform:translate(-2em);-ms-transform:translate(-2em);transform:translate(-2em)}.micromag-screen-survey-container.micromag-screen-survey-withPercentage .micromag-screen-survey-itemLabel{margin-right:2em;margin-left:2em}.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
@@ -43,6 +43,8 @@ var propTypes = {
43
43
  transitionStagger: PropTypes.number,
44
44
  resultTransitionDuration: PropTypes.number,
45
45
  type: PropTypes.string,
46
+ enableInteraction: PropTypes.func,
47
+ disableInteraction: PropTypes.func,
46
48
  className: PropTypes.string
47
49
  };
48
50
  var defaultProps = {
@@ -63,6 +65,8 @@ var defaultProps = {
63
65
  transitionStagger: 100,
64
66
  resultTransitionDuration: 500,
65
67
  type: null,
68
+ enableInteraction: null,
69
+ disableInteraction: null,
66
70
  className: null
67
71
  };
68
72
 
@@ -86,6 +90,8 @@ var SurveyScreen = function SurveyScreen(_ref) {
86
90
  transitionStagger = _ref.transitionStagger,
87
91
  resultTransitionDuration = _ref.resultTransitionDuration,
88
92
  type = _ref.type,
93
+ enableInteraction = _ref.enableInteraction,
94
+ disableInteraction = _ref.disableInteraction,
89
95
  className = _ref.className;
90
96
  var screenId = id || 'screen-id';
91
97
  var trackScreenEvent = useTrackScreenEvent(type);
@@ -328,7 +334,12 @@ var SurveyScreen = function SurveyScreen(_ref) {
328
334
  } : {
329
335
  opacity: 0
330
336
  })
331
- }, "".concat(percent, "%")) : null, !withoutBar ? /*#__PURE__*/React.createElement("div", {
337
+ }, /*#__PURE__*/React.createElement(Text, Object.assign({}, label, {
338
+ textStyle: textStyle,
339
+ inline: true,
340
+ className: styles.resultText,
341
+ body: "".concat(percent, "%")
342
+ }))) : null, !withoutBar ? /*#__PURE__*/React.createElement("div", {
332
343
  className: styles.resultBar,
333
344
  style: _objectSpread(_objectSpread({
334
345
  transitionDuration: finalTransitionDuration,
@@ -362,7 +373,9 @@ var SurveyScreen = function SurveyScreen(_ref) {
362
373
  screenSize: {
363
374
  width: width,
364
375
  height: height
365
- }
376
+ },
377
+ enableInteraction: enableInteraction,
378
+ disableInteraction: disableInteraction
366
379
  })));
367
380
  }
368
381
 
package/lib/index.js CHANGED
@@ -64,6 +64,8 @@ var propTypes = {
64
64
  transitionStagger: PropTypes__default["default"].number,
65
65
  resultTransitionDuration: PropTypes__default["default"].number,
66
66
  type: PropTypes__default["default"].string,
67
+ enableInteraction: PropTypes__default["default"].func,
68
+ disableInteraction: PropTypes__default["default"].func,
67
69
  className: PropTypes__default["default"].string
68
70
  };
69
71
  var defaultProps = {
@@ -84,6 +86,8 @@ var defaultProps = {
84
86
  transitionStagger: 100,
85
87
  resultTransitionDuration: 500,
86
88
  type: null,
89
+ enableInteraction: null,
90
+ disableInteraction: null,
87
91
  className: null
88
92
  };
89
93
 
@@ -107,6 +111,8 @@ var SurveyScreen = function SurveyScreen(_ref) {
107
111
  transitionStagger = _ref.transitionStagger,
108
112
  resultTransitionDuration = _ref.resultTransitionDuration,
109
113
  type = _ref.type,
114
+ enableInteraction = _ref.enableInteraction,
115
+ disableInteraction = _ref.disableInteraction,
110
116
  className = _ref.className;
111
117
  var screenId = id || 'screen-id';
112
118
  var trackScreenEvent = hooks.useTrackScreenEvent(type);
@@ -349,7 +355,12 @@ var SurveyScreen = function SurveyScreen(_ref) {
349
355
  } : {
350
356
  opacity: 0
351
357
  })
352
- }, "".concat(percent, "%")) : null, !withoutBar ? /*#__PURE__*/React__default["default"].createElement("div", {
358
+ }, /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, label, {
359
+ textStyle: textStyle,
360
+ inline: true,
361
+ className: styles.resultText,
362
+ body: "".concat(percent, "%")
363
+ }))) : null, !withoutBar ? /*#__PURE__*/React__default["default"].createElement("div", {
353
364
  className: styles.resultBar,
354
365
  style: _objectSpread__default["default"](_objectSpread__default["default"]({
355
366
  transitionDuration: finalTransitionDuration,
@@ -383,7 +394,9 @@ var SurveyScreen = function SurveyScreen(_ref) {
383
394
  screenSize: {
384
395
  width: width,
385
396
  height: height
386
- }
397
+ },
398
+ enableInteraction: enableInteraction,
399
+ disableInteraction: disableInteraction
387
400
  })));
388
401
  }
389
402
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-survey",
3
- "version": "0.3.88",
3
+ "version": "0.3.91",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,17 +49,17 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.3.88",
53
- "@micromag/data": "^0.3.88",
54
- "@micromag/element-background": "^0.3.88",
55
- "@micromag/element-button": "^0.3.88",
56
- "@micromag/element-call-to-action": "^0.3.88",
57
- "@micromag/element-container": "^0.3.88",
58
- "@micromag/element-heading": "^0.3.88",
59
- "@micromag/element-layout": "^0.3.88",
60
- "@micromag/element-scroll": "^0.3.88",
61
- "@micromag/element-text": "^0.3.88",
62
- "@micromag/transforms": "^0.3.88",
52
+ "@micromag/core": "^0.3.91",
53
+ "@micromag/data": "^0.3.91",
54
+ "@micromag/element-background": "^0.3.91",
55
+ "@micromag/element-button": "^0.3.91",
56
+ "@micromag/element-call-to-action": "^0.3.91",
57
+ "@micromag/element-container": "^0.3.91",
58
+ "@micromag/element-heading": "^0.3.91",
59
+ "@micromag/element-layout": "^0.3.91",
60
+ "@micromag/element-scroll": "^0.3.91",
61
+ "@micromag/element-text": "^0.3.91",
62
+ "@micromag/transforms": "^0.3.91",
63
63
  "classnames": "^2.2.6",
64
64
  "lodash": "^4.17.21",
65
65
  "prop-types": "^15.7.2",
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "gitHead": "d0fb1f7d4ae6bfa1fd07dc856307c1c4225ab889"
72
+ "gitHead": "bce204f3045898193845386933a98a5e3666bcf3"
73
73
  }