Releases: rpearce/react-medium-image-zoom
Releases · rpearce/react-medium-image-zoom
v5.1.1
v5.1.0
[5.1.0] - 2022-10-11
Added
- Ability to customize the zoom modal content via
<ZoomContent>
(issue #332) - Re-added
wrapElement
prop to API; only supports'div' | 'span'
(issue #356) - Added a11y support for
prefers-reduced-motion: reduce
(issue #359) - Added
classDialog
string prop to account for the loss of granular styling
control over different modals resulting from moving the<dialog>
rendering
to a portal
Changed
- Now rendering
<dialog>
in a portal because of #356- For the folx using
.my-class [data-rmiz-modal] {}
to change the<dialog>
styles, please use theclassDialog
prop to passmy-class
to the
<dialog>
. I wish I didn't have to do this, but this is something that
needs fixing, and I can't justify a new major version just because of this
new style requirement. TheclassDialog
addition (mentioned above) should
solve this nicely.
- For the folx using
Fixed
- Now using the
wheel
event instead ofscroll
to detect trying to leave the
modal (issue #350) - Fixed mobile scrolling experience (related to issue #350)
Removed
- Removed the broken
scrollableEl
that has arguably not ever worked (issue #350)
v5.0.3
v5.0.2
v5.0.1
v5.0.0
[5.0.0] - 2022-08-03
Closes #164, #166, #213, #227, #259, #265, #281, #282
Added
- Added
IconUnzoom
andIconZoom
in order to customize the zoom & unzoom buttons - Added
zoomImg
to provide attributes for an image that should be loaded on zoom - Added better zooming support for all of the following:
<img />
, including allobject-fit
values, anyobject-position
,
andloading="lazy"
<div>
and<span>
with anybackground-image
,
background-size
,
andbackground-position
<picture>
with<source />
and<img />
<figure>
with<img />
Changed
- Sets
"type": "module"
inpackage.json
for ESModule usage - Renamed
closeText
toa11yNameButtonUnzoom
- Renamed
openText
toa11yNameButtonZoom
- Images must meet these
querySelector
criteria to be found:':is(img, svg, [role="img"], [data-zoom]):not([aria-hidden="true"])'
Removed
- Removed
focus-options-polyfill
dependency - Removed
tslib
dependency - Removed
overlayBgColorStart
(now specified via CSS:[data-rmiz-modal-overlay="hidden"]
) - Removed
overlayBgColorEnd
(now specified via CSS:[data-rmiz-modal-overlay="visible"]
) - Removed
portalEl
- Removed
transitionDuration
(now specified via CSS:[data-rmiz-modal-overlay]
and[data-rmiz-modal-img]
) - Removed
wrapElement
- Removed
wrapStyle
- Removed
zoomZIndex
v4.4.3
v4.4.2
v4.4.1
[4.4.1] - 2022-05-22
Changed
- Switched project name back to
react-medium-image-zoom
and fixed links - I'm not even sure it was working, but turned off
sourceMaps: true
in the
tsconfig - Moved
AUTHORS
file intocontributors
key inpackage.json
- Added
funding
info topackage.json