Skip to content

Latest commit

 

History

History
1187 lines (832 loc) · 31.2 KB

CHANGELOG.md

File metadata and controls

1187 lines (832 loc) · 31.2 KB

@leafygreen-ui/text-input

14.0.10

Patch Changes

14.0.9

Patch Changes

14.0.8

Patch Changes

14.0.7

Patch Changes

14.0.6

Patch Changes

14.0.5

Patch Changes

14.0.4

Patch Changes

14.0.3

Patch Changes

14.0.2

Patch Changes

14.0.1

Patch Changes

14.0.0

Major Changes

  • 274d7e1a7: Removes prop-types from LeafyGreen UI

Patch Changes

13.1.2

Patch Changes

  • 65c6f321d: LG-4507: bumps to v1.2.5 of @leafygreen-ui/form-field

13.1.1

Patch Changes

13.1.0

Minor Changes

  • 3b86b3bd: Allow type of ReactNode for errorMessage and successMessage props in NumberInput, TextArea, and TextInput

Patch Changes

  • 3273045c: Passes readOnly prop to <FormField> so that it correctly sets the readOnly prop.
  • Updated dependencies [3273045c]

13.0.2

Patch Changes

13.0.1

Patch Changes

  • 8adadc89: Fixes a bug that prevented packages from rendering in a server-side environment
  • Updated dependencies [8adadc89]

13.0.0

Major Changes

  • 27ad3121: LG-4145

    aria-label and aria-labelledby props are passed to the input.

    aria-labelledby

    aria-labelledby prop can only set the aria-labelledby attribute on the input if label prop is undefined. Otherwise, the generated label component id will be used for the aria-labelledby attribute

    👎 Does not use aria-labelledby prop 👍 Does use custom aria-labelledby prop
    <TextInput label="Label" aria-labelledby="custom-label-id" /> <TextInput aria-labelledby="custom-label-id" />

    aria-label

    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" />

    LG-4143

    1. FormField styling changes apply to TextInput. See style changes here

    2. A default errorMessage of 'This input needs your attention' will render below text input when state is invalid.

    3. A default successMessage of 'Success' will render when state is valid. successMessage prop accepts a custom string.

    4. Disabled TextInput component no longer renders the disabled attribute and instead relies on aria-disabled.

    The last change is made to ensure that disabled components are still focusable to users using keyboard navigation.

    For more on aria-disabled see the documentation on MDN

    Migration guide

    Functionally, migration should be seamless, however there may be unit/integration/e2e tests that relied on this behavior.

    Jest/RTL

    Generally, only this repo should need to test that these components have a specific attribute. We recommend updating unit tests to check that some event was or was not called.

    However, there are cases where this may still need to be tested. In cases where a test checks expect(textInput).toBeDisabled(), you can replace and use test harnesses.

    Cypress

    Similar to unit tests, you should generally test functionality and not implementation details. However, to test this in Cypress replace any cy.get(textInput).should('be.disabled'); checks with cy.get(textInput).invoke('attr', 'aria-disabled').should('eq', 'true');

Minor Changes

  • c3906f78: - Extends DarkModeProps from @leafygreen-ui/lib
    • Exports getTestUtils, a util to reliably interact with LG TextInput in a product test suite. For more details, check out the README LG-4035
    • Exports the constant, LGIDS_TEXT_INPUT, which stores data-lgid values.

Patch Changes

12.1.27

Patch Changes

12.1.26

Patch Changes

12.1.25

Patch Changes

12.1.24

Patch Changes

  • d39acdc6: Ensure inner input element properly inherits width property from parent.

12.1.23

Patch Changes

  • 0b91826e: Refactors component to use FormField under the hood. Also, per the latest design guidelines, we no longer surface an error message when an input is disabled.
  • Updated dependencies [dd4f3da8]
  • Updated dependencies [d16fb891]
  • Updated dependencies [90053e16]

12.1.22

Patch Changes

12.1.21

Patch Changes

  • Updated dependencies [a5770c15]
  • Updated dependencies [c89d17a4]

12.1.20

Patch Changes

12.1.19

Patch Changes

12.1.18

Patch Changes

12.1.17

Patch Changes

12.1.16

Patch Changes

12.1.15

Patch Changes

  • 0efcd4e7: Updates valid state icon in dark mode to match Figma spec
  • Updated dependencies [bf5672bb]

12.1.14

Patch Changes

12.1.13

Patch Changes

12.1.12

Patch Changes

  • a3a52e131: Bumps to use new useIdAllocator hook
  • Updated dependencies [614f7617d]
  • Updated dependencies [a3a52e131]
  • Updated dependencies [614f7617d]

12.1.11

Patch Changes

  • 32b3d3146: Bumps to use new useIdAllocator hook
  • 73cbbd02c: Uses fontWeight token from @leafygreen-ui/tokens
  • Updated dependencies [73cbbd02c]
  • Updated dependencies [83fc5b31b]
  • Updated dependencies [9bcf8b925]
  • Updated dependencies [8ece56980]
  • Updated dependencies [32b3d3146]
  • Updated dependencies [73cbbd02c]

12.1.10

Patch Changes

  • 55d33e435: Update to BaseFontSize prop control for .design live example
  • 77320a6b8: Fix padding discrepancy between Combobox, Select, Text Input, and Number Input
  • f1dde4c68: Fix bug where text would overlap optional text and state indicator icons
  • Updated dependencies [55d33e435]
  • Updated dependencies [07db42330]
  • Updated dependencies [55d33e435]
  • Updated dependencies [cf00160ec]
  • Updated dependencies [111b680c5]
  • Updated dependencies [77320a6b8]

12.1.9

Patch Changes

12.1.8

Patch Changes

12.1.7

Patch Changes

12.1.6

Patch Changes

  • 4ccc353e7: Adds darkMode to PropTypes and adds warning to use PasswordInput if type='password'.
  • Updated dependencies [2e8a572db]
  • Updated dependencies [4ccc353e7]
  • Updated dependencies [4ccc353e7]

12.1.5

Patch Changes

12.1.4

Patch Changes

12.1.3

Patch Changes

  • 53d77f55d: Uses Error component from Typography package to handle formatting errorMessage prop
  • Updated dependencies [405636249]
  • Updated dependencies [53d77f55d]

12.1.2

Patch Changes

  • 9c869ced2: Fixes transition property, so that animations on hover and focus work properly
  • Updated dependencies [d8c589d35]
  • Updated dependencies [703db871f]

12.1.1

Patch Changes

  • 1271944b2: Updates darkMode placeholder and optional text colors to match figma specs.
  • Updated dependencies [95bd93ef9]
  • Updated dependencies [3bb4b7506]
  • Updated dependencies [a0d6638c4]

12.1.0

Minor Changes

  • fa158335c: - Updates TS types: now Any one of label, aria-label and aria-labelledby is sufficient for all text input types

    • Fixes a regression when type="search". Providing aria-label is sufficient for accessibility

Patch Changes

  • a1d093f30: Resolves aria type issues
  • ae5421cf6: Updates components to use internal transition tokens
  • Updated dependencies [ae5421cf6]
  • Updated dependencies [4b4c2d27d]
  • Updated dependencies [6a266b813]
  • Updated dependencies [1a335d0b2]
  • Updated dependencies [ba97d1ef7]
  • Updated dependencies [ae5421cf6]

12.0.0

Patch Changes

  • 3cb2e1f7: Removes hover box-shadow from disabled inputs. Adds console warning suggestion to use SearchInput component in place of TextInput with type="search".
  • Updated dependencies [07b3c797]
  • Updated dependencies [07b3c797]
  • Updated dependencies [b9b09a86]

11.0.1

Patch Changes

11.0.0

Patch Changes

10.2.1

Patch Changes

10.2.0

Minor Changes

  • 3690df49: Updates TypeScript annotations, type structures and export format of some components

Patch Changes

10.1.3

Patch Changes

10.1.2

Patch Changes

  • b10463fc: Removing padding-top when neither label nor description are defined.

10.1.1

Patch Changes

  • 79b3ba7e: Aligns Text Input focus & hover styles to Figma library
  • Updated dependencies [30e038a3]

10.1.0

Minor Changes

  • 65c86281: Consuming darkMode from the LeafyGreenProvider if the darkMode prop is not set

Patch Changes

10.0.0

Patch Changes

  • e317392f: Minor darkmode style updates, remove interaction ring from dependencies, and bump up Typography version.
  • Updated dependencies [85d46871]
  • Updated dependencies [99e20bb9]

9.0.0

Major Changes

Patch Changes

8.0.0

Major Changes

  • f3aad7e2: Updates Dark Mode for visual brand refresh

Patch Changes

  • Updated dependencies [233ac580]
  • Updated dependencies [ba4aab15]
  • Updated dependencies [ba4aab15]
  • Updated dependencies [2cf1bc4a]
  • Updated dependencies [679b6239]
  • Updated dependencies [f3aad7e2]

7.0.1

Patch Changes

  • acd6919: Adds @leafygreen-ui/tokens dependency to package.json
  • Updated dependencies [acd6919]
  • Updated dependencies [acd6919]
  • Updated dependencies [acd6919]
  • Updated dependencies [acd6919]

7.0.0

Major Changes

  • 8457f92: Updates text input to be in line with the visual brand refresh

Patch Changes

6.2.1

Patch Changes

  • 548ca2c: Restores the ability to pass onBlur handlers while using the useValidation hook.

6.2.0

Minor Changes

  • ded2831: Add sizeVariant prop

Patch Changes

6.1.0

Minor Changes

  • d661688: Adds validation callback for TextArea and TextInput

Patch Changes

6.0.5

Patch Changes

  • e87b1cdf: Improves the types for TextInput type attributes.
  • Updated dependencies [e4070f2b]

6.0.4

Patch Changes

  • fe542c15: Fixes a bug in TextInput & TextArea where the focus ring was not visible when using the mouse. Also adds functionality to InteractioRing to ignore keyboard context and use the default focus behavior.
  • Updated dependencies [f6e5655a]
  • Updated dependencies [03388ff2]
  • Updated dependencies [fe542c15]
  • Updated dependencies [b8f03aa1]

6.0.3

Patch Changes

6.0.2

Patch Changes

  • 37780eb8: Updates colors of the component's interaction ring on hover, based on the state prop on the component.

6.0.1

Patch Changes

6.0.0

Patch Changes

  • 801f3221: Fixes check to ensure label or ariaLablledby is provided to component
  • Updated dependencies [857a680a]

5.0.12

Patch Changes

  • 509e90c3: Checks for existence of either label or aria-labelledby props, rather than requiring both, before logging a warning to the console
  • Updated dependencies [b1854dd8]

5.0.11

Patch Changes

5.0.10

Patch Changes

5.0.9

Patch Changes

  • c6ae17bd: Updates console warning to be more reflective of error, and adds role="presentation" to icons rendered inside of component.
  • Updated dependencies [1a42c662]

5.0.8

Patch Changes

5.0.7

Patch Changes

5.0.6

Patch Changes

  • 36ec9078: Preserves right padding when icons are visible in a disabled text input
  • Updated dependencies [2daf1808]

5.0.5

Patch Changes

  • 522217db: CLOUDP-79746: Allowing text input error message to expand its container
  • Updated dependencies [7df69248]

5.0.4

Patch Changes

  • 919d9911: Fixes border on autoComplete disabled TextInput components

5.0.3

Patch Changes

  • 117fc702: Overwrites chrome browser defaults for autocompleted input values, and disables autocomplete when component is disabled

5.0.2

Patch Changes

  • 358a072e: Fixes visual regression where the border of inputs do not appear until text is entered
  • Updated dependencies [fc18e572]

5.0.1

Patch Changes

  • 988c4e3d: Allows error and valid states to display when component is disabled

5.0.0

Major Changes

  • 8b0ea602: Form-compatible components now display more visually consistent hover and focus states

Patch Changes

4.2.0

Minor Changes

  • 627333c2: State is now a named export from the package

Patch Changes

  • ee7923d3: Changes how we extend the types of HTMLElements, and standardizes how we document this across readmes
  • Updated dependencies [ee7923d3]
  • Updated dependencies [7b71da8f]

4.1.1

Patch Changes

4.1.0

Minor Changes

  • 5a3fb225: Adds darkMode prop to component

4.0.1

Patch Changes

4.0.0

Major Changes

  • 0267bfd2: The underlying structure of distributed module definition files have changed and now have official support for ES modules. Module definition files are now generated using Rollup instead of Webpack. This should not affect functionality, but some thorough testing and caution should be exercised when upgrading.

Patch Changes

3.0.4

Patch Changes

3.0.3

Patch Changes

  • 6aadc0b: Make id generation deterministic using IdAllocator.create class. This improves the SSR compatibility of these components.
  • Updated dependencies [6aadc0b]
  • Updated dependencies [5ee2098]

3.0.2

Patch Changes

3.0.1

Patch Changes

  • 5496ff4: Fix bug in input HTML such that aria-labelledby is correctly-cased

3.0.0

Major Changes

  • 89318bd: Conditionally renders label tag, such that when no label prop is supplied the tag is not on the DOM. If no label is provided aria-labelledby prop must be supplied.

2.0.0

Major Changes

  • 1d24966: Makes @leafygreen-ui/leafygreen-provider a peer dependency to ensure that components use hooks from the same version of the provider as what's installed.

1.1.2

Patch Changes

  • 1d86d56: Imports Glyphs directly, rather than importing the entire Icon package, when Glyph components are used
  • Updated dependencies [1d86d56]

1.1.1

Patch Changes

1.1.0

Minor Changes

  • 2c956d1: Allows consumer to set type attribute on input component

Patch Changes

  • Updated dependencies [2fc4ef9]
  • Updated dependencies [e857861]
  • Updated dependencies [cf6167e]

1.0.4

Patch Changes

  • 2a03117: Upgrades @testing-library/react to v10 and revises test suites to conform with new standards
  • Updated dependencies [2a03117]
  • Updated dependencies [c812eb3]

1.0.3

Patch Changes

  • 1b298cc: Fix TextInput TypeScript interface.

1.0.2

Patch Changes

1.0.1

Patch Changes

  • 62455d4: Switches devDependencies to dependencies in package.json

1.0.0

Major Changes

  • 5f08f87: Initial release of TextInput component

Patch Changes