Repository navigation
Releases: Threespot/expand-toggle
Release list
4.0.0 Make ESM module
Replace the webpack/babel/jest/eslint stack with native ESM and Node's
built-in test runner. The package now ships index.js directly as an ES
module; consumers' bundlers (or Node) handle it without transpilation.
- Switch package.json to "type": "module" with an "exports" map and a
"files" allowlist so only index.js ships in the tarball - Replace Jest with node:test + node:assert against happy-dom
- Replace Travis CI with a GitHub Actions workflow on Node 20 and 22
- Drop dist/, docs/, webpack.config.js, .babelrc, .eslintrc.json,
.coveralls.yml, .travis.yml - Reduce devDependencies from 15 packages to 1 (happy-dom)
- Add Sass mixin with minimum styles
BREAKING CHANGE: The package is now ESM-only. CommonJS consumers must
load it via dynamic import(). No changes to the ExpandToggle API.
v3.1.1
v3.1.0
v3.0.1
Add use client directive to avoid errors with super() in some frameworks (see https://react.dev/reference/rsc/use-client)
v3.0.0
Removes all JS related to setting the max-height in favor of this CSS-only approach:
https://www.stefanjudis.com/snippets/how-to-animate-height-with-css-grid/
See readme for new base markup and styles.
NOTE: The expand animation doesn’t work in Safari 15 or below.
v2.1.0
- Fix edge-case issue when
updateExpandedHeight()is called on an expandable withoutdata-expands-height - Drop lodash dependency, add simple debounce function instead
- Update dependencies, drop unused
huskydependency - Bump minimum Node version to v16
v2.0
Fix bug preventing recalc on window resize
This fixes a bug that was introduced here 71a61ef#diff-168726dbe96b3ce427e7fedce31bb0bcL85 which was preventing the max-height from updating on window resize when the component was collapsed.
v1.6.1
v1.6.0
Adds option to expand the menu by default, either by adding data-expanded on the toggle or setting shouldStartExpanded: true in the JS config.
NOTE: The menu won’t expand until JS runs, so if you would like the menu to be expanded immediately you can add aria-hidden="false" to the menu wrapper.