diff --git a/.changeset/chilly-mirrors-add.md b/.changeset/chilly-mirrors-add.md new file mode 100644 index 000000000..4d82d7b9d --- /dev/null +++ b/.changeset/chilly-mirrors-add.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-form": patch +--- + +TextField and TextArea: Set `aria-required` if it is required diff --git a/.changeset/metal-maps-move.md b/.changeset/metal-maps-move.md new file mode 100644 index 000000000..f4a0999de --- /dev/null +++ b/.changeset/metal-maps-move.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-form": patch +--- + +TextField and TextArea validation: Always clear error message onChange if instantValidation=false so externally set error state can still be cleared diff --git a/.changeset/slow-otters-crash.md b/.changeset/slow-otters-crash.md new file mode 100644 index 000000000..0888206d7 --- /dev/null +++ b/.changeset/slow-otters-crash.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-labeled-field": patch +--- + +Set required, error and light props for LabeledField and field component if it is set on either LabeledField or field component diff --git a/.changeset/smart-grapes-serve.md b/.changeset/smart-grapes-serve.md new file mode 100644 index 000000000..5835a09e5 --- /dev/null +++ b/.changeset/smart-grapes-serve.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-labeled-field": patch +--- + +Use `errorMessage` prop instead of `error` prop for consistency (`error` prop is used for boolean props in form field components). diff --git a/.changeset/spicy-rivers-marry.md b/.changeset/spicy-rivers-marry.md new file mode 100644 index 000000000..be94ec3c4 --- /dev/null +++ b/.changeset/spicy-rivers-marry.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-labeled-field": patch +--- + +LabeledField: Let `required` prop be a boolean or string so it can be passed down to the field prop diff --git a/__docs__/wonder-blocks-form/_overview_.mdx b/__docs__/wonder-blocks-form/_overview_.mdx index 78c7e733d..cdece2c84 100644 --- a/__docs__/wonder-blocks-form/_overview_.mdx +++ b/__docs__/wonder-blocks-form/_overview_.mdx @@ -1,4 +1,6 @@ -import {Meta} from "@storybook/blocks"; +import {Meta, Story, Canvas} from "@storybook/blocks"; +import * as AccessibilityStories from './accessibility.stories'; +import * as LabeledFieldStories from '../wonder-blocks-labeled-field/labeled-field.stories'; ` and +`` elements instead of a `