Skip to content

v0.16.1

Choose a tag to compare

@daopk daopk released this 17 Oct 10:05
· 11 commits to main since this release

A slider can now be sized from CSS, down to a thin bar with a round knob, and a controlled text field keeps its caret where you type.

Added

  • The slider's geometry is a set of custom properties on its root. --slider-track-thickness, --slider-rail-thickness, --slider-thumb-length, --slider-thumb-thickness, --slider-thumb-radius and --slider-thumb-inset. A bar thinner than the track still takes a press anywhere in the track's band, and an inset of 0px lets the knob hang half past either end. With the defaults every size is as before.
  • SliderTrack's slot hands over hoverValue and hoverPercent. They give the value a press under a hovering mouse or pen would set, snapped to the step, and where that value sits along the track, for a preview such as a tooltip. Both are null under touch and while the slider is disabled.
  • Slider's change and change-end are typed by the shape of its value. A slider given a number reports number, and one given an array reports number[]. SliderValue names the union.
  • The theming guide shows one part of a page in the other appearance, with class="dark" on any element, and lists what such a scope does not reach.

Fixed

  • Editing in the middle of a controlled TextField, SearchField, ComboBox input or InputOTP no longer sends the caret to the end. (#7)
  • A press on a slider's track lands the thumb under the pointer, and a drag keeps pace with it. Both were measured across the track's end spacers, so a press set a little more than the spot pressed and a drag moved the thumb about a tenth less than the pointer.
  • A slider with neither a label nor an output no longer leaves an empty row above its track, so a bare track lines up with whatever shares its row.
npm i ropav@0.16.1

Full changelog: v0.16.0...v0.16.1