@micromag/screen-survey 0.3.700 → 0.3.702

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 .micromag-screen-survey-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-survey-container{height:100%;overflow:hidden;position:relative;width:100%}.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{padding:6px;position:relative}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-survey-container .micromag-screen-survey-background{z-index:0}.micromag-screen-survey-container .micromag-screen-survey-content{z-index:1}.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-header{left:0;position:absolute;top:0;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-survey-container .micromag-screen-survey-header.micromag-screen-survey-disabled{opacity:0;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-footer{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-survey-container .micromag-screen-survey-footer a{padding:0}.micromag-screen-survey-container .micromag-screen-survey-footer.micromag-screen-survey-disabled{opacity:0;pointer-events:none}.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:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.micromag-screen-survey-container .micromag-screen-survey-resultBar{background-color:hsla(0,0%,100%,.2);height:100%;left:0;position:absolute;top:0}.micromag-screen-survey-container .micromag-screen-survey-resultLabel{color:#fff;padding:0 8px;position:absolute;right:0;text-align:right;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:4em;z-index:1}.micromag-screen-survey-container .micromag-screen-survey-resultText{margin-top:10px}.micromag-screen-survey-container .micromag-screen-survey-itemInner{width:100%}.micromag-screen-survey-container .micromag-screen-survey-button{display:-ms-flexbox;display:flex;overflow:hidden;padding:10px;position:relative;-webkit-transition:opacity .5s ease-out;transition:opacity .5s ease-out;width:100%}.micromag-screen-survey-container .micromag-screen-survey-button:disabled{opacity:1;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-itemLabel{width:100%}.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;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-itemText{position:relative;z-index:1}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{margin:0 auto;width:100%}.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-input{margin:5px 0;position:relative}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-disabled{opacity:.5}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-disabled .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-disabled .micromag-screen-survey-textInput{background:transparent}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-selected{opacity:1!important}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-selected .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-selected .micromag-screen-survey-submit{opacity:0}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-filled .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-filled .micromag-screen-survey-submit,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-focused .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-focused .micromag-screen-survey-submit{opacity:1}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-multiline .micromag-screen-survey-textInput{min-height:80px}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-multiline .micromag-screen-survey-confirm{bottom:auto}.micromag-screen-survey-container .micromag-screen-survey-textInput{color:#fff;display:-ms-flexbox;display:flex;line-height:inherit;margin:0;overflow:hidden;padding:10px calc(10px + 2em);position:relative;text-align:center;-webkit-transition:margin-left .3s ease-out,opacity .5s ease-out,-webkit-transform .3s ease-out;transition:margin-left .3s ease-out,opacity .5s ease-out,-webkit-transform .3s ease-out;transition:margin-left .3s ease-out,transform .3s ease-out,opacity .5s ease-out;transition:margin-left .3s ease-out,transform .3s ease-out,opacity .5s ease-out,-webkit-transform .3s ease-out;width:100%;z-index:0}.micromag-screen-survey-container .micromag-screen-survey-confirm{background-color:transparent;bottom:0;opacity:0;padding:10px;position:absolute;right:0;top:0;-webkit-transition:opacity .15s ease-out;transition:opacity .15s ease-out;z-index:1}.micromag-screen-survey-container .micromag-screen-survey-confirm .micromag-screen-survey-icon{height:10px;margin:0 auto;width:10px}.micromag-screen-survey-container .micromag-screen-survey-confirm.micromag-screen-survey-disabled .micromag-screen-survey-icon{opacity:.5}.micromag-screen-survey-container .micromag-screen-survey-submit{margin-top:10px;opacity:0;padding:10px;position:absolute;top:100%;-webkit-transition:opacity .15s ease-out;transition:opacity .15s ease-out;z-index:1}.micromag-screen-survey-container.micromag-screen-survey-answered{line-height:1}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultContainer{padding-left:15px;padding-right:50px}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultContent{opacity:1;width:100%}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-button{background-color:transparent;border-color:transparent}.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;margin-right:0;text-align:left}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-textInput{padding:10px;pointer-events:none;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-answered.micromag-screen-survey-withPercentage .micromag-screen-survey-textInput{-webkit-transform:translate(0);-ms-transform:translate(0);transform:translate(0)}.micromag-screen-survey-container.micromag-screen-survey-withPercentage .micromag-screen-survey-itemLabel{margin-left:2em;margin-right:2em}.micromag-screen-survey-container.micromag-screen-survey-inputFocused .micromag-screen-survey-answers,.micromag-screen-survey-container.micromag-screen-survey-inputFocused .micromag-screen-survey-question{opacity:.5}.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}.micromag-screen-survey-reset{background-color:transparent;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-survey-reset:hover{border:0;opacity:.8}.micromag-screen-survey-reset:hover:active{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}
1
+ .micromag-screen-survey-container .micromag-screen-survey-background{height:100%;left:0;position:absolute;top:0;width:100%}.micromag-screen-survey-container{height:100%;overflow:hidden;position:relative;width:100%}.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{padding:6px;position:relative}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{border:2px dashed #343434;color:#343434;margin:5px auto}.micromag-screen-survey-container .micromag-screen-survey-background{z-index:0}.micromag-screen-survey-container .micromag-screen-survey-content{z-index:1}.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-header{left:0;position:absolute;top:0;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-survey-container .micromag-screen-survey-header.micromag-screen-survey-disabled{opacity:0;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-footer{bottom:0;left:0;position:absolute;-webkit-transition:opacity .2s ease-out;transition:opacity .2s ease-out;width:100%}.micromag-screen-survey-container .micromag-screen-survey-footer a{padding:0}.micromag-screen-survey-container .micromag-screen-survey-footer.micromag-screen-survey-disabled{opacity:0;pointer-events:none}.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:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.micromag-screen-survey-container .micromag-screen-survey-resultBar{background-color:hsla(0,0%,100%,.2);height:100%;left:0;position:absolute;top:0}.micromag-screen-survey-container .micromag-screen-survey-resultLabel{color:#fff;padding:0 8px;position:absolute;right:0;text-align:right;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);width:4em;z-index:1}.micromag-screen-survey-container .micromag-screen-survey-resultText{margin-top:10px}.micromag-screen-survey-container .micromag-screen-survey-itemInner{width:100%}.micromag-screen-survey-container .micromag-screen-survey-button{display:-ms-flexbox;display:flex;overflow:hidden;padding:10px;position:relative;-webkit-transition:opacity .5s ease-out;transition:opacity .5s ease-out;width:100%}.micromag-screen-survey-container .micromag-screen-survey-button:disabled{opacity:1;pointer-events:none}.micromag-screen-survey-container .micromag-screen-survey-itemLabel{width:100%}.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;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-itemText{position:relative;z-index:1}.micromag-screen-survey-container .micromag-screen-survey-emptyAnswer,.micromag-screen-survey-container .micromag-screen-survey-emptyQuestion{margin:0 auto;width:100%}.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-input{margin:5px 0;position:relative}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-disabled{opacity:.5}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-disabled .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-disabled .micromag-screen-survey-textInput{background:transparent}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-selected{opacity:1!important}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-selected .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-selected .micromag-screen-survey-submit{opacity:0}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-filled .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-filled .micromag-screen-survey-submit,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-focused .micromag-screen-survey-confirm,.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-focused .micromag-screen-survey-submit{opacity:1}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-multiline .micromag-screen-survey-textInput{min-height:80px}.micromag-screen-survey-container .micromag-screen-survey-input.micromag-screen-survey-multiline .micromag-screen-survey-confirm{bottom:auto}.micromag-screen-survey-container .micromag-screen-survey-textInput{color:#fff;display:-ms-flexbox;display:flex;line-height:inherit;margin:0;overflow:hidden;padding:10px calc(10px + 2em);position:relative;text-align:center;-webkit-transition:margin-left .3s ease-out,opacity .5s ease-out,-webkit-transform .3s ease-out;transition:margin-left .3s ease-out,opacity .5s ease-out,-webkit-transform .3s ease-out;transition:margin-left .3s ease-out,transform .3s ease-out,opacity .5s ease-out;transition:margin-left .3s ease-out,transform .3s ease-out,opacity .5s ease-out,-webkit-transform .3s ease-out;width:100%;z-index:0}.micromag-screen-survey-container .micromag-screen-survey-confirm{background-color:transparent;bottom:0;opacity:0;padding:10px;position:absolute;right:0;top:0;-webkit-transition:opacity .15s ease-out;transition:opacity .15s ease-out;z-index:1}.micromag-screen-survey-container .micromag-screen-survey-confirm .micromag-screen-survey-icon{height:10px;margin:0 auto;width:10px}.micromag-screen-survey-container .micromag-screen-survey-confirm.micromag-screen-survey-disabled .micromag-screen-survey-icon{opacity:.5}.micromag-screen-survey-container .micromag-screen-survey-submit{margin-top:10px;opacity:0;padding:10px;position:absolute;top:100%;-webkit-transition:opacity .15s ease-out;transition:opacity .15s ease-out;z-index:1}.micromag-screen-survey-container.micromag-screen-survey-answered{line-height:1}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultContainer{padding-left:15px;padding-right:50px}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-resultContent{opacity:1;width:100%}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-button{background-color:transparent;border-color:transparent}.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;margin-right:0}.micromag-screen-survey-container.micromag-screen-survey-answered .micromag-screen-survey-textInput{padding:10px;pointer-events:none}.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-answered.micromag-screen-survey-withPercentage .micromag-screen-survey-textInput{-webkit-transform:translate(0);-ms-transform:translate(0);transform:translate(0)}.micromag-screen-survey-container.micromag-screen-survey-answered.micromag-screen-survey-withBar .micromag-screen-survey-itemLabel,.micromag-screen-survey-container.micromag-screen-survey-answered.micromag-screen-survey-withBar .micromag-screen-survey-textInput,.micromag-screen-survey-container.micromag-screen-survey-answered.micromag-screen-survey-withPercentage .micromag-screen-survey-itemLabel,.micromag-screen-survey-container.micromag-screen-survey-answered.micromag-screen-survey-withPercentage .micromag-screen-survey-textInput{text-align:left}.micromag-screen-survey-container.micromag-screen-survey-withPercentage .micromag-screen-survey-itemLabel{margin-left:2em;margin-right:2em}.micromag-screen-survey-container.micromag-screen-survey-inputFocused .micromag-screen-survey-answers,.micromag-screen-survey-container.micromag-screen-survey-inputFocused .micromag-screen-survey-question{opacity:.5}.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}.micromag-screen-survey-reset{background-color:transparent;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-survey-reset:hover{border:0;opacity:.8}.micromag-screen-survey-reset:hover:active{-webkit-transform:rotate(30deg);-ms-transform:rotate(30deg);transform:rotate(30deg)}
package/es/index.js CHANGED
@@ -27,7 +27,7 @@ import Scroll from '@micromag/element-scroll';
27
27
  import Text from '@micromag/element-text';
28
28
  import TextInput from '@micromag/element-text-input';
29
29
 
30
- var styles = {"container":"micromag-screen-survey-container","background":"micromag-screen-survey-background","disabled":"micromag-screen-survey-disabled","content":"micromag-screen-survey-content","emptyQuestion":"micromag-screen-survey-emptyQuestion","emptyAnswer":"micromag-screen-survey-emptyAnswer","question":"micromag-screen-survey-question","answers":"micromag-screen-survey-answers","items":"micromag-screen-survey-items","header":"micromag-screen-survey-header","footer":"micromag-screen-survey-footer","item":"micromag-screen-survey-item","placeholderAnswer":"micromag-screen-survey-placeholderAnswer","itemContent":"micromag-screen-survey-itemContent","resultBar":"micromag-screen-survey-resultBar","resultLabel":"micromag-screen-survey-resultLabel","resultText":"micromag-screen-survey-resultText","itemInner":"micromag-screen-survey-itemInner","button":"micromag-screen-survey-button","itemLabel":"micromag-screen-survey-itemLabel","itemText":"micromag-screen-survey-itemText","userAnswer":"micromag-screen-survey-userAnswer","input":"micromag-screen-survey-input","textInput":"micromag-screen-survey-textInput","confirm":"micromag-screen-survey-confirm","selected":"micromag-screen-survey-selected","submit":"micromag-screen-survey-submit","focused":"micromag-screen-survey-focused","filled":"micromag-screen-survey-filled","multiline":"micromag-screen-survey-multiline","icon":"micromag-screen-survey-icon","answered":"micromag-screen-survey-answered","withPercentage":"micromag-screen-survey-withPercentage","inputFocused":"micromag-screen-survey-inputFocused","isPlaceholder":"micromag-screen-survey-isPlaceholder","layout":"micromag-screen-survey-layout","reset":"micromag-screen-survey-reset"};
30
+ var styles = {"container":"micromag-screen-survey-container","background":"micromag-screen-survey-background","disabled":"micromag-screen-survey-disabled","content":"micromag-screen-survey-content","emptyQuestion":"micromag-screen-survey-emptyQuestion","emptyAnswer":"micromag-screen-survey-emptyAnswer","question":"micromag-screen-survey-question","answers":"micromag-screen-survey-answers","items":"micromag-screen-survey-items","header":"micromag-screen-survey-header","footer":"micromag-screen-survey-footer","item":"micromag-screen-survey-item","placeholderAnswer":"micromag-screen-survey-placeholderAnswer","itemContent":"micromag-screen-survey-itemContent","resultBar":"micromag-screen-survey-resultBar","resultLabel":"micromag-screen-survey-resultLabel","resultText":"micromag-screen-survey-resultText","itemInner":"micromag-screen-survey-itemInner","button":"micromag-screen-survey-button","itemLabel":"micromag-screen-survey-itemLabel","itemText":"micromag-screen-survey-itemText","userAnswer":"micromag-screen-survey-userAnswer","input":"micromag-screen-survey-input","textInput":"micromag-screen-survey-textInput","confirm":"micromag-screen-survey-confirm","selected":"micromag-screen-survey-selected","submit":"micromag-screen-survey-submit","focused":"micromag-screen-survey-focused","filled":"micromag-screen-survey-filled","multiline":"micromag-screen-survey-multiline","icon":"micromag-screen-survey-icon","answered":"micromag-screen-survey-answered","withPercentage":"micromag-screen-survey-withPercentage","withBar":"micromag-screen-survey-withBar","inputFocused":"micromag-screen-survey-inputFocused","isPlaceholder":"micromag-screen-survey-isPlaceholder","layout":"micromag-screen-survey-layout","reset":"micromag-screen-survey-reset"};
31
31
 
32
32
  var propTypes = {
33
33
  id: PropTypes.string,
@@ -200,11 +200,11 @@ var SurveyScreen = function SurveyScreen(_ref) {
200
200
  var _ref9 = label || {},
201
201
  _ref9$body = _ref9.body,
202
202
  body = _ref9$body === void 0 ? null : _ref9$body;
203
- var _ref10 = quizAnswers.find(function (qa) {
203
+ var _ref0 = quizAnswers.find(function (qa) {
204
204
  return qa.choice === body;
205
205
  }) || {},
206
- _ref10$count = _ref10.count,
207
- count = _ref10$count === void 0 ? 0 : _ref10$count;
206
+ _ref0$count = _ref0.count,
207
+ count = _ref0$count === void 0 ? 0 : _ref0$count;
208
208
  var countWithUser = i === userAnswerIndex ? count + 1 : count;
209
209
  if (body !== null) {
210
210
  return _objectSpread(_objectSpread({}, answersTotal), {}, _defineProperty({}, body, {
@@ -240,6 +240,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
240
240
  value: 1
241
241
  });
242
242
  trackScreenEvent('click_answer', "Answer ".concat(userAnswerIndex + 1, ": ").concat(answer.label.body), {
243
+ linkType: 'survey_answer',
243
244
  answer: answer,
244
245
  answerIndex: answerIndex,
245
246
  answerType: 'button'
@@ -318,8 +319,8 @@ var SurveyScreen = function SurveyScreen(_ref) {
318
319
  _useState8 = _slicedToArray(_useState7, 2),
319
320
  scrolledBottom = _useState8[0],
320
321
  setScrolledBottom = _useState8[1];
321
- var onScrolledBottom = useCallback(function (_ref11) {
322
- var initial = _ref11.initial;
322
+ var onScrolledBottom = useCallback(function (_ref1) {
323
+ var initial = _ref1.initial;
323
324
  if (initial) {
324
325
  trackScreenEvent('scroll', 'Screen');
325
326
  }
@@ -329,12 +330,12 @@ var SurveyScreen = function SurveyScreen(_ref) {
329
330
  setScrolledBottom(false);
330
331
  }, [setScrolledBottom]);
331
332
  var _useState9 = useState(false),
332
- _useState10 = _slicedToArray(_useState9, 2),
333
- hasScroll = _useState10[0],
334
- setHasScroll = _useState10[1];
335
- var onScrollHeightChange = useCallback(function (_ref12) {
336
- var _ref12$canScroll = _ref12.canScroll,
337
- canScroll = _ref12$canScroll === void 0 ? false : _ref12$canScroll;
333
+ _useState0 = _slicedToArray(_useState9, 2),
334
+ hasScroll = _useState0[0],
335
+ setHasScroll = _useState0[1];
336
+ var onScrollHeightChange = useCallback(function (_ref10) {
337
+ var _ref10$canScroll = _ref10.canScroll,
338
+ canScroll = _ref10$canScroll === void 0 ? false : _ref10$canScroll;
338
339
  setHasScroll(canScroll);
339
340
  }, [setHasScroll]);
340
341
 
@@ -366,19 +367,19 @@ var SurveyScreen = function SurveyScreen(_ref) {
366
367
  var finalTransitionDuration = useMemo(function () {
367
368
  return showInstantAnswer ? 0 : "".concat(resultTransitionDuration, "ms");
368
369
  }, [showInstantAnswer, resultTransitionDuration]);
369
- var _ref13 = resultsStyle || {},
370
- _ref13$barColor = _ref13.barColor,
371
- resultsBarColor = _ref13$barColor === void 0 ? null : _ref13$barColor,
372
- _ref13$textColor = _ref13.textColor,
373
- resultsTextColor = _ref13$textColor === void 0 ? null : _ref13$textColor,
374
- _ref13$percentageText = _ref13.percentageTextStyle,
375
- resultsPercentageTextStyle = _ref13$percentageText === void 0 ? null : _ref13$percentageText;
370
+ var _ref11 = resultsStyle || {},
371
+ _ref11$barColor = _ref11.barColor,
372
+ resultsBarColor = _ref11$barColor === void 0 ? null : _ref11$barColor,
373
+ _ref11$textColor = _ref11.textColor,
374
+ resultsTextColor = _ref11$textColor === void 0 ? null : _ref11$textColor,
375
+ _ref11$percentageText = _ref11.percentageTextStyle,
376
+ resultsPercentageTextStyle = _ref11$percentageText === void 0 ? null : _ref11$percentageText;
376
377
  var finalResult = useMemo(function () {
377
378
  var defaultResult = hasDefaultResult ? result : null;
378
379
  var answer = answers !== null && userAnswerIndex !== null ? answers[userAnswerIndex] : null;
379
- var _ref14 = answer || {},
380
- _ref14$result = _ref14.result,
381
- answerResult = _ref14$result === void 0 ? null : _ref14$result;
380
+ var _ref12 = answer || {},
381
+ _ref12$result = _ref12.result,
382
+ answerResult = _ref12$result === void 0 ? null : _ref12$result;
382
383
  return answerResult || defaultResult;
383
384
  }, [hasDefaultResult, result, answers, userAnswerIndex]);
384
385
  var showReset = isEdit && userAnswerIndex !== null;
@@ -389,43 +390,43 @@ var SurveyScreen = function SurveyScreen(_ref) {
389
390
  className: styles.items
390
391
  }, (isPlaceholder ? _toConsumableArray(new Array(3)) : answers).map(function (answer, answerIndex) {
391
392
  var hasAnswer = answer !== null;
392
- var _ref15 = answer || {},
393
- _ref15$label = _ref15.label,
394
- label = _ref15$label === void 0 ? null : _ref15$label,
395
- _ref15$buttonStyle = _ref15.buttonStyle,
396
- answerButtonStyle = _ref15$buttonStyle === void 0 ? null : _ref15$buttonStyle,
397
- _ref15$textStyle = _ref15.textStyle,
398
- answerButtonTextStyle = _ref15$textStyle === void 0 ? null : _ref15$textStyle,
399
- _ref15$resultStyle = _ref15.resultStyle,
400
- answerResultStyle = _ref15$resultStyle === void 0 ? null : _ref15$resultStyle;
401
- var _ref16 = answerResultStyle || {},
402
- _ref16$barColor = _ref16.barColor,
403
- answerResultBarColor = _ref16$barColor === void 0 ? null : _ref16$barColor,
404
- answerResultTextColor = _ref16.textColor,
405
- _ref16$percentageText = _ref16.percentageTextStyle,
406
- answerResultPercentageTextStyle = _ref16$percentageText === void 0 ? null : _ref16$percentageText;
393
+ var _ref13 = answer || {},
394
+ _ref13$label = _ref13.label,
395
+ label = _ref13$label === void 0 ? null : _ref13$label,
396
+ _ref13$buttonStyle = _ref13.buttonStyle,
397
+ answerButtonStyle = _ref13$buttonStyle === void 0 ? null : _ref13$buttonStyle,
398
+ _ref13$textStyle = _ref13.textStyle,
399
+ answerButtonTextStyle = _ref13$textStyle === void 0 ? null : _ref13$textStyle,
400
+ _ref13$resultStyle = _ref13.resultStyle,
401
+ answerResultStyle = _ref13$resultStyle === void 0 ? null : _ref13$resultStyle;
402
+ var _ref14 = answerResultStyle || {},
403
+ _ref14$barColor = _ref14.barColor,
404
+ answerResultBarColor = _ref14$barColor === void 0 ? null : _ref14$barColor,
405
+ answerResultTextColor = _ref14.textColor,
406
+ _ref14$percentageText = _ref14.percentageTextStyle,
407
+ answerResultPercentageTextStyle = _ref14$percentageText === void 0 ? null : _ref14$percentageText;
408
+ var _ref15 = label || {},
409
+ _ref15$body = _ref15.body,
410
+ body = _ref15$body === void 0 ? null : _ref15$body;
411
+ var _ref16 = body !== null ? quizAnswersComputed[body] || {} : {},
412
+ _ref16$percent = _ref16.percent,
413
+ percent = _ref16$percent === void 0 ? 0 : _ref16$percent,
414
+ _ref16$count = _ref16.count,
415
+ count = _ref16$count === void 0 ? 0 : _ref16$count;
407
416
  var _ref17 = label || {},
408
- _ref17$body = _ref17.body,
409
- body = _ref17$body === void 0 ? null : _ref17$body;
410
- var _ref18 = body !== null ? quizAnswersComputed[body] || {} : {},
411
- _ref18$percent = _ref18.percent,
412
- percent = _ref18$percent === void 0 ? 0 : _ref18$percent,
413
- _ref18$count = _ref18.count,
414
- count = _ref18$count === void 0 ? 0 : _ref18$count;
415
- var _ref19 = label || {},
416
- _ref19$textStyle = _ref19.textStyle,
417
- textStyle = _ref19$textStyle === void 0 ? null : _ref19$textStyle;
418
- var _ref20 = textStyle || {},
419
- _ref20$color = _ref20.color,
420
- labelColor = _ref20$color === void 0 ? null : _ref20$color;
417
+ _ref17$textStyle = _ref17.textStyle,
418
+ textStyle = _ref17$textStyle === void 0 ? null : _ref17$textStyle;
419
+ var _ref18 = textStyle || {},
420
+ _ref18$color = _ref18.color,
421
+ labelColor = _ref18$color === void 0 ? null : _ref18$color;
421
422
  var hasAnswerLabel = isTextFilled(label);
422
423
  var userAnswer = userAnswerIndex === answerIndex;
423
424
  var buttonStyles = _objectSpread(_objectSpread(_objectSpread({}, buttonsStyle), answerButtonStyle), answered ? {
424
425
  textAlign: 'left'
425
426
  } : null);
426
- var _ref21 = buttonStyles || {},
427
- _ref21$borderRadius = _ref21.borderRadius,
428
- answerResultBorderRadius = _ref21$borderRadius === void 0 ? null : _ref21$borderRadius;
427
+ var _ref19 = buttonStyles || {},
428
+ _ref19$borderRadius = _ref19.borderRadius,
429
+ answerResultBorderRadius = _ref19$borderRadius === void 0 ? null : _ref19$borderRadius;
429
430
  var finalBarBorderRadius = answerResultBorderRadius !== null && isNumber(answerResultBorderRadius) && answerResultBorderRadius > 2 ? answerResultBorderRadius - 2 : answerResultBorderRadius;
430
431
  return /*#__PURE__*/React.createElement("div", {
431
432
  key: "answer-".concat(answerIndex + 1),
@@ -495,7 +496,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
495
496
  }) : null)))) : null));
496
497
  })) : null));
497
498
  return /*#__PURE__*/React.createElement("div", {
498
- className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles.answered, answered), styles.inputFocused, inputFocused), styles.withPercentage, !withoutPercentage), styles.isPlaceholder, isPlaceholder)])
499
+ className: classNames([styles.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, className, className !== null), styles.answered, answered), styles.inputFocused, inputFocused), styles.withPercentage, !withoutPercentage), styles.withBar, !withoutBar), styles.isPlaceholder, isPlaceholder)])
499
500
  }, /*#__PURE__*/React.createElement(Container, {
500
501
  width: width,
501
502
  height: height,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-survey",
3
- "version": "0.3.700",
3
+ "version": "0.3.702",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -87,5 +87,5 @@
87
87
  "access": "public",
88
88
  "registry": "https://registry.npmjs.org/"
89
89
  },
90
- "gitHead": "b335d7d45cc5a556a4b4bb9c68e52809501cc6e1"
90
+ "gitHead": "32ebadd6d81e82991e0b70200c38c91d51ba357a"
91
91
  }