@micromag/screen-survey 0.3.695 → 0.3.697
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 +7 -13
- package/package.json +2 -2
package/assets/css/styles.css
CHANGED
|
@@ -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{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-disabled .micromag-screen-survey-icon{opacity:.5}.micromag-screen-survey-container .micromag-screen-survey-confirm.micromag-screen-survey-isClear .micromag-screen-survey-icon{height:10px;margin:0 auto;width:10px}.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;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)}
|
package/es/index.js
CHANGED
|
@@ -11,7 +11,7 @@ import isNumber from 'lodash/isNumber';
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import React, { useState, useMemo, useCallback, useEffect } from 'react';
|
|
13
13
|
import { PropTypes as PropTypes$1 } from '@micromag/core';
|
|
14
|
-
import { ScreenElement, Transitions, CloseIcon
|
|
14
|
+
import { ScreenElement, Transitions, CloseIcon } from '@micromag/core/components';
|
|
15
15
|
import { useScreenSize, useScreenRenderContext, useViewerContext, useViewerWebView, usePlaybackContext, usePlaybackMediaRef } from '@micromag/core/contexts';
|
|
16
16
|
import { useTrackScreenEvent, useDimensionObserver } from '@micromag/core/hooks';
|
|
17
17
|
import { isTextFilled, getLargestRemainderRound, isHeaderFilled, isFooterFilled, getFooterProps, getStyleFromColor } from '@micromag/core/utils';
|
|
@@ -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","
|
|
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"};
|
|
31
31
|
|
|
32
32
|
var propTypes = {
|
|
33
33
|
id: PropTypes.string,
|
|
@@ -172,8 +172,6 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
172
172
|
customAnswerTextStyle = _ref5$textStyle === void 0 ? null : _ref5$textStyle,
|
|
173
173
|
_ref5$boxStyle = _ref5.boxStyle,
|
|
174
174
|
customAnswerBoxStyle = _ref5$boxStyle === void 0 ? null : _ref5$boxStyle,
|
|
175
|
-
_ref5$iconBoxStyle = _ref5.iconBoxStyle,
|
|
176
|
-
customAnswerIconBoxStyle = _ref5$iconBoxStyle === void 0 ? null : _ref5$iconBoxStyle,
|
|
177
175
|
_ref5$submit = _ref5.submit,
|
|
178
176
|
customAnswerSubmit = _ref5$submit === void 0 ? null : _ref5$submit,
|
|
179
177
|
_ref5$multiline = _ref5.multiline,
|
|
@@ -496,7 +494,6 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
496
494
|
})
|
|
497
495
|
}) : null)))) : null));
|
|
498
496
|
})) : null));
|
|
499
|
-
var isClear = answers === null || answers.length === 0 || customAnswerMultiline;
|
|
500
497
|
return /*#__PURE__*/React.createElement("div", {
|
|
501
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)])
|
|
502
499
|
}, /*#__PURE__*/React.createElement(Container, {
|
|
@@ -552,16 +549,13 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
552
549
|
onBlur: onInputBlurred,
|
|
553
550
|
multiline: customAnswerMultiline
|
|
554
551
|
}), !answered ? /*#__PURE__*/React.createElement(Button, {
|
|
555
|
-
className: classNames([styles.confirm, _defineProperty(
|
|
556
|
-
type:
|
|
557
|
-
onClick:
|
|
558
|
-
buttonStyle: customAnswerIconBoxStyle,
|
|
552
|
+
className: classNames([styles.confirm, _defineProperty({}, styles.disabled, inputDisabled || textInput === null || textInput === '')]),
|
|
553
|
+
type: "button",
|
|
554
|
+
onClick: onTextInputClear,
|
|
559
555
|
disabled: inputDisabled || textInput === null || textInput === ''
|
|
560
|
-
},
|
|
556
|
+
}, /*#__PURE__*/React.createElement(CloseIcon, {
|
|
561
557
|
className: styles.icon
|
|
562
|
-
}) : /*#__PURE__*/React.createElement(
|
|
563
|
-
className: styles.icon
|
|
564
|
-
})) : null, isClear && !answered ? /*#__PURE__*/React.createElement(Button, {
|
|
558
|
+
})) : null, !answered ? /*#__PURE__*/React.createElement(Button, {
|
|
565
559
|
className: classNames([styles.submit, _defineProperty({}, styles.disabled, inputDisabled || textInput === null || textInput === '')]),
|
|
566
560
|
type: "submit",
|
|
567
561
|
buttonStyle: customAnswerSubmit === null || customAnswerSubmit === void 0 ? void 0 : customAnswerSubmit.buttonStyle,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-survey",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.697",
|
|
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": "
|
|
90
|
+
"gitHead": "f2af30e881261d0bf8e9285a1fb746a7b99872cb"
|
|
91
91
|
}
|