@khanacademy/wonder-blocks-form 3.1.9 → 3.1.11
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/CHANGELOG.md +23 -0
- package/dist/index.js.flow +1 -1
- package/package.json +8 -8
- package/src/__tests__/custom-snapshot.test.js +2 -2
- package/src/components/__docs__/checkbox-group.stories.js +1 -1
- package/src/components/__docs__/checkbox.stories.js +2 -2
- package/src/components/__docs__/choice.stories.js +1 -1
- package/src/components/__docs__/labeled-text-field.stories.js +2 -2
- package/src/components/__docs__/radio-group.stories.js +1 -1
- package/src/components/__docs__/radio.stories.js +2 -2
- package/src/components/__docs__/text-field.stories.js +2 -2
- package/src/components/__tests__/checkbox-group.test.js +2 -2
- package/src/components/__tests__/field-heading.test.js +2 -2
- package/src/components/__tests__/labeled-text-field.test.js +1 -1
- package/src/components/__tests__/radio-group.test.js +2 -2
- package/src/components/__tests__/text-field.test.js +1 -1
- package/src/components/checkbox-core.js +1 -1
- package/src/components/checkbox-group.js +2 -2
- package/src/components/checkbox.js +1 -1
- package/src/components/choice-internal.js +2 -2
- package/src/components/choice.js +2 -2
- package/src/components/labeled-text-field.js +2 -2
- package/src/components/radio-core.js +1 -1
- package/src/components/radio-group.js +2 -2
- package/src/components/radio.js +1 -1
- package/src/index.js +6 -6
- package/src/util/types.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# @khanacademy/wonder-blocks-form
|
|
2
2
|
|
|
3
|
+
## 3.1.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 91cb727c: Remove file extensions from imports
|
|
8
|
+
- Updated dependencies [91cb727c]
|
|
9
|
+
- Updated dependencies [91cb727c]
|
|
10
|
+
- Updated dependencies [91cb727c]
|
|
11
|
+
- Updated dependencies [91cb727c]
|
|
12
|
+
- @khanacademy/wonder-blocks-icon@1.2.37
|
|
13
|
+
- @khanacademy/wonder-blocks-clickable@2.4.5
|
|
14
|
+
- @khanacademy/wonder-blocks-color@1.2.1
|
|
15
|
+
- @khanacademy/wonder-blocks-core@4.7.0
|
|
16
|
+
- @khanacademy/wonder-blocks-layout@1.4.16
|
|
17
|
+
- @khanacademy/wonder-blocks-typography@1.1.38
|
|
18
|
+
|
|
19
|
+
## 3.1.10
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [1a5624d4]
|
|
24
|
+
- @khanacademy/wonder-blocks-icon@1.2.36
|
|
25
|
+
|
|
3
26
|
## 3.1.9
|
|
4
27
|
|
|
5
28
|
### Patch Changes
|
package/dist/index.js.flow
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
export * from "../src/index
|
|
2
|
+
export * from "../src/index";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@khanacademy/wonder-blocks-form",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
4
|
"design": "v1",
|
|
5
5
|
"description": "Form components for Wonder Blocks.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,19 +16,19 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@babel/runtime": "^7.18.6",
|
|
19
|
-
"@khanacademy/wonder-blocks-clickable": "^2.4.
|
|
20
|
-
"@khanacademy/wonder-blocks-color": "^1.2.
|
|
21
|
-
"@khanacademy/wonder-blocks-core": "^4.
|
|
22
|
-
"@khanacademy/wonder-blocks-icon": "^1.2.
|
|
23
|
-
"@khanacademy/wonder-blocks-layout": "^1.4.
|
|
19
|
+
"@khanacademy/wonder-blocks-clickable": "^2.4.5",
|
|
20
|
+
"@khanacademy/wonder-blocks-color": "^1.2.1",
|
|
21
|
+
"@khanacademy/wonder-blocks-core": "^4.7.0",
|
|
22
|
+
"@khanacademy/wonder-blocks-icon": "^1.2.37",
|
|
23
|
+
"@khanacademy/wonder-blocks-layout": "^1.4.16",
|
|
24
24
|
"@khanacademy/wonder-blocks-spacing": "^3.0.5",
|
|
25
|
-
"@khanacademy/wonder-blocks-typography": "^1.1.
|
|
25
|
+
"@khanacademy/wonder-blocks-typography": "^1.1.38"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"aphrodite": "^1.2.5",
|
|
29
29
|
"react": "16.14.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"wb-dev-build-settings": "^0.7.
|
|
32
|
+
"wb-dev-build-settings": "^0.7.1"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
import renderer from "react-test-renderer";
|
|
4
4
|
|
|
5
|
-
import CheckboxCore from "../components/checkbox-core
|
|
6
|
-
import RadioCore from "../components/radio-core
|
|
5
|
+
import CheckboxCore from "../components/checkbox-core";
|
|
6
|
+
import RadioCore from "../components/radio-core";
|
|
7
7
|
|
|
8
8
|
const states = ["default", "error", "disabled"];
|
|
9
9
|
const clickableStates = ["default", "hovered", "pressed"];
|
|
@@ -10,7 +10,7 @@ import {LabelLarge, LabelXSmall} from "@khanacademy/wonder-blocks-typography";
|
|
|
10
10
|
|
|
11
11
|
import type {StoryComponentType} from "@storybook/react";
|
|
12
12
|
|
|
13
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
13
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
14
14
|
import {name, version} from "../../../package.json";
|
|
15
15
|
|
|
16
16
|
export default {
|
|
@@ -6,9 +6,9 @@ import {View} from "@khanacademy/wonder-blocks-core";
|
|
|
6
6
|
import {LabelMedium, LabelSmall} from "@khanacademy/wonder-blocks-typography";
|
|
7
7
|
import type {StoryComponentType} from "@storybook/react";
|
|
8
8
|
|
|
9
|
-
import Checkbox from "../checkbox
|
|
9
|
+
import Checkbox from "../checkbox";
|
|
10
10
|
|
|
11
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
11
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
12
12
|
import {name, version} from "../../../package.json";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
@@ -13,7 +13,7 @@ import Spacing from "@khanacademy/wonder-blocks-spacing";
|
|
|
13
13
|
|
|
14
14
|
import type {StoryComponentType} from "@storybook/react";
|
|
15
15
|
|
|
16
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
16
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
17
17
|
import {name, version} from "../../../package.json";
|
|
18
18
|
|
|
19
19
|
export default {
|
|
@@ -13,9 +13,9 @@ import Link from "@khanacademy/wonder-blocks-link";
|
|
|
13
13
|
|
|
14
14
|
import type {StoryComponentType} from "@storybook/react";
|
|
15
15
|
|
|
16
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
16
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
17
17
|
import {name, version} from "../../../package.json";
|
|
18
|
-
import LabeledTextFieldArgTypes from "./labeled-text-field.argtypes
|
|
18
|
+
import LabeledTextFieldArgTypes from "./labeled-text-field.argtypes";
|
|
19
19
|
|
|
20
20
|
export default {
|
|
21
21
|
title: "Form / LabeledTextField",
|
|
@@ -7,7 +7,7 @@ import {LabelLarge} from "@khanacademy/wonder-blocks-typography";
|
|
|
7
7
|
|
|
8
8
|
import type {StoryComponentType} from "@storybook/react";
|
|
9
9
|
|
|
10
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
10
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
11
11
|
import {name, version} from "../../../package.json";
|
|
12
12
|
|
|
13
13
|
export default {
|
|
@@ -6,10 +6,10 @@ import {View} from "@khanacademy/wonder-blocks-core";
|
|
|
6
6
|
import {LabelMedium, LabelSmall} from "@khanacademy/wonder-blocks-typography";
|
|
7
7
|
import type {StoryComponentType} from "@storybook/react";
|
|
8
8
|
|
|
9
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
9
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
10
10
|
import {name, version} from "../../../package.json";
|
|
11
11
|
|
|
12
|
-
import Radio from "../radio
|
|
12
|
+
import Radio from "../radio";
|
|
13
13
|
|
|
14
14
|
export default {
|
|
15
15
|
title: "Form / Radio (internal)",
|
|
@@ -11,9 +11,9 @@ import Button from "@khanacademy/wonder-blocks-button";
|
|
|
11
11
|
|
|
12
12
|
import type {StoryComponentType} from "@storybook/react";
|
|
13
13
|
|
|
14
|
-
import ComponentInfo from "../../../../../.storybook/components/component-info
|
|
14
|
+
import ComponentInfo from "../../../../../.storybook/components/component-info";
|
|
15
15
|
import {name, version} from "../../../package.json";
|
|
16
|
-
import TextFieldArgTypes from "./text-field.argtypes
|
|
16
|
+
import TextFieldArgTypes from "./text-field.argtypes";
|
|
17
17
|
|
|
18
18
|
export default {
|
|
19
19
|
title: "Form / TextField",
|
|
@@ -3,8 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
import {render, screen} from "@testing-library/react";
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
|
-
import CheckboxGroup from "../checkbox-group
|
|
7
|
-
import Choice from "../choice
|
|
6
|
+
import CheckboxGroup from "../checkbox-group";
|
|
7
|
+
import Choice from "../choice";
|
|
8
8
|
|
|
9
9
|
describe("CheckboxGroup", () => {
|
|
10
10
|
describe("behavior", () => {
|
|
@@ -6,8 +6,8 @@ import {StyleSheet} from "aphrodite";
|
|
|
6
6
|
import {I18nInlineMarkup} from "@khanacademy/wonder-blocks-i18n";
|
|
7
7
|
import {Body} from "@khanacademy/wonder-blocks-typography";
|
|
8
8
|
|
|
9
|
-
import FieldHeading from "../field-heading
|
|
10
|
-
import TextField from "../text-field
|
|
9
|
+
import FieldHeading from "../field-heading";
|
|
10
|
+
import TextField from "../text-field";
|
|
11
11
|
|
|
12
12
|
describe("FieldHeading", () => {
|
|
13
13
|
it("fieldheading renders the label text", () => {
|
|
@@ -4,7 +4,7 @@ import {render, screen, fireEvent} from "@testing-library/react";
|
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
6
|
import {StyleSheet} from "aphrodite";
|
|
7
|
-
import LabeledTextField from "../labeled-text-field
|
|
7
|
+
import LabeledTextField from "../labeled-text-field";
|
|
8
8
|
|
|
9
9
|
describe("LabeledTextField", () => {
|
|
10
10
|
it("labeledtextfield becomes focused", () => {
|
|
@@ -3,8 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
import {render, screen} from "@testing-library/react";
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
|
-
import RadioGroup from "../radio-group
|
|
7
|
-
import Choice from "../choice
|
|
6
|
+
import RadioGroup from "../radio-group";
|
|
7
|
+
import Choice from "../choice";
|
|
8
8
|
|
|
9
9
|
describe("RadioGroup", () => {
|
|
10
10
|
const TestComponent = ({
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import {fireEvent, render, screen} from "@testing-library/react";
|
|
4
4
|
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
|
-
import TextField from "../text-field
|
|
6
|
+
import TextField from "../text-field";
|
|
7
7
|
|
|
8
8
|
describe("TextField", () => {
|
|
9
9
|
it("textfield is focused", () => {
|
|
@@ -9,7 +9,7 @@ import Icon from "@khanacademy/wonder-blocks-icon";
|
|
|
9
9
|
|
|
10
10
|
import type {IconAsset} from "@khanacademy/wonder-blocks-icon";
|
|
11
11
|
|
|
12
|
-
import type {ChoiceCoreProps} from "../util/types
|
|
12
|
+
import type {ChoiceCoreProps} from "../util/types";
|
|
13
13
|
|
|
14
14
|
type Props = {|
|
|
15
15
|
...ChoiceCoreProps,
|
|
@@ -8,8 +8,8 @@ import Spacing from "@khanacademy/wonder-blocks-spacing";
|
|
|
8
8
|
import {LabelMedium, LabelSmall} from "@khanacademy/wonder-blocks-typography";
|
|
9
9
|
import type {StyleType} from "@khanacademy/wonder-blocks-core";
|
|
10
10
|
|
|
11
|
-
import styles from "./group-styles
|
|
12
|
-
import typeof Choice from "./choice
|
|
11
|
+
import styles from "./group-styles";
|
|
12
|
+
import typeof Choice from "./choice";
|
|
13
13
|
|
|
14
14
|
// Keep synced with CheckboxGroupProps in ../util/types.js
|
|
15
15
|
type CheckboxGroupProps = {|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import type {AriaProps, StyleType} from "@khanacademy/wonder-blocks-core";
|
|
6
|
-
import ChoiceInternal from "./choice-internal
|
|
6
|
+
import ChoiceInternal from "./choice-internal";
|
|
7
7
|
|
|
8
8
|
// Keep synced with ChoiceComponentProps in ../util/types.js
|
|
9
9
|
type ChoiceComponentProps = {|
|
|
@@ -10,8 +10,8 @@ import {Strut} from "@khanacademy/wonder-blocks-layout";
|
|
|
10
10
|
import Spacing from "@khanacademy/wonder-blocks-spacing";
|
|
11
11
|
import {LabelMedium, LabelSmall} from "@khanacademy/wonder-blocks-typography";
|
|
12
12
|
import type {AriaProps, StyleType} from "@khanacademy/wonder-blocks-core";
|
|
13
|
-
import CheckboxCore from "./checkbox-core
|
|
14
|
-
import RadioCore from "./radio-core
|
|
13
|
+
import CheckboxCore from "./checkbox-core";
|
|
14
|
+
import RadioCore from "./radio-core";
|
|
15
15
|
|
|
16
16
|
type Props = {|
|
|
17
17
|
...AriaProps,
|
package/src/components/choice.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import type {AriaProps, StyleType} from "@khanacademy/wonder-blocks-core";
|
|
6
|
-
import Checkbox from "./checkbox
|
|
7
|
-
import Radio from "./radio
|
|
6
|
+
import Checkbox from "./checkbox";
|
|
7
|
+
import Radio from "./radio";
|
|
8
8
|
|
|
9
9
|
type Props = {|
|
|
10
10
|
...AriaProps,
|
|
@@ -3,8 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
|
|
4
4
|
import {IDProvider, type StyleType} from "@khanacademy/wonder-blocks-core";
|
|
5
5
|
|
|
6
|
-
import FieldHeading from "./field-heading
|
|
7
|
-
import TextField, {type TextFieldType} from "./text-field
|
|
6
|
+
import FieldHeading from "./field-heading";
|
|
7
|
+
import TextField, {type TextFieldType} from "./text-field";
|
|
8
8
|
|
|
9
9
|
type WithForwardRef = {|forwardedRef: React.Ref<"input">|};
|
|
10
10
|
|
|
@@ -6,7 +6,7 @@ import {StyleSheet} from "aphrodite";
|
|
|
6
6
|
import Color, {mix, fade} from "@khanacademy/wonder-blocks-color";
|
|
7
7
|
import {addStyle} from "@khanacademy/wonder-blocks-core";
|
|
8
8
|
|
|
9
|
-
import type {ChoiceCoreProps} from "../util/types
|
|
9
|
+
import type {ChoiceCoreProps} from "../util/types";
|
|
10
10
|
|
|
11
11
|
type Props = {|
|
|
12
12
|
...ChoiceCoreProps,
|
|
@@ -8,8 +8,8 @@ import Spacing from "@khanacademy/wonder-blocks-spacing";
|
|
|
8
8
|
import {LabelMedium, LabelSmall} from "@khanacademy/wonder-blocks-typography";
|
|
9
9
|
import type {StyleType} from "@khanacademy/wonder-blocks-core";
|
|
10
10
|
|
|
11
|
-
import styles from "./group-styles
|
|
12
|
-
import typeof Choice from "./choice
|
|
11
|
+
import styles from "./group-styles";
|
|
12
|
+
import typeof Choice from "./choice";
|
|
13
13
|
|
|
14
14
|
// Keep synced with RadioGroupProps in ../util/types.js
|
|
15
15
|
type RadioGroupProps = {|
|
package/src/components/radio.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import type {AriaProps, StyleType} from "@khanacademy/wonder-blocks-core";
|
|
6
|
-
import ChoiceInternal from "./choice-internal
|
|
6
|
+
import ChoiceInternal from "./choice-internal";
|
|
7
7
|
|
|
8
8
|
// Keep synced with ChoiceComponentProps in ../util/types.js
|
|
9
9
|
type ChoiceComponentProps = {|
|
package/src/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @flow
|
|
2
|
-
import Checkbox from "./components/checkbox
|
|
3
|
-
import Choice from "./components/choice
|
|
4
|
-
import CheckboxGroup from "./components/checkbox-group
|
|
5
|
-
import RadioGroup from "./components/radio-group
|
|
6
|
-
import TextField from "./components/text-field
|
|
7
|
-
import LabeledTextField from "./components/labeled-text-field
|
|
2
|
+
import Checkbox from "./components/checkbox";
|
|
3
|
+
import Choice from "./components/choice";
|
|
4
|
+
import CheckboxGroup from "./components/checkbox-group";
|
|
5
|
+
import RadioGroup from "./components/radio-group";
|
|
6
|
+
import TextField from "./components/text-field";
|
|
7
|
+
import LabeledTextField from "./components/labeled-text-field";
|
|
8
8
|
|
|
9
9
|
export {
|
|
10
10
|
Checkbox,
|
package/src/util/types.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// guide.
|
|
6
6
|
import type {AriaProps, StyleType} from "@khanacademy/wonder-blocks-core";
|
|
7
7
|
|
|
8
|
-
import typeof Choice from "../components/choice
|
|
8
|
+
import typeof Choice from "../components/choice";
|
|
9
9
|
|
|
10
10
|
// Shared props for radio-core and checkbox-core
|
|
11
11
|
export type ChoiceCoreProps = {|
|