@pie-lib/correct-answer-toggle 2.6.1-beta.0 → 2.8.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.json +1 -547
- package/CHANGELOG.md +145 -1
- package/lib/expander.js +88 -0
- package/lib/expander.js.map +1 -0
- package/lib/index.js +181 -0
- package/lib/index.js.map +1 -0
- package/lib/styles.js +66 -0
- package/lib/styles.js.map +1 -0
- package/package.json +5 -5
package/CHANGELOG.json
CHANGED
|
@@ -1,547 +1 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"type": "fix",
|
|
4
|
-
"scope": null,
|
|
5
|
-
"subject": "rm child prepack in favour of root prepack",
|
|
6
|
-
"merge": null,
|
|
7
|
-
"header": "fix: rm child prepack in favour of root prepack",
|
|
8
|
-
"body": null,
|
|
9
|
-
"footer": null,
|
|
10
|
-
"notes": [],
|
|
11
|
-
"hash": "381d8d6485269b641d8d4655148966d2e70803be",
|
|
12
|
-
"gitTags": "",
|
|
13
|
-
"committerDate": "2019-03-15 09:51:11 +0000",
|
|
14
|
-
"isTagged": true,
|
|
15
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.14"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"type": "chore",
|
|
19
|
-
"scope": null,
|
|
20
|
-
"subject": "call changelog on prepack",
|
|
21
|
-
"merge": null,
|
|
22
|
-
"header": "chore: call changelog on prepack",
|
|
23
|
-
"body": null,
|
|
24
|
-
"footer": null,
|
|
25
|
-
"notes": [],
|
|
26
|
-
"hash": "b672c012de096c55b765a765f758da3fc5df2f90",
|
|
27
|
-
"gitTags": "",
|
|
28
|
-
"committerDate": "2019-03-13 23:00:44 +0000",
|
|
29
|
-
"isTagged": true,
|
|
30
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.10"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"type": "chore",
|
|
34
|
-
"scope": null,
|
|
35
|
-
"subject": "generate changelog.json instead of markdown",
|
|
36
|
-
"merge": null,
|
|
37
|
-
"header": "chore: generate changelog.json instead of markdown",
|
|
38
|
-
"body": null,
|
|
39
|
-
"footer": null,
|
|
40
|
-
"notes": [],
|
|
41
|
-
"hash": "eaa5019a11f70c53425d55856bd3b940237f8c7d",
|
|
42
|
-
"gitTags": "",
|
|
43
|
-
"committerDate": "2019-03-13 17:24:09 +0000",
|
|
44
|
-
"isTagged": true,
|
|
45
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.10"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"type": "chore",
|
|
49
|
-
"scope": null,
|
|
50
|
-
"subject": "force version bump to avoid collision w/ next packages",
|
|
51
|
-
"merge": null,
|
|
52
|
-
"header": "chore: force version bump to avoid collision w/ next packages",
|
|
53
|
-
"body": null,
|
|
54
|
-
"footer": null,
|
|
55
|
-
"notes": [],
|
|
56
|
-
"hash": "a05f0fdb47f72d3a3d839cd70e96de6642a44c1e",
|
|
57
|
-
"gitTags": "",
|
|
58
|
-
"committerDate": "2019-03-12 21:55:40 +0000",
|
|
59
|
-
"isTagged": true,
|
|
60
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.10"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"type": "fix",
|
|
64
|
-
"scope": null,
|
|
65
|
-
"subject": "test fix",
|
|
66
|
-
"merge": null,
|
|
67
|
-
"header": "fix: test fix",
|
|
68
|
-
"body": null,
|
|
69
|
-
"footer": null,
|
|
70
|
-
"notes": [],
|
|
71
|
-
"hash": "7830199a7c3b9044bb40c36ef94d05aa0394a8b0",
|
|
72
|
-
"gitTags": "",
|
|
73
|
-
"committerDate": "2019-03-08 15:08:28 +0000",
|
|
74
|
-
"isTagged": true,
|
|
75
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.10"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
"type": "fix",
|
|
79
|
-
"scope": null,
|
|
80
|
-
"subject": "libs version bump",
|
|
81
|
-
"merge": null,
|
|
82
|
-
"header": "fix: libs version bump",
|
|
83
|
-
"body": null,
|
|
84
|
-
"footer": null,
|
|
85
|
-
"notes": [],
|
|
86
|
-
"hash": "e2c77c1d39ecaafd5ab98672e0fd627f7c6264d0",
|
|
87
|
-
"gitTags": "",
|
|
88
|
-
"committerDate": "2019-01-30 21:53:31 +0000",
|
|
89
|
-
"isTagged": true,
|
|
90
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.1"
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
"type": "feat",
|
|
94
|
-
"scope": null,
|
|
95
|
-
"subject": "upgrade material-ui -> @material-ui/core@^1.0.0-rc.1",
|
|
96
|
-
"merge": null,
|
|
97
|
-
"header": "feat: upgrade material-ui -> @material-ui/core@^1.0.0-rc.1",
|
|
98
|
-
"body": null,
|
|
99
|
-
"footer": null,
|
|
100
|
-
"notes": [],
|
|
101
|
-
"hash": "017ef6300f1fd345fc932496d25682a7981a4938",
|
|
102
|
-
"gitTags": "",
|
|
103
|
-
"committerDate": "2018-05-15 21:52:09 -0400",
|
|
104
|
-
"isTagged": true,
|
|
105
|
-
"tag": "@pie-lib/correct-answer-toggle@2.1.0"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
"type": "fix",
|
|
109
|
-
"scope": "lint",
|
|
110
|
-
"subject": "lint fixes",
|
|
111
|
-
"merge": null,
|
|
112
|
-
"header": "fix(lint): lint fixes",
|
|
113
|
-
"body": null,
|
|
114
|
-
"footer": null,
|
|
115
|
-
"notes": [],
|
|
116
|
-
"hash": "f0595831a75561d829c0f18f86ce5ea7feeb4ddd",
|
|
117
|
-
"gitTags": "",
|
|
118
|
-
"committerDate": "2018-05-09 13:35:42 -0400",
|
|
119
|
-
"isTagged": true,
|
|
120
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"type": "fix",
|
|
124
|
-
"scope": "lint",
|
|
125
|
-
"subject": "automatic lint fixes",
|
|
126
|
-
"merge": null,
|
|
127
|
-
"header": "fix(lint): automatic lint fixes",
|
|
128
|
-
"body": null,
|
|
129
|
-
"footer": null,
|
|
130
|
-
"notes": [],
|
|
131
|
-
"hash": "7c9a2a42d3b27e09cd8660cb22abfed419c187d5",
|
|
132
|
-
"gitTags": "",
|
|
133
|
-
"committerDate": "2018-05-09 12:33:39 -0400",
|
|
134
|
-
"isTagged": true,
|
|
135
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"type": "fix",
|
|
139
|
-
"scope": "dependencies",
|
|
140
|
-
"subject": "set material-ui version to ^1.0.0-beta.44",
|
|
141
|
-
"merge": null,
|
|
142
|
-
"header": "fix(dependencies): set material-ui version to ^1.0.0-beta.44",
|
|
143
|
-
"body": null,
|
|
144
|
-
"footer": null,
|
|
145
|
-
"notes": [],
|
|
146
|
-
"hash": "6fd66bc6b4359a32c378f64cd3a315f1a551875e",
|
|
147
|
-
"gitTags": "",
|
|
148
|
-
"committerDate": "2018-04-30 11:38:04 -0400",
|
|
149
|
-
"isTagged": true,
|
|
150
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
"type": "fix",
|
|
154
|
-
"scope": "dependencies",
|
|
155
|
-
"subject": "lock material-ui to 1.0.0-beta.44",
|
|
156
|
-
"merge": null,
|
|
157
|
-
"header": "fix(dependencies): lock material-ui to 1.0.0-beta.44",
|
|
158
|
-
"body": null,
|
|
159
|
-
"footer": null,
|
|
160
|
-
"notes": [],
|
|
161
|
-
"hash": "60df8e6e6147962cd6fae9bc81638c4c75c0c9e9",
|
|
162
|
-
"gitTags": "",
|
|
163
|
-
"committerDate": "2018-04-30 11:27:53 -0400",
|
|
164
|
-
"isTagged": true,
|
|
165
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
166
|
-
},
|
|
167
|
-
{
|
|
168
|
-
"type": "fix",
|
|
169
|
-
"scope": "dependencies",
|
|
170
|
-
"subject": "lock material-ui to 1.0.0-beta.43",
|
|
171
|
-
"merge": null,
|
|
172
|
-
"header": "fix(dependencies): lock material-ui to 1.0.0-beta.43",
|
|
173
|
-
"body": null,
|
|
174
|
-
"footer": null,
|
|
175
|
-
"notes": [],
|
|
176
|
-
"hash": "2a3e087cadb03b428aec80948032eb644864f77c",
|
|
177
|
-
"gitTags": "",
|
|
178
|
-
"committerDate": "2018-04-30 11:19:39 -0400",
|
|
179
|
-
"isTagged": true,
|
|
180
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"type": "fix",
|
|
184
|
-
"scope": "dependencies",
|
|
185
|
-
"subject": "upgrade material-ui",
|
|
186
|
-
"merge": null,
|
|
187
|
-
"header": "fix(dependencies): upgrade material-ui",
|
|
188
|
-
"body": null,
|
|
189
|
-
"footer": null,
|
|
190
|
-
"notes": [],
|
|
191
|
-
"hash": "b94b50ef8f89beec45b488d92f4e95661c22c501",
|
|
192
|
-
"gitTags": "",
|
|
193
|
-
"committerDate": "2018-04-30 10:56:18 -0400",
|
|
194
|
-
"isTagged": true,
|
|
195
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
"type": "fix",
|
|
199
|
-
"scope": "dependencies",
|
|
200
|
-
"subject": "version bump",
|
|
201
|
-
"merge": null,
|
|
202
|
-
"header": "fix(dependencies): version bump",
|
|
203
|
-
"body": null,
|
|
204
|
-
"footer": null,
|
|
205
|
-
"notes": [],
|
|
206
|
-
"hash": "dd82caf94c20800135c8baaf1e9f2a5f01e65776",
|
|
207
|
-
"gitTags": "",
|
|
208
|
-
"committerDate": "2018-04-24 09:43:35 -0400",
|
|
209
|
-
"isTagged": true,
|
|
210
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
211
|
-
},
|
|
212
|
-
{
|
|
213
|
-
"type": "fix",
|
|
214
|
-
"scope": "test",
|
|
215
|
-
"subject": "normalize tests",
|
|
216
|
-
"merge": null,
|
|
217
|
-
"header": "fix(test): normalize tests",
|
|
218
|
-
"body": null,
|
|
219
|
-
"footer": null,
|
|
220
|
-
"notes": [],
|
|
221
|
-
"hash": "b86b3d9bbe94b88a5c9b2473c26beec637e23672",
|
|
222
|
-
"gitTags": "",
|
|
223
|
-
"committerDate": "2018-04-19 22:25:09 -0400",
|
|
224
|
-
"isTagged": true,
|
|
225
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
"type": "fix",
|
|
229
|
-
"scope": "size",
|
|
230
|
-
"subject": "fix icon size",
|
|
231
|
-
"merge": null,
|
|
232
|
-
"header": "fix(size): fix icon size",
|
|
233
|
-
"body": null,
|
|
234
|
-
"footer": null,
|
|
235
|
-
"notes": [],
|
|
236
|
-
"hash": "440c4511096b6213e2be6350673dbc0a730bbdac",
|
|
237
|
-
"gitTags": "",
|
|
238
|
-
"committerDate": "2018-04-19 12:52:20 -0400",
|
|
239
|
-
"isTagged": true,
|
|
240
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
"type": "fix",
|
|
244
|
-
"scope": "package",
|
|
245
|
-
"subject": "update package",
|
|
246
|
-
"merge": null,
|
|
247
|
-
"header": "fix(package): update package",
|
|
248
|
-
"body": null,
|
|
249
|
-
"footer": null,
|
|
250
|
-
"notes": [],
|
|
251
|
-
"hash": "4284e9157ad876d8bb95c8c9a576a47c360959c0",
|
|
252
|
-
"gitTags": "",
|
|
253
|
-
"committerDate": "2018-04-19 11:49:31 -0400",
|
|
254
|
-
"isTagged": true,
|
|
255
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
"type": "fix",
|
|
259
|
-
"scope": "css",
|
|
260
|
-
"subject": "rm test style",
|
|
261
|
-
"merge": null,
|
|
262
|
-
"header": "fix(css): rm test style",
|
|
263
|
-
"body": null,
|
|
264
|
-
"footer": null,
|
|
265
|
-
"notes": [],
|
|
266
|
-
"hash": "a8b9a50767988a8a790b58a1ac23ecfd62b61395",
|
|
267
|
-
"gitTags": "",
|
|
268
|
-
"committerDate": "2018-04-19 11:46:04 -0400",
|
|
269
|
-
"isTagged": true,
|
|
270
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.10"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"type": "fix",
|
|
274
|
-
"scope": "css",
|
|
275
|
-
"subject": "add material-ui as a peerDependency, remove react-jss",
|
|
276
|
-
"merge": null,
|
|
277
|
-
"header": "fix(css): add material-ui as a peerDependency, remove react-jss",
|
|
278
|
-
"body": null,
|
|
279
|
-
"footer": null,
|
|
280
|
-
"notes": [],
|
|
281
|
-
"hash": "4798815d4297a3321d63fd81a1a59eb9497b3c09",
|
|
282
|
-
"gitTags": "",
|
|
283
|
-
"committerDate": "2018-04-19 11:34:51 -0400",
|
|
284
|
-
"isTagged": true,
|
|
285
|
-
"tag": "@pie-lib/correct-answer-toggle@2.0.1"
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
"type": "fix",
|
|
289
|
-
"scope": "dependencies",
|
|
290
|
-
"subject": "bump dependencies",
|
|
291
|
-
"merge": null,
|
|
292
|
-
"header": "fix(dependencies): bump dependencies",
|
|
293
|
-
"body": null,
|
|
294
|
-
"footer": null,
|
|
295
|
-
"notes": [],
|
|
296
|
-
"hash": "4ac35430f6a340a503be7fbcb6c09905ccbc63a3",
|
|
297
|
-
"gitTags": "",
|
|
298
|
-
"committerDate": "2018-04-16 13:55:06 -0400",
|
|
299
|
-
"isTagged": true,
|
|
300
|
-
"tag": "@pie-lib/correct-answer-toggle@1.0.1"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"type": "chore",
|
|
304
|
-
"scope": "dependencies",
|
|
305
|
-
"subject": "bump prop-types",
|
|
306
|
-
"merge": null,
|
|
307
|
-
"header": "chore(dependencies): bump prop-types",
|
|
308
|
-
"body": null,
|
|
309
|
-
"footer": null,
|
|
310
|
-
"notes": [],
|
|
311
|
-
"hash": "8f8bba2944ff08aac93d5ade57bc2b706ae0e9fa",
|
|
312
|
-
"gitTags": "",
|
|
313
|
-
"committerDate": "2018-04-16 10:20:25 -0400",
|
|
314
|
-
"isTagged": true,
|
|
315
|
-
"tag": "@pie-lib/correct-answer-toggle@1.0.0"
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"type": "chore",
|
|
319
|
-
"scope": "test",
|
|
320
|
-
"subject": "add tests",
|
|
321
|
-
"merge": null,
|
|
322
|
-
"header": "chore(test): add tests",
|
|
323
|
-
"body": null,
|
|
324
|
-
"footer": null,
|
|
325
|
-
"notes": [],
|
|
326
|
-
"hash": "e392887f8527e246657cf11fe9369dfb7214724d",
|
|
327
|
-
"gitTags": "",
|
|
328
|
-
"committerDate": "2018-04-13 14:36:05 -0400",
|
|
329
|
-
"isTagged": true,
|
|
330
|
-
"tag": "@pie-lib/correct-answer-toggle@1.0.0"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"type": "chore",
|
|
334
|
-
"scope": "tests",
|
|
335
|
-
"subject": "use jest",
|
|
336
|
-
"merge": null,
|
|
337
|
-
"header": "chore(tests): use jest",
|
|
338
|
-
"body": null,
|
|
339
|
-
"footer": null,
|
|
340
|
-
"notes": [],
|
|
341
|
-
"hash": "ee2f8eae18033289bc88af536e44c74140c44dc0",
|
|
342
|
-
"gitTags": "",
|
|
343
|
-
"committerDate": "2018-04-13 14:35:50 -0400",
|
|
344
|
-
"isTagged": true,
|
|
345
|
-
"tag": "@pie-lib/correct-answer-toggle@1.0.0"
|
|
346
|
-
},
|
|
347
|
-
{
|
|
348
|
-
"type": "fix",
|
|
349
|
-
"scope": "versions",
|
|
350
|
-
"subject": "bump versions of react",
|
|
351
|
-
"merge": null,
|
|
352
|
-
"header": "fix(versions): bump versions of react",
|
|
353
|
-
"body": null,
|
|
354
|
-
"footer": "BREAKING CHANGE: uses react@^16.3.1",
|
|
355
|
-
"notes": [
|
|
356
|
-
{
|
|
357
|
-
"title": "BREAKING CHANGE",
|
|
358
|
-
"text": "uses react@^16.3.1"
|
|
359
|
-
}
|
|
360
|
-
],
|
|
361
|
-
"hash": "d0467cdff82f5be100e36522b362e6db635b977c",
|
|
362
|
-
"gitTags": "",
|
|
363
|
-
"committerDate": "2018-04-13 13:47:49 -0400",
|
|
364
|
-
"isTagged": true,
|
|
365
|
-
"tag": "@pie-lib/correct-answer-toggle@1.0.0"
|
|
366
|
-
},
|
|
367
|
-
{
|
|
368
|
-
"type": "chore",
|
|
369
|
-
"scope": null,
|
|
370
|
-
"subject": "update dependencies",
|
|
371
|
-
"merge": null,
|
|
372
|
-
"header": "chore: update dependencies",
|
|
373
|
-
"body": null,
|
|
374
|
-
"footer": null,
|
|
375
|
-
"notes": [],
|
|
376
|
-
"hash": "bbd1bfcabfaa85802df710b4a59c25ba8ff9fd51",
|
|
377
|
-
"gitTags": "",
|
|
378
|
-
"committerDate": "2018-03-06 13:31:35 -0500",
|
|
379
|
-
"isTagged": true,
|
|
380
|
-
"tag": "@pie-lib/correct-answer-toggle@0.1.10"
|
|
381
|
-
},
|
|
382
|
-
{
|
|
383
|
-
"type": "feat",
|
|
384
|
-
"scope": null,
|
|
385
|
-
"subject": "version bumps",
|
|
386
|
-
"merge": null,
|
|
387
|
-
"header": "feat: version bumps",
|
|
388
|
-
"body": null,
|
|
389
|
-
"footer": null,
|
|
390
|
-
"notes": [],
|
|
391
|
-
"hash": "23eb54f95e4b6480e2f8c5b336627a7f3bc2f428",
|
|
392
|
-
"gitTags": "",
|
|
393
|
-
"committerDate": "2019-06-10 15:24:32 +0100",
|
|
394
|
-
"isTagged": true,
|
|
395
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.0"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
"type": "fix",
|
|
399
|
-
"scope": null,
|
|
400
|
-
"subject": " missing peer dep for react-dom",
|
|
401
|
-
"merge": null,
|
|
402
|
-
"header": "fix: missing peer dep for react-dom",
|
|
403
|
-
"body": null,
|
|
404
|
-
"footer": null,
|
|
405
|
-
"notes": [],
|
|
406
|
-
"hash": "669873759e2c4934129ac988c1eb25ef283c7d1e",
|
|
407
|
-
"gitTags": "",
|
|
408
|
-
"committerDate": "2020-02-20 12:42:54 +0000",
|
|
409
|
-
"isTagged": true,
|
|
410
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.8"
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
"type": "fix",
|
|
414
|
-
"scope": null,
|
|
415
|
-
"subject": "add module prop to package.json",
|
|
416
|
-
"merge": null,
|
|
417
|
-
"header": "fix: add module prop to package.json",
|
|
418
|
-
"body": null,
|
|
419
|
-
"footer": null,
|
|
420
|
-
"notes": [],
|
|
421
|
-
"hash": "aa3dce85041f60249496d4f0b89acd99dc1890c8",
|
|
422
|
-
"gitTags": "",
|
|
423
|
-
"committerDate": "2020-03-30 13:00:47 +0100",
|
|
424
|
-
"isTagged": true,
|
|
425
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.10"
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
"type": "fix",
|
|
429
|
-
"scope": null,
|
|
430
|
-
"subject": "fix module path",
|
|
431
|
-
"merge": null,
|
|
432
|
-
"header": "fix: fix module path",
|
|
433
|
-
"body": null,
|
|
434
|
-
"footer": null,
|
|
435
|
-
"notes": [],
|
|
436
|
-
"hash": "230504caab69a70b07da564cf2acba60f18a0eb5",
|
|
437
|
-
"gitTags": "",
|
|
438
|
-
"committerDate": "2020-03-31 00:10:01 +0100",
|
|
439
|
-
"isTagged": true,
|
|
440
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.16"
|
|
441
|
-
},
|
|
442
|
-
{
|
|
443
|
-
"type": "fix",
|
|
444
|
-
"scope": null,
|
|
445
|
-
"subject": "correct module path",
|
|
446
|
-
"merge": null,
|
|
447
|
-
"header": "fix: correct module path",
|
|
448
|
-
"body": null,
|
|
449
|
-
"footer": null,
|
|
450
|
-
"notes": [],
|
|
451
|
-
"hash": "4644b3fa021db23e52bed36d673cf8dc93b44a39",
|
|
452
|
-
"gitTags": "",
|
|
453
|
-
"committerDate": "2020-03-31 11:47:09 +0100",
|
|
454
|
-
"isTagged": true,
|
|
455
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.18"
|
|
456
|
-
},
|
|
457
|
-
{
|
|
458
|
-
"type": "fix",
|
|
459
|
-
"scope": null,
|
|
460
|
-
"subject": "PD-217 set visibility:'hidden' on toggle when not shown",
|
|
461
|
-
"merge": null,
|
|
462
|
-
"header": "fix: PD-217 set visibility:'hidden' on toggle when not shown",
|
|
463
|
-
"body": null,
|
|
464
|
-
"footer": null,
|
|
465
|
-
"notes": [],
|
|
466
|
-
"hash": "698c541624df9c4714912851baaaa2cfcdb75815",
|
|
467
|
-
"gitTags": "",
|
|
468
|
-
"committerDate": "2020-05-05 23:28:09 +0100",
|
|
469
|
-
"isTagged": true,
|
|
470
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.22"
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
"type": "fix",
|
|
474
|
-
"scope": null,
|
|
475
|
-
"subject": "fix init show/hide",
|
|
476
|
-
"merge": null,
|
|
477
|
-
"header": "fix: fix init show/hide",
|
|
478
|
-
"body": null,
|
|
479
|
-
"footer": null,
|
|
480
|
-
"notes": [],
|
|
481
|
-
"hash": "32e2a940293365c9a5a21c9fd942d3b313cbff70",
|
|
482
|
-
"gitTags": "",
|
|
483
|
-
"committerDate": "2020-05-06 12:20:11 +0100",
|
|
484
|
-
"isTagged": true,
|
|
485
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.23"
|
|
486
|
-
},
|
|
487
|
-
{
|
|
488
|
-
"type": "fix",
|
|
489
|
-
"scope": null,
|
|
490
|
-
"subject": "remove console.log",
|
|
491
|
-
"merge": null,
|
|
492
|
-
"header": "fix: remove console.log",
|
|
493
|
-
"body": null,
|
|
494
|
-
"footer": null,
|
|
495
|
-
"notes": [],
|
|
496
|
-
"hash": "da9d3a3e0ba8bcf28a4e1eb4b510a29473a15133",
|
|
497
|
-
"gitTags": " (origin/develop, origin/HEAD, develop)",
|
|
498
|
-
"committerDate": "2020-05-21 23:20:16 +0100",
|
|
499
|
-
"isTagged": true,
|
|
500
|
-
"tag": "@pie-lib/correct-answer-toggle@2.2.24"
|
|
501
|
-
},
|
|
502
|
-
{
|
|
503
|
-
"type": "feat",
|
|
504
|
-
"scope": null,
|
|
505
|
-
"subject": "add color custom properties PD-308",
|
|
506
|
-
"merge": null,
|
|
507
|
-
"header": "feat: add color custom properties PD-308",
|
|
508
|
-
"body": "* add color module\n* update correct-answer-toggle to use `color.text()`\n* update feedback to use `color.correct()` and `color.incorrect()`",
|
|
509
|
-
"footer": null,
|
|
510
|
-
"notes": [],
|
|
511
|
-
"hash": "8d7bc2b07e151b1595e2fea471371fe8399816c9",
|
|
512
|
-
"gitTags": " (origin/feat/PD-308-colors)",
|
|
513
|
-
"committerDate": "2020-06-05 11:18:15 +0100",
|
|
514
|
-
"isTagged": true,
|
|
515
|
-
"tag": "@pie-lib/correct-answer-toggle@2.3.0"
|
|
516
|
-
},
|
|
517
|
-
{
|
|
518
|
-
"type": "fix",
|
|
519
|
-
"scope": null,
|
|
520
|
-
"subject": "PD-217 - fix visibility flag",
|
|
521
|
-
"merge": null,
|
|
522
|
-
"header": "fix: PD-217 - fix visibility flag",
|
|
523
|
-
"body": null,
|
|
524
|
-
"footer": null,
|
|
525
|
-
"notes": [],
|
|
526
|
-
"hash": "8d4044d9f35f84b55e519b4019e4c458633a1873",
|
|
527
|
-
"gitTags": " (develop)",
|
|
528
|
-
"committerDate": "2020-08-06 15:48:40 +0100",
|
|
529
|
-
"isTagged": true,
|
|
530
|
-
"tag": "@pie-lib/correct-answer-toggle@2.3.1"
|
|
531
|
-
},
|
|
532
|
-
{
|
|
533
|
-
"type": "fix",
|
|
534
|
-
"scope": "correct-answer-toggle",
|
|
535
|
-
"subject": "denote label as non-readable",
|
|
536
|
-
"merge": null,
|
|
537
|
-
"header": "fix(correct-answer-toggle): denote label as non-readable",
|
|
538
|
-
"body": null,
|
|
539
|
-
"footer": null,
|
|
540
|
-
"notes": [],
|
|
541
|
-
"hash": "79676a9de36f5f4fe888c56704fd08286fa25d65",
|
|
542
|
-
"gitTags": "",
|
|
543
|
-
"committerDate": "2021-03-25 13:46:07 +0200",
|
|
544
|
-
"isTagged": true,
|
|
545
|
-
"tag": "@pie-lib/correct-answer-toggle@2.3.22"
|
|
546
|
-
}
|
|
547
|
-
]
|
|
1
|
+
[]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,151 @@
|
|
|
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
|
-
|
|
6
|
+
# [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)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [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)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
# [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)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
# [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)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# [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)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
# [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)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
# [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)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
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)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# [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)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
# [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)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
# [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
|
+
|
|
88
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
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-23)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# [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
|
+
|
|
104
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
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
|
+
|
|
112
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# [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
|
+
|
|
120
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
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)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
# [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
|
+
|
|
136
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
# [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
|
+
|
|
144
|
+
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
# [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)
|
|
7
151
|
|
|
8
152
|
**Note:** Version bump only for package @pie-lib/correct-answer-toggle
|
|
9
153
|
|
package/lib/expander.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,GAArE;AAA0E,IAAA,UAAU,oBAAOD,OAAP;AAApF,kBACE;AAAK,IAAA,SAAS,EAAEA,OAAO,CAACG;AAAxB,KAAmCD,QAAnC,CADF,CADF;AAKD,CARD;;AAUAJ,QAAQ,CAACM,SAAT,GAAqB;AACnBH,EAAAA,IAAI,EAAEI,sBAAUC,IAAV,CAAeC,UADF;AAEnBC,EAAAA,SAAS,EAAEH,sBAAUI,MAFF;AAGnBT,EAAAA,OAAO,EAAEK,sBAAUK,MAHA;AAInBR,EAAAA,QAAQ,EAAEG,sBAAUM,SAAV,CAAoB,CAACN,sBAAUO,OAAV,CAAkBP,sBAAUQ,IAA5B,CAAD,EAAoCR,sBAAUQ,IAA9C,CAApB,EAAyEN;AAJhE,CAArB;AAOA,IAAMO,UAAU,GAAG,6CAAnB;;eAEe,wBAAW;AAAA,SAAO;AAC/BX,IAAAA,QAAQ,EAAE;AACRY,MAAAA,QAAQ,EAAE,UADF;AAERC,MAAAA,MAAM,EAAE,CAFA;AAGRC,MAAAA,QAAQ,EAAE,QAHF;AAIRC,MAAAA,OAAO,EAAE,MAJD;AAKRC,MAAAA,UAAU,EAAE,QALJ;AAMRC,MAAAA,KAAK,EAAE;AANC,KADqB;AAS/BC,IAAAA,KAAK,EAAE;AACLP,MAAAA,UAAU,EAAVA,UADK;AAELQ,MAAAA,OAAO,EAAE,CAFJ;AAGLN,MAAAA,MAAM,EAAE,MAHH;AAILI,MAAAA,KAAK,EAAE,MAJF;AAKLD,MAAAA,UAAU,EAAE,SALP;AAMLI,MAAAA,SAAS,EAAE;AANN,KATwB;AAiB/BC,IAAAA,SAAS,EAAE;AACTR,MAAAA,MAAM,EAAE,MADC;AAETG,MAAAA,UAAU,EAAE,SAFH;AAGTC,MAAAA,KAAK,EAAE,MAHE;AAITG,MAAAA,SAAS,EAAE;AAJF,KAjBoB;AAuB/BE,IAAAA,IAAI,EAAE;AACJX,MAAAA,UAAU,EAAVA,UADI;AAEJQ,MAAAA,OAAO,EAAE,CAFL;AAGJN,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
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
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":"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","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
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/package.json
CHANGED
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
"publishConfig": {
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.8.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": "beta",
|
|
21
|
+
"@pie-lib/render-ui": "beta",
|
|
22
|
+
"@pie-lib/translator": "beta",
|
|
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": "ecb1ca31aa1c24d23af00d5ad04ce73ed8871057"
|
|
37
37
|
}
|