All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Revamped build process to build tree-shakable entry points and transform code like optional chaining from bundle (not supported in node 12).
onSwipe
now receives an object containing the numberspos
,diff
anddirection
. Previously it was only called bypos
, but this made it impossible to reliably determine, if the paging was done to the right or to the left in all cases.onSwipe
will be called now when the swiping gets fired, instead of being fired after the swiping was completed.- The CSS variable
--s-transform-x
is now unit-less, giving more flexibility when consuming this value for further kinds of style adjustments. - CSS variables are getting initialized in the scope of the outer staged element instead of
the global
:root
context.
- A new CSS variable
--s-width
allows to access the current width of the staged container. - Added optional
className
properties.
- Export types
StagedRef
andSlideAnimation
- Allow later React versions as peer dependency
- Fix a TS problem and adding more strictness
- Allow passing
ref
to control paging from outer context.