@khanacademy/perseus 1.3.0 → 1.3.2
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 +14 -0
- package/dist/es/index.js +18 -14
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +18 -14
- 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 +26 -16
- package/src/widgets/__tests__/__snapshots__/group_test.jsx.snap +26 -16
- package/src/widgets/__tests__/__snapshots__/radio_test.jsx.snap +273 -169
- 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 +13 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @khanacademy/perseus
|
|
2
2
|
|
|
3
|
+
## 1.3.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1454c80a: Change to shape/space Radio Choice's "cross out" button
|
|
8
|
+
|
|
9
|
+
## 1.3.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 9b3bf30f: CSS bug fixes for SAT Radio widget
|
|
14
|
+
- Updated dependencies [113953e8]
|
|
15
|
+
- @khanacademy/math-input@0.6.4
|
|
16
|
+
|
|
3
17
|
## 1.3.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/es/index.js
CHANGED
|
@@ -27348,7 +27348,7 @@ function Choice(props) {
|
|
|
27348
27348
|
|
|
27349
27349
|
var satCorrectChoice = apiOptions.satStyling && reviewMode && correct;
|
|
27350
27350
|
var satIncorrectChecked = apiOptions.satStyling && reviewMode && !correct && checked;
|
|
27351
|
-
var descriptionClassName = classNames("description", satCorrectChoice && "sat-correct", satIncorrectChecked && "sat-incorrect", css(!apiOptions.satStyling && styles$o.description, apiOptions.satStyling && styles$o.satDescription, satCorrectChoice &&
|
|
27351
|
+
var descriptionClassName = classNames("description", satCorrectChoice && "sat-correct", satIncorrectChecked && "sat-incorrect", css(!apiOptions.satStyling && styles$o.description, apiOptions.satStyling && styles$o.satDescription, satCorrectChoice && checked && styles$o.satDescriptionCorrectChecked, satIncorrectChecked && styles$o.satDescriptionIncorrectChecked));
|
|
27352
27352
|
var rationaleClassName = classNames("perseus-radio-rationale-content", css(styles$o.rationale, !apiOptions.satStyling && styles$o.nonSatRationale, apiOptions.satStyling && styles$o.satReviewRationale)); // We want to show the choices as dimmed out when the choices are
|
|
27353
27353
|
// disabled. However, we don't want to do this in the SAT product and
|
|
27354
27354
|
// we also don't want to do this when we're in review mode in the
|
|
@@ -27361,13 +27361,14 @@ function Choice(props) {
|
|
|
27361
27361
|
return /*#__PURE__*/React.createElement("div", {
|
|
27362
27362
|
style: {
|
|
27363
27363
|
dispay: "flex",
|
|
27364
|
-
flexDirection: "column"
|
|
27365
|
-
|
|
27364
|
+
flexDirection: "column",
|
|
27365
|
+
color: Color.offBlack
|
|
27366
|
+
},
|
|
27367
|
+
className: descriptionClassName
|
|
27366
27368
|
}, /*#__PURE__*/React.createElement("div", {
|
|
27367
27369
|
style: {
|
|
27368
27370
|
display: "flex",
|
|
27369
27371
|
flexDirection: "row",
|
|
27370
|
-
width: "100%",
|
|
27371
27372
|
opacity: showDimmed ? 0.5 : 1.0
|
|
27372
27373
|
}
|
|
27373
27374
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -27386,7 +27387,8 @@ function Choice(props) {
|
|
|
27386
27387
|
},
|
|
27387
27388
|
onChange: () => {},
|
|
27388
27389
|
disabled: disabled || apiOptions.staticRender || apiOptions.readOnly,
|
|
27389
|
-
tabIndex: -1
|
|
27390
|
+
tabIndex: -1,
|
|
27391
|
+
className: ClassNames.RADIO.OPTION_CONTENT
|
|
27390
27392
|
}), /*#__PURE__*/React.createElement("label", {
|
|
27391
27393
|
htmlFor: choiceId
|
|
27392
27394
|
}, a11yText, " \xA0 ", content)), /*#__PURE__*/React.createElement(Clickable, {
|
|
@@ -27398,7 +27400,6 @@ function Choice(props) {
|
|
|
27398
27400
|
crossedOut: false
|
|
27399
27401
|
});
|
|
27400
27402
|
},
|
|
27401
|
-
className: descriptionClassName,
|
|
27402
27403
|
disabled: disabled || apiOptions.staticRender || apiOptions.readOnly,
|
|
27403
27404
|
style: {
|
|
27404
27405
|
flex: 1
|
|
@@ -27496,7 +27497,15 @@ function Choice(props) {
|
|
|
27496
27497
|
return /*#__PURE__*/React.createElement(Clickable, {
|
|
27497
27498
|
onClick: open,
|
|
27498
27499
|
"aria-label": "Open menu for Choice ".concat(getChoiceLetter(pos)),
|
|
27499
|
-
disabled: apiOptions.staticRender
|
|
27500
|
+
disabled: apiOptions.staticRender,
|
|
27501
|
+
style: {
|
|
27502
|
+
alignSelf: "center",
|
|
27503
|
+
padding: "5px",
|
|
27504
|
+
display: "flex",
|
|
27505
|
+
justifyContent: "center",
|
|
27506
|
+
alignItems: "center",
|
|
27507
|
+
marginLeft: "10px"
|
|
27508
|
+
}
|
|
27500
27509
|
}, _ref4 => {
|
|
27501
27510
|
return /*#__PURE__*/React.createElement(Icon, {
|
|
27502
27511
|
icon: ellipsisHorizontalIcon,
|
|
@@ -27531,16 +27540,12 @@ var styles$o = StyleSheet.create({
|
|
|
27531
27540
|
boxSizing: "border-box",
|
|
27532
27541
|
cursor: "pointer",
|
|
27533
27542
|
marginLeft: 0,
|
|
27534
|
-
padding: "17px 14px"
|
|
27535
|
-
},
|
|
27536
|
-
satDescriptionCorrect: {
|
|
27537
|
-
color: satCorrectColor
|
|
27543
|
+
padding: "17px 14px 17px 0"
|
|
27538
27544
|
},
|
|
27539
27545
|
satDescriptionCorrectChecked: {
|
|
27540
27546
|
backgroundColor: satCorrectBackgroundColor
|
|
27541
27547
|
},
|
|
27542
27548
|
satDescriptionIncorrectChecked: {
|
|
27543
|
-
color: satIncorrectColor,
|
|
27544
27549
|
backgroundColor: satIncorrectBackgroundColor
|
|
27545
27550
|
},
|
|
27546
27551
|
rationale: {
|
|
@@ -27894,8 +27899,7 @@ var styles$n = StyleSheet.create({
|
|
|
27894
27899
|
}
|
|
27895
27900
|
},
|
|
27896
27901
|
radio: {
|
|
27897
|
-
|
|
27898
|
-
width: "100%"
|
|
27902
|
+
padding: 0
|
|
27899
27903
|
},
|
|
27900
27904
|
responsiveRadioContainer: {
|
|
27901
27905
|
borderBottom: "1px solid ".concat(radioBorderColor$1),
|