@pie-lib/correct-answer-toggle 2.22.0 → 2.22.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/index.js ADDED
@@ -0,0 +1,262 @@
1
+ import { color, Readable } from '@pie-lib/render-ui';
2
+ import { withStyles } from '@material-ui/core/styles';
3
+ import CSSTransition$1 from 'react-transition-group/CSSTransition';
4
+ import { CorrectResponse } from '@pie-lib/icons';
5
+ import React from 'react';
6
+ import PropTypes from 'prop-types';
7
+ import { CSSTransition } from 'react-transition-group';
8
+ import classNames from 'classnames';
9
+ import Translator from '@pie-lib/translator';
10
+
11
+ function _extends() {
12
+ _extends = Object.assign || function (target) {
13
+ for (var i = 1; i < arguments.length; i++) {
14
+ var source = arguments[i];
15
+
16
+ for (var key in source) {
17
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
18
+ target[key] = source[key];
19
+ }
20
+ }
21
+ }
22
+
23
+ return target;
24
+ };
25
+
26
+ return _extends.apply(this, arguments);
27
+ }
28
+
29
+ const noTouch = {
30
+ '-webkit-touchCcallout': 'none',
31
+ '-webkit-user-select': 'none',
32
+ '-khtml-user-select': 'none',
33
+ '-moz-user-select': 'none',
34
+ '-ms-user-select': 'none',
35
+ 'user-select': 'none'
36
+ };
37
+ var styles = {
38
+ root: {
39
+ width: '100%',
40
+ cursor: 'pointer'
41
+ },
42
+ content: {
43
+ margin: '0 auto',
44
+ textAlign: 'center',
45
+ display: 'flex'
46
+ },
47
+ label: Object.assign({
48
+ width: 'fit-content',
49
+ minWidth: '140px',
50
+ // eslint-disable-next-line
51
+ fontFamily: "'Roboto', sans-serif",
52
+ alignSelf: 'center',
53
+ verticalAlign: 'middle',
54
+ color: `var(--correct-answer-toggle-label-color, ${color.text()})`,
55
+ fontWeight: 'normal'
56
+ }, noTouch),
57
+ icon: {
58
+ position: 'absolute',
59
+ width: '25px'
60
+ },
61
+ iconHolder: {
62
+ width: '25px',
63
+ marginRight: '5px',
64
+ display: 'flex',
65
+ alignItems: 'center'
66
+ },
67
+ enter: {
68
+ opacity: '0'
69
+ },
70
+ enterActive: {
71
+ opacity: '1',
72
+ transition: 'opacity 0.3s ease-in'
73
+ },
74
+ exit: {
75
+ opacity: '1'
76
+ },
77
+ exitActive: {
78
+ opacity: '0',
79
+ transition: 'opacity 0.3s ease-in'
80
+ }
81
+ };
82
+
83
+ const Expander = props => {
84
+ const {
85
+ classes,
86
+ show,
87
+ children
88
+ } = props;
89
+ return /*#__PURE__*/React.createElement(CSSTransition, {
90
+ in: show,
91
+ appear: true,
92
+ mountOnEnter: false,
93
+ timeout: 300,
94
+ classNames: _extends({}, classes)
95
+ }, /*#__PURE__*/React.createElement("div", {
96
+ className: classes.expander
97
+ }, children));
98
+ };
99
+
100
+ Expander.propTypes = {
101
+ show: PropTypes.bool.isRequired,
102
+ className: PropTypes.string,
103
+ classes: PropTypes.object,
104
+ children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired
105
+ };
106
+ const transition = 'height ease-in 300ms, opacity ease-in 300ms';
107
+ var Expander$1 = withStyles(() => ({
108
+ expander: {
109
+ position: 'relative',
110
+ height: 0,
111
+ overflow: 'hidden',
112
+ display: 'flex',
113
+ visibility: 'hidden',
114
+ width: 0
115
+ },
116
+ enter: {
117
+ transition,
118
+ opacity: 1,
119
+ height: 'auto',
120
+ width: 'auto',
121
+ visibility: 'visible',
122
+ minHeight: '25px'
123
+ },
124
+ enterDone: {
125
+ height: 'auto',
126
+ visibility: 'visible',
127
+ width: 'auto',
128
+ minHeight: '25px'
129
+ },
130
+ exit: {
131
+ transition,
132
+ opacity: 0,
133
+ height: 0,
134
+ visibility: 'visible',
135
+ width: 0
136
+ },
137
+ exitDone: {
138
+ opacity: 0,
139
+ visibility: 'hidden',
140
+ height: 0,
141
+ width: 0
142
+ }
143
+ }))(Expander);
144
+
145
+ const {
146
+ translator
147
+ } = Translator;
148
+ /**
149
+ * We export the raw unstyled class for testability. For public use please use the default export.
150
+ */
151
+
152
+ class CorrectAnswerToggle extends React.Component {
153
+ constructor(props) {
154
+ super(props);
155
+ this.state = {
156
+ show: props.show
157
+ };
158
+ CorrectAnswerToggle.defaultProps = _extends({}, CorrectAnswerToggle.defaultProps, {
159
+ showMessage: translator.t('common:showCorrectAnswer', {
160
+ lng: props.language
161
+ }),
162
+ hideMessage: translator.t('common:hideCorrectAnswer', {
163
+ lng: props.language
164
+ })
165
+ });
166
+ }
167
+
168
+ onClick() {
169
+ this.props.onToggle(!this.props.toggled);
170
+ }
171
+
172
+ onTouch(event) {
173
+ event.preventDefault(); // Prevents the default action (click event)
174
+
175
+ this.props.onToggle(!this.props.toggled);
176
+ }
177
+
178
+ UNSAFE_componentWillReceiveProps(nextProps) {
179
+ var _this$props;
180
+
181
+ this.setState({
182
+ show: nextProps.show
183
+ });
184
+
185
+ if (nextProps.language !== ((_this$props = this.props) == null ? void 0 : _this$props.language)) {
186
+ CorrectAnswerToggle.defaultProps = _extends({}, CorrectAnswerToggle.defaultProps, {
187
+ showMessage: translator.t('common:showCorrectAnswer', {
188
+ lng: nextProps.language
189
+ }),
190
+ hideMessage: translator.t('common:hideCorrectAnswer', {
191
+ lng: nextProps.language
192
+ })
193
+ });
194
+ }
195
+ }
196
+
197
+ render() {
198
+ const {
199
+ classes,
200
+ className,
201
+ toggled,
202
+ hideMessage,
203
+ showMessage
204
+ } = this.props;
205
+ return /*#__PURE__*/React.createElement("div", {
206
+ className: classNames(classes.root, className)
207
+ }, /*#__PURE__*/React.createElement(Expander$1, {
208
+ show: this.state.show,
209
+ className: classes.expander
210
+ }, /*#__PURE__*/React.createElement("div", {
211
+ className: classes.content,
212
+ onClick: this.onClick.bind(this),
213
+ onTouchEnd: this.onTouch.bind(this)
214
+ }, /*#__PURE__*/React.createElement("div", {
215
+ className: classes.iconHolder
216
+ }, /*#__PURE__*/React.createElement(CSSTransition$1, {
217
+ timeout: 400,
218
+ in: toggled,
219
+ exit: !toggled,
220
+ classNames: classes
221
+ }, /*#__PURE__*/React.createElement(CorrectResponse, {
222
+ open: toggled,
223
+ key: "correct-open",
224
+ className: classes.icon
225
+ })), /*#__PURE__*/React.createElement(CSSTransition$1, {
226
+ timeout: 5000,
227
+ in: !toggled,
228
+ exit: toggled,
229
+ classNames: classes
230
+ }, /*#__PURE__*/React.createElement(CorrectResponse, {
231
+ open: toggled,
232
+ key: "correct-closed",
233
+ className: classes.icon
234
+ }))), /*#__PURE__*/React.createElement(Readable, {
235
+ false: true
236
+ }, /*#__PURE__*/React.createElement("div", {
237
+ className: classes.label,
238
+ "aria-hidden": !this.state.show
239
+ }, toggled ? hideMessage : showMessage)))));
240
+ }
241
+
242
+ }
243
+ CorrectAnswerToggle.propTypes = {
244
+ onToggle: PropTypes.func,
245
+ toggled: PropTypes.bool,
246
+ show: PropTypes.bool,
247
+ hideMessage: PropTypes.string,
248
+ showMessage: PropTypes.string,
249
+ classes: PropTypes.object.isRequired,
250
+ className: PropTypes.string,
251
+ language: PropTypes.string
252
+ };
253
+ CorrectAnswerToggle.defaultProps = {
254
+ showMessage: 'Show correct answer',
255
+ hideMessage: 'Hide correct answer',
256
+ show: false,
257
+ toggled: false
258
+ };
259
+ var index = withStyles(styles)(CorrectAnswerToggle);
260
+
261
+ export { CorrectAnswerToggle, index as default };
262
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/styles.js","../src/expander.jsx","../src/index.jsx"],"sourcesContent":["import { color } from '@pie-lib/render-ui';\n\nconst noTouch = {\n '-webkit-touchCcallout': 'none',\n '-webkit-user-select': 'none',\n '-khtml-user-select': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none',\n};\n\nexport default {\n root: {\n width: '100%',\n cursor: 'pointer',\n },\n content: {\n margin: '0 auto',\n textAlign: 'center',\n display: 'flex',\n },\n label: Object.assign(\n {\n width: 'fit-content',\n minWidth: '140px',\n // eslint-disable-next-line\n fontFamily: \"'Roboto', sans-serif\",\n alignSelf: 'center',\n verticalAlign: 'middle',\n color: `var(--correct-answer-toggle-label-color, ${color.text()})`,\n fontWeight: 'normal',\n },\n noTouch,\n ),\n icon: {\n position: 'absolute',\n width: '25px',\n },\n iconHolder: {\n width: '25px',\n marginRight: '5px',\n display: 'flex',\n alignItems: 'center',\n },\n enter: {\n opacity: '0',\n },\n enterActive: {\n opacity: '1',\n transition: 'opacity 0.3s ease-in',\n },\n exit: {\n opacity: '1',\n },\n exitActive: {\n opacity: '0',\n transition: 'opacity 0.3s ease-in',\n },\n};\n\nexport const animationStyles = {};\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { withStyles } from '@material-ui/core/styles';\nimport { CSSTransition } from 'react-transition-group';\n\nconst Expander = (props) => {\n const { classes, show, children } = props;\n\n return (\n <CSSTransition in={show} appear={true} mountOnEnter={false} timeout={300} classNames={{ ...classes }}>\n <div className={classes.expander}>{children}</div>\n </CSSTransition>\n );\n};\n\nExpander.propTypes = {\n show: PropTypes.bool.isRequired,\n className: PropTypes.string,\n classes: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n};\n\nconst transition = 'height ease-in 300ms, opacity ease-in 300ms';\n\nexport default withStyles(() => ({\n expander: {\n position: 'relative',\n height: 0,\n overflow: 'hidden',\n display: 'flex',\n visibility: 'hidden',\n width: 0,\n },\n enter: {\n transition,\n opacity: 1,\n height: 'auto',\n width: 'auto',\n visibility: 'visible',\n minHeight: '25px',\n },\n enterDone: {\n height: 'auto',\n visibility: 'visible',\n width: 'auto',\n minHeight: '25px',\n },\n exit: {\n transition,\n opacity: 0,\n height: 0,\n visibility: 'visible',\n width: 0,\n },\n exitDone: {\n opacity: 0,\n visibility: 'hidden',\n height: 0,\n width: 0,\n },\n}))(Expander);\n","import styles from './styles';\nimport { withStyles } from '@material-ui/core/styles';\nimport CSSTransition from 'react-transition-group/CSSTransition';\nimport { CorrectResponse } from '@pie-lib/icons';\nimport { Readable } from '@pie-lib/render-ui';\nimport Expander from './expander';\nimport React from 'react';\nimport classNames from 'classnames';\nimport PropTypes from 'prop-types';\nimport Translator from '@pie-lib/translator';\n\nconst { translator } = Translator;\n\n/**\n * We export the raw unstyled class for testability. For public use please use the default export.\n */\nexport class CorrectAnswerToggle extends React.Component {\n static propTypes = {\n onToggle: PropTypes.func,\n toggled: PropTypes.bool,\n show: PropTypes.bool,\n hideMessage: PropTypes.string,\n showMessage: PropTypes.string,\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n language: PropTypes.string,\n };\n\n static defaultProps = {\n showMessage: 'Show correct answer',\n hideMessage: 'Hide correct answer',\n show: false,\n toggled: false,\n };\n\n constructor(props) {\n super(props);\n this.state = {\n show: props.show,\n };\n\n CorrectAnswerToggle.defaultProps = {\n ...CorrectAnswerToggle.defaultProps,\n showMessage: translator.t('common:showCorrectAnswer', { lng: props.language }),\n hideMessage: translator.t('common:hideCorrectAnswer', { lng: props.language }),\n };\n }\n\n onClick() {\n this.props.onToggle(!this.props.toggled);\n }\n onTouch(event) {\n event.preventDefault(); // Prevents the default action (click event)\n this.props.onToggle(!this.props.toggled);\n }\n\n UNSAFE_componentWillReceiveProps(nextProps) {\n this.setState({\n show: nextProps.show,\n });\n\n if (nextProps.language !== this.props?.language) {\n CorrectAnswerToggle.defaultProps = {\n ...CorrectAnswerToggle.defaultProps,\n showMessage: translator.t('common:showCorrectAnswer', { lng: nextProps.language }),\n hideMessage: translator.t('common:hideCorrectAnswer', { lng: nextProps.language }),\n };\n }\n }\n\n render() {\n const { classes, className, toggled, hideMessage, showMessage } = this.props;\n\n return (\n <div className={classNames(classes.root, className)}>\n <Expander show={this.state.show} className={classes.expander}>\n <div className={classes.content} onClick={this.onClick.bind(this)} onTouchEnd={this.onTouch.bind(this)}>\n <div className={classes.iconHolder}>\n <CSSTransition timeout={400} in={toggled} exit={!toggled} classNames={classes}>\n <CorrectResponse open={toggled} key=\"correct-open\" className={classes.icon} />\n </CSSTransition>\n <CSSTransition timeout={5000} in={!toggled} exit={toggled} classNames={classes}>\n <CorrectResponse open={toggled} key=\"correct-closed\" className={classes.icon} />\n </CSSTransition>\n </div>\n <Readable false>\n <div className={classes.label} aria-hidden={!this.state.show}>\n {toggled ? hideMessage : showMessage}\n </div>\n </Readable>\n </div>\n </Expander>\n </div>\n );\n }\n}\n\nexport default withStyles(styles)(CorrectAnswerToggle);\n"],"names":["noTouch","root","width","cursor","content","margin","textAlign","display","label","Object","assign","minWidth","fontFamily","alignSelf","verticalAlign","color","text","fontWeight","icon","position","iconHolder","marginRight","alignItems","enter","opacity","enterActive","transition","exit","exitActive","Expander","props","classes","show","children","expander","propTypes","PropTypes","bool","isRequired","className","string","object","oneOfType","arrayOf","node","withStyles","height","overflow","visibility","minHeight","enterDone","exitDone","translator","Translator","CorrectAnswerToggle","React","Component","constructor","state","defaultProps","showMessage","t","lng","language","hideMessage","onClick","onToggle","toggled","onTouch","event","preventDefault","UNSAFE_componentWillReceiveProps","nextProps","setState","render","classNames","bind","CSSTransition","func","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAMA,OAAO,GAAG;AACd,EAAA,uBAAA,EAAyB,MADX;AAEd,EAAA,qBAAA,EAAuB,MAFT;AAGd,EAAA,oBAAA,EAAsB,MAHR;AAId,EAAA,kBAAA,EAAoB,MAJN;AAKd,EAAA,iBAAA,EAAmB,MALL;AAMd,EAAA,aAAA,EAAe;AAND,CAAhB;AASA,aAAe;AACbC,EAAAA,IAAI,EAAE;AACJC,IAAAA,KAAK,EAAE,MADH;AAEJC,IAAAA,MAAM,EAAE;AAFJ,GADO;AAKbC,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE,QADD;AAEPC,IAAAA,SAAS,EAAE,QAFJ;AAGPC,IAAAA,OAAO,EAAE;AAHF,GALI;AAUbC,EAAAA,KAAK,EAAEC,MAAM,CAACC,MAAP,CACL;AACER,IAAAA,KAAK,EAAE,aADT;AAEES,IAA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AAA,aAAA,EAAa,CAAC,IAAA,CAAKkD,KAAL,CAAW1B;AAAxD,KAAA,EACGmC,OAAO,GAAGH,WAAH,GAAiBJ,WAD3B,CADF,CATF,CADF,CADF,CADF;AAqBD,EAAA;;AA9EsD;AAA5CN,oBACJnB,YAAY;AACjB+B,EAAAA,QAAQ,EAAE9B,SAAS,CAAC0C,IADH;AAEjBX,EAAAA,OAAO,EAAE/B,SAAS,CAACC,IAFF;AAGjBL,EAAAA,IAAI,EAAEI,SAAS,CAACC,IAHC;AAIjB2B,EAAAA,WAAW,EAAE5B,SAAS,CAACI,MAJN;AAKjBoB,EAAAA,WAAW,EAAExB,SAAS,CAACI,MALN;AAMjBT,EAAAA,OAAO,EAAEK,SAAS,CAACK,MAAV,CAAiBH,UANT;AAOjBC,EAAAA,SAAS,EAAEH,SAAS,CAACI,MAPJ;AAQjBuB,EAAAA,QAAQ,EAAE3B,SAAS,CAACI;AARH;AADRc,oBAYJK,eAAe;AACpBC,EAAAA,WAAW,EAAE,qBADO;AAEpBI,EAAAA,WAAW,EAAE,qBAFO;AAGpBhC,EAAAA,IAAI,EAAE,KAHc;AAIpBmC,EAAAA,OAAO,EAAE;AAJW;AAqExB,YAAetB,UAAU,CAACkC,MAAD,CAAV,CAAmBzB,mBAAnB,CAAf;;;;"}
package/package.json CHANGED
@@ -11,15 +11,15 @@
11
11
  "publishConfig": {
12
12
  "access": "public"
13
13
  },
14
- "version": "2.22.0",
14
+ "version": "2.22.3",
15
15
  "main": "lib/index.js",
16
16
  "module": "src/index.jsx",
17
17
  "scripts": {},
18
18
  "dependencies": {
19
19
  "@material-ui/core": "^3.8.3",
20
- "@pie-lib/icons": "^2.21.0",
21
- "@pie-lib/render-ui": "^4.32.0",
22
- "@pie-lib/translator": "^2.20.0",
20
+ "@pie-lib/icons": "^2.21.2",
21
+ "@pie-lib/render-ui": "^4.32.3",
22
+ "@pie-lib/translator": "^2.20.2",
23
23
  "classnames": "^2.2.6",
24
24
  "lodash": "^4.17.11",
25
25
  "prop-types": "^15.6.2",
@@ -33,5 +33,12 @@
33
33
  "react": "^16.8.1",
34
34
  "react-dom": "^16.8.1"
35
35
  },
36
- "gitHead": "d6cccc4cca72fde471ababc7dce4c6236f5cbc0a"
36
+ "gitHead": "8a327571bd64249e4c88c0c8e750d16d6213f535",
37
+ "exports": {
38
+ ".": {
39
+ "import": "./esm/index.js",
40
+ "require": "./lib/index.js",
41
+ "default": "./esm/index.js"
42
+ }
43
+ }
37
44
  }
package/LICENSE.md DELETED
@@ -1,5 +0,0 @@
1
- Copyright 2019 CoreSpring Inc
2
-
3
- Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
4
-
5
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.