Skip to content

Release 4.0.0-0

Pre-release
Pre-release

Choose a tag to compare

@nerdyman nerdyman released this 14 Sep 17:09
· 241 commits to main since this release

4.0.0-0 Pre-release

npm i react-compare-slider@beta
pnpm i react-compare-slider@beta
yarn add react-compare-slider@beta

Features

  • New clip property - allows, itemOne, itemTwo or both (default) to be clipped
    • Useful for comparing things with alpha backgrounds), closes #136
  • itemTwo is no longer absolutely positioned
    • The size of both itemOne and itemTwo is taken into account when sizing the slider

Breaking Changes

  • The slider width no longer defaults to 100% - it uses the intrinsic size of its contents
  • Node 18 is now the minimum supported version

Fixes

  • Correctly 'disconnect' from the slider on touch devices when the touchend event fires
  • CJS version is now published to resolve Jest issues, closes #144
  • Slider now sets touch-action: pan-y instead of touch-action: none, allowing it to be scrolled past on touch devices when it fills the screen, closes #134

Changelog

  • ci: set install script for compressed size action (d0c1bd1)
  • build(deps): upgrade sb to latest v7 (3387f82)
  • ci: remove --no-template flag from publish preview (0405456)
  • build: BREAKING CHANGE: set min node version to 18 (4de2634)
  • build: add cjs build to avoid issues with jest, resolves #144 (c878402)
  • ci: replace debug version of pkg-pr-new (dc98418)
  • chore: update vscode config (7bd6bb8)
  • fix: default touch-action on slider root to pan-y #134 (079620b)
  • fix: try only applying touch-action: none when the slider is being dragged #134 (e35d7c4)
  • ci: try dev mode version of pkg.pr.new (e6508ca)
  • docs: add new real world links (d001886)
  • ci: update template arg for pkg preview publish (d808668)
  • ci: enable compress action (b3ac921)
  • ci: add glob to publish preview example (ed1af8f)
  • ci: use example as template for preview package publish (8c73048)
  • ci: run preview package publish on pr sync with label (0972cbb)
  • ci: set lib in publish preview (a1a69dc)
  • ci: publish preview when label is applied and pr is not draft (4079c3b)
  • ci: add pkg.pr.new action (aba0ad4)
  • doc: update clip docs (86ce7b4)
  • docs: add docs for clip and disabled props (5d2adae)
  • test: use display block on images inzero bounds tests to ensure correct sizing (6c213fe)
  • feat: add clip prop to clip itemOne, itemTwo or all (default) (77dff61)
  • Merge remote-tracking branch 'origin/main' into next (356a102)
  • feat: add clipItemOne prop (81d1fd9)