Releases: smastrom/vue-collapsed
Releases · smastrom/vue-collapsed
v1.3.4
v1.3.3
v1.3.2
v1.3.1
v1.3.0
Release notes
- Fix a SSR layout shift bug where
<Collapse />was displayed as expanded on initial render until JS was loaded (if collapsed). #22 - Thanks @zhaivoronok - Add a check to control whether
requestAnimationFrameis available
Other
- Setup monorepo
- Migrate playground to Nuxt
- Add more examples to playground
- Migrate demo website to Cloudflare Pages
v1.2.9
Release notes
This patch release doesn't bring any new feature nor fix. It is just a "courtesy-release" to enable from now on, publishments via the newly introduced npm provenance statements.
I also took the chance to improve a bit the (one year old) codebase by:
- Use
defineOptionsin the setup block - Refactor reactivity-related syntax to improve readability using setters
- Enable watch mode for both dev and GUI testing
- Drop the buggy and unstable Cypress webkit testing (support still experimental)
- Update all dependencies
v1.2.8
v1.2.7
v1.2.6
What's improved
- Collapse is now more performant, using only one
requestAnimationFramecall per expand/collapse. This was achieved by streamlining the logic behind retrieving the auto duration value, which is now only captured on mount. - No longer enforcing
margin: 0andborder: 0on the Collapse element fixed styles. - When
baseHeightdynamically updates to 0 on collapsed state,display: hiddenis now added on the Collapse element styles. - Added examples to the README on how to use different easing and durations per expand/collapse.
v1.2.0
Release notes
The next minor release of vue-collapsed brings a lot of improvements and a new feature.
What's new
- Starting from v1.2.0 you don't need to define a class name with a height transition anymore. As long as no transition is defined on the Collapse element, the following one is automatically added:
height var(--vc-auto-duration) cubic-bezier(0.33, 1, 0.68, 1). - Added automatic transition disabling for
prefers-reduced-motion: reduceand the ability to manually disable transitions via CSS.
What's changed
Callback props have been replaced by emits. This won't break any functionality, as Vue emits can also be defined using the previous props' syntax (onCollapsed, onExpand, etc).
If you were using them, you can update your code as displayed below.
Pre v1.2
<Collapse :when="isExpanded" :onExpand="callback">
<p>This is a paragraph.</p>
</Collapse>v1.2
<Collapse :when="isExpanded" @expand="callback">
<p>This is a paragraph.</p>
</Collapse>What's improved
- Collapse has been refactored from a render function to a Vue component, delegating the transformation to the Vue compiler. This brings proper support for typed emits and slots.
- Updated
vite-plugin-dtsconfiguration for better types generation