@khanacademy/math-input 4.0.0 → 4.1.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.
Files changed (65) hide show
  1. package/.eslintrc.js +7 -1
  2. package/CHANGELOG.md +14 -0
  3. package/dist/components/keypad/button.d.ts +1 -0
  4. package/dist/components/keypad/button.js.flow +1 -0
  5. package/dist/components/keypad/extras-page/index.d.ts +10 -0
  6. package/dist/components/keypad/extras-page/index.js.flow +15 -0
  7. package/dist/components/keypad/geometry-page/index.d.ts +2 -1
  8. package/dist/components/keypad/geometry-page/index.js.flow +2 -1
  9. package/dist/components/keypad/index.d.ts +9 -2
  10. package/dist/components/keypad/index.js.flow +9 -2
  11. package/dist/components/keypad/keypad-page-items.d.ts +8 -16
  12. package/dist/components/keypad/keypad-page-items.js.flow +11 -16
  13. package/dist/components/keypad/numbers-page/index.d.ts +2 -1
  14. package/dist/components/keypad/numbers-page/index.js.flow +2 -1
  15. package/dist/components/keypad/operators-page/advanced-relations-buttons.d.ts +2 -1
  16. package/dist/components/keypad/operators-page/advanced-relations-buttons.js.flow +2 -1
  17. package/dist/components/keypad/operators-page/basic-relations-buttons.d.ts +2 -1
  18. package/dist/components/keypad/operators-page/basic-relations-buttons.js.flow +2 -1
  19. package/dist/components/keypad/operators-page/index.d.ts +2 -1
  20. package/dist/components/keypad/operators-page/index.js.flow +2 -1
  21. package/dist/components/keypad/operators-page/logarithms-buttons.d.ts +2 -1
  22. package/dist/components/keypad/operators-page/logarithms-buttons.js.flow +2 -1
  23. package/dist/components/keypad/operators-page/pre-algebra-buttons.d.ts +2 -1
  24. package/dist/components/keypad/operators-page/pre-algebra-buttons.js.flow +2 -1
  25. package/dist/components/keypad-legacy/two-page-keypad.d.ts +6 -4
  26. package/dist/components/keypad-legacy/two-page-keypad.js.flow +6 -4
  27. package/dist/components/tabbar/tabbar.d.ts +6 -9
  28. package/dist/components/tabbar/tabbar.js.flow +6 -9
  29. package/dist/components/tabbar/types.d.ts +1 -1
  30. package/dist/components/tabbar/types.js.flow +1 -1
  31. package/dist/es/index.js +223 -154
  32. package/dist/es/index.js.map +1 -1
  33. package/dist/index.js +223 -154
  34. package/dist/index.js.map +1 -1
  35. package/dist/types.d.ts +1 -0
  36. package/dist/types.js.flow +1 -0
  37. package/package.json +2 -1
  38. package/src/components/keypad/__tests__/Button.test.tsx +51 -0
  39. package/src/components/keypad/__tests__/KeypadButton.test.tsx +41 -0
  40. package/src/components/keypad/__tests__/keypad-v2.cypress.ts +33 -0
  41. package/src/components/keypad/button-assets.tsx +33 -3
  42. package/src/components/keypad/button.tsx +7 -2
  43. package/src/components/keypad/extras-page/index.tsx +27 -0
  44. package/src/components/keypad/geometry-page/index.tsx +2 -1
  45. package/src/components/keypad/index.tsx +36 -8
  46. package/src/components/keypad/keypad-mathquill.stories.tsx +28 -15
  47. package/src/components/keypad/keypad-page-items.tsx +10 -18
  48. package/src/components/keypad/numbers-page/index.tsx +2 -1
  49. package/src/components/keypad/operators-page/advanced-relations-buttons.tsx +2 -1
  50. package/src/components/keypad/operators-page/basic-relations-buttons.tsx +2 -1
  51. package/src/components/keypad/operators-page/index.tsx +2 -1
  52. package/src/components/keypad/operators-page/logarithms-buttons.tsx +2 -1
  53. package/src/components/keypad/operators-page/pre-algebra-buttons.tsx +2 -1
  54. package/src/components/keypad-legacy/two-page-keypad.tsx +18 -6
  55. package/src/components/tabbar/__tests__/tabbar.test.tsx +36 -36
  56. package/src/components/tabbar/icons.tsx +68 -50
  57. package/src/components/tabbar/item.tsx +5 -1
  58. package/src/components/tabbar/tabbar.stories.tsx +23 -12
  59. package/src/components/tabbar/tabbar.tsx +22 -38
  60. package/src/components/tabbar/types.ts +1 -1
  61. package/src/types.ts +2 -0
  62. package/tsconfig-build.json +1 -2
  63. package/tsconfig-build.tsbuildinfo +1 -1
  64. package/dist/components/input/__tests__/test-math-wrapper.d.ts +0 -8
  65. package/dist/components/input/__tests__/test-math-wrapper.js.flow +0 -14
package/dist/index.js CHANGED
@@ -122,7 +122,7 @@ class Text extends React__namespace.Component {
122
122
  numberOfLines,
123
123
  style
124
124
  } = this.props;
125
- const className = aphrodite.css(styles$g.initial, ...(Array.isArray(style) ? style : [style]), numberOfLines === 1 && styles$g.singleLineStyle);
125
+ const className = aphrodite.css(styles$h.initial, ...(Array.isArray(style) ? style : [style]), numberOfLines === 1 && styles$h.singleLineStyle);
126
126
  return /*#__PURE__*/React__namespace.createElement("span", {
127
127
  className: className,
128
128
  style: this.props.dynamicStyle
@@ -131,7 +131,7 @@ class Text extends React__namespace.Component {
131
131
  }
132
132
 
133
133
  // https://github.com/necolas/react-native-web/blob/master/src/components/Text/index.js
134
- const styles$g = aphrodite.StyleSheet.create({
134
+ const styles$h = aphrodite.StyleSheet.create({
135
135
  initial: {
136
136
  color: "inherit",
137
137
  display: "inline",
@@ -2108,7 +2108,7 @@ class MathInput extends React__namespace.Component {
2108
2108
  // to the open the keyboard, and then remove the second half of this label.
2109
2109
  const ariaLabel = i18n__namespace._("Math input box") + " " + i18n__namespace._("Tap with one or two fingers to open keyboard");
2110
2110
  return /*#__PURE__*/React__namespace.createElement(View, {
2111
- style: styles$f.input,
2111
+ style: styles$g.input,
2112
2112
  onTouchStart: this.handleTouchStart,
2113
2113
  onTouchMove: this.handleTouchMove,
2114
2114
  onTouchEnd: this.handleTouchEnd,
@@ -2154,7 +2154,7 @@ const numeralHeightPx = 20;
2154
2154
  const totalDesiredPadding = 12;
2155
2155
  const minHeightPx = numeralHeightPx + totalDesiredPadding * 2;
2156
2156
  const minWidthPx = 64;
2157
- const styles$f = aphrodite.StyleSheet.create({
2157
+ const styles$g = aphrodite.StyleSheet.create({
2158
2158
  input: {
2159
2159
  position: "relative",
2160
2160
  display: "inline-block",
@@ -2974,7 +2974,7 @@ class CornerDecal extends React__namespace.Component {
2974
2974
  const {
2975
2975
  style
2976
2976
  } = this.props;
2977
- const containerStyle = [styles$e.container, ...(Array.isArray(style) ? style : [style])];
2977
+ const containerStyle = [styles$f.container, ...(Array.isArray(style) ? style : [style])];
2978
2978
  return /*#__PURE__*/React__namespace.createElement(View, {
2979
2979
  style: containerStyle
2980
2980
  }, /*#__PURE__*/React__namespace.createElement("svg", {
@@ -2990,7 +2990,7 @@ class CornerDecal extends React__namespace.Component {
2990
2990
  }
2991
2991
 
2992
2992
  const triangleSizePx = 7;
2993
- const styles$e = aphrodite.StyleSheet.create({
2993
+ const styles$f = aphrodite.StyleSheet.create({
2994
2994
  container: {
2995
2995
  position: "absolute",
2996
2996
  top: 0,
@@ -3060,13 +3060,13 @@ class MathIcon extends React__namespace.Component {
3060
3060
  const {
3061
3061
  style
3062
3062
  } = this.props;
3063
- const containerStyle = [row$7, centered$4, styles$d.size, styles$d.base, ...(Array.isArray(style) ? style : [style])];
3063
+ const containerStyle = [row$7, centered$4, styles$e.size, styles$e.base, ...(Array.isArray(style) ? style : [style])];
3064
3064
  return /*#__PURE__*/React__namespace.createElement(View, {
3065
3065
  style: containerStyle
3066
3066
  });
3067
3067
  }
3068
3068
  }
3069
- const styles$d = aphrodite.StyleSheet.create({
3069
+ const styles$e = aphrodite.StyleSheet.create({
3070
3070
  size: {
3071
3071
  height: iconSizeHeightPx,
3072
3072
  width: iconSizeWidthPx
@@ -4249,13 +4249,13 @@ class TextIcon extends React__namespace.Component {
4249
4249
  character,
4250
4250
  style
4251
4251
  } = this.props;
4252
- const containerStyle = [row$6, centered$3, styles$c.size, styles$c.base, ...(Array.isArray(style) ? style : [style])];
4252
+ const containerStyle = [row$6, centered$3, styles$d.size, styles$d.base, ...(Array.isArray(style) ? style : [style])];
4253
4253
  return /*#__PURE__*/React__namespace.createElement(View, {
4254
4254
  style: containerStyle
4255
4255
  }, /*#__PURE__*/React__namespace.createElement(Text, null, character));
4256
4256
  }
4257
4257
  }
4258
- const styles$c = aphrodite.StyleSheet.create({
4258
+ const styles$d = aphrodite.StyleSheet.create({
4259
4259
  size: {
4260
4260
  height: iconSizeHeightPx,
4261
4261
  width: iconSizeWidthPx
@@ -4278,7 +4278,7 @@ class Icon extends React__namespace.PureComponent {
4278
4278
  icon,
4279
4279
  style
4280
4280
  } = this.props;
4281
- const styleWithFocus = [focused ? styles$b.focused : styles$b.unfocused, ...(Array.isArray(style) ? style : [style])];
4281
+ const styleWithFocus = [focused ? styles$c.focused : styles$c.unfocused, ...(Array.isArray(style) ? style : [style])];
4282
4282
  switch (icon.type) {
4283
4283
  case IconType.MATH:
4284
4284
  return /*#__PURE__*/React__namespace.createElement(MathIcon, {
@@ -4304,7 +4304,7 @@ class Icon extends React__namespace.PureComponent {
4304
4304
  }
4305
4305
  }
4306
4306
  }
4307
- const styles$b = aphrodite.StyleSheet.create({
4307
+ const styles$c = aphrodite.StyleSheet.create({
4308
4308
  unfocused: {
4309
4309
  color: unfocusedColor
4310
4310
  },
@@ -4346,19 +4346,19 @@ class MultiSymbolGrid extends React__namespace.Component {
4346
4346
  focused: focused
4347
4347
  });
4348
4348
  } else {
4349
- const primaryIconStyle = styles$a.base;
4350
- const secondaryIconStyle = [styles$a.base, styles$a.secondary];
4349
+ const primaryIconStyle = styles$b.base;
4350
+ const secondaryIconStyle = [styles$b.base, styles$b.secondary];
4351
4351
  if (icons.length === 2) {
4352
4352
  return /*#__PURE__*/React__namespace.createElement(View, {
4353
- style: [row$5, styles$a.size]
4353
+ style: [row$5, styles$b.size]
4354
4354
  }, /*#__PURE__*/React__namespace.createElement(View, {
4355
- style: [column$3, centered$2, fullWidth$3, styles$a.middleLeft]
4355
+ style: [column$3, centered$2, fullWidth$3, styles$b.middleLeft]
4356
4356
  }, /*#__PURE__*/React__namespace.createElement(Icon, {
4357
4357
  style: primaryIconStyle,
4358
4358
  icon: icons[0],
4359
4359
  focused: focused
4360
4360
  })), /*#__PURE__*/React__namespace.createElement(View, {
4361
- style: [column$3, centered$2, fullWidth$3, styles$a.middleRight]
4361
+ style: [column$3, centered$2, fullWidth$3, styles$b.middleRight]
4362
4362
  }, /*#__PURE__*/React__namespace.createElement(Icon, {
4363
4363
  style: secondaryIconStyle,
4364
4364
  icon: icons[1],
@@ -4366,17 +4366,17 @@ class MultiSymbolGrid extends React__namespace.Component {
4366
4366
  })));
4367
4367
  } else if (icons.length >= 3) {
4368
4368
  return /*#__PURE__*/React__namespace.createElement(View, {
4369
- style: [column$3, styles$a.size]
4369
+ style: [column$3, styles$b.size]
4370
4370
  }, /*#__PURE__*/React__namespace.createElement(View, {
4371
4371
  style: row$5
4372
4372
  }, /*#__PURE__*/React__namespace.createElement(View, {
4373
- style: [centered$2, fullWidth$3, styles$a.topLeft]
4373
+ style: [centered$2, fullWidth$3, styles$b.topLeft]
4374
4374
  }, /*#__PURE__*/React__namespace.createElement(Icon, {
4375
4375
  style: primaryIconStyle,
4376
4376
  icon: icons[0],
4377
4377
  focused: focused
4378
4378
  })), /*#__PURE__*/React__namespace.createElement(View, {
4379
- style: [centered$2, fullWidth$3, styles$a.topRight]
4379
+ style: [centered$2, fullWidth$3, styles$b.topRight]
4380
4380
  }, /*#__PURE__*/React__namespace.createElement(Icon, {
4381
4381
  style: secondaryIconStyle,
4382
4382
  icon: icons[1],
@@ -4384,13 +4384,13 @@ class MultiSymbolGrid extends React__namespace.Component {
4384
4384
  }))), /*#__PURE__*/React__namespace.createElement(View, {
4385
4385
  style: row$5
4386
4386
  }, /*#__PURE__*/React__namespace.createElement(View, {
4387
- style: [centered$2, fullWidth$3, styles$a.bottomLeft]
4387
+ style: [centered$2, fullWidth$3, styles$b.bottomLeft]
4388
4388
  }, /*#__PURE__*/React__namespace.createElement(Icon, {
4389
4389
  style: secondaryIconStyle,
4390
4390
  icon: icons[2],
4391
4391
  focused: focused
4392
4392
  })), /*#__PURE__*/React__namespace.createElement(View, {
4393
- style: [centered$2, fullWidth$3, styles$a.bottomRight]
4393
+ style: [centered$2, fullWidth$3, styles$b.bottomRight]
4394
4394
  }, icons[3] && /*#__PURE__*/React__namespace.createElement(Icon, {
4395
4395
  style: secondaryIconStyle,
4396
4396
  icon: icons[3],
@@ -4403,7 +4403,7 @@ class MultiSymbolGrid extends React__namespace.Component {
4403
4403
  }
4404
4404
  const verticalInsetPx = 2;
4405
4405
  const horizontalInsetPx = 4;
4406
- const styles$a = aphrodite.StyleSheet.create({
4406
+ const styles$b = aphrodite.StyleSheet.create({
4407
4407
  size: {
4408
4408
  height: iconSizeHeightPx,
4409
4409
  width: iconSizeWidthPx
@@ -4464,29 +4464,29 @@ class KeypadButton$1 extends React__namespace.PureComponent {
4464
4464
  _defineProperty(this, "_getFocusStyle", type => {
4465
4465
  let focusBackgroundStyle;
4466
4466
  if (type === "INPUT_NAVIGATION" || type === "KEYPAD_NAVIGATION") {
4467
- focusBackgroundStyle = styles$9.light;
4467
+ focusBackgroundStyle = styles$a.light;
4468
4468
  } else {
4469
- focusBackgroundStyle = styles$9.bright;
4469
+ focusBackgroundStyle = styles$a.bright;
4470
4470
  }
4471
- return [styles$9.focusBox, focusBackgroundStyle];
4471
+ return [styles$a.focusBox, focusBackgroundStyle];
4472
4472
  });
4473
4473
  _defineProperty(this, "_getButtonStyle", (type, borders, style) => {
4474
4474
  // Select the appropriate style for the button.
4475
4475
  let backgroundStyle;
4476
4476
  switch (type) {
4477
4477
  case "EMPTY":
4478
- backgroundStyle = styles$9.empty;
4478
+ backgroundStyle = styles$a.empty;
4479
4479
  break;
4480
4480
  case "MANY":
4481
4481
  case "VALUE":
4482
- backgroundStyle = styles$9.value;
4482
+ backgroundStyle = styles$a.value;
4483
4483
  break;
4484
4484
  case "OPERATOR":
4485
- backgroundStyle = styles$9.operator;
4485
+ backgroundStyle = styles$a.operator;
4486
4486
  break;
4487
4487
  case "INPUT_NAVIGATION":
4488
4488
  case "KEYPAD_NAVIGATION":
4489
- backgroundStyle = styles$9.control;
4489
+ backgroundStyle = styles$a.control;
4490
4490
  break;
4491
4491
  case "ECHO":
4492
4492
  backgroundStyle = null;
@@ -4495,13 +4495,13 @@ class KeypadButton$1 extends React__namespace.PureComponent {
4495
4495
  const borderStyle = [];
4496
4496
  if (borders.includes(BorderDirection.LEFT)) {
4497
4497
  // @ts-expect-error TS2345
4498
- borderStyle.push(styles$9.leftBorder);
4498
+ borderStyle.push(styles$a.leftBorder);
4499
4499
  }
4500
4500
  if (borders.includes(BorderDirection.BOTTOM)) {
4501
4501
  // @ts-expect-error TS2345
4502
- borderStyle.push(styles$9.bottomBorder);
4502
+ borderStyle.push(styles$a.bottomBorder);
4503
4503
  }
4504
- return [styles$9.buttonBase, backgroundStyle, ...borderStyle, type === "ECHO" && styles$9.echo, this.buttonSizeStyle,
4504
+ return [styles$a.buttonBase, backgroundStyle, ...borderStyle, type === "ECHO" && styles$a.echo, this.buttonSizeStyle,
4505
4505
  // React Native allows you to set the 'style' props on user defined
4506
4506
  // components.
4507
4507
  // See: https://facebook.github.io/react-native/docs/style.html
@@ -4546,7 +4546,7 @@ class KeypadButton$1 extends React__namespace.PureComponent {
4546
4546
  const renderFocused = !disabled && focused || popoverEnabled || type === "ECHO";
4547
4547
  const buttonStyle = this._getButtonStyle(type, borders, style);
4548
4548
  const focusStyle = this._getFocusStyle(type);
4549
- const iconWrapperStyle = [styles$9.iconWrapper, disabled ? styles$9.disabled : undefined];
4549
+ const iconWrapperStyle = [styles$a.iconWrapper, disabled ? styles$a.disabled : undefined];
4550
4550
  const eventHandlers = {
4551
4551
  onTouchCancel,
4552
4552
  onTouchEnd,
@@ -4557,7 +4557,7 @@ class KeypadButton$1 extends React__namespace.PureComponent {
4557
4557
  style: focusStyle
4558
4558
  });
4559
4559
  const maybeCornerDecal = !renderFocused && !disabled && childKeys && childKeys.length > 0 && /*#__PURE__*/React__namespace.createElement(CornerDecal, {
4560
- style: styles$9.decalInset
4560
+ style: styles$a.decalInset
4561
4561
  });
4562
4562
  if (type === "EMPTY") {
4563
4563
  return /*#__PURE__*/React__namespace.createElement(View, _extends({
@@ -4606,7 +4606,7 @@ _defineProperty(KeypadButton$1, "defaultProps", {
4606
4606
  });
4607
4607
  const focusInsetPx = 4;
4608
4608
  const focusBoxZIndex = 0;
4609
- const styles$9 = aphrodite.StyleSheet.create({
4609
+ const styles$a = aphrodite.StyleSheet.create({
4610
4610
  buttonBase: {
4611
4611
  flex: 1,
4612
4612
  cursor: "pointer",
@@ -4759,7 +4759,7 @@ class TouchableKeypadButton extends React__namespace.Component {
4759
4759
  onTouchMove: evt => gestureManager.onTouchMove(evt),
4760
4760
  onTouchCancel: evt => gestureManager.onTouchCancel(evt)
4761
4761
  };
4762
- const styleWithAddons = [...(Array.isArray(style) ? style : [style]), styles$8.preventScrolls];
4762
+ const styleWithAddons = [...(Array.isArray(style) ? style : [style]), styles$9.preventScrolls];
4763
4763
  return /*#__PURE__*/React__namespace.createElement(KeypadButton$2, _extends({
4764
4764
  ref: node => gestureManager.registerDOMNode(id, ReactDOM__default["default"].findDOMNode(node), childKeyIds),
4765
4765
  borders: borders,
@@ -4812,7 +4812,7 @@ const mapStateToProps$5 = (state, ownProps) => {
4812
4812
  ...extractProps(useFirstChildProps ? childKeys[0] : keyConfig)
4813
4813
  };
4814
4814
  };
4815
- const styles$8 = aphrodite.StyleSheet.create({
4815
+ const styles$9 = aphrodite.StyleSheet.create({
4816
4816
  preventScrolls: {
4817
4817
  // Touch events that start in the touchable buttons shouldn't be
4818
4818
  // allowed to produce page scrolls.
@@ -4866,48 +4866,69 @@ const IconAsset = function (_ref) {
4866
4866
  tintColor,
4867
4867
  type
4868
4868
  } = _ref;
4869
- if (type === "Geometry") {
4870
- return /*#__PURE__*/React__namespace.createElement("svg", {
4871
- width: "32",
4872
- height: "32",
4873
- viewBox: "0 0 32 32",
4874
- fill: "none",
4875
- xmlns: "http://www.w3.org/2000/svg"
4876
- }, /*#__PURE__*/React__namespace.createElement("path", {
4877
- fillRule: "evenodd",
4878
- clipRule: "evenodd",
4879
- d: "M7.57584 7.09442C7.92723 6.92984 8.3421 6.98339 8.64018 7.23179L26.6402 22.2318C26.9636 22.5013 27.0836 22.9446 26.9403 23.3404C26.7969 23.7363 26.421 24 26 24H8C7.44772 24 7 23.5523 7 23V8.00001C7 7.61199 7.22446 7.259 7.57584 7.09442ZM9 10.1351V17H13C13.5523 17 14 17.4477 14 18V22H23.238L9 10.1351ZM12 22V19H9V22H12Z",
4880
- fill: tintColor
4881
- }));
4882
- } else if (type === "Operators") {
4883
- return /*#__PURE__*/React__namespace.createElement("svg", {
4884
- viewBox: "0 0 32 32",
4885
- fill: "none",
4886
- xmlns: "http://www.w3.org/2000/svg"
4887
- }, /*#__PURE__*/React__namespace.createElement("path", {
4888
- fillRule: "evenodd",
4889
- clipRule: "evenodd",
4890
- d: "M29 6H30V7H29V6ZM27 6C27 4.89543 27.8954 4 29 4H30C31.1046 4 32 4.89543 32 6V7C32 8.10457 31.1046 9 30 9H29C27.8954 9 27 8.10457 27 7V6ZM11.1318 6.50386C11.3098 6.19229 11.6411 6 12 6H14C14.5523 6 15 6.44772 15 7C15 7.55228 14.5523 8 14 8H12.5803L8.86824 14.4961C8.68527 14.8163 8.34091 15.0098 7.97225 14.9996C7.6036 14.9894 7.2705 14.7771 7.10557 14.4472L5.10557 10.4472C4.85858 9.95324 5.05881 9.35256 5.55279 9.10557C6.04676 8.85858 6.64744 9.05881 6.89443 9.55279L8.0588 11.8815L11.1318 6.50386ZM7.70676 16.2925C8.09748 16.6829 8.09779 17.316 7.70745 17.7068C7.28543 18.1292 6.84383 18.7303 6.51157 19.3658C6.17039 20.0184 6 20.601 6 21C6 21.3789 6.17235 21.9897 6.51638 22.6649C6.85315 23.3259 7.28488 23.9121 7.66786 24.2557C8.07892 24.6246 8.11314 25.2568 7.74429 25.6679C7.37544 26.0789 6.7432 26.1131 6.33214 25.7443C5.7161 25.1915 5.14783 24.3844 4.73434 23.5728C4.32813 22.7755 3.99999 21.8345 4 21C4.00001 20.1391 4.3301 19.2217 4.73917 18.4392C5.15715 17.6397 5.71554 16.8708 6.29255 16.2932C6.68288 15.9025 7.31605 15.9022 7.70676 16.2925ZM11.2932 16.2925C11.684 15.9022 12.3171 15.9025 12.7075 16.2932C13.2845 16.8708 13.8428 17.6397 14.2608 18.4392C14.6699 19.2217 15 20.1391 15 21C15 21.8345 14.6719 22.7755 14.2657 23.5728C13.8522 24.3844 13.2839 25.1915 12.6679 25.7443C12.2568 26.1131 11.6246 26.0789 11.2557 25.6679C10.8869 25.2568 10.9211 24.6246 11.3321 24.2557C11.7151 23.9121 12.1469 23.3259 12.4836 22.6649C12.8276 21.9897 13 21.3789 13 21C13 20.601 12.8296 20.0184 12.4884 19.3658C12.1562 18.7303 11.7146 18.1292 11.2925 17.7068C10.9022 17.316 10.9025 16.6829 11.2932 16.2925ZM27.9363 17.6489C28.1302 18.166 27.8682 18.7424 27.3511 18.9363L21.848 21L27.3511 23.0637C27.8682 23.2576 28.1302 23.834 27.9363 24.3511C27.7424 24.8682 27.166 25.1302 26.6489 24.9363L18.6489 21.9363C18.2586 21.79 18 21.4168 18 21C18 20.5832 18.2586 20.21 18.6489 20.0637L26.6489 17.0637C27.166 16.8698 27.7424 17.1318 27.9363 17.6489ZM21 8V13H24V8H21ZM20 6C19.4477 6 19 6.44772 19 7V14C19 14.5523 19.4477 15 20 15H25C25.5523 15 26 14.5523 26 14V7C26 6.44772 25.5523 6 25 6H20Z",
4891
- fill: tintColor
4892
- }));
4893
- } else if (type === "Numbers") {
4894
- return /*#__PURE__*/React__namespace.createElement("svg", {
4895
- width: "32",
4896
- height: "32",
4897
- viewBox: "0 0 32 32",
4898
- fill: "none",
4899
- xmlns: "http://www.w3.org/2000/svg"
4900
- }, /*#__PURE__*/React__namespace.createElement("path", {
4901
- d: "M10.4123 19.5794V21.0004H4.71434V19.5794H6.73034V14.0214C6.73034 13.9001 6.73267 13.7764 6.73734 13.6504C6.742 13.5244 6.749 13.3961 6.75834 13.2654L5.42834 14.3714C5.335 14.4414 5.244 14.4858 5.15534 14.5044C5.06667 14.5231 4.98267 14.5254 4.90334 14.5114C4.824 14.4928 4.754 14.4648 4.69334 14.4274C4.63267 14.3854 4.586 14.3434 4.55334 14.3014L3.94434 13.4824L7.06634 10.8364H8.65534V19.5794H10.4123ZM18.7924 19.2294C19.0024 19.2294 19.1658 19.2878 19.2824 19.4044C19.4038 19.5211 19.4644 19.6751 19.4644 19.8664V21.0004H12.4224V20.3704C12.4224 20.2491 12.4481 20.1184 12.4994 19.9784C12.5508 19.8338 12.6371 19.7031 12.7584 19.5864L15.7684 16.5694C16.0251 16.3128 16.2514 16.0678 16.4474 15.8344C16.6434 15.5964 16.8068 15.3654 16.9374 15.1414C17.0681 14.9128 17.1661 14.6818 17.2314 14.4484C17.2968 14.2151 17.3294 13.9701 17.3294 13.7134C17.3294 13.2608 17.2128 12.9178 16.9794 12.6844C16.7461 12.4464 16.4171 12.3274 15.9924 12.3274C15.8058 12.3274 15.6331 12.3554 15.4744 12.4114C15.3204 12.4628 15.1804 12.5351 15.0544 12.6284C14.9331 12.7218 14.8281 12.8314 14.7394 12.9574C14.6508 13.0834 14.5854 13.2211 14.5434 13.3704C14.4594 13.6038 14.3451 13.7601 14.2004 13.8394C14.0604 13.9141 13.8598 13.9304 13.5984 13.8884L12.5764 13.7064C12.6511 13.2118 12.7911 12.7778 12.9964 12.4044C13.2018 12.0311 13.4584 11.7208 13.7664 11.4734C14.0744 11.2261 14.4268 11.0418 14.8234 10.9204C15.2201 10.7944 15.6471 10.7314 16.1044 10.7314C16.5851 10.7314 17.0214 10.8038 17.4134 10.9484C17.8101 11.0884 18.1484 11.2868 18.4284 11.5434C18.7084 11.7954 18.9254 12.1011 19.0794 12.4604C19.2334 12.8198 19.3104 13.2164 19.3104 13.6504C19.3104 14.0238 19.2568 14.3691 19.1494 14.6864C19.0421 15.0038 18.8951 15.3071 18.7084 15.5964C18.5264 15.8811 18.3141 16.1588 18.0714 16.4294C17.8288 16.7001 17.5721 16.9731 17.3014 17.2484L15.1454 19.4534C15.3834 19.3834 15.6191 19.3298 15.8524 19.2924C16.0858 19.2504 16.3051 19.2294 16.5104 19.2294H18.7924ZM21.4535 13.7064C21.5282 13.2118 21.6682 12.7778 21.8735 12.4044C22.0789 12.0311 22.3355 11.7208 22.6435 11.4734C22.9515 11.2261 23.3015 11.0418 23.6935 10.9204C24.0902 10.7944 24.5172 10.7314 24.9745 10.7314C25.4599 10.7314 25.8939 10.8014 26.2765 10.9414C26.6639 11.0768 26.9905 11.2634 27.2565 11.5014C27.5225 11.7394 27.7255 12.0171 27.8655 12.3344C28.0102 12.6518 28.0825 12.9924 28.0825 13.3564C28.0825 13.6784 28.0475 13.9631 27.9775 14.2104C27.9122 14.4531 27.8119 14.6654 27.6765 14.8474C27.5459 15.0294 27.3825 15.1834 27.1865 15.3094C26.9952 15.4354 26.7735 15.5404 26.5215 15.6244C27.6882 16.0071 28.2715 16.7841 28.2715 17.9554C28.2715 18.4734 28.1759 18.9308 27.9845 19.3274C27.7932 19.7194 27.5365 20.0484 27.2145 20.3144C26.8925 20.5804 26.5169 20.7811 26.0875 20.9164C25.6629 21.0471 25.2172 21.1124 24.7505 21.1124C24.2559 21.1124 23.8195 21.0564 23.4415 20.9444C23.0635 20.8324 22.7299 20.6644 22.4405 20.4404C22.1559 20.2164 21.9109 19.9364 21.7055 19.6004C21.5002 19.2598 21.3205 18.8631 21.1665 18.4104L22.0205 18.0604C22.2445 17.9671 22.4522 17.9414 22.6435 17.9834C22.8395 18.0254 22.9795 18.1281 23.0635 18.2914C23.1569 18.4688 23.2549 18.6321 23.3575 18.7814C23.4649 18.9308 23.5839 19.0614 23.7145 19.1734C23.8452 19.2808 23.9922 19.3648 24.1555 19.4254C24.3235 19.4861 24.5149 19.5164 24.7295 19.5164C25.0002 19.5164 25.2359 19.4721 25.4365 19.3834C25.6372 19.2948 25.8052 19.1804 25.9405 19.0404C26.0759 18.8958 26.1762 18.7348 26.2415 18.5574C26.3115 18.3754 26.3465 18.1958 26.3465 18.0184C26.3465 17.7851 26.3255 17.5751 26.2835 17.3884C26.2415 17.1971 26.1435 17.0361 25.9895 16.9054C25.8402 16.7701 25.6162 16.6674 25.3175 16.5974C25.0235 16.5228 24.6222 16.4854 24.1135 16.4854V15.1274C24.5382 15.1274 24.8859 15.0924 25.1565 15.0224C25.4272 14.9524 25.6395 14.8544 25.7935 14.7284C25.9475 14.6024 26.0525 14.4508 26.1085 14.2734C26.1692 14.0961 26.1995 13.9024 26.1995 13.6924C26.1995 13.2491 26.0829 12.9108 25.8495 12.6774C25.6209 12.4441 25.2942 12.3274 24.8695 12.3274C24.6829 12.3274 24.5102 12.3554 24.3515 12.4114C24.1975 12.4628 24.0575 12.5351 23.9315 12.6284C23.8102 12.7218 23.7052 12.8314 23.6165 12.9574C23.5279 13.0834 23.4625 13.2211 23.4205 13.3704C23.3319 13.6038 23.2175 13.7601 23.0775 13.8394C22.9375 13.9141 22.7345 13.9304 22.4685 13.8884L21.4535 13.7064Z",
4902
- fill: tintColor
4903
- }));
4869
+ switch (type) {
4870
+ case "Geometry":
4871
+ {
4872
+ return /*#__PURE__*/React__namespace.createElement("svg", {
4873
+ width: "32",
4874
+ height: "32",
4875
+ viewBox: "0 0 32 32",
4876
+ fill: "none",
4877
+ xmlns: "http://www.w3.org/2000/svg"
4878
+ }, /*#__PURE__*/React__namespace.createElement("path", {
4879
+ fillRule: "evenodd",
4880
+ clipRule: "evenodd",
4881
+ d: "M7.57584 7.09442C7.92723 6.92984 8.3421 6.98339 8.64018 7.23179L26.6402 22.2318C26.9636 22.5013 27.0836 22.9446 26.9403 23.3404C26.7969 23.7363 26.421 24 26 24H8C7.44772 24 7 23.5523 7 23V8.00001C7 7.61199 7.22446 7.259 7.57584 7.09442ZM9 10.1351V17H13C13.5523 17 14 17.4477 14 18V22H23.238L9 10.1351ZM12 22V19H9V22H12Z",
4882
+ fill: tintColor
4883
+ }));
4884
+ }
4885
+ case "Operators":
4886
+ {
4887
+ return /*#__PURE__*/React__namespace.createElement("svg", {
4888
+ viewBox: "0 0 32 32",
4889
+ fill: "none",
4890
+ xmlns: "http://www.w3.org/2000/svg"
4891
+ }, /*#__PURE__*/React__namespace.createElement("path", {
4892
+ fillRule: "evenodd",
4893
+ clipRule: "evenodd",
4894
+ d: "M29 6H30V7H29V6ZM27 6C27 4.89543 27.8954 4 29 4H30C31.1046 4 32 4.89543 32 6V7C32 8.10457 31.1046 9 30 9H29C27.8954 9 27 8.10457 27 7V6ZM11.1318 6.50386C11.3098 6.19229 11.6411 6 12 6H14C14.5523 6 15 6.44772 15 7C15 7.55228 14.5523 8 14 8H12.5803L8.86824 14.4961C8.68527 14.8163 8.34091 15.0098 7.97225 14.9996C7.6036 14.9894 7.2705 14.7771 7.10557 14.4472L5.10557 10.4472C4.85858 9.95324 5.05881 9.35256 5.55279 9.10557C6.04676 8.85858 6.64744 9.05881 6.89443 9.55279L8.0588 11.8815L11.1318 6.50386ZM7.70676 16.2925C8.09748 16.6829 8.09779 17.316 7.70745 17.7068C7.28543 18.1292 6.84383 18.7303 6.51157 19.3658C6.17039 20.0184 6 20.601 6 21C6 21.3789 6.17235 21.9897 6.51638 22.6649C6.85315 23.3259 7.28488 23.9121 7.66786 24.2557C8.07892 24.6246 8.11314 25.2568 7.74429 25.6679C7.37544 26.0789 6.7432 26.1131 6.33214 25.7443C5.7161 25.1915 5.14783 24.3844 4.73434 23.5728C4.32813 22.7755 3.99999 21.8345 4 21C4.00001 20.1391 4.3301 19.2217 4.73917 18.4392C5.15715 17.6397 5.71554 16.8708 6.29255 16.2932C6.68288 15.9025 7.31605 15.9022 7.70676 16.2925ZM11.2932 16.2925C11.684 15.9022 12.3171 15.9025 12.7075 16.2932C13.2845 16.8708 13.8428 17.6397 14.2608 18.4392C14.6699 19.2217 15 20.1391 15 21C15 21.8345 14.6719 22.7755 14.2657 23.5728C13.8522 24.3844 13.2839 25.1915 12.6679 25.7443C12.2568 26.1131 11.6246 26.0789 11.2557 25.6679C10.8869 25.2568 10.9211 24.6246 11.3321 24.2557C11.7151 23.9121 12.1469 23.3259 12.4836 22.6649C12.8276 21.9897 13 21.3789 13 21C13 20.601 12.8296 20.0184 12.4884 19.3658C12.1562 18.7303 11.7146 18.1292 11.2925 17.7068C10.9022 17.316 10.9025 16.6829 11.2932 16.2925ZM27.9363 17.6489C28.1302 18.166 27.8682 18.7424 27.3511 18.9363L21.848 21L27.3511 23.0637C27.8682 23.2576 28.1302 23.834 27.9363 24.3511C27.7424 24.8682 27.166 25.1302 26.6489 24.9363L18.6489 21.9363C18.2586 21.79 18 21.4168 18 21C18 20.5832 18.2586 20.21 18.6489 20.0637L26.6489 17.0637C27.166 16.8698 27.7424 17.1318 27.9363 17.6489ZM21 8V13H24V8H21ZM20 6C19.4477 6 19 6.44772 19 7V14C19 14.5523 19.4477 15 20 15H25C25.5523 15 26 14.5523 26 14V7C26 6.44772 25.5523 6 25 6H20Z",
4895
+ fill: tintColor
4896
+ }));
4897
+ }
4898
+ case "Numbers":
4899
+ {
4900
+ return /*#__PURE__*/React__namespace.createElement("svg", {
4901
+ width: "32",
4902
+ height: "32",
4903
+ viewBox: "0 0 32 32",
4904
+ fill: "none",
4905
+ xmlns: "http://www.w3.org/2000/svg"
4906
+ }, /*#__PURE__*/React__namespace.createElement("path", {
4907
+ d: "M10.4123 19.5794V21.0004H4.71434V19.5794H6.73034V14.0214C6.73034 13.9001 6.73267 13.7764 6.73734 13.6504C6.742 13.5244 6.749 13.3961 6.75834 13.2654L5.42834 14.3714C5.335 14.4414 5.244 14.4858 5.15534 14.5044C5.06667 14.5231 4.98267 14.5254 4.90334 14.5114C4.824 14.4928 4.754 14.4648 4.69334 14.4274C4.63267 14.3854 4.586 14.3434 4.55334 14.3014L3.94434 13.4824L7.06634 10.8364H8.65534V19.5794H10.4123ZM18.7924 19.2294C19.0024 19.2294 19.1658 19.2878 19.2824 19.4044C19.4038 19.5211 19.4644 19.6751 19.4644 19.8664V21.0004H12.4224V20.3704C12.4224 20.2491 12.4481 20.1184 12.4994 19.9784C12.5508 19.8338 12.6371 19.7031 12.7584 19.5864L15.7684 16.5694C16.0251 16.3128 16.2514 16.0678 16.4474 15.8344C16.6434 15.5964 16.8068 15.3654 16.9374 15.1414C17.0681 14.9128 17.1661 14.6818 17.2314 14.4484C17.2968 14.2151 17.3294 13.9701 17.3294 13.7134C17.3294 13.2608 17.2128 12.9178 16.9794 12.6844C16.7461 12.4464 16.4171 12.3274 15.9924 12.3274C15.8058 12.3274 15.6331 12.3554 15.4744 12.4114C15.3204 12.4628 15.1804 12.5351 15.0544 12.6284C14.9331 12.7218 14.8281 12.8314 14.7394 12.9574C14.6508 13.0834 14.5854 13.2211 14.5434 13.3704C14.4594 13.6038 14.3451 13.7601 14.2004 13.8394C14.0604 13.9141 13.8598 13.9304 13.5984 13.8884L12.5764 13.7064C12.6511 13.2118 12.7911 12.7778 12.9964 12.4044C13.2018 12.0311 13.4584 11.7208 13.7664 11.4734C14.0744 11.2261 14.4268 11.0418 14.8234 10.9204C15.2201 10.7944 15.6471 10.7314 16.1044 10.7314C16.5851 10.7314 17.0214 10.8038 17.4134 10.9484C17.8101 11.0884 18.1484 11.2868 18.4284 11.5434C18.7084 11.7954 18.9254 12.1011 19.0794 12.4604C19.2334 12.8198 19.3104 13.2164 19.3104 13.6504C19.3104 14.0238 19.2568 14.3691 19.1494 14.6864C19.0421 15.0038 18.8951 15.3071 18.7084 15.5964C18.5264 15.8811 18.3141 16.1588 18.0714 16.4294C17.8288 16.7001 17.5721 16.9731 17.3014 17.2484L15.1454 19.4534C15.3834 19.3834 15.6191 19.3298 15.8524 19.2924C16.0858 19.2504 16.3051 19.2294 16.5104 19.2294H18.7924ZM21.4535 13.7064C21.5282 13.2118 21.6682 12.7778 21.8735 12.4044C22.0789 12.0311 22.3355 11.7208 22.6435 11.4734C22.9515 11.2261 23.3015 11.0418 23.6935 10.9204C24.0902 10.7944 24.5172 10.7314 24.9745 10.7314C25.4599 10.7314 25.8939 10.8014 26.2765 10.9414C26.6639 11.0768 26.9905 11.2634 27.2565 11.5014C27.5225 11.7394 27.7255 12.0171 27.8655 12.3344C28.0102 12.6518 28.0825 12.9924 28.0825 13.3564C28.0825 13.6784 28.0475 13.9631 27.9775 14.2104C27.9122 14.4531 27.8119 14.6654 27.6765 14.8474C27.5459 15.0294 27.3825 15.1834 27.1865 15.3094C26.9952 15.4354 26.7735 15.5404 26.5215 15.6244C27.6882 16.0071 28.2715 16.7841 28.2715 17.9554C28.2715 18.4734 28.1759 18.9308 27.9845 19.3274C27.7932 19.7194 27.5365 20.0484 27.2145 20.3144C26.8925 20.5804 26.5169 20.7811 26.0875 20.9164C25.6629 21.0471 25.2172 21.1124 24.7505 21.1124C24.2559 21.1124 23.8195 21.0564 23.4415 20.9444C23.0635 20.8324 22.7299 20.6644 22.4405 20.4404C22.1559 20.2164 21.9109 19.9364 21.7055 19.6004C21.5002 19.2598 21.3205 18.8631 21.1665 18.4104L22.0205 18.0604C22.2445 17.9671 22.4522 17.9414 22.6435 17.9834C22.8395 18.0254 22.9795 18.1281 23.0635 18.2914C23.1569 18.4688 23.2549 18.6321 23.3575 18.7814C23.4649 18.9308 23.5839 19.0614 23.7145 19.1734C23.8452 19.2808 23.9922 19.3648 24.1555 19.4254C24.3235 19.4861 24.5149 19.5164 24.7295 19.5164C25.0002 19.5164 25.2359 19.4721 25.4365 19.3834C25.6372 19.2948 25.8052 19.1804 25.9405 19.0404C26.0759 18.8958 26.1762 18.7348 26.2415 18.5574C26.3115 18.3754 26.3465 18.1958 26.3465 18.0184C26.3465 17.7851 26.3255 17.5751 26.2835 17.3884C26.2415 17.1971 26.1435 17.0361 25.9895 16.9054C25.8402 16.7701 25.6162 16.6674 25.3175 16.5974C25.0235 16.5228 24.6222 16.4854 24.1135 16.4854V15.1274C24.5382 15.1274 24.8859 15.0924 25.1565 15.0224C25.4272 14.9524 25.6395 14.8544 25.7935 14.7284C25.9475 14.6024 26.0525 14.4508 26.1085 14.2734C26.1692 14.0961 26.1995 13.9024 26.1995 13.6924C26.1995 13.2491 26.0829 12.9108 25.8495 12.6774C25.6209 12.4441 25.2942 12.3274 24.8695 12.3274C24.6829 12.3274 24.5102 12.3554 24.3515 12.4114C24.1975 12.4628 24.0575 12.5351 23.9315 12.6284C23.8102 12.7218 23.7052 12.8314 23.6165 12.9574C23.5279 13.0834 23.4625 13.2211 23.4205 13.3704C23.3319 13.6038 23.2175 13.7601 23.0775 13.8394C22.9375 13.9141 22.7345 13.9304 22.4685 13.8884L21.4535 13.7064Z",
4908
+ fill: tintColor
4909
+ }));
4910
+ }
4911
+ case "Extras":
4912
+ {
4913
+ return /*#__PURE__*/React__namespace.createElement("svg", {
4914
+ xmlns: "http://www.w3.org/2000/svg",
4915
+ width: "20",
4916
+ height: "20",
4917
+ fill: "currentColor",
4918
+ viewBox: "0 0 256 256"
4919
+ }, /*#__PURE__*/React__namespace.createElement("path", {
4920
+ d: "M232,172a36,36,0,0,1-72,0V72H96V200a8,8,0,0,1-16,0V72H72a40,40,0,0,0-40,40,8,8,0,0,1-16,0A56.06,56.06,0,0,1,72,56H224a8,8,0,0,1,0,16H176V172a20,20,0,0,0,40,0,8,8,0,0,1,16,0Z"
4921
+ }));
4922
+ }
4923
+ default:
4924
+ {
4925
+ // type as never;
4926
+ throw new Error("Invalid icon type");
4927
+ }
4904
4928
  }
4905
-
4906
- // type as never;
4907
- throw new Error("Invalid icon type");
4908
4929
  };
4909
4930
 
4910
- const styles$7 = aphrodite.StyleSheet.create({
4931
+ const styles$8 = aphrodite.StyleSheet.create({
4911
4932
  base: {
4912
4933
  display: "flex",
4913
4934
  width: 44,
@@ -4971,7 +4992,8 @@ class TabbarItem extends React__namespace.Component {
4971
4992
  } = this.props;
4972
4993
  return /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
4973
4994
  onClick: onClick,
4974
- disabled: itemState === "disabled"
4995
+ disabled: itemState === "disabled",
4996
+ "aria-label": itemType
4975
4997
  }, _ref => {
4976
4998
  let {
4977
4999
  hovered,
@@ -4980,14 +5002,14 @@ class TabbarItem extends React__namespace.Component {
4980
5002
  } = _ref;
4981
5003
  const tintColor = imageTintColor(itemState, hovered, focused, pressed);
4982
5004
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
4983
- style: [styles$7.base, itemState !== "disabled" && hovered && styles$7.hovered, focused && styles$7.focused, pressed && styles$7.pressed]
5005
+ style: [styles$8.base, itemState !== "disabled" && hovered && styles$8.hovered, focused && styles$8.focused, pressed && styles$8.pressed]
4984
5006
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
4985
- style: [styles$7.innerBox, pressed && styles$7.innerBoxPressed]
5007
+ style: [styles$8.innerBox, pressed && styles$8.innerBoxPressed]
4986
5008
  }, /*#__PURE__*/React__namespace.createElement(IconAsset, {
4987
5009
  type: itemType,
4988
5010
  tintColor: tintColor
4989
5011
  })), itemState === "active" && /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
4990
- style: [styles$7.activeIndicator, {
5012
+ style: [styles$8.activeIndicator, {
4991
5013
  backgroundColor: tintColor
4992
5014
  }]
4993
5015
  }));
@@ -4995,43 +5017,31 @@ class TabbarItem extends React__namespace.Component {
4995
5017
  }
4996
5018
  }
4997
5019
 
4998
- const styles$6 = aphrodite.StyleSheet.create({
5020
+ const styles$7 = aphrodite.StyleSheet.create({
4999
5021
  tabbar: {
5000
5022
  display: "flex",
5001
5023
  flexDirection: "row",
5002
- background: Color__default["default"].offWhite,
5003
5024
  paddingTop: 2,
5004
- paddingBottom: 2,
5005
- borderTop: "1px solid ".concat(Color__default["default"].offBlack50),
5006
- borderBottom: "1px solid ".concat(Color__default["default"].offBlack50)
5025
+ paddingBottom: 2
5007
5026
  }
5008
5027
  });
5009
- class Tabbar extends React__namespace.Component {
5010
- constructor() {
5011
- super(...arguments);
5012
- _defineProperty(this, "state", {
5013
- selectedItem: 0
5014
- });
5015
- }
5016
- render() {
5017
- const {
5018
- items,
5019
- onSelect
5020
- } = this.props;
5021
- return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
5022
- style: styles$6.tabbar
5023
- }, items.map((item, index) => /*#__PURE__*/React__namespace.createElement(TabbarItem, {
5024
- key: "tabbar-item-".concat(index),
5025
- itemState: index === this.state.selectedItem ? "active" : "inactive",
5026
- itemType: item,
5027
- onClick: () => {
5028
- this.setState({
5029
- selectedItem: index
5030
- });
5031
- onSelect(item);
5032
- }
5033
- })));
5034
- }
5028
+ function Tabbar(props) {
5029
+ const {
5030
+ items,
5031
+ selectedItem,
5032
+ onSelectItem,
5033
+ style
5034
+ } = props;
5035
+ return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
5036
+ style: [styles$7.tabbar, style]
5037
+ }, items.map(item => /*#__PURE__*/React__namespace.createElement(TabbarItem, {
5038
+ key: "tabbar-item-".concat(item),
5039
+ itemState: item === selectedItem ? "active" : "inactive",
5040
+ itemType: item,
5041
+ onClick: () => {
5042
+ onSelectItem(item);
5043
+ }
5044
+ })));
5035
5045
  }
5036
5046
 
5037
5047
  /**
@@ -5170,7 +5180,7 @@ class MultiSymbolPopover extends React__namespace.Component {
5170
5180
  // TODO(charlie): We have to require this lazily because of a cyclic
5171
5181
  // dependence in our components.
5172
5182
  return /*#__PURE__*/React__namespace.createElement(View, {
5173
- style: styles$5.container
5183
+ style: styles$6.container
5174
5184
  }, keys.map(key => {
5175
5185
  return /*#__PURE__*/React__namespace.createElement(TouchableKeypadButton$1, {
5176
5186
  keyConfig: key,
@@ -5179,7 +5189,7 @@ class MultiSymbolPopover extends React__namespace.Component {
5179
5189
  }));
5180
5190
  }
5181
5191
  }
5182
- const styles$5 = aphrodite.StyleSheet.create({
5192
+ const styles$6 = aphrodite.StyleSheet.create({
5183
5193
  container: {
5184
5194
  flexDirection: "column-reverse",
5185
5195
  position: "relative",
@@ -5465,31 +5475,33 @@ class TwoPageKeypad extends React__namespace.Component {
5465
5475
  } = this.state;
5466
5476
  if (paginationEnabled) {
5467
5477
  return /*#__PURE__*/React__namespace.createElement(Keypad$2, {
5468
- style: [column$2, styles$4.keypad]
5478
+ style: [column$2, styles$5.keypad]
5469
5479
  }, /*#__PURE__*/React__namespace.createElement(Tabbar, {
5470
5480
  items: ["Numbers", "Operators"],
5471
- onSelect: selectedItem => {
5481
+ selectedItem: selectedPage,
5482
+ onSelectItem: selectedItem => {
5472
5483
  this.setState({
5473
5484
  selectedPage: selectedItem
5474
5485
  });
5475
- }
5486
+ },
5487
+ style: styles$5.tabbar
5476
5488
  }), /*#__PURE__*/React__namespace.createElement(View, {
5477
- style: styles$4.borderTop
5489
+ style: styles$5.borderTop
5478
5490
  }, selectedPage === "Numbers" && rightPage, selectedPage === "Operators" && leftPage));
5479
5491
  } else {
5480
5492
  return /*#__PURE__*/React__namespace.createElement(Keypad$2, {
5481
- style: styles$4.keypad
5493
+ style: styles$5.keypad
5482
5494
  }, /*#__PURE__*/React__namespace.createElement(View, {
5483
5495
  style: row$4
5484
5496
  }, /*#__PURE__*/React__namespace.createElement(View, {
5485
5497
  style: fullWidth$2
5486
5498
  }, leftPage), /*#__PURE__*/React__namespace.createElement(View, {
5487
- style: [styles$4.borderLeft, fullWidth$2]
5499
+ style: [styles$5.borderLeft, fullWidth$2]
5488
5500
  }, rightPage)));
5489
5501
  }
5490
5502
  }
5491
5503
  }
5492
- const styles$4 = aphrodite.StyleSheet.create({
5504
+ const styles$5 = aphrodite.StyleSheet.create({
5493
5505
  keypad: {
5494
5506
  // Set the background to light grey, so that when the user drags the
5495
5507
  // keypad pages past the edges, there's a grey backdrop.
@@ -5501,6 +5513,11 @@ const styles$4 = aphrodite.StyleSheet.create({
5501
5513
  borderLeft: {
5502
5514
  borderLeft: "".concat(innerBorderWidthPx, "px ").concat(innerBorderStyle, " ") + "".concat(innerBorderColor),
5503
5515
  boxSizing: "content-box"
5516
+ },
5517
+ tabbar: {
5518
+ background: Color__default["default"].offWhite,
5519
+ borderTop: "1px solid ".concat(Color__default["default"].offBlack50),
5520
+ borderBottom: "1px solid ".concat(Color__default["default"].offBlack50)
5504
5521
  }
5505
5522
  });
5506
5523
  const mapStateToProps$3 = state => {
@@ -5570,7 +5587,7 @@ class ExpressionKeypad extends React__namespace.Component {
5570
5587
  } else {
5571
5588
  dismissOrJumpOutKey = KeyConfigs.DISMISS;
5572
5589
  }
5573
- const rightPageStyle = [row$3, fullWidth$1, styles$3.rightPage, roundTopRight && roundedTopRight$1];
5590
+ const rightPageStyle = [row$3, fullWidth$1, styles$4.rightPage, roundTopRight && roundedTopRight$1];
5574
5591
  const rightPage = /*#__PURE__*/React__namespace.createElement(View, {
5575
5592
  style: rightPageStyle
5576
5593
  }, /*#__PURE__*/React__namespace.createElement(View, {
@@ -5642,7 +5659,7 @@ class ExpressionKeypad extends React__namespace.Component {
5642
5659
  keyConfig: dismissOrJumpOutKey,
5643
5660
  borders: BorderStyles.LEFT
5644
5661
  })));
5645
- const leftPageStyle = [row$3, fullWidth$1, styles$3.leftPage, roundTopLeft && roundedTopLeft$2];
5662
+ const leftPageStyle = [row$3, fullWidth$1, styles$4.leftPage, roundTopLeft && roundedTopLeft$2];
5646
5663
  const leftPage = /*#__PURE__*/React__namespace.createElement(View, {
5647
5664
  style: leftPageStyle
5648
5665
  }, /*#__PURE__*/React__namespace.createElement(View, {
@@ -5722,7 +5739,7 @@ class ExpressionKeypad extends React__namespace.Component {
5722
5739
  });
5723
5740
  }
5724
5741
  }
5725
- const styles$3 = aphrodite.StyleSheet.create({
5742
+ const styles$4 = aphrodite.StyleSheet.create({
5726
5743
  // NOTE(charlie): These backgrounds are applied to as to fill in some
5727
5744
  // unfortunate 'cracks' in the layout. However, not all keys in the first
5728
5745
  // page use this background color (namely, the 'command' keys, backspace and
@@ -5898,7 +5915,7 @@ class NavigationPad extends React__namespace.Component {
5898
5915
  roundTopLeft,
5899
5916
  style
5900
5917
  } = this.props;
5901
- const containerStyle = [column, centered$1, styles$2.container, roundTopLeft && roundedTopLeft, ...(Array.isArray(style) ? style : [style])];
5918
+ const containerStyle = [column, centered$1, styles$3.container, roundTopLeft && roundedTopLeft, ...(Array.isArray(style) ? style : [style])];
5902
5919
  return /*#__PURE__*/React__namespace.createElement(View, {
5903
5920
  style: containerStyle
5904
5921
  }, /*#__PURE__*/React__namespace.createElement(View, {
@@ -5906,32 +5923,32 @@ class NavigationPad extends React__namespace.Component {
5906
5923
  }, /*#__PURE__*/React__namespace.createElement(TouchableKeypadButton$1, {
5907
5924
  keyConfig: KeyConfigs.UP,
5908
5925
  borders: BorderStyles.NONE,
5909
- style: [styles$2.navigationKey, styles$2.topArrow]
5926
+ style: [styles$3.navigationKey, styles$3.topArrow]
5910
5927
  })), /*#__PURE__*/React__namespace.createElement(View, {
5911
5928
  style: [row$1, centered$1, stretch]
5912
5929
  }, /*#__PURE__*/React__namespace.createElement(TouchableKeypadButton$1, {
5913
5930
  keyConfig: KeyConfigs.LEFT,
5914
5931
  borders: BorderStyles.NONE,
5915
- style: [styles$2.navigationKey, styles$2.leftArrow]
5932
+ style: [styles$3.navigationKey, styles$3.leftArrow]
5916
5933
  }), /*#__PURE__*/React__namespace.createElement(View, {
5917
- style: styles$2.horizontalSpacer
5934
+ style: styles$3.horizontalSpacer
5918
5935
  }), /*#__PURE__*/React__namespace.createElement(TouchableKeypadButton$1, {
5919
5936
  keyConfig: KeyConfigs.RIGHT,
5920
5937
  borders: BorderStyles.NONE,
5921
- style: [styles$2.navigationKey, styles$2.rightArrow]
5938
+ style: [styles$3.navigationKey, styles$3.rightArrow]
5922
5939
  })), /*#__PURE__*/React__namespace.createElement(View, {
5923
5940
  style: [row$1, centered$1]
5924
5941
  }, /*#__PURE__*/React__namespace.createElement(TouchableKeypadButton$1, {
5925
5942
  keyConfig: KeyConfigs.DOWN,
5926
5943
  borders: BorderStyles.NONE,
5927
- style: [styles$2.navigationKey, styles$2.bottomArrow]
5944
+ style: [styles$3.navigationKey, styles$3.bottomArrow]
5928
5945
  })));
5929
5946
  }
5930
5947
  }
5931
5948
  const buttonSizePx = 48;
5932
5949
  const borderRadiusPx = 4;
5933
5950
  const borderWidthPx$1 = 1;
5934
- const styles$2 = aphrodite.StyleSheet.create({
5951
+ const styles$3 = aphrodite.StyleSheet.create({
5935
5952
  container: {
5936
5953
  backgroundColor: controlGrey,
5937
5954
  width: navigationPadWidthPx
@@ -6104,8 +6121,8 @@ class KeypadContainer extends React__namespace.Component {
6104
6121
  ...inlineStyles.invisible
6105
6122
  };
6106
6123
  }
6107
- const keypadContainerStyle = [row, centered, fullWidth, styles$1.keypadContainer, ...(Array.isArray(style) ? style : [style])];
6108
- const keypadStyle = [row, styles$1.keypadBorder, layoutMode === LayoutMode.FULLSCREEN ? styles$1.fullscreen : styles$1.compact];
6124
+ const keypadContainerStyle = [row, centered, fullWidth, styles$2.keypadContainer, ...(Array.isArray(style) ? style : [style])];
6125
+ const keypadStyle = [row, styles$2.keypadBorder, layoutMode === LayoutMode.FULLSCREEN ? styles$2.fullscreen : styles$2.compact];
6109
6126
 
6110
6127
  // TODO(charlie): When the keypad is shorter than the width of the
6111
6128
  // screen, add a border on its left and right edges, and round out the
@@ -6124,15 +6141,15 @@ class KeypadContainer extends React__namespace.Component {
6124
6141
  }
6125
6142
  }, navigationPadEnabled && /*#__PURE__*/React__namespace.createElement(NavigationPad, {
6126
6143
  roundTopLeft: layoutMode === LayoutMode.COMPACT,
6127
- style: styles$1.navigationPadContainer
6144
+ style: styles$2.navigationPadContainer
6128
6145
  }), /*#__PURE__*/React__namespace.createElement(View, {
6129
- style: styles$1.keypadLayout
6146
+ style: styles$2.keypadLayout
6130
6147
  }, this.renderKeypad())));
6131
6148
  }
6132
6149
  }
6133
6150
  const keypadAnimationDurationMs = 300;
6134
6151
  const borderWidthPx = 1;
6135
- const styles$1 = aphrodite.StyleSheet.create({
6152
+ const styles$2 = aphrodite.StyleSheet.create({
6136
6153
  keypadContainer: {
6137
6154
  bottom: 0,
6138
6155
  left: 0,
@@ -7478,7 +7495,7 @@ class ProvidedKeypad extends React__namespace.Component {
7478
7495
  }
7479
7496
  }
7480
7497
 
7481
- const styles = aphrodite.StyleSheet.create({
7498
+ const styles$1 = aphrodite.StyleSheet.create({
7482
7499
  base: {
7483
7500
  display: "flex",
7484
7501
  justifyContent: "center",
@@ -7533,6 +7550,7 @@ class Button extends React__namespace.Component {
7533
7550
  render() {
7534
7551
  const {
7535
7552
  onPress,
7553
+ ariaLabel,
7536
7554
  children,
7537
7555
  style,
7538
7556
  tintColor
@@ -7541,7 +7559,8 @@ class Button extends React__namespace.Component {
7541
7559
  style: style
7542
7560
  }, /*#__PURE__*/React__namespace.createElement(Clickable__default["default"], {
7543
7561
  onClick: onPress,
7544
- style: styles.clickable
7562
+ style: styles$1.clickable,
7563
+ "aria-label": ariaLabel
7545
7564
  }, _ref => {
7546
7565
  let {
7547
7566
  hovered,
@@ -7549,11 +7568,11 @@ class Button extends React__namespace.Component {
7549
7568
  pressed
7550
7569
  } = _ref;
7551
7570
  return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
7552
- style: [styles.outerBoxBase, hovered && styles.outerBoxHover, pressed && styles.outerBoxPressed]
7571
+ style: [styles$1.outerBoxBase, hovered && styles$1.outerBoxHover, pressed && styles$1.outerBoxPressed]
7553
7572
  }, /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, {
7554
- style: [styles.base, tintColor != null ? {
7573
+ style: [styles$1.base, tintColor != null ? {
7555
7574
  background: tintColor
7556
- } : undefined, hovered && styles.hovered, focused && styles.focused, pressed && styles.pressed]
7575
+ } : undefined, hovered && styles$1.hovered, focused && styles$1.focused, pressed && styles$1.pressed]
7557
7576
  }, children));
7558
7577
  }));
7559
7578
  }
@@ -8165,6 +8184,33 @@ function ButtonAsset(_ref) {
8165
8184
  }, /*#__PURE__*/React__namespace.createElement("path", {
8166
8185
  d: "M232,172a36,36,0,0,1-72,0V72H96V200a8,8,0,0,1-16,0V72H72a40,40,0,0,0-40,40,8,8,0,0,1-16,0A56.06,56.06,0,0,1,72,56H224a8,8,0,0,1,0,16H176V172a20,20,0,0,0,40,0,8,8,0,0,1,16,0Z"
8167
8186
  }));
8187
+ case "a":
8188
+ return /*#__PURE__*/React__namespace.createElement("svg", {
8189
+ xmlns: "http://www.w3.org/2000/svg",
8190
+ width: "20",
8191
+ height: "20",
8192
+ viewBox: "0 0 384 512"
8193
+ }, /*#__PURE__*/React__namespace.createElement("path", {
8194
+ d: "M221.5 51.7C216.6 39.8 204.9 32 192 32s-24.6 7.8-29.5 19.7l-120 288-40 96c-6.8 16.3 .9 35 17.2 41.8s35-.9 41.8-17.2L93.3 384H290.7l31.8 76.3c6.8 16.3 25.5 24 41.8 17.2s24-25.5 17.2-41.8l-40-96-120-288zM264 320H120l72-172.8L264 320z"
8195
+ }));
8196
+ case "b":
8197
+ return /*#__PURE__*/React__namespace.createElement("svg", {
8198
+ xmlns: "http://www.w3.org/2000/svg",
8199
+ width: "20",
8200
+ height: "20",
8201
+ viewBox: "0 0 320 512"
8202
+ }, /*#__PURE__*/React__namespace.createElement("path", {
8203
+ d: "M64 32C28.7 32 0 60.7 0 96V256 416c0 35.3 28.7 64 64 64H192c70.7 0 128-57.3 128-128c0-46.5-24.8-87.3-62-109.7c18.7-22.3 30-51 30-82.3c0-70.7-57.3-128-128-128H64zm96 192H64V96h96c35.3 0 64 28.7 64 64s-28.7 64-64 64zM64 288h96 32c35.3 0 64 28.7 64 64s-28.7 64-64 64H64V288z"
8204
+ }));
8205
+ case "c":
8206
+ return /*#__PURE__*/React__namespace.createElement("svg", {
8207
+ xmlns: "http://www.w3.org/2000/svg",
8208
+ width: "20",
8209
+ height: "20",
8210
+ viewBox: "0 0 384 512"
8211
+ }, /*#__PURE__*/React__namespace.createElement("path", {
8212
+ d: "M329.1 142.9c-62.5-62.5-155.8-62.5-218.3 0s-62.5 163.8 0 226.3s155.8 62.5 218.3 0c12.5-12.5 32.8-12.5 45.3 0s12.5 32.8 0 45.3c-87.5 87.5-221.3 87.5-308.8 0s-87.5-229.3 0-316.8s221.3-87.5 308.8 0c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0z"
8213
+ }));
8168
8214
  case "x":
8169
8215
  // MATHEMATICAL ITALIC SMALL CHI
8170
8216
  // https://en.wikipedia.org/wiki/Chi_(letter)#Mathematical_chi
@@ -8219,9 +8265,6 @@ function ButtonAsset(_ref) {
8219
8265
  case "NTHROOT3":
8220
8266
  case "POW":
8221
8267
  case "LOG_B":
8222
- case "a":
8223
- case "b":
8224
- case "c":
8225
8268
  case "d":
8226
8269
  case "e":
8227
8270
  case "f":
@@ -8319,7 +8362,8 @@ const KeypadButton = _ref2 => {
8319
8362
  return /*#__PURE__*/React__namespace.createElement(Button, {
8320
8363
  onPress: () => onClickKey(keyConfig.id),
8321
8364
  tintColor: tintColor,
8322
- style: style
8365
+ style: style,
8366
+ ariaLabel: keyConfig.id
8323
8367
  }, /*#__PURE__*/React__namespace.createElement(ButtonAsset, {
8324
8368
  id: keyConfig.id
8325
8369
  }));
@@ -8381,6 +8425,20 @@ const PlaceHolderButtons = _ref5 => {
8381
8425
  }))));
8382
8426
  };
8383
8427
 
8428
+ class ExtrasPage extends React__namespace.Component {
8429
+ render() {
8430
+ const {
8431
+ extraKeys,
8432
+ onClickKey
8433
+ } = this.props;
8434
+ return /*#__PURE__*/React__namespace.createElement(KeypadPageContainer, null, extraKeys.map(key => /*#__PURE__*/React__namespace.createElement(KeypadButton, {
8435
+ key: key,
8436
+ keyConfig: KeyConfigs[key],
8437
+ onClickKey: onClickKey
8438
+ })));
8439
+ }
8440
+ }
8441
+
8384
8442
  class GeometryPage extends React__namespace.Component {
8385
8443
  render() {
8386
8444
  const {
@@ -8680,8 +8738,12 @@ class OperatorsPage extends React__namespace.Component {
8680
8738
  }
8681
8739
  }
8682
8740
 
8683
- const allPages = function (props) {
8741
+ function allPages(props) {
8742
+ var _props$extraKeys;
8684
8743
  const pages = ["Numbers"];
8744
+ if ((_props$extraKeys = props.extraKeys) !== null && _props$extraKeys !== void 0 && _props$extraKeys.length) {
8745
+ pages.push("Extras");
8746
+ }
8685
8747
  if (
8686
8748
  // OperatorsButtonSets
8687
8749
  props.preAlgebra || props.logarithms || props.basicRelations || props.advancedRelations) {
@@ -8690,9 +8752,8 @@ const allPages = function (props) {
8690
8752
  if (props.trigonometry) {
8691
8753
  pages.push("Geometry");
8692
8754
  }
8693
- // @ts-expect-error [FEI-5003] - TS2739 - Type 'TabbarItemType[]' is missing the following properties from type 'ReactElement<any, string | JSXElementConstructor<any>>': type, props, key
8694
8755
  return pages;
8695
- };
8756
+ }
8696
8757
  class Keypad extends React__namespace.Component {
8697
8758
  constructor() {
8698
8759
  super(...arguments);
@@ -8705,18 +8766,26 @@ class Keypad extends React__namespace.Component {
8705
8766
  selectedPage
8706
8767
  } = this.state;
8707
8768
  const availablePages = allPages(this.props);
8708
- return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(Tabbar
8709
- // @ts-expect-error [FEI-5003] - TS2769 - No overload matches this call.
8710
- , {
8769
+ return /*#__PURE__*/React__namespace.createElement(wonderBlocksCore.View, null, /*#__PURE__*/React__namespace.createElement(Tabbar, {
8711
8770
  items: availablePages,
8712
- onSelect: tabbarItem => {
8771
+ selectedItem: selectedPage,
8772
+ onSelectItem: tabbarItem => {
8713
8773
  this.setState({
8714
8774
  selectedPage: tabbarItem
8715
8775
  });
8716
- }
8717
- }), selectedPage === "Numbers" && /*#__PURE__*/React__namespace.createElement(NumbersPage, this.props), selectedPage === "Operators" && /*#__PURE__*/React__namespace.createElement(OperatorsPage, this.props), selectedPage === "Geometry" && /*#__PURE__*/React__namespace.createElement(GeometryPage, this.props));
8776
+ },
8777
+ style: styles.tabbar
8778
+ }), selectedPage === "Numbers" && /*#__PURE__*/React__namespace.createElement(NumbersPage, this.props), selectedPage === "Extras" && /*#__PURE__*/React__namespace.createElement(ExtrasPage, this.props), selectedPage === "Operators" && /*#__PURE__*/React__namespace.createElement(OperatorsPage, this.props), selectedPage === "Geometry" && /*#__PURE__*/React__namespace.createElement(GeometryPage, this.props));
8718
8779
  }
8719
8780
  }
8781
+ _defineProperty(Keypad, "defaultProps", {
8782
+ extraKeys: []
8783
+ });
8784
+ const styles = aphrodite.StyleSheet.create({
8785
+ tabbar: {
8786
+ background: Color__default["default"].white
8787
+ }
8788
+ });
8720
8789
 
8721
8790
  exports.CursorContext = CursorContext;
8722
8791
  exports.KeyConfigs = KeyConfigs;