@progress/kendo-react-inputs 13.4.0-develop.2 → 13.4.0-develop.4
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/checkbox/Checkbox.js +1 -1
- package/checkbox/Checkbox.mjs +23 -23
- package/checkbox/interfaces/CheckboxProps.d.ts +1 -1
- package/colors/ColorGradient.mjs +4 -4
- package/colors/ColorInput.d.ts +1 -1
- package/colors/ColorPicker.js +1 -1
- package/colors/ColorPicker.mjs +12 -12
- package/colors/FlatColorPicker.d.ts +1 -1
- package/colors/FlatColorPicker.mjs +11 -11
- package/colors/HexInput.d.ts +1 -1
- package/colors/interfaces/ColorGradientProps.d.ts +1 -1
- package/colors/interfaces/ColorPickerProps.d.ts +1 -1
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/input/Input.mjs +13 -13
- package/maskedtextbox/MaskedTextBox.d.ts +1 -1
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +15 -15
- package/maskedtextbox/MaskedTextBoxProps.d.ts +1 -1
- package/numerictextbox/NumericTextBox.js +1 -1
- package/numerictextbox/NumericTextBox.mjs +40 -40
- package/numerictextbox/interfaces/NumericTextBoxProps.d.ts +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +1 -1
- package/package.json +10 -10
- package/radiobutton/RadioButton.mjs +18 -18
- package/radiobutton/RadioGroup.mjs +15 -15
- package/range-slider/RangeSlider.mjs +15 -15
- package/rating/Rating.mjs +12 -12
- package/rating/RatingItem.mjs +4 -4
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +13 -13
- package/signature/interfaces/SignatureProps.d.ts +1 -1
- package/slider/Slider.d.ts +12 -78
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +241 -191
- package/switch/Switch.d.ts +11 -126
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +187 -209
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +21 -21
- package/textarea/interfaces/TextAreaProps.d.ts +1 -1
- package/textbox/Textbox.d.ts +2 -1
- package/textbox/Textbox.js +1 -1
- package/textbox/Textbox.mjs +19 -19
package/slider/Slider.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react"),le=require("prop-types"),c=require("@progress/kendo-react-common"),j=require("@progress/kendo-react-intl"),u=require("../messages/index.js"),re=require("./SliderLabel.js"),_=require("@progress/kendo-react-buttons"),g=require("@progress/kendo-svg-icons");function F(e){const k=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const d in e)if(d!=="default"){const b=Object.getOwnPropertyDescriptor(e,d);Object.defineProperty(k,d,b.get?b:{enumerable:!0,get:()=>e[d]})}}return k.default=e,Object.freeze(k)}const i=F(n),r=F(le),v={step:1,largeStep:10,buttons:!1,vertical:!1,disabled:!1,tabIndex:0},T=i.forwardRef((e,k)=>{var K,M,O;const{step:d=v.step,largeStep:b=v.largeStep,vertical:l=v.vertical,disabled:E=v.disabled,tabIndex:U=v.tabIndex}=e,[H,W]=n.useState((K=e.defaultValue)!=null?K:e.min),[X,V]=n.useState(!1),[R,G]=n.useState(e.dir),L=n.useRef(null),h=n.useRef(null),A=n.useMemo(()=>new j.LocalizationService,[]),z=n.useRef(null),N=e.value!==void 0,x=N&&e.value!==void 0?e.value:H,s=n.useMemo(()=>{const{min:t,max:a}=e;return x<t?t:x>a?a:x},[x,e.min,e.max]),y=n.useMemo(()=>{const{min:t,max:a}=e,o=a-t;return o===0?0:(s-t)/o*100},[s,e.min,e.max]),f=(M=e.dir)!=null?M:R;n.useEffect(()=>{if(e.dir===void 0&&h.current){const a=window.getComputedStyle(h.current).direction;a!==R&&G(a)}},[e.dir,R]);const q=n.useCallback(t=>{let a=t;for(;a;){if(a.getAttribute(re.SLIDER_LABEL_ATTRIBUTE))return!0;a=a.parentElement}return!1},[]),m=n.useCallback((t,a)=>{const o=Math.min(Math.max(a,e.min),e.max);N||W(o),c.dispatchEvent(e.onChange,t,z.current,{value:o})},[e.min,e.max,e.onChange,N]),Y=n.useCallback(()=>{V(!0)},[]),J=n.useCallback(()=>{V(!1)},[]),Q=n.useCallback(t=>{let a;t.keyCode===c.Keys.left||t.keyCode===c.Keys.down?a=s-(d||0):t.keyCode===c.Keys.right||t.keyCode===c.Keys.up?a=s+(d||0):t.keyCode===c.Keys.pageDown?a=s-(b||0):t.keyCode===c.Keys.pageUp?a=s+(b||0):t.keyCode===c.Keys.home?a=e.min:t.keyCode===c.Keys.end&&(a=e.max),a!==void 0&&(t.preventDefault(),m(t,a))},[s,d,b,e.min,e.max,m]),Z=n.useCallback(t=>{t.preventDefault(),m(t,s-(d||0))},[s,d,m]),$=n.useCallback(t=>{t.preventDefault(),m(t,s+(d||0))},[s,d,m]),I=n.useCallback(t=>{const a=t.element.getBoundingClientRect();let o;l?o=a.bottom-t.event.clientY:o=f==="rtl"?a.right-t.event.clientX:t.event.clientX-a.left;const C=l?a.height:a.width,S=o/C;m(t,e.min+S*(e.max-e.min))},[l,e.min,e.max,f,m]),p=n.useCallback(t=>{q(t.event.originalEvent.target)||(t.event.isTouch&&t.event.originalEvent.preventDefault(),I(t))},[q,I]),ee=n.useCallback(t=>{t.event.originalEvent.preventDefault(),I(t)},[I]),w=n.useCallback(()=>{h.current&&h.current.focus()},[]),te=n.useCallback(t=>{if(!t.enabled)return t.children;let a,o,C,S;return f==="rtl"?(a=l?g.caretAltUpIcon:g.caretAltLeftIcon,o=l?g.caretAltDownIcon:g.caretAltRightIcon,C=l?"caret-alt-up":"caret-alt-left",S=l?"caret-alt-down":"caret-alt-right"):(a=l?g.caretAltUpIcon:g.caretAltRightIcon,o=l?g.caretAltDownIcon:g.caretAltLeftIcon,C=l?"caret-alt-up":"caret-alt-right",S=l?"caret-alt-down":"caret-alt-left"),i.createElement(i.Fragment,null,i.createElement(_.Button,{className:"k-button-decrease",rounded:"full",icon:S,svgIcon:o,title:t.decrementTitle,onClick:t.decrement}),t.children,i.createElement(_.Button,{className:"k-button-increase",rounded:"full",icon:C,svgIcon:a,title:t.incrementTitle,onClick:t.increment}))},[f,l]);n.useImperativeHandle(k,()=>({props:e,sliderTrack:L.current,focus:w}),[e,w]),n.useEffect(()=>{z.current={props:e,sliderTrack:L.current,focus:w}},[e,w]);const ae=l?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},ne=l?{paddingTop:0,height:"100%"}:{};let D;return l?D={bottom:"calc("+y+"%)",zIndex:1}:f==="rtl"?D={right:"calc("+y+"% - 13px)",zIndex:1}:D={left:"calc("+y+"%)",zIndex:1},i.createElement("div",{ref:h,dir:f,id:e.id,style:{gap:0,...e.style},onFocus:Y,onBlur:J,onKeyDown:Q,className:c.classNames("k-slider",{"k-focus":X,"k-disabled":E,"k-slider-horizontal":!l,"k-slider-vertical":l},e.className)},te({enabled:(O=e.buttons)!=null?O:v.buttons,decrement:Z,increment:$,incrementTitle:A.toLanguageString(u.sliderIncreaseValue,u.messages[u.sliderIncreaseValue]),decrementTitle:A.toLanguageString(u.sliderDecreaseValue,u.messages[u.sliderDecreaseValue]),children:i.createElement(c.Draggable,{onDrag:ee,onPress:p,autoScroll:!1},i.createElement("div",{className:"k-slider-track-wrap",style:{flexGrow:1,position:"relative",touchAction:"none",...ae}},e.children&&i.createElement("ul",{className:"k-reset k-slider-items",style:{margin:0,...ne}},i.Children.map(e.children,(t,a)=>t&&i.cloneElement(t,{position:100*(t.props.position-e.min)/(e.max-e.min),vertical:l,firstTick:a===0,lastTick:a===i.Children.count(e.children)-1},t.props.children))),i.createElement("div",{className:"k-slider-track",style:l?{bottom:0,height:"100%"}:{[f==="rtl"?"right":"left"]:0,width:"100%"},ref:L},i.createElement("div",{className:"k-slider-selection",style:l?{height:y+"%"}:{width:y+"%"}}),i.createElement("span",{role:"slider","aria-valuemin":e.min,"aria-valuemax":e.max,"aria-valuenow":s,"aria-valuetext":String(s),"aria-orientation":l?"vertical":void 0,"aria-disabled":E?"true":void 0,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-label":e.ariaLabel,tabIndex:c.getTabIndex(U,E,void 0),className:"k-draghandle k-draghandle-end",title:A.toLanguageString(u.sliderDragTitle,u.messages[u.sliderDragTitle]),style:D}))))}))});T.displayName="Slider";const P=c.createPropsContext(),B=c.withPropsContext(P,T);B.displayName="KendoReactSlider";B.propTypes={value:r.number,defaultValue:r.number,min:r.number.isRequired,max:r.number.isRequired,step:r.number,largeStep:r.number,onChange:r.func,style:r.object,className:r.string,buttons:r.bool,tabIndex:r.number,disabled:r.bool,vertical:r.bool,id:r.string,ariaDescribedBy:r.string,ariaLabelledBy:r.string,ariaLabel:r.string,dir:r.oneOf(["ltr","rtl"]),children:r.node};j.registerForLocalization(T);exports.Slider=B;exports.SliderPropsContext=P;exports.SliderWithoutContext=T;
|
package/slider/Slider.mjs
CHANGED
|
@@ -5,216 +5,266 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import * as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
import * as l from "react";
|
|
9
|
+
import { useState as L, useRef as R, useMemo as N, useEffect as q, useCallback as o, useImperativeHandle as me } from "react";
|
|
10
|
+
import * as i from "prop-types";
|
|
11
|
+
import { withPropsContext as ue, createPropsContext as fe, dispatchEvent as ge, Keys as s, classNames as ve, Draggable as he, getTabIndex as be } from "@progress/kendo-react-common";
|
|
12
|
+
import { LocalizationService as ye, registerForLocalization as ke } from "@progress/kendo-react-intl";
|
|
13
|
+
import { sliderDragTitle as H, messages as A, sliderDecreaseValue as O, sliderIncreaseValue as X } from "../messages/index.mjs";
|
|
14
|
+
import { SLIDER_LABEL_ATTRIBUTE as xe } from "./SliderLabel.mjs";
|
|
15
|
+
import { Button as _ } from "@progress/kendo-react-buttons";
|
|
16
|
+
import { caretAltUpIcon as j, caretAltLeftIcon as G, caretAltDownIcon as W, caretAltRightIcon as Y } from "@progress/kendo-svg-icons";
|
|
17
|
+
const f = {
|
|
18
|
+
step: 1,
|
|
19
|
+
largeStep: 10,
|
|
20
|
+
buttons: !1,
|
|
21
|
+
vertical: !1,
|
|
22
|
+
disabled: !1,
|
|
23
|
+
tabIndex: 0
|
|
24
|
+
}, z = l.forwardRef((t, P) => {
|
|
25
|
+
var M, K, U;
|
|
26
|
+
const {
|
|
27
|
+
step: m = f.step,
|
|
28
|
+
largeStep: w = f.largeStep,
|
|
29
|
+
vertical: a = f.vertical,
|
|
30
|
+
disabled: C = f.disabled,
|
|
31
|
+
tabIndex: Q = f.tabIndex
|
|
32
|
+
} = t, [Z, $] = L((M = t.defaultValue) != null ? M : t.min), [p, B] = L(!1), [I, ee] = L(t.dir), E = R(null), g = R(null), T = N(() => new ye(), []), V = R(null), D = t.value !== void 0, y = D && t.value !== void 0 ? t.value : Z, r = N(() => {
|
|
33
|
+
const { min: e, max: n } = t;
|
|
34
|
+
return y < e ? e : y > n ? n : y;
|
|
35
|
+
}, [y, t.min, t.max]), v = N(() => {
|
|
36
|
+
const { min: e, max: n } = t, c = n - e;
|
|
37
|
+
return c === 0 ? 0 : (r - e) / c * 100;
|
|
38
|
+
}, [r, t.min, t.max]), u = (K = t.dir) != null ? K : I;
|
|
39
|
+
q(() => {
|
|
40
|
+
if (t.dir === void 0 && g.current) {
|
|
41
|
+
const n = window.getComputedStyle(g.current).direction;
|
|
42
|
+
n !== I && ee(n);
|
|
43
|
+
}
|
|
44
|
+
}, [t.dir, I]);
|
|
45
|
+
const F = o((e) => {
|
|
46
|
+
let n = e;
|
|
47
|
+
for (; n; ) {
|
|
48
|
+
if (n.getAttribute(xe))
|
|
49
|
+
return !0;
|
|
50
|
+
n = n.parentElement;
|
|
51
|
+
}
|
|
52
|
+
return !1;
|
|
53
|
+
}, []), d = o(
|
|
54
|
+
(e, n) => {
|
|
55
|
+
const c = Math.min(Math.max(n, t.min), t.max);
|
|
56
|
+
D || $(c), ge(t.onChange, e, V.current, { value: c });
|
|
57
|
+
},
|
|
58
|
+
[t.min, t.max, t.onChange, D]
|
|
59
|
+
), te = o(() => {
|
|
60
|
+
B(!0);
|
|
61
|
+
}, []), ne = o(() => {
|
|
62
|
+
B(!1);
|
|
63
|
+
}, []), ae = o(
|
|
64
|
+
(e) => {
|
|
65
|
+
let n;
|
|
66
|
+
e.keyCode === s.left || e.keyCode === s.down ? n = r - (m || 0) : e.keyCode === s.right || e.keyCode === s.up ? n = r + (m || 0) : e.keyCode === s.pageDown ? n = r - (w || 0) : e.keyCode === s.pageUp ? n = r + (w || 0) : e.keyCode === s.home ? n = t.min : e.keyCode === s.end && (n = t.max), n !== void 0 && (e.preventDefault(), d(e, n));
|
|
67
|
+
},
|
|
68
|
+
[r, m, w, t.min, t.max, d]
|
|
69
|
+
), ie = o(
|
|
70
|
+
(e) => {
|
|
71
|
+
e.preventDefault(), d(e, r - (m || 0));
|
|
72
|
+
},
|
|
73
|
+
[r, m, d]
|
|
74
|
+
), le = o(
|
|
75
|
+
(e) => {
|
|
76
|
+
e.preventDefault(), d(e, r + (m || 0));
|
|
77
|
+
},
|
|
78
|
+
[r, m, d]
|
|
79
|
+
), k = o(
|
|
80
|
+
(e) => {
|
|
81
|
+
const n = e.element.getBoundingClientRect();
|
|
82
|
+
let c;
|
|
83
|
+
a ? c = n.bottom - e.event.clientY : c = u === "rtl" ? n.right - e.event.clientX : e.event.clientX - n.left;
|
|
84
|
+
const h = a ? n.height : n.width, b = c / h;
|
|
85
|
+
d(e, t.min + b * (t.max - t.min));
|
|
86
|
+
},
|
|
87
|
+
[a, t.min, t.max, u, d]
|
|
88
|
+
), re = o(
|
|
89
|
+
(e) => {
|
|
90
|
+
F(e.event.originalEvent.target) || (e.event.isTouch && e.event.originalEvent.preventDefault(), k(e));
|
|
91
|
+
},
|
|
92
|
+
[F, k]
|
|
93
|
+
), ce = o(
|
|
94
|
+
(e) => {
|
|
95
|
+
e.event.originalEvent.preventDefault(), k(e);
|
|
96
|
+
},
|
|
97
|
+
[k]
|
|
98
|
+
), x = o(() => {
|
|
99
|
+
g.current && g.current.focus();
|
|
100
|
+
}, []), oe = o(
|
|
101
|
+
(e) => {
|
|
102
|
+
if (!e.enabled)
|
|
103
|
+
return e.children;
|
|
104
|
+
let n, c, h, b;
|
|
105
|
+
return u === "rtl" ? (n = a ? j : G, c = a ? W : Y, h = a ? "caret-alt-up" : "caret-alt-left", b = a ? "caret-alt-down" : "caret-alt-right") : (n = a ? j : Y, c = a ? W : G, h = a ? "caret-alt-up" : "caret-alt-right", b = a ? "caret-alt-down" : "caret-alt-left"), /* @__PURE__ */ l.createElement(l.Fragment, null, /* @__PURE__ */ l.createElement(
|
|
106
|
+
_,
|
|
28
107
|
{
|
|
29
108
|
className: "k-button-decrease",
|
|
30
109
|
rounded: "full",
|
|
31
|
-
icon:
|
|
32
|
-
svgIcon:
|
|
33
|
-
title:
|
|
34
|
-
onClick:
|
|
110
|
+
icon: b,
|
|
111
|
+
svgIcon: c,
|
|
112
|
+
title: e.decrementTitle,
|
|
113
|
+
onClick: e.decrement
|
|
35
114
|
}
|
|
36
|
-
),
|
|
37
|
-
|
|
115
|
+
), e.children, /* @__PURE__ */ l.createElement(
|
|
116
|
+
_,
|
|
38
117
|
{
|
|
39
118
|
className: "k-button-increase",
|
|
40
119
|
rounded: "full",
|
|
41
|
-
icon:
|
|
42
|
-
svgIcon:
|
|
43
|
-
title:
|
|
44
|
-
onClick:
|
|
120
|
+
icon: h,
|
|
121
|
+
svgIcon: n,
|
|
122
|
+
title: e.incrementTitle,
|
|
123
|
+
onClick: e.increment
|
|
45
124
|
}
|
|
46
125
|
));
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
t.keyCode === n.left || t.keyCode === n.down ? e = this.state.value - (this.props.step || 0) : t.keyCode === n.right || t.keyCode === n.up ? e = this.state.value + (this.props.step || 0) : t.keyCode === n.pageDown ? e = this.state.value - (this.props.largeStep || 0) : t.keyCode === n.pageUp ? e = this.state.value + (this.props.largeStep || 0) : t.keyCode === n.home ? e = this.props.min : t.keyCode === n.end && (e = this.props.max), e !== void 0 && (t.preventDefault(), this.change(t, e));
|
|
64
|
-
}, this.decrement = (t) => {
|
|
65
|
-
t.preventDefault(), this.change(t, this.state.value - (this.props.step || 0));
|
|
66
|
-
}, this.increment = (t) => {
|
|
67
|
-
t.preventDefault(), this.change(t, this.state.value + (this.props.step || 0));
|
|
68
|
-
}, this.dragStart = (t) => {
|
|
69
|
-
this.isLabel(t.event.originalEvent.target) || (t.event.isTouch && t.event.originalEvent.preventDefault(), this.drag(t));
|
|
70
|
-
}, this.dragOver = (t) => {
|
|
71
|
-
t.event.originalEvent.preventDefault(), this.drag(t);
|
|
72
|
-
}, this.drag = (t) => {
|
|
73
|
-
const e = t.element.getBoundingClientRect(), l = this.props.vertical ? e.bottom - t.event.clientY : this.state.dir === "rtl" ? e.right - t.event.clientX : t.event.clientX - e.left, r = this.props.vertical ? e.height : e.width, o = l / r;
|
|
74
|
-
this.change(t, this.props.min + o * (this.props.max - this.props.min));
|
|
126
|
+
},
|
|
127
|
+
[u, a]
|
|
128
|
+
);
|
|
129
|
+
me(
|
|
130
|
+
P,
|
|
131
|
+
() => ({
|
|
132
|
+
props: t,
|
|
133
|
+
sliderTrack: E.current,
|
|
134
|
+
focus: x
|
|
135
|
+
}),
|
|
136
|
+
[t, x]
|
|
137
|
+
), q(() => {
|
|
138
|
+
V.current = {
|
|
139
|
+
props: t,
|
|
140
|
+
sliderTrack: E.current,
|
|
141
|
+
focus: x
|
|
75
142
|
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
render() {
|
|
97
|
-
const s = D(this), t = (this.state.value - this.props.min) / (this.props.max - this.props.min) * 100, e = this.props.vertical ? { marginTop: "0.5rem", marginBottom: "0.5rem" } : { marginLeft: "0.5rem", marginRight: "0.5rem" }, l = this.props.vertical ? { paddingTop: 0, height: "100%" } : {};
|
|
98
|
-
return /* @__PURE__ */ i.createElement(
|
|
99
|
-
"div",
|
|
100
|
-
{
|
|
101
|
-
ref: (r) => {
|
|
102
|
-
this._element = r;
|
|
143
|
+
}, [t, x]);
|
|
144
|
+
const de = a ? { marginTop: "0.5rem", marginBottom: "0.5rem" } : { marginLeft: "0.5rem", marginRight: "0.5rem" }, se = a ? { paddingTop: 0, height: "100%" } : {};
|
|
145
|
+
let S;
|
|
146
|
+
return a ? S = { bottom: "calc(" + v + "%)", zIndex: 1 } : u === "rtl" ? S = { right: "calc(" + v + "% - 13px)", zIndex: 1 } : S = { left: "calc(" + v + "%)", zIndex: 1 }, /* @__PURE__ */ l.createElement(
|
|
147
|
+
"div",
|
|
148
|
+
{
|
|
149
|
+
ref: g,
|
|
150
|
+
dir: u,
|
|
151
|
+
id: t.id,
|
|
152
|
+
style: { gap: 0, ...t.style },
|
|
153
|
+
onFocus: te,
|
|
154
|
+
onBlur: ne,
|
|
155
|
+
onKeyDown: ae,
|
|
156
|
+
className: ve(
|
|
157
|
+
"k-slider",
|
|
158
|
+
{
|
|
159
|
+
"k-focus": p,
|
|
160
|
+
"k-disabled": C,
|
|
161
|
+
"k-slider-horizontal": !a,
|
|
162
|
+
"k-slider-vertical": a
|
|
103
163
|
},
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
/* @__PURE__ */ i.createElement(
|
|
122
|
-
this.buttons,
|
|
164
|
+
t.className
|
|
165
|
+
)
|
|
166
|
+
},
|
|
167
|
+
oe({
|
|
168
|
+
enabled: (U = t.buttons) != null ? U : f.buttons,
|
|
169
|
+
decrement: ie,
|
|
170
|
+
increment: le,
|
|
171
|
+
incrementTitle: T.toLanguageString(
|
|
172
|
+
X,
|
|
173
|
+
A[X]
|
|
174
|
+
),
|
|
175
|
+
decrementTitle: T.toLanguageString(
|
|
176
|
+
O,
|
|
177
|
+
A[O]
|
|
178
|
+
),
|
|
179
|
+
children: /* @__PURE__ */ l.createElement(he, { onDrag: ce, onPress: re, autoScroll: !1 }, /* @__PURE__ */ l.createElement(
|
|
180
|
+
"div",
|
|
123
181
|
{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
182
|
+
className: "k-slider-track-wrap",
|
|
183
|
+
style: {
|
|
184
|
+
flexGrow: 1,
|
|
185
|
+
position: "relative",
|
|
186
|
+
touchAction: "none",
|
|
187
|
+
...de
|
|
188
|
+
}
|
|
129
189
|
},
|
|
130
|
-
/* @__PURE__ */
|
|
190
|
+
t.children && /* @__PURE__ */ l.createElement("ul", { className: "k-reset k-slider-items", style: { margin: 0, ...se } }, l.Children.map(t.children, (e, n) => e && l.cloneElement(
|
|
191
|
+
e,
|
|
192
|
+
{
|
|
193
|
+
position: 100 * (e.props.position - t.min) / (t.max - t.min),
|
|
194
|
+
vertical: a,
|
|
195
|
+
firstTick: n === 0,
|
|
196
|
+
lastTick: n === l.Children.count(t.children) - 1
|
|
197
|
+
},
|
|
198
|
+
e.props.children
|
|
199
|
+
))),
|
|
200
|
+
/* @__PURE__ */ l.createElement(
|
|
131
201
|
"div",
|
|
132
202
|
{
|
|
133
|
-
className: "k-slider-track
|
|
134
|
-
style: {
|
|
135
|
-
|
|
136
|
-
position: "relative",
|
|
137
|
-
touchAction: "none",
|
|
138
|
-
...e
|
|
139
|
-
}
|
|
203
|
+
className: "k-slider-track",
|
|
204
|
+
style: a ? { bottom: 0, height: "100%" } : { [u === "rtl" ? "right" : "left"]: 0, width: "100%" },
|
|
205
|
+
ref: E
|
|
140
206
|
},
|
|
141
|
-
|
|
142
|
-
r,
|
|
143
|
-
{
|
|
144
|
-
position: 100 * (r.props.position - this.props.min) / (this.props.max - this.props.min),
|
|
145
|
-
vertical: this.props.vertical,
|
|
146
|
-
firstTick: o === 0,
|
|
147
|
-
lastTick: o === i.Children.count(this.props.children) - 1
|
|
148
|
-
},
|
|
149
|
-
r.props.children
|
|
150
|
-
))),
|
|
151
|
-
/* @__PURE__ */ i.createElement(
|
|
207
|
+
/* @__PURE__ */ l.createElement(
|
|
152
208
|
"div",
|
|
153
209
|
{
|
|
154
|
-
className: "k-slider-
|
|
155
|
-
style:
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
"
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
"
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"aria-label": this.props.ariaLabel,
|
|
180
|
-
tabIndex: T(this.props.tabIndex, this.props.disabled, void 0),
|
|
181
|
-
className: "k-draghandle k-draghandle-end",
|
|
182
|
-
title: s.toLanguageString(u, h[u]),
|
|
183
|
-
style: this.props.vertical ? { bottom: "calc(" + t + "%)", zIndex: 1 } : this.state.dir === "rtl" ? { right: "calc(" + t + "% - 13px)", zIndex: 1 } : { left: "calc(" + t + "%)", zIndex: 1 }
|
|
184
|
-
}
|
|
185
|
-
)
|
|
210
|
+
className: "k-slider-selection",
|
|
211
|
+
style: a ? { height: v + "%" } : { width: v + "%" }
|
|
212
|
+
}
|
|
213
|
+
),
|
|
214
|
+
/* @__PURE__ */ l.createElement(
|
|
215
|
+
"span",
|
|
216
|
+
{
|
|
217
|
+
role: "slider",
|
|
218
|
+
"aria-valuemin": t.min,
|
|
219
|
+
"aria-valuemax": t.max,
|
|
220
|
+
"aria-valuenow": r,
|
|
221
|
+
"aria-valuetext": String(r),
|
|
222
|
+
"aria-orientation": a ? "vertical" : void 0,
|
|
223
|
+
"aria-disabled": C ? "true" : void 0,
|
|
224
|
+
"aria-labelledby": t.ariaLabelledBy,
|
|
225
|
+
"aria-describedby": t.ariaDescribedBy,
|
|
226
|
+
"aria-label": t.ariaLabel,
|
|
227
|
+
tabIndex: be(Q, C, void 0),
|
|
228
|
+
className: "k-draghandle k-draghandle-end",
|
|
229
|
+
title: T.toLanguageString(
|
|
230
|
+
H,
|
|
231
|
+
A[H]
|
|
232
|
+
),
|
|
233
|
+
style: S
|
|
234
|
+
}
|
|
186
235
|
)
|
|
187
|
-
)
|
|
188
|
-
)
|
|
189
|
-
)
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
236
|
+
)
|
|
237
|
+
))
|
|
238
|
+
})
|
|
239
|
+
);
|
|
240
|
+
});
|
|
241
|
+
z.displayName = "Slider";
|
|
242
|
+
const Se = fe(), J = ue(Se, z);
|
|
243
|
+
J.displayName = "KendoReactSlider";
|
|
244
|
+
J.propTypes = {
|
|
245
|
+
value: i.number,
|
|
246
|
+
defaultValue: i.number,
|
|
247
|
+
min: i.number.isRequired,
|
|
248
|
+
max: i.number.isRequired,
|
|
249
|
+
step: i.number,
|
|
250
|
+
largeStep: i.number,
|
|
251
|
+
onChange: i.func,
|
|
252
|
+
style: i.object,
|
|
253
|
+
className: i.string,
|
|
254
|
+
buttons: i.bool,
|
|
255
|
+
tabIndex: i.number,
|
|
256
|
+
disabled: i.bool,
|
|
257
|
+
vertical: i.bool,
|
|
258
|
+
id: i.string,
|
|
259
|
+
ariaDescribedBy: i.string,
|
|
260
|
+
ariaLabelledBy: i.string,
|
|
261
|
+
ariaLabel: i.string,
|
|
262
|
+
dir: i.oneOf(["ltr", "rtl"]),
|
|
263
|
+
children: i.node
|
|
211
264
|
};
|
|
212
|
-
|
|
213
|
-
const L = w(), A = y(L, c);
|
|
214
|
-
A.displayName = "KendoReactSlider";
|
|
215
|
-
C(c);
|
|
265
|
+
ke(z);
|
|
216
266
|
export {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
267
|
+
J as Slider,
|
|
268
|
+
Se as SliderPropsContext,
|
|
269
|
+
z as SliderWithoutContext
|
|
220
270
|
};
|