Skip to content

Commit

Permalink
feat(ui5-range-slider): Add Range Slider component (#2310)
Browse files Browse the repository at this point in the history
Introduce ui5-range-slider component that represents a numerical interval and two handles to select a sub-range within it.The purpose of the component is to enable visual selection of sub-ranges within a given interval.
Properties:
- `min `- The minimum value of the slider range
- `max `- The maximum value of the slider range
- `value `- The current value of the slider
- `step `- Determines the increments in which the slider will move
- `showTickmarks` - Displays a visual divider between the step values
- `showToolTip `- Determines if a tooltip should be displayed above the handle
- `labelInterval `- Labels some or all of the tickmarks with their values.
- `disabled`- Defines whether the <code>Slider</code> is in disabled state.
Events:
- `change` - Fired when the value changes and the user has finished interacting with the slider.
- `input` - Fired when the value changes due to user interaction that is not yet finished - during mouse/touch dragging.
  • Loading branch information
ndeshev authored Nov 20, 2020
1 parent 0b948dd commit 9dea3b3
Show file tree
Hide file tree
Showing 11 changed files with 895 additions and 11 deletions.
1 change: 1 addition & 0 deletions packages/main/bundle.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import ResponsivePopover from "./dist/ResponsivePopover.js";
import SegmentedButton from "./dist/SegmentedButton.js";
import Select from "./dist/Select.js";
import Slider from "./dist/Slider.js";
import RangeSlider from "./dist/RangeSlider.js";
import Switch from "./dist/Switch.js";
import MessageStrip from "./dist/MessageStrip.js";
import MultiComboBox from "./dist/MultiComboBox.js";
Expand Down
18 changes: 18 additions & 0 deletions packages/main/src/RangeSlider.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{>include "./SliderBase.hbs"}}

{{#*inline "handles"}}
<div class="ui5-slider-handle ui5-slider-handle--start" style="{{styles.startHandle}}">
{{#if showTooltip}}
<div class="ui5-slider-tooltip ui5-slider-tooltip--start" style="{{styles.tooltip}}">
<span class="ui5-slider-tooltip-value">{{tooltipStartValue}}</span>
</div>
{{/if}}
</div>
<div class="ui5-slider-handle ui5-slider-handle--end" style="{{styles.endHandle}}">
{{#if showTooltip}}
<div class="ui5-slider-tooltip ui5-slider-tooltip--end" style="{{styles.tooltip}}">
<span class="ui5-slider-tooltip-value">{{tooltipEndValue}}</span>
</div>
{{/if}}
</div>
{{/inline}}
Loading

0 comments on commit 9dea3b3

Please sign in to comment.