Skip to content

Latest commit

 

History

History
1136 lines (830 loc) · 30.1 KB

CHANGELOG.md

File metadata and controls

1136 lines (830 loc) · 30.1 KB

@leafygreen-ui/select

12.1.6

Patch Changes

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

12.1.5

Patch Changes

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

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

12.1.4

Patch Changes

12.1.3

Patch Changes

  • 9c40e5335: Exports getTestUtils and LGIDS_SELECT. These were mistakenly excluded in its initial release
  • Updated dependencies [157146b5c]

12.1.2

Patch Changes

  • 9c2bcf4e8: Revert changes to disabled options from this PR.

12.1.1

Patch Changes

  • cfa830701: Updates Option

    • Removes style overrides in favor of consistent option styles from InputOptionContent

    Updates ListMenu

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

  • Updated dependencies [cfa830701]

  • Updated dependencies [cfa830701]

  • Updated dependencies [db2d1d12c]

  • Updated dependencies [cfa830701]

12.1.0

Minor Changes

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

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

    LG-3988

Patch Changes

12.0.0

Major Changes

  • c406ab85: LG-4138

    1. Updated styling:
    • updated spacing for 'xsmall', 'small', and 'large' size variants
    • updated placeholder text color
    • removed validation icon from inside the input
    1. Added default errorMessage of 'This input needs your attention'

    2. Added valid state variant and successMessage prop

    • successMessage will render a default of 'Success' and can be customized
    • successMessage will only render when state=valid

Patch Changes

11.3.2

Patch Changes

11.3.1

Patch Changes

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

11.3.0

Minor Changes

  • c3906f78: - Exports getTestUtils, a util to reliably interact with LG Select in a product test suite. For more details, check out the README LG-4129
    • Exports the constant, LGIDS_SELECT which stores data-lgid values.
    • Removes role="presentation" from WarningIcon

Patch Changes

11.2.3

Patch Changes

11.2.2

Patch Changes

11.2.1

Patch Changes

11.2.0

Minor Changes

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

Patch Changes

11.1.2

Patch Changes

  • ffd11f24: - Passes onEnter* and onExit* props to internal Popover component
    • Adds tests to test onEnter* and onExit* callbacks
    • Adds tests to test PopoverContext
  • Updated dependencies [9b7a8236]
  • Updated dependencies [7f38e78a]
  • Updated dependencies [ffd11f24]
  • Updated dependencies [ffd11f24]
  • Updated dependencies [ffd11f24]
  • Updated dependencies [ffd11f24]
  • Updated dependencies [ffd11f24]
  • Updated dependencies [ffd11f24]
  • Updated dependencies [ffd11f24]

11.1.1

Patch Changes

  • 969b0d45: Adds stopPropagation and preventDefault to prevent menus from reopening when using usePortal = false and selecting an option with space/enter.

11.1.0

Minor Changes

  • ace9cc03: Allows Select to accept a ref

Patch Changes

11.0.1

Patch Changes

11.0.0

Major Changes

  • c5d95794: - Adds description prop to Option
    • Refactor Option to use internal InputOption component
    • Internally removes theme from SelectContext by opting to enclose Select within the LeafygreenProvider and consuming theme from there. This adjustment enables nested children to access the dark mode context provided by LeafygreenProvider as well.
    • Reorganizes internal file structure

Patch Changes

10.3.18

Patch Changes

  • d2c1ec53: Updates Button to remove pointer-events: none styles from it's inner container. This allows the Select component to work as intended when using usePortal = false.
  • Updated dependencies [d2c1ec53]

10.3.17

Patch Changes

  • d70768a7: Add a 1px gray.light2 border to light mode dropdowns and a 1px gray.dark3 border to dark mode dropdowns to match Figma specs.

10.3.16

Patch Changes

10.3.15

Patch Changes

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

10.3.14

Patch Changes

10.3.13

Patch Changes

10.3.12

Patch Changes

10.3.11

Patch Changes

10.3.10

Patch Changes

  • e8ef95e6: Updates disabled styles
  • Updated dependencies [e8ef95e6]

10.3.9

Patch Changes

10.3.8

Patch Changes

10.3.7

Patch Changes

10.3.6

Patch Changes

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

10.3.5

Patch Changes

10.3.4

Patch Changes

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

10.3.3

Patch Changes

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

10.3.2

Patch Changes

  • ce0fcb3f6: Excludes children from story controls
  • 77320a6b8: Fix padding discrepancy between Combobox, Select, Text Input, and Number Input
  • Updated dependencies [55d33e435]
  • Updated dependencies [07db42330]
  • Updated dependencies [55d33e435]
  • Updated dependencies [cf00160ec]
  • Updated dependencies [ce0fcb3f6]
  • Updated dependencies [111b680c5]
  • Updated dependencies [77320a6b8]

10.3.1

Patch Changes

10.3.0

Minor Changes

  • fb47557dd: Adds prop dropdownWidthBasis which determines if the dropdown width should be the width of the menu trigger or as wide as the widest option.

Patch Changes

10.2.3

Patch Changes

10.2.2

Patch Changes

  • fc85e3f7a: Fix README formatting
  • Updated dependencies [82e320ed4]
  • Updated dependencies [2e8a572db]
  • Updated dependencies [4ccc353e7]
  • Updated dependencies [4ccc353e7]

10.2.1

Patch Changes

10.2.0

Minor Changes

  • a089bf899: Allows aria-label as acceptable aria label prop in Select

Patch Changes

  • c1c259036: Exporting types

10.1.1

Patch Changes

  • c82ed35d5: Removes useUsingKeyboardContext from component, in favor of &:focus-visible
  • b24b21462: Storybook: Updates story files to be on par with existing mongodb.design examples
  • Updated dependencies [050f1f8a9]
  • Updated dependencies [741cdd408]
  • Updated dependencies [866144167]
  • Updated dependencies [c82ed35d5]
  • Updated dependencies [b24b21462]

10.1.0

Minor Changes

  • 7ca2da507: Updates mobile styles query. We now trigger mobile styles on max-width: 768px, hover: none and either pointer: coarse or pointer: none

Patch Changes

  • 696adb1b6: Makes internal check for presence of glpyh within Option more explicit, and inline with how we perform similar checks in other components
  • ae5421cf6: Updates components to use internal transition tokens
  • Updated dependencies [ae5421cf6]
  • Updated dependencies [ed0e425e5]
  • Updated dependencies [4b4c2d27d]
  • Updated dependencies [6a266b813]
  • Updated dependencies [1a335d0b2]
  • Updated dependencies [ba97d1ef7]
  • Updated dependencies [ae5421cf6]

10.0.0

Patch Changes

9.0.0

Major Changes

  • f2d63a60: Removes leafygreen data attributes (prefixed with data-leafygreen-ui-), and replaces them with deterministic classNames (prefixed with lg-ui-)

Patch Changes

8.0.0

Patch Changes

7.1.2

Patch Changes

  • 24921fd2: Fix dependency range in package.json

7.1.1

Patch Changes

7.1.0

Minor Changes

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

Patch Changes

7.0.2

Patch Changes

7.0.1

Patch Changes

  • 7409c9db: Remove isDeselection from InternalOption
  • Updated dependencies [22128084]

7.0.0

Major Changes

  • 5aba12f1: - Updates 'Select' for dark mode refresh.
    • Adds baseFontSize prop which determines the base font size if sizeVariant is set to default.
    • Consumes darkMode from the LeafyGreenProvider if the darkMode prop is not set.

Patch Changes

6.1.0

Minor Changes

  • 828c895d: Passes through all valid button, li and div attriutes (including data-* attributes) to Select, Option and OptionGroup respectively

Patch Changes

  • b22cc41f: Fixes a bug where long values, when selected, would overflow outside the Select trigger.
  • Updated dependencies [13a4adcc]

6.0.0

Patch Changes

5.0.3

Patch Changes

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

5.0.2

Patch Changes

  • 96d1ff9c: Updates to propTypes, TSDocs, and Storybook controls
  • 6792bc44: Refactors Combobox and Select to use the new useAvailableSpace hook to calculate the max menu height
  • Updated dependencies [6a89bc29]
  • Updated dependencies [fd2f6de0]
  • Updated dependencies [6792bc44]
  • Updated dependencies [96d1ff9c]
  • Updated dependencies [422dbfcd]
  • Updated dependencies [9ff90d4b]
  • Updated dependencies [8d12b918]
  • Updated dependencies [86a7f3c3]

5.0.1

Patch Changes

  • efa9e8f4: Exporting / renaming props for Storybook
  • 2670e4db: Expects glyph prop to be of type LGGlyph.Element
  • Updated dependencies [646c00f7]
  • Updated dependencies [2670e4db]

5.0.0

Major Changes

Patch Changes

4.0.2

Patch Changes

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

4.0.1

Patch Changes

4.0.0

Major Changes

  • 8457f92: Updates select in line with Visual Brand refresh

Patch Changes

3.1.0

Minor Changes

  • 70f3c2c: Added error state to select component

Patch Changes

3.0.8

Patch Changes

  • 9d0bcd4: - Resolves an issue where a Select component would break keyboard navigation with Tab in a form
    • Prevents page from scrolling when using arrow keys to navigate a Select menu

3.0.7

Patch Changes

3.0.6

Patch Changes

  • cd4f9a27: Fixes a bug where the Select menu would not appear in the correct position in the case where there is limited space below the trigger button. Also enforces a max-height of 274px on the Select menu

3.0.5

Patch Changes

3.0.4

Patch Changes

  • 60262a25: Removes reference to null element.
  • Updated dependencies [b408e8a7]

3.0.3

Patch Changes

3.0.2

Patch Changes

  • 1ffbb84c: Fixes bug where a ref's clientHeight was being referenced prior to the ref being set.

3.0.1

Patch Changes

  • 650f6334: Updates semantic HTML to help define width properties in Button and Select components
  • Updated dependencies [faeb0ce0]
  • Updated dependencies [54daf9a4]

3.0.0

Minor Changes

  • 857a680a: Adds support for positioning popover elements relative to elements within a scroll container other than the window. Adds support for setting z-index on popover elements with the zIndex prop.

Patch Changes

2.1.0

Minor Changes

  • 559ceb15: Support a prop to disable the option to deselect

2.0.5

Patch Changes

  • 83fbfa53: Updates styles for a focused Option component to improve the contrast ratio.

2.0.4

Patch Changes

2.0.3

Patch Changes

2.0.2

Patch Changes

  • 139694ea: Removes role="combobox" from Select dropdown

2.0.1

Patch Changes

2.0.0

Major Changes

  • cc921a0e: Consuming applications can now set the width of the select dropdown by passing a value to width through the className prop.

1.1.4

Patch Changes

  • d85f65de: Adds accessible name to ARIA input field

1.1.3

Patch Changes

1.1.2

Patch Changes

  • bf8b83e1: Sets aria role="presentation" on Caret in the component's menu button
  • Updated dependencies [bf8b83e1]
  • Updated dependencies [dca5605b]

1.1.1

Patch Changes

1.1.0

Minor Changes

  • 102ebc1e: - Adds a usePortal prop
    • Explicitly defines font-family for text elements within component
    • Sets label and description display properties to block

Patch Changes

  • 9812c9c9: Fixes bug where when a non-centered Option is clicked, the component will scroll to center that element instead of being selected. Now, when an element is clicked, it becomes selected. When opening the dropdown later, the selected item should then be centered.
  • Updated dependencies [2daf1808]
  • Updated dependencies [a6360ea1]

1.0.0

Major Changes

  • 0963164a: Initial release of Select component