@khanacademy/math-input 22.2.4 → 22.2.5
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/components/aphrodite-css-transition-group/types.d.ts +0 -9
- package/dist/components/keypad/keypad.d.ts +2 -1
- package/dist/components/keypad/navigation-button.d.ts +2 -1
- package/dist/components/keypad/navigation-pad.d.ts +2 -1
- package/dist/es/index.js +18 -13
- package/dist/es/index.js.map +1 -1
- package/dist/index.js +18 -13
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +2 -1
- package/package.json +3 -3
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { StyleType } from "@khanacademy/wonder-blocks-core";
|
|
2
|
-
import type { CSSProperties } from "aphrodite";
|
|
3
2
|
export type AnimationStyles = {
|
|
4
3
|
enter?: StyleType;
|
|
5
4
|
enterActive?: StyleType;
|
|
@@ -8,11 +7,3 @@ export type AnimationStyles = {
|
|
|
8
7
|
appear?: StyleType;
|
|
9
8
|
appearActive?: StyleType;
|
|
10
9
|
};
|
|
11
|
-
export type InAnimationStyles = {
|
|
12
|
-
enter?: CSSProperties;
|
|
13
|
-
enterActive?: CSSProperties;
|
|
14
|
-
leave?: CSSProperties;
|
|
15
|
-
leaveActive?: CSSProperties;
|
|
16
|
-
appear?: CSSProperties;
|
|
17
|
-
appearActive?: CSSProperties;
|
|
18
|
-
};
|
|
@@ -3,7 +3,7 @@ import type Key from "../../data/keys";
|
|
|
3
3
|
import type { ClickKeyCallback } from "../../types";
|
|
4
4
|
import type { CursorContext } from "../input/cursor-contexts";
|
|
5
5
|
import type { AnalyticsEventHandlerFn } from "@khanacademy/perseus-core";
|
|
6
|
-
|
|
6
|
+
type Props = {
|
|
7
7
|
extraKeys?: ReadonlyArray<Key>;
|
|
8
8
|
cursorContext?: (typeof CursorContext)[keyof typeof CursorContext];
|
|
9
9
|
showDismiss?: boolean;
|
|
@@ -21,3 +21,4 @@ export type Props = {
|
|
|
21
21
|
onAnalyticsEvent: AnalyticsEventHandlerFn;
|
|
22
22
|
};
|
|
23
23
|
export default function Keypad({ extraKeys, ...props }: Props): React.JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { KeyConfig, ClickKeyCallback } from "../../types";
|
|
3
|
-
|
|
3
|
+
type KeypadButtonProps = {
|
|
4
4
|
coord: readonly [number, number];
|
|
5
5
|
keyConfig: KeyConfig;
|
|
6
6
|
onClickKey: ClickKeyCallback;
|
|
7
7
|
};
|
|
8
8
|
export default function NavigationButton({ coord, keyConfig, onClickKey, }: KeypadButtonProps): React.JSX.Element;
|
|
9
|
+
export {};
|
package/dist/es/index.js
CHANGED
|
@@ -16,7 +16,7 @@ import PropTypes from 'prop-types';
|
|
|
16
16
|
|
|
17
17
|
// This file is processed by a Rollup plugin (replace) to inject the production
|
|
18
18
|
const libName = "@khanacademy/math-input";
|
|
19
|
-
const libVersion = "22.2.
|
|
19
|
+
const libVersion = "22.2.5";
|
|
20
20
|
addLibraryVersionToPerseusDebug(libName, libVersion);
|
|
21
21
|
|
|
22
22
|
function _extends() {
|
|
@@ -32,18 +32,22 @@ function _extends() {
|
|
|
32
32
|
class View extends React.Component {
|
|
33
33
|
render() {
|
|
34
34
|
const className = css(View.styles.initial, ...(Array.isArray(this.props.style) ? this.props.style : [this.props.style])) + (this.props.extraClassName ? ` ${this.props.extraClassName}` : "");
|
|
35
|
-
return
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
35
|
+
return (
|
|
36
|
+
/*#__PURE__*/
|
|
37
|
+
// eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events -- TODO(LEMS-2871): Address a11y error
|
|
38
|
+
React.createElement("div", {
|
|
39
|
+
className: className,
|
|
40
|
+
style: this.props.dynamicStyle,
|
|
41
|
+
onClick: this.props.onClick,
|
|
42
|
+
onTouchCancel: this.props.onTouchCancel,
|
|
43
|
+
onTouchEnd: this.props.onTouchEnd,
|
|
44
|
+
onTouchMove: this.props.onTouchMove,
|
|
45
|
+
onTouchStart: this.props.onTouchStart,
|
|
46
|
+
"aria-label": this.props.ariaLabel,
|
|
47
|
+
role: this.props.role,
|
|
48
|
+
ref: this.props.forwardRef
|
|
49
|
+
}, this.props.children)
|
|
50
|
+
);
|
|
47
51
|
}
|
|
48
52
|
}
|
|
49
53
|
View.styles = StyleSheet.create({
|
|
@@ -2240,6 +2244,7 @@ class MathInput extends React.Component {
|
|
|
2240
2244
|
}, /*#__PURE__*/React.createElement("div", {
|
|
2241
2245
|
className: "keypad-input"
|
|
2242
2246
|
// @ts-expect-error - TS2322 - Type 'string' is not assignable to type 'number | undefined'.
|
|
2247
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex -- TODO(LEMS-2871): Address a11y error
|
|
2243
2248
|
,
|
|
2244
2249
|
tabIndex: "0",
|
|
2245
2250
|
ref: node => {
|