diff --git a/.changeset/dirty-badgers-fry.md b/.changeset/dirty-badgers-fry.md new file mode 100644 index 000000000..40ce3a446 --- /dev/null +++ b/.changeset/dirty-badgers-fry.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-dropdown": patch +--- + +Update default/resting border color to fix a color contrast issue diff --git a/.changeset/eight-rice-hear.md b/.changeset/eight-rice-hear.md new file mode 100644 index 000000000..d39328698 --- /dev/null +++ b/.changeset/eight-rice-hear.md @@ -0,0 +1,5 @@ +--- +"@khanacademy/wonder-blocks-form": patch +--- + +Update default/resting border color to fix a color contrast issue diff --git a/__docs__/wonder-blocks-form/labeled-text-field.stories.tsx b/__docs__/wonder-blocks-form/labeled-text-field.stories.tsx index e55c3ab10..3212d2a24 100644 --- a/__docs__/wonder-blocks-form/labeled-text-field.stories.tsx +++ b/__docs__/wonder-blocks-form/labeled-text-field.stories.tsx @@ -15,6 +15,10 @@ import packageConfig from "../../packages/wonder-blocks-form/package.json"; import ComponentInfo from "../../.storybook/components/component-info"; import LabeledTextFieldArgTypes from "./labeled-text-field.argtypes"; +/** + * A LabeledTextField is an element used to accept a single line of text from + * the user paired with a label, description, and error field elements. + */ export default { title: "Packages / Form / LabeledTextField", component: LabeledTextField, diff --git a/__docs__/wonder-blocks-form/text-field.stories.tsx b/__docs__/wonder-blocks-form/text-field.stories.tsx index 456204148..86b54b629 100644 --- a/__docs__/wonder-blocks-form/text-field.stories.tsx +++ b/__docs__/wonder-blocks-form/text-field.stories.tsx @@ -14,6 +14,9 @@ import packageConfig from "../../packages/wonder-blocks-form/package.json"; import ComponentInfo from "../../.storybook/components/component-info"; import TextFieldArgTypes from "./text-field.argtypes"; +/** + * A TextField is an element used to accept a single line of text from the user. + */ export default { title: "Packages / Form / TextField", component: TextField, diff --git a/packages/wonder-blocks-dropdown/src/components/select-opener.tsx b/packages/wonder-blocks-dropdown/src/components/select-opener.tsx index 6f4d5f7e1..0e9dd262c 100644 --- a/packages/wonder-blocks-dropdown/src/components/select-opener.tsx +++ b/packages/wonder-blocks-dropdown/src/components/select-opener.tsx @@ -322,7 +322,7 @@ const _generateStyles = ( newStyles = { default: { background: error ? tokens.color.fadedRed8 : tokens.color.white, - borderColor: error ? tokens.color.red : tokens.color.offBlack16, + borderColor: error ? tokens.color.red : tokens.color.offBlack50, borderWidth: tokens.border.width.hairline, color: placeholder ? tokens.color.offBlack64 @@ -334,7 +334,7 @@ const _generateStyles = ( ":hover:not([aria-disabled=true])": { borderColor: error ? tokens.color.red - : tokens.color.offBlack16, + : tokens.color.offBlack50, borderWidth: tokens.border.width.hairline, paddingLeft: tokens.spacing.medium_16, paddingRight: tokens.spacing.small_12, diff --git a/packages/wonder-blocks-form/src/components/text-field.tsx b/packages/wonder-blocks-form/src/components/text-field.tsx index ad9c421a3..f1b2bcb6b 100644 --- a/packages/wonder-blocks-form/src/components/text-field.tsx +++ b/packages/wonder-blocks-form/src/components/text-field.tsx @@ -1,8 +1,8 @@ import * as React from "react"; import {StyleSheet} from "aphrodite"; -import {mix, color, spacing} from "@khanacademy/wonder-blocks-tokens"; import {IDProvider, addStyle} from "@khanacademy/wonder-blocks-core"; +import {color, spacing} from "@khanacademy/wonder-blocks-tokens"; import {styles as typographyStyles} from "@khanacademy/wonder-blocks-typography"; import type {StyleType, AriaProps} from "@khanacademy/wonder-blocks-core"; @@ -329,14 +329,14 @@ const styles = StyleSheet.create({ }, default: { background: color.white, - border: `1px solid ${color.offBlack16}`, + border: `1px solid ${color.offBlack50}`, color: color.offBlack, "::placeholder": { color: color.offBlack64, }, }, error: { - background: `${mix(color.fadedRed8, color.white)}`, + background: color.fadedRed8, border: `1px solid ${color.red}`, color: color.offBlack, "::placeholder": {