@khanacademy/math-input 17.4.0 → 17.5.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/dist/es/index.js +29 -31
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +29 -30
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var perseusCore = require('@khanacademy/perseus-core');
|
|
6
|
-
var Color = require('@khanacademy/wonder-blocks-color');
|
|
7
6
|
var i18n = require('@khanacademy/wonder-blocks-i18n');
|
|
7
|
+
var wonderBlocksTokens = require('@khanacademy/wonder-blocks-tokens');
|
|
8
8
|
var wonderStuffCore = require('@khanacademy/wonder-stuff-core');
|
|
9
9
|
var aphrodite = require('aphrodite');
|
|
10
10
|
var React = require('react');
|
|
@@ -37,7 +37,6 @@ function _interopNamespace(e) {
|
|
|
37
37
|
return Object.freeze(n);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
var Color__default = /*#__PURE__*/_interopDefaultLegacy(Color);
|
|
41
40
|
var i18n__namespace = /*#__PURE__*/_interopNamespace(i18n);
|
|
42
41
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
43
42
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
@@ -47,7 +46,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
47
46
|
|
|
48
47
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
49
48
|
const libName = "@khanacademy/math-input";
|
|
50
|
-
const libVersion = "17.
|
|
49
|
+
const libVersion = "17.5.0";
|
|
51
50
|
perseusCore.addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
52
51
|
|
|
53
52
|
function _extends() {
|
|
@@ -2233,7 +2232,7 @@ class MathInput extends React__namespace.Component {
|
|
|
2233
2232
|
...inlineStyles.innerContainer,
|
|
2234
2233
|
borderWidth: this.getBorderWidthPx(),
|
|
2235
2234
|
...(showInputFocusStyle ? {
|
|
2236
|
-
borderColor:
|
|
2235
|
+
borderColor: wonderBlocksTokens.color.blue
|
|
2237
2236
|
} : {}),
|
|
2238
2237
|
...style
|
|
2239
2238
|
};
|
|
@@ -2329,9 +2328,9 @@ const inlineStyles = {
|
|
|
2329
2328
|
boxSizing: "border-box",
|
|
2330
2329
|
position: "relative",
|
|
2331
2330
|
borderStyle: "solid",
|
|
2332
|
-
borderColor:
|
|
2331
|
+
borderColor: wonderBlocksTokens.color.offBlack50,
|
|
2333
2332
|
borderRadius: 4,
|
|
2334
|
-
color:
|
|
2333
|
+
color: wonderBlocksTokens.color.offBlack
|
|
2335
2334
|
}
|
|
2336
2335
|
};
|
|
2337
2336
|
|
|
@@ -2457,7 +2456,7 @@ const styles$6 = aphrodite.StyleSheet.create({
|
|
|
2457
2456
|
marginLeft: 1
|
|
2458
2457
|
},
|
|
2459
2458
|
hovered: {
|
|
2460
|
-
background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${
|
|
2459
|
+
background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${wonderBlocksTokens.color.white}`,
|
|
2461
2460
|
border: "1px solid #1865F2"
|
|
2462
2461
|
},
|
|
2463
2462
|
pressed: {
|
|
@@ -2465,7 +2464,7 @@ const styles$6 = aphrodite.StyleSheet.create({
|
|
|
2465
2464
|
},
|
|
2466
2465
|
focused: {
|
|
2467
2466
|
outline: "none",
|
|
2468
|
-
border: `2px solid ${
|
|
2467
|
+
border: `2px solid ${wonderBlocksTokens.color.blue}`
|
|
2469
2468
|
},
|
|
2470
2469
|
innerBox: {
|
|
2471
2470
|
boxSizing: "border-box",
|
|
@@ -2477,7 +2476,7 @@ const styles$6 = aphrodite.StyleSheet.create({
|
|
|
2477
2476
|
alignItems: "center"
|
|
2478
2477
|
},
|
|
2479
2478
|
innerBoxPressed: {
|
|
2480
|
-
border: `1px solid ${
|
|
2479
|
+
border: `1px solid ${wonderBlocksTokens.color.white}`
|
|
2481
2480
|
},
|
|
2482
2481
|
activeIndicator: {
|
|
2483
2482
|
position: "absolute",
|
|
@@ -2495,15 +2494,15 @@ const styles$6 = aphrodite.StyleSheet.create({
|
|
|
2495
2494
|
});
|
|
2496
2495
|
function imageTintColor(itemState, hovered, focused, pressed) {
|
|
2497
2496
|
if (itemState === "disabled") {
|
|
2498
|
-
return
|
|
2497
|
+
return wonderBlocksTokens.color.offBlack64;
|
|
2499
2498
|
} else if (pressed) {
|
|
2500
|
-
return
|
|
2499
|
+
return wonderBlocksTokens.color.white;
|
|
2501
2500
|
} else if (itemState === "active") {
|
|
2502
|
-
return
|
|
2501
|
+
return wonderBlocksTokens.color.blue;
|
|
2503
2502
|
} else if (hovered) {
|
|
2504
|
-
return
|
|
2503
|
+
return wonderBlocksTokens.color.blue;
|
|
2505
2504
|
}
|
|
2506
|
-
return
|
|
2505
|
+
return wonderBlocksTokens.color.offBlack64;
|
|
2507
2506
|
}
|
|
2508
2507
|
class TabbarItem extends React__namespace.Component {
|
|
2509
2508
|
render() {
|
|
@@ -3471,7 +3470,7 @@ function ButtonAsset(_ref) {
|
|
|
3471
3470
|
viewBox: "0 0 32 32",
|
|
3472
3471
|
fill: "none",
|
|
3473
3472
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3474
|
-
"data-
|
|
3473
|
+
"data-testid": "comma-decimal"
|
|
3475
3474
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
3476
3475
|
d: "M11.5559 25.3544C11.8679 24.661 12.1799 23.933 12.4919 23.1704C12.8039 22.425 13.0986 21.6884 13.3759 20.9604C13.6706 20.2324 13.9219 19.5737 14.1299 18.9844H16.6259L16.7299 19.2704C16.4526 19.877 16.1232 20.5357 15.7419 21.2464C15.3606 21.9397 14.9619 22.633 14.5459 23.3264C14.1299 24.037 13.7139 24.713 13.2979 25.3544H11.5559Z",
|
|
3477
3476
|
fill: "#21242C"
|
|
@@ -3484,7 +3483,7 @@ function ButtonAsset(_ref) {
|
|
|
3484
3483
|
viewBox: "0 0 40 40",
|
|
3485
3484
|
fill: "none",
|
|
3486
3485
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3487
|
-
"data-
|
|
3486
|
+
"data-testid": "period-decimal"
|
|
3488
3487
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
3489
3488
|
d: "M18.3401 27.512c0-.232.04-.448.12-.648.088-.208.204-.388.348-.54.152-.152.328-.272.528-.36.208-.088.428-.132.66-.132.232 0 .448.044.648.132.208.088.388.208.54.36.152.152.272.332.36.54.088.2.132.416.132.648 0 .24-.044.46-.132.66-.088.2-.208.376-.36.528-.152.152-.332.268-.54.348-.2.088-.416.132-.648.132-.232 0-.452-.044-.66-.132-.2-.08-.376-.196-.528-.348-.144-.152-.26-.328-.348-.528-.08-.2-.12-.42-.12-.66z",
|
|
3490
3489
|
fill: "#21242C"
|
|
@@ -4827,9 +4826,9 @@ const styles$4 = aphrodite.StyleSheet.create({
|
|
|
4827
4826
|
display: "flex",
|
|
4828
4827
|
justifyContent: "center",
|
|
4829
4828
|
alignItems: "center",
|
|
4830
|
-
boxShadow: `0px 1px 0px ${
|
|
4829
|
+
boxShadow: `0px 1px 0px ${wonderBlocksTokens.color.offBlack32}`,
|
|
4831
4830
|
boxSizing: "border-box",
|
|
4832
|
-
background:
|
|
4831
|
+
background: wonderBlocksTokens.color.white,
|
|
4833
4832
|
borderRadius: 4,
|
|
4834
4833
|
borderWidth: 2,
|
|
4835
4834
|
borderStyle: "solid",
|
|
@@ -4840,19 +4839,19 @@ const styles$4 = aphrodite.StyleSheet.create({
|
|
|
4840
4839
|
padding: 1
|
|
4841
4840
|
},
|
|
4842
4841
|
hovered: {
|
|
4843
|
-
borderColor:
|
|
4842
|
+
borderColor: wonderBlocksTokens.color.blue,
|
|
4844
4843
|
padding: 1,
|
|
4845
4844
|
boxShadow: "none"
|
|
4846
4845
|
},
|
|
4847
4846
|
focused: {
|
|
4848
|
-
borderColor:
|
|
4847
|
+
borderColor: wonderBlocksTokens.color.blue,
|
|
4849
4848
|
padding: 0,
|
|
4850
4849
|
boxShadow: "none"
|
|
4851
4850
|
},
|
|
4852
4851
|
pressed: {
|
|
4853
4852
|
border: "2px solid #1B50B3",
|
|
4854
4853
|
padding: 0,
|
|
4855
|
-
background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${
|
|
4854
|
+
background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${wonderBlocksTokens.color.white}`,
|
|
4856
4855
|
boxShadow: "none"
|
|
4857
4856
|
},
|
|
4858
4857
|
outerBoxBase: {
|
|
@@ -5211,13 +5210,13 @@ const styles$3 = aphrodite.StyleSheet.create({
|
|
|
5211
5210
|
width: "100%"
|
|
5212
5211
|
},
|
|
5213
5212
|
base: {
|
|
5214
|
-
boxShadow: `0px 1px 0px ${
|
|
5213
|
+
boxShadow: `0px 1px 0px ${wonderBlocksTokens.color.offBlack32}`,
|
|
5215
5214
|
display: "flex",
|
|
5216
5215
|
justifyContent: "center",
|
|
5217
5216
|
alignItems: "center",
|
|
5218
|
-
background:
|
|
5217
|
+
background: wonderBlocksTokens.color.white,
|
|
5219
5218
|
borderWidth: 2,
|
|
5220
|
-
borderColor:
|
|
5219
|
+
borderColor: wonderBlocksTokens.color.white
|
|
5221
5220
|
},
|
|
5222
5221
|
up: {
|
|
5223
5222
|
borderTopLeftRadius: borderRadiusPx,
|
|
@@ -5236,16 +5235,16 @@ const styles$3 = aphrodite.StyleSheet.create({
|
|
|
5236
5235
|
borderBottomLeftRadius: borderRadiusPx
|
|
5237
5236
|
},
|
|
5238
5237
|
hovered: {
|
|
5239
|
-
borderColor:
|
|
5238
|
+
borderColor: wonderBlocksTokens.color.blue,
|
|
5240
5239
|
boxShadow: "none"
|
|
5241
5240
|
},
|
|
5242
5241
|
focused: {
|
|
5243
|
-
borderColor:
|
|
5242
|
+
borderColor: wonderBlocksTokens.color.blue,
|
|
5244
5243
|
boxShadow: "none"
|
|
5245
5244
|
},
|
|
5246
5245
|
pressed: {
|
|
5247
5246
|
border: "2px solid #1B50B3",
|
|
5248
|
-
background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${
|
|
5247
|
+
background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${wonderBlocksTokens.color.white}`,
|
|
5249
5248
|
boxShadow: "none"
|
|
5250
5249
|
}
|
|
5251
5250
|
});
|
|
@@ -5295,7 +5294,7 @@ const styles$2 = aphrodite.StyleSheet.create({
|
|
|
5295
5294
|
spacer: {
|
|
5296
5295
|
gridColumn: 2,
|
|
5297
5296
|
gridRow: 2,
|
|
5298
|
-
background:
|
|
5297
|
+
background: wonderBlocksTokens.color.white
|
|
5299
5298
|
}
|
|
5300
5299
|
});
|
|
5301
5300
|
|
|
@@ -5488,11 +5487,11 @@ const styles$1 = aphrodite.StyleSheet.create({
|
|
|
5488
5487
|
alignItems: "center"
|
|
5489
5488
|
},
|
|
5490
5489
|
wrapper: {
|
|
5491
|
-
background:
|
|
5490
|
+
background: wonderBlocksTokens.color.white
|
|
5492
5491
|
},
|
|
5493
5492
|
expandedWrapper: {
|
|
5494
5493
|
borderWidth: "1px 1px 0 1px",
|
|
5495
|
-
borderColor:
|
|
5494
|
+
borderColor: wonderBlocksTokens.color.offBlack32,
|
|
5496
5495
|
maxWidth: expandedViewThreshold,
|
|
5497
5496
|
borderRadius: "3px 3px 0 0"
|
|
5498
5497
|
},
|