fix: the close function now returns a promise and resolves after animations

Because of the animations, chaining modals could lead to unexpected results.
The close functions now returns a promise that resolves at the end of the animation to avoid any issue.
The "onClose" callbacks are now also called upon completion of the animation.
chore: bump to 0.1.2