@hortiview/shared-components 2.8.6 → 2.8.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/{AlertBanner-DlgFtlZm.js → AlertBanner-D-NTP_6i.js} +3 -3
- package/dist/{BigLoadingSpinner-B_HFhx2F.js → BigLoadingSpinner-CCxsMWnc.js} +1 -1
- package/dist/{GenericCard-Cv8qaFLu.js → GenericCard-DOKyENNm.js} +3 -3
- package/dist/{ListAreaService-D9HRsvH0.js → ListAreaService-CI-s1Xx5.js} +5 -5
- package/dist/{OfflineView-Bw-sbsym.js → OfflineView-DHtzNLwt.js} +3 -3
- package/dist/_Map-BmafU0dj.js +113 -0
- package/dist/assets/FormSelect.css +1 -1
- package/dist/components/AlertBanner/AlertBanner.js +4 -4
- package/dist/components/AlertBanner/AlertBanner.test.js +1 -1
- package/dist/components/AlertBanner/LinkBanner.js +3 -3
- package/dist/components/BaseView/BaseView.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.js +2 -2
- package/dist/components/BasicHeading/BasicHeading.test.js +1 -1
- package/dist/components/BlockView/BlockView.js +1 -1
- package/dist/components/ChipCard/ChipCard.js +499 -390
- package/dist/components/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/DeleteModal/DeleteModal.js +5 -5
- package/dist/components/DetailContentWrapper/DetailContentWrapper.js +1 -1
- package/dist/components/Disclaimer/Disclaimer.js +3 -3
- package/dist/components/EmptyView/EmptyView.js +161 -125
- package/dist/components/Filter/Filter.js +11 -11
- package/dist/components/Filter/Filter.test.js +51 -35
- package/dist/components/FormComponents/FormCheckBox/FormCheckBox.js +1 -1
- package/dist/components/FormComponents/FormDatePicker/FormDatePicker.js +10 -10
- package/dist/components/FormComponents/FormNumber/CustomTextField.js +3 -3
- package/dist/components/FormComponents/FormRadio/FormRadio.js +1 -1
- package/dist/components/FormComponents/FormSelect/FormSelect.js +53 -53
- package/dist/components/FormComponents/FormSelect/SelectTooltipText.js +2 -2
- package/dist/components/FormComponents/FormSlider/FormSlider.js +540 -535
- package/dist/components/FormComponents/FormText/FormText.js +2 -2
- package/dist/components/FormComponents/FormToggle/FormToggle.js +4 -4
- package/dist/components/GenericTable/GenericTable.js +8246 -7153
- package/dist/components/GenericTable/Mobile/GenericCard.js +4 -4
- package/dist/components/GenericTable/Mobile/GenericCard.test.js +1 -1
- package/dist/components/GenericTable/Mobile/GenericCardList.js +4 -4
- package/dist/components/HashTabView/HashTabView.js +552 -541
- package/dist/components/HeaderFilter/HeaderFilter.js +1 -1
- package/dist/components/Iconify/Iconify.js +2 -2
- package/dist/components/InfoCard/InfoCard.js +4 -4
- package/dist/components/InfoGroup/InfoGroup.js +3 -3
- package/dist/components/ListArea/ListArea.js +16 -16
- package/dist/components/ListArea/ListArea.test.js +20 -20
- package/dist/components/ListArea/ListAreaService.js +6 -6
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.js +2 -2
- package/dist/components/LoadingSpinner/Big/BigLoadingSpinner.test.js +1 -1
- package/dist/components/LoadingSpinner/Default/LoadingSpinner.js +164 -178
- package/dist/components/Modal/Modal.js +305 -312
- package/dist/components/ModulePadding/ModulePadding.js +8 -8
- package/dist/components/OfflineView/OfflineView.js +4 -4
- package/dist/components/OfflineView/OfflineView.test.js +1 -1
- package/dist/components/OnboardingBanner/OnboardingBanner.js +13 -13
- package/dist/components/OverflowTooltip/OverflowTooltip.js +1 -1
- package/dist/components/OverflowTooltip/OverflowTooltip.test.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SearchBar/SearchBar.test.js +1 -1
- package/dist/components/Select/Select.js +2 -2
- package/dist/components/Stepper/Stepper.js +1 -1
- package/dist/components/Stepper/components/StepperButton.js +1 -1
- package/dist/components/Stepper/components/StepperHeader.js +2 -2
- package/dist/components/Stepper/components/StepperIndicator.js +1 -1
- package/dist/defineProperty-CmuOyxyf.js +318 -0
- package/dist/es.string.iterator-DrqCBub-.js +581 -0
- package/dist/find-B-dm7n_F.js +88 -0
- package/dist/{get-CqneoueQ.js → get-DuK51wnj.js} +1 -1
- package/dist/get-u1nFMLdT.js +377 -0
- package/dist/hooks/useHelperText.js +1 -1
- package/dist/identity-BIZAN_pL.js +213 -0
- package/dist/includes-Bt-Stz_B.js +110 -0
- package/dist/index-Cpb-8cAN.js +2465 -0
- package/dist/index.es-0QJC9VS2.js +325 -0
- package/dist/{index.es-CyjMwj5g.js → index.es-45NOgWlB.js} +93 -101
- package/dist/index.es-B6ZgiW2s.js +3790 -0
- package/dist/{index.es-1zrFd4Te.js → index.es-BGordhUK.js} +352 -323
- package/dist/index.es-BRtk0Q33.js +42 -0
- package/dist/index.es-BXj90wb_.js +402 -0
- package/dist/index.es-Bg8hxXM8.js +912 -0
- package/dist/index.es-Bgjh6euR.js +292 -0
- package/dist/index.es-Bo1Rhtyb.js +80 -0
- package/dist/{index.es-BaX-8joZ.js → index.es-CK4oZMKs.js} +3329 -3232
- package/dist/{index.es-nQ0lMwpE.js → index.es-CKdJX75f.js} +74 -78
- package/dist/index.es-CmF6xAUJ.js +48 -0
- package/dist/{index.es-p4O33fMu.js → index.es-Cq04gn3U.js} +321 -305
- package/dist/{index.es-Cdu6tjUC.js → index.es-D1IpdMde.js} +87 -95
- package/dist/index.es-DDYCugj-.js +166 -0
- package/dist/{index.es-jFaPNuBO.js → index.es-DENZVv7_.js} +427 -444
- package/dist/{index.es-Dnrk7XL6.js → index.es-DObVvepK.js} +158 -166
- package/dist/index.es-DeF-y7fd.js +122 -0
- package/dist/{index.es-ks_RnHLh.js → index.es-Dfju71Pi.js} +27 -37
- package/dist/index.es-DqSY-ePE.js +4923 -0
- package/dist/index.es-DwzB1d7_.js +1061 -0
- package/dist/index.es-IXyb5F6n.js +457 -0
- package/dist/index.es-t7hFwQSs.js +67 -0
- package/dist/isArray-DN9s620O.js +83 -0
- package/dist/{isArray-CSaAxHlq.js → isArray-Dub1wGJM.js} +1 -1
- package/dist/{isEmpty-SkzPhavO.js → isEmpty-CxD71Jv8.js} +4 -5
- package/dist/{isString-CZsZiWgW.js → isString-BNaBRq3S.js} +2 -2
- package/dist/isTypedArray-Dw_IY7Zq.js +212 -0
- package/dist/keyboard-B-WUULl-.js +173 -0
- package/dist/main.js +2 -2
- package/dist/map-Dbvlv_6y.js +707 -0
- package/dist/omit-uTAyrUTm.js +645 -0
- package/dist/orderBy-BXxEvUw6.js +571 -0
- package/dist/parse-int-qVAoFbOL.js +75 -0
- package/dist/services/UtilService.js +7 -7
- package/dist/slicedToArray-BWk2gTCn.js +436 -0
- package/dist/{toString-BFJes2_D.js → toString-CrgB_7Pe.js} +1 -1
- package/dist/{uniqueId-DrPMzA-E.js → uniqueId-NU3-C36A.js} +1 -1
- package/package.json +3 -3
- package/dist/_baseIsEqual-Df2URKWm.js +0 -240
- package/dist/_getAllKeys-BQWmkEw5.js +0 -86
- package/dist/_getTag-BkGSRa18.js +0 -79
- package/dist/_setToString-B6E13pDg.js +0 -580
- package/dist/get-DQr2KQKm.js +0 -113
- package/dist/index-D5m--65X.js +0 -1491
- package/dist/index.es-8MVlRCi4.js +0 -1066
- package/dist/index.es-BbaCXS9-.js +0 -45
- package/dist/index.es-BikIx4uw.js +0 -3242
- package/dist/index.es-CDMu_yu0.js +0 -954
- package/dist/index.es-ChSlnpSq.js +0 -309
- package/dist/index.es-D66OkZJH.js +0 -4853
- package/dist/index.es-DFFyENnI.js +0 -63
- package/dist/index.es-DTMwaJ6B.js +0 -56
- package/dist/index.es-DgTJmbgD.js +0 -268
- package/dist/index.es-DmsyeHLO.js +0 -306
- package/dist/index.es-Dw1eih7R.js +0 -159
- package/dist/index.es-eKuwB1ll.js +0 -54
- package/dist/index.es-qxTN-Bb2.js +0 -107
- package/dist/index.es-xnSvM9b9.js +0 -444
- package/dist/isArray-DDZrq40X.js +0 -456
- package/dist/keyboard-Bpt0aBqQ.js +0 -107
- package/dist/omit-BN3qeeaj.js +0 -364
- package/dist/orderBy-D4LvP9Az.js +0 -316
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { _ as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { a as ut } from "../../../
|
|
12
|
-
import {
|
|
1
|
+
import { jsx as ye } from "react/jsx-runtime";
|
|
2
|
+
import { _ as Ze, a as W, c as X, b as Ae, d as Je, P as d } from "../../../index-Cpb-8cAN.js";
|
|
3
|
+
import { _ as Qe, a as Ce, b as Ye, c as et, d as Oe, e as _e, f as tt } from "../../../defineProperty-CmuOyxyf.js";
|
|
4
|
+
import { _ as Re } from "../../../parse-int-qVAoFbOL.js";
|
|
5
|
+
import p, { forwardRef as rt, useRef as De, useImperativeHandle as Ne, useCallback as x, useEffect as V, useMemo as ke } from "react";
|
|
6
|
+
import { I as Be } from "../../../index.es-DwzB1d7_.js";
|
|
7
|
+
import { T as Pe } from "../../../index.es-DENZVv7_.js";
|
|
8
|
+
import { c as Me } from "../../../index.es-BXj90wb_.js";
|
|
9
|
+
import { b as Fe, c as j } from "../../../tslib.es6-BDCynO9F.js";
|
|
10
|
+
import { M as nt, a as it } from "../../../component-neHBNHRu.js";
|
|
11
|
+
import { M as Le, a as at, m as st, b as ut } from "../../../component-DsB0poTj.js";
|
|
12
|
+
import { A as ot } from "../../../animationframe-EMBh6XeO.js";
|
|
13
|
+
import { a as Ve } from "../../../util-DA21pZXj.js";
|
|
14
|
+
import { useFormContext as lt, Controller as dt } from "react-hook-form";
|
|
13
15
|
/**
|
|
14
16
|
* @license
|
|
15
17
|
* Copyright 2020 Google Inc.
|
|
@@ -32,7 +34,7 @@ import { useFormContext as At, Controller as Ct } from "react-hook-form";
|
|
|
32
34
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
33
35
|
* THE SOFTWARE.
|
|
34
36
|
*/
|
|
35
|
-
var
|
|
37
|
+
var l = {
|
|
36
38
|
DISABLED: "mdc-slider--disabled",
|
|
37
39
|
DISCRETE: "mdc-slider--discrete",
|
|
38
40
|
INPUT: "mdc-slider__input",
|
|
@@ -52,7 +54,7 @@ var o = {
|
|
|
52
54
|
// The active track fill element that will be scaled as the value changes.
|
|
53
55
|
TRACK_ACTIVE: "mdc-slider__track--active_fill",
|
|
54
56
|
VALUE_INDICATOR_TEXT: "mdc-slider__value-indicator-text"
|
|
55
|
-
},
|
|
57
|
+
}, we = {
|
|
56
58
|
// Default step size.
|
|
57
59
|
STEP_SIZE: 1,
|
|
58
60
|
// Minimum absolute difference between clientX of move event / down event
|
|
@@ -67,7 +69,7 @@ var o = {
|
|
|
67
69
|
INPUT_MAX: "max",
|
|
68
70
|
INPUT_VALUE: "value",
|
|
69
71
|
INPUT_STEP: "step"
|
|
70
|
-
},
|
|
72
|
+
}, Ue = {
|
|
71
73
|
CHANGE: "MDCSlider:change",
|
|
72
74
|
INPUT: "MDCSlider:input"
|
|
73
75
|
};
|
|
@@ -93,13 +95,13 @@ var o = {
|
|
|
93
95
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
94
96
|
* THE SOFTWARE.
|
|
95
97
|
*/
|
|
96
|
-
var
|
|
97
|
-
(function(
|
|
98
|
-
|
|
99
|
-
})(
|
|
98
|
+
var w;
|
|
99
|
+
(function(s) {
|
|
100
|
+
s[s.ACTIVE = 0] = "ACTIVE", s[s.INACTIVE = 1] = "INACTIVE";
|
|
101
|
+
})(w || (w = {}));
|
|
100
102
|
var i;
|
|
101
|
-
(function(
|
|
102
|
-
|
|
103
|
+
(function(s) {
|
|
104
|
+
s[s.START = 1] = "START", s[s.END = 2] = "END";
|
|
103
105
|
})(i || (i = {}));
|
|
104
106
|
/**
|
|
105
107
|
* @license
|
|
@@ -123,17 +125,17 @@ var i;
|
|
|
123
125
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
124
126
|
* THE SOFTWARE.
|
|
125
127
|
*/
|
|
126
|
-
var
|
|
127
|
-
(function(
|
|
128
|
-
|
|
129
|
-
})(
|
|
130
|
-
var
|
|
128
|
+
var q;
|
|
129
|
+
(function(s) {
|
|
130
|
+
s.SLIDER_UPDATE = "slider_update";
|
|
131
|
+
})(q || (q = {}));
|
|
132
|
+
var ee = typeof window < "u", ct = (
|
|
131
133
|
/** @class */
|
|
132
|
-
function(
|
|
133
|
-
|
|
134
|
-
function a(
|
|
135
|
-
var r =
|
|
136
|
-
return r.initialStylesRemoved = !1, r.isDisabled = !1, r.isDiscrete = !1, r.step =
|
|
134
|
+
function(s) {
|
|
135
|
+
Fe(a, s);
|
|
136
|
+
function a(e) {
|
|
137
|
+
var r = s.call(this, j(j({}, a.defaultAdapter), e)) || this;
|
|
138
|
+
return r.initialStylesRemoved = !1, r.isDisabled = !1, r.isDiscrete = !1, r.step = we.STEP_SIZE, r.hasTickMarks = !1, r.isRange = !1, r.thumb = null, r.downEventClientX = null, r.startThumbKnobWidth = 0, r.endThumbKnobWidth = 0, r.animFrame = new ot(), r;
|
|
137
139
|
}
|
|
138
140
|
return Object.defineProperty(a, "defaultAdapter", {
|
|
139
141
|
get: function() {
|
|
@@ -233,21 +235,21 @@ var Z = typeof window < "u", Rt = (
|
|
|
233
235
|
enumerable: !1,
|
|
234
236
|
configurable: !0
|
|
235
237
|
}), a.prototype.init = function() {
|
|
236
|
-
var
|
|
237
|
-
this.isDisabled = this.adapter.hasClass(
|
|
238
|
-
var r = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MIN, this.isRange ? i.START : i.END), g.INPUT_MIN),
|
|
239
|
-
this.validateProperties({ min: r, max:
|
|
240
|
-
|
|
238
|
+
var e = this;
|
|
239
|
+
this.isDisabled = this.adapter.hasClass(l.DISABLED), this.isDiscrete = this.adapter.hasClass(l.DISCRETE), this.hasTickMarks = this.adapter.hasClass(l.TICK_MARKS), this.isRange = this.adapter.hasClass(l.RANGE);
|
|
240
|
+
var r = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MIN, this.isRange ? i.START : i.END), g.INPUT_MIN), t = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_MAX, i.END), g.INPUT_MAX), n = this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.END), g.INPUT_VALUE), u = this.isRange ? this.convertAttributeValueToNumber(this.adapter.getInputAttribute(g.INPUT_VALUE, i.START), g.INPUT_VALUE) : r, c = this.adapter.getInputAttribute(g.INPUT_STEP, i.END), v = c ? this.convertAttributeValueToNumber(c, g.INPUT_STEP) : this.step;
|
|
241
|
+
this.validateProperties({ min: r, max: t, value: n, valueStart: u, step: v }), this.min = r, this.max = t, this.value = n, this.valueStart = u, this.step = v, this.numDecimalPlaces = pt(this.step), this.valueBeforeDownEvent = n, this.valueStartBeforeDownEvent = u, this.mousedownOrTouchstartListener = this.handleMousedownOrTouchstart.bind(this), this.moveListener = this.handleMove.bind(this), this.pointerdownListener = this.handlePointerdown.bind(this), this.pointerupListener = this.handlePointerup.bind(this), this.thumbMouseenterListener = this.handleThumbMouseenter.bind(this), this.thumbMouseleaveListener = this.handleThumbMouseleave.bind(this), this.inputStartChangeListener = function() {
|
|
242
|
+
e.handleInputChange(i.START);
|
|
241
243
|
}, this.inputEndChangeListener = function() {
|
|
242
|
-
|
|
244
|
+
e.handleInputChange(i.END);
|
|
243
245
|
}, this.inputStartFocusListener = function() {
|
|
244
|
-
|
|
246
|
+
e.handleInputFocus(i.START);
|
|
245
247
|
}, this.inputEndFocusListener = function() {
|
|
246
|
-
|
|
248
|
+
e.handleInputFocus(i.END);
|
|
247
249
|
}, this.inputStartBlurListener = function() {
|
|
248
|
-
|
|
250
|
+
e.handleInputBlur(i.START);
|
|
249
251
|
}, this.inputEndBlurListener = function() {
|
|
250
|
-
|
|
252
|
+
e.handleInputBlur(i.END);
|
|
251
253
|
}, this.resizeListener = this.handleResize.bind(this), this.registerEventHandlers();
|
|
252
254
|
}, a.prototype.destroy = function() {
|
|
253
255
|
this.deregisterEventHandlers();
|
|
@@ -257,213 +259,213 @@ var Z = typeof window < "u", Rt = (
|
|
|
257
259
|
return this.max;
|
|
258
260
|
}, a.prototype.getValue = function() {
|
|
259
261
|
return this.value;
|
|
260
|
-
}, a.prototype.setValue = function(
|
|
261
|
-
if (this.isRange &&
|
|
262
|
-
throw new Error("end thumb value (" +
|
|
263
|
-
this.updateValue(
|
|
262
|
+
}, a.prototype.setValue = function(e) {
|
|
263
|
+
if (this.isRange && e < this.valueStart)
|
|
264
|
+
throw new Error("end thumb value (" + e + ") must be >= start thumb " + ("value (" + this.valueStart + ")"));
|
|
265
|
+
this.updateValue(e, i.END);
|
|
264
266
|
}, a.prototype.getValueStart = function() {
|
|
265
267
|
if (!this.isRange)
|
|
266
268
|
throw new Error("`valueStart` is only applicable for range sliders.");
|
|
267
269
|
return this.valueStart;
|
|
268
|
-
}, a.prototype.setValueStart = function(
|
|
270
|
+
}, a.prototype.setValueStart = function(e) {
|
|
269
271
|
if (!this.isRange)
|
|
270
272
|
throw new Error("`valueStart` is only applicable for range sliders.");
|
|
271
|
-
if (this.isRange &&
|
|
272
|
-
throw new Error("start thumb value (" +
|
|
273
|
-
this.updateValue(
|
|
273
|
+
if (this.isRange && e > this.value)
|
|
274
|
+
throw new Error("start thumb value (" + e + ") must be <= end thumb " + ("value (" + this.value + ")"));
|
|
275
|
+
this.updateValue(e, i.START);
|
|
274
276
|
}, a.prototype.getStep = function() {
|
|
275
277
|
return this.step;
|
|
276
278
|
}, a.prototype.getDisabled = function() {
|
|
277
279
|
return this.isDisabled;
|
|
278
|
-
}, a.prototype.setDisabled = function(
|
|
279
|
-
this.isDisabled =
|
|
280
|
+
}, a.prototype.setDisabled = function(e) {
|
|
281
|
+
this.isDisabled = e, e ? (this.adapter.addClass(l.DISABLED), this.isRange && this.adapter.setInputAttribute(g.INPUT_DISABLED, "", i.START), this.adapter.setInputAttribute(g.INPUT_DISABLED, "", i.END)) : (this.adapter.removeClass(l.DISABLED), this.isRange && this.adapter.removeInputAttribute(g.INPUT_DISABLED, i.START), this.adapter.removeInputAttribute(g.INPUT_DISABLED, i.END));
|
|
280
282
|
}, a.prototype.getIsRange = function() {
|
|
281
283
|
return this.isRange;
|
|
282
|
-
}, a.prototype.layout = function(
|
|
283
|
-
var r =
|
|
284
|
-
this.rect = this.adapter.getBoundingClientRect(), this.isRange && (this.startThumbKnobWidth = this.adapter.getThumbKnobWidth(i.START), this.endThumbKnobWidth = this.adapter.getThumbKnobWidth(i.END)),
|
|
284
|
+
}, a.prototype.layout = function(e) {
|
|
285
|
+
var r = e === void 0 ? {} : e, t = r.skipUpdateUI;
|
|
286
|
+
this.rect = this.adapter.getBoundingClientRect(), this.isRange && (this.startThumbKnobWidth = this.adapter.getThumbKnobWidth(i.START), this.endThumbKnobWidth = this.adapter.getThumbKnobWidth(i.END)), t || this.updateUI();
|
|
285
287
|
}, a.prototype.handleResize = function() {
|
|
286
288
|
this.layout();
|
|
287
|
-
}, a.prototype.handleDown = function(
|
|
289
|
+
}, a.prototype.handleDown = function(e) {
|
|
288
290
|
if (!this.isDisabled) {
|
|
289
291
|
this.valueStartBeforeDownEvent = this.valueStart, this.valueBeforeDownEvent = this.value;
|
|
290
|
-
var r =
|
|
292
|
+
var r = e.clientX != null ? e.clientX : e.targetTouches[0].clientX;
|
|
291
293
|
this.downEventClientX = r;
|
|
292
|
-
var
|
|
293
|
-
this.thumb = this.getThumbFromDownEvent(r,
|
|
294
|
+
var t = this.mapClientXOnSliderScale(r);
|
|
295
|
+
this.thumb = this.getThumbFromDownEvent(r, t), this.thumb !== null && (this.handleDragStart(e, t, this.thumb), this.updateValue(t, this.thumb, { emitInputEvent: !0 }));
|
|
294
296
|
}
|
|
295
|
-
}, a.prototype.handleMove = function(
|
|
297
|
+
}, a.prototype.handleMove = function(e) {
|
|
296
298
|
if (!this.isDisabled) {
|
|
297
|
-
|
|
298
|
-
var r =
|
|
299
|
+
e.preventDefault();
|
|
300
|
+
var r = e.clientX != null ? e.clientX : e.targetTouches[0].clientX, t = this.thumb != null;
|
|
299
301
|
if (this.thumb = this.getThumbFromMoveEvent(r), this.thumb !== null) {
|
|
300
302
|
var n = this.mapClientXOnSliderScale(r);
|
|
301
|
-
|
|
303
|
+
t || (this.handleDragStart(e, n, this.thumb), this.adapter.emitDragStartEvent(n, this.thumb)), this.updateValue(n, this.thumb, { emitInputEvent: !0 });
|
|
302
304
|
}
|
|
303
305
|
}
|
|
304
306
|
}, a.prototype.handleUp = function() {
|
|
305
307
|
if (!(this.isDisabled || this.thumb === null)) {
|
|
306
|
-
var
|
|
307
|
-
|
|
308
|
+
var e = this.thumb === i.START ? this.valueStartBeforeDownEvent : this.valueBeforeDownEvent, r = this.thumb === i.START ? this.valueStart : this.value;
|
|
309
|
+
e !== r && this.adapter.emitChangeEvent(r, this.thumb), this.adapter.emitDragEndEvent(r, this.thumb), this.thumb = null;
|
|
308
310
|
}
|
|
309
311
|
}, a.prototype.handleThumbMouseenter = function() {
|
|
310
|
-
!this.isDiscrete || !this.isRange || (this.adapter.addThumbClass(
|
|
312
|
+
!this.isDiscrete || !this.isRange || (this.adapter.addThumbClass(l.THUMB_WITH_INDICATOR, i.START), this.adapter.addThumbClass(l.THUMB_WITH_INDICATOR, i.END));
|
|
311
313
|
}, a.prototype.handleThumbMouseleave = function() {
|
|
312
|
-
!this.isDiscrete || !this.isRange || this.adapter.isInputFocused(i.START) || this.adapter.isInputFocused(i.END) || (this.adapter.removeThumbClass(
|
|
313
|
-
}, a.prototype.handleMousedownOrTouchstart = function(
|
|
314
|
-
var r = this,
|
|
315
|
-
this.adapter.registerBodyEventHandler(
|
|
314
|
+
!this.isDiscrete || !this.isRange || this.adapter.isInputFocused(i.START) || this.adapter.isInputFocused(i.END) || (this.adapter.removeThumbClass(l.THUMB_WITH_INDICATOR, i.START), this.adapter.removeThumbClass(l.THUMB_WITH_INDICATOR, i.END));
|
|
315
|
+
}, a.prototype.handleMousedownOrTouchstart = function(e) {
|
|
316
|
+
var r = this, t = e.type === "mousedown" ? "mousemove" : "touchmove";
|
|
317
|
+
this.adapter.registerBodyEventHandler(t, this.moveListener);
|
|
316
318
|
var n = function() {
|
|
317
|
-
r.handleUp(), r.adapter.deregisterBodyEventHandler(
|
|
319
|
+
r.handleUp(), r.adapter.deregisterBodyEventHandler(t, r.moveListener), r.adapter.deregisterEventHandler("mouseup", n), r.adapter.deregisterEventHandler("touchend", n);
|
|
318
320
|
};
|
|
319
|
-
this.adapter.registerBodyEventHandler("mouseup", n), this.adapter.registerBodyEventHandler("touchend", n), this.handleDown(
|
|
320
|
-
}, a.prototype.handlePointerdown = function(
|
|
321
|
-
this.adapter.setPointerCapture(
|
|
322
|
-
}, a.prototype.handleInputChange = function(
|
|
323
|
-
var r = Number(this.adapter.getInputValue(
|
|
324
|
-
|
|
325
|
-
}, a.prototype.handleInputFocus = function(
|
|
326
|
-
if (this.adapter.addThumbClass(
|
|
327
|
-
var r =
|
|
328
|
-
this.adapter.addThumbClass(
|
|
321
|
+
this.adapter.registerBodyEventHandler("mouseup", n), this.adapter.registerBodyEventHandler("touchend", n), this.handleDown(e);
|
|
322
|
+
}, a.prototype.handlePointerdown = function(e) {
|
|
323
|
+
this.adapter.setPointerCapture(e.pointerId), this.adapter.registerEventHandler("pointermove", this.moveListener), this.handleDown(e);
|
|
324
|
+
}, a.prototype.handleInputChange = function(e) {
|
|
325
|
+
var r = Number(this.adapter.getInputValue(e));
|
|
326
|
+
e === i.START ? this.setValueStart(r) : this.setValue(r), this.adapter.emitChangeEvent(e === i.START ? this.valueStart : this.value, e), this.adapter.emitInputEvent(e === i.START ? this.valueStart : this.value, e);
|
|
327
|
+
}, a.prototype.handleInputFocus = function(e) {
|
|
328
|
+
if (this.adapter.addThumbClass(l.THUMB_FOCUSED, e), !!this.isDiscrete && (this.adapter.addThumbClass(l.THUMB_WITH_INDICATOR, e), this.isRange)) {
|
|
329
|
+
var r = e === i.START ? i.END : i.START;
|
|
330
|
+
this.adapter.addThumbClass(l.THUMB_WITH_INDICATOR, r);
|
|
329
331
|
}
|
|
330
|
-
}, a.prototype.handleInputBlur = function(
|
|
331
|
-
if (this.adapter.removeThumbClass(
|
|
332
|
-
var r =
|
|
333
|
-
this.adapter.removeThumbClass(
|
|
332
|
+
}, a.prototype.handleInputBlur = function(e) {
|
|
333
|
+
if (this.adapter.removeThumbClass(l.THUMB_FOCUSED, e), !!this.isDiscrete && (this.adapter.removeThumbClass(l.THUMB_WITH_INDICATOR, e), this.isRange)) {
|
|
334
|
+
var r = e === i.START ? i.END : i.START;
|
|
335
|
+
this.adapter.removeThumbClass(l.THUMB_WITH_INDICATOR, r);
|
|
334
336
|
}
|
|
335
|
-
}, a.prototype.handleDragStart = function(
|
|
336
|
-
this.adapter.focusInput(
|
|
337
|
-
}, a.prototype.getThumbFromDownEvent = function(
|
|
337
|
+
}, a.prototype.handleDragStart = function(e, r, t) {
|
|
338
|
+
this.adapter.focusInput(t), e.preventDefault(), this.adapter.emitDragStartEvent(r, t);
|
|
339
|
+
}, a.prototype.getThumbFromDownEvent = function(e, r) {
|
|
338
340
|
if (!this.isRange)
|
|
339
341
|
return i.END;
|
|
340
|
-
var
|
|
341
|
-
return
|
|
342
|
-
}, a.prototype.getThumbFromMoveEvent = function(
|
|
342
|
+
var t = this.adapter.getThumbBoundingClientRect(i.START), n = this.adapter.getThumbBoundingClientRect(i.END), u = e >= t.left && e <= t.right, c = e >= n.left && e <= n.right;
|
|
343
|
+
return u && c ? null : u ? i.START : c ? i.END : r < this.valueStart ? i.START : r > this.value ? i.END : r - this.valueStart <= this.value - r ? i.START : i.END;
|
|
344
|
+
}, a.prototype.getThumbFromMoveEvent = function(e) {
|
|
343
345
|
if (this.thumb !== null)
|
|
344
346
|
return this.thumb;
|
|
345
347
|
if (this.downEventClientX === null)
|
|
346
348
|
throw new Error("`downEventClientX` is null after move event.");
|
|
347
|
-
var r = Math.abs(this.downEventClientX -
|
|
349
|
+
var r = Math.abs(this.downEventClientX - e) < we.THUMB_UPDATE_MIN_PX;
|
|
348
350
|
if (r)
|
|
349
351
|
return this.thumb;
|
|
350
|
-
var
|
|
351
|
-
return
|
|
352
|
-
}, a.prototype.updateUI = function(
|
|
353
|
-
this.updateThumbAndInputAttributes(
|
|
354
|
-
}, a.prototype.updateThumbAndInputAttributes = function(
|
|
355
|
-
if (
|
|
356
|
-
var r = this.isRange &&
|
|
357
|
-
this.adapter.setInputAttribute(g.INPUT_VALUE,
|
|
352
|
+
var t = e < this.downEventClientX;
|
|
353
|
+
return t ? this.adapter.isRTL() ? i.END : i.START : this.adapter.isRTL() ? i.START : i.END;
|
|
354
|
+
}, a.prototype.updateUI = function(e) {
|
|
355
|
+
this.updateThumbAndInputAttributes(e), this.updateThumbAndTrackUI(e), this.updateValueIndicatorUI(e), this.updateTickMarksUI();
|
|
356
|
+
}, a.prototype.updateThumbAndInputAttributes = function(e) {
|
|
357
|
+
if (e) {
|
|
358
|
+
var r = this.isRange && e === i.START ? this.valueStart : this.value, t = String(r);
|
|
359
|
+
this.adapter.setInputAttribute(g.INPUT_VALUE, t, e), this.isRange && e === i.START ? this.adapter.setInputAttribute(g.INPUT_MIN, t, i.END) : this.isRange && e === i.END && this.adapter.setInputAttribute(g.INPUT_MAX, t, i.START), this.adapter.getInputValue(e) !== t && this.adapter.setInputValue(t, e);
|
|
358
360
|
var n = this.adapter.getValueToAriaValueTextFn();
|
|
359
|
-
n && this.adapter.setInputAttribute(g.ARIA_VALUETEXT, n(r),
|
|
361
|
+
n && this.adapter.setInputAttribute(g.ARIA_VALUETEXT, n(r), e);
|
|
360
362
|
}
|
|
361
|
-
}, a.prototype.updateValueIndicatorUI = function(
|
|
363
|
+
}, a.prototype.updateValueIndicatorUI = function(e) {
|
|
362
364
|
if (this.isDiscrete) {
|
|
363
|
-
var r = this.isRange &&
|
|
364
|
-
this.adapter.setValueIndicatorText(r,
|
|
365
|
+
var r = this.isRange && e === i.START ? this.valueStart : this.value;
|
|
366
|
+
this.adapter.setValueIndicatorText(r, e === i.START ? i.START : i.END), !e && this.isRange && this.adapter.setValueIndicatorText(this.valueStart, i.START);
|
|
365
367
|
}
|
|
366
368
|
}, a.prototype.updateTickMarksUI = function() {
|
|
367
369
|
if (!(!this.isDiscrete || !this.hasTickMarks)) {
|
|
368
|
-
var
|
|
369
|
-
this.adapter.updateTickMarks(n.concat(
|
|
370
|
+
var e = (this.valueStart - this.min) / this.step, r = (this.value - this.valueStart) / this.step + 1, t = (this.max - this.value) / this.step, n = Array.from({ length: e }).fill(w.INACTIVE), u = Array.from({ length: r }).fill(w.ACTIVE), c = Array.from({ length: t }).fill(w.INACTIVE);
|
|
371
|
+
this.adapter.updateTickMarks(n.concat(u).concat(c));
|
|
370
372
|
}
|
|
371
|
-
}, a.prototype.mapClientXOnSliderScale = function(
|
|
372
|
-
var r =
|
|
373
|
-
this.adapter.isRTL() && (
|
|
374
|
-
var n = this.min +
|
|
373
|
+
}, a.prototype.mapClientXOnSliderScale = function(e) {
|
|
374
|
+
var r = e - this.rect.left, t = r / this.rect.width;
|
|
375
|
+
this.adapter.isRTL() && (t = 1 - t);
|
|
376
|
+
var n = this.min + t * (this.max - this.min);
|
|
375
377
|
return n === this.max || n === this.min ? n : Number(this.quantize(n).toFixed(this.numDecimalPlaces));
|
|
376
|
-
}, a.prototype.quantize = function(
|
|
377
|
-
var r = Math.round((
|
|
378
|
+
}, a.prototype.quantize = function(e) {
|
|
379
|
+
var r = Math.round((e - this.min) / this.step);
|
|
378
380
|
return this.min + r * this.step;
|
|
379
|
-
}, a.prototype.updateValue = function(
|
|
380
|
-
var n =
|
|
381
|
-
if (
|
|
382
|
-
if (this.valueStart ===
|
|
381
|
+
}, a.prototype.updateValue = function(e, r, t) {
|
|
382
|
+
var n = t === void 0 ? {} : t, u = n.emitInputEvent;
|
|
383
|
+
if (e = this.clampValue(e, r), this.isRange && r === i.START) {
|
|
384
|
+
if (this.valueStart === e)
|
|
383
385
|
return;
|
|
384
|
-
this.valueStart =
|
|
386
|
+
this.valueStart = e;
|
|
385
387
|
} else {
|
|
386
|
-
if (this.value ===
|
|
388
|
+
if (this.value === e)
|
|
387
389
|
return;
|
|
388
|
-
this.value =
|
|
390
|
+
this.value = e;
|
|
389
391
|
}
|
|
390
|
-
this.updateUI(r),
|
|
391
|
-
}, a.prototype.clampValue = function(
|
|
392
|
-
|
|
393
|
-
var
|
|
394
|
-
if (
|
|
392
|
+
this.updateUI(r), u && this.adapter.emitInputEvent(r === i.START ? this.valueStart : this.value, r);
|
|
393
|
+
}, a.prototype.clampValue = function(e, r) {
|
|
394
|
+
e = Math.min(Math.max(e, this.min), this.max);
|
|
395
|
+
var t = this.isRange && r === i.START && e > this.value;
|
|
396
|
+
if (t)
|
|
395
397
|
return this.value;
|
|
396
|
-
var n = this.isRange && r === i.END &&
|
|
397
|
-
return n ? this.valueStart :
|
|
398
|
-
}, a.prototype.updateThumbAndTrackUI = function(
|
|
399
|
-
var r = this,
|
|
398
|
+
var n = this.isRange && r === i.END && e < this.valueStart;
|
|
399
|
+
return n ? this.valueStart : e;
|
|
400
|
+
}, a.prototype.updateThumbAndTrackUI = function(e) {
|
|
401
|
+
var r = this, t = this, n = t.max, u = t.min, c = (this.value - this.valueStart) / (n - u), v = c * this.rect.width, f = this.adapter.isRTL(), R = ee ? Ve(window, "transform") : "transform";
|
|
400
402
|
if (this.isRange) {
|
|
401
|
-
var
|
|
402
|
-
this.animFrame.request(
|
|
403
|
-
var
|
|
404
|
-
|
|
405
|
-
var
|
|
406
|
-
(
|
|
403
|
+
var N = this.adapter.isRTL() ? (n - this.value) / (n - u) * this.rect.width : (this.valueStart - u) / (n - u) * this.rect.width, b = N + v;
|
|
404
|
+
this.animFrame.request(q.SLIDER_UPDATE, function() {
|
|
405
|
+
var T = !f && e === i.START || f && e !== i.START;
|
|
406
|
+
T ? (r.adapter.setTrackActiveStyleProperty("transform-origin", "right"), r.adapter.setTrackActiveStyleProperty("left", "unset"), r.adapter.setTrackActiveStyleProperty("right", r.rect.width - b + "px")) : (r.adapter.setTrackActiveStyleProperty("transform-origin", "left"), r.adapter.setTrackActiveStyleProperty("right", "unset"), r.adapter.setTrackActiveStyleProperty("left", N + "px")), r.adapter.setTrackActiveStyleProperty(R, "scaleX(" + c + ")");
|
|
407
|
+
var O = f ? b : N, k = r.adapter.isRTL() ? N : b;
|
|
408
|
+
(e === i.START || !e || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(R, "translateX(" + O + "px)", i.START), (e === i.END || !e || !r.initialStylesRemoved) && r.adapter.setThumbStyleProperty(R, "translateX(" + k + "px)", i.END), r.removeInitialStyles(f), r.updateOverlappingThumbsUI(O, k, e);
|
|
407
409
|
});
|
|
408
410
|
} else
|
|
409
|
-
this.animFrame.request(
|
|
410
|
-
var
|
|
411
|
-
r.adapter.setThumbStyleProperty(
|
|
411
|
+
this.animFrame.request(q.SLIDER_UPDATE, function() {
|
|
412
|
+
var T = f ? r.rect.width - v : v;
|
|
413
|
+
r.adapter.setThumbStyleProperty(R, "translateX(" + T + "px)", i.END), r.adapter.setTrackActiveStyleProperty(R, "scaleX(" + c + ")"), r.removeInitialStyles(f);
|
|
412
414
|
});
|
|
413
|
-
}, a.prototype.removeInitialStyles = function(
|
|
415
|
+
}, a.prototype.removeInitialStyles = function(e) {
|
|
414
416
|
if (!this.initialStylesRemoved) {
|
|
415
|
-
var r =
|
|
417
|
+
var r = e ? "right" : "left";
|
|
416
418
|
this.adapter.removeThumbStyleProperty(r, i.END), this.isRange && this.adapter.removeThumbStyleProperty(r, i.START), this.initialStylesRemoved = !0, this.resetTrackAndThumbAnimation();
|
|
417
419
|
}
|
|
418
420
|
}, a.prototype.resetTrackAndThumbAnimation = function() {
|
|
419
|
-
var
|
|
421
|
+
var e = this;
|
|
420
422
|
if (this.isDiscrete) {
|
|
421
|
-
var r =
|
|
422
|
-
this.adapter.setThumbStyleProperty(r,
|
|
423
|
-
|
|
423
|
+
var r = ee ? Ve(window, "transition") : "transition", t = "all 0s ease 0s";
|
|
424
|
+
this.adapter.setThumbStyleProperty(r, t, i.END), this.isRange && this.adapter.setThumbStyleProperty(r, t, i.START), this.adapter.setTrackActiveStyleProperty(r, t), requestAnimationFrame(function() {
|
|
425
|
+
e.adapter.removeThumbStyleProperty(r, i.END), e.adapter.removeTrackActiveStyleProperty(r), e.isRange && e.adapter.removeThumbStyleProperty(r, i.START);
|
|
424
426
|
});
|
|
425
427
|
}
|
|
426
|
-
}, a.prototype.updateOverlappingThumbsUI = function(
|
|
428
|
+
}, a.prototype.updateOverlappingThumbsUI = function(e, r, t) {
|
|
427
429
|
var n = !1;
|
|
428
430
|
if (this.adapter.isRTL()) {
|
|
429
|
-
var
|
|
430
|
-
n =
|
|
431
|
+
var u = e - this.startThumbKnobWidth / 2, c = r + this.endThumbKnobWidth / 2;
|
|
432
|
+
n = c >= u;
|
|
431
433
|
} else {
|
|
432
|
-
var
|
|
433
|
-
n =
|
|
434
|
+
var v = e + this.startThumbKnobWidth / 2, f = r - this.endThumbKnobWidth / 2;
|
|
435
|
+
n = v >= f;
|
|
434
436
|
}
|
|
435
437
|
n ? (this.adapter.addThumbClass(
|
|
436
|
-
|
|
438
|
+
l.THUMB_TOP,
|
|
437
439
|
// If no thumb was dragged (in the case of initial layout), end
|
|
438
440
|
// thumb is on top by default.
|
|
439
|
-
|
|
440
|
-
), this.adapter.removeThumbClass(
|
|
441
|
-
}, a.prototype.convertAttributeValueToNumber = function(
|
|
442
|
-
if (
|
|
441
|
+
t || i.END
|
|
442
|
+
), this.adapter.removeThumbClass(l.THUMB_TOP, t === i.START ? i.END : i.START)) : (this.adapter.removeThumbClass(l.THUMB_TOP, i.START), this.adapter.removeThumbClass(l.THUMB_TOP, i.END));
|
|
443
|
+
}, a.prototype.convertAttributeValueToNumber = function(e, r) {
|
|
444
|
+
if (e === null)
|
|
443
445
|
throw new Error("MDCSliderFoundation: `" + r + "` must be non-null.");
|
|
444
|
-
var
|
|
445
|
-
if (isNaN(
|
|
446
|
-
throw new Error("MDCSliderFoundation: `" + r + "` value is " + ("`" +
|
|
447
|
-
return
|
|
448
|
-
}, a.prototype.validateProperties = function(
|
|
449
|
-
var r =
|
|
450
|
-
if (r >=
|
|
451
|
-
throw new Error("MDCSliderFoundation: min must be strictly less than max. " + ("Current: [min: " + r + ", max: " +
|
|
452
|
-
if (
|
|
446
|
+
var t = Number(e);
|
|
447
|
+
if (isNaN(t))
|
|
448
|
+
throw new Error("MDCSliderFoundation: `" + r + "` value is " + ("`" + e + "`, but must be a number."));
|
|
449
|
+
return t;
|
|
450
|
+
}, a.prototype.validateProperties = function(e) {
|
|
451
|
+
var r = e.min, t = e.max, n = e.value, u = e.valueStart, c = e.step;
|
|
452
|
+
if (r >= t)
|
|
453
|
+
throw new Error("MDCSliderFoundation: min must be strictly less than max. " + ("Current: [min: " + r + ", max: " + t + "]"));
|
|
454
|
+
if (c <= 0)
|
|
453
455
|
throw new Error("MDCSliderFoundation: step must be a positive number. " + ("Current step: " + this.step));
|
|
454
456
|
if (this.isRange) {
|
|
455
|
-
if (n < r || n >
|
|
456
|
-
throw new Error("MDCSliderFoundation: values must be in [min, max] range. " + ("Current values: [start value: " +
|
|
457
|
-
if (
|
|
458
|
-
throw new Error("MDCSliderFoundation: start value must be <= end value. " + ("Current values: [start value: " +
|
|
459
|
-
var
|
|
460
|
-
if (
|
|
461
|
-
throw new Error("MDCSliderFoundation: Slider values must be valid based on the " + ("step value. Current values: [start value: " +
|
|
457
|
+
if (n < r || n > t || u < r || u > t)
|
|
458
|
+
throw new Error("MDCSliderFoundation: values must be in [min, max] range. " + ("Current values: [start value: " + u + ", end value: " + n + "]"));
|
|
459
|
+
if (u > n)
|
|
460
|
+
throw new Error("MDCSliderFoundation: start value must be <= end value. " + ("Current values: [start value: " + u + ", end value: " + n + "]"));
|
|
461
|
+
var v = (u - r) / c, f = (n - r) / c;
|
|
462
|
+
if (v % 1 !== 0 || f % 1 !== 0)
|
|
463
|
+
throw new Error("MDCSliderFoundation: Slider values must be valid based on the " + ("step value. Current values: [start value: " + u + ", ") + ("end value: " + n + "]"));
|
|
462
464
|
} else {
|
|
463
|
-
if (n < r || n >
|
|
465
|
+
if (n < r || n > t)
|
|
464
466
|
throw new Error("MDCSliderFoundation: value must be in [min, max] range. " + ("Current value: " + n));
|
|
465
|
-
var
|
|
466
|
-
if (
|
|
467
|
+
var f = (n - r) / c;
|
|
468
|
+
if (f % 1 !== 0)
|
|
467
469
|
throw new Error("MDCSliderFoundation: Slider value must be valid based on the " + ("step value. Current value: " + n));
|
|
468
470
|
}
|
|
469
471
|
}, a.prototype.registerEventHandlers = function() {
|
|
@@ -472,13 +474,13 @@ var Z = typeof window < "u", Rt = (
|
|
|
472
474
|
this.adapter.deregisterWindowEventHandler("resize", this.resizeListener), a.SUPPORTS_POINTER_EVENTS ? (this.adapter.deregisterEventHandler("pointerdown", this.pointerdownListener), this.adapter.deregisterEventHandler("pointerup", this.pointerupListener)) : (this.adapter.deregisterEventHandler("mousedown", this.mousedownOrTouchstartListener), this.adapter.deregisterEventHandler("touchstart", this.mousedownOrTouchstartListener)), this.isRange && (this.adapter.deregisterThumbEventHandler(i.START, "mouseenter", this.thumbMouseenterListener), this.adapter.deregisterThumbEventHandler(i.START, "mouseleave", this.thumbMouseleaveListener), this.adapter.deregisterInputEventHandler(i.START, "change", this.inputStartChangeListener), this.adapter.deregisterInputEventHandler(i.START, "focus", this.inputStartFocusListener), this.adapter.deregisterInputEventHandler(i.START, "blur", this.inputStartBlurListener)), this.adapter.deregisterThumbEventHandler(i.END, "mouseenter", this.thumbMouseenterListener), this.adapter.deregisterThumbEventHandler(i.END, "mouseleave", this.thumbMouseleaveListener), this.adapter.deregisterInputEventHandler(i.END, "change", this.inputEndChangeListener), this.adapter.deregisterInputEventHandler(i.END, "focus", this.inputEndFocusListener), this.adapter.deregisterInputEventHandler(i.END, "blur", this.inputEndBlurListener);
|
|
473
475
|
}, a.prototype.handlePointerup = function() {
|
|
474
476
|
this.handleUp(), this.adapter.deregisterEventHandler("pointermove", this.moveListener);
|
|
475
|
-
}, a.SUPPORTS_POINTER_EVENTS =
|
|
477
|
+
}, a.SUPPORTS_POINTER_EVENTS = ee && !!window.PointerEvent && // #setPointerCapture is buggy on iOS, so we can't use pointer events
|
|
476
478
|
// until the following bug is fixed:
|
|
477
479
|
// https://bugs.webkit.org/show_bug.cgi?id=220196
|
|
478
|
-
!
|
|
479
|
-
}(
|
|
480
|
+
!ht(), a;
|
|
481
|
+
}(nt)
|
|
480
482
|
);
|
|
481
|
-
function
|
|
483
|
+
function ht() {
|
|
482
484
|
return [
|
|
483
485
|
"iPad Simulator",
|
|
484
486
|
"iPhone Simulator",
|
|
@@ -488,15 +490,15 @@ function Dt() {
|
|
|
488
490
|
"iPod"
|
|
489
491
|
].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document;
|
|
490
492
|
}
|
|
491
|
-
function
|
|
492
|
-
var a = /(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(
|
|
493
|
+
function pt(s) {
|
|
494
|
+
var a = /(?:\.(\d+))?(?:[eE]([+\-]?\d+))?$/.exec(String(s));
|
|
493
495
|
if (!a)
|
|
494
496
|
return 0;
|
|
495
|
-
var
|
|
497
|
+
var e = a[1] || "", r = a[2] || 0;
|
|
496
498
|
return Math.max(
|
|
497
499
|
0,
|
|
498
500
|
// lower limit
|
|
499
|
-
(
|
|
501
|
+
(e === "0" ? 0 : e.length) - Number(r)
|
|
500
502
|
);
|
|
501
503
|
}
|
|
502
504
|
/**
|
|
@@ -521,359 +523,358 @@ function _t(v) {
|
|
|
521
523
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
522
524
|
* THE SOFTWARE.
|
|
523
525
|
*/
|
|
524
|
-
var
|
|
526
|
+
var mt = (
|
|
525
527
|
/** @class */
|
|
526
|
-
function(
|
|
527
|
-
|
|
528
|
+
function(s) {
|
|
529
|
+
Fe(a, s);
|
|
528
530
|
function a() {
|
|
529
|
-
var
|
|
530
|
-
return
|
|
531
|
+
var e = s !== null && s.apply(this, arguments) || this;
|
|
532
|
+
return e.skipInitialUIUpdate = !1, e.valueToAriaValueTextFn = null, e;
|
|
531
533
|
}
|
|
532
|
-
return a.attachTo = function(
|
|
533
|
-
return r === void 0 && (r = {}), new a(
|
|
534
|
+
return a.attachTo = function(e, r) {
|
|
535
|
+
return r === void 0 && (r = {}), new a(e, void 0, r);
|
|
534
536
|
}, a.prototype.getDefaultFoundation = function() {
|
|
535
|
-
var
|
|
536
|
-
hasClass: function(
|
|
537
|
-
return
|
|
537
|
+
var e = this, r = {
|
|
538
|
+
hasClass: function(t) {
|
|
539
|
+
return e.root.classList.contains(t);
|
|
538
540
|
},
|
|
539
|
-
addClass: function(
|
|
540
|
-
|
|
541
|
+
addClass: function(t) {
|
|
542
|
+
e.root.classList.add(t);
|
|
541
543
|
},
|
|
542
|
-
removeClass: function(
|
|
543
|
-
|
|
544
|
+
removeClass: function(t) {
|
|
545
|
+
e.root.classList.remove(t);
|
|
544
546
|
},
|
|
545
|
-
addThumbClass: function(
|
|
546
|
-
|
|
547
|
+
addThumbClass: function(t, n) {
|
|
548
|
+
e.getThumbEl(n).classList.add(t);
|
|
547
549
|
},
|
|
548
|
-
removeThumbClass: function(
|
|
549
|
-
|
|
550
|
+
removeThumbClass: function(t, n) {
|
|
551
|
+
e.getThumbEl(n).classList.remove(t);
|
|
550
552
|
},
|
|
551
|
-
getAttribute: function(
|
|
552
|
-
return
|
|
553
|
+
getAttribute: function(t) {
|
|
554
|
+
return e.root.getAttribute(t);
|
|
553
555
|
},
|
|
554
|
-
getInputValue: function(
|
|
555
|
-
return
|
|
556
|
+
getInputValue: function(t) {
|
|
557
|
+
return e.getInput(t).value;
|
|
556
558
|
},
|
|
557
|
-
setInputValue: function(
|
|
558
|
-
|
|
559
|
+
setInputValue: function(t, n) {
|
|
560
|
+
e.getInput(n).value = t;
|
|
559
561
|
},
|
|
560
|
-
getInputAttribute: function(
|
|
561
|
-
return
|
|
562
|
+
getInputAttribute: function(t, n) {
|
|
563
|
+
return e.getInput(n).getAttribute(t);
|
|
562
564
|
},
|
|
563
|
-
setInputAttribute: function(
|
|
564
|
-
|
|
565
|
+
setInputAttribute: function(t, n, u) {
|
|
566
|
+
e.getInput(u).setAttribute(t, n);
|
|
565
567
|
},
|
|
566
|
-
removeInputAttribute: function(
|
|
567
|
-
|
|
568
|
+
removeInputAttribute: function(t, n) {
|
|
569
|
+
e.getInput(n).removeAttribute(t);
|
|
568
570
|
},
|
|
569
|
-
focusInput: function(
|
|
570
|
-
|
|
571
|
+
focusInput: function(t) {
|
|
572
|
+
e.getInput(t).focus();
|
|
571
573
|
},
|
|
572
|
-
isInputFocused: function(
|
|
573
|
-
return
|
|
574
|
+
isInputFocused: function(t) {
|
|
575
|
+
return e.getInput(t) === document.activeElement;
|
|
574
576
|
},
|
|
575
|
-
getThumbKnobWidth: function(
|
|
576
|
-
return
|
|
577
|
+
getThumbKnobWidth: function(t) {
|
|
578
|
+
return e.getThumbEl(t).querySelector("." + l.THUMB_KNOB).getBoundingClientRect().width;
|
|
577
579
|
},
|
|
578
|
-
getThumbBoundingClientRect: function(
|
|
579
|
-
return
|
|
580
|
+
getThumbBoundingClientRect: function(t) {
|
|
581
|
+
return e.getThumbEl(t).getBoundingClientRect();
|
|
580
582
|
},
|
|
581
583
|
getBoundingClientRect: function() {
|
|
582
|
-
return
|
|
584
|
+
return e.root.getBoundingClientRect();
|
|
583
585
|
},
|
|
584
586
|
isRTL: function() {
|
|
585
|
-
return getComputedStyle(
|
|
587
|
+
return getComputedStyle(e.root).direction === "rtl";
|
|
586
588
|
},
|
|
587
|
-
setThumbStyleProperty: function(
|
|
588
|
-
|
|
589
|
+
setThumbStyleProperty: function(t, n, u) {
|
|
590
|
+
e.getThumbEl(u).style.setProperty(t, n);
|
|
589
591
|
},
|
|
590
|
-
removeThumbStyleProperty: function(
|
|
591
|
-
|
|
592
|
+
removeThumbStyleProperty: function(t, n) {
|
|
593
|
+
e.getThumbEl(n).style.removeProperty(t);
|
|
592
594
|
},
|
|
593
|
-
setTrackActiveStyleProperty: function(
|
|
594
|
-
|
|
595
|
+
setTrackActiveStyleProperty: function(t, n) {
|
|
596
|
+
e.trackActive.style.setProperty(t, n);
|
|
595
597
|
},
|
|
596
|
-
removeTrackActiveStyleProperty: function(
|
|
597
|
-
|
|
598
|
+
removeTrackActiveStyleProperty: function(t) {
|
|
599
|
+
e.trackActive.style.removeProperty(t);
|
|
598
600
|
},
|
|
599
|
-
setValueIndicatorText: function(
|
|
600
|
-
var
|
|
601
|
-
|
|
601
|
+
setValueIndicatorText: function(t, n) {
|
|
602
|
+
var u = e.getThumbEl(n).querySelector("." + l.VALUE_INDICATOR_TEXT);
|
|
603
|
+
u.textContent = String(t);
|
|
602
604
|
},
|
|
603
605
|
getValueToAriaValueTextFn: function() {
|
|
604
|
-
return
|
|
606
|
+
return e.valueToAriaValueTextFn;
|
|
605
607
|
},
|
|
606
|
-
updateTickMarks: function(
|
|
607
|
-
var n =
|
|
608
|
+
updateTickMarks: function(t) {
|
|
609
|
+
var n = e.root.querySelector("." + l.TICK_MARKS_CONTAINER);
|
|
608
610
|
if (!n) {
|
|
609
|
-
n = document.createElement("div"), n.classList.add(
|
|
610
|
-
var
|
|
611
|
-
|
|
611
|
+
n = document.createElement("div"), n.classList.add(l.TICK_MARKS_CONTAINER);
|
|
612
|
+
var u = e.root.querySelector("." + l.TRACK);
|
|
613
|
+
u.appendChild(n);
|
|
612
614
|
}
|
|
613
|
-
|
|
615
|
+
t.length !== n.children.length ? (n.innerHTML = "", e.addTickMarks(n, t)) : e.updateTickMarks(n, t);
|
|
614
616
|
},
|
|
615
|
-
setPointerCapture: function(
|
|
616
|
-
|
|
617
|
+
setPointerCapture: function(t) {
|
|
618
|
+
e.root.setPointerCapture(t);
|
|
617
619
|
},
|
|
618
|
-
emitChangeEvent: function(
|
|
619
|
-
|
|
620
|
+
emitChangeEvent: function(t, n) {
|
|
621
|
+
e.emit(Ue.CHANGE, { value: t, thumb: n });
|
|
620
622
|
},
|
|
621
|
-
emitInputEvent: function(
|
|
622
|
-
|
|
623
|
+
emitInputEvent: function(t, n) {
|
|
624
|
+
e.emit(Ue.INPUT, { value: t, thumb: n });
|
|
623
625
|
},
|
|
624
|
-
emitDragStartEvent: function(
|
|
625
|
-
|
|
626
|
+
emitDragStartEvent: function(t, n) {
|
|
627
|
+
e.getRipple(n).activate();
|
|
626
628
|
},
|
|
627
|
-
emitDragEndEvent: function(
|
|
628
|
-
|
|
629
|
+
emitDragEndEvent: function(t, n) {
|
|
630
|
+
e.getRipple(n).deactivate();
|
|
629
631
|
},
|
|
630
|
-
registerEventHandler: function(
|
|
631
|
-
|
|
632
|
+
registerEventHandler: function(t, n) {
|
|
633
|
+
e.listen(t, n);
|
|
632
634
|
},
|
|
633
|
-
deregisterEventHandler: function(
|
|
634
|
-
|
|
635
|
+
deregisterEventHandler: function(t, n) {
|
|
636
|
+
e.unlisten(t, n);
|
|
635
637
|
},
|
|
636
|
-
registerThumbEventHandler: function(
|
|
637
|
-
|
|
638
|
+
registerThumbEventHandler: function(t, n, u) {
|
|
639
|
+
e.getThumbEl(t).addEventListener(n, u);
|
|
638
640
|
},
|
|
639
|
-
deregisterThumbEventHandler: function(
|
|
640
|
-
|
|
641
|
+
deregisterThumbEventHandler: function(t, n, u) {
|
|
642
|
+
e.getThumbEl(t).removeEventListener(n, u);
|
|
641
643
|
},
|
|
642
|
-
registerInputEventHandler: function(
|
|
643
|
-
|
|
644
|
+
registerInputEventHandler: function(t, n, u) {
|
|
645
|
+
e.getInput(t).addEventListener(n, u);
|
|
644
646
|
},
|
|
645
|
-
deregisterInputEventHandler: function(
|
|
646
|
-
|
|
647
|
+
deregisterInputEventHandler: function(t, n, u) {
|
|
648
|
+
e.getInput(t).removeEventListener(n, u);
|
|
647
649
|
},
|
|
648
|
-
registerBodyEventHandler: function(
|
|
649
|
-
document.body.addEventListener(
|
|
650
|
+
registerBodyEventHandler: function(t, n) {
|
|
651
|
+
document.body.addEventListener(t, n);
|
|
650
652
|
},
|
|
651
|
-
deregisterBodyEventHandler: function(
|
|
652
|
-
document.body.removeEventListener(
|
|
653
|
+
deregisterBodyEventHandler: function(t, n) {
|
|
654
|
+
document.body.removeEventListener(t, n);
|
|
653
655
|
},
|
|
654
|
-
registerWindowEventHandler: function(
|
|
655
|
-
window.addEventListener(
|
|
656
|
+
registerWindowEventHandler: function(t, n) {
|
|
657
|
+
window.addEventListener(t, n);
|
|
656
658
|
},
|
|
657
|
-
deregisterWindowEventHandler: function(
|
|
658
|
-
window.removeEventListener(
|
|
659
|
+
deregisterWindowEventHandler: function(t, n) {
|
|
660
|
+
window.removeEventListener(t, n);
|
|
659
661
|
}
|
|
660
662
|
// tslint:enable:object-literal-sort-keys
|
|
661
663
|
};
|
|
662
|
-
return new
|
|
663
|
-
}, a.prototype.initialize = function(
|
|
664
|
-
var r =
|
|
665
|
-
this.inputs = [].slice.call(this.root.querySelectorAll("." +
|
|
664
|
+
return new ct(r);
|
|
665
|
+
}, a.prototype.initialize = function(e) {
|
|
666
|
+
var r = e === void 0 ? {} : e, t = r.skipInitialUIUpdate;
|
|
667
|
+
this.inputs = [].slice.call(this.root.querySelectorAll("." + l.INPUT)), this.thumbs = [].slice.call(this.root.querySelectorAll("." + l.THUMB)), this.trackActive = this.root.querySelector("." + l.TRACK_ACTIVE), this.ripples = this.createRipples(), t && (this.skipInitialUIUpdate = !0);
|
|
666
668
|
}, a.prototype.initialSyncWithDOM = function() {
|
|
667
669
|
this.foundation.layout({ skipUpdateUI: this.skipInitialUIUpdate });
|
|
668
670
|
}, a.prototype.layout = function() {
|
|
669
671
|
this.foundation.layout();
|
|
670
672
|
}, a.prototype.getValueStart = function() {
|
|
671
673
|
return this.foundation.getValueStart();
|
|
672
|
-
}, a.prototype.setValueStart = function(
|
|
673
|
-
this.foundation.setValueStart(
|
|
674
|
+
}, a.prototype.setValueStart = function(e) {
|
|
675
|
+
this.foundation.setValueStart(e);
|
|
674
676
|
}, a.prototype.getValue = function() {
|
|
675
677
|
return this.foundation.getValue();
|
|
676
|
-
}, a.prototype.setValue = function(
|
|
677
|
-
this.foundation.setValue(
|
|
678
|
+
}, a.prototype.setValue = function(e) {
|
|
679
|
+
this.foundation.setValue(e);
|
|
678
680
|
}, a.prototype.getDisabled = function() {
|
|
679
681
|
return this.foundation.getDisabled();
|
|
680
|
-
}, a.prototype.setDisabled = function(
|
|
681
|
-
this.foundation.setDisabled(
|
|
682
|
-
}, a.prototype.setValueToAriaValueTextFn = function(
|
|
683
|
-
this.valueToAriaValueTextFn =
|
|
684
|
-
}, a.prototype.getThumbEl = function(
|
|
685
|
-
return
|
|
686
|
-
}, a.prototype.getInput = function(
|
|
687
|
-
return
|
|
688
|
-
}, a.prototype.getRipple = function(
|
|
689
|
-
return
|
|
690
|
-
}, a.prototype.addTickMarks = function(
|
|
691
|
-
for (var
|
|
692
|
-
var
|
|
693
|
-
|
|
682
|
+
}, a.prototype.setDisabled = function(e) {
|
|
683
|
+
this.foundation.setDisabled(e);
|
|
684
|
+
}, a.prototype.setValueToAriaValueTextFn = function(e) {
|
|
685
|
+
this.valueToAriaValueTextFn = e;
|
|
686
|
+
}, a.prototype.getThumbEl = function(e) {
|
|
687
|
+
return e === i.END ? this.thumbs[this.thumbs.length - 1] : this.thumbs[0];
|
|
688
|
+
}, a.prototype.getInput = function(e) {
|
|
689
|
+
return e === i.END ? this.inputs[this.inputs.length - 1] : this.inputs[0];
|
|
690
|
+
}, a.prototype.getRipple = function(e) {
|
|
691
|
+
return e === i.END ? this.ripples[this.ripples.length - 1] : this.ripples[0];
|
|
692
|
+
}, a.prototype.addTickMarks = function(e, r) {
|
|
693
|
+
for (var t = document.createDocumentFragment(), n = 0; n < r.length; n++) {
|
|
694
|
+
var u = document.createElement("div"), c = r[n] === w.ACTIVE ? l.TICK_MARK_ACTIVE : l.TICK_MARK_INACTIVE;
|
|
695
|
+
u.classList.add(c), t.appendChild(u);
|
|
694
696
|
}
|
|
695
|
-
|
|
696
|
-
}, a.prototype.updateTickMarks = function(
|
|
697
|
-
for (var
|
|
698
|
-
r[n] ===
|
|
697
|
+
e.appendChild(t);
|
|
698
|
+
}, a.prototype.updateTickMarks = function(e, r) {
|
|
699
|
+
for (var t = Array.from(e.children), n = 0; n < t.length; n++)
|
|
700
|
+
r[n] === w.ACTIVE ? (t[n].classList.add(l.TICK_MARK_ACTIVE), t[n].classList.remove(l.TICK_MARK_INACTIVE)) : (t[n].classList.add(l.TICK_MARK_INACTIVE), t[n].classList.remove(l.TICK_MARK_ACTIVE));
|
|
699
701
|
}, a.prototype.createRipples = function() {
|
|
700
|
-
for (var
|
|
701
|
-
var
|
|
702
|
-
|
|
702
|
+
for (var e = [], r = [].slice.call(this.root.querySelectorAll("." + l.THUMB)), t = function(c) {
|
|
703
|
+
var v = r[c], f = n.inputs[c], R = j(j({}, Le.createAdapter(n)), { addClass: function(b) {
|
|
704
|
+
v.classList.add(b);
|
|
703
705
|
}, computeBoundingRect: function() {
|
|
704
|
-
return
|
|
705
|
-
}, deregisterInteractionHandler: function(
|
|
706
|
-
|
|
706
|
+
return v.getBoundingClientRect();
|
|
707
|
+
}, deregisterInteractionHandler: function(b, T) {
|
|
708
|
+
f.removeEventListener(b, T);
|
|
707
709
|
}, isSurfaceActive: function() {
|
|
708
|
-
return
|
|
710
|
+
return st(f, ":active");
|
|
709
711
|
}, isUnbounded: function() {
|
|
710
712
|
return !0;
|
|
711
|
-
}, registerInteractionHandler: function(
|
|
712
|
-
|
|
713
|
-
}, removeClass: function(
|
|
714
|
-
|
|
715
|
-
}, updateCssVariable: function(
|
|
716
|
-
|
|
717
|
-
} }),
|
|
718
|
-
|
|
719
|
-
}, n = this,
|
|
720
|
-
|
|
721
|
-
return
|
|
713
|
+
}, registerInteractionHandler: function(b, T) {
|
|
714
|
+
f.addEventListener(b, T, at());
|
|
715
|
+
}, removeClass: function(b) {
|
|
716
|
+
v.classList.remove(b);
|
|
717
|
+
}, updateCssVariable: function(b, T) {
|
|
718
|
+
v.style.setProperty(b, T);
|
|
719
|
+
} }), N = new Le(v, new ut(R));
|
|
720
|
+
N.unbounded = !0, e.push(N);
|
|
721
|
+
}, n = this, u = 0; u < r.length; u++)
|
|
722
|
+
t(u);
|
|
723
|
+
return e;
|
|
722
724
|
}, a;
|
|
723
|
-
}(
|
|
724
|
-
)
|
|
725
|
-
const Mt = {
|
|
725
|
+
}(it)
|
|
726
|
+
), vt = {
|
|
726
727
|
/**
|
|
727
728
|
* Accessibility label for assistive technologies.
|
|
728
729
|
*
|
|
729
730
|
* Defaults to **null**.
|
|
730
731
|
*/
|
|
731
|
-
ariaLabel:
|
|
732
|
+
ariaLabel: d.string,
|
|
732
733
|
/**
|
|
733
734
|
* Id of the component being labeled for assistive technologies.
|
|
734
735
|
*
|
|
735
736
|
* Defaults to **null**.
|
|
736
737
|
*/
|
|
737
|
-
ariaLabelledBy:
|
|
738
|
+
ariaLabelledBy: d.string,
|
|
738
739
|
/**
|
|
739
740
|
* Set this input attribute to a string that makes the slider value understandable, e.g. 'Monday'.
|
|
740
741
|
*
|
|
741
742
|
* Defaults to **null**.
|
|
742
743
|
*/
|
|
743
|
-
ariaValuetext:
|
|
744
|
+
ariaValuetext: d.string,
|
|
744
745
|
/**
|
|
745
746
|
* The css class name to be passed through to the component markup.
|
|
746
747
|
*
|
|
747
748
|
* Defaults to **undefined**.
|
|
748
749
|
*/
|
|
749
|
-
className:
|
|
750
|
+
className: d.string,
|
|
750
751
|
/**
|
|
751
752
|
* Prevent user interaction.
|
|
752
753
|
*
|
|
753
754
|
* Defaults to **false**.
|
|
754
755
|
*/
|
|
755
|
-
disabled:
|
|
756
|
+
disabled: d.bool,
|
|
756
757
|
/**
|
|
757
758
|
* Discrete sliders display a numeric value label when the slider control is focused, which allows a user to input an exact value.
|
|
758
759
|
*
|
|
759
760
|
* Defaults to **false**.
|
|
760
761
|
*/
|
|
761
|
-
discrete:
|
|
762
|
+
discrete: d.bool,
|
|
762
763
|
/**
|
|
763
764
|
* Display tracker markers with discrete slider only.
|
|
764
765
|
*
|
|
765
766
|
* Defaults to **false**.
|
|
766
767
|
*/
|
|
767
|
-
displayMarkers:
|
|
768
|
+
displayMarkers: d.bool,
|
|
768
769
|
/**
|
|
769
770
|
* ID for html input. May be overwritten.
|
|
770
771
|
*
|
|
771
772
|
* Defaults to **null**.
|
|
772
773
|
*/
|
|
773
|
-
id:
|
|
774
|
+
id: d.string,
|
|
774
775
|
/**
|
|
775
776
|
* Custom content to be displayed in the leading block container. See leadingBlockType for types supported. If a string is sent for a icon an Element Icon will be rendered
|
|
776
777
|
*
|
|
777
778
|
* Defaults to **null**.
|
|
778
779
|
*/
|
|
779
|
-
leadingBlock:
|
|
780
|
+
leadingBlock: d.node,
|
|
780
781
|
/**
|
|
781
782
|
* Props to be added to the leading block node. For example, if an input is chosen, this is where you should send the input value and you can send in variant: 'filled' to use a filled textfield.
|
|
782
783
|
*
|
|
783
784
|
* Defaults to **null**.
|
|
784
785
|
*/
|
|
785
|
-
leadingBlockProps:
|
|
786
|
+
leadingBlockProps: d.object,
|
|
786
787
|
/**
|
|
787
788
|
* Styles to be added to leading block div.
|
|
788
789
|
*
|
|
789
790
|
* Defaults to **null**.
|
|
790
791
|
*/
|
|
791
|
-
leadingBlockStyle:
|
|
792
|
+
leadingBlockStyle: d.object,
|
|
792
793
|
/**
|
|
793
794
|
* The type of media that will render in the leading block.
|
|
794
795
|
*
|
|
795
796
|
* Defaults to **null**.
|
|
796
797
|
*/
|
|
797
|
-
leadingBlockType:
|
|
798
|
+
leadingBlockType: d.oneOf(["", "icon", "input", "text"]),
|
|
798
799
|
/**
|
|
799
800
|
* The maximum value a slider can have.
|
|
800
801
|
*
|
|
801
802
|
* Defaults to **100**.
|
|
802
803
|
*/
|
|
803
|
-
max:
|
|
804
|
+
max: d.number,
|
|
804
805
|
/**
|
|
805
806
|
* The minimum value a slider can have.
|
|
806
807
|
*
|
|
807
808
|
* Defaults to **0**.
|
|
808
809
|
*/
|
|
809
|
-
min:
|
|
810
|
+
min: d.number,
|
|
810
811
|
/**
|
|
811
812
|
* When using the range slider, this is the value of the minimum knob of the slider. The maximum value will use the standard value prop.
|
|
812
813
|
*
|
|
813
814
|
* Defaults to **'0'**.
|
|
814
815
|
*/
|
|
815
|
-
minValue:
|
|
816
|
+
minValue: d.oneOfType([d.number, d.string, d.object]),
|
|
816
817
|
/**
|
|
817
818
|
* Fired when the slider is blurred after the value of slider changes.
|
|
818
819
|
*
|
|
819
820
|
* Defaults to **null**.
|
|
820
821
|
*/
|
|
821
|
-
onChange:
|
|
822
|
+
onChange: d.func,
|
|
822
823
|
/**
|
|
823
824
|
* Fired whenever the value of slider changes.
|
|
824
825
|
*
|
|
825
826
|
* Defaults to **null**.
|
|
826
827
|
*/
|
|
827
|
-
onInput:
|
|
828
|
+
onInput: d.func,
|
|
828
829
|
/**
|
|
829
830
|
* Allows the slider to have two knobs to select a range value.
|
|
830
831
|
*
|
|
831
832
|
* Defaults to **false**.
|
|
832
833
|
*/
|
|
833
|
-
range:
|
|
834
|
+
range: d.bool,
|
|
834
835
|
/**
|
|
835
836
|
* Specifies the increments at which a slider value can be set. Can be any positive number.
|
|
836
837
|
*
|
|
837
838
|
* Defaults to **1**.
|
|
838
839
|
*/
|
|
839
|
-
step:
|
|
840
|
+
step: d.number,
|
|
840
841
|
/**
|
|
841
842
|
* Slider color theme.
|
|
842
843
|
*
|
|
843
844
|
* Defaults to **'primary'**.
|
|
844
845
|
*/
|
|
845
|
-
themeColor:
|
|
846
|
+
themeColor: d.oneOf(["primary", "secondary"]),
|
|
846
847
|
/**
|
|
847
848
|
* Custom content to be displayed in the trailing block container. See trailingBlockType for types supported. If a string is sent for icon an Element Icon will be rendered.
|
|
848
849
|
*
|
|
849
850
|
* Defaults to **null**.
|
|
850
851
|
*/
|
|
851
|
-
trailingBlock:
|
|
852
|
+
trailingBlock: d.node,
|
|
852
853
|
/**
|
|
853
854
|
* Props to be added to the trailing block node. For example, if an input is chosen, this is where you should send the input value and you can send in variant: 'filled' to use a filled textfield.
|
|
854
855
|
*
|
|
855
856
|
* Defaults to **null**.
|
|
856
857
|
*/
|
|
857
|
-
trailingBlockProps:
|
|
858
|
+
trailingBlockProps: d.object,
|
|
858
859
|
/**
|
|
859
860
|
* Styles to be added to trailing block div.
|
|
860
861
|
*
|
|
861
862
|
* Defaults to **null**.
|
|
862
863
|
*/
|
|
863
|
-
trailingBlockStyle:
|
|
864
|
+
trailingBlockStyle: d.object,
|
|
864
865
|
/**
|
|
865
866
|
* The type of media that will render in the trailing block.
|
|
866
867
|
*
|
|
867
868
|
* Defaults to **null**.
|
|
868
869
|
*/
|
|
869
|
-
trailingBlockType:
|
|
870
|
+
trailingBlockType: d.oneOf(["", "icon", "input", "text"]),
|
|
870
871
|
/**
|
|
871
872
|
* The current value of the slider. If the slider is a range slider, it will be the max value of the slider.
|
|
872
873
|
*
|
|
873
|
-
* Defaults to **
|
|
874
|
+
* Defaults to **'0'**.
|
|
874
875
|
*/
|
|
875
|
-
value:
|
|
876
|
-
},
|
|
876
|
+
value: d.oneOfType([d.number, d.string, d.object])
|
|
877
|
+
}, ft = {
|
|
877
878
|
ariaLabel: null,
|
|
878
879
|
ariaLabelledBy: null,
|
|
879
880
|
ariaValuetext: null,
|
|
@@ -889,6 +890,8 @@ const Mt = {
|
|
|
889
890
|
max: 100,
|
|
890
891
|
min: 0,
|
|
891
892
|
minValue: "0",
|
|
893
|
+
onChange: null,
|
|
894
|
+
onInput: null,
|
|
892
895
|
range: !1,
|
|
893
896
|
step: 1,
|
|
894
897
|
themeColor: "primary",
|
|
@@ -896,273 +899,275 @@ const Mt = {
|
|
|
896
899
|
trailingBlockProps: null,
|
|
897
900
|
trailingBlockStyle: null,
|
|
898
901
|
trailingBlockType: null,
|
|
899
|
-
value:
|
|
900
|
-
},
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
...x.current,
|
|
932
|
-
layout: () => {
|
|
933
|
-
p.current && p.current.foundation.layout();
|
|
934
|
-
}
|
|
935
|
-
}), [p]);
|
|
936
|
-
const w = B((u) => b ? u >= S && u <= M : u >= S && u <= I, [S, M, I, b]), H = B((u) => b ? u <= I && u >= P : u <= I && u >= S, [I, P, S, b]);
|
|
937
|
-
k(() => (p.current = Nt.attachTo(x.current), () => {
|
|
938
|
-
var u;
|
|
939
|
-
(u = p.current) === null || u === void 0 || u.destroy();
|
|
940
|
-
}), [p]), k(() => {
|
|
941
|
-
p.current.foundation.min = S, p.current.foundation.max = I, p.current.foundation.step = R, p.current.foundation.layout();
|
|
942
|
-
}, [p, m, y, I, S, R]), k(() => {
|
|
943
|
-
p.current.foundation.layout();
|
|
944
|
-
}, [p, _, C]);
|
|
945
|
-
const j = B((u) => {
|
|
946
|
-
q && q(u.detail, u);
|
|
947
|
-
}, [q]), J = B((u) => {
|
|
948
|
-
const E = u.target.value;
|
|
949
|
-
f.onChange && f.onChange({
|
|
950
|
-
value: E && parseInt(E, 10),
|
|
951
|
-
thumb: 1
|
|
902
|
+
value: "0"
|
|
903
|
+
}, Tt = ["ariaLabel", "ariaLabelledBy", "ariaValuetext", "className", "disabled", "discrete", "displayMarkers", "id", "leadingBlock", "leadingBlockProps", "leadingBlockStyle", "leadingBlockType", "max", "min", "minValue", "onChange", "onInput", "range", "step", "themeColor", "trailingBlock", "trailingBlockProps", "trailingBlockStyle", "trailingBlockType", "value"];
|
|
904
|
+
function He(s, a) {
|
|
905
|
+
var e = Je(s);
|
|
906
|
+
if (_e) {
|
|
907
|
+
var r = _e(s);
|
|
908
|
+
a && (r = tt(r).call(r, function(t) {
|
|
909
|
+
return Oe(s, t).enumerable;
|
|
910
|
+
})), e.push.apply(e, r);
|
|
911
|
+
}
|
|
912
|
+
return e;
|
|
913
|
+
}
|
|
914
|
+
function xe(s) {
|
|
915
|
+
for (var a = 1; a < arguments.length; a++) {
|
|
916
|
+
var e, r, t = arguments[a] != null ? arguments[a] : {};
|
|
917
|
+
a % 2 ? Ae(e = He(Object(t), !0)).call(e, function(n) {
|
|
918
|
+
Qe(s, n, t[n]);
|
|
919
|
+
}) : Ce ? Ye(s, Ce(t)) : Ae(r = He(Object(t))).call(r, function(n) {
|
|
920
|
+
et(s, n, Oe(t, n));
|
|
921
|
+
});
|
|
922
|
+
}
|
|
923
|
+
return s;
|
|
924
|
+
}
|
|
925
|
+
var m = ft, te = /* @__PURE__ */ rt(function(s, a) {
|
|
926
|
+
var e, r, t = s.ariaLabel, n = t === void 0 ? m.ariaLabel : t, u = s.ariaLabelledBy, c = u === void 0 ? m.ariaLabelledBy : u, v = s.ariaValuetext, f = v === void 0 ? m.ariaValuetext : v, R = s.className, N = R === void 0 ? m.className : R, b = s.disabled, T = b === void 0 ? m.disabled : b, O = s.discrete, k = O === void 0 ? m.discrete : O, re = s.displayMarkers, z = re === void 0 ? m.displayMarkers : re, ne = s.id, Ke = ne === void 0 ? m.id : ne, ie = s.leadingBlock, M = ie === void 0 ? m.leadingBlock : ie, ae = s.leadingBlockProps, A = ae === void 0 ? m.leadingBlockProps : ae, se = s.leadingBlockStyle, $e = se === void 0 ? m.leadingBlockStyle : se, ue = s.leadingBlockType, U = ue === void 0 ? m.leadingBlockType : ue, oe = s.max, S = oe === void 0 ? m.max : oe, le = s.min, y = le === void 0 ? m.min : le, de = s.minValue, L = de === void 0 ? m.minValue : de, ce = s.onChange, G = ce === void 0 ? m.onChange : ce, he = s.onInput, Z = he === void 0 ? m.onInput : he, pe = s.range, I = pe === void 0 ? m.range : pe, me = s.step, D = me === void 0 ? m.step : me, ve = s.themeColor, H = ve === void 0 ? m.themeColor : ve, fe = s.trailingBlock, B = fe === void 0 ? m.trailingBlock : fe, Te = s.trailingBlockProps, C = Te === void 0 ? m.trailingBlockProps : Te, ge = s.trailingBlockStyle, We = ge === void 0 ? m.trailingBlockStyle : ge, Ee = s.trailingBlockType, _ = Ee === void 0 ? m.trailingBlockType : Ee, be = s.value, P = be === void 0 ? m.value : be, Xe = Ze(s, Tt), $ = De(), h = De();
|
|
927
|
+
Ne(a, function() {
|
|
928
|
+
return $.current;
|
|
929
|
+
}, []), Ne(a, function() {
|
|
930
|
+
return xe(xe({}, $.current), {}, {
|
|
931
|
+
layout: function() {
|
|
932
|
+
h.current && h.current.foundation.layout();
|
|
933
|
+
}
|
|
952
934
|
});
|
|
953
|
-
}, [
|
|
954
|
-
|
|
935
|
+
}, [h]);
|
|
936
|
+
var F = x(function(o) {
|
|
937
|
+
return I ? o >= y && o <= P : o >= y && o <= S;
|
|
938
|
+
}, [y, P, S, I]), K = x(function(o) {
|
|
939
|
+
return I ? o <= S && o >= L : o <= S && o >= y;
|
|
940
|
+
}, [S, L, y, I]);
|
|
941
|
+
V(function() {
|
|
942
|
+
return h.current = mt.attachTo($.current), function() {
|
|
943
|
+
var o;
|
|
944
|
+
(o = h.current) === null || o === void 0 || o.destroy();
|
|
945
|
+
};
|
|
946
|
+
}, [h]), V(function() {
|
|
947
|
+
h.current.foundation.min = y, h.current.foundation.max = S, h.current.foundation.step = D, h.current.foundation.layout();
|
|
948
|
+
}, [h, k, z, S, y, D]), V(function() {
|
|
949
|
+
h.current.foundation.layout();
|
|
950
|
+
}, [h, U, _]);
|
|
951
|
+
var J = x(function(o) {
|
|
952
|
+
G && G(o.detail, o);
|
|
953
|
+
}, [G]), Ie = x(function(o) {
|
|
954
|
+
var E = o.target.value;
|
|
955
955
|
A.onChange && A.onChange({
|
|
956
|
-
value: E &&
|
|
956
|
+
value: E && Re(E, 10),
|
|
957
|
+
thumb: 1
|
|
958
|
+
});
|
|
959
|
+
}, [A]), Se = x(function(o) {
|
|
960
|
+
var E = o.target.value;
|
|
961
|
+
C.onChange && C.onChange({
|
|
962
|
+
value: E && Re(E, 10),
|
|
957
963
|
thumb: 2
|
|
958
964
|
});
|
|
959
|
-
}, [
|
|
960
|
-
|
|
961
|
-
var
|
|
962
|
-
return (
|
|
965
|
+
}, [C]);
|
|
966
|
+
V(function() {
|
|
967
|
+
var o;
|
|
968
|
+
return (o = h.current) === null || o === void 0 || o.listen("MDCSlider:change", J), function() {
|
|
963
969
|
var E;
|
|
964
|
-
(E =
|
|
970
|
+
(E = h.current) === null || E === void 0 || E.unlisten("MDCSlider:change", J);
|
|
965
971
|
};
|
|
966
|
-
}, [
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
}, [
|
|
970
|
-
|
|
971
|
-
var
|
|
972
|
-
return (
|
|
972
|
+
}, [h, J]);
|
|
973
|
+
var Q = x(function(o) {
|
|
974
|
+
Z && Z(o.detail, o);
|
|
975
|
+
}, [Z]);
|
|
976
|
+
V(function() {
|
|
977
|
+
var o;
|
|
978
|
+
return (o = h.current) === null || o === void 0 || o.listen("MDCSlider:input", Q), function() {
|
|
973
979
|
var E;
|
|
974
|
-
(E =
|
|
980
|
+
(E = h.current) === null || E === void 0 || E.unlisten("MDCSlider:input", Q);
|
|
975
981
|
};
|
|
976
|
-
}, [
|
|
977
|
-
if (
|
|
978
|
-
if (
|
|
982
|
+
}, [h, Q]), V(function() {
|
|
983
|
+
if (I) {
|
|
984
|
+
if (K(P)) {
|
|
979
985
|
var E;
|
|
980
|
-
(E =
|
|
986
|
+
(E = h.current) === null || E === void 0 || E.setValue(P);
|
|
981
987
|
}
|
|
982
|
-
if (
|
|
983
|
-
var
|
|
984
|
-
(
|
|
988
|
+
if (F(L)) {
|
|
989
|
+
var Y;
|
|
990
|
+
(Y = h.current) === null || Y === void 0 || Y.setValueStart(L);
|
|
985
991
|
}
|
|
986
992
|
} else {
|
|
987
|
-
var
|
|
988
|
-
(
|
|
993
|
+
var o;
|
|
994
|
+
(o = h.current) === null || o === void 0 || o.setValue(P);
|
|
989
995
|
}
|
|
990
|
-
}, [
|
|
991
|
-
var
|
|
992
|
-
(
|
|
993
|
-
}, [
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
switch (
|
|
996
|
+
}, [h, P, L, I, F, K]), V(function() {
|
|
997
|
+
var o;
|
|
998
|
+
(o = h.current) === null || o === void 0 || o.setDisabled(T);
|
|
999
|
+
}, [h, T]);
|
|
1000
|
+
var je = ke(function() {
|
|
1001
|
+
var o = I ? P - 1 : S;
|
|
1002
|
+
switch (U) {
|
|
997
1003
|
case "icon":
|
|
998
|
-
return
|
|
999
|
-
icon:
|
|
1000
|
-
},
|
|
1004
|
+
return M && typeof M == "string" ? /* @__PURE__ */ p.createElement(Be, W({
|
|
1005
|
+
icon: M
|
|
1006
|
+
}, A)) : M;
|
|
1001
1007
|
case "input":
|
|
1002
|
-
return
|
|
1003
|
-
min:
|
|
1004
|
-
max:
|
|
1005
|
-
step:
|
|
1008
|
+
return M ? (I || _ !== "input") && Me(M, {
|
|
1009
|
+
min: y,
|
|
1010
|
+
max: o,
|
|
1011
|
+
step: D,
|
|
1006
1012
|
type: "number",
|
|
1007
|
-
valid:
|
|
1008
|
-
}) : (
|
|
1013
|
+
valid: F(A?.value)
|
|
1014
|
+
}) : (I || _ !== "input") && /* @__PURE__ */ p.createElement(Pe, W({
|
|
1009
1015
|
variant: "outlined"
|
|
1010
|
-
},
|
|
1016
|
+
}, A, {
|
|
1011
1017
|
dense: !0,
|
|
1012
1018
|
type: "number",
|
|
1013
|
-
min:
|
|
1014
|
-
max:
|
|
1015
|
-
step:
|
|
1016
|
-
onChange:
|
|
1017
|
-
valid:
|
|
1019
|
+
min: y,
|
|
1020
|
+
max: o,
|
|
1021
|
+
step: D,
|
|
1022
|
+
onChange: Ie,
|
|
1023
|
+
valid: F(A?.value)
|
|
1018
1024
|
}));
|
|
1019
1025
|
default:
|
|
1020
|
-
return
|
|
1026
|
+
return M;
|
|
1021
1027
|
}
|
|
1022
|
-
}, [
|
|
1023
|
-
|
|
1024
|
-
switch (
|
|
1028
|
+
}, [U, M, _, y, P, D, A, I, Ie, F, S]), qe = ke(function() {
|
|
1029
|
+
var o = I ? L : y;
|
|
1030
|
+
switch (_) {
|
|
1025
1031
|
case "icon":
|
|
1026
|
-
return
|
|
1027
|
-
icon:
|
|
1028
|
-
}) :
|
|
1032
|
+
return _ && typeof B == "string" ? /* @__PURE__ */ p.createElement(Be, {
|
|
1033
|
+
icon: B
|
|
1034
|
+
}) : B;
|
|
1029
1035
|
case "input":
|
|
1030
|
-
return
|
|
1031
|
-
min:
|
|
1032
|
-
max:
|
|
1033
|
-
step:
|
|
1036
|
+
return B ? _ && Me(B, {
|
|
1037
|
+
min: o,
|
|
1038
|
+
max: S,
|
|
1039
|
+
step: D,
|
|
1034
1040
|
type: "number",
|
|
1035
|
-
valid:
|
|
1036
|
-
}) : /* @__PURE__ */
|
|
1041
|
+
valid: K(C?.value)
|
|
1042
|
+
}) : /* @__PURE__ */ p.createElement(Pe, W({
|
|
1037
1043
|
variant: "outlined"
|
|
1038
|
-
},
|
|
1044
|
+
}, C, {
|
|
1039
1045
|
dense: !0,
|
|
1040
1046
|
type: "number",
|
|
1041
|
-
min:
|
|
1042
|
-
max:
|
|
1043
|
-
step:
|
|
1044
|
-
onChange:
|
|
1045
|
-
valid:
|
|
1047
|
+
min: o,
|
|
1048
|
+
max: S,
|
|
1049
|
+
step: D,
|
|
1050
|
+
onChange: Se,
|
|
1051
|
+
valid: K(C?.value)
|
|
1046
1052
|
}));
|
|
1047
1053
|
default:
|
|
1048
|
-
return
|
|
1054
|
+
return B;
|
|
1049
1055
|
}
|
|
1050
|
-
}, [
|
|
1051
|
-
return /* @__PURE__ */
|
|
1052
|
-
className:
|
|
1053
|
-
},
|
|
1054
|
-
className:
|
|
1055
|
-
style:
|
|
1056
|
-
},
|
|
1056
|
+
}, [_, B, C, L, y, S, D, Se, I, K]), ze = U !== "input" || (I || _ !== "input") && U === "input", Ge = _ || B !== null || B !== void 0;
|
|
1057
|
+
return /* @__PURE__ */ p.createElement("div", {
|
|
1058
|
+
className: X("lmnt", "lmnt-slider-container", T && "lmnt-slider--disabled")
|
|
1059
|
+
}, ze && /* @__PURE__ */ p.createElement("div", {
|
|
1060
|
+
className: X("lmnt-slider-info", "lmnt-slider-info-leading", U === "input" && "lmnt-slider-info-with-input", H === "primary" && "lmnt-slider-info--primary", H === "secondary" && "lmnt-slider-info--secondary"),
|
|
1061
|
+
style: $e
|
|
1062
|
+
}, je), /* @__PURE__ */ p.createElement("div", {
|
|
1057
1063
|
className: "lmnt lmnt-slider-inner"
|
|
1058
|
-
}, /* @__PURE__ */
|
|
1059
|
-
className:
|
|
1060
|
-
id:
|
|
1061
|
-
ref:
|
|
1062
|
-
},
|
|
1064
|
+
}, /* @__PURE__ */ p.createElement("div", W({
|
|
1065
|
+
className: X("lmnt", "mdc-slider", I && "mdc-slider--range", k && "mdc-slider--discrete", k && z && "mdc-slider--tick-marks", H === "primary" && "mdc-slider--primary", H === "secondary" && "mdc-slider--secondary", N),
|
|
1066
|
+
id: Ke,
|
|
1067
|
+
ref: $
|
|
1068
|
+
}, Xe), I && /* @__PURE__ */ p.createElement("input", {
|
|
1063
1069
|
className: "mdc-slider__input",
|
|
1064
1070
|
name: "rangeStart",
|
|
1065
1071
|
type: "range",
|
|
1066
|
-
step:
|
|
1067
|
-
min:
|
|
1068
|
-
max:
|
|
1069
|
-
defaultValue:
|
|
1070
|
-
"aria-label":
|
|
1071
|
-
"aria-labelledby":
|
|
1072
|
-
"aria-valuetext":
|
|
1073
|
-
"aria-disabled":
|
|
1074
|
-
disabled:
|
|
1075
|
-
tabIndex:
|
|
1072
|
+
step: D,
|
|
1073
|
+
min: y,
|
|
1074
|
+
max: S,
|
|
1075
|
+
defaultValue: L,
|
|
1076
|
+
"aria-label": n,
|
|
1077
|
+
"aria-labelledby": c,
|
|
1078
|
+
"aria-valuetext": f,
|
|
1079
|
+
"aria-disabled": T,
|
|
1080
|
+
disabled: T,
|
|
1081
|
+
tabIndex: T ? -1 : "0",
|
|
1076
1082
|
readOnly: !0
|
|
1077
|
-
}), /* @__PURE__ */
|
|
1083
|
+
}), /* @__PURE__ */ p.createElement("input", {
|
|
1078
1084
|
className: "mdc-slider__input",
|
|
1079
1085
|
type: "range",
|
|
1080
1086
|
name: "rangeEnd",
|
|
1081
|
-
step:
|
|
1082
|
-
min:
|
|
1083
|
-
max:
|
|
1084
|
-
defaultValue:
|
|
1085
|
-
"aria-label":
|
|
1086
|
-
"aria-labelledby":
|
|
1087
|
-
"aria-valuetext":
|
|
1088
|
-
"aria-disabled":
|
|
1089
|
-
disabled:
|
|
1090
|
-
tabIndex:
|
|
1087
|
+
step: D,
|
|
1088
|
+
min: y,
|
|
1089
|
+
max: S,
|
|
1090
|
+
defaultValue: P,
|
|
1091
|
+
"aria-label": n,
|
|
1092
|
+
"aria-labelledby": c,
|
|
1093
|
+
"aria-valuetext": f,
|
|
1094
|
+
"aria-disabled": T,
|
|
1095
|
+
disabled: T,
|
|
1096
|
+
tabIndex: T ? -1 : "0",
|
|
1091
1097
|
readOnly: !0
|
|
1092
|
-
}), /* @__PURE__ */
|
|
1098
|
+
}), /* @__PURE__ */ p.createElement("div", {
|
|
1093
1099
|
className: "mdc-slider__track"
|
|
1094
|
-
}, /* @__PURE__ */
|
|
1100
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
1095
1101
|
className: "mdc-slider__track--inactive"
|
|
1096
|
-
}), /* @__PURE__ */
|
|
1102
|
+
}), /* @__PURE__ */ p.createElement("div", {
|
|
1097
1103
|
className: "mdc-slider__track--active"
|
|
1098
|
-
}, /* @__PURE__ */
|
|
1104
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
1099
1105
|
className: "mdc-slider__track--active_fill"
|
|
1100
|
-
})),
|
|
1106
|
+
})), k && z && /* @__PURE__ */ p.createElement("div", {
|
|
1101
1107
|
className: "mdc-slider__tick-marks"
|
|
1102
|
-
})),
|
|
1108
|
+
})), I && /* @__PURE__ */ p.createElement("div", {
|
|
1103
1109
|
className: "mdc-slider__thumb"
|
|
1104
|
-
},
|
|
1110
|
+
}, k && /* @__PURE__ */ p.createElement("div", {
|
|
1105
1111
|
className: "mdc-slider__value-indicator-container",
|
|
1106
1112
|
"aria-hidden": "true"
|
|
1107
|
-
}, /* @__PURE__ */
|
|
1113
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
1108
1114
|
className: "mdc-slider__value-indicator"
|
|
1109
|
-
}, /* @__PURE__ */
|
|
1115
|
+
}, /* @__PURE__ */ p.createElement("span", {
|
|
1110
1116
|
className: "mdc-slider__value-indicator-text"
|
|
1111
|
-
}, (
|
|
1117
|
+
}, (e = h.current) === null || e === void 0 ? void 0 : e.getValueStart()))), /* @__PURE__ */ p.createElement("div", {
|
|
1112
1118
|
className: "mdc-slider__thumb-knob"
|
|
1113
|
-
})), /* @__PURE__ */
|
|
1119
|
+
})), /* @__PURE__ */ p.createElement("div", {
|
|
1114
1120
|
className: "mdc-slider__thumb"
|
|
1115
|
-
},
|
|
1121
|
+
}, k && /* @__PURE__ */ p.createElement("div", {
|
|
1116
1122
|
className: "mdc-slider__value-indicator-container",
|
|
1117
1123
|
"aria-hidden": "true"
|
|
1118
|
-
}, /* @__PURE__ */
|
|
1124
|
+
}, /* @__PURE__ */ p.createElement("div", {
|
|
1119
1125
|
className: "mdc-slider__value-indicator"
|
|
1120
|
-
}, /* @__PURE__ */
|
|
1126
|
+
}, /* @__PURE__ */ p.createElement("span", {
|
|
1121
1127
|
className: "mdc-slider__value-indicator-text"
|
|
1122
|
-
}, (r =
|
|
1128
|
+
}, (r = h.current) === null || r === void 0 ? void 0 : r.getValue()))), /* @__PURE__ */ p.createElement("div", {
|
|
1123
1129
|
className: "mdc-slider__thumb-knob"
|
|
1124
|
-
})))),
|
|
1125
|
-
className:
|
|
1126
|
-
style:
|
|
1127
|
-
},
|
|
1130
|
+
})))), Ge && /* @__PURE__ */ p.createElement("div", {
|
|
1131
|
+
className: X("lmnt-slider-info", "lmnt-slider-info-trailing", _ === "input" && "lmnt-slider-info-with-input", H === "primary" && "lmnt-slider-info--primary", H === "secondary" && "lmnt-slider-info--secondary"),
|
|
1132
|
+
style: We
|
|
1133
|
+
}, qe));
|
|
1128
1134
|
});
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
propertyName: v,
|
|
1135
|
+
te.displayName = "Slider";
|
|
1136
|
+
te.propTypes = vt;
|
|
1137
|
+
const Pt = ({
|
|
1138
|
+
propertyName: s,
|
|
1134
1139
|
label: a,
|
|
1135
|
-
minValue:
|
|
1140
|
+
minValue: e,
|
|
1136
1141
|
maxValue: r,
|
|
1137
|
-
step:
|
|
1142
|
+
step: t,
|
|
1138
1143
|
disabled: n,
|
|
1139
|
-
...
|
|
1144
|
+
...u
|
|
1140
1145
|
}) => {
|
|
1141
|
-
const { control:
|
|
1142
|
-
return /* @__PURE__ */
|
|
1143
|
-
|
|
1146
|
+
const { control: c } = lt();
|
|
1147
|
+
return /* @__PURE__ */ ye(
|
|
1148
|
+
dt,
|
|
1144
1149
|
{
|
|
1145
|
-
name:
|
|
1146
|
-
control:
|
|
1147
|
-
render: ({ field:
|
|
1148
|
-
|
|
1150
|
+
name: s,
|
|
1151
|
+
control: c,
|
|
1152
|
+
render: ({ field: v }) => /* @__PURE__ */ ye(
|
|
1153
|
+
te,
|
|
1149
1154
|
{
|
|
1150
1155
|
"data-testid": "slider",
|
|
1151
|
-
...
|
|
1152
|
-
onChange: (
|
|
1153
|
-
|
|
1156
|
+
...v,
|
|
1157
|
+
onChange: (f) => {
|
|
1158
|
+
v.onChange(f.value);
|
|
1154
1159
|
},
|
|
1155
1160
|
label: a,
|
|
1156
|
-
min:
|
|
1161
|
+
min: e,
|
|
1157
1162
|
max: r,
|
|
1158
|
-
step:
|
|
1163
|
+
step: t,
|
|
1159
1164
|
disabled: n,
|
|
1160
|
-
...
|
|
1165
|
+
...u
|
|
1161
1166
|
}
|
|
1162
1167
|
)
|
|
1163
1168
|
}
|
|
1164
1169
|
);
|
|
1165
1170
|
};
|
|
1166
1171
|
export {
|
|
1167
|
-
|
|
1172
|
+
Pt as FormSlider
|
|
1168
1173
|
};
|