All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
1.0.4 (2020-06-06)
1.0.3 (2020-06-04)
1.0.2 (2020-05-14)
- Fix
DialogDisclosure
focus on click on iOS Safari (8f54b0c)
1.0.1 (2020-05-13)
- Fix
Tabbable
not receiving focus on VoiceOver click (#644) (ea4b204) - Fix enter animation on
DisclosureContent
and derivative components (#645) (11f9687), closes #643
1.0.0 (2020-05-12)
- Fix
Composite
focus when inside conditionally renderedDialog
(1331ead) - Fix
Tabbable
elements preventing behaviors on mouse down (#641) (239eb56), closes #432 - Fix error on
TabPanel
when used withoutTab
s (5bd8bb1)
- Add
setVisible
method touseDisclosureState
(7896f2f) - Remove
undefined
props from props hooks and render props (d95c9e5) - Remove deprecated
Hidden
module (7a1cb99) - Remove deprecated
modal
prop fromDialog
(5d787b1) - Remove deprecated
stopId
prop (2ffe843) - Support nested
CompositeItem
s (#642) (64cf18b)
-
The deprecated
stopId
prop has been removed from all theCompositeItem
derivative components, such asTab
,Radio
,ToolbarItem
andMenuItem
.On
Tab
, thestopId
prop has been replaced byid
, and it's no longer required, just like on the otherCompositeItem
components:- <Tab stopId="id" /> + <Tab id="id" /> // or + <Tab />
On
TabPanel
, thestopId
prop has been replaced bytabId
, and it's no longer required (the relationship betweenTab
andTabPanel
is now automatically inferred by their order in the DOM, learn more):- <TabPanel stopId="tab-id" /> + <TabPanel tabId="tab-id" /> // or + <TabPanel />
On all the other
CompositeItem
derivative components (Radio
,ToolbarItem
andMenuItem
), the optionalstopId
prop has been replaced by the — also optional —id
prop:- <Radio stopId="id" /> + <Radio id="id" /> - <ToolbarItem stopId="id" /> + <ToolbarItem id="id" /> - <MenuItem stopId="id" /> + <MenuItem id="id" />
-
The deprecated
Hidden
module has been removed. UseDisclosure
instead.Before:
import { useHiddenState, Hidden, HiddenDisclosure } from "reakit/Hidden"; const hidden = useHiddenState(); <HiddenDisclosure {...hidden}>Disclosure</HiddenDisclosure> <Hidden {...hidden}>Hidden</Hidden>
After:
import { useDisclosureState, DisclosureContent, Disclosure, } from "reakit/Disclosure"; const disclosure = useDisclosureState(); <Disclosure {...disclosure}>Disclosure</Disclosure> <DisclosureContent {...disclosure}>Content</DisclosureContent>
-
The deprecated
modal
prop has been removed fromDialog
. Now you can only set it onuseDialogState
.Before:
const dialog = useDialogState(); <Dialog {...dialog} modal={false} />
After:
const dialog = useDialogState({ modal: false }); <Dialog {...dialog} />
1.0.0-rc.2 (2020-04-29)
- Ensure
undefined
doesn't override default tabIndex inDialog
(#638) (a6a87f4), closes #636 - Fix
Menu
issues on Safari (8d9f33c) - Fix hovering
MenuItem
withDialog
open closing the dialog (06c72ff) - Fix nested
Dialog
blocking parent auto focus when it's conditionally rendered (324395b)
- Make
CompositeItem
tabbable before they're registered (for example, on SSR) (dff1ba1)
- Reduce the number of renders on
Popover
/Tooltip
/Menu
(f554600)
1.0.0-rc.1 (2020-04-20)
- Add missing
setVirtual
action toCompositeState
reducer (965704c) - Fix
<Tabbable disabled focusable />
not focusing closest parent (b3dfb96) - Fix
Checkbox
activating twice on space key on Firefox (#625) (c4d5961), closes #368 - Fix
Composite
on IE11 (#609) (555b931) - Fix
CompositeItem
not receiving focus when clicking with Safari/VoiceOver (d3ba001) - Fix
Dialog
closing on Firefox when the window loses focus and get focused again (#620) (7c3119d), closes #619 - Fix
Menu
->Dialog
->Menu
behaving as a sub menu (#621) (9feb9c1) - Fix
Tooltip
when used withComposite
components (#623) (0b70f43) - Fix animated
Dialog
not being correctly focused with VoiceOver (#618) (db71535) - Fix click outside not closing all
Menu
(341a250) - Fix disabled
MenuButton
being activated when used as a menu item (6c31dab) - Fix falsy values on
Radio
not working (387e8d3), closes #607 - Fix nested
Dialog
not rendering correctly when the parent has a backdrop (ce766d5) - Fix nested modals when using VoiceOver/Safari (#608) (417b3b3)
- Fix submenu closing when trying to move into it (38f0c0b)
- Add experimental
unstable_timeout
option touseTooltipState
(#622) (5fe208f) - Hide
Tooltip
when pressingEscape
(#629) (d7f5e8c) - Remove experimental
IdGroup
component (1c73f02) - Replace
unstable_animated
byanimated
with improvements on the API (#616) (16f843f), closes #528
- This should affect only people who were using the
unstable_animated
API:DisclosureContent
and its derivative components don't addhidden
class anymore. You should now use[data-enter]
and[data-leave]
selectors. For more details, see Animating.
1.0.0-rc.0 (2020-03-30)
- Add
Clickable
component (#596) (6a9fca9) - Add
DisclosureContent
component (#554) (fd93b08) - Automatically check
Radio
on focus (#599) (6edc689) - Remove
Provider
fromreakit/utils/Provider
(134f7eb) - Select the first
Tab
by default and don't requirestopId
prop (#597) (528b016) - Support
rtl
onToolbar
(#601) (2811071)
-
The first
Tab
is now selected by default. There's no need to passselectedId
touseTabState
anymore.If you're already using
selectedId
to select a tab in the initial render, you don't need to change anything as this still works. But, if you want to render tabs with none selected, you should now passnull
toselectedId
:// if you're already using selectedId, there's no need to change anything const tab = useTabState({ selectedId: "tab-1" });
// when there's no tab selected by default, you now need to explicitly specify it - const tab = useTabState(); + const tab = useTabState({ selectedId: null });
-
Most users will not be affected by this, but
stops
,register
andunregister
on the returned object of state hooks have been renamed toitems
,registerItem
andunregisterItem
, respectively.const tab = useTabState(); - tab.stops.map(...); + tab.items.map(...); - tab.register(...); + tab.registerItem(...); - tab.unregister(...); + tab.unregisterItem(...);
-
Tabbable
doesn't trigger a click on the element when pressing Enter and Space anymore. If you need that feature, useClickable
instead.Before:
import { Tabbable } from "reakit/Tabbable"; <Tabbable />
After:
import { Clickable } from "reakit/Clickable"; // Tabbable is not going away, it just doesn't represent a clickable element // anymore <Clickable />
-
Importing
Provider
fromreakit/utils
is not supported anymore. It should be imported fromreakit/Provider
orreakit
. -
DisclosureRegion
has been renamed toDisclosureContent
.
1.0.0-beta.16 (2020-02-10)
- Check for classList existence before use (#540) (92a5fa1), closes #537
- Fix
transitionEnd
capturing children transitions (#548) (4cf1eaa), closes #531 - Fix inconsistent
Tooltip
behavior on disabledTabbable
(#552) (d507772), closes #471 - Fix portaled components without dimensions in the first render (#547) (8783aec), closes #532
- Remove confusing
rover.unregister()
warning (#549) (2a72e35), closes #488
- Add
Disclosure
module and deprecateHidden
(#541) (4397ab0) - Add
MenuButton
and deprecateMenuDisclosure
(#544) (f5fa914) - Upgrade to popper.js v2 (#545) (55f7c21)
- The internal
popper.js
dependency has been upgraded tov2
. The stablePopover
API remains the same. But, while this change has been tested with the most common use cases, there may be some edge cases wherePopover
andMenu
(which usesPopover
underneath) may behave differently.
1.0.0-beta.15 (2020-02-05)
- Fix parent
Dialog
closing when clicking on nestedDialogBackdrop
(#530) (e8bc3be), closes #529 - Fix warning on deprecated
Provider
import (1cd9421) - Prevent clicks when pressing Enter/Space with meta key on non-native
Tabbable
(#534) (7f0c8cf) - Stop converting
File
objects into plain objects when submittingForm
(5899d8d), closes #415
- Add
modal
state touseDialogState
(#535) (f3953ad), closes #404 - Add
unstable_offset
option tousePopoverState
(#527) (301fbca), closes #511 - Render nested
Dialog
on a portal outside of its parentDialog
(#533) (9f0a5cc) - Replace
unstable_wrap
bywrapElement
(#538) (17a12fb) - reakit-utils: Add
getActiveElement
method (a252fcd)
- This should affect a very small number of people: the way nested modal
Dialog
s are rendered has been changed. To avoid styling issues, nested dialogs are rendered outside of the parentDialog
(but still inside the parentPortal
).
1.0.0-beta.14 (2019-12-18)
- Fix
Dialog
closing when clicking inside it and dragging outside (#510) (7d580e6), closes #506 - Fix
Portal
withnull
context on client (#514) (619adfd), closes #513 - Fix components not rendering
id
prop (#520) (866db9d), closes #518
1.0.0-beta.13 (2019-11-22)
- Fix
form.reset()
not reverting array fields to initial state (#503) (43ca6a8), closes #502 - Prevent an unnecessary re-render on
Button
(e39842d) - Standardize precedence when
options
andhtmlProps
conflict (#501) (5b8e02f) - Stop ignoring
checked
andvalue
props passed as html props touseCheckbox
(#500) (c8cb0bb), closes #465 - Stop persisting
onChange
event onCheckbox
(#499) (fd4a694), closes #498
-
When passing a custom
onChange
prop toCheckbox
,event.target.checked
will no longer return a different value than when using the native<input type="checkbox">
element.Before:
<Checkbox onChange={event => setChecked(!event.target.checked)} />;
After:
<Checkbox onChange={event => setChecked(event.target.checked)} />;
1.0.0-beta.12 (2019-11-14)
- reakit-system: Replace
useCompose
byuseComposeOptions
oncreateHook
(#493) (50fd7df) - Add
baseId
option touseHiddenState
and derivative hooks (837aa58) - Add
baseId
option touseRoverState
and derivative hooks (#494) (42e9dd0) - Add experimental
Id
module (#492) (5d87e99)
1.0.0-beta.11 (2019-11-08)
- Fix
Tabbable
preventing click after enabling it (#481) (6b58a34), closes #480 - Fix
Tabbable
preventing space and enter keys onFormInput
(3f49d6b)
1.0.0-beta.10 (2019-11-02)
- Fix
MenuItemCheckbox
andMenuItemRadio
not working (#473) (11b7bfa), closes #472 - Fix
Rover
trying to focus itself again when it receives focus (#476) (b27194e) - Fix
Tabbable
focus behavior on Mac Safari/Firefox (#458) (8306241) - Stop adding
type="button"
onButton
by default (#474) (82b7279)
1.0.0-beta.9 (2019-10-12)
- Add a
useIsomorphicEffect
hook to allow proper SSR rendering (#461) (47434b2), closes #438 - Fix
PopoverArrow
ignoringsize
prop (#455) (5f51e39), closes #454 - Fix nested
Dialog
s not working with VoiceOver (#457) (208bcb6) - Make
Menu
run without menu state props (#459) (5992362) - Prevent scrollbar flickering when opening
Dialog
(#450) (d84fd10), closes #449
1.0.0-beta.8 (2019-09-25)
- Fix
MenuItem
ignoringref
prop (19119ca) - Fix focus not going onto
MenuDisclosure
after closing aMenu
opened with down arrow (01f83ba) - Replace IE11 incompatible DOM features (#443) (8837557), closes #360
- Add
gutter
option tousePopoverState
(#442) (5e9bc21) - Add experimental
unstable_portal
prop toTooltip
(#440) (1b2d5dd) - Add experimental
unstable_scheduleUpdate
function tousePopoverState
return (still undocumented) (b40a4da)
1.0.0-beta.7 (2019-09-19)
- Fix
Dialog
initial focus (#433) (a0916c7) - Fix
Dialog
withtabIndex={0}
not being included in the tab order (#426) (bfb1d05) - Fix
FormSubmitButton
ignoringdisabled
prop (#439) (bbfdfdd), closes #437
- Accept multiple
DialogDisclosure
s for a singleDialog
(#427) (0cb7432) - Add
MenuBar
component (#436) (3d13c33) - Export
PortalContext
(#431) (c5a780a), closes #428
-
StaticMenu
has been replaced byMenuBar
.Before:
import { useMenuState, StaticMenu } from "reakit/Menu"; const menu = useMenuState(); <StaticMenu {...menu} />;
After:
import { useMenuBarState, MenuBar } from "reakit/Menu"; const menuBar = useMenuBarState(); // useMenuState can be used here as well <MenuBar {...menuBar} />;
1.0.0-beta.6 (2019-08-25)
- Fix
Checkbox
event.target.checked
value insideonChange
event (#419) (75063fc), closes #393 - Fix
FormInput
astextarea
caret position when focusing (#420) (d8e7af3), closes #418 - Fix
useRoverState
and its derivatives including all props in the return object (987d16e) - Remove erroneous
React.LiHTMLAttributes
type fromToolbarItemHTMLProps
(0cb6e66)
- reakit-utils: Move
tabbable
internal module toreakit-utils
package (b84acce) - Add new
MenuArrow
component (#422) (731a376) - Add support for
HiddenDisclosure
to control multipleHidden
components (#423) (bdfbd74) - Support nested
Tabbable
andRover
components (#417) (ee9623e), closes #376
1.0.0-beta.5 (2019-08-12)
- Fix typings (29c4456)
- Fix
FormGroup
andFormRadioGroup
not receiving focus whenForm
has been submited with errors (59adc8b) - Fix
FormSubmitButton
not considering elements other than inputs as invalid fields (c4f688a) - Fix
Hidden
not settingunstable_animating
tofalse
while visible (#410) (6d5827c), closes #407 - Fix
Menu
preventing default behavior when pressing ASCII keys on elements other thanMenuItem
(cacb978) - Fix
Tooltip
error whenvisible
is initially set totrue
(#409) (c132e56), closes #408 - Fix empty array values being filtered prematurely before
useFormState
'sonValidate
(6052829)
- Support
onSubmit
andonValidate
functions to be updated between renders inuseFormState
(#411) (f576db1), closes #400
1.0.0-beta.4 (2019-06-27)
- Always focus
Rover
when callingrover.{move|first|last}()
(#389) (f346df4) - Fix missing React Hooks deps (b08b62c)
- website: Hide state hook props from docs (#390) (fdac912)
- Add new
size
prop toPopoverArrow
andTooltipArrow
(11a6df1), closes #383
1.0.0-beta.3 (2019-06-23)
- Add missing deps to
usePopoverState
effect (d44df81) - Make
Menu
work properly withunstable_animated
(#386) (b96c466) - Remove false positive warning from
Dialog
(#385) (5334bd4)
- Utils aren't exported by
reakit
orreakit/utils
anymore. Import them from thereakit-utils
package instead. - System utils aren't exported by
reakit
orreakit/system
anymore. Import them from thereakit-system
package instead. Provider
isn't exported byreakit/utils
orreakit/utils/Provider
anymore. Import it fromreakit
orreakit/Provider
instead.
1.0.0-beta.2 (2019-06-01)
- Fix
Checkbox
toggling twice on space bar key on Firefox (#369) (27e9b63), closes #368 - Remove
async
/await
so users don't need regenerator-runtime (#365) (9c6d41a) - Stop adding
role="button"
onButton
by default (574e2a9)
- Add
unstable_animated
option touseHiddenState
and its derivatives (#370) (4ba7f61) - Enable conditional render on
Hidden
components with render props (#371) (70322c2) - Remove z-index and extra styles from
Dialog
andDialogBackdrop
(#372) (5edd0d8), closes #366
-
Removed extra styles from
Dialog
andDialogBackdrop
and all their derivative components. Also removed defaultz-index
fromTooltip
. These styles have been moved to thereakit-system-bootstrap
package. If you're not using this system package, you should apply the styles manually.Before:
<DialogBackdrop /> <Dialog /> <Popover /> <Menu /> <Tooltip />
After:
<DialogBackdrop style={{ position: "fixed", top: 0, right: 0, bottom: 0, left: 0, zIndex: 998 }} /> <Dialog style={{ zIndex: 999 }} /> <Popover style={{ zIndex: 999 }} /> <Menu style={{ zIndex: 999 }} /> <Tooltip style={{ zIndex: 999 }} />
1.0.0-beta.1 (2019-05-21)
- Avoid infinite loop when using render props composition (8256330)
- Fix
Provider
not working withoutunstable_system
prop (37862fb) - Stop flipping
orientation
onSeparator
(52a0e63)
- Set
display: none
onHidden
when itsvisible
prop is set tofalse
(73d6cd2)
Separator
doesn't flip itsorientation
anymore. If you passorientation="vertical"
it'll renderaria-orientation="vertical"
now.
1.0.0-beta.0 (2019-05-13)
- Fix
Tabbable
erroneously preventingonMouseDown
on inputs (10af438) - Fix nested
Dialogs
not closing when parent dialogs close (84d1e16)
1.0.0-alpha.4 (2019-05-12)
- Fix
Menu
not correctly moving with arrow keys (3b55b85) - Fix
PopoverArrow
styles (a90d71f) - Fix
Tabbable
not responding toEnter
key (24b54c3) - Fix arrow keys closing
Dialog
opened byMenu
(c3fdbcd) - Prevent buggy scroll on focus when showing Dialog (e0a328b)
- Remove the need of double click on
MenuItem
on mobile (73b920e) - Render
VisuallyHidden
asspan
instead ofdiv
since it could be placed in an inline element (ac24c08)
- Add
state
andsetState
props toCheckbox
andRadio
(5902ab1) - Add
unstable_animated
prop toHidden
(e0ff29f) - Add
unstable_preventOverflow
,unstable_boundariesElement
andunstable_fixed
props tousePopoverState
(f0930e2) - Add experimental
unstable_orphan
prop toDialog
(d0f6b52) - Remove experimental
KeyBinder
in favor of internalcreateOnKeyDown
util (b0adfa8) - Rename
mergeProps
util tounstable_mergeProps
(9be2e14) - Warn when some refs aren't passed to components (92f035c)
- Improve general performance by using
React.memo
on components (91f0d54)
mergeProps
util has been renamed tounstable_mergeProps
and is not exported by the root package anymore. Instead, it should be imported fromreakit/utils/mergeProps
.currentValue
andsetValue
have been replaced bystate
andsetState
onCheckbox
,Radio
and all their derivative components and related hooks.- All the
ComponentProps
typings have been renamed toComponentHTMLProps
.ComponentProps
is now the combination ofComponentOptions
andComponentHTMLProps
. placement
prop is now required onMenuDisclosure
.placement
prop is now required onMenu
.
1.0.0-alpha.3 (2019-04-25)
- Fix
Checkbox
not revertingindeterminate
state whencurrentValue
changes (2ee7455) - Fix
mouseOut
events triggering outsideDialog
. (d814ddf) - Fix arrow keys not working on
Menu
when cursor leaves it (9f278ac) - Fix arrow keys on
MenuItem
incorrectly hidingMenu
(94bd9db) - Fix focusing
MenuItem
on mouse over outside an openDialog
(aac7f3c)
- Add
VisuallyHidden
component (7b1d826) - Add experimental
KeyBinder
component (7eb739a) - Render
MenuGroup
as adiv
instead offieldset
(5d4b476) - Return
unstable_wrap
method from props hooks (f668ae4)
1.0.0-alpha.2 (2019-04-17)
MenuDisclosure
should close the submenu when in menubar (d481674)- Change system's
useProps
order in built-in components (e679024) - Fix
DialogDisclosure
not closingDialog
on Safari whenhideOnClickOutside
is truthy (37865cf) - Fix
MenuDisclosure
race condition on focus/click (8a37d31) - Make click/focus behavior cross-browser by automatically focusing
Tabbable
on mouse down (54b618c) - Restore
hasShownOnFocus
state inMenuDisclosure
(63228fd)
- Add
use
prefix automatically inuseProps
/useOptions
(167fda1) - Expose
unstable_useSealedState
util (1540eab) - Remove
unstable_
prefix fromcurrentId
prop (003d1ad) - Remove
unstable_
prefix fromfocusable
prop (965dcb7) - Remove
unstable_
prefix fromloop
,move
,next
,previous
,first
,last
props (501f822) - Remove
unstable_
prefix frommanual
,selectedId
,select
props (c36413f) - Remove
unstable_
prefix fromstops
,register
andunregister
props (061cc55) - Remove focus from
MenuItem
on mouse out (fdd1bb8)
1.0.0-alpha.1 (2019-04-09)
- Clicking on an element inside the disclosure should hide Dialog (93072cb)
1.0.0-alpha.0 (2019-04-02)
Note: Version bump only for package reakit