@pie-lib/correct-answer-toggle 2.8.0 → 2.10.0
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/CHANGELOG.md +24 -52
- package/package.json +5 -5
- package/lib/expander.js +0 -88
- package/lib/expander.js.map +0 -1
- package/lib/index.js +0 -181
- package/lib/index.js.map +0 -1
- package/lib/styles.js +0 -66
- package/lib/styles.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
# [2.
|
|
6
|
+
# [2.10.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.10.0) (2025-07-31)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
9
9
|
|
|
@@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
# [2.
|
|
14
|
+
# [2.9.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.9.0) (2025-07-31)
|
|
15
15
|
|
|
16
16
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
# [2.
|
|
22
|
+
# [2.8.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.8.0) (2025-07-31)
|
|
23
23
|
|
|
24
24
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
25
25
|
|
|
@@ -27,7 +27,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
# [2.
|
|
30
|
+
# [2.9.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.9.0) (2025-07-31)
|
|
31
31
|
|
|
32
32
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
33
33
|
|
|
@@ -35,7 +35,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
# [2.
|
|
38
|
+
# [2.8.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.8.0) (2025-07-31)
|
|
39
39
|
|
|
40
40
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
# [2.
|
|
46
|
+
# [2.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.7.0) (2025-07-31)
|
|
47
47
|
|
|
48
48
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
49
49
|
|
|
@@ -51,118 +51,90 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
51
51
|
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
# [2.
|
|
54
|
+
# [2.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.7.0) (2025-07-31)
|
|
55
55
|
|
|
56
56
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
57
57
|
|
|
58
|
+
# [2.8.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.8.0) (2025-07-31)
|
|
58
59
|
|
|
60
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
59
61
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
# [2.6.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.5) (2025-07-25)
|
|
62
|
+
# [2.7.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.7.0) (2025-07-31)
|
|
63
63
|
|
|
64
64
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
65
65
|
|
|
66
|
+
# [2.6.0-beta.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.8) (2025-07-25)
|
|
66
67
|
|
|
68
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
67
69
|
|
|
70
|
+
# [2.6.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.7) (2025-07-25)
|
|
68
71
|
|
|
72
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
69
73
|
|
|
70
|
-
# [2.6.0-beta.
|
|
74
|
+
# [2.6.0-beta.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.7) (2025-07-25)
|
|
71
75
|
|
|
72
76
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
73
77
|
|
|
78
|
+
# [2.6.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.6) (2025-07-25)
|
|
74
79
|
|
|
80
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
75
81
|
|
|
82
|
+
# [2.6.0-beta.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.6) (2025-07-25)
|
|
76
83
|
|
|
84
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
77
85
|
|
|
78
|
-
# [2.6.0-beta.
|
|
86
|
+
# [2.6.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.5) (2025-07-25)
|
|
79
87
|
|
|
80
88
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
81
89
|
|
|
90
|
+
# [2.6.0-beta.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.5) (2025-07-25)
|
|
82
91
|
|
|
92
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
83
93
|
|
|
94
|
+
# [2.6.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.4) (2025-07-25)
|
|
84
95
|
|
|
96
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
85
97
|
|
|
86
98
|
# [2.6.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.3) (2025-07-25)
|
|
87
99
|
|
|
88
100
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
102
|
# [2.6.0-beta.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.4) (2025-07-23)
|
|
95
103
|
|
|
96
104
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
106
|
# [2.6.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.3) (2025-07-23)
|
|
103
107
|
|
|
104
108
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
105
109
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
110
|
# [2.6.0-beta.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.3) (2025-07-20)
|
|
111
111
|
|
|
112
112
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
113
113
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
114
|
# [2.6.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.2) (2025-07-20)
|
|
119
115
|
|
|
120
116
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
121
117
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
118
|
# [2.6.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.1) (2025-07-20)
|
|
127
119
|
|
|
128
120
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
129
121
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
122
|
# [2.6.0-beta.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.2) (2025-07-20)
|
|
135
123
|
|
|
136
124
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
137
125
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
126
|
# [2.6.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.1) (2025-07-20)
|
|
143
127
|
|
|
144
128
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
145
129
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
130
|
# [2.6.0-beta.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.1) (2025-07-20)
|
|
151
131
|
|
|
152
132
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
153
133
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
134
|
# [2.6.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.6.0-beta.0) (2025-07-20)
|
|
159
135
|
|
|
160
136
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
161
137
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
138
|
# [2.7.0-beta.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.7.0-beta.0) (2025-07-15)
|
|
167
139
|
|
|
168
140
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
package/package.json
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.10.0",
|
|
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": "
|
|
21
|
-
"@pie-lib/render-ui": "
|
|
22
|
-
"@pie-lib/translator": "
|
|
20
|
+
"@pie-lib/icons": "^2.9.0",
|
|
21
|
+
"@pie-lib/render-ui": "^4.20.0",
|
|
22
|
+
"@pie-lib/translator": "^2.8.0",
|
|
23
23
|
"classnames": "^2.2.6",
|
|
24
24
|
"lodash": "^4.17.11",
|
|
25
25
|
"prop-types": "^15.6.2",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"react": "^16.8.1",
|
|
34
34
|
"react-dom": "^16.8.1"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "889a13bfea2c768b8a3a6eabfc6fe7b7725aa832"
|
|
37
37
|
}
|
package/lib/expander.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireDefault(require("react"));
|
|
13
|
-
|
|
14
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
|
|
16
|
-
var _styles = require("@material-ui/core/styles");
|
|
17
|
-
|
|
18
|
-
var _reactTransitionGroup = require("react-transition-group");
|
|
19
|
-
|
|
20
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
-
|
|
22
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
-
|
|
24
|
-
var Expander = function Expander(props) {
|
|
25
|
-
var classes = props.classes,
|
|
26
|
-
show = props.show,
|
|
27
|
-
children = props.children;
|
|
28
|
-
return /*#__PURE__*/_react["default"].createElement(_reactTransitionGroup.CSSTransition, {
|
|
29
|
-
"in": show,
|
|
30
|
-
appear: true,
|
|
31
|
-
mountOnEnter: false,
|
|
32
|
-
timeout: 300,
|
|
33
|
-
classNames: _objectSpread({}, classes)
|
|
34
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
|
-
className: classes.expander
|
|
36
|
-
}, children));
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
Expander.propTypes = {
|
|
40
|
-
show: _propTypes["default"].bool.isRequired,
|
|
41
|
-
className: _propTypes["default"].string,
|
|
42
|
-
classes: _propTypes["default"].object,
|
|
43
|
-
children: _propTypes["default"].oneOfType([_propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]).isRequired
|
|
44
|
-
};
|
|
45
|
-
var transition = 'height ease-in 300ms, opacity ease-in 300ms';
|
|
46
|
-
|
|
47
|
-
var _default = (0, _styles.withStyles)(function () {
|
|
48
|
-
return {
|
|
49
|
-
expander: {
|
|
50
|
-
position: 'relative',
|
|
51
|
-
height: 0,
|
|
52
|
-
overflow: 'hidden',
|
|
53
|
-
display: 'flex',
|
|
54
|
-
visibility: 'hidden',
|
|
55
|
-
width: 0
|
|
56
|
-
},
|
|
57
|
-
enter: {
|
|
58
|
-
transition: transition,
|
|
59
|
-
opacity: 1,
|
|
60
|
-
height: 'auto',
|
|
61
|
-
width: 'auto',
|
|
62
|
-
visibility: 'visible',
|
|
63
|
-
minHeight: '25px'
|
|
64
|
-
},
|
|
65
|
-
enterDone: {
|
|
66
|
-
height: 'auto',
|
|
67
|
-
visibility: 'visible',
|
|
68
|
-
width: 'auto',
|
|
69
|
-
minHeight: '25px'
|
|
70
|
-
},
|
|
71
|
-
exit: {
|
|
72
|
-
transition: transition,
|
|
73
|
-
opacity: 0,
|
|
74
|
-
height: 0,
|
|
75
|
-
visibility: 'visible',
|
|
76
|
-
width: 0
|
|
77
|
-
},
|
|
78
|
-
exitDone: {
|
|
79
|
-
opacity: 0,
|
|
80
|
-
visibility: 'hidden',
|
|
81
|
-
height: 0,
|
|
82
|
-
width: 0
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
})(Expander);
|
|
86
|
-
|
|
87
|
-
exports["default"] = _default;
|
|
88
|
-
//# sourceMappingURL=expander.js.map
|
package/lib/expander.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/expander.jsx"],"names":["Expander","props","classes","show","children","expander","propTypes","PropTypes","bool","isRequired","className","string","object","oneOfType","arrayOf","node","transition","position","height","overflow","display","visibility","width","enter","opacity","minHeight","enterDone","exit","exitDone"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAAW;AAC1B,MAAQC,OAAR,GAAoCD,KAApC,CAAQC,OAAR;AAAA,MAAiBC,IAAjB,GAAoCF,KAApC,CAAiBE,IAAjB;AAAA,MAAuBC,QAAvB,GAAoCH,KAApC,CAAuBG,QAAvB;AAEA,sBACE,gCAAC,mCAAD;AAAe,UAAID,IAAnB;AAAyB,IAAA,MAAM,EAAE,IAAjC;AAAuC,IAAA,YAAY,EAAE,KAArD;AAA4D,IAAA,OAAO,EAAE,GAAr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GJN,MAAAA,MAAM,EAAE,CAHJ;AAIJG,MAAAA,UAAU,EAAE,SAJR;AAKJC,MAAAA,KAAK,EAAE;AALH,KAvByB;AA8B/BM,IAAAA,QAAQ,EAAE;AACRJ,MAAAA,OAAO,EAAE,CADD;AAERH,MAAAA,UAAU,EAAE,QAFJ;AAGRH,MAAAA,MAAM,EAAE,CAHA;AAIRI,MAAAA,KAAK,EAAE;AAJC;AA9BqB,GAAP;AAAA,CAAX,EAoCXtB,QApCW,C","sourcesContent":["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"],"file":"expander.js"}
|
package/lib/index.js
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = exports.CorrectAnswerToggle = void 0;
|
|
9
|
-
|
|
10
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
15
|
-
|
|
16
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
17
|
-
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
|
|
20
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
21
|
-
|
|
22
|
-
var _styles = _interopRequireDefault(require("./styles"));
|
|
23
|
-
|
|
24
|
-
var _styles2 = require("@material-ui/core/styles");
|
|
25
|
-
|
|
26
|
-
var _CSSTransition = _interopRequireDefault(require("react-transition-group/CSSTransition"));
|
|
27
|
-
|
|
28
|
-
var _icons = require("@pie-lib/icons");
|
|
29
|
-
|
|
30
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
31
|
-
|
|
32
|
-
var _expander = _interopRequireDefault(require("./expander"));
|
|
33
|
-
|
|
34
|
-
var _react = _interopRequireDefault(require("react"));
|
|
35
|
-
|
|
36
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
37
|
-
|
|
38
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
39
|
-
|
|
40
|
-
var _translator = _interopRequireDefault(require("@pie-lib/translator"));
|
|
41
|
-
|
|
42
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
43
|
-
|
|
44
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
45
|
-
|
|
46
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
|
|
47
|
-
|
|
48
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
|
-
|
|
50
|
-
var translator = _translator["default"].translator;
|
|
51
|
-
/**
|
|
52
|
-
* We export the raw unstyled class for testability. For public use please use the default export.
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
var CorrectAnswerToggle = /*#__PURE__*/function (_React$Component) {
|
|
56
|
-
(0, _inherits2["default"])(CorrectAnswerToggle, _React$Component);
|
|
57
|
-
|
|
58
|
-
var _super = _createSuper(CorrectAnswerToggle);
|
|
59
|
-
|
|
60
|
-
function CorrectAnswerToggle(props) {
|
|
61
|
-
var _this;
|
|
62
|
-
|
|
63
|
-
(0, _classCallCheck2["default"])(this, CorrectAnswerToggle);
|
|
64
|
-
_this = _super.call(this, props);
|
|
65
|
-
_this.state = {
|
|
66
|
-
show: props.show
|
|
67
|
-
};
|
|
68
|
-
CorrectAnswerToggle.defaultProps = _objectSpread(_objectSpread({}, CorrectAnswerToggle.defaultProps), {}, {
|
|
69
|
-
showMessage: translator.t('common:showCorrectAnswer', {
|
|
70
|
-
lng: props.language
|
|
71
|
-
}),
|
|
72
|
-
hideMessage: translator.t('common:hideCorrectAnswer', {
|
|
73
|
-
lng: props.language
|
|
74
|
-
})
|
|
75
|
-
});
|
|
76
|
-
return _this;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
(0, _createClass2["default"])(CorrectAnswerToggle, [{
|
|
80
|
-
key: "onClick",
|
|
81
|
-
value: function onClick() {
|
|
82
|
-
this.props.onToggle(!this.props.toggled);
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
85
|
-
key: "onTouch",
|
|
86
|
-
value: function onTouch(event) {
|
|
87
|
-
event.preventDefault(); // Prevents the default action (click event)
|
|
88
|
-
|
|
89
|
-
this.props.onToggle(!this.props.toggled);
|
|
90
|
-
}
|
|
91
|
-
}, {
|
|
92
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
93
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
94
|
-
var _this$props;
|
|
95
|
-
|
|
96
|
-
this.setState({
|
|
97
|
-
show: nextProps.show
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
if (nextProps.language !== ((_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.language)) {
|
|
101
|
-
CorrectAnswerToggle.defaultProps = _objectSpread(_objectSpread({}, CorrectAnswerToggle.defaultProps), {}, {
|
|
102
|
-
showMessage: translator.t('common:showCorrectAnswer', {
|
|
103
|
-
lng: nextProps.language
|
|
104
|
-
}),
|
|
105
|
-
hideMessage: translator.t('common:hideCorrectAnswer', {
|
|
106
|
-
lng: nextProps.language
|
|
107
|
-
})
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}, {
|
|
112
|
-
key: "render",
|
|
113
|
-
value: function render() {
|
|
114
|
-
var _this$props2 = this.props,
|
|
115
|
-
classes = _this$props2.classes,
|
|
116
|
-
className = _this$props2.className,
|
|
117
|
-
toggled = _this$props2.toggled,
|
|
118
|
-
hideMessage = _this$props2.hideMessage,
|
|
119
|
-
showMessage = _this$props2.showMessage;
|
|
120
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
121
|
-
className: (0, _classnames["default"])(classes.root, className)
|
|
122
|
-
}, /*#__PURE__*/_react["default"].createElement(_expander["default"], {
|
|
123
|
-
show: this.state.show,
|
|
124
|
-
className: classes.expander
|
|
125
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
126
|
-
className: classes.content,
|
|
127
|
-
onClick: this.onClick.bind(this),
|
|
128
|
-
onTouchEnd: this.onTouch.bind(this)
|
|
129
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
|
-
className: classes.iconHolder
|
|
131
|
-
}, /*#__PURE__*/_react["default"].createElement(_CSSTransition["default"], {
|
|
132
|
-
timeout: 400,
|
|
133
|
-
"in": toggled,
|
|
134
|
-
exit: !toggled,
|
|
135
|
-
classNames: classes
|
|
136
|
-
}, /*#__PURE__*/_react["default"].createElement(_icons.CorrectResponse, {
|
|
137
|
-
open: toggled,
|
|
138
|
-
key: "correct-open",
|
|
139
|
-
className: classes.icon
|
|
140
|
-
})), /*#__PURE__*/_react["default"].createElement(_CSSTransition["default"], {
|
|
141
|
-
timeout: 5000,
|
|
142
|
-
"in": !toggled,
|
|
143
|
-
exit: toggled,
|
|
144
|
-
classNames: classes
|
|
145
|
-
}, /*#__PURE__*/_react["default"].createElement(_icons.CorrectResponse, {
|
|
146
|
-
open: toggled,
|
|
147
|
-
key: "correct-closed",
|
|
148
|
-
className: classes.icon
|
|
149
|
-
}))), /*#__PURE__*/_react["default"].createElement(_renderUi.Readable, {
|
|
150
|
-
"false": true
|
|
151
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
152
|
-
className: classes.label,
|
|
153
|
-
"aria-hidden": !this.state.show
|
|
154
|
-
}, toggled ? hideMessage : showMessage)))));
|
|
155
|
-
}
|
|
156
|
-
}]);
|
|
157
|
-
return CorrectAnswerToggle;
|
|
158
|
-
}(_react["default"].Component);
|
|
159
|
-
|
|
160
|
-
exports.CorrectAnswerToggle = CorrectAnswerToggle;
|
|
161
|
-
(0, _defineProperty2["default"])(CorrectAnswerToggle, "propTypes", {
|
|
162
|
-
onToggle: _propTypes["default"].func,
|
|
163
|
-
toggled: _propTypes["default"].bool,
|
|
164
|
-
show: _propTypes["default"].bool,
|
|
165
|
-
hideMessage: _propTypes["default"].string,
|
|
166
|
-
showMessage: _propTypes["default"].string,
|
|
167
|
-
classes: _propTypes["default"].object.isRequired,
|
|
168
|
-
className: _propTypes["default"].string,
|
|
169
|
-
language: _propTypes["default"].string
|
|
170
|
-
});
|
|
171
|
-
(0, _defineProperty2["default"])(CorrectAnswerToggle, "defaultProps", {
|
|
172
|
-
showMessage: 'Show correct answer',
|
|
173
|
-
hideMessage: 'Hide correct answer',
|
|
174
|
-
show: false,
|
|
175
|
-
toggled: false
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
var _default = (0, _styles2.withStyles)(_styles["default"])(CorrectAnswerToggle);
|
|
179
|
-
|
|
180
|
-
exports["default"] = _default;
|
|
181
|
-
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.jsx"],"names":["translator","Translator","CorrectAnswerToggle","props","state","show","defaultProps","showMessage","t","lng","language","hideMessage","onToggle","toggled","event","preventDefault","nextProps","setState","classes","className","root","expander","content","onClick","bind","onTouch","iconHolder","icon","label","React","Component","PropTypes","func","bool","string","object","isRequired","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AA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iB,QAAA,IAAI,EAAEL,OAAvB;AAAgC,QAAA,GAAG,EAAC,gBAApC;AAAqD,QAAA,SAAS,EAAEK,OAAO,CAACS;AAAxE,QADF,CAJF,CADF,eASE,gCAAC,kBAAD;AAAU;AAAV,sBACE;AAAK,QAAA,SAAS,EAAET,OAAO,CAACU,KAAxB;AAA+B,uBAAa,CAAC,KAAKxB,KAAL,CAAWC;AAAxD,SACGQ,OAAO,GAAGF,WAAH,GAAiBJ,WAD3B,CADF,CATF,CADF,CADF,CADF;AAqBD;;;EA9EsCsB,kBAAMC,S;;;iCAAlC5B,mB,eACQ;AACjBU,EAAAA,QAAQ,EAAEmB,sBAAUC,IADH;AAEjBnB,EAAAA,OAAO,EAAEkB,sBAAUE,IAFF;AAGjB5B,EAAAA,IAAI,EAAE0B,sBAAUE,IAHC;AAIjBtB,EAAAA,WAAW,EAAEoB,sBAAUG,MAJN;AAKjB3B,EAAAA,WAAW,EAAEwB,sBAAUG,MALN;AAMjBhB,EAAAA,OAAO,EAAEa,sBAAUI,MAAV,CAAiBC,UANT;AAOjBjB,EAAAA,SAAS,EAAEY,sBAAUG,MAPJ;AAQjBxB,EAAAA,QAAQ,EAAEqB,sBAAUG;AARH,C;iCADRhC,mB,kBAYW;AACpBK,EAAAA,WAAW,EAAE,qBADO;AAEpBI,EAAAA,WAAW,EAAE,qBAFO;AAGpBN,EAAAA,IAAI,EAAE,KAHc;AAIpBQ,EAAAA,OAAO,EAAE;AAJW,C;;eAqET,yBAAWwB,kBAAX,EAAmBnC,mBAAnB,C","sourcesContent":["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"],"file":"index.js"}
|
package/lib/styles.js
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.animationStyles = void 0;
|
|
7
|
-
|
|
8
|
-
var _renderUi = require("@pie-lib/render-ui");
|
|
9
|
-
|
|
10
|
-
var noTouch = {
|
|
11
|
-
'-webkit-touchCcallout': 'none',
|
|
12
|
-
'-webkit-user-select': 'none',
|
|
13
|
-
'-khtml-user-select': 'none',
|
|
14
|
-
'-moz-user-select': 'none',
|
|
15
|
-
'-ms-user-select': 'none',
|
|
16
|
-
'user-select': 'none'
|
|
17
|
-
};
|
|
18
|
-
var _default = {
|
|
19
|
-
root: {
|
|
20
|
-
width: '100%',
|
|
21
|
-
cursor: 'pointer'
|
|
22
|
-
},
|
|
23
|
-
content: {
|
|
24
|
-
margin: '0 auto',
|
|
25
|
-
textAlign: 'center',
|
|
26
|
-
display: 'flex'
|
|
27
|
-
},
|
|
28
|
-
label: Object.assign({
|
|
29
|
-
width: 'fit-content',
|
|
30
|
-
minWidth: '140px',
|
|
31
|
-
// eslint-disable-next-line
|
|
32
|
-
fontFamily: "'Roboto', sans-serif",
|
|
33
|
-
alignSelf: 'center',
|
|
34
|
-
verticalAlign: 'middle',
|
|
35
|
-
color: "var(--correct-answer-toggle-label-color, ".concat(_renderUi.color.text(), ")"),
|
|
36
|
-
fontWeight: 'normal'
|
|
37
|
-
}, noTouch),
|
|
38
|
-
icon: {
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
width: '25px'
|
|
41
|
-
},
|
|
42
|
-
iconHolder: {
|
|
43
|
-
width: '25px',
|
|
44
|
-
marginRight: '5px',
|
|
45
|
-
display: 'flex',
|
|
46
|
-
alignItems: 'center'
|
|
47
|
-
},
|
|
48
|
-
enter: {
|
|
49
|
-
opacity: '0'
|
|
50
|
-
},
|
|
51
|
-
enterActive: {
|
|
52
|
-
opacity: '1',
|
|
53
|
-
transition: 'opacity 0.3s ease-in'
|
|
54
|
-
},
|
|
55
|
-
exit: {
|
|
56
|
-
opacity: '1'
|
|
57
|
-
},
|
|
58
|
-
exitActive: {
|
|
59
|
-
opacity: '0',
|
|
60
|
-
transition: 'opacity 0.3s ease-in'
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
exports["default"] = _default;
|
|
64
|
-
var animationStyles = {};
|
|
65
|
-
exports.animationStyles = animationStyles;
|
|
66
|
-
//# sourceMappingURL=styles.js.map
|
package/lib/styles.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles.js"],"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","animationStyles"],"mappings":";;;;;;;AAAA;;AAEA,IAAMA,OAAO,GAAG;AACd,2BAAyB,MADX;AAEd,yBAAuB,MAFT;AAGd,wBAAsB,MAHR;AAId,sBAAoB,MAJN;AAKd,qBAAmB,MALL;AAMd,iBAAe;AAND,CAAhB;eASe;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,IAAAA,QAAQ,EAAE,OAFZ;AAGE;AACAC,IAAAA,UAAU,EAAE,sBAJd;AAKEC,IAAAA,SAAS,EAAE,QALb;AAMEC,IAAAA,aAAa,EAAE,QANjB;AAOEC,IAAAA,KAAK,sDAA+CA,gBAAMC,IAAN,EAA/C,MAPP;AAQEC,IAAAA,UAAU,EAAE;AARd,GADK,EAWLjB,OAXK,CAVM;AAuBbkB,EAAAA,IAAI,EAAE;AACJC,IAAAA,QAAQ,EAAE,UADN;AAEJjB,IAAAA,KAAK,EAAE;AAFH,GAvBO;AA2BbkB,EAAAA,UAAU,EAAE;AACVlB,IAAAA,KAAK,EAAE,MADG;AAEVmB,IAAAA,WAAW,EAAE,KAFH;AAGVd,IAAAA,OAAO,EAAE,MAHC;AAIVe,IAAAA,UAAU,EAAE;AAJF,GA3BC;AAiCbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,OAAO,EAAE;AADJ,GAjCM;AAoCbC,EAAAA,WAAW,EAAE;AACXD,IAAAA,OAAO,EAAE,GADE;AAEXE,IAAAA,UAAU,EAAE;AAFD,GApCA;AAwCbC,EAAAA,IAAI,EAAE;AACJH,IAAAA,OAAO,EAAE;AADL,GAxCO;AA2CbI,EAAAA,UAAU,EAAE;AACVJ,IAAAA,OAAO,EAAE,GADC;AAEVE,IAAAA,UAAU,EAAE;AAFF;AA3CC,C;;AAiDR,IAAMG,eAAe,GAAG,EAAxB","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"],"file":"styles.js"}
|