1 | "use strict";
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | Object.defineProperty(exports, "__esModule", { value: true });
|
18 | exports.Slider = void 0;
|
19 | var tslib_1 = require("tslib");
|
20 | var React = tslib_1.__importStar(require("react"));
|
21 | var common_1 = require("../../common");
|
22 | var props_1 = require("../../common/props");
|
23 | var multiSlider_1 = require("./multiSlider");
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 | var Slider = (function (_super) {
|
30 | tslib_1.__extends(Slider, _super);
|
31 | function Slider() {
|
32 | return _super !== null && _super.apply(this, arguments) || this;
|
33 | }
|
34 | Slider.prototype.render = function () {
|
35 | var _a = this.props, initialValue = _a.initialValue, intent = _a.intent, value = _a.value, onChange = _a.onChange, onRelease = _a.onRelease, handleHtmlProps = _a.handleHtmlProps, props = tslib_1.__rest(_a, ["initialValue", "intent", "value", "onChange", "onRelease", "handleHtmlProps"]);
|
36 | return (React.createElement(multiSlider_1.MultiSlider, tslib_1.__assign({}, props),
|
37 | React.createElement(multiSlider_1.MultiSlider.Handle, { value: value, intentAfter: value < initialValue ? intent : undefined, intentBefore: value >= initialValue ? intent : undefined, onChange: onChange, onRelease: onRelease, htmlProps: handleHtmlProps }),
|
38 | React.createElement(multiSlider_1.MultiSlider.Handle, { value: initialValue, interactionKind: "none" })));
|
39 | };
|
40 | Slider.defaultProps = tslib_1.__assign(tslib_1.__assign({}, multiSlider_1.MultiSlider.defaultSliderProps), { initialValue: 0, intent: common_1.Intent.PRIMARY, value: 0 });
|
41 | Slider.displayName = "".concat(props_1.DISPLAYNAME_PREFIX, ".Slider");
|
42 | return Slider;
|
43 | }(common_1.AbstractPureComponent2));
|
44 | exports.Slider = Slider;
|
45 |
|
\ | No newline at end of file |