@khanacademy/perseus 0.4.3 → 1.0.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 +34 -0
- package/dist/es/index.js +1078 -1299
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +1077 -1304
- package/dist/index.js.map +1 -1
- package/dist/strings.js +0 -4
- package/package.json +9 -8
- package/src/multi-items/__tests__/__snapshots__/multi-renderer_test.js.snap +110 -110
- package/src/perseus-api.jsx +10 -36
- package/src/perseus-types.js +0 -138
- package/src/styles/constants.js +0 -2
- package/src/styles/variables.less +0 -2
- package/src/types.js +18 -35
- package/src/util.js +0 -6
- package/src/version.js +1 -1
- package/src/widgets/__testdata__/base-radio_testdata.js +22 -0
- package/src/widgets/__tests__/__snapshots__/group_test.jsx.snap +110 -110
- package/src/widgets/__tests__/__snapshots__/radio_test.jsx.snap +1136 -1160
- package/src/widgets/__tests__/radio/base-radio_test.jsx +243 -41
- package/src/widgets/__tests__/radio/choice-icon_test.jsx +67 -0
- package/src/widgets/__tests__/radio/choice_test.jsx +201 -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/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 +483 -556
- package/src/widgets/radio/choice-icon/choice-icon.jsx +155 -0
- package/src/widgets/radio/choice-icon/cross-out-line.jsx +55 -0
- package/src/widgets/radio/choice-icon/library-choice-icon.jsx +219 -0
- package/src/widgets/radio/choice-icon/sat-choice-icon.jsx +129 -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 +282 -353
- 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,39 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- f9e0cda6: Change API shape: remove radioStyleVersion, add primaryProductColor to styling
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 61a7084e: make multi-select options look more like checkboxes
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 2a3ac714: adds better flow coverage to base-radio.jsx
|
|
16
|
+
- 28170809: refactors base-radio to be a functional component
|
|
17
|
+
- ea104d1c: Delete original choice icon now that it's been refactored and moved
|
|
18
|
+
- 8c6c60f5: Converts OptionStatus component to a functional component
|
|
19
|
+
- 80e2cafc: refactor focus-ring to functional component
|
|
20
|
+
- f567f660: Update the eslint config to look at both the package.json for the package and the one from the root
|
|
21
|
+
- e8a60745: increase story/test coverage of base-radio
|
|
22
|
+
- 61a7084e: code cleanup for the choice-icon radio sub-component
|
|
23
|
+
- 16eccaea: convert Radio's Choice component into a functional component
|
|
24
|
+
- eeaa9010: Add more Flow typing to passage and passage-markdown widgets
|
|
25
|
+
- d4d2b3a6: removes unused crossOutButton component
|
|
26
|
+
- 46859806: Increases flow coverage for Radio's Widget component to 100%
|
|
27
|
+
- f5682ad6: fixes a bug in the multiselect radio widget to allow selected choices to be unselected
|
|
28
|
+
- Updated dependencies [f567f660]
|
|
29
|
+
- Updated dependencies [eeaa9010]
|
|
30
|
+
- @khanacademy/kas@0.2.7
|
|
31
|
+
- @khanacademy/kmath@0.0.8
|
|
32
|
+
- @khanacademy/math-input@0.6.3
|
|
33
|
+
- @khanacademy/perseus-linter@0.2.3
|
|
34
|
+
- @khanacademy/pure-markdown@0.1.3
|
|
35
|
+
- @khanacademy/simple-markdown@0.8.6
|
|
36
|
+
|
|
3
37
|
## 0.4.3
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|