Skip to content

Releases: Threespot/expand-toggle

4.0.0 Make ESM module

Choose a tag to compare

@tedw tedw released this 18 May 22:09

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

Choose a tag to compare

@tedw tedw released this 22 Aug 20:23

Move ev-emitter to dependencies in package.json

v3.1.0

Choose a tag to compare

@tedw tedw released this 22 Aug 19:26

Update the main file in package.json to point to the uncompiled index.js file.

v3.0.1

Choose a tag to compare

@tedw tedw released this 22 Aug 19:12

Add use client directive to avoid errors with super() in some frameworks (see https://react.dev/reference/rsc/use-client)

v3.0.0

Choose a tag to compare

@tedw tedw released this 02 Mar 17:48

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

Choose a tag to compare

@tedw tedw released this 31 Aug 19:27
  • Fix edge-case issue when updateExpandedHeight() is called on an expandable without data-expands-height
  • Drop lodash dependency, add simple debounce function instead
  • Update dependencies, drop unused husky dependency
  • Bump minimum Node version to v16

v2.0

Choose a tag to compare

@tedw tedw released this 04 Sep 19:11

Bump minimum version of NodeJS to v10, update npm dependencies.

Fix bug preventing recalc on window resize

Choose a tag to compare

@tedw tedw released this 10 Jul 19:38

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

Choose a tag to compare

@tedw tedw released this 13 Mar 02:14

Fix bug causing checked radio or checkbox inputs from being unchecked when inside of collapsible element. This happened because the cloned input elements had the same name attribute.

v1.6.0

Choose a tag to compare

@tedw tedw released this 12 Mar 18:00

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.