@pie-lib/correct-answer-toggle 2.5.11 → 2.5.12-next.1639

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 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,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.5.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.10...@pie-lib/correct-answer-toggle@2.5.11) (2023-10-03)
6
+ # [2.20.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.19.0...@pie-lib/correct-answer-toggle@2.20.0) (2025-09-18)
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.5.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.9...@pie-lib/correct-answer-toggle@2.5.10) (2023-10-01)
14
+ # [2.19.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.18.0...@pie-lib/correct-answer-toggle@2.19.0) (2025-09-18)
15
15
 
16
16
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
17
17
 
@@ -19,7 +19,23 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
19
19
 
20
20
 
21
21
 
22
- ## [2.5.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.8...@pie-lib/correct-answer-toggle@2.5.9) (2023-09-27)
22
+ # [2.18.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.18.0) (2025-09-18)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
28
+
29
+
30
+ ### Features
31
+
32
+ * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
33
+
34
+
35
+
36
+
37
+
38
+ # [2.17.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.16.0...@pie-lib/correct-answer-toggle@2.17.0) (2025-09-17)
23
39
 
24
40
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
25
41
 
@@ -27,7 +43,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
27
43
 
28
44
 
29
45
 
30
- ## [2.5.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.7...@pie-lib/correct-answer-toggle@2.5.8) (2023-09-27)
46
+ # [2.16.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.15.0...@pie-lib/correct-answer-toggle@2.16.0) (2025-09-17)
31
47
 
32
48
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
33
49
 
@@ -35,7 +51,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
35
51
 
36
52
 
37
53
 
38
- ## [2.5.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.6...@pie-lib/correct-answer-toggle@2.5.7) (2023-09-25)
54
+ # [2.15.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.14.1...@pie-lib/correct-answer-toggle@2.15.0) (2025-09-17)
39
55
 
40
56
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
41
57
 
@@ -43,99 +59,235 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
43
59
 
44
60
 
45
61
 
46
- ## [2.5.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.5...@pie-lib/correct-answer-toggle@2.5.6) (2023-09-20)
62
+ ## [2.14.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.14.1) (2025-08-11)
63
+
64
+
65
+ ### Bug Fixes
66
+
67
+ * fixed pie-lib/icons import [PD-5126] ([dcb506c](https://github.com/pie-framework/pie-lib/commit/dcb506c914a177f6d88bf73247a023bfe71dac1f))
68
+
69
+
70
+ ### Features
71
+
72
+ * split pie-toolbox into multiple packages [PD-5126] ([7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2))
73
+
74
+
75
+
76
+
77
+
78
+ # [2.14.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.14.0) (2025-08-07)
79
+
80
+ ### Features
81
+
82
+ - split pie-toolbox into multiple packages [PD-5126](<[7d55a25](https://github.com/pie-framework/pie-lib/commit/7d55a2552d084cd3d0d5c00dc77411b2ced2f5e2)>)
83
+
84
+ # [2.13.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.13.0) (2025-07-31)
47
85
 
48
86
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
49
87
 
88
+ # [2.12.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.12.0) (2025-07-31)
50
89
 
90
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
51
91
 
92
+ # [2.11.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.11...@pie-lib/correct-answer-toggle@2.11.0) (2025-07-31)
52
93
 
94
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
53
95
 
54
- ## [2.5.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.4...@pie-lib/correct-answer-toggle@2.5.5) (2023-09-20)
96
+ # [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)
55
97
 
56
98
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
57
99
 
100
+ # [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)
58
101
 
102
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
59
103
 
104
+ # [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)
60
105
 
106
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
61
107
 
62
- ## [2.5.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.3...@pie-lib/correct-answer-toggle@2.5.4) (2023-09-18)
108
+ # [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)
63
109
 
64
110
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
65
111
 
112
+ # [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)
66
113
 
114
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
67
115
 
116
+ # [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)
68
117
 
118
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
69
119
 
70
- ## [2.5.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.2...@pie-lib/correct-answer-toggle@2.5.3) (2023-09-14)
120
+ # [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)
71
121
 
72
122
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
73
123
 
124
+ # [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)
74
125
 
126
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
75
127
 
128
+ # [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)
76
129
 
130
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
77
131
 
78
- ## [2.5.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.1...@pie-lib/correct-answer-toggle@2.5.2) (2023-08-21)
132
+ # [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)
79
133
 
80
134
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
81
135
 
136
+ # [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)
82
137
 
138
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
83
139
 
140
+ # [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)
84
141
 
142
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
85
143
 
86
- ## [2.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.0...@pie-lib/correct-answer-toggle@2.5.1) (2023-08-15)
144
+ # [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)
87
145
 
88
146
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
89
147
 
148
+ # [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)
90
149
 
150
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
91
151
 
152
+ # [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)
92
153
 
154
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
93
155
 
94
- # [2.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.4.0...@pie-lib/correct-answer-toggle@2.5.0) (2023-08-14)
156
+ # [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)
95
157
 
158
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
96
159
 
97
- ### Features
160
+ # [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)
98
161
 
99
- * update language on props change PD-2802 ([000dae9](https://github.com/pie-framework/pie-lib/commit/000dae927ed4a650bfc3fa007b2a5d891079aafd))
162
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
100
163
 
164
+ # [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)
101
165
 
166
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
102
167
 
168
+ # [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)
103
169
 
170
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
104
171
 
105
- # [2.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.79...@pie-lib/correct-answer-toggle@2.4.0) (2023-08-07)
172
+ # [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)
106
173
 
174
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
107
175
 
108
- ### Features
176
+ # [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)
109
177
 
110
- * **correct-answer-toggle:** add translations PD-2802 ([b53b653](https://github.com/pie-framework/pie-lib/commit/b53b653246deea3f67328b37feeb17787181e590))
178
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
111
179
 
180
+ # [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)
112
181
 
182
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
113
183
 
184
+ # [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)
114
185
 
186
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
115
187
 
116
- ## [2.3.79](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.78...@pie-lib/correct-answer-toggle@2.3.79) (2023-07-24)
188
+ # [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)
117
189
 
118
190
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
119
191
 
192
+ # [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)
120
193
 
194
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
195
+
196
+ # [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)
121
197
 
198
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
122
199
 
200
+ # [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)
123
201
 
124
- ## [2.3.78](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.77...@pie-lib/correct-answer-toggle@2.3.78) (2023-06-24)
202
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
203
+
204
+ # [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)
125
205
 
126
206
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
127
207
 
208
+ # [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)
128
209
 
210
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
129
211
 
212
+ # [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)
130
213
 
214
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
131
215
 
132
- ## [2.3.77](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.76...@pie-lib/correct-answer-toggle@2.3.77) (2023-06-13)
216
+ # [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)
217
+
218
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
219
+
220
+ # [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-15)
221
+
222
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
223
+
224
+ ## [2.5.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.10...@pie-lib/correct-answer-toggle@2.5.11) (2023-10-03)
225
+
226
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
227
+
228
+ ## [2.5.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.9...@pie-lib/correct-answer-toggle@2.5.10) (2023-10-01)
229
+
230
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
231
+
232
+ ## [2.5.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.8...@pie-lib/correct-answer-toggle@2.5.9) (2023-09-27)
233
+
234
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
235
+
236
+ ## [2.5.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.7...@pie-lib/correct-answer-toggle@2.5.8) (2023-09-27)
237
+
238
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
239
+
240
+ ## [2.5.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.6...@pie-lib/correct-answer-toggle@2.5.7) (2023-09-25)
241
+
242
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
243
+
244
+ ## [2.5.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.5...@pie-lib/correct-answer-toggle@2.5.6) (2023-09-20)
245
+
246
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
247
+
248
+ ## [2.5.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.4...@pie-lib/correct-answer-toggle@2.5.5) (2023-09-20)
249
+
250
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
251
+
252
+ ## [2.5.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.3...@pie-lib/correct-answer-toggle@2.5.4) (2023-09-18)
253
+
254
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
255
+
256
+ ## [2.5.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.2...@pie-lib/correct-answer-toggle@2.5.3) (2023-09-14)
133
257
 
134
258
  **Note:** Version bump only for package @pie-lib/correct-answer-toggle
135
259
 
260
+ ## [2.5.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.1...@pie-lib/correct-answer-toggle@2.5.2) (2023-08-21)
136
261
 
262
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
137
263
 
264
+ ## [2.5.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.5.0...@pie-lib/correct-answer-toggle@2.5.1) (2023-08-15)
265
+
266
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
267
+
268
+ # [2.5.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.4.0...@pie-lib/correct-answer-toggle@2.5.0) (2023-08-14)
269
+
270
+ ### Features
138
271
 
272
+ - update language on props change PD-2802 ([000dae9](https://github.com/pie-framework/pie-lib/commit/000dae927ed4a650bfc3fa007b2a5d891079aafd))
273
+
274
+ # [2.4.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.79...@pie-lib/correct-answer-toggle@2.4.0) (2023-08-07)
275
+
276
+ ### Features
277
+
278
+ - **correct-answer-toggle:** add translations PD-2802 ([b53b653](https://github.com/pie-framework/pie-lib/commit/b53b653246deea3f67328b37feeb17787181e590))
279
+
280
+ ## [2.3.79](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.78...@pie-lib/correct-answer-toggle@2.3.79) (2023-07-24)
281
+
282
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
283
+
284
+ ## [2.3.78](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.77...@pie-lib/correct-answer-toggle@2.3.78) (2023-06-24)
285
+
286
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
287
+
288
+ ## [2.3.77](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.76...@pie-lib/correct-answer-toggle@2.3.77) (2023-06-13)
289
+
290
+ **Note:** Version bump only for package @pie-lib/correct-answer-toggle
139
291
 
140
292
  ## [2.3.76](https://github.com/pie-framework/pie-lib/compare/@pie-lib/correct-answer-toggle@2.3.75...@pie-lib/correct-answer-toggle@2.3.76) (2023-06-12)
141
293
 
@@ -0,0 +1 @@
1
+ []
package/lib/expander.js CHANGED
@@ -57,14 +57,16 @@ var _default = (0, _styles.withStyles)(function () {
57
57
  enter: {
58
58
  transition: transition,
59
59
  opacity: 1,
60
- height: '25px',
60
+ height: 'auto',
61
61
  width: 'auto',
62
- visibility: 'visible'
62
+ visibility: 'visible',
63
+ minHeight: '25px'
63
64
  },
64
65
  enterDone: {
65
- height: '25px',
66
+ height: 'auto',
66
67
  visibility: 'visible',
67
- width: 'auto'
68
+ width: 'auto',
69
+ minHeight: '25px'
68
70
  },
69
71
  exit: {
70
72
  transition: transition,
@@ -1 +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","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;AALP,KATwB;AAgB/BI,IAAAA,SAAS,EAAE;AACTP,MAAAA,MAAM,EAAE,MADC;AAETG,MAAAA,UAAU,EAAE,SAFH;AAGTC,MAAAA,KAAK,EAAE;AAHE,KAhBoB;AAqB/BI,IAAAA,IAAI,EAAE;AACJV,MAAAA,UAAU,EAAVA,UADI;AAEJQ,MAAAA,OAAO,EAAE,CAFL;AAGJN,MAAAA,MAAM,EAAE,CAHJ;AAIJG,MAAAA,UAAU,EAAE,SAJR;AAKJC,MAAAA,KAAK,EAAE;AALH,KArByB;AA4B/BK,IAAAA,QAAQ,EAAE;AACRH,MAAAA,OAAO,EAAE,CADD;AAERH,MAAAA,UAAU,EAAE,QAFJ;AAGRH,MAAAA,MAAM,EAAE,CAHA;AAIRI,MAAAA,KAAK,EAAE;AAJC;AA5BqB,GAAP;AAAA,CAAX,EAkCXtB,QAlCW,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: '25px',\n width: 'auto',\n visibility: 'visible',\n },\n enterDone: {\n height: '25px',\n visibility: 'visible',\n width: 'auto',\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"}
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;AAA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;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 CHANGED
@@ -82,6 +82,13 @@ var CorrectAnswerToggle = /*#__PURE__*/function (_React$Component) {
82
82
  this.props.onToggle(!this.props.toggled);
83
83
  }
84
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
+ }, {
85
92
  key: "UNSAFE_componentWillReceiveProps",
86
93
  value: function UNSAFE_componentWillReceiveProps(nextProps) {
87
94
  var _this$props;
@@ -117,7 +124,8 @@ var CorrectAnswerToggle = /*#__PURE__*/function (_React$Component) {
117
124
  className: classes.expander
118
125
  }, /*#__PURE__*/_react["default"].createElement("div", {
119
126
  className: classes.content,
120
- onClick: this.onClick.bind(this)
127
+ onClick: this.onClick.bind(this),
128
+ onTouchEnd: this.onTouch.bind(this)
121
129
  }, /*#__PURE__*/_react["default"].createElement("div", {
122
130
  className: classes.iconHolder
123
131
  }, /*#__PURE__*/_react["default"].createElement(_CSSTransition["default"], {
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.jsx"],"names":["translator","Translator","CorrectAnswerToggle","props","state","show","defaultProps","showMessage","t","lng","language","hideMessage","onToggle","toggled","nextProps","setState","classes","className","root","expander","content","onClick","bind","iconHolder","icon","label","React","Component","PropTypes","func","bool","string","object","isRequired","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,IAAQA,UAAR,GAAuBC,sBAAvB,CAAQD,UAAR;AAEA;AACA;AACA;;IACaE,mB;;;;;AAmBX,+BAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AACA,UAAKC,KAAL,GAAa;AACXC,MAAAA,IAAI,EAAEF,KAAK,CAACE;AADD,KAAb;AAIAH,IAAAA,mBAAmB,CAACI,YAApB,mCACKJ,mBAAmB,CAACI,YADzB;AAEEC,MAAAA,WAAW,EAAEP,UAAU,CAACQ,CAAX,CAAa,0BAAb,EAAyC;AAAEC,QAAAA,GAAG,EAAEN,KAAK,CAACO;AAAb,OAAzC,CAFf;AAGEC,MAAAA,WAAW,EAAEX,UAAU,CAACQ,CAAX,CAAa,0BAAb,EAAyC;AAAEC,QAAAA,GAAG,EAAEN,KAAK,C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AAEkB,sBAAUG;AARH,C;iCADR7B,mB,kBAYW;AACpBK,EAAAA,WAAW,EAAE,qBADO;AAEpBI,EAAAA,WAAW,EAAE,qBAFO;AAGpBN,EAAAA,IAAI,EAAE,KAHc;AAIpBQ,EAAAA,OAAO,EAAE;AAJW,C;;eAiET,yBAAWqB,kBAAX,EAAmBhC,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\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)}>\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"}
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;;;;;;;;;;AAEA,IAAQA,UAAR,GAAuBC,sBAAvB,CAAQD,UAAR;AAEA;AACA;AACA;;IACaE,mB;;;;;AAmBX,+BAAYC,KAAZ,EAAmB;AAAA;;AAAA;AACjB,8BAAMA,KAAN;AACA,UAAKC,KAAL,GAAa;AACXC,MAAAA,IAAI,EAAEF,KAAK,CAACE;AADD,KAAb;AAIAH,IAAAA,mBAAmB,CAACI,YAApB,mCACKJ,mBAAmB,CAACI,YADzB;AAEEC,MAAAA,WAAW,EAAEP,UAAU,CAACQ,CAAX,CAAa,0BAAb,EAAyC;AAAEC,QAAAA,GAAG,EAAEN,KAAK,CAACO;AAAb,OAAzC,CAFf;AAGEC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C,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 CHANGED
@@ -30,11 +30,9 @@ var _default = {
30
30
  minWidth: '140px',
31
31
  // eslint-disable-next-line
32
32
  fontFamily: "'Roboto', sans-serif",
33
- height: '25px',
34
- lineHeight: '25px',
33
+ alignSelf: 'center',
35
34
  verticalAlign: 'middle',
36
35
  color: "var(--correct-answer-toggle-label-color, ".concat(_renderUi.color.text(), ")"),
37
- fontSize: '15px',
38
36
  fontWeight: 'normal'
39
37
  }, noTouch),
40
38
  icon: {
@@ -43,7 +41,9 @@ var _default = {
43
41
  },
44
42
  iconHolder: {
45
43
  width: '25px',
46
- marginRight: '5px'
44
+ marginRight: '5px',
45
+ display: 'flex',
46
+ alignItems: 'center'
47
47
  },
48
48
  enter: {
49
49
  opacity: '0'
package/lib/styles.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/styles.js"],"names":["noTouch","root","width","cursor","content","margin","textAlign","display","label","Object","assign","minWidth","fontFamily","height","lineHeight","verticalAlign","color","text","fontSize","fontWeight","icon","position","iconHolder","marginRight","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,MAAM,EAAE,MALV;AAMEC,IAAAA,UAAU,EAAE,MANd;AAOEC,IAAAA,aAAa,EAAE,QAPjB;AAQEC,IAAAA,KAAK,sDAA+CA,gBAAMC,IAAN,EAA/C,MARP;AASEC,IAAAA,QAAQ,EAAE,MATZ;AAUEC,IAAAA,UAAU,EAAE;AAVd,GADK,EAaLnB,OAbK,CAVM;AAyBboB,EAAAA,IAAI,EAAE;AACJC,IAAAA,QAAQ,EAAE,UADN;AAEJnB,IAAAA,KAAK,EAAE;AAFH,GAzBO;AA6BboB,EAAAA,UAAU,EAAE;AACVpB,IAAAA,KAAK,EAAE,MADG;AAEVqB,IAAAA,WAAW,EAAE;AAFH,GA7BC;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 height: '25px',\n lineHeight: '25px',\n verticalAlign: 'middle',\n color: `var(--correct-answer-toggle-label-color, ${color.text()})`,\n fontSize: '15px',\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 },\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"}
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.5.11",
14
+ "version": "2.5.12-next.1639+4ac095ca",
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.4.43",
21
- "@pie-lib/render-ui": "^4.15.9",
22
- "@pie-lib/translator": "^2.3.0",
20
+ "@pie-lib/icons": "^2.4.44-next.1848+4ac095ca",
21
+ "@pie-lib/render-ui": "^4.15.10-next.1639+4ac095ca",
22
+ "@pie-lib/translator": "^2.3.1-next.1712+4ac095ca",
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": "9c15e6c0aa4c83e1018b9b1070c8dec4294e6ffe"
36
+ "gitHead": "4ac095ca931e5fe8f131f28f41dd61093bd55d98"
37
37
  }
@@ -0,0 +1,99 @@
1
+ import { mount, shallow, configure } from 'enzyme';
2
+
3
+ import Expander from '../expander';
4
+ import React from 'react';
5
+ import { CorrectAnswerToggle } from '../index';
6
+ import Adapter from 'enzyme-adapter-react-16';
7
+
8
+ configure({ adapter: new Adapter() });
9
+
10
+ describe('CorrectAnswerToggle', () => {
11
+ let onToggle;
12
+ let wrapper;
13
+ let sheet;
14
+
15
+ let mkWrapper = (toggled, msgs) => {
16
+ toggled = toggled === false ? false : true;
17
+ msgs = msgs || {};
18
+ return shallow(
19
+ <CorrectAnswerToggle
20
+ toggled={toggled}
21
+ classes={{
22
+ root: 'root',
23
+ label: 'label',
24
+ }}
25
+ onToggle={onToggle}
26
+ hideMessage={msgs.hide}
27
+ showMessage={msgs.show}
28
+ sheet={sheet}
29
+ />,
30
+ {
31
+ context: {},
32
+ },
33
+ );
34
+ };
35
+
36
+ beforeEach(() => {
37
+ let iconStub = {};
38
+
39
+ sheet = {
40
+ classes: {
41
+ root: 'root',
42
+ label: 'label',
43
+ },
44
+ };
45
+ onToggle = jest.fn();
46
+ wrapper = mkWrapper();
47
+ });
48
+
49
+ describe('render', () => {
50
+ it('has the hide message', () => {
51
+ let holder = wrapper.find('.label');
52
+ expect(holder.text()).toEqual('Hide correct answer');
53
+ });
54
+
55
+ it('has show message when toggled is false', () => {
56
+ const w = mkWrapper(false);
57
+ let holder = w.find(`.label`);
58
+ expect(holder.text()).toEqual('Show correct answer');
59
+ });
60
+
61
+ it('sets a custom hide message', () => {
62
+ wrapper = mkWrapper(true, { hide: 'hide!' });
63
+ let holder = wrapper.find('.label');
64
+ expect(holder.text()).toEqual('hide!');
65
+ });
66
+
67
+ it('sets a custom show message', () => {
68
+ wrapper = mkWrapper(false, { show: 'show!' });
69
+ let holder = wrapper.find('.label');
70
+ expect(holder.text()).toEqual('show!');
71
+ });
72
+ });
73
+
74
+ describe('onClick', () => {
75
+ it('calls onToggle', () => {
76
+ wrapper
77
+ .find(Expander)
78
+ .childAt(0)
79
+ .simulate('click');
80
+ expect(onToggle.mock.calls[0][0]).toEqual(false);
81
+ });
82
+
83
+ it('calls onToggle with update state', () => {
84
+ onToggle.mockReset();
85
+ wrapper
86
+ .find(Expander)
87
+ .childAt(0)
88
+ .simulate('click');
89
+ expect(onToggle.mock.calls[0][0]).toEqual(false);
90
+ //simulate updating the toggled prop
91
+ wrapper.setProps({ toggled: false });
92
+ wrapper
93
+ .find(Expander)
94
+ .childAt(0)
95
+ .simulate('click');
96
+ expect(onToggle.mock.calls[1][0]).toEqual(true);
97
+ });
98
+ });
99
+ });
package/src/expander.jsx CHANGED
@@ -34,14 +34,16 @@ export default withStyles(() => ({
34
34
  enter: {
35
35
  transition,
36
36
  opacity: 1,
37
- height: '25px',
37
+ height: 'auto',
38
38
  width: 'auto',
39
39
  visibility: 'visible',
40
+ minHeight: '25px',
40
41
  },
41
42
  enterDone: {
42
- height: '25px',
43
+ height: 'auto',
43
44
  visibility: 'visible',
44
45
  width: 'auto',
46
+ minHeight: '25px',
45
47
  },
46
48
  exit: {
47
49
  transition,
package/src/index.jsx CHANGED
@@ -49,6 +49,10 @@ export class CorrectAnswerToggle extends React.Component {
49
49
  onClick() {
50
50
  this.props.onToggle(!this.props.toggled);
51
51
  }
52
+ onTouch(event) {
53
+ event.preventDefault(); // Prevents the default action (click event)
54
+ this.props.onToggle(!this.props.toggled);
55
+ }
52
56
 
53
57
  UNSAFE_componentWillReceiveProps(nextProps) {
54
58
  this.setState({
@@ -70,7 +74,7 @@ export class CorrectAnswerToggle extends React.Component {
70
74
  return (
71
75
  <div className={classNames(classes.root, className)}>
72
76
  <Expander show={this.state.show} className={classes.expander}>
73
- <div className={classes.content} onClick={this.onClick.bind(this)}>
77
+ <div className={classes.content} onClick={this.onClick.bind(this)} onTouchEnd={this.onTouch.bind(this)}>
74
78
  <div className={classes.iconHolder}>
75
79
  <CSSTransition timeout={400} in={toggled} exit={!toggled} classNames={classes}>
76
80
  <CorrectResponse open={toggled} key="correct-open" className={classes.icon} />
package/src/styles.js CHANGED
@@ -25,11 +25,9 @@ export default {
25
25
  minWidth: '140px',
26
26
  // eslint-disable-next-line
27
27
  fontFamily: "'Roboto', sans-serif",
28
- height: '25px',
29
- lineHeight: '25px',
28
+ alignSelf: 'center',
30
29
  verticalAlign: 'middle',
31
30
  color: `var(--correct-answer-toggle-label-color, ${color.text()})`,
32
- fontSize: '15px',
33
31
  fontWeight: 'normal',
34
32
  },
35
33
  noTouch,
@@ -41,6 +39,8 @@ export default {
41
39
  iconHolder: {
42
40
  width: '25px',
43
41
  marginRight: '5px',
42
+ display: 'flex',
43
+ alignItems: 'center',
44
44
  },
45
45
  enter: {
46
46
  opacity: '0',
package/README.md DELETED
@@ -1,64 +0,0 @@
1
- # corespring-correct-answer-toggle
2
-
3
- [![Build Status](https://travis-ci.org/PieLabs/corespring-correct-answer-toggle.svg?branch=develop)](https://travis-ci.org/PieLabs/corespring-correct-answer-toggle)
4
-
5
- A toggle with an icon and a label.
6
-
7
- ![Preview](preview.png)
8
-
9
- # Usage
10
-
11
- You need to include this in another library that builds react aka (babel).
12
-
13
- ## Webpack
14
-
15
- We assume that you have a loader that will load in `.less`. In the demo we use `style-loader!css-loader!less-loader`.
16
-
17
- ## Install
18
-
19
- ```shell
20
- npm install
21
- ```
22
- ## Test
23
-
24
- ```
25
- npm test
26
- ```
27
-
28
- ## Demo
29
-
30
- ```shell
31
- cd demo
32
- ../node_modules/.bin/webpack-dev-server --hot --inline
33
- # go to http://localhost:8080
34
- ```
35
-
36
- ### Usage
37
- ```javascript
38
-
39
- import Toggle from 'corespring-correct-answer-toggle';
40
-
41
- function onToggle(toggled){
42
- console.log('on toggle: ', toggled);
43
- }
44
-
45
- const MyComp = (props) => {
46
- return <div>
47
- <Toggle
48
- show={props.show}
49
- onToggle={onToggle}
50
- initialValue={false}/>
51
- </div>;
52
- }
53
- ```
54
-
55
- ## Release
56
-
57
- ```shell
58
- gulp release
59
- git checkout master
60
- npm publish
61
- ```
62
-
63
-
64
-
package/preview.png DELETED
Binary file