This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @headlessui/react from 1.4.2 to 1.6.1.
![merge advice](https://app.snyk.io/badges/merge-advice/?package_manager=npm&package_name=@headlessui/react&from_version=1.4.2&to_version=1.6.1&pr_id=746aacab-84f9-4b6e-9849-527e726cff70&visibility=true&has_feature_flag=false)
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
- The recommended version is **4 versions** ahead of your current version.
- The recommended version was released **25 days ago**, on 2022-05-03.
Release notes Package name: @headlessui/react
Prefer incoming open prop over OpenClosed state (#1360)
Added
Add classic form submission compatibility via new hidden inputs (#1214)
Add multiple value support to Listbox and Combobox components (#1243, #1355)
Add support for clearing the value of a Combobox (#1295)
Add DialogPanel to resolve issues when scrolling long dialogs that use DialogOverlay (#1333)
Changes that might affect you
Migrating from DialogOverlay to DialogPanel
In previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the DialogOverlay component, so as long as your overlay was rendered behind your panel, clicking outside the panel would close the dialog.
This created an issue with scrollable dialogs, because it became easy to accidentally position your overlay on top of the scrollbar, which made it impossible to click the scrollbar without closing the dialog. You also couldn't scroll the dialog when your mouse was hovering over the overlay â only when your mouse was hovering over the actual panel.
We've fixed this in Headless UI v1.6 by adding a dedicated DialogPanel component, and changing how "click outside" is handled. Now, if you're using a DialogPanel, the dialog is closed any time you click any element outside of it, rather than closing only when a DialogOverlay is explicitly clicked.
If you're using DialogOverlay and not using DialogPanel, everything will continue to work exactly as it did before (including the bug I described above) to preserve backwards compatibility, but we highly encourage you to migrate to using DialogPanel, and to stop using DialogOverlay, instead using a simple div element:
Read through the updated Dialog documentation for more examples of using DialogPanel.
Multiple value support for Listbox and Combobox
If you have been using the insiders build for the new multiple value support for the Listbox and/or Combobox component, then you will have to add a new multiple prop to those components to tell the component that you are using multiple values. Previously this was automatically detected based on whether you were passing an array to the value prop or not.
Compare
**Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.*
For more information:
đ§ [View latest project report](https://app.snyk.io/org/avanade/project/6057ad65-f47c-48b0-a103-f5c54b28be58?utm_source=github&utm_medium=referral&page=upgrade-pr)
đ [Adjust upgrade PR settings](https://app.snyk.io/org/avanade/project/6057ad65-f47c-48b0-a103-f5c54b28be58/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr)
đ [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/avanade/project/6057ad65-f47c-48b0-a103-f5c54b28be58/settings/integration?pkg=@headlessui/react&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades)
This PR was automatically created by Snyk using the credentials of a real user.
Snyk has created this PR to upgrade @headlessui/react from 1.4.2 to 1.6.1.
![merge advice](https://app.snyk.io/badges/merge-advice/?package_manager=npm&package_name=@headlessui/react&from_version=1.4.2&to_version=1.6.1&pr_id=746aacab-84f9-4b6e-9849-527e726cff70&visibility=true&has_feature_flag=false) :information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.- The recommended version is **4 versions** ahead of your current version. - The recommended version was released **25 days ago**, on 2022-05-03.
Release notes
Package name: @headlessui/react
Fixed
attrs
forCombobox
,Listbox
andTabsGroup
component (#1372)Fixed
Combobox
initially (#1148)Dialog
usage inTab
component (#1149)PopoverPanel
components (#1153)hover
scroll issue inListbox
,Combobox
andMenu
components (#1161)Listbox
,Combobox
andMenu
actions (#1168)ComboboxInput
when the value gets reset (#1181)item
/option
index onListbox
,Combobox
andMenu
components (#1184)Dialog
cycling (#553)Tab
on mouseup (#1192)focus()
fromListbox.Option
(#1218)ownerDocument
instead ofdocument
(#1158)el
from each component (#1230)Tab
andDialog
components (#1231)ComboboxInput
value (#1248)PopoverButton
(#1263)Dialog
component (#1268)Tab
(#1272)initialFocusRef
correctly (#1276)Combobox
(#1279, #1281)RadioGroup
,Switch
andCombobox
components (#1285)nullable
prop for Vue (2b109548b1a94a30858cf58c8f525554a1c12cbb)open
prop over OpenClosed state (#1360)Added
Listbox
andCombobox
components (#1243, #1355)Combobox
(#1295)DialogPanel
to resolve issues when scrolling long dialogs that useDialogOverlay
(#1333)Changes that might affect you
Migrating from
DialogOverlay
toDialogPanel
In previous versions of Headless UI, closing a dialog was handled by a click handler that lived on the
DialogOverlay
component, so as long as your overlay was rendered behind your panel, clicking outside the panel would close the dialog.This created an issue with scrollable dialogs, because it became easy to accidentally position your overlay on top of the scrollbar, which made it impossible to click the scrollbar without closing the dialog. You also couldn't scroll the dialog when your mouse was hovering over the overlay â only when your mouse was hovering over the actual panel.
We've fixed this in Headless UI v1.6 by adding a dedicated
DialogPanel
component, and changing how "click outside" is handled. Now, if you're using aDialogPanel
, the dialog is closed any time you click any element outside of it, rather than closing only when aDialogOverlay
is explicitly clicked.If you're using
DialogOverlay
and not usingDialogPanel
, everything will continue to work exactly as it did before (including the bug I described above) to preserve backwards compatibility, but we highly encourage you to migrate to usingDialogPanel
, and to stop usingDialogOverlay
, instead using a simplediv
element:Read through the updated Dialog documentation for more examples of using
DialogPanel
.Multiple value support for
Listbox
andCombobox
If you have been using the insiders build for the new multiple value support for the
Listbox
and/orCombobox
component, then you will have to add a newmultiple
prop to those components to tell the component that you are using multiple values. Previously this was automatically detected based on whether you were passing an array to thevalue
prop or not.Fixed
MenuItem
,ListboxOption
andRadioGroupOption
(#1045)esbuild
and TypeScript 4! (#1055)Added
Combobox
component (#1047, #1099, #1101, #1104, #1106, #1109)Commit messages
Package name: @headlessui/react
**Note:** *You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.* For more information: đ§ [View latest project report](https://app.snyk.io/org/avanade/project/6057ad65-f47c-48b0-a103-f5c54b28be58?utm_source=github&utm_medium=referral&page=upgrade-pr) đ [Adjust upgrade PR settings](https://app.snyk.io/org/avanade/project/6057ad65-f47c-48b0-a103-f5c54b28be58/settings/integration?utm_source=github&utm_medium=referral&page=upgrade-pr) đ [Ignore this dependency or unsubscribe from future upgrade PRs](https://app.snyk.io/org/avanade/project/6057ad65-f47c-48b0-a103-f5c54b28be58/settings/integration?pkg=@headlessui/react&utm_source=github&utm_medium=referral&page=upgrade-pr#auto-dep-upgrades)