diff --git a/.changeset/four-windows-retire.md b/.changeset/four-windows-retire.md new file mode 100644 index 0000000000..cf95d50f3e --- /dev/null +++ b/.changeset/four-windows-retire.md @@ -0,0 +1,6 @@ +--- +"@khanacademy/perseus": major +"@khanacademy/perseus-editor": patch +--- + +Remove PropCheckBox component from Perseus; use WB instead diff --git a/packages/perseus-editor/src/components/graph-settings.tsx b/packages/perseus-editor/src/components/graph-settings.tsx index 17ee3c5f85..b65498183f 100644 --- a/packages/perseus-editor/src/components/graph-settings.tsx +++ b/packages/perseus-editor/src/components/graph-settings.tsx @@ -10,13 +10,14 @@ import { KhanMath, Util, } from "@khanacademy/perseus"; +import {Checkbox} from "@khanacademy/wonder-blocks-form"; import createReactClass from "create-react-class"; import PropTypes from "prop-types"; import * as React from "react"; import ReactDOM from "react-dom"; import _ from "underscore"; -const {ButtonGroup, InfoTip, PropCheckBox, RangeInput} = components; +const {ButtonGroup, InfoTip, RangeInput} = components; const defaultBackgroundImage = { url: null, @@ -521,10 +522,12 @@ const GraphSettings = createReactClass({ />
@@ -542,11 +543,12 @@ class AnswerOption extends React.Component<
@@ -558,12 +560,12 @@ class AnswerOption extends React.Component<
diff --git a/packages/perseus-editor/src/widgets/iframe-editor.tsx b/packages/perseus-editor/src/widgets/iframe-editor.tsx
index ad95bb5d74..de45b219b9 100644
--- a/packages/perseus-editor/src/widgets/iframe-editor.tsx
+++ b/packages/perseus-editor/src/widgets/iframe-editor.tsx
@@ -1,14 +1,13 @@
/* eslint-disable @khanacademy/ts-no-error-suppressions */
/* eslint-disable react/sort-comp */
-import {components, Changeable, EditorJsonify} from "@khanacademy/perseus";
+import {Changeable, EditorJsonify} from "@khanacademy/perseus";
+import {Checkbox} from "@khanacademy/wonder-blocks-form";
import PropTypes from "prop-types";
import * as React from "react";
import _ from "underscore";
import BlurInput from "../components/blur-input";
-const {PropCheckBox} = components;
-
type PairEditorProps = any;
/**
@@ -174,16 +173,20 @@ class IframeEditor extends React.Component
-
@@ -100,10 +103,12 @@ class MatcherEditor extends React.Component
diff --git a/packages/perseus-editor/src/widgets/measurer-editor.tsx b/packages/perseus-editor/src/widgets/measurer-editor.tsx
index 1b4060c9ea..67251326b5 100644
--- a/packages/perseus-editor/src/widgets/measurer-editor.tsx
+++ b/packages/perseus-editor/src/widgets/measurer-editor.tsx
@@ -1,11 +1,12 @@
/* eslint-disable @khanacademy/ts-no-error-suppressions */
/* eslint-disable react/sort-comp */
import {components, Changeable, EditorJsonify} from "@khanacademy/perseus";
+import {Checkbox} from "@khanacademy/wonder-blocks-form";
import PropTypes from "prop-types";
import * as React from "react";
import _ from "underscore";
-const {InfoTip, NumberInput, PropCheckBox, RangeInput} = components;
+const {InfoTip, NumberInput, RangeInput} = components;
const defaultImage = {
url: null,
@@ -103,17 +104,21 @@ class MeasurerEditor extends React.Component
diff --git a/packages/perseus-editor/src/widgets/passage-editor.tsx b/packages/perseus-editor/src/widgets/passage-editor.tsx
index f2d913b34d..c0755a1b32 100644
--- a/packages/perseus-editor/src/widgets/passage-editor.tsx
+++ b/packages/perseus-editor/src/widgets/passage-editor.tsx
@@ -1,11 +1,12 @@
import {components, Changeable, EditorJsonify} from "@khanacademy/perseus";
+import {Checkbox} from "@khanacademy/wonder-blocks-form";
import PropTypes from "prop-types";
import * as React from "react";
import _ from "underscore";
import Editor from "../editor";
-const {InfoTip, PropCheckBox} = components;
+const {InfoTip} = components;
type Props = any;
@@ -68,11 +69,12 @@ class PassageEditor extends React.Component
diff --git a/packages/perseus/src/components.ts b/packages/perseus/src/components.ts
index 9c529c7159..ca12de1252 100644
--- a/packages/perseus/src/components.ts
+++ b/packages/perseus/src/components.ts
@@ -8,7 +8,6 @@ export {default as InlineIcon} from "./components/inline-icon";
export {default as MathInput} from "./components/math-input";
export {default as MultiButtonGroup} from "./components/multi-button-group";
export {default as NumberInput} from "./components/number-input";
-export {default as PropCheckBox} from "./components/prop-check-box";
export {default as RangeInput} from "./components/range-input";
export {default as SvgImage} from "./components/svg-image";
export {default as TextInput} from "./components/text-input";
diff --git a/packages/perseus/src/components/__stories__/prop-check-box.stories.tsx b/packages/perseus/src/components/__stories__/prop-check-box.stories.tsx
deleted file mode 100644
index 09eed8aa89..0000000000
--- a/packages/perseus/src/components/__stories__/prop-check-box.stories.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import * as React from "react";
-
-import PropCheckBox from "../prop-check-box";
-
-type StoryArgs = Record