@khanacademy/perseus 0.4.3 → 1.1.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/.eslintrc.js +6 -1
- package/CHANGELOG.md +45 -0
- package/dist/es/index.css +15 -8
- package/dist/es/index.js +1214 -1404
- package/dist/es/index.js.map +1 -1
- package/dist/index.css +15 -8
- package/dist/index.js +1217 -1411
- package/dist/index.js.map +1 -1
- package/dist/strings.js +0 -4
- package/package.json +9 -8
- package/src/components/number-input.jsx +2 -2
- package/src/components/simple-keypad-input.jsx +18 -21
- package/src/index.js +1 -1
- package/src/multi-items/__tests__/__snapshots__/multi-renderer_test.js.snap +426 -135
- package/src/multi-items/__tests__/multi-renderer_test.js +9 -9
- package/src/perseus-api.jsx +10 -36
- package/src/perseus-types.js +18 -145
- package/src/styles/constants.js +0 -2
- package/src/styles/perseus-renderer.less +8 -2
- package/src/styles/variables.less +0 -2
- package/src/styles/widgets/passage.less +9 -5
- package/src/types.js +18 -35
- package/src/util/answer-types.js +2 -3
- package/src/util/math.js +3 -10
- package/src/util.js +0 -6
- package/src/version.js +1 -1
- package/src/widgets/__stories__/numeric-input.stories.jsx +43 -2
- package/src/widgets/__testdata__/base-radio_testdata.js +22 -0
- package/src/widgets/__tests__/__snapshots__/definition_test.js.snap +4 -4
- package/src/widgets/__tests__/__snapshots__/group_test.jsx.snap +291 -130
- package/src/widgets/__tests__/__snapshots__/radio_test.jsx.snap +3293 -1415
- package/src/widgets/__tests__/group_test.jsx +4 -4
- package/src/widgets/__tests__/numeric-input_test.jsx +12 -8
- package/src/widgets/__tests__/passage_test.jsx +81 -0
- package/src/widgets/__tests__/radio/base-radio_test.jsx +291 -41
- package/src/widgets/__tests__/radio/choice-icon_test.jsx +67 -0
- package/src/widgets/__tests__/radio/choice_test.jsx +302 -0
- package/src/widgets/__tests__/radio/focus-ring_test.jsx +23 -0
- package/src/widgets/__tests__/radio/option-status_test.jsx +65 -0
- package/src/widgets/__tests__/radio_test.jsx +39 -15
- package/src/widgets/definition.jsx +1 -1
- package/src/widgets/group.jsx +84 -102
- package/src/widgets/input-number.jsx +6 -1
- package/src/widgets/numeric-input.jsx +87 -80
- package/src/widgets/passage/__tests__/passage-markdown_test.jsx +0 -9
- package/src/widgets/passage/get-line-height-for-node.js +4 -5
- package/src/widgets/passage/passage-markdown.jsx +176 -120
- package/src/widgets/passage.jsx +48 -46
- package/src/widgets/radio/__stories__/base-radio.stories.jsx +164 -17
- package/src/widgets/radio/__stories__/choice-icon.stories.jsx +202 -111
- package/src/widgets/radio/__stories__/choice-none-above.stories.jsx +21 -6
- package/src/widgets/radio/__stories__/choice.stories.jsx +138 -0
- package/src/widgets/radio/__stories__/focus-ring.stories.jsx +29 -23
- package/src/widgets/radio/__stories__/option-status.stories.jsx +93 -99
- package/src/widgets/radio/base-radio.jsx +485 -556
- package/src/widgets/radio/choice-a11y-text.js +62 -0
- package/src/widgets/radio/choice-icon/choice-icon.jsx +87 -0
- package/src/widgets/radio/choice-icon/cross-out-line.jsx +55 -0
- package/src/widgets/radio/choice-icon/library-choice-icon.jsx +214 -0
- package/src/widgets/radio/choice-icon/sat-choice-icon.jsx +120 -0
- package/src/widgets/radio/choice-icon/shared-styles.js +17 -0
- package/src/widgets/radio/choice-none-above.jsx +49 -40
- package/src/widgets/radio/choice.jsx +319 -347
- package/src/widgets/radio/choice.jsx.fixture.js +0 -18
- package/src/widgets/radio/focus-ring.jsx +29 -22
- package/src/widgets/radio/option-status.jsx +58 -36
- package/src/widgets/radio/widget.jsx +181 -136
- package/src/widgets/radio.jsx +16 -17
- package/src/widgets/radio/__stories__/cross-out-button.stories.jsx +0 -64
- package/src/widgets/radio/choice-icon.jsx +0 -469
- package/src/widgets/radio/cross-out-button.jsx +0 -134
package/.eslintrc.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/* eslint-disable import/no-commonjs */
|
|
2
|
+
const path = require("path");
|
|
3
|
+
|
|
2
4
|
module.exports = {
|
|
3
5
|
rules: {
|
|
4
|
-
"import/no-extraneous-dependencies":
|
|
6
|
+
"import/no-extraneous-dependencies": [
|
|
7
|
+
"error",
|
|
8
|
+
{packageDir: [__dirname, path.join(__dirname, "../../")]},
|
|
9
|
+
],
|
|
5
10
|
},
|
|
6
11
|
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 178987d6: Creates a native accessibility experience for Radio widget
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- f046585a: add shared PerseusNumericInputAnswerForm and MathFormat types to perseus-types
|
|
12
|
+
- e342e6b2: Update CSS to match wonderblocks, round I
|
|
13
|
+
|
|
14
|
+
## 1.0.0
|
|
15
|
+
|
|
16
|
+
### Major Changes
|
|
17
|
+
|
|
18
|
+
- f9e0cda6: Change API shape: remove radioStyleVersion, add primaryProductColor to styling
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- 61a7084e: make multi-select options look more like checkboxes
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 2a3ac714: adds better flow coverage to base-radio.jsx
|
|
27
|
+
- 28170809: refactors base-radio to be a functional component
|
|
28
|
+
- ea104d1c: Delete original choice icon now that it's been refactored and moved
|
|
29
|
+
- 8c6c60f5: Converts OptionStatus component to a functional component
|
|
30
|
+
- 80e2cafc: refactor focus-ring to functional component
|
|
31
|
+
- f567f660: Update the eslint config to look at both the package.json for the package and the one from the root
|
|
32
|
+
- e8a60745: increase story/test coverage of base-radio
|
|
33
|
+
- 61a7084e: code cleanup for the choice-icon radio sub-component
|
|
34
|
+
- 16eccaea: convert Radio's Choice component into a functional component
|
|
35
|
+
- eeaa9010: Add more Flow typing to passage and passage-markdown widgets
|
|
36
|
+
- d4d2b3a6: removes unused crossOutButton component
|
|
37
|
+
- 46859806: Increases flow coverage for Radio's Widget component to 100%
|
|
38
|
+
- f5682ad6: fixes a bug in the multiselect radio widget to allow selected choices to be unselected
|
|
39
|
+
- Updated dependencies [f567f660]
|
|
40
|
+
- Updated dependencies [eeaa9010]
|
|
41
|
+
- @khanacademy/kas@0.2.7
|
|
42
|
+
- @khanacademy/kmath@0.0.8
|
|
43
|
+
- @khanacademy/math-input@0.6.3
|
|
44
|
+
- @khanacademy/perseus-linter@0.2.3
|
|
45
|
+
- @khanacademy/pure-markdown@0.1.3
|
|
46
|
+
- @khanacademy/simple-markdown@0.8.6
|
|
47
|
+
|
|
3
48
|
## 0.4.3
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
package/dist/es/index.css
CHANGED
|
@@ -2285,8 +2285,10 @@ img.zoom-img {
|
|
|
2285
2285
|
z-index: 3;
|
|
2286
2286
|
}
|
|
2287
2287
|
.framework-perseus div.paragraph {
|
|
2288
|
-
font-
|
|
2289
|
-
|
|
2288
|
+
font-family: "Noto Serif", serif;
|
|
2289
|
+
font-weight: 400;
|
|
2290
|
+
font-size: 18px;
|
|
2291
|
+
line-height: 22px;
|
|
2290
2292
|
margin: 22px 0px;
|
|
2291
2293
|
}
|
|
2292
2294
|
.framework-perseus .test-prep-blurb div.paragraph {
|
|
@@ -2295,8 +2297,11 @@ img.zoom-img {
|
|
|
2295
2297
|
}
|
|
2296
2298
|
.framework-perseus div.instructions {
|
|
2297
2299
|
display: block;
|
|
2300
|
+
font-family: "Noto Serif", serif;
|
|
2301
|
+
font-weight: 800;
|
|
2302
|
+
font-size: 18px;
|
|
2303
|
+
line-height: 22px;
|
|
2298
2304
|
font-style: italic;
|
|
2299
|
-
font-weight: bold;
|
|
2300
2305
|
}
|
|
2301
2306
|
.framework-perseus .perseus-renderer > .paragraph > ul:not(.perseus-widget-radio),
|
|
2302
2307
|
.framework-perseus .perseus-renderer > .paragraph > ol {
|
|
@@ -3057,15 +3062,17 @@ body.mobile .perseus-matrix .math-output {
|
|
|
3057
3062
|
line-height: 18px;
|
|
3058
3063
|
}
|
|
3059
3064
|
.perseus-widget-passage-container .passage-title div.paragraph {
|
|
3060
|
-
font-
|
|
3065
|
+
font-family: "Noto Serif", serif;
|
|
3061
3066
|
font-weight: 700;
|
|
3067
|
+
font-size: 20px;
|
|
3068
|
+
line-height: 22px;
|
|
3062
3069
|
margin: 0 0 10px;
|
|
3063
3070
|
}
|
|
3064
3071
|
.perseus-widget-passage-container .passage-text div.paragraph {
|
|
3065
|
-
font-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3072
|
+
font-family: "Noto Serif", serif;
|
|
3073
|
+
font-weight: 400;
|
|
3074
|
+
font-size: 20px;
|
|
3075
|
+
line-height: 24px;
|
|
3069
3076
|
}
|
|
3070
3077
|
.perseus-widget-passage-container .passage-text div.paragraph span {
|
|
3071
3078
|
text-indent: 0;
|