@progress/kendo-react-inputs 8.2.0-develop.9 → 8.2.1-develop.1

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.
@@ -8,17 +8,17 @@
8
8
  "use client";
9
9
  import * as n from "react";
10
10
  import t from "prop-types";
11
- import { useInternationalization as Je, useLocalization as Qe } from "@progress/kendo-react-intl";
12
- import { createPropsContext as Xe, validatePackage as Ze, usePropsContext as et, useId as tt, useCustomComponent as pe, dispatchEvent as Q, getActiveElement as be, useIsomorphicLayoutEffect as nt, classNames as rt, kendoThemeMaps as ge, getTabIndex as at } from "@progress/kendo-react-common";
13
- import { caretAltUpIcon as lt, caretAltDownIcon as st } from "@progress/kendo-svg-icons";
14
- import { FloatingLabel as ot } from "@progress/kendo-react-labels";
15
- import { packageMetadata as ut } from "../package-metadata.mjs";
16
- import { numericIncreaseValue as M, messages as F, numericDecreaseValue as T } from "../messages/index.mjs";
11
+ import { useInternationalization as Qe, useLocalization as Xe } from "@progress/kendo-react-intl";
12
+ import { createPropsContext as Ze, validatePackage as et, usePropsContext as tt, useId as nt, useCustomComponent as pe, dispatchEvent as Q, getActiveElement as be, useIsomorphicLayoutEffect as rt, classNames as at, kendoThemeMaps as ge, getTabIndex as lt } from "@progress/kendo-react-common";
13
+ import { caretAltUpIcon as st, caretAltDownIcon as ot } from "@progress/kendo-svg-icons";
14
+ import { FloatingLabel as ut } from "@progress/kendo-react-labels";
15
+ import { packageMetadata as ct } from "../package-metadata.mjs";
16
+ import { numericIncreaseValue as B, messages as M, numericDecreaseValue as T } from "../messages/index.mjs";
17
17
  import { getInitialState as ve, formatValue as z, getStateOrPropsValue as X, rangeValue as G, sanitizeNumber as ye, decreaseValue as Ve, increaseValue as ke } from "./utils/index.mjs";
18
18
  import { Button as Ce } from "@progress/kendo-react-buttons";
19
- const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) => {
20
- Ze(ut);
21
- const q = et(ct, C), {
19
+ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) => {
20
+ et(ct);
21
+ const q = tt(dt, C), {
22
22
  className: xe,
23
23
  value: b,
24
24
  defaultValue: he,
@@ -28,7 +28,7 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
28
28
  accessKey: Oe,
29
29
  title: Le,
30
30
  placeholder: ee,
31
- min: c,
31
+ min: i,
32
32
  max: d,
33
33
  dir: te,
34
34
  name: j,
@@ -37,43 +37,44 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
37
37
  ariaDescribedBy: Ne,
38
38
  ariaLabelledBy: De,
39
39
  ariaLabel: Re,
40
- inputType: Be,
40
+ inputType: Fe,
41
41
  readOnly: g,
42
42
  validationMessage: A,
43
- children: Me,
43
+ children: Be,
44
44
  style: ne,
45
- inputStyle: Fe,
45
+ inputStyle: Me,
46
46
  valid: _,
47
- step: v = i.step,
48
- spinners: Te = i.spinners,
49
- disabled: o = i.disabled,
50
- required: H = i.required,
51
- validityStyles: re = i.validityStyles,
52
- prefix: ze = i.prefix,
53
- suffix: Ge = i.suffix,
54
- onChange: E = i.onChange,
55
- onFocus: ae = i.onFocus,
56
- onBlur: le = i.onBlur,
57
- rangeOnEnter: se = i.rangeOnEnter,
58
- size: K = i.size,
59
- rounded: w = i.rounded,
60
- fillMode: O = i.fillMode,
47
+ step: v = u.step,
48
+ spinners: Te = u.spinners,
49
+ disabled: o = u.disabled,
50
+ required: H = u.required,
51
+ validityStyles: re = u.validityStyles,
52
+ prefix: ze = u.prefix,
53
+ suffix: Ge = u.suffix,
54
+ onChange: E = u.onChange,
55
+ onFocus: ae = u.onFocus,
56
+ onBlur: le = u.onBlur,
57
+ rangeOnEnter: se = u.rangeOnEnter,
58
+ size: K = u.size,
59
+ rounded: w = u.rounded,
60
+ fillMode: O = u.fillMode,
61
+ autoFocus: qe = u.autoFocus,
61
62
  ...oe
62
- } = q, qe = tt(), ue = Pe || qe, s = Je(), L = Qe(), a = n.useRef(null), P = n.useRef(), [je, S] = n.useState(!1), u = n.useRef(ve()), N = n.useRef(!1), U = n.useRef(), x = n.useRef(he), h = z(
63
- u.current.focused && !o ? u.current.currentLooseValue : X(b, x.current),
63
+ } = q, je = nt(), ue = Pe || je, s = Qe(), L = Xe(), a = n.useRef(null), P = n.useRef(), [Ae, S] = n.useState(!1), c = n.useRef(ve()), N = n.useRef(!1), U = n.useRef(), x = n.useRef(he), h = z(
64
+ c.current.focused && !o ? c.current.currentLooseValue : X(b, x.current),
64
65
  l,
65
66
  s
66
67
  );
67
68
  U.current = h;
68
- const [Ae] = pe(ze), [_e] = pe(Ge);
69
+ const [_e] = pe(ze), [He] = pe(Ge);
69
70
  n.useEffect(
70
71
  () => {
71
72
  a.current && a.current.setCustomValidity && a.current.setCustomValidity(
72
- B().valid ? "" : A || it
73
+ F().valid ? "" : A || it
73
74
  );
74
75
  }
75
76
  );
76
- const ie = n.useCallback(
77
+ const ce = n.useCallback(
77
78
  () => {
78
79
  a.current && a.current.focus();
79
80
  },
@@ -81,15 +82,15 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
81
82
  ), D = n.useCallback(
82
83
  () => P.current !== void 0 ? P.current : X(b, x.current),
83
84
  [b]
84
- ), ce = n.useCallback(
85
+ ), ie = n.useCallback(
85
86
  () => j,
86
87
  [j]
87
88
  ), R = n.useCallback(
88
89
  () => H,
89
90
  [H]
90
- ), B = n.useCallback(
91
+ ), F = n.useCallback(
91
92
  () => {
92
- const r = A !== void 0, e = D(), V = _ !== void 0 ? _ : !u.current.valueIsOutOfRange && (!R() || e != null);
93
+ const r = A !== void 0, e = D(), V = _ !== void 0 ? _ : !c.current.valueIsOutOfRange && (!R() || e != null);
93
94
  return {
94
95
  customError: r,
95
96
  valid: V,
@@ -107,11 +108,11 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
107
108
  () => {
108
109
  const r = {
109
110
  element: a.current,
110
- focus: ie
111
+ focus: ce
111
112
  };
112
- return Object.defineProperty(r, "name", { get: ce }), Object.defineProperty(r, "value", { get: D }), Object.defineProperty(r, "validity", { get: B }), Object.defineProperty(r, "validityStyles", { get: $ }), Object.defineProperty(r, "required", { get: R }), Object.defineProperty(r, "props", { get: de }), r;
113
+ return Object.defineProperty(r, "name", { get: ie }), Object.defineProperty(r, "value", { get: D }), Object.defineProperty(r, "validity", { get: F }), Object.defineProperty(r, "validityStyles", { get: $ }), Object.defineProperty(r, "required", { get: R }), Object.defineProperty(r, "props", { get: de }), r;
113
114
  },
114
- [ce, D, B, $, R, ie, de]
115
+ [ie, D, F, $, R, ce, de]
115
116
  );
116
117
  n.useImperativeHandle(Se, y);
117
118
  const f = n.useCallback(
@@ -125,7 +126,7 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
125
126
  valueIsCorrected: !1,
126
127
  valueIsOutOfRange: !1,
127
128
  isPaste: N.current,
128
- focused: u.current.focused
129
+ focused: c.current.focused
129
130
  }),
130
131
  [b]
131
132
  ), p = n.useCallback(
@@ -133,22 +134,22 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
133
134
  if (o)
134
135
  return;
135
136
  P.current = e.eventValue, x.current = e.eventValue;
136
- const V = z(G(e.eventValue, c, d), l, s), m = G(s.parseNumber(V, l), c, d);
137
+ const V = z(G(e.eventValue, i, d), l, s), m = G(s.parseNumber(V, l), i, d);
137
138
  m !== e.eventValue && (e.valueIsOutOfRange = !0, e.eventValue = m, x.current = m), b !== e.eventValue && Q(
138
139
  E,
139
140
  r,
140
141
  y(),
141
142
  { value: e.eventValue }
142
- ), P.current = void 0, u.current = e, S((J) => !J);
143
+ ), P.current = void 0, c.current = e, S((J) => !J);
143
144
  },
144
145
  [b, E, o, S, y]
145
- ), He = n.useCallback(
146
+ ), Ke = n.useCallback(
146
147
  (r) => {
147
148
  const e = f();
148
149
  N.current = !1, p(r, ye(e, l, s));
149
150
  },
150
151
  [l, E, s, p, f]
151
- ), Ke = n.useCallback(
152
+ ), we = n.useCallback(
152
153
  (r) => {
153
154
  let e = f();
154
155
  const V = s.parseNumber(String(e.currentLooseValue), l);
@@ -163,7 +164,7 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
163
164
  V,
164
165
  e,
165
166
  v,
166
- c,
167
+ i,
167
168
  d,
168
169
  l,
169
170
  s
@@ -174,7 +175,7 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
174
175
  V,
175
176
  e,
176
177
  v,
177
- c,
178
+ i,
178
179
  d,
179
180
  l,
180
181
  s
@@ -183,7 +184,7 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
183
184
  case 13: {
184
185
  if (se === !1)
185
186
  return;
186
- const m = z(G(V, c, d), l, s), k = G(s.parseNumber(m, l), c, d);
187
+ const m = z(G(V, i, d), l, s), k = G(s.parseNumber(m, l), i, d);
187
188
  e.eventValue = k, e.currentLooseValue = z(k, l, s), e.selectionStart = e.selectionEnd = e.currentLooseValue.length;
188
189
  break;
189
190
  }
@@ -197,8 +198,8 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
197
198
  }
198
199
  r.preventDefault(), p(r, e);
199
200
  },
200
- [l, c, d, v, E, se, p, f]
201
- ), we = n.useCallback(
201
+ [l, i, d, v, E, se, p, f]
202
+ ), Ue = n.useCallback(
202
203
  () => {
203
204
  N.current = !0;
204
205
  },
@@ -212,13 +213,13 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
212
213
  s.parseNumber(String(e.currentLooseValue), l),
213
214
  e,
214
215
  v,
215
- c,
216
+ i,
216
217
  d,
217
218
  l,
218
219
  s
219
220
  ), p(r, e);
220
221
  },
221
- [l, c, d, v, E, g, o, p, f]
222
+ [l, i, d, v, E, g, o, p, f]
222
223
  ), Y = n.useCallback(
223
224
  (r) => {
224
225
  if (g || o)
@@ -228,22 +229,22 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
228
229
  s.parseNumber(String(e.currentLooseValue), l),
229
230
  e,
230
231
  v,
231
- c,
232
+ i,
232
233
  d,
233
234
  l,
234
235
  s
235
236
  ), p(r, e);
236
237
  },
237
- [l, c, d, v, E, g, o, p, f]
238
- ), Ue = n.useCallback(
238
+ [l, i, d, v, E, g, o, p, f]
239
+ ), $e = n.useCallback(
239
240
  (r) => {
240
241
  const e = be(document);
241
242
  !document || e !== a.current || !a.current || g || o || (r.nativeEvent.deltaY < 0 && W(r), r.nativeEvent.deltaY > 0 && Y(r));
242
243
  },
243
244
  [W, Y, o, g]
244
- ), $e = n.useCallback(
245
+ ), We = n.useCallback(
245
246
  (r) => {
246
- u.current.currentLooseValue = U.current, u.current.focused = !0, Q(
247
+ c.current.currentLooseValue = U.current, c.current.focused = !0, Q(
247
248
  ae,
248
249
  r,
249
250
  y(),
@@ -251,9 +252,9 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
251
252
  ), S((e) => !e);
252
253
  },
253
254
  [ae, S, y]
254
- ), We = n.useCallback(
255
+ ), Ye = n.useCallback(
255
256
  (r) => {
256
- u.current = ve(), Q(
257
+ c.current = ve(), Q(
257
258
  le,
258
259
  r,
259
260
  y(),
@@ -261,7 +262,7 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
261
262
  ), S((e) => !e);
262
263
  },
263
264
  [le, S, y]
264
- ), Ye = n.useCallback(
265
+ ), Je = n.useCallback(
265
266
  (r) => {
266
267
  if (document && a.current) {
267
268
  const e = be(document);
@@ -270,18 +271,18 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
270
271
  },
271
272
  []
272
273
  );
273
- nt(
274
+ rt(
274
275
  () => {
275
- a.current && a.current.type !== "number" && u.current.selectionStart !== void 0 && u.current.selectionEnd !== void 0 && (a.current.selectionStart = u.current.selectionStart, a.current.selectionEnd = u.current.selectionEnd, u.current.selectionStart = void 0, u.current.selectionEnd = void 0);
276
+ a.current && a.current.type !== "number" && c.current.selectionStart !== void 0 && c.current.selectionEnd !== void 0 && (a.current.selectionStart = c.current.selectionStart, a.current.selectionEnd = c.current.selectionEnd, c.current.selectionStart = void 0, c.current.selectionEnd = void 0);
276
277
  },
277
- [je]
278
+ [Ae]
278
279
  );
279
- const me = !$() || B().valid, fe = /* @__PURE__ */ n.createElement(
280
+ const me = !$() || F().valid, fe = /* @__PURE__ */ n.createElement(
280
281
  "span",
281
282
  {
282
283
  dir: te,
283
284
  style: I ? ne : { width: Z, ...ne },
284
- className: rt(
285
+ className: at(
285
286
  "k-input",
286
287
  "k-numerictextbox",
287
288
  {
@@ -297,18 +298,18 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
297
298
  "aria-disabled": o ? "true" : void 0,
298
299
  ...I ? {} : oe
299
300
  },
300
- /* @__PURE__ */ n.createElement(Ae, null),
301
+ /* @__PURE__ */ n.createElement(_e, null),
301
302
  /* @__PURE__ */ n.createElement(
302
303
  "input",
303
304
  {
304
305
  role: "spinbutton",
305
306
  value: h === null ? "" : h,
306
- tabIndex: at(Ie, o),
307
+ tabIndex: lt(Ie, o),
307
308
  accessKey: Oe,
308
309
  disabled: o,
309
310
  title: Le,
310
311
  "aria-disabled": o ? "true" : void 0,
311
- "aria-valuemin": c,
312
+ "aria-valuemin": i,
312
313
  "aria-valuemax": d,
313
314
  "aria-label": Re,
314
315
  "aria-labelledby": De,
@@ -317,28 +318,29 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
317
318
  spellCheck: !1,
318
319
  autoComplete: "off",
319
320
  autoCorrect: "off",
320
- type: Be || "tel",
321
+ autoFocus: qe,
322
+ type: Fe || "tel",
321
323
  className: "k-input-inner",
322
324
  id: ue,
323
325
  name: j,
324
326
  readOnly: g,
325
- style: Fe,
326
- onChange: He,
327
- onFocus: $e,
328
- onBlur: We,
329
- onKeyDown: Ke,
330
- onPaste: we,
331
- onWheel: Ue,
327
+ style: Me,
328
+ onChange: Ke,
329
+ onFocus: We,
330
+ onBlur: Ye,
331
+ onKeyDown: we,
332
+ onPaste: Ue,
333
+ onWheel: $e,
332
334
  ref: a
333
335
  }
334
336
  ),
335
- /* @__PURE__ */ n.createElement(_e, null),
336
- Me,
337
+ /* @__PURE__ */ n.createElement(He, null),
338
+ Be,
337
339
  Te && /* @__PURE__ */ n.createElement(
338
340
  "span",
339
341
  {
340
342
  className: "k-input-spinner k-spin-button",
341
- onMouseDown: Ye
343
+ onMouseDown: Je
342
344
  },
343
345
  /* @__PURE__ */ n.createElement(
344
346
  Ce,
@@ -346,12 +348,12 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
346
348
  tabIndex: -1,
347
349
  type: "button",
348
350
  icon: "caret-alt-up",
349
- svgIcon: lt,
351
+ svgIcon: st,
350
352
  rounded: null,
351
353
  fillMode: O,
352
354
  className: "k-spinner-increase",
353
- "aria-label": L.toLanguageString(M, F[M]),
354
- title: L.toLanguageString(M, F[M]),
355
+ "aria-label": L.toLanguageString(B, M[B]),
356
+ title: L.toLanguageString(B, M[B]),
355
357
  onClick: W
356
358
  }
357
359
  ),
@@ -361,19 +363,19 @@ const it = "Please enter a valid value!", ct = Xe(), Ee = n.forwardRef((C, Se) =
361
363
  tabIndex: -1,
362
364
  type: "button",
363
365
  icon: "caret-alt-down",
364
- svgIcon: st,
366
+ svgIcon: ot,
365
367
  rounded: null,
366
368
  fillMode: O,
367
369
  className: "k-spinner-decrease",
368
- "aria-label": L.toLanguageString(T, F[T]),
369
- title: L.toLanguageString(T, F[T]),
370
+ "aria-label": L.toLanguageString(T, M[T]),
371
+ title: L.toLanguageString(T, M[T]),
370
372
  onClick: Y
371
373
  }
372
374
  )
373
375
  )
374
376
  );
375
377
  return I ? /* @__PURE__ */ n.createElement(
376
- ot,
378
+ ut,
377
379
  {
378
380
  label: I,
379
381
  editorId: ue,
@@ -434,7 +436,7 @@ Ee.propTypes = {
434
436
  rounded: t.oneOf([null, "small", "medium", "large", "full"]),
435
437
  fillMode: t.oneOf([null, "solid", "flat", "outline"])
436
438
  };
437
- const i = {
439
+ const u = {
438
440
  prefix: (C) => null,
439
441
  suffix: (C) => null,
440
442
  step: 1,
@@ -443,6 +445,7 @@ const i = {
443
445
  required: !1,
444
446
  validityStyles: !0,
445
447
  rangeOnEnter: !0,
448
+ autoFocus: !1,
446
449
  onChange: (C) => {
447
450
  },
448
451
  onFocus: (C) => {
@@ -456,5 +459,5 @@ const i = {
456
459
  Ee.displayName = "KendoNumericTextBox";
457
460
  export {
458
461
  Ee as NumericTextBox,
459
- ct as NumericTextBoxPropsContext
462
+ dt as NumericTextBoxPropsContext
460
463
  };
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-inputs",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1720780010,
13
+ publishDate: 1723022514,
14
14
  version: "",
15
15
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
16
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-inputs",
3
- "version": "8.2.0-develop.9",
3
+ "version": "8.2.1-develop.1",
4
4
  "description": "React Inputs offer a customizable interface for users to enter and pick different information. KendoReact Input package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -25,13 +25,13 @@
25
25
  "@progress/kendo-drawing": "^1.20.1",
26
26
  "@progress/kendo-inputs-common": "^3.1.0",
27
27
  "@progress/kendo-licensing": "^1.3.4",
28
- "@progress/kendo-react-animation": "8.2.0-develop.9",
29
- "@progress/kendo-react-buttons": "8.2.0-develop.9",
30
- "@progress/kendo-react-common": "8.2.0-develop.9",
31
- "@progress/kendo-react-dialogs": "8.2.0-develop.9",
32
- "@progress/kendo-react-intl": "8.2.0-develop.9",
33
- "@progress/kendo-react-labels": "8.2.0-develop.9",
34
- "@progress/kendo-react-popup": "8.2.0-develop.9",
28
+ "@progress/kendo-react-animation": "8.2.1-develop.1",
29
+ "@progress/kendo-react-buttons": "8.2.1-develop.1",
30
+ "@progress/kendo-react-common": "8.2.1-develop.1",
31
+ "@progress/kendo-react-dialogs": "8.2.1-develop.1",
32
+ "@progress/kendo-react-intl": "8.2.1-develop.1",
33
+ "@progress/kendo-react-labels": "8.2.1-develop.1",
34
+ "@progress/kendo-react-popup": "8.2.1-develop.1",
35
35
  "@progress/kendo-svg-icons": "^3.0.0",
36
36
  "react": "^16.8.2 || ^17.0.0 || ^18.0.0",
37
37
  "react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0"
@@ -5,16 +5,16 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),C=require("prop-types"),i=require("@progress/kendo-react-common"),N=require("../messages/index.js"),Y=require("@progress/kendo-react-intl"),s=require("./range-raducer.js"),F=require("../package-metadata.js");function J(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const c in r)if(c!=="default"){const e=Object.getOwnPropertyDescriptor(r,c);Object.defineProperty(n,c,e.get?e:{enumerable:!0,get:()=>r[c]})}}return n.default=r,Object.freeze(n)}const a=J(W),Q=(r,n,c)=>{const[e,l]=a.useState(r),m=a.useCallback(y=>{const b=s.rangeReducer(n.state||e,{...y,...n});c&&c(b,y.event),l(b)},[n,c]);return[e,m]},G=i.createPropsContext(),E=a.forwardRef((r,n)=>{i.validatePackage(F.packageMetadata);const c=i.usePropsContext(G,r),e={step:h.step,defaultValue:h.defaultValue,vertical:h.vertical,disabled:h.disabled,...c},l=a.useRef(null),m=a.useRef(null),y=a.useRef(null),b=a.useRef(null),D=a.useRef(null),$=a.useCallback(()=>{b.current&&b.current.focus()},[b]);a.useImperativeHandle(l,()=>({element:m.current,focus:$,props:e})),a.useImperativeHandle(n,()=>l.current);const f=a.useMemo(()=>e.min,[e.min]),g=a.useMemo(()=>e.max,[e.max]),S=a.useMemo(()=>e.step!==void 0?e.step:h.step,[e.step,h.step]),p=i.useDir(m,e.dir),K=(t,u)=>{e.onChange&&l.current&&e.onChange.call(void 0,{value:t,target:l.current,syntheticEvent:u})},[O,w]=a.useState(""),[R,d]=Q(e.defaultValue||h.defaultValue,{min:f,max:g,step:S,state:e.value},K),o=a.useMemo(()=>e.value||R,[e.value,R]),M=a.useRef(null),T=a.useRef(null),k=a.useMemo(()=>(o.start-f)/(g-f)*100,[o.start,f,g]),A=a.useMemo(()=>(o.end-f)/(g-f)*100,[o.end,f,g]),P=a.useMemo(()=>e.vertical?{paddingTop:0,height:"100%"}:{},[e.vertical]),z=a.useMemo(()=>e.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},[e.vertical]),_=Y.useLocalization(),I=a.useCallback(t=>{if(!T.current)return;const u=T.current.getBoundingClientRect(),v=e.vertical?u.bottom-t.clientY:p==="rtl"?u.right-t.clientX:t.clientX-u.left,x=e.vertical?u.height:u.width,X=v/x;return f+X*(g-f)},[T,e.vertical,p,f,g,R.start,R.end,e.value&&e.value.start,e.value&&e.value.end]),V=a.useCallback(t=>t<=o.start?"start":t>=o.end?"end":2*t<o.end+o.start?"start":"end",[R.start,R.end,e.value&&e.value.start,e.value&&e.value.end]),q=a.useCallback(t=>{switch(t.keyCode){case i.Keys.right:t.preventDefault(),d({type:p==="rtl"?s.RANGE_ACTION.decrease:s.RANGE_ACTION.increase,key:"start",event:t});break;case i.Keys.up:t.preventDefault(),d({type:s.RANGE_ACTION.increase,key:"start",event:t});break;case i.Keys.left:t.preventDefault(),d({type:p==="rtl"?s.RANGE_ACTION.increase:s.RANGE_ACTION.decrease,key:"start",event:t});break;case i.Keys.down:t.preventDefault(),d({type:s.RANGE_ACTION.decrease,key:"start",event:t});break;case i.Keys.home:t.preventDefault(),d({type:s.RANGE_ACTION.min,key:"start",event:t});break;case i.Keys.end:t.preventDefault(),d({type:s.RANGE_ACTION.max,key:"start",event:t});break}},[d]),j=a.useCallback(t=>{switch(t.keyCode){case i.Keys.right:t.preventDefault(),d({type:p==="rtl"?s.RANGE_ACTION.decrease:s.RANGE_ACTION.increase,key:"end",event:t});break;case i.Keys.up:t.preventDefault(),d({type:s.RANGE_ACTION.increase,key:"end",event:t});break;case i.Keys.left:t.preventDefault(),d({type:p==="rtl"?s.RANGE_ACTION.increase:s.RANGE_ACTION.decrease,key:"end",event:t});break;case i.Keys.down:t.preventDefault(),d({type:s.RANGE_ACTION.decrease,key:"end",event:t});break;case i.Keys.home:t.preventDefault(),d({type:s.RANGE_ACTION.min,key:"end",event:t});break;case i.Keys.end:t.preventDefault(),d({type:s.RANGE_ACTION.max,key:"end",event:t});break}},[d,p]),H=a.useCallback(t=>{const u=I(t),v=V(u);w(v),v==="end"?D.current.focus():b.current.focus();const x=v==="end"?s.RANGE_ACTION.end:s.RANGE_ACTION.start;d({type:x,payload:u,event:t})},[e.vertical,f,g,d]),L=t=>{const u=I(t),v=O==="end"?s.RANGE_ACTION.end:s.RANGE_ACTION.start;d({type:v,payload:u,event:t})},B=t=>{const u=I(t),v=O==="end"?s.RANGE_ACTION.end:s.RANGE_ACTION.start;d({type:v,payload:u,event:t}),w("")};return i.useDraggable(T,{onPress:H,onDrag:L,onRelease:B}),a.createElement("div",{id:e.id,style:e.style,ref:m,dir:p,className:i.classNames("k-slider",{"k-rtl":p==="rtl","k-disabled":e.disabled,"k-slider-vertical":e.vertical,"k-slider-horizontal":!e.vertical},e.className)},a.createElement("div",{ref:T,className:"k-slider-track-wrap",style:{flexGrow:1,position:"relative",touchAction:"none",...z}},e.children&&a.createElement("ul",{className:"k-reset k-slider-items",style:{...P}},a.Children.map(e.children,(t,u)=>t&&a.cloneElement(t,{position:100*(t.props.position-e.min)/(e.max-e.min),vertical:e.vertical,firstTick:u===0,lastTick:u===a.Children.count(e.children)-1},t.props.children))),a.createElement("div",{ref:M,className:"k-slider-track",style:e.vertical?{bottom:0,height:"100%"}:{[p==="rtl"?"right":"left"]:0,width:"100%"}},k!==null&&A!==null&&a.createElement("div",{"data-selection":!0,ref:y,title:`${o.start} - ${o.end}`,className:"k-slider-selection",style:e.vertical?{height:A-k+"%",bottom:k+"%"}:{[p==="rtl"?"right":"left"]:k+"%",width:A-k+"%"}}),a.createElement("span",{ref:b,role:"slider",tabIndex:i.getTabIndex(e.startTabIndex,e.disabled,void 0),"aria-valuemin":f,"aria-valuemax":Math.max(g,o.end),"aria-valuenow":o.start,"aria-disabled":e.disabled?"true":void 0,"aria-valuetext":`${o.start} - ${o.end}`,className:"k-draghandle k-draghandle-start",title:_.toLanguageString(N.sliderDragTitle,N.messages[N.sliderDragTitle]),style:e.vertical?{bottom:"calc("+k+"%)",zIndex:1}:p==="rtl"?{right:"calc("+k+"% - 13px)",zIndex:1}:{left:"calc("+k+"%)",zIndex:1},onKeyDown:q}),a.createElement("span",{ref:D,role:"slider",tabIndex:i.getTabIndex(e.endTabIndex,e.disabled,void 0),"aria-valuemin":Math.min(f,o.start),"aria-valuemax":g,"aria-valuenow":o.end,"aria-disabled":e.disabled?"true":void 0,"aria-valuetext":`${o.start} - ${o.end}`,className:"k-draghandle k-draghandle-end",title:_.toLanguageString(N.sliderDragTitle,N.messages[N.sliderDragTitle]),style:e.vertical?{bottom:"calc("+A+"%)",zIndex:1}:p==="rtl"?{right:"calc("+A+"% - 13px)",zIndex:1}:{left:"calc("+A+"%)",zIndex:1},onKeyDown:j}))))}),U={value:(r,n,c)=>{if(r.value){const e=r.value.start,l=r.value.end,m=r.min,y=r.max;if(e>l||e>y||e<m||l>y||l<m||l<e)return new Error(`Invalid prop + ${n} supplied to ${c}.
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("react"),C=require("prop-types"),l=require("@progress/kendo-react-common"),h=require("../messages/index.js"),Y=require("@progress/kendo-react-intl"),r=require("./range-raducer.js"),F=require("../package-metadata.js");function J(n){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const d in n)if(d!=="default"){const e=Object.getOwnPropertyDescriptor(n,d);Object.defineProperty(s,d,e.get?e:{enumerable:!0,get:()=>n[d]})}}return s.default=n,Object.freeze(s)}const a=J(W),Q=(n,s,d)=>{const[e,i]=a.useState(n),m=a.useCallback(g=>{const v=r.rangeReducer(s.state||e,{...g,...s});d&&d(v,g.event),i(v)},[s,d]);return[e,m]},S=l.createPropsContext(),x=a.forwardRef((n,s)=>{l.validatePackage(F.packageMetadata);const d=l.usePropsContext(S,n),e={step:k.step,largeStep:k.largeStep,defaultValue:k.defaultValue,vertical:k.vertical,disabled:k.disabled,...d},i=a.useRef(null),m=a.useRef(null),g=a.useRef(null),v=a.useRef(null),D=a.useRef(null),w=a.useCallback(()=>{v.current&&v.current.focus()},[v]);a.useImperativeHandle(i,()=>({element:m.current,focus:w,props:e})),a.useImperativeHandle(s,()=>i.current);const f=a.useMemo(()=>e.min,[e.min]),y=a.useMemo(()=>e.max,[e.max]),K=a.useMemo(()=>e.step!==void 0?e.step:k.step,[e.step,k.step]),$=a.useMemo(()=>e.largeStep!==void 0?e.largeStep:k.largeStep,[e.largeStep,k.largeStep]),u=l.useDir(m,e.dir),M=(t,p)=>{e.onChange&&i.current&&e.onChange.call(void 0,{value:t,target:i.current,syntheticEvent:p})},[O,_]=a.useState(""),[N,c]=Q(e.defaultValue||k.defaultValue,{min:f,max:y,step:K,largeStep:$,state:e.value},M),o=a.useMemo(()=>e.value||N,[e.value,N]),L=a.useRef(null),T=a.useRef(null),A=a.useMemo(()=>(o.start-f)/(y-f)*100,[o.start,f,y]),R=a.useMemo(()=>(o.end-f)/(y-f)*100,[o.end,f,y]),P=a.useMemo(()=>e.vertical?{paddingTop:0,height:"100%"}:{},[e.vertical]),z=a.useMemo(()=>e.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},[e.vertical]),G=Y.useLocalization(),I=a.useCallback(t=>{if(!T.current)return;const p=T.current.getBoundingClientRect(),b=e.vertical?p.bottom-t.clientY:u==="rtl"?p.right-t.clientX:t.clientX-p.left,E=e.vertical?p.height:p.width,X=b/E;return f+X*(y-f)},[T,e.vertical,u,f,y,N.start,N.end,e.value&&e.value.start,e.value&&e.value.end]),V=a.useCallback(t=>t<=o.start?"start":t>=o.end?"end":2*t<o.end+o.start?"start":"end",[N.start,N.end,e.value&&e.value.start,e.value&&e.value.end]),q=a.useCallback(t=>{switch(t.keyCode){case l.Keys.right:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.decrease:r.RANGE_ACTION.increase,key:"start",event:t});break;case l.Keys.up:t.preventDefault(),c({type:r.RANGE_ACTION.increase,key:"start",event:t});break;case l.Keys.left:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.increase:r.RANGE_ACTION.decrease,key:"start",event:t});break;case l.Keys.down:t.preventDefault(),c({type:r.RANGE_ACTION.decrease,key:"start",event:t});break;case l.Keys.home:t.preventDefault(),c({type:r.RANGE_ACTION.min,key:"start",event:t});break;case l.Keys.end:t.preventDefault(),c({type:r.RANGE_ACTION.max,key:"start",event:t});break;case l.Keys.pageDown:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.increaseLarge:r.RANGE_ACTION.decreaseLarge,key:"start",event:t});break;case l.Keys.pageUp:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.decreaseLarge:r.RANGE_ACTION.increaseLarge,key:"start",event:t});break}},[c]),j=a.useCallback(t=>{switch(t.keyCode){case l.Keys.right:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.decrease:r.RANGE_ACTION.increase,key:"end",event:t});break;case l.Keys.up:t.preventDefault(),c({type:r.RANGE_ACTION.increase,key:"end",event:t});break;case l.Keys.left:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.increase:r.RANGE_ACTION.decrease,key:"end",event:t});break;case l.Keys.down:t.preventDefault(),c({type:r.RANGE_ACTION.decrease,key:"end",event:t});break;case l.Keys.home:t.preventDefault(),c({type:r.RANGE_ACTION.min,key:"end",event:t});break;case l.Keys.end:t.preventDefault(),c({type:r.RANGE_ACTION.max,key:"end",event:t});break;case l.Keys.pageDown:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.increaseLarge:r.RANGE_ACTION.decreaseLarge,key:"end",event:t});break;case l.Keys.pageUp:t.preventDefault(),c({type:u==="rtl"?r.RANGE_ACTION.decreaseLarge:r.RANGE_ACTION.increaseLarge,key:"end",event:t});break}},[c,u]),H=a.useCallback(t=>{const p=I(t),b=V(p);_(b),b==="end"?D.current.focus():v.current.focus();const E=b==="end"?r.RANGE_ACTION.end:r.RANGE_ACTION.start;c({type:E,payload:p,event:t})},[e.vertical,f,y,c]),B=t=>{const p=I(t),b=O==="end"?r.RANGE_ACTION.end:r.RANGE_ACTION.start;c({type:b,payload:p,event:t})},U=t=>{const p=I(t),b=O==="end"?r.RANGE_ACTION.end:r.RANGE_ACTION.start;c({type:b,payload:p,event:t}),_("")};return l.useDraggable(T,{onPress:H,onDrag:B,onRelease:U},{autoScroll:!1}),a.createElement("div",{id:e.id,style:e.style,ref:m,dir:u,className:l.classNames("k-slider",{"k-rtl":u==="rtl","k-disabled":e.disabled,"k-slider-vertical":e.vertical,"k-slider-horizontal":!e.vertical},e.className)},a.createElement("div",{ref:T,className:"k-slider-track-wrap",style:{flexGrow:1,position:"relative",touchAction:"none",...z}},e.children&&a.createElement("ul",{className:"k-reset k-slider-items",style:{...P}},a.Children.map(e.children,(t,p)=>t&&a.cloneElement(t,{position:100*(t.props.position-e.min)/(e.max-e.min),vertical:e.vertical,firstTick:p===0,lastTick:p===a.Children.count(e.children)-1},t.props.children))),a.createElement("div",{ref:L,className:"k-slider-track",style:e.vertical?{bottom:0,height:"100%"}:{[u==="rtl"?"right":"left"]:0,width:"100%"}},A!==null&&R!==null&&a.createElement("div",{"data-selection":!0,ref:g,title:`${o.start} - ${o.end}`,className:"k-slider-selection",style:e.vertical?{height:R-A+"%",bottom:A+"%"}:{[u==="rtl"?"right":"left"]:A+"%",width:R-A+"%"}}),a.createElement("span",{ref:v,role:"slider",tabIndex:l.getTabIndex(e.startTabIndex,e.disabled,void 0),"aria-valuemin":f,"aria-valuemax":Math.max(y,o.end),"aria-valuenow":o.start,"aria-disabled":e.disabled?"true":void 0,"aria-valuetext":`${o.start} - ${o.end}`,className:"k-draghandle k-draghandle-start",title:G.toLanguageString(h.sliderDragTitle,h.messages[h.sliderDragTitle]),style:e.vertical?{bottom:"calc("+A+"%)",zIndex:1}:u==="rtl"?{right:"calc("+A+"% - 13px)",zIndex:1}:{left:"calc("+A+"%)",zIndex:1},onKeyDown:q}),a.createElement("span",{ref:D,role:"slider",tabIndex:l.getTabIndex(e.endTabIndex,e.disabled,void 0),"aria-valuemin":Math.min(f,o.start),"aria-valuemax":y,"aria-valuenow":o.end,"aria-disabled":e.disabled?"true":void 0,"aria-valuetext":`${o.start} - ${o.end}`,className:"k-draghandle k-draghandle-end",title:G.toLanguageString(h.sliderDragTitle,h.messages[h.sliderDragTitle]),style:e.vertical?{bottom:"calc("+R+"%)",zIndex:1}:u==="rtl"?{right:"calc("+R+"% - 13px)",zIndex:1}:{left:"calc("+R+"%)",zIndex:1},onKeyDown:j}))))}),Z={value:(n,s,d)=>{if(n.value){const e=n.value.start,i=n.value.end,m=n.min,g=n.max;if(e>i||e>g||e<m||i>g||i<m||i<e)return new Error(`Invalid prop + ${s} supplied to ${d}.
9
9
  The { start, end } value must be between the min & max value and { start, end } must be start < end.
10
- `)}return null},defaultValue:(r,n,c)=>{if(r.defaultValue){const e=r.defaultValue.start,l=r.defaultValue.end,m=r.min,y=r.max;if(e>l||e>y||e<m||l>y||l<m||l<e)return new Error(`Invalid prop + ${n} supplied to ${c}.
10
+ `)}return null},defaultValue:(n,s,d)=>{if(n.defaultValue){const e=n.defaultValue.start,i=n.defaultValue.end,m=n.min,g=n.max;if(e>i||e>g||e<m||i>g||i<m||i<e)return new Error(`Invalid prop + ${s} supplied to ${d}.
11
11
  The { start, end } value must be between the min & max value and { start, end } must be start < end.
12
- `)}return null},onChange:C.func,step:C.number,min:(r,n,c)=>{const e=r[n],l=r.min,m=r.max;return l===void 0?new Error(`Invalid prop + ${n} supplied to ${c}.
13
- ${n} value can not be undefined.
14
- `):e&&l>=m?new Error(`Invalid prop + ${n} supplied to ${c}.
15
- ${n} value can not be equal to or bigger than the max value.
16
- `):null},max:(r,n,c)=>{const e=r[n],l=r.min,m=r.max;return m===void 0?new Error(`Invalid prop + ${n} supplied to ${c}.
17
- ${n} value can not be undefined.
18
- `):e&&m<=l?new Error(`Invalid prop + ${n} supplied to ${c}.
19
- ${n} value can not be equal to or smaller than the min value.
20
- `):null},vertical:C.bool,disabled:C.bool,dir:C.oneOf(["ltr","rtl"])},h={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};E.displayName="KendoReactRangeSlider";E.propTypes=U;exports.RangeSlider=E;exports.RangeSliderPropsContext=G;
12
+ `)}return null},onChange:C.func,step:C.number,min:(n,s,d)=>{const e=n[s],i=n.min,m=n.max;return i===void 0?new Error(`Invalid prop + ${s} supplied to ${d}.
13
+ ${s} value can not be undefined.
14
+ `):e&&i>=m?new Error(`Invalid prop + ${s} supplied to ${d}.
15
+ ${s} value can not be equal to or bigger than the max value.
16
+ `):null},max:(n,s,d)=>{const e=n[s],i=n.min,m=n.max;return m===void 0?new Error(`Invalid prop + ${s} supplied to ${d}.
17
+ ${s} value can not be undefined.
18
+ `):e&&m<=i?new Error(`Invalid prop + ${s} supplied to ${d}.
19
+ ${s} value can not be equal to or smaller than the min value.
20
+ `):null},vertical:C.bool,disabled:C.bool,dir:C.oneOf(["ltr","rtl"])},k={step:1,largeStep:10,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};x.displayName="KendoReactRangeSlider";x.propTypes=Z;exports.RangeSlider=x;exports.RangeSliderPropsContext=S;