- Fix Svelte type resolve issue (#107)
- Fix Svelte resolve warning (#103)
- Enable usage with Svelte v4 (the library remains compatible with v3)
- Update third-party libs
-
Fix and expose context types. This is useful as an interim solution for (#88). E.g.:
import { getContext } from 'svelte'; import type { Context } from 'svelte-simple-modal'; const { open, close } = getContext('simple-modal') as Context;
- Fix the scroll reset behavior to
instant
to avoid seeing a smooth scrolling when closing the modal in cases where the default scroll behavior was changed ([#97(#97))
- Add property to assign an ID to the modal's root element ([#96(#96))
- Improve type definition ([#94(#94))
- Fix min-height issue with Safari iOS 15 (#64)
- One more type definition improvement
- Further improve type definitions
- Improve type definitions
- Avoid submitting a
<form />
if it wraps<Modal />
by setting the close button type tobutton
. (#84) Shoutout to @jnysteen!
- Skip untabbable element (#82) Massive thanks to @jassenjj 🙏
- Added
isTabbable
property to allow users to override the tab-check. E.g., one might want to use a more the tabbable library.
- Respect the tab order defined by
tabindex
attributes of elements within a modal (#80)
- Fix accidentally removed global export of
bind()
- Fix type issue of
bind()
via a new version ofsveld
(#73). See carbon-design-system/sveld#83 for context. Also huge shoutout to Dustin Coffey for his PR (#75) on this matter. 🙏
- Updated
sveld
to fix the type definitions (#58). See carbon-design-system/sveld#56 for context
- Add
classBg
,classWindow
,classWindowWrap
,classContent
, andclassCloseButton
properties to applying custom CSS classes to the modal elements (#62) - Add
unstyled
to prevent applying default styles and providing full control over the modal styling
- Add
ariaLabel
andariaLabelledBy
to props/options to support improved accessibility (#37) - Add
aria-label="Close modal"
to the default close button component (#37)
- Add
"type": "module"
inpackage.json
(#57)
- Properly export
bind()
(#58)
- Add type annotations via JSDocs, Typescript, and Sveld (#52)
- Add
disableFocusTrap
property for disabling the focus trap behavior (#49)
- Make sure that the modal only closes when it's open to fix (#53)
- Remove accidentally added
console.log
(#50) and forbidconsole.log
via linting
- Revert changes from v1.0.1 as it turns out that in certain cases
overflow: hidden
on body is not enough to prevent background scrolling in iOS. For details see https://markus.oberlehner.net/blog/simple-solution-to-prevent-body-scrolling-on-ios/
- Remove
position: fixed
from body on opening a modal as it appears that the fixed positioning is not needed to avoid scrolling (#38)
Woohoo 🎉 Thanks everyone who uses and supports this library. This release really just introduces a bug fix but given that most (hopefully all 🤞) of the features are stable, I decided to finally release v1.
- Fixes a scrolling issue introduced with #45 while still keeping the library compatible with SvelteKit (#47)
- Default bg width/height to innerWidth/innerHeight (#40)
- Make compatible with svelte kit (#45)
- Avoid exception when converting falsy value to CSS (#42)
- Improve outer click handling and avoid accidental closing of the modal (#39)
- Harmonize
on:open
/on:opening
andon:close
/on:closing
event (#33 and #34). Note,on:opening
andon:closing
are still being dispatched for backward compatibility but they will be remove in future versions so please switch over toon:open
andon:close
.
- Disable body scrolling while modal is open (#31 -> #28)
- Fixed a visual glitch where previously customized styles were not reset
- Added
<Modal show={PopupComponent} />
as an alternative to other the context API (#22)
- Replace too strict
isSvelteComponent
withisFunction
(#27)
- Dispatch open, opened, close, and closed events (#25)
- Allow customizing the window wrapper via
styleWindowWrap
(#24)
- Fall back gracefully for older versions of Svelte (
<3.19
) whenSvelteComponent
for the custom close button is not available (#21)
- Allow customizing the close button (#20)
- Trap focus in modal (#17)
- Add
aria
information
- Explicitly expose the
event
object (#13)
- Remove wrapping
div
element as it's not necessary (#12)
- Add support for transition event callbacks via
open(..., ..., ..., { onOpen, onOpened, onClose, onClosed })
)
- Fix non-reactive component (#11)
- Allow to specify instance-specific options via
open(Component, componentProps, options)
)
- Update
package-lock.json
file
- Set backgroupd position to
top: 0
andleft: 0
by default thanks to #5
- Allow customizing the modal style on
open(Component, props, styling)
. This can be used for content-aware theming.
- Robustify overflow
- First release