- 💥 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
onBeforeChangereturn type to support promises.
- Add missing TypeScript
titleattribute type to steps. - Fix various issues with Next.js and SSR.
- The
onBeforeChangecallback now receives thenextElementas second parameter. - Add missing
updateStepElement()to the TypeScript type declarations. - Fix Steps's
elementparameter type to also accept anHTMLElement.
- Bump peer dependencies versions.
- Add TypeScript type declarations.
- Add support for React elements to Steps's
introparameter.
-
💥
onBeforeChangeis no longer called with thenextElementparameter. -
Add React 16 support.
-
If at least intro.js 2.8.0 is used,
falsecan be returned inonBeforeChangeto prevent transitioning to the next / previous step. -
Add the
onPreventChangecallback called when a transition is prevented by returningfalseinonBeforeChange. -
Add the
onBeforeExitcallback to prevent exiting the intro. -
Update intro.js
importstatements 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.
elementCSS 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.