Skip to content

Latest commit

 

History

History
232 lines (163 loc) · 7.52 KB

CHANGELOG.md

File metadata and controls

232 lines (163 loc) · 7.52 KB

@leafygreen-ui/form-field

2.0.2

Patch Changes

2.0.1

Patch Changes

2.0.0

Patch Changes

1.2.5

Patch Changes

  • 07bab6308: LG-4507: fix FormFieldInputContainer autocomplete styling used in DateInputSegment, TextArea and TextInput. A double-border issue occurs when the auto-completed input has focus or hover state applied

1.2.4

Patch Changes

  • c95b81376: LG-4409: contentEnd slot prop now passes the disabled prop into the cloned element

1.2.3

Patch Changes

  • 3273045c: Correctly sets the readOnly prop in the useFormFieldProps hook. Previously, readOnly was only added to an input if disabled was true. Now, passing the readOnly prop adds it to the resulting input.
  • Updated dependencies [ae44834e]

1.2.2

Patch Changes

  • c86227a6: Updates Storybook argTypes for mongodb.design

1.2.1

Patch Changes

1.2.0

Minor Changes

  • c406ab85: LG-2930

    • Adds and exports FormFieldFeedback component
    • Adds and exports DEFAULT_MESSAGES constant
    • Updates FormField and FormFieldInputContainer components to use tokens where possible
    • Refactors FormField to use FormFieldFeedback

Patch Changes

1.1.1

Patch Changes

1.1.0

Minor Changes

  • 27ad3121: LG-4143

    Optional successMessage prop is rendered below input container when state is valid.

    The following changes are made to inputProps spread on the input component contained by FormFieldInputContainer:

    • aria-label prop is only passed to the input component with an aria-label attribute if label prop and aria-labelledby prop are undefined. If either is defined, aria-label attribute on the input component will be undefined as per best practices from aria-label MDN docs aria-label prop can only set the aria-label attribute on the input if both label prop and aria-labelledby prop are undefined

      👎 Does not use aria-label prop 👎 Does not use aria-label prop 👍 Does use aria-label prop
      <TextInput label="Label" aria-label="Custom label" /> <TextInput aria-label="Custom label" aria-labelledby="other-custom-label-id" /> <TextInput aria-label="Custom label" />
    • disabled prop is passed to the input component with aria-disabled attribute

    • aria-invalid attribute will always be set on the input component if the parent form field is in an error state. A custom aria-invalid prop can be used to customize this logic

    The following styling changes are made:

    • updated left and right spacing of input container for xsmall, small, and large size variants
    • updated light mode placeholder text color
    • moved success and error icon from inside the input to underneath the input, alongside the state feedback message
    • refactored disabled styles although there should be no visual changes associated with this refactor

Patch Changes

  • c3906f78: - Adds data-lgid to Error and optional.
    • Removes role="presentation" from Checkmark and Warning icons and replaces it with aria-hidden. The title attribute is omitted when using role="presentation" and we rely on title to query the DOM for those icons.
    • Exports the constant, LGIDS_FORM_FIELD, which stores data-lgid values.
  • Updated dependencies [9402ba0e]
  • Updated dependencies [9b71e34d]
  • Updated dependencies [c3906f78]
  • Updated dependencies [c3906f78]
  • Updated dependencies [070736c4]

1.0.1

Patch Changes

1.0.0

Major Changes

  • 223666eb: Conditionally renders div wrapping errorMessage and label/description content, so that styles appear as-expected.

Patch Changes

0.3.2

Patch Changes

  • 5249bd3d: Changes the gap between icons from 8px to 4px for all sizes.

0.3.1

Patch Changes

0.3.0

Minor Changes

  • ffd11f24: Adds data-testid to Label, Description & Error elements

Patch Changes

0.2.0

Minor Changes

  • d16fb891: Initial beta release of FormField

Patch Changes