@khanacademy/perseus 54.1.0 → 55.0.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/LICENSE +18 -0
- package/dist/components/number-input.d.ts +9 -10
- package/dist/components/range-input.d.ts +5 -6
- package/dist/components/simple-keypad-input.d.ts +5 -0
- package/dist/components/stub-tag-editor.d.ts +3 -4
- package/dist/components/text-list-editor.d.ts +3 -4
- package/dist/es/index.css +16 -6
- package/dist/es/index.js +902 -985
- package/dist/es/index.js.map +1 -1
- package/dist/es/strings.js +40 -10
- package/dist/es/strings.js.map +1 -1
- package/dist/index.css +16 -6
- package/dist/index.js +1036 -1086
- package/dist/index.js.map +1 -1
- package/dist/mixins/changeable.d.ts +1 -2
- package/dist/perseus-api.d.ts +1 -56
- package/dist/shared-utils/add-library-version-to-perseus-debug.d.ts +9 -0
- package/dist/strings.d.ts +34 -4
- package/dist/strings.js +142 -97
- package/dist/strings.js.map +1 -1
- package/dist/widget-ai-utils/numeric-input/prompt-utils.d.ts +1 -1
- package/dist/widgets/dropdown/dropdown.d.ts +5 -4
- package/dist/widgets/interactive-graph.d.ts +4 -2
- package/dist/widgets/interactive-graphs/graphs/circle.d.ts +7 -0
- package/dist/widgets/interactive-graphs/graphs/components/movable-line.d.ts +6 -0
- package/dist/widgets/interactive-graphs/graphs/quadratic.d.ts +8 -0
- package/dist/widgets/interactive-graphs/graphs/sinusoid.d.ts +7 -0
- package/dist/widgets/interactive-graphs/interactive-graph-question-builder.d.ts +1 -1
- package/dist/widgets/interactive-graphs/stateful-mafs-graph.d.ts +6 -1
- package/dist/widgets/numeric-input/index.d.ts +1 -1
- package/dist/widgets/numeric-input/input-with-examples.d.ts +8 -0
- package/dist/widgets/numeric-input/numeric-input.class.d.ts +66 -0
- package/dist/widgets/numeric-input/numeric-input.d.ts +123 -77
- package/dist/widgets/numeric-input/utils.d.ts +25 -0
- package/package.json +120 -124
- package/dist/components/input-with-examples.d.ts +0 -51
- package/dist/components/tooltip.d.ts +0 -85
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
export declare enum HorizontalDirection {
|
|
3
|
-
Left = "left",
|
|
4
|
-
Right = "right"
|
|
5
|
-
}
|
|
6
|
-
export declare enum VerticalDirection {
|
|
7
|
-
Top = "top",
|
|
8
|
-
Bottom = "bottom"
|
|
9
|
-
}
|
|
10
|
-
type Props = {
|
|
11
|
-
show: boolean;
|
|
12
|
-
className: string;
|
|
13
|
-
arrowSize: number;
|
|
14
|
-
borderColor: string;
|
|
15
|
-
verticalPosition: VerticalDirection;
|
|
16
|
-
horizontalPosition: HorizontalDirection;
|
|
17
|
-
horizontalAlign: HorizontalDirection.Left;
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
targetContainerStyle: any;
|
|
20
|
-
};
|
|
21
|
-
type DefaultProps = {
|
|
22
|
-
className: Props["className"];
|
|
23
|
-
arrowSize: Props["arrowSize"];
|
|
24
|
-
borderColor: Props["borderColor"];
|
|
25
|
-
verticalPosition: Props["verticalPosition"];
|
|
26
|
-
horizontalPosition: Props["horizontalPosition"];
|
|
27
|
-
horizontalAlign: Props["horizontalAlign"];
|
|
28
|
-
targetContainerStyle: Props["targetContainerStyle"];
|
|
29
|
-
};
|
|
30
|
-
type State = {
|
|
31
|
-
height: number | null;
|
|
32
|
-
};
|
|
33
|
-
/**
|
|
34
|
-
* DEPRECATED! Use Wonder Blocks tooltip instead.
|
|
35
|
-
*
|
|
36
|
-
* A generic tooltip library for React.js
|
|
37
|
-
*
|
|
38
|
-
* ```
|
|
39
|
-
* import Tooltip from "./tooltip";
|
|
40
|
-
* <Tooltip
|
|
41
|
-
* className="class-for-tooltip-contents"
|
|
42
|
-
* horizontalPosition={HoriziontalDirection.Left}
|
|
43
|
-
* horizontalAlign={HoriziontalDirection.Left}
|
|
44
|
-
* verticalPosition={VerticalDirection.Top}
|
|
45
|
-
* arrowSize={10} // arrow size in pixels
|
|
46
|
-
* borderColor="#ccc" // color of the border for the tooltip
|
|
47
|
-
* show={true} // whether the tooltip should currently be visible
|
|
48
|
-
* targetContainerStyle={targetContainerStyle}
|
|
49
|
-
* >
|
|
50
|
-
* <TargetElementOfTheTooltip />
|
|
51
|
-
* <TooltipContents1 />
|
|
52
|
-
* <TooltipContents2 />
|
|
53
|
-
* </Tooltip>
|
|
54
|
-
* ```
|
|
55
|
-
*
|
|
56
|
-
* To show/hide the tooltip, the parent component should call the
|
|
57
|
-
* `.show()` and `.hide()` methods of the tooltip when appropriate.
|
|
58
|
-
* (These are usually set up as handlers of events on the target element.)
|
|
59
|
-
*
|
|
60
|
-
* Notes:
|
|
61
|
-
* `className` should not specify a border; that is handled by `borderColor`
|
|
62
|
-
* so that the arrow and tooltip match
|
|
63
|
-
*
|
|
64
|
-
* ```
|
|
65
|
-
* __,,--``\\
|
|
66
|
-
* _,,-''`` \\ ,
|
|
67
|
-
* '----------_.------'-.___|\__
|
|
68
|
-
* _.--''`` `)__ )__ @\__
|
|
69
|
-
* ( .. ''---/___,,E/__,E'------`
|
|
70
|
-
* `-''`''
|
|
71
|
-
* Here be dragons.
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
declare class Tooltip extends React.Component<Props, State> {
|
|
75
|
-
tooltipContainerRef: React.RefObject<HTMLDivElement>;
|
|
76
|
-
static defaultProps: DefaultProps;
|
|
77
|
-
state: State;
|
|
78
|
-
componentDidMount(): void;
|
|
79
|
-
UNSAFE_componentWillReceiveProps(): void;
|
|
80
|
-
componentDidUpdate(): void;
|
|
81
|
-
_renderToolTipDiv(isTooltipAbove?: boolean): React.JSX.Element;
|
|
82
|
-
_updateHeight(): void;
|
|
83
|
-
render(): React.JSX.Element;
|
|
84
|
-
}
|
|
85
|
-
export default Tooltip;
|