@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/es/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { addLibraryVersionToPerseusDebug } from '@khanacademy/perseus-core';
2
- import Color from '@khanacademy/wonder-blocks-color';
3
2
  import * as i18n from '@khanacademy/wonder-blocks-i18n';
4
3
  import { getDecimalSeparator, getLocale } from '@khanacademy/wonder-blocks-i18n';
4
+ import { color } from '@khanacademy/wonder-blocks-tokens';
5
5
  import { entries } from '@khanacademy/wonder-stuff-core';
6
6
  import { StyleSheet, css } from 'aphrodite';
7
7
  import * as React from 'react';
@@ -17,7 +17,7 @@ import PropTypes from 'prop-types';
17
17
 
18
18
  // This file is processed by a Rollup plugin (replace) to inject the production
19
19
  const libName = "@khanacademy/math-input";
20
- const libVersion = "17.4.0";
20
+ const libVersion = "17.4.1";
21
21
  addLibraryVersionToPerseusDebug(libName, libVersion);
22
22
 
23
23
  function _extends() {
@@ -2205,7 +2205,7 @@ class MathInput extends React.Component {
2205
2205
  const innerStyle = _extends({}, inlineStyles.innerContainer, {
2206
2206
  borderWidth: this.getBorderWidthPx()
2207
2207
  }, showInputFocusStyle ? {
2208
- borderColor: Color.blue
2208
+ borderColor: color.blue
2209
2209
  } : {}, style);
2210
2210
 
2211
2211
  // NOTE(diedra): This label explicitly refers to tapping because this field
@@ -2300,9 +2300,9 @@ const inlineStyles = {
2300
2300
  boxSizing: "border-box",
2301
2301
  position: "relative",
2302
2302
  borderStyle: "solid",
2303
- borderColor: Color.offBlack50,
2303
+ borderColor: color.offBlack50,
2304
2304
  borderRadius: 4,
2305
- color: Color.offBlack
2305
+ color: color.offBlack
2306
2306
  }
2307
2307
  };
2308
2308
 
@@ -2427,7 +2427,7 @@ const styles$6 = StyleSheet.create({
2427
2427
  marginLeft: 1
2428
2428
  },
2429
2429
  hovered: {
2430
- background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${Color.white}`,
2430
+ background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${color.white}`,
2431
2431
  border: "1px solid #1865F2"
2432
2432
  },
2433
2433
  pressed: {
@@ -2435,7 +2435,7 @@ const styles$6 = StyleSheet.create({
2435
2435
  },
2436
2436
  focused: {
2437
2437
  outline: "none",
2438
- border: `2px solid ${Color.blue}`
2438
+ border: `2px solid ${color.blue}`
2439
2439
  },
2440
2440
  innerBox: {
2441
2441
  boxSizing: "border-box",
@@ -2447,7 +2447,7 @@ const styles$6 = StyleSheet.create({
2447
2447
  alignItems: "center"
2448
2448
  },
2449
2449
  innerBoxPressed: {
2450
- border: `1px solid ${Color.white}`
2450
+ border: `1px solid ${color.white}`
2451
2451
  },
2452
2452
  activeIndicator: {
2453
2453
  position: "absolute",
@@ -2465,15 +2465,15 @@ const styles$6 = StyleSheet.create({
2465
2465
  });
2466
2466
  function imageTintColor(itemState, hovered, focused, pressed) {
2467
2467
  if (itemState === "disabled") {
2468
- return Color.offBlack64;
2468
+ return color.offBlack64;
2469
2469
  } else if (pressed) {
2470
- return Color.white;
2470
+ return color.white;
2471
2471
  } else if (itemState === "active") {
2472
- return Color.blue;
2472
+ return color.blue;
2473
2473
  } else if (hovered) {
2474
- return Color.blue;
2474
+ return color.blue;
2475
2475
  }
2476
- return Color.offBlack64;
2476
+ return color.offBlack64;
2477
2477
  }
2478
2478
  class TabbarItem extends React.Component {
2479
2479
  render() {
@@ -4552,9 +4552,9 @@ const styles$4 = StyleSheet.create({
4552
4552
  display: "flex",
4553
4553
  justifyContent: "center",
4554
4554
  alignItems: "center",
4555
- boxShadow: `0px 1px 0px ${Color.offBlack32}`,
4555
+ boxShadow: `0px 1px 0px ${color.offBlack32}`,
4556
4556
  boxSizing: "border-box",
4557
- background: Color.white,
4557
+ background: color.white,
4558
4558
  borderRadius: 4,
4559
4559
  borderWidth: 2,
4560
4560
  borderStyle: "solid",
@@ -4565,19 +4565,19 @@ const styles$4 = StyleSheet.create({
4565
4565
  padding: 1
4566
4566
  },
4567
4567
  hovered: {
4568
- borderColor: Color.blue,
4568
+ borderColor: color.blue,
4569
4569
  padding: 1,
4570
4570
  boxShadow: "none"
4571
4571
  },
4572
4572
  focused: {
4573
- borderColor: Color.blue,
4573
+ borderColor: color.blue,
4574
4574
  padding: 0,
4575
4575
  boxShadow: "none"
4576
4576
  },
4577
4577
  pressed: {
4578
4578
  border: "2px solid #1B50B3",
4579
4579
  padding: 0,
4580
- background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${Color.white}`,
4580
+ background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${color.white}`,
4581
4581
  boxShadow: "none"
4582
4582
  },
4583
4583
  outerBoxBase: {
@@ -4932,13 +4932,13 @@ const styles$3 = StyleSheet.create({
4932
4932
  width: "100%"
4933
4933
  },
4934
4934
  base: {
4935
- boxShadow: `0px 1px 0px ${Color.offBlack32}`,
4935
+ boxShadow: `0px 1px 0px ${color.offBlack32}`,
4936
4936
  display: "flex",
4937
4937
  justifyContent: "center",
4938
4938
  alignItems: "center",
4939
- background: Color.white,
4939
+ background: color.white,
4940
4940
  borderWidth: 2,
4941
- borderColor: Color.white
4941
+ borderColor: color.white
4942
4942
  },
4943
4943
  up: {
4944
4944
  borderTopLeftRadius: borderRadiusPx,
@@ -4957,16 +4957,16 @@ const styles$3 = StyleSheet.create({
4957
4957
  borderBottomLeftRadius: borderRadiusPx
4958
4958
  },
4959
4959
  hovered: {
4960
- borderColor: Color.blue,
4960
+ borderColor: color.blue,
4961
4961
  boxShadow: "none"
4962
4962
  },
4963
4963
  focused: {
4964
- borderColor: Color.blue,
4964
+ borderColor: color.blue,
4965
4965
  boxShadow: "none"
4966
4966
  },
4967
4967
  pressed: {
4968
4968
  border: "2px solid #1B50B3",
4969
- background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${Color.white}`,
4969
+ background: `linear-gradient(0deg, rgba(24, 101, 242, 0.32), rgba(24, 101, 242, 0.32)), ${color.white}`,
4970
4970
  boxShadow: "none"
4971
4971
  }
4972
4972
  });
@@ -5016,7 +5016,7 @@ const styles$2 = StyleSheet.create({
5016
5016
  spacer: {
5017
5017
  gridColumn: 2,
5018
5018
  gridRow: 2,
5019
- background: Color.white
5019
+ background: color.white
5020
5020
  }
5021
5021
  });
5022
5022
 
@@ -5210,11 +5210,11 @@ const styles$1 = StyleSheet.create({
5210
5210
  alignItems: "center"
5211
5211
  },
5212
5212
  wrapper: {
5213
- background: Color.white
5213
+ background: color.white
5214
5214
  },
5215
5215
  expandedWrapper: {
5216
5216
  borderWidth: "1px 1px 0 1px",
5217
- borderColor: Color.offBlack32,
5217
+ borderColor: color.offBlack32,
5218
5218
  maxWidth: expandedViewThreshold,
5219
5219
  borderRadius: "3px 3px 0 0"
5220
5220
  },