Releases: faceless-ui/modal
v3.0.0-beta.2
What's Changed
- chore: removes publishConfig from package.json by @AlessioGr in #61
Full Changelog: v3.0.0-beta.1...v3.0.0-beta.2
v3.0.0-beta.1
What's Changed
- chore: nodenext module resolution by @jacobsfletch in #57
- feat: remove qs, upgrade dependencies & misc improvements by @AlessioGr in #60
Full Changelog: v3.0.0-beta.0...v3.0.0-beta.1
v3.0.0-beta.0
What's Changed
- feat: moves to esm by @jacobsfletch in #56
Full Changelog: v2.1.0-rc.0...v3.0.0-beta.0
v2.1.0-rc.0
What's Changed
- deps: bumps react to v19.0.0-rc.0 by @jacobsfletch in #55
Full Changelog: v2.0.2...v2.1.0-rc.0
v2.0.2
What's Changed
- chore: adds use client directive by @jacobsfletch in #54
Full Changelog: v2.0.1...v2.0.2
v2.0.1
What's Changed
- feat: sequential modal escape #40 by @jacobsfletch in #42
- feat: allows zIndex string #39 by @jacobsfletch in #41
Full Changelog: v2.0.0...v2.0.1
v2.0.0
v1.0.0 to v2.0.0 Migration Guide
The two major changes in v2 are:
- multiple open modals
- overall DX improvements
Migration between these two versions is simple. For legacy source code and support, check out the v1 branch.
Breaking changes:
-
The following methods have been renamed. They function the same, so find/replace should work for most cases:
open
->openModal
close
->closeModal
toggle
->toggleModal
closeAll
->closeAllModals
oneIsOpen
->oneModalIsOpen
-
currentModal
has been deprecated, to find if one particular modal is open, use the helper function instead:const { isModalOpen } = useModal(); const isOpen = isModalOpen(modalSlug)
or do this with plain js by reading
modalState
directly:const isOpen = modalState[slug] && modalState[slug].isOpen;
Non breaking changes:
- The
toggle
method will no longer close all modals, it will only close the toggled modal. So you will need to explicitly callcloseAll
if your UI calls for it. - If using native routing, the
?modal=my-modal
query param will now potentially be an array, i.e.?modal[0]=my-modal&modal[1]=other-modal
. Plain strings can continue to be used, so this change is backwards compatible.
v2.0.0-alpha.4
Full Changelog: v2.0.0-alpha.2...v2.0.0-alpha.4
v2.0.0-alpha.2
What's Changed
- Fix/focus trap by @jacobsfletch in #36
Migration guide from 1.0.0 to 2.0.0:
The following methods have been renamed for a better DX:
open
->openModal
close
->closeModal
toggle
->toggleModal
closeAll
->closeAllModals
oneIsOpen
->modalIsOpen
Full Changelog: v2.0.0-alpha.1...v2.0.0-alpha.2
v2.0.0-alpha.1
POC for multiple open modals.
Migration guide from 1.0.0 to 2.0.0:
currentModal
has been deprecated, you should now readmodalState
instead. To find if one particular modal is open, just use normal js like this:const isOpen = modalState[slug] && modalState[slug].isOpen;
toggle
will no longer close all modals, it will only close the toggled modal. You should now close all modals before toggling one, if your UI calls for it.- If opting-in to native routing, the
?modal=my-modal
query param will now potentially be an array, i.e.?modal[0]=my-modal&modal[1]=other-modal
. This is a non-breaking change that maintains backwards compatibility, so plain strings can continue to be used.
Full Changelog: v1.3.2...v2.0.0-alpha.1