@khanacademy/perseus 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/dist/es/index.js +7 -12
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +7 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/index.js +1 -0
- package/src/multi-items/__tests__/__snapshots__/multi-renderer_test.js.snap +21 -11
- package/src/widgets/__tests__/__snapshots__/group_test.jsx.snap +21 -11
- package/src/widgets/__tests__/__snapshots__/radio_test.jsx.snap +221 -117
- package/src/widgets/radio/__stories__/sat-styles.stories.jsx +191 -0
- package/src/widgets/radio/base-radio.jsx +1 -2
- package/src/widgets/radio/choice.jsx +4 -10
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Core Perseus API (includes renderers and widgets)",
|
|
4
4
|
"author": "Khan Academy",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"version": "1.3.
|
|
6
|
+
"version": "1.3.1",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@khanacademy/kas": "^0.2.7",
|
|
25
25
|
"@khanacademy/kmath": "^0.0.8",
|
|
26
|
-
"@khanacademy/math-input": "^0.6.
|
|
26
|
+
"@khanacademy/math-input": "^0.6.4",
|
|
27
27
|
"@khanacademy/perseus-linter": "^0.2.3",
|
|
28
28
|
"@khanacademy/pure-markdown": "^0.1.3",
|
|
29
29
|
"@khanacademy/simple-markdown": "^0.8.6",
|
package/src/index.js
CHANGED
|
@@ -129,22 +129,24 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
129
129
|
Choose 1 answer:
|
|
130
130
|
</div>
|
|
131
131
|
<ul
|
|
132
|
-
class="perseus-widget-radio perseus-rendered-radio
|
|
132
|
+
class="perseus-widget-radio perseus-rendered-radio radio_1gyjybc-o_O-responsiveRadioContainer_1ybwre2"
|
|
133
133
|
style="list-style: none;"
|
|
134
134
|
>
|
|
135
135
|
<li
|
|
136
136
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
137
137
|
>
|
|
138
138
|
<div
|
|
139
|
+
class="description description_psmgei"
|
|
139
140
|
style="flex-direction: column;"
|
|
140
141
|
>
|
|
141
142
|
<div
|
|
142
|
-
style="display: flex; flex-direction: row;
|
|
143
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
143
144
|
>
|
|
144
145
|
<div
|
|
145
146
|
class="perseus-sr-only"
|
|
146
147
|
>
|
|
147
148
|
<input
|
|
149
|
+
class="perseus-radio-option-content"
|
|
148
150
|
id="choice-0"
|
|
149
151
|
tabindex="-1"
|
|
150
152
|
type="radio"
|
|
@@ -213,7 +215,7 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
213
215
|
aria-disabled="false"
|
|
214
216
|
aria-hidden="true"
|
|
215
217
|
aria-label=""
|
|
216
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
218
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
217
219
|
tabindex="0"
|
|
218
220
|
type="button"
|
|
219
221
|
>
|
|
@@ -311,15 +313,17 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
311
313
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
312
314
|
>
|
|
313
315
|
<div
|
|
316
|
+
class="description description_psmgei"
|
|
314
317
|
style="flex-direction: column;"
|
|
315
318
|
>
|
|
316
319
|
<div
|
|
317
|
-
style="display: flex; flex-direction: row;
|
|
320
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
318
321
|
>
|
|
319
322
|
<div
|
|
320
323
|
class="perseus-sr-only"
|
|
321
324
|
>
|
|
322
325
|
<input
|
|
326
|
+
class="perseus-radio-option-content"
|
|
323
327
|
id="choice-1"
|
|
324
328
|
tabindex="-1"
|
|
325
329
|
type="radio"
|
|
@@ -388,7 +392,7 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
388
392
|
aria-disabled="false"
|
|
389
393
|
aria-hidden="true"
|
|
390
394
|
aria-label=""
|
|
391
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
395
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
392
396
|
tabindex="0"
|
|
393
397
|
type="button"
|
|
394
398
|
>
|
|
@@ -486,15 +490,17 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
486
490
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
487
491
|
>
|
|
488
492
|
<div
|
|
493
|
+
class="description description_psmgei"
|
|
489
494
|
style="flex-direction: column;"
|
|
490
495
|
>
|
|
491
496
|
<div
|
|
492
|
-
style="display: flex; flex-direction: row;
|
|
497
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
493
498
|
>
|
|
494
499
|
<div
|
|
495
500
|
class="perseus-sr-only"
|
|
496
501
|
>
|
|
497
502
|
<input
|
|
503
|
+
class="perseus-radio-option-content"
|
|
498
504
|
id="choice-2"
|
|
499
505
|
tabindex="-1"
|
|
500
506
|
type="radio"
|
|
@@ -563,7 +569,7 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
563
569
|
aria-disabled="false"
|
|
564
570
|
aria-hidden="true"
|
|
565
571
|
aria-label=""
|
|
566
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
572
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
567
573
|
tabindex="0"
|
|
568
574
|
type="button"
|
|
569
575
|
>
|
|
@@ -661,15 +667,17 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
661
667
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
662
668
|
>
|
|
663
669
|
<div
|
|
670
|
+
class="description description_psmgei"
|
|
664
671
|
style="flex-direction: column;"
|
|
665
672
|
>
|
|
666
673
|
<div
|
|
667
|
-
style="display: flex; flex-direction: row;
|
|
674
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
668
675
|
>
|
|
669
676
|
<div
|
|
670
677
|
class="perseus-sr-only"
|
|
671
678
|
>
|
|
672
679
|
<input
|
|
680
|
+
class="perseus-radio-option-content"
|
|
673
681
|
id="choice-3"
|
|
674
682
|
tabindex="-1"
|
|
675
683
|
type="radio"
|
|
@@ -738,7 +746,7 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
738
746
|
aria-disabled="false"
|
|
739
747
|
aria-hidden="true"
|
|
740
748
|
aria-label=""
|
|
741
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
749
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
742
750
|
tabindex="0"
|
|
743
751
|
type="button"
|
|
744
752
|
>
|
|
@@ -836,15 +844,17 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
836
844
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
837
845
|
>
|
|
838
846
|
<div
|
|
847
|
+
class="description description_psmgei"
|
|
839
848
|
style="flex-direction: column;"
|
|
840
849
|
>
|
|
841
850
|
<div
|
|
842
|
-
style="display: flex; flex-direction: row;
|
|
851
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
843
852
|
>
|
|
844
853
|
<div
|
|
845
854
|
class="perseus-sr-only"
|
|
846
855
|
>
|
|
847
856
|
<input
|
|
857
|
+
class="perseus-radio-option-content"
|
|
848
858
|
id="choice-4"
|
|
849
859
|
tabindex="-1"
|
|
850
860
|
type="radio"
|
|
@@ -913,7 +923,7 @@ exports[`multi-item renderer should snapshot: initial render 1`] = `
|
|
|
913
923
|
aria-disabled="false"
|
|
914
924
|
aria-hidden="true"
|
|
915
925
|
aria-label=""
|
|
916
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
926
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
917
927
|
tabindex="0"
|
|
918
928
|
type="button"
|
|
919
929
|
>
|
|
@@ -134,22 +134,24 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
134
134
|
Choose 1 answer:
|
|
135
135
|
</div>
|
|
136
136
|
<ul
|
|
137
|
-
class="perseus-widget-radio perseus-rendered-radio
|
|
137
|
+
class="perseus-widget-radio perseus-rendered-radio radio_1gyjybc-o_O-responsiveRadioContainer_1ybwre2"
|
|
138
138
|
style="list-style: none;"
|
|
139
139
|
>
|
|
140
140
|
<li
|
|
141
141
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
142
142
|
>
|
|
143
143
|
<div
|
|
144
|
+
class="description description_psmgei"
|
|
144
145
|
style="flex-direction: column;"
|
|
145
146
|
>
|
|
146
147
|
<div
|
|
147
|
-
style="display: flex; flex-direction: row;
|
|
148
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
148
149
|
>
|
|
149
150
|
<div
|
|
150
151
|
class="perseus-sr-only"
|
|
151
152
|
>
|
|
152
153
|
<input
|
|
154
|
+
class="perseus-radio-option-content"
|
|
153
155
|
id="choice-5"
|
|
154
156
|
tabindex="-1"
|
|
155
157
|
type="radio"
|
|
@@ -192,7 +194,7 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
192
194
|
aria-disabled="false"
|
|
193
195
|
aria-hidden="true"
|
|
194
196
|
aria-label=""
|
|
195
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
197
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
196
198
|
tabindex="0"
|
|
197
199
|
type="button"
|
|
198
200
|
>
|
|
@@ -264,15 +266,17 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
264
266
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
265
267
|
>
|
|
266
268
|
<div
|
|
269
|
+
class="description description_psmgei"
|
|
267
270
|
style="flex-direction: column;"
|
|
268
271
|
>
|
|
269
272
|
<div
|
|
270
|
-
style="display: flex; flex-direction: row;
|
|
273
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
271
274
|
>
|
|
272
275
|
<div
|
|
273
276
|
class="perseus-sr-only"
|
|
274
277
|
>
|
|
275
278
|
<input
|
|
279
|
+
class="perseus-radio-option-content"
|
|
276
280
|
id="choice-6"
|
|
277
281
|
tabindex="-1"
|
|
278
282
|
type="radio"
|
|
@@ -315,7 +319,7 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
315
319
|
aria-disabled="false"
|
|
316
320
|
aria-hidden="true"
|
|
317
321
|
aria-label=""
|
|
318
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
322
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
319
323
|
tabindex="0"
|
|
320
324
|
type="button"
|
|
321
325
|
>
|
|
@@ -387,15 +391,17 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
387
391
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
388
392
|
>
|
|
389
393
|
<div
|
|
394
|
+
class="description description_psmgei"
|
|
390
395
|
style="flex-direction: column;"
|
|
391
396
|
>
|
|
392
397
|
<div
|
|
393
|
-
style="display: flex; flex-direction: row;
|
|
398
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
394
399
|
>
|
|
395
400
|
<div
|
|
396
401
|
class="perseus-sr-only"
|
|
397
402
|
>
|
|
398
403
|
<input
|
|
404
|
+
class="perseus-radio-option-content"
|
|
399
405
|
id="choice-7"
|
|
400
406
|
tabindex="-1"
|
|
401
407
|
type="radio"
|
|
@@ -438,7 +444,7 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
438
444
|
aria-disabled="false"
|
|
439
445
|
aria-hidden="true"
|
|
440
446
|
aria-label=""
|
|
441
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
447
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
442
448
|
tabindex="0"
|
|
443
449
|
type="button"
|
|
444
450
|
>
|
|
@@ -510,15 +516,17 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
510
516
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
511
517
|
>
|
|
512
518
|
<div
|
|
519
|
+
class="description description_psmgei"
|
|
513
520
|
style="flex-direction: column;"
|
|
514
521
|
>
|
|
515
522
|
<div
|
|
516
|
-
style="display: flex; flex-direction: row;
|
|
523
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
517
524
|
>
|
|
518
525
|
<div
|
|
519
526
|
class="perseus-sr-only"
|
|
520
527
|
>
|
|
521
528
|
<input
|
|
529
|
+
class="perseus-radio-option-content"
|
|
522
530
|
id="choice-8"
|
|
523
531
|
tabindex="-1"
|
|
524
532
|
type="radio"
|
|
@@ -561,7 +569,7 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
561
569
|
aria-disabled="false"
|
|
562
570
|
aria-hidden="true"
|
|
563
571
|
aria-label=""
|
|
564
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
572
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
565
573
|
tabindex="0"
|
|
566
574
|
type="button"
|
|
567
575
|
>
|
|
@@ -633,15 +641,17 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
633
641
|
class="aboveScratchpad_1x0jb4k-o_O-item_dswvvi-o_O-responsiveItem_85oyrd perseus-radio-option"
|
|
634
642
|
>
|
|
635
643
|
<div
|
|
644
|
+
class="description description_psmgei"
|
|
636
645
|
style="flex-direction: column;"
|
|
637
646
|
>
|
|
638
647
|
<div
|
|
639
|
-
style="display: flex; flex-direction: row;
|
|
648
|
+
style="display: flex; flex-direction: row; opacity: 1;"
|
|
640
649
|
>
|
|
641
650
|
<div
|
|
642
651
|
class="perseus-sr-only"
|
|
643
652
|
>
|
|
644
653
|
<input
|
|
654
|
+
class="perseus-radio-option-content"
|
|
645
655
|
id="choice-9"
|
|
646
656
|
tabindex="-1"
|
|
647
657
|
type="radio"
|
|
@@ -684,7 +694,7 @@ exports[`group widget should snapshot: initial render 1`] = `
|
|
|
684
694
|
aria-disabled="false"
|
|
685
695
|
aria-hidden="true"
|
|
686
696
|
aria-label=""
|
|
687
|
-
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv
|
|
697
|
+
class="button_vr44p2-o_O-reset_152ygtm-o_O-link_13xlah4-o_O-inlineStyles_bc4egv"
|
|
688
698
|
tabindex="0"
|
|
689
699
|
type="button"
|
|
690
700
|
>
|