Releases: tailwindlabs/headlessui
Releases · tailwindlabs/headlessui
@headlessui/[email protected]
Fixes
- Ensure that you can't use Enter to invoke the Switch
- Fix outside click refocus bug (#114)
- Prevent scrolling when refocusing items
- Ensure
Switchhastype="button"(#192) - Fix
useId()hook returningundefinedon the client - Fix
disablednot working when inside a disabled fieldset (#202) - Trigger "outside click" behaviour on mousedown (#212)
- Ensure the
activeMenuItem is scrolled into view - Ensure valid Menu accessibility tree (#228)
Added
- Add Transition events (
beforeEnter,afterEnter,beforeLeaveandafterLeave) (#57) - Add render features + render strategy (
staticandunmount={true | false}) (#106)- Also changes the API of Transition component.
- We will now always render a
divby default (unless you change this using theas={...}prop). - The render function prop doesn't expose a
refanymore. - Adds
unmountprop to theTransitionandTransition.Childcomponents.
- We will now always render a
- Also changes the API of Transition component.
- Add displayName to all contexts (#175)
- Add
disabledprop toListboxitself, instead of theListbox.Button(#229)
Upgrade Path
We changed the API of the Transition component to be more inline with the other API's of the various components. We now always render a div for the Transition and Transition.Child component. If you want to use a render function, then we still render a div. The render function also used do expose a ref prop, which is now not the case anymore.
You can still use the as prop to change the underlying div to another element or component.
// From
<Transition
show={true}
enter=".."
enterFrom=".."
enterTo=".."
leave=".."
leaveFrom=".."
leaveTo=".."
>
{ref => (
<div ref={ref} className="these classes always apply">
<span>Child</span>
</div>
)}
</Transition>
// To (option 1) - Hoist attributes from the first child `div` to the `Transition` itself
<Transition
show={true}
enter=".."
enterFrom=".."
enterTo=".."
leave=".."
leaveFrom=".."
leaveTo=".."
className="these classes always apply"
>
<span>Child</span>
</Transition>
// To (option 2) - Add `as={Fragment}` to the `Transition` component.
<Transition
as={React.Fragment}
show={true}
enter=".."
enterFrom=".."
enterTo=".."
leave=".."
leaveFrom=".."
leaveTo=".."
>
<div className="these classes always apply">
<span>Child</span>
</div>
</Transition>@headlessui/[email protected]
- Add
Listboxcomponent - Add
Switchcomponent
@headlessui/[email protected]
- Add
Listboxcomponent - Add
Switchcomponent
@headlessui/[email protected]
- Fix an issue where you couldn't click on menu items that were links.
- Fix outside click behaviour. If you had multiple menu's, when menu 1 is open, menu 2 is closed and you click on menu button 2 it will open both menu's. This is now fixed.
- Ensure when using keyboard navigation we prevent the default behaviour.
@headlessui/[email protected]
- Fix outside click behaviour. If you had multiple menu's, when menu 1 is open, menu 2 is closed and you click on menu button 2 it will open both menu's. This is now fixed.
- Ensure when using keyboard navigation we prevent the default behaviour.
@headlessui/[email protected]
- Fix issue where button
MenuIteminstances didn't properly fire click events - Don't pass
disabledprop through to children, only addaria-disabled
@headlessui/[email protected]
- Add tests for
onClickhandling that wasn't working properly in @headlessui/vue to ensure behavior stays the same in this library - Don't pass
disabledprop through to children, only addaria-disabled
@headlessui/[email protected]
- Initial release
@headlessui/[email protected]
- Initial release