- 💥 Add ESM/CJS package compatibility.
This new major release adds support for ESM to the published package while preserving CJS compatibility. The main/module/exports
fields in package.json
are now pointing to new artifacts: dist/esm/index.mjs
which is an ESM file that most modern tooling should pick up, dist/cjs/index.cjs
which is a CJS file and dist/esm/index.js
which is a copy of the ESM file with a .js
extension to support Webpack 4. Thanks to @lewisl9029 for the contribution.
- Update TypeScript
onBeforeChange
return type to support promises.
- Add missing TypeScript
title
attribute type to steps. - Fix various issues with Next.js and SSR.
- The
onBeforeChange
callback now receives thenextElement
as second parameter. - Add missing
updateStepElement()
to the TypeScript type declarations. - Fix Steps's
element
parameter type to also accept anHTMLElement
.
- Bump peer dependencies versions.
- Add TypeScript type declarations.
- Add support for React elements to Steps's
intro
parameter.
-
💥
onBeforeChange
is no longer called with thenextElement
parameter. -
Add React 16 support.
-
If at least intro.js 2.8.0 is used,
false
can be returned inonBeforeChange
to prevent transitioning to the next / previous step. -
Add the
onPreventChange
callback called when a transition is prevented by returningfalse
inonBeforeChange
. -
Add the
onBeforeExit
callback to prevent exiting the intro. -
Update intro.js
import
statements to avoid a deprecation warning.
- Add the
updateStepElement()
API to update the element associated to a step based on its index. This is useful when the associated element is not present in the DOM on page load.
element
CSS selector are no longer required for a Step so floating steps can be created more easily.
- Improve consistency around callbacks in the Steps component.
- Add onComplete callback for Steps.
- Hide steps & hints when unmounting.
- First release.