@khanacademy/math-input 17.4.0 → 17.4.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/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.4.0";
49
+ const libVersion = "17.4.1";
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: Color__default["default"].blue
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: Color__default["default"].offBlack50,
2331
+ borderColor: wonderBlocksTokens.color.offBlack50,
2333
2332
  borderRadius: 4,
2334
- color: Color__default["default"].offBlack
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)), ${Color__default["default"].white}`,
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 ${Color__default["default"].blue}`
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 ${Color__default["default"].white}`
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 Color__default["default"].offBlack64;
2497
+ return wonderBlocksTokens.color.offBlack64;
2499
2498
  } else if (pressed) {
2500
- return Color__default["default"].white;
2499
+ return wonderBlocksTokens.color.white;
2501
2500
  } else if (itemState === "active") {
2502
- return Color__default["default"].blue;
2501
+ return wonderBlocksTokens.color.blue;
2503
2502
  } else if (hovered) {
2504
- return Color__default["default"].blue;
2503
+ return wonderBlocksTokens.color.blue;
2505
2504
  }
2506
- return Color__default["default"].offBlack64;
2505
+ return wonderBlocksTokens.color.offBlack64;
2507
2506
  }
2508
2507
  class TabbarItem extends React__namespace.Component {
2509
2508
  render() {
@@ -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 ${Color__default["default"].offBlack32}`,
4829
+ boxShadow: `0px 1px 0px ${wonderBlocksTokens.color.offBlack32}`,
4831
4830
  boxSizing: "border-box",
4832
- background: Color__default["default"].white,
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: Color__default["default"].blue,
4842
+ borderColor: wonderBlocksTokens.color.blue,
4844
4843
  padding: 1,
4845
4844
  boxShadow: "none"
4846
4845
  },
4847
4846
  focused: {
4848
- borderColor: Color__default["default"].blue,
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)), ${Color__default["default"].white}`,
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 ${Color__default["default"].offBlack32}`,
5213
+ boxShadow: `0px 1px 0px ${wonderBlocksTokens.color.offBlack32}`,
5215
5214
  display: "flex",
5216
5215
  justifyContent: "center",
5217
5216
  alignItems: "center",
5218
- background: Color__default["default"].white,
5217
+ background: wonderBlocksTokens.color.white,
5219
5218
  borderWidth: 2,
5220
- borderColor: Color__default["default"].white
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: Color__default["default"].blue,
5238
+ borderColor: wonderBlocksTokens.color.blue,
5240
5239
  boxShadow: "none"
5241
5240
  },
5242
5241
  focused: {
5243
- borderColor: Color__default["default"].blue,
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)), ${Color__default["default"].white}`,
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: Color__default["default"].white
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: Color__default["default"].white
5490
+ background: wonderBlocksTokens.color.white
5492
5491
  },
5493
5492
  expandedWrapper: {
5494
5493
  borderWidth: "1px 1px 0 1px",
5495
- borderColor: Color__default["default"].offBlack32,
5494
+ borderColor: wonderBlocksTokens.color.offBlack32,
5496
5495
  maxWidth: expandedViewThreshold,
5497
5496
  borderRadius: "3px 3px 0 0"
5498
5497
  },