Skip to content

Latest commit

 

History

History
1121 lines (854 loc) · 34 KB

CHANGELOG.md

File metadata and controls

1121 lines (854 loc) · 34 KB

@leafygreen-ui/combobox

11.0.2

Patch Changes

11.0.1

Patch Changes

11.0.0

Major Changes

  • 274d7e1a7: Removes prop-types from LeafyGreen UI

Patch Changes

10.0.0

Major Changes

  • 04bb887c0: LG-4121: Replaces usePortal prop with renderMode prop. renderMode="inline" and renderMode="portal" are deprecated, and all popover elements should migrate to using the top layer. The old default was usePortal=true, and the new default is renderMode="top-layer".

    See @leafygreen-ui/popover package 12.0.0 changelog for more info.

    Migration guide

    Use popover-v12 codemod for migration assistance.

    Old
    <Combobox popoverZIndex={9999} usePortal={false} />
    <Combobox portalClassName="portal-class" usePortal />
    New
    <Combobox popoverZIndex={9999} renderMode="inline" />
    <Combobox portalClassName="portal-class" renderMode="portal" />

Patch Changes

9.1.6

Patch Changes

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

9.1.5

Patch Changes

  • 5f10976d5: - Updates useAvailableSpace hook which fixes a dropdown height bug. LG-4601.

9.1.4

Patch Changes

Note: This version has no updates. Pleas use version 9.1.5.

  • Updates useAvailableSpace hook which fixes a dropdown height bug. LG-4601

9.1.3

Patch Changes

9.1.2

Patch Changes

9.1.1

Patch Changes

  • cfa830701: Updates ComboboxOption.

    • Removes custom min-height, padding, and line-height. Instead these styles will come from InputOptionContent.

    Updates ComboboxMenu.

    • Updates the menu background-color to match the background from InputOptionContent.
  • Updated dependencies [cfa830701]

  • Updated dependencies [cfa830701]

  • Updated dependencies [cfa830701]

  • Updated dependencies [db2d1d12c]

  • Updated dependencies [cfa830701]

9.1.0

Minor Changes

  • 02e1d77e: Expose portalRef in components that use Popover:

    • Combobox
    • DatePicker
    • GuideCue
    • Menu
    • NumberInput
    • Select
    • SplitButton
    • Tooltip

    LG-3988

Patch Changes

9.0.0

Major Changes

  • c406ab85: LG-4133

    1. Updated styling:
    • updated spacing for 'small', 'xsmall', and 'large' size variants
    • updated placeholder text color
    • moved error icon from inside the input to underneath the input, alongside the error message
    1. A default errorMessage of 'This input needs your attention' will render below combobox when state is invalid.

    2. Added a valid state with success icon and successMessage prop. A default successMessage of 'Success' will render when state is valid. successMessage prop allows customization.

    3. Disabled Combobox component no longer renders the disabled attribute and instead relies on aria-disabled and readonly attributes.

    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. You can replace any expect(combobox).toBeDisabled() with an explicit check for expect(combobox).toHaveAttribute('aria-disabled', 'true').

    Cypress

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

Patch Changes

8.1.4

Patch Changes

8.1.3

Patch Changes

8.1.2

Patch Changes

8.1.1

Patch Changes

8.1.0

Minor Changes

  • 36a8ded2: description prop can now be a React.ReactNode rather than a string

Patch Changes

8.0.0

Major Changes

  • 371aecac: - Adds optional inputValue and onInputChange props to Combobox. These props are used to control the value of the inner text input (not the selected combobox value itself).

    • onChange callback now fires when the input is blurred and the input contains a valid selection value.

Patch Changes

7.2.0

Minor Changes

  • 0eba26c5: Combobox onChange callback now receives a 2nd argument. Use this argument to determine what value was inserted or deleted from a multiselect value. JIRA Ticket

    Example:

    <Combobox
      multiselect
      value={['apple', 'banana']}
      onChange={(val, diff) => {
        console.log(value); // ['apple']
        console.log(diff); // { diffType: 'delete', value: 'banana' }
      }}
    />
    interface DiffObject {
      diffType: 'insert' | 'delete';
      value: string | Array<string>;
    }

Patch Changes

7.1.0

Minor Changes

  • e7d206e6: Exports ComboboxOptionProps & ComboboxGroupProps. Internal refactor of type file organization.

7.0.1

Patch Changes

7.0.0

Major Changes

  • 9a728c7b: Replaces internal Chip component with new LG Chip component and exposes an upgraded TruncationLocation object which capitalizes the first letter of each key. Instead of referring to it as TruncationLocation.end, it will now be represented as TruncationLocation.End.

Patch Changes

6.0.15

Patch Changes

6.0.14

Patch Changes

6.0.13

Patch Changes

6.0.12

Patch Changes

6.0.11

Patch Changes

6.0.10

Patch Changes

6.0.9

Patch Changes

  • e8ef95e6: Updates disabled styles

6.0.8

Patch Changes

  • 2603d7ac: Component props now properly inherit from PopoverProps interface

6.0.7

Patch Changes

6.0.6

Patch Changes

6.0.5

Patch Changes

  • 63b2deb0b: Upgrade button to v20.1.1
  • Updated dependencies [63b2deb0b]

6.0.4

Patch Changes

6.0.3

Patch Changes

  • 78d36936d: Combobox tooltips receive same zindex as Combobox menu
  • Updated dependencies [6a3f03fd2]

6.0.2

Patch Changes

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

6.0.1

Patch Changes

6.0.0

Major Changes

  • 77320a6b8: - Adds new size variants, small and xsmall.
    • Removes truncation from chips when overflow is set to scroll-x. Chips do not need truncation since consumers can scroll horizontally to read the text.
    • Sets a max height of 3 rows to the input when overflow is expand-y. An overflow shadow is added to indicate there is a scroll.
    • Warning icon that appears when state='error' is now positioned to the left of the caret or clear icon. Previously it replaced the caret icon.

Minor Changes

  • 77320a6b8: - Adds onClick and description prop to ComboboxOption

Patch Changes

  • 77320a6b8: Switch to useAutoScroll hook to auto scroll the focused option
  • d9d8f770d: Updates disabled styles
  • ce0fcb3f6: Excludes children from story controls
  • 77320a6b8: Fix padding discrepancy between Combobox, Select, Text Input, and Number Input
  • Updated dependencies [55d33e435]
  • Updated dependencies [77320a6b8]
  • Updated dependencies [07db42330]
  • Updated dependencies [55d33e435]
  • Updated dependencies [cf00160ec]
  • Updated dependencies [ce0fcb3f6]
  • Updated dependencies [111b680c5]
  • Updated dependencies [77320a6b8]

5.0.11

Patch Changes

5.0.10

Patch Changes

5.0.9

Patch Changes

  • 2e8a572db: Internal refactoring. Adds input-option as a dependency
  • Updated dependencies [2e8a572db]
  • Updated dependencies [4ccc353e7]
  • Updated dependencies [4ccc353e7]

5.0.8

Patch Changes

  • 95eeb5a06: Spread ...rest to ComboboxOption
  • d58af1054: Fixes bug where clicking the clear icon button triggered the menu to reopen.
  • Updated dependencies [0541bd776]
  • Updated dependencies [ec2a3d66d]
  • Updated dependencies [ec2a3d66d]

5.0.7

Patch Changes

5.0.6

Patch Changes

5.0.5

Patch Changes

  • c4eb3ec26: Removes use of uiColors from component
  • Updated dependencies [d8c589d35]
  • Updated dependencies [703db871f]

5.0.4

Patch Changes

  • 4215ef424: Update some PropTypes to use oneOfType instead of oneOf. Also downgrades Chalk package.
  • Updated dependencies [75f26afbc]
  • Updated dependencies [95bd93ef9]
  • Updated dependencies [3bb4b7506]
  • Updated dependencies [a0d6638c4]

5.0.3

Patch Changes

5.0.2

Patch Changes

  • 38181cc1d: Update to consume darkMode from useDarkMode. Some components were setting darkMode = false as a default which would override the default value provided by the LeafyGreenProvider.
  • Updated dependencies [38181cc1d]

5.0.1

Patch Changes

  • 1a335d0b2: Migrate component internals to check for glyphs explicity, rather than for Icon components as well
  • ed0e425e5: Adds polished as an explicit dependency
  • 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]

5.0.0

Patch Changes

4.0.1

Patch Changes

4.0.0

Patch Changes

3.1.1

Patch Changes

3.1.0

Minor Changes

  • 3690df49: Updates TypeScript annotations, type structures and export format of some components
  • 58a5a05e: - Ensures the combobox does not open on initial focus. The menu should only open when clicked, or a relevant key is pressed when the input is focused.
    • Opens the menu on Enter key press if the menu is closed.

Patch Changes

3.0.1

Patch Changes

3.0.0

Major Changes

  • 2ff9ac32: Removes Overflow.ExpandX option.

    Overflow.ExpandX has always been an edge case, and is causing some issues with styling. Instead of increasing the complexity of the component to account for this edge case, we are removing this option.

    In most cases the x direction will be more space-limited and not many folks will opt to use this option. And if they do use expand-x, it's inherently limited to the size of the container/window and we'll need to restrict the width regardless. Just providing scroll-x and expand-y overflow options will cover most use cases.

Patch Changes

  • 090bd806: Fixes broken button styles in Combobox Chip. Reduces inline padding when overflow === 'scroll-x'. Flags Overflow.ExpandX as deprecated. Will be removed in the next major release.
  • Updated dependencies [19a62173]
  • Updated dependencies [30e038a3]

2.0.2

Patch Changes

  • bf320048: Updates the highlighting function (wrapJSX) to ensure all values are accepted, including regex special characters
  • bf320048: Adds missing leafygreen-provider as a peer dependency
  • Updated dependencies [65c86281]
  • Updated dependencies [4ad8cbc0]
  • Updated dependencies [9cb53590]
  • Updated dependencies [bac1e809]
  • Updated dependencies [bac1e809]
  • Updated dependencies [9dafe83a]

2.0.1

Patch Changes

  • 5f82468e: Updates lodash imports in combobox. Lodash functions are now imported individually to reduce bundle size
  • Updated dependencies [13a4adcc]

2.0.0

Major Changes

  • a0beace8: Updates Combobox for visual refresh. Adds Dark Mode

Patch Changes

1.2.2

Patch Changes

  • fad2b287: Fixes a bug where occasionally the max menu height would be set to 0 if a ref was left unset

1.2.1

Patch Changes

1.2.0

Minor Changes

  • 8ab46ed4: Adds Large size variant to Combobox. Additionally, restores legacy font in Label & Description
  • d241af9e: Adds a disabled prop to ComboboxOptions. Note, disabled options will still be rendered in the menu, but not selectable

Patch Changes

  • d5c12b77: Updates filtering behavior. Now when opening the menu all options will be displayed, regardless of whether a selection has already been made
  • a5d19177: Updates backdrop click behavior to match native <select>. Now, when clicking away from an open menu to close it, the Combobox will retain focus and no click handlers should fire on clicked elements until the menu is closed
  • 8f7f8555: Updates combobox focus ring behavior. The combobox will now display a focus ring whenever the user is able to type in thy combobox. The outer focus ring will not render if a chip or the clear button is focused.
  • 4f2ff237: - Updates min-width of the input to fit all characters (previously wide characters would be cut off).
    • Updates text wrapping of menu items so long unbroken strings (like ids) won't overflow, but wrap.
  • d241af9e: Restores menu font to legacy Akzidenz font
  • 6792bc44: Refactors Combobox and Select to use the new useAvailableSpace hook to calculate the max menu height
  • 266e0d8e: Ensures the focus remains in the combobox when a chip is removed. Focus is set to either the input, or the next chip to the right, whichever is relevant
  • 422dbfcd: Adds additional tests for internal Combobox utilities
  • Updated dependencies [1356d50d]
  • Updated dependencies [6a89bc29]
  • Updated dependencies [fd2f6de0]
  • Updated dependencies [6792bc44]
  • Updated dependencies [96d1ff9c]
  • Updated dependencies [422dbfcd]
  • Updated dependencies [9ff90d4b]

1.1.0

Minor Changes

  • e9c39305: - Reduces min-width of combobox down to 24px

Patch Changes

  • a526ac52: Adds @leafygreen-ui/tokens and @leafygreen-ui/tooltip to dependencies
  • e9c39305: Updates highlighting function to fix a bug where some text would be duplicated
    • Fixes left padding when overflow="scroll-x"
    • Clarifies wording for initialValue prop docs
  • Updated dependencies [e630a889]
  • Updated dependencies [2670e4db]
  • Updated dependencies [6c12e85a]

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

  • e8f1a97: - Updates focus behavior, allowing users to re-open the menu with the mouse after making a selection
    • Adds a warning if multiselect and value props don't align
    • Fixes a bug where long display names would get truncated early
    • Fixes a bug where the space bar wouldn't type a space character
    • Fixes a bug where some characters could not be typed when a value prop was passed in
    • Updates hooks dependency to ^7.2.0
  • Updated dependencies [e8f1a97]

1.0.0

Major Changes

  • 548ca2c: - Release Combobox as v1
    • Adds standard popover props: usePortal, popoverZIndex, popoverClassName, portalContainer, and scrollContainer.
    • Fixes issue where clicking on elements within a Combobox option wouldn't select that option.