@progress/kendo-react-inputs 15.1.1-develop.3 → 15.2.0-develop.2

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.
Files changed (42) hide show
  1. package/checkbox/Checkbox.js +1 -1
  2. package/checkbox/Checkbox.mjs +72 -70
  3. package/colors/ColorContrastLabels.js +1 -1
  4. package/colors/ColorContrastLabels.mjs +2 -2
  5. package/colors/ColorGradient.js +1 -1
  6. package/colors/ColorGradient.mjs +51 -52
  7. package/colors/ColorPalette.js +1 -1
  8. package/colors/ColorPalette.mjs +71 -72
  9. package/colors/ColorPicker.js +1 -1
  10. package/colors/ColorPicker.mjs +203 -195
  11. package/colors/FlatColorPicker.d.ts +4 -4
  12. package/colors/FlatColorPicker.js +1 -1
  13. package/colors/FlatColorPicker.mjs +30 -26
  14. package/colors/interfaces/ColorPaletteProps.d.ts +7 -0
  15. package/colors/interfaces/ColorPickerPaletteSettings.d.ts +5 -0
  16. package/dist/cdn/js/kendo-react-inputs.js +1 -1
  17. package/maskedtextbox/MaskedTextBox.d.ts +1 -0
  18. package/maskedtextbox/MaskedTextBox.js +1 -1
  19. package/maskedtextbox/MaskedTextBox.mjs +26 -23
  20. package/maskedtextbox/MaskedTextBoxProps.d.ts +7 -0
  21. package/numerictextbox/NumericTextBox.js +1 -1
  22. package/numerictextbox/NumericTextBox.mjs +2 -2
  23. package/otpinput/OTPInput.js +1 -1
  24. package/otpinput/OTPInput.mjs +141 -143
  25. package/package-metadata.js +1 -1
  26. package/package-metadata.mjs +2 -2
  27. package/package.json +10 -10
  28. package/radiobutton/RadioButton.js +1 -1
  29. package/radiobutton/RadioButton.mjs +32 -30
  30. package/range-slider/RangeSlider.js +11 -11
  31. package/range-slider/RangeSlider.mjs +54 -54
  32. package/rating/Rating.d.ts +12 -0
  33. package/rating/Rating.js +2 -2
  34. package/rating/Rating.mjs +91 -92
  35. package/slider/Slider.d.ts +12 -0
  36. package/slider/Slider.js +1 -1
  37. package/slider/Slider.mjs +69 -64
  38. package/switch/Switch.d.ts +15 -0
  39. package/switch/Switch.js +1 -1
  40. package/switch/Switch.mjs +87 -82
  41. package/textarea/TextArea.js +1 -1
  42. package/textarea/TextArea.mjs +11 -12
@@ -5,25 +5,23 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import * as r from "react";
9
- import { useAsyncFocusBlur as de, useWebMcpRegister as me, classNames as he, kendoThemeMaps as be } from "@progress/kendo-react-common";
10
- import { OTPInputCell as Ce } from "./OTPInputCell.mjs";
11
- import { OTPInputSeparator as ge } from "./OTPInputSeparator.mjs";
12
- import { useLocalization as ve } from "@progress/kendo-react-intl";
13
- import { otpInputAriaLabel as j, messages as ke } from "../messages/index.mjs";
14
- const ye = 4;
15
- function Ee(f, d) {
16
- if (Array.isArray(d)) {
17
- const C = d.reduce((_, w) => _ + w, 0);
18
- return C !== f && console.warn(`[OTPInput] The sum of groupLength values (${C}) must equal length (${f}).`), d;
8
+ import * as a from "react";
9
+ import { useAsyncFocusBlur as pe, useWebMcpRegister as de, classNames as fe, kendoThemeMaps as me } from "@progress/kendo-react-common";
10
+ import { OTPInputCell as he } from "./OTPInputCell.mjs";
11
+ import { OTPInputSeparator as be } from "./OTPInputSeparator.mjs";
12
+ const Ce = 4;
13
+ function ve(d, f) {
14
+ if (Array.isArray(f)) {
15
+ const C = f.reduce((_, w) => _ + w, 0);
16
+ return C !== d && console.warn(`[OTPInput] The sum of groupLength values (${C}) must equal length (${d}).`), f;
19
17
  }
20
18
  const y = [];
21
- let m = f;
19
+ let m = d;
22
20
  for (; m > 0; )
23
- y.push(Math.min(d, m)), m -= d;
21
+ y.push(Math.min(f, m)), m -= f;
24
22
  return y;
25
23
  }
26
- const _e = r.forwardRef((f, d) => {
24
+ const ge = a.forwardRef((d, f) => {
27
25
  const {
28
26
  value: y,
29
27
  defaultValue: m,
@@ -32,100 +30,100 @@ const _e = r.forwardRef((f, d) => {
32
30
  separator: w,
33
31
  type: h,
34
32
  placeholder: H,
35
- spacing: L,
36
- disabled: z,
33
+ spacing: N,
34
+ disabled: P,
37
35
  readOnly: E,
38
- inputAttributes: q,
36
+ inputAttributes: S,
39
37
  name: R,
40
- required: G,
38
+ required: q,
41
39
  valid: A,
42
40
  size: D,
43
- fillMode: U,
44
- rounded: W,
41
+ fillMode: G,
42
+ rounded: U,
45
43
  onChange: M,
46
44
  onFocus: B,
47
- onBlur: N,
48
- ariaLabel: J,
49
- ariaLabelledBy: Q,
50
- ariaDescribedBy: X,
51
- id: I,
52
- style: Y,
53
- dir: V,
54
- className: Z,
45
+ onBlur: K,
46
+ ariaLabel: W,
47
+ ariaLabelledBy: J,
48
+ ariaDescribedBy: Q,
49
+ id: V,
50
+ style: X,
51
+ dir: F,
52
+ className: Y,
55
53
  // Form
56
- touched: we,
57
- visited: Re,
58
- modified: De,
59
- validationMessage: Te,
60
- ...x
61
- } = f, o = C != null ? C : ye, F = y !== void 0, [ee, te] = r.useState(() => (m != null ? m : "").padEnd(o, " ").slice(0, o)), n = (F ? y : ee).padEnd(o, " ").slice(0, o), O = r.useRef(n);
54
+ touched: ke,
55
+ visited: ye,
56
+ modified: Ee,
57
+ validationMessage: _e,
58
+ ...Z
59
+ } = d, u = C != null ? C : Ce, I = y !== void 0, [x, ee] = a.useState(() => (m != null ? m : "").padEnd(u, " ").slice(0, u)), n = (I ? y : x).padEnd(u, " ").slice(0, u), O = a.useRef(n);
62
60
  O.current = n;
63
- const [ae, P] = r.useState(null), g = r.useRef(null), v = r.useCallback((e) => {
64
- g.current !== null && clearTimeout(g.current), P(e), g.current = setTimeout(() => {
65
- P(null), g.current = null;
61
+ const [te, j] = a.useState(null), v = a.useRef(null), g = a.useCallback((e) => {
62
+ v.current !== null && clearTimeout(v.current), j(e), v.current = setTimeout(() => {
63
+ j(null), v.current = null;
66
64
  }, 300);
67
65
  }, []);
68
- r.useEffect(() => () => {
69
- g.current !== null && clearTimeout(g.current);
66
+ a.useEffect(() => () => {
67
+ v.current !== null && clearTimeout(v.current);
70
68
  }, []);
71
- const S = r.useRef(null), T = r.useRef([]), k = r.useRef(null), c = r.useCallback(
69
+ const z = a.useRef(null), T = a.useRef([]), k = a.useRef(null), o = a.useCallback(
72
70
  (e) => {
73
71
  var l;
74
- const t = Math.max(0, Math.min(e, o - 1));
72
+ const t = Math.max(0, Math.min(e, u - 1));
75
73
  (l = T.current[t]) == null || l.focus();
76
74
  },
77
- [o]
78
- ), p = r.useCallback(
75
+ [u]
76
+ ), p = a.useCallback(
79
77
  (e, t) => {
80
- const l = e.padEnd(o, " ").slice(0, o);
81
- l !== n && (O.current = l, F || te(l), M && M({
78
+ const l = e.padEnd(u, " ").slice(0, u);
79
+ l !== n && (O.current = l, I || ee(l), M && M({
82
80
  syntheticEvent: t,
83
81
  nativeEvent: t.nativeEvent,
84
82
  target: k.current,
85
83
  value: l
86
84
  }));
87
85
  },
88
- [F, o, M, n]
89
- ), re = r.useCallback(
86
+ [I, u, M, n]
87
+ ), re = a.useCallback(
90
88
  (e, t, l) => {
91
- const a = l.target.value.slice(-1);
92
- if (!a)
89
+ const r = l.target.value.slice(-1);
90
+ if (!r)
93
91
  return;
94
- if (h === "number" && !/^\d$/.test(a)) {
95
- v(e);
92
+ if (h === "number" && !/^\d$/.test(r)) {
93
+ g(e);
96
94
  const b = n[e] === " " ? "" : n[e];
97
95
  l.target.value = b, l.target.select();
98
96
  return;
99
97
  }
100
98
  const i = O.current.split("");
101
- i[e] = a;
99
+ i[e] = r;
102
100
  const s = i.join("");
103
- p(s, l), c(e + 1);
101
+ p(s, l), o(e + 1);
104
102
  },
105
- [n, p, c, h, v]
106
- ), K = r.useCallback(
103
+ [n, p, o, h, g]
104
+ ), L = a.useCallback(
107
105
  (e, t, l) => {
108
106
  if (l.preventDefault(), h === "number" && !/^\d$/.test(t)) {
109
- v(e), l.target.select();
107
+ g(e), l.target.select();
110
108
  return;
111
109
  }
112
- const u = n.split("");
113
- u[e] = t, p(u.join(""), l), c(e + 1);
110
+ const c = n.split("");
111
+ c[e] = t, p(c.join(""), l), o(e + 1);
114
112
  },
115
- [h, v, n, p, c]
116
- ), le = r.useCallback(
113
+ [h, g, n, p, o]
114
+ ), ae = a.useCallback(
117
115
  (e, t) => {
118
- var u;
116
+ var c;
119
117
  if (E)
120
118
  return;
121
- const l = V === "rtl";
119
+ const l = F === "rtl";
122
120
  switch (t.key) {
123
121
  case "ArrowLeft": {
124
- t.preventDefault(), c(l ? e + 1 : e - 1);
122
+ t.preventDefault(), o(l ? e + 1 : e - 1);
125
123
  break;
126
124
  }
127
125
  case "ArrowRight": {
128
- t.preventDefault(), c(l ? e - 1 : e + 1);
126
+ t.preventDefault(), o(l ? e - 1 : e + 1);
129
127
  break;
130
128
  }
131
129
  case "ArrowUp":
@@ -135,25 +133,25 @@ const _e = r.forwardRef((f, d) => {
135
133
  }
136
134
  case "Backspace": {
137
135
  t.preventDefault();
138
- const a = n.split("");
139
- a[e] = " ", p(a.join(""), t), c(e - 1);
136
+ const r = n.split("");
137
+ r[e] = " ", p(r.join(""), t), o(e - 1);
140
138
  break;
141
139
  }
142
140
  case "Delete": {
143
141
  t.preventDefault();
144
- const a = n.split("");
145
- a[e] = " ", p(a.join(""), t);
142
+ const r = n.split("");
143
+ r[e] = " ", p(r.join(""), t);
146
144
  break;
147
145
  }
148
146
  default: {
149
- const { key: a, ctrlKey: i, altKey: s, metaKey: b } = t, $ = (u = n[e]) != null ? u : " ";
150
- a.length === 1 && !i && !s && !b && $ !== " " && K(e, a, t);
147
+ const { key: r, ctrlKey: i, altKey: s, metaKey: b } = t, $ = (c = n[e]) != null ? c : " ";
148
+ r.length === 1 && !i && !s && !b && $ !== " " && L(e, r, t);
151
149
  break;
152
150
  }
153
151
  }
154
152
  },
155
- [n, p, c, V, E, K]
156
- ), ne = r.useCallback(
153
+ [n, p, o, F, E, L]
154
+ ), le = a.useCallback(
157
155
  (e, t) => {
158
156
  B && B({
159
157
  syntheticEvent: t,
@@ -163,139 +161,139 @@ const _e = r.forwardRef((f, d) => {
163
161
  });
164
162
  },
165
163
  [B]
166
- ), se = r.useCallback((e, t) => {
167
- }, []), { onFocus: oe, onBlur: ue } = de({
164
+ ), ne = a.useCallback((e, t) => {
165
+ }, []), { onFocus: se, onBlur: ue } = pe({
168
166
  onFocus: (e) => {
169
167
  },
170
168
  onBlur: (e) => {
171
- N && N({
169
+ K && K({
172
170
  syntheticEvent: e,
173
171
  nativeEvent: e.nativeEvent,
174
172
  target: k.current
175
173
  });
176
174
  }
177
- }), ce = r.useCallback(
175
+ }), ce = a.useCallback(
178
176
  (e) => {
179
177
  if (e.preventDefault(), E)
180
178
  return;
181
179
  const t = e.clipboardData.getData("text");
182
180
  if (!t)
183
181
  return;
184
- const l = T.current.findIndex((s) => s === document.activeElement), u = l >= 0 ? l : 0;
182
+ const l = T.current.findIndex((s) => s === document.activeElement), c = l >= 0 ? l : 0;
185
183
  if (h === "number" && !/^\d+$/.test(t.trim())) {
186
- v(u);
184
+ g(c);
187
185
  return;
188
186
  }
189
- const a = n.split("");
190
- for (let s = 0; s < t.length && u + s < o; s++)
191
- a[u + s] = t[s];
192
- p(a.join(""), e);
193
- const i = Math.min(u + t.length, o - 1);
194
- c(i);
187
+ const r = n.split("");
188
+ for (let s = 0; s < t.length && c + s < u; s++)
189
+ r[c + s] = t[s];
190
+ p(r.join(""), e);
191
+ const i = Math.min(c + t.length, u - 1);
192
+ o(i);
195
193
  },
196
- [n, p, c, o, h, v, E]
194
+ [n, p, o, u, h, g, E]
197
195
  );
198
- r.useImperativeHandle(k, () => ({
196
+ a.useImperativeHandle(k, () => ({
199
197
  get element() {
200
- return S.current;
198
+ return z.current;
201
199
  },
202
200
  get value() {
203
201
  return n;
204
202
  },
205
203
  focus(e) {
206
204
  if (e !== void 0)
207
- c(e);
205
+ o(e);
208
206
  else {
209
207
  const t = n.indexOf(" ");
210
- c(t >= 0 ? t : o - 1);
208
+ o(t >= 0 ? t : u - 1);
211
209
  }
212
210
  },
213
211
  blur() {
214
212
  T.current.forEach((e) => e == null ? void 0 : e.blur());
215
213
  }
216
- })), r.useImperativeHandle(d, () => k.current), me("otpinput", k, f, f.webMcp);
217
- const ie = () => {
218
- const e = (a) => {
214
+ })), a.useImperativeHandle(f, () => k.current), de("otpinput", k, d, d.webMcp);
215
+ const oe = () => {
216
+ const e = (r) => {
219
217
  var i;
220
- return /* @__PURE__ */ r.createElement(
221
- Ce,
218
+ return /* @__PURE__ */ a.createElement(
219
+ he,
222
220
  {
223
- key: a,
221
+ key: r,
224
222
  ref: (s) => {
225
- T.current[a] = s;
223
+ T.current[r] = s;
226
224
  },
227
- index: a,
228
- totalLength: o,
229
- char: (i = n[a]) != null ? i : " ",
225
+ index: r,
226
+ totalLength: u,
227
+ char: (i = n[r]) != null ? i : " ",
230
228
  type: h,
231
229
  placeholder: H,
232
- disabled: z,
230
+ disabled: P,
233
231
  readOnly: E,
234
- required: G,
232
+ required: q,
235
233
  size: D,
236
- fillMode: U,
237
- rounded: W,
238
- inputAttributes: q,
239
- valid: A === !1 || ae === a ? !1 : A,
234
+ fillMode: G,
235
+ rounded: U,
236
+ inputAttributes: S,
237
+ valid: A === !1 || te === r ? !1 : A,
240
238
  onCellChange: re,
241
- onCellKeyDown: le,
242
- onCellFocus: ne,
243
- onCellBlur: se,
244
- name: R ? `${R}-cell-${a}` : `otp-cell-${a}`,
245
- id: I ? `${I}-cell-${a}` : `otp-cell-${a}`
239
+ onCellKeyDown: ae,
240
+ onCellFocus: le,
241
+ onCellBlur: ne,
242
+ name: R ? `${R}-cell-${r}` : `otp-cell-${r}`,
243
+ id: V ? `${V}-cell-${r}` : `otp-cell-${r}`
246
244
  }
247
245
  );
248
246
  };
249
247
  if (!_) {
250
- const a = Array.from({ length: o }, (i, s) => e(s));
251
- return L === !1 ? [
252
- /* @__PURE__ */ r.createElement("div", { key: "group", className: "k-input-group" }, a)
253
- ] : a;
248
+ const r = Array.from({ length: u }, (i, s) => e(s));
249
+ return N === !1 ? [
250
+ /* @__PURE__ */ a.createElement("div", { key: "group", className: "k-input-group" }, r)
251
+ ] : r;
254
252
  }
255
- const t = Ee(o, _);
253
+ const t = ve(u, _);
256
254
  let l = 0;
257
- const u = [];
258
- return t.forEach((a, i) => {
255
+ const c = [];
256
+ return t.forEach((r, i) => {
259
257
  const s = l;
260
- i > 0 && w !== void 0 && u.push(/* @__PURE__ */ r.createElement(ge, { key: `sep-${s}`, separator: w }));
258
+ i > 0 && w !== void 0 && c.push(/* @__PURE__ */ a.createElement(be, { key: `sep-${s}`, separator: w }));
261
259
  const b = [];
262
- for (let $ = 0; $ < a; $++)
260
+ for (let $ = 0; $ < r; $++)
263
261
  b.push(e(l++));
264
- L === !1 ? u.push(
265
- /* @__PURE__ */ r.createElement("div", { key: `group-${s}`, className: "k-input-group" }, b)
266
- ) : u.push(...b);
267
- }), u;
268
- }, pe = he(
262
+ N === !1 ? c.push(
263
+ /* @__PURE__ */ a.createElement("div", { key: `group-${s}`, className: "k-input-group" }, b)
264
+ ) : c.push(...b);
265
+ }), c;
266
+ }, ie = fe(
269
267
  "k-otp",
270
268
  {
271
- "k-disabled": z,
269
+ "k-disabled": P,
272
270
  "k-invalid": A === !1,
273
- [`k-otp-${be.sizeMap[D] || D}`]: D
271
+ [`k-otp-${me.sizeMap[D] || D}`]: D
274
272
  },
275
- Z
276
- ), fe = ve().toLanguageString(j, ke[j]);
277
- return /* @__PURE__ */ r.createElement(
273
+ Y
274
+ );
275
+ return /* @__PURE__ */ a.createElement(
278
276
  "div",
279
277
  {
280
- ref: S,
281
- className: pe,
278
+ ref: z,
279
+ className: ie,
282
280
  role: "group",
283
- "aria-label": J || fe,
284
- "aria-labelledby": Q,
285
- "aria-describedby": X,
286
- id: I,
287
- style: Y,
288
- dir: V,
289
- onFocus: oe,
281
+ "aria-label": W,
282
+ "aria-labelledby": J,
283
+ "aria-describedby": Q,
284
+ id: V,
285
+ style: X,
286
+ dir: F,
287
+ onFocus: se,
290
288
  onBlur: ue,
291
289
  onPaste: ce,
292
- ...x
290
+ ...Z
293
291
  },
294
- R && /* @__PURE__ */ r.createElement("input", { "aria-hidden": !0, type: "hidden", name: R, value: n.replace(/ /g, "") }),
295
- ie()
292
+ R && /* @__PURE__ */ a.createElement("input", { "aria-hidden": !0, type: "hidden", name: R, value: n.replace(/ /g, "") }),
293
+ oe()
296
294
  );
297
295
  });
298
- _e.displayName = "KendoReactOTPInput";
296
+ ge.displayName = "KendoReactOTPInput";
299
297
  export {
300
- _e as OTPInput
298
+ ge as OTPInput
301
299
  };
@@ -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 e=Object.freeze({name:"@progress/kendo-react-inputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1784271738,version:"15.1.1-develop.3",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-inputs",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1785412073,version:"15.2.0-develop.2",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1784271738,
11
- version: '15.1.1-develop.3',
10
+ publishDate: 1785412073,
11
+ version: '15.2.0-develop.2',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-inputs",
3
- "version": "15.1.1-develop.3",
3
+ "version": "15.2.0-develop.2",
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",
@@ -28,14 +28,14 @@
28
28
  "@progress/kendo-drawing": "^1.21.2",
29
29
  "@progress/kendo-inputs-common": "^3.1.0",
30
30
  "@progress/kendo-licensing": "^1.7.2",
31
- "@progress/kendo-react-animation": "15.1.1-develop.3",
32
- "@progress/kendo-react-buttons": "15.1.1-develop.3",
33
- "@progress/kendo-react-common": "15.1.1-develop.3",
34
- "@progress/kendo-react-dialogs": "15.1.1-develop.3",
35
- "@progress/kendo-react-layout": "15.1.1-develop.3",
36
- "@progress/kendo-react-intl": "15.1.1-develop.3",
37
- "@progress/kendo-react-labels": "15.1.1-develop.3",
38
- "@progress/kendo-react-popup": "15.1.1-develop.3",
31
+ "@progress/kendo-react-animation": "15.2.0-develop.2",
32
+ "@progress/kendo-react-buttons": "15.2.0-develop.2",
33
+ "@progress/kendo-react-common": "15.2.0-develop.2",
34
+ "@progress/kendo-react-dialogs": "15.2.0-develop.2",
35
+ "@progress/kendo-react-layout": "15.2.0-develop.2",
36
+ "@progress/kendo-react-intl": "15.2.0-develop.2",
37
+ "@progress/kendo-react-labels": "15.2.0-develop.2",
38
+ "@progress/kendo-react-popup": "15.2.0-develop.2",
39
39
  "@progress/kendo-svg-icons": "^4.9.0 || ^5.0.0",
40
40
  "react": "^18.0.0 || ^19.0.0",
41
41
  "react-dom": "^18.0.0 || ^19.0.0"
@@ -82,7 +82,7 @@
82
82
  "package": {
83
83
  "productName": "KendoReact",
84
84
  "productCode": "KENDOUIREACT",
85
- "publishDate": 1784271738,
85
+ "publishDate": 1785412073,
86
86
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
87
87
  }
88
88
  },
@@ -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 M=require("react"),e=require("prop-types"),a=require("@progress/kendo-react-common");function K(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const c=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(l,s,c.get?c:{enumerable:!0,get:()=>n[s]})}}return l.default=n,Object.freeze(l)}const t=K(M),k=a.createPropsContext(),g=t.forwardRef((n,l)=>{const s=a.usePropsContext(k,n),{ariaDescribedBy:c,ariaLabel:x,checked:y,children:v,className:F,disabled:o,id:B,size:I=U.size,label:d,labelPlacement:O,name:j,style:q,tabIndex:z,value:b,valid:S,onChange:h,onFocus:m,onBlur:p,required:T,...D}=s,C=a.useUnstyled(),f=C&&C.uRadioButton,i=t.useRef(null),R=t.useCallback(()=>{i.current&&i.current.focus()},[]),u=t.useCallback(()=>({element:i.current,focus:R}),[R]);t.useImperativeHandle(l,u);const P=a.useId(),w=t.useCallback(r=>{a.dispatchEvent(h,r,u(),{value:b})},[h,b,o]),L=t.useCallback(r=>{m&&!o&&a.dispatchEvent(m,r,u(),void 0)},[m,o]),_=t.useCallback(r=>{p&&!o&&a.dispatchEvent(p,r,u(),void 0)},[p,o]),H={type:"radio",id:B||P,name:j,className:a.classNames(a.uRadioButton.input({c:f,size:I,invalid:S===!1,checked:y}),F),ref:i,disabled:o,tabIndex:a.getTabIndex(z,o),checked:y,style:q,"aria-describedby":c,"aria-label":x,"aria-required":T,value:b,onChange:w,onFocus:L,onBlur:_,...D},E=t.createElement(t.Fragment,null,d!==void 0?t.createElement("label",{className:a.classNames(a.uRadioButton.label({c:f})),htmlFor:B||P,style:{userSelect:"none"},"aria-label":d},d):null),N=t.createElement("span",{className:a.classNames(a.uRadioButton.wrap({c:f}))},t.createElement("input",{...H}));return O==="before"?t.createElement(t.Fragment,null,E,N,v):t.createElement(t.Fragment,null,N,E,v)});g.propTypes={ariaDescribedBy:e.string,ariaLabel:e.string,checked:e.bool,className:e.string,disabled:e.bool,id:e.string,size:e.oneOf(["small","medium","large"]),label:e.string,labelPlacement:e.string,name:e.string,style:e.object,tabIndex:e.number,value:e.any,valid:e.bool,onChange:e.func,onFocus:e.func,onBlur:e.func};const U={size:void 0};g.displayName="KendoRadioButton";exports.RadioButton=g;exports.RadioButtonPropsContext=k;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const M=require("react"),e=require("prop-types"),a=require("@progress/kendo-react-common");function K(o){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const l in o)if(l!=="default"){const c=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(s,l,c.get?c:{enumerable:!0,get:()=>o[l]})}}return s.default=o,Object.freeze(s)}const t=K(M),x=a.createPropsContext(),g=t.forwardRef((o,s)=>{const l=a.usePropsContext(x,o),{ariaDescribedBy:c,ariaLabel:F,checked:v,children:y,className:I,disabled:n,id:B,size:O=U.size,label:d,labelPlacement:j,name:q,style:z,tabIndex:S,value:b,valid:h,onChange:C,onFocus:m,onBlur:p,required:T,...D}=l,R=a.useUnstyled(),f=R&&R.uRadioButton,i=t.useRef(null),P=t.useCallback(()=>{i.current&&i.current.focus()},[]),u=t.useCallback(()=>({element:i.current,focus:P}),[P]);t.useImperativeHandle(s,u);const E=a.useId(),w=t.useCallback(r=>{a.dispatchEvent(C,r,u(),{value:b})},[C,b,n]),L=t.useCallback(r=>{m&&!n&&a.dispatchEvent(m,r,u(),void 0)},[m,n]),_=t.useCallback(r=>{p&&!n&&a.dispatchEvent(p,r,u(),void 0)},[p,n]),H={type:"radio",id:B||E,name:q,className:a.classNames(a.uRadioButton.input({c:f,size:O,disabled:n,invalid:h===!1,checked:v}),I),ref:i,disabled:n,tabIndex:a.getTabIndex(S,n),checked:v,style:z,"aria-describedby":c,"aria-label":F,"aria-required":T,"aria-invalid":h===!1?"true":void 0,value:b,onChange:w,onFocus:L,onBlur:_,...D},N=t.createElement(t.Fragment,null,d!==void 0?t.createElement("label",{className:a.classNames(a.uRadioButton.label({c:f})),htmlFor:B||E,style:{userSelect:"none"},"aria-label":d},d):null),k=t.createElement("span",{className:a.classNames(a.uRadioButton.wrap({c:f}))},t.createElement("input",{...H}));return j==="before"?t.createElement(t.Fragment,null,N,k,y):t.createElement(t.Fragment,null,k,N,y)});g.propTypes={ariaDescribedBy:e.string,ariaLabel:e.string,checked:e.bool,className:e.string,disabled:e.bool,id:e.string,size:e.oneOf(["small","medium","large"]),label:e.string,labelPlacement:e.string,name:e.string,style:e.object,tabIndex:e.number,value:e.any,valid:e.bool,onChange:e.func,onFocus:e.func,onBlur:e.func};const U={size:void 0};g.displayName="KendoRadioButton";exports.RadioButton=g;exports.RadioButtonPropsContext=x;
@@ -8,29 +8,29 @@
8
8
  import * as e from "react";
9
9
  import a from "prop-types";
10
10
  import { usePropsContext as A, useUnstyled as G, useId as J, dispatchEvent as d, getTabIndex as M, classNames as m, uRadioButton as b, createPropsContext as Q } from "@progress/kendo-react-common";
11
- const V = Q(), x = e.forwardRef((E, F) => {
12
- const I = A(V, E), {
13
- ariaDescribedBy: P,
14
- ariaLabel: k,
11
+ const V = Q(), E = e.forwardRef((F, I) => {
12
+ const P = A(V, F), {
13
+ ariaDescribedBy: k,
14
+ ariaLabel: N,
15
15
  checked: p,
16
16
  children: f,
17
- className: N,
17
+ className: z,
18
18
  disabled: n,
19
19
  id: g,
20
- size: z = W.size,
20
+ size: L = W.size,
21
21
  label: o,
22
- labelPlacement: L,
23
- name: T,
24
- style: q,
25
- tabIndex: w,
22
+ labelPlacement: T,
23
+ name: q,
24
+ style: w,
25
+ tabIndex: D,
26
26
  value: r,
27
- valid: D,
27
+ valid: v,
28
28
  onChange: h,
29
29
  onFocus: c,
30
30
  onBlur: i,
31
31
  required: H,
32
32
  ...j
33
- } = I, y = G(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(() => {
33
+ } = P, y = G(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(() => {
34
34
  l.current && l.current.focus();
35
35
  }, []), s = e.useCallback(
36
36
  () => ({
@@ -39,8 +39,8 @@ const V = Q(), x = e.forwardRef((E, F) => {
39
39
  }),
40
40
  [C]
41
41
  );
42
- e.useImperativeHandle(F, s);
43
- const v = J(), K = e.useCallback(
42
+ e.useImperativeHandle(I, s);
43
+ const B = J(), K = e.useCallback(
44
44
  (t) => {
45
45
  d(h, t, s(), {
46
46
  value: r
@@ -64,43 +64,45 @@ const V = Q(), x = e.forwardRef((E, F) => {
64
64
  [i, n]
65
65
  ), U = {
66
66
  type: "radio",
67
- id: g || v,
68
- name: T,
67
+ id: g || B,
68
+ name: q,
69
69
  className: m(
70
70
  b.input({
71
71
  c: u,
72
- size: z,
73
- invalid: D === !1,
72
+ size: L,
73
+ disabled: n,
74
+ invalid: v === !1,
74
75
  checked: p
75
76
  }),
76
- N
77
+ z
77
78
  ),
78
79
  ref: l,
79
80
  disabled: n,
80
- tabIndex: M(w, n),
81
+ tabIndex: M(D, n),
81
82
  checked: p,
82
- style: q,
83
- "aria-describedby": P,
84
- "aria-label": k,
83
+ style: w,
84
+ "aria-describedby": k,
85
+ "aria-label": N,
85
86
  "aria-required": H,
87
+ "aria-invalid": v === !1 ? "true" : void 0,
86
88
  value: r,
87
89
  onChange: K,
88
90
  onFocus: O,
89
91
  onBlur: S,
90
92
  ...j
91
- }, B = /* @__PURE__ */ e.createElement(e.Fragment, null, o !== void 0 ? /* @__PURE__ */ e.createElement(
93
+ }, R = /* @__PURE__ */ e.createElement(e.Fragment, null, o !== void 0 ? /* @__PURE__ */ e.createElement(
92
94
  "label",
93
95
  {
94
96
  className: m(b.label({ c: u })),
95
- htmlFor: g || v,
97
+ htmlFor: g || B,
96
98
  style: { userSelect: "none" },
97
99
  "aria-label": o
98
100
  },
99
101
  o
100
- ) : null), R = /* @__PURE__ */ e.createElement("span", { className: m(b.wrap({ c: u })) }, /* @__PURE__ */ e.createElement("input", { ...U }));
101
- return L === "before" ? /* @__PURE__ */ e.createElement(e.Fragment, null, B, R, f) : /* @__PURE__ */ e.createElement(e.Fragment, null, R, B, f);
102
+ ) : null), x = /* @__PURE__ */ e.createElement("span", { className: m(b.wrap({ c: u })) }, /* @__PURE__ */ e.createElement("input", { ...U }));
103
+ return T === "before" ? /* @__PURE__ */ e.createElement(e.Fragment, null, R, x, f) : /* @__PURE__ */ e.createElement(e.Fragment, null, x, R, f);
102
104
  });
103
- x.propTypes = {
105
+ E.propTypes = {
104
106
  ariaDescribedBy: a.string,
105
107
  ariaLabel: a.string,
106
108
  checked: a.bool,
@@ -122,8 +124,8 @@ x.propTypes = {
122
124
  const W = {
123
125
  size: void 0
124
126
  };
125
- x.displayName = "KendoRadioButton";
127
+ E.displayName = "KendoRadioButton";
126
128
  export {
127
- x as RadioButton,
129
+ E as RadioButton,
128
130
  V as RadioButtonPropsContext
129
131
  };