@progress/kendo-react-inputs 8.3.0-develop.9 → 8.3.0

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.
@@ -12,13 +12,13 @@ import { useInternationalization as Qe, useLocalization as Xe } from "@progress/
12
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
13
  import { caretAltUpIcon as st, caretAltDownIcon as ot } from "@progress/kendo-svg-icons";
14
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
- 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";
15
+ import { packageMetadata as it } from "../package-metadata.mjs";
16
+ import { numericIncreaseValue as M, messages as T, numericDecreaseValue as z } from "../messages/index.mjs";
17
+ import { getInitialState as ve, formatValue as q, 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!", dt = Ze(), Ee = n.forwardRef((C, Se) => {
20
- et(ct);
21
- const q = tt(dt, C), {
19
+ const ct = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) => {
20
+ et(it);
21
+ const j = tt(dt, C), {
22
22
  className: xe,
23
23
  value: b,
24
24
  defaultValue: he,
@@ -28,10 +28,10 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
28
28
  accessKey: Oe,
29
29
  title: Le,
30
30
  placeholder: ee,
31
- min: i,
31
+ min: c,
32
32
  max: d,
33
33
  dir: te,
34
- name: j,
34
+ name: A,
35
35
  label: I,
36
36
  id: Pe,
37
37
  ariaDescribedBy: Ne,
@@ -39,80 +39,80 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
39
39
  ariaLabel: Re,
40
40
  inputType: Fe,
41
41
  readOnly: g,
42
- validationMessage: A,
42
+ validationMessage: _,
43
43
  children: Be,
44
44
  style: ne,
45
45
  inputStyle: Me,
46
- valid: _,
46
+ valid: H,
47
47
  step: v = u.step,
48
48
  spinners: Te = u.spinners,
49
49
  disabled: o = u.disabled,
50
- required: H = u.required,
50
+ required: O = u.required,
51
51
  validityStyles: re = u.validityStyles,
52
52
  prefix: ze = u.prefix,
53
- suffix: Ge = u.suffix,
53
+ suffix: qe = u.suffix,
54
54
  onChange: E = u.onChange,
55
55
  onFocus: ae = u.onFocus,
56
56
  onBlur: le = u.onBlur,
57
57
  rangeOnEnter: se = u.rangeOnEnter,
58
58
  size: K = u.size,
59
59
  rounded: w = u.rounded,
60
- fillMode: O = u.fillMode,
61
- autoFocus: qe = u.autoFocus,
60
+ fillMode: L = u.fillMode,
61
+ autoFocus: Ge = u.autoFocus,
62
62
  ...oe
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),
63
+ } = j, je = nt(), ue = Pe || je, s = Qe(), P = Xe(), a = n.useRef(null), N = n.useRef(), [Ae, S] = n.useState(!1), i = n.useRef(ve()), D = n.useRef(!1), U = n.useRef(), x = n.useRef(he), h = q(
64
+ i.current.focused && !o ? i.current.currentLooseValue : X(b, x.current),
65
65
  l,
66
66
  s
67
67
  );
68
68
  U.current = h;
69
- const [_e] = pe(ze), [He] = pe(Ge);
69
+ const [_e] = pe(ze), [He] = pe(qe);
70
70
  n.useEffect(
71
71
  () => {
72
72
  a.current && a.current.setCustomValidity && a.current.setCustomValidity(
73
- F().valid ? "" : A || it
73
+ B().valid ? "" : _ || ct
74
74
  );
75
75
  }
76
76
  );
77
- const ce = n.useCallback(
77
+ const ie = n.useCallback(
78
78
  () => {
79
79
  a.current && a.current.focus();
80
80
  },
81
81
  []
82
- ), D = n.useCallback(
83
- () => P.current !== void 0 ? P.current : X(b, x.current),
84
- [b]
85
- ), ie = n.useCallback(
86
- () => j,
87
- [j]
88
82
  ), R = n.useCallback(
89
- () => H,
90
- [H]
83
+ () => N.current !== void 0 ? N.current : X(b, x.current),
84
+ [b]
85
+ ), ce = n.useCallback(
86
+ () => A,
87
+ [A]
91
88
  ), F = n.useCallback(
89
+ () => O,
90
+ [O]
91
+ ), B = n.useCallback(
92
92
  () => {
93
- const r = A !== void 0, e = D(), V = _ !== void 0 ? _ : !c.current.valueIsOutOfRange && (!R() || e != null);
93
+ const r = _ !== void 0, e = R(), V = H !== void 0 ? H : !i.current.valueIsOutOfRange && (!F() || e != null);
94
94
  return {
95
95
  customError: r,
96
96
  valid: V,
97
97
  valueMissing: e == null
98
98
  };
99
99
  },
100
- [A, _, D, R]
100
+ [_, H, R, F]
101
101
  ), $ = n.useCallback(
102
102
  () => re,
103
103
  [re]
104
104
  ), de = n.useCallback(
105
- () => q,
106
- [q]
105
+ () => j,
106
+ [j]
107
107
  ), y = n.useCallback(
108
108
  () => {
109
109
  const r = {
110
110
  element: a.current,
111
- focus: ce
111
+ focus: ie
112
112
  };
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
+ return Object.defineProperty(r, "name", { get: ce }), Object.defineProperty(r, "value", { get: R }), Object.defineProperty(r, "validity", { get: B }), Object.defineProperty(r, "validityStyles", { get: $ }), Object.defineProperty(r, "required", { get: F }), Object.defineProperty(r, "props", { get: de }), r;
114
114
  },
115
- [ie, D, F, $, R, ce, de]
115
+ [ce, R, B, $, F, ie, de]
116
116
  );
117
117
  n.useImperativeHandle(Se, y);
118
118
  const f = n.useCallback(
@@ -125,28 +125,28 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
125
125
  decimalSelect: !1,
126
126
  valueIsCorrected: !1,
127
127
  valueIsOutOfRange: !1,
128
- isPaste: N.current,
129
- focused: c.current.focused
128
+ isPaste: D.current,
129
+ focused: i.current.focused
130
130
  }),
131
131
  [b]
132
132
  ), p = n.useCallback(
133
133
  (r, e) => {
134
134
  if (o)
135
135
  return;
136
- P.current = e.eventValue, x.current = e.eventValue;
137
- const V = z(G(e.eventValue, i, d), l, s), m = G(s.parseNumber(V, l), i, d);
136
+ N.current = e.eventValue, x.current = e.eventValue;
137
+ const V = q(G(e.eventValue, c, d), l, s), m = G(s.parseNumber(V, l), c, d);
138
138
  m !== e.eventValue && (e.valueIsOutOfRange = !0, e.eventValue = m, x.current = m), b !== e.eventValue && Q(
139
139
  E,
140
140
  r,
141
141
  y(),
142
142
  { value: e.eventValue }
143
- ), P.current = void 0, c.current = e, S((J) => !J);
143
+ ), N.current = void 0, i.current = e, S((J) => !J);
144
144
  },
145
145
  [b, E, o, S, y]
146
146
  ), Ke = n.useCallback(
147
147
  (r) => {
148
148
  const e = f();
149
- N.current = !1, p(r, ye(e, l, s));
149
+ D.current = !1, p(r, ye(e, l, s));
150
150
  },
151
151
  [l, E, s, p, f]
152
152
  ), we = n.useCallback(
@@ -155,7 +155,7 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
155
155
  const V = s.parseNumber(String(e.currentLooseValue), l);
156
156
  if (e.selectionEnd > e.selectionStart && e.selectionEnd - e.selectionStart === String(e.currentLooseValue).length) {
157
157
  const m = s.numberSymbols(), k = m && r.key === m.minusSign, J = m && r.key === m.decimal;
158
- N.current = !k && !J;
158
+ D.current = !k && !J;
159
159
  return;
160
160
  }
161
161
  switch (r.keyCode) {
@@ -164,7 +164,7 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
164
164
  V,
165
165
  e,
166
166
  v,
167
- i,
167
+ c,
168
168
  d,
169
169
  l,
170
170
  s
@@ -175,7 +175,7 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
175
175
  V,
176
176
  e,
177
177
  v,
178
- i,
178
+ c,
179
179
  d,
180
180
  l,
181
181
  s
@@ -184,8 +184,8 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
184
184
  case 13: {
185
185
  if (se === !1)
186
186
  return;
187
- const m = z(G(V, i, d), l, s), k = G(s.parseNumber(m, l), i, d);
188
- e.eventValue = k, e.currentLooseValue = z(k, l, s), e.selectionStart = e.selectionEnd = e.currentLooseValue.length;
187
+ const m = q(G(V, c, d), l, s), k = G(s.parseNumber(m, l), c, d);
188
+ e.eventValue = k, e.currentLooseValue = q(k, l, s), e.selectionStart = e.selectionEnd = e.currentLooseValue.length;
189
189
  break;
190
190
  }
191
191
  case 110: {
@@ -198,10 +198,10 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
198
198
  }
199
199
  r.preventDefault(), p(r, e);
200
200
  },
201
- [l, i, d, v, E, se, p, f]
201
+ [l, c, d, v, E, se, p, f]
202
202
  ), Ue = n.useCallback(
203
203
  () => {
204
- N.current = !0;
204
+ D.current = !0;
205
205
  },
206
206
  []
207
207
  ), W = n.useCallback(
@@ -213,13 +213,13 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
213
213
  s.parseNumber(String(e.currentLooseValue), l),
214
214
  e,
215
215
  v,
216
- i,
216
+ c,
217
217
  d,
218
218
  l,
219
219
  s
220
220
  ), p(r, e);
221
221
  },
222
- [l, i, d, v, E, g, o, p, f]
222
+ [l, c, d, v, E, g, o, p, f]
223
223
  ), Y = n.useCallback(
224
224
  (r) => {
225
225
  if (g || o)
@@ -229,13 +229,13 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
229
229
  s.parseNumber(String(e.currentLooseValue), l),
230
230
  e,
231
231
  v,
232
- i,
232
+ c,
233
233
  d,
234
234
  l,
235
235
  s
236
236
  ), p(r, e);
237
237
  },
238
- [l, i, d, v, E, g, o, p, f]
238
+ [l, c, d, v, E, g, o, p, f]
239
239
  ), $e = n.useCallback(
240
240
  (r) => {
241
241
  const e = be(document);
@@ -244,7 +244,7 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
244
244
  [W, Y, o, g]
245
245
  ), We = n.useCallback(
246
246
  (r) => {
247
- c.current.currentLooseValue = U.current, c.current.focused = !0, Q(
247
+ i.current.currentLooseValue = U.current, i.current.focused = !0, Q(
248
248
  ae,
249
249
  r,
250
250
  y(),
@@ -254,7 +254,7 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
254
254
  [ae, S, y]
255
255
  ), Ye = n.useCallback(
256
256
  (r) => {
257
- c.current = ve(), Q(
257
+ i.current = ve(), Q(
258
258
  le,
259
259
  r,
260
260
  y(),
@@ -273,11 +273,11 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
273
273
  );
274
274
  rt(
275
275
  () => {
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
+ a.current && a.current.type !== "number" && i.current.selectionStart !== void 0 && i.current.selectionEnd !== void 0 && (a.current.selectionStart = i.current.selectionStart, a.current.selectionEnd = i.current.selectionEnd, i.current.selectionStart = void 0, i.current.selectionEnd = void 0);
277
277
  },
278
278
  [Ae]
279
279
  );
280
- const me = !$() || F().valid, fe = /* @__PURE__ */ n.createElement(
280
+ const me = !$() || B().valid, fe = /* @__PURE__ */ n.createElement(
281
281
  "span",
282
282
  {
283
283
  dir: te,
@@ -287,10 +287,10 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
287
287
  "k-numerictextbox",
288
288
  {
289
289
  [`k-input-${ge.sizeMap[K] || K}`]: K,
290
- [`k-input-${O}`]: O,
290
+ [`k-input-${L}`]: L,
291
291
  [`k-rounded-${ge.roundedMap[w] || w}`]: w,
292
292
  "k-invalid": !me,
293
- "k-required": H,
293
+ "k-required": O,
294
294
  "k-disabled": o
295
295
  },
296
296
  xe
@@ -309,20 +309,21 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
309
309
  disabled: o,
310
310
  title: Le,
311
311
  "aria-disabled": o ? "true" : void 0,
312
- "aria-valuemin": i,
312
+ "aria-valuemin": c,
313
313
  "aria-valuemax": d,
314
314
  "aria-label": Re,
315
315
  "aria-labelledby": De,
316
316
  "aria-describedby": Ne,
317
+ "aria-required": O,
317
318
  placeholder: ee,
318
319
  spellCheck: !1,
319
320
  autoComplete: "off",
320
321
  autoCorrect: "off",
321
- autoFocus: qe,
322
+ autoFocus: Ge,
322
323
  type: Fe || "tel",
323
324
  className: "k-input-inner",
324
325
  id: ue,
325
- name: j,
326
+ name: A,
326
327
  readOnly: g,
327
328
  style: Me,
328
329
  onChange: Ke,
@@ -350,10 +351,10 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
350
351
  icon: "caret-alt-up",
351
352
  svgIcon: st,
352
353
  rounded: null,
353
- fillMode: O,
354
+ fillMode: L,
354
355
  className: "k-spinner-increase",
355
- "aria-label": L.toLanguageString(B, M[B]),
356
- title: L.toLanguageString(B, M[B]),
356
+ "aria-label": P.toLanguageString(M, T[M]),
357
+ title: P.toLanguageString(M, T[M]),
357
358
  onClick: W
358
359
  }
359
360
  ),
@@ -365,10 +366,10 @@ const it = "Please enter a valid value!", dt = Ze(), Ee = n.forwardRef((C, Se) =
365
366
  icon: "caret-alt-down",
366
367
  svgIcon: ot,
367
368
  rounded: null,
368
- fillMode: O,
369
+ fillMode: L,
369
370
  className: "k-spinner-decrease",
370
- "aria-label": L.toLanguageString(T, M[T]),
371
- title: L.toLanguageString(T, M[T]),
371
+ "aria-label": P.toLanguageString(z, T[z]),
372
+ title: P.toLanguageString(z, T[z]),
372
373
  onClick: Y
373
374
  }
374
375
  )
@@ -10,7 +10,7 @@ const e = {
10
10
  name: "@progress/kendo-react-inputs",
11
11
  productName: "KendoReact",
12
12
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
13
- publishDate: 1724413257,
13
+ publishDate: 1726561298,
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.3.0-develop.9",
3
+ "version": "8.3.0",
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.3.0-develop.9",
29
- "@progress/kendo-react-buttons": "8.3.0-develop.9",
30
- "@progress/kendo-react-common": "8.3.0-develop.9",
31
- "@progress/kendo-react-dialogs": "8.3.0-develop.9",
32
- "@progress/kendo-react-intl": "8.3.0-develop.9",
33
- "@progress/kendo-react-labels": "8.3.0-develop.9",
34
- "@progress/kendo-react-popup": "8.3.0-develop.9",
28
+ "@progress/kendo-react-animation": "8.3.0",
29
+ "@progress/kendo-react-buttons": "8.3.0",
30
+ "@progress/kendo-react-common": "8.3.0",
31
+ "@progress/kendo-react-dialogs": "8.3.0",
32
+ "@progress/kendo-react-intl": "8.3.0",
33
+ "@progress/kendo-react-labels": "8.3.0",
34
+ "@progress/kendo-react-popup": "8.3.0",
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,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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react"),t=require("prop-types"),a=require("@progress/kendo-react-common"),H=require("../package-metadata.js");function K(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(l,s,r.get?r:{enumerable:!0,get:()=>n[s]})}}return l.default=n,Object.freeze(l)}const e=K(_),N=a.createPropsContext(),g=e.forwardRef((n,l)=>{a.validatePackage(H.packageMetadata);const s=a.usePropsContext(N,n),{ariaDescribedBy:r,checked:y,children:v,className:x,disabled:o,id:B,size:F=L.size,label:d,labelPlacement:I,name:O,style:j,tabIndex:z,value:m,valid:S,onChange:h,onFocus:b,onBlur:p,...T}=s,C=a.useUnstyled(),f=C&&C.uRadioButton,u=e.useRef(null),R=e.useCallback(()=>{u.current&&u.current.focus()},[]),i=e.useCallback(()=>({element:u.current,focus:R}),[R]);e.useImperativeHandle(l,i);const P=a.useId(),q=e.useCallback(c=>{a.dispatchEvent(h,c,i(),{value:m})},[h,m,o]),D=e.useCallback(c=>{b&&!o&&a.dispatchEvent(b,c,i(),void 0)},[b,o]),M=e.useCallback(c=>{p&&!o&&a.dispatchEvent(p,c,i(),void 0)},[p,o]),w={type:"radio",id:B||P,name:O,className:a.classNames(a.uRadioButton.input({c:f,size:F,invalid:S===!1,checked:y}),x),ref:u,disabled:o,tabIndex:a.getTabIndex(z,o),checked:y,style:j,"aria-describedby":r,value:m,onChange:q,onFocus:D,onBlur:M,...T},k=e.createElement(e.Fragment,null,d!==void 0?e.createElement("label",{className:a.classNames(a.uRadioButton.label({c:f})),htmlFor:B||P,style:{userSelect:"none"},"aria-label":d},d):null),E=e.createElement("span",{className:a.classNames(a.uRadioButton.wrap({c:f}))},e.createElement("input",{...w}));return I==="before"?e.createElement(e.Fragment,null,k,E,v):e.createElement(e.Fragment,null,E,k,v)});g.propTypes={ariaDescribedBy:t.string,checked:t.bool,className:t.string,disabled:t.bool,id:t.string,size:t.oneOf([null,"small","medium","large"]),label:t.string,labelPlacement:t.string,name:t.string,style:t.object,tabIndex:t.number,value:t.any,valid:t.bool,onChange:t.func,onFocus:t.func,onBlur:t.func};const L={size:"medium"};g.displayName="KendoRadioButton";exports.RadioButton=g;exports.RadioButtonPropsContext=N;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),t=require("prop-types"),a=require("@progress/kendo-react-common"),K=require("../package-metadata.js");function L(n){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const s in n)if(s!=="default"){const r=Object.getOwnPropertyDescriptor(n,s);Object.defineProperty(l,s,r.get?r:{enumerable:!0,get:()=>n[s]})}}return l.default=n,Object.freeze(l)}const e=L(H),N=a.createPropsContext(),g=e.forwardRef((n,l)=>{a.validatePackage(K.packageMetadata);const s=a.usePropsContext(N,n),{ariaDescribedBy:r,checked:y,children:v,className:x,disabled:o,id:B,size:F=U.size,label:d,labelPlacement:I,name:O,style:j,tabIndex:q,value:m,valid:z,onChange:h,onFocus:b,onBlur:p,required:S,...T}=s,C=a.useUnstyled(),f=C&&C.uRadioButton,u=e.useRef(null),R=e.useCallback(()=>{u.current&&u.current.focus()},[]),i=e.useCallback(()=>({element:u.current,focus:R}),[R]);e.useImperativeHandle(l,i);const P=a.useId(),D=e.useCallback(c=>{a.dispatchEvent(h,c,i(),{value:m})},[h,m,o]),M=e.useCallback(c=>{b&&!o&&a.dispatchEvent(b,c,i(),void 0)},[b,o]),w=e.useCallback(c=>{p&&!o&&a.dispatchEvent(p,c,i(),void 0)},[p,o]),_={type:"radio",id:B||P,name:O,className:a.classNames(a.uRadioButton.input({c:f,size:F,invalid:z===!1,checked:y}),x),ref:u,disabled:o,tabIndex:a.getTabIndex(q,o),checked:y,style:j,"aria-describedby":r,"aria-required":S,value:m,onChange:D,onFocus:M,onBlur:w,...T},k=e.createElement(e.Fragment,null,d!==void 0?e.createElement("label",{className:a.classNames(a.uRadioButton.label({c:f})),htmlFor:B||P,style:{userSelect:"none"},"aria-label":d},d):null),E=e.createElement("span",{className:a.classNames(a.uRadioButton.wrap({c:f}))},e.createElement("input",{..._}));return I==="before"?e.createElement(e.Fragment,null,k,E,v):e.createElement(e.Fragment,null,E,k,v)});g.propTypes={ariaDescribedBy:t.string,checked:t.bool,className:t.string,disabled:t.bool,id:t.string,size:t.oneOf([null,"small","medium","large"]),label:t.string,labelPlacement:t.string,name:t.string,style:t.object,tabIndex:t.number,value:t.any,valid:t.bool,onChange:t.func,onFocus:t.func,onBlur:t.func};const U={size:"medium"};g.displayName="KendoRadioButton";exports.RadioButton=g;exports.RadioButtonPropsContext=N;
@@ -8,30 +8,31 @@
8
8
  "use client";
9
9
  import * as e from "react";
10
10
  import a from "prop-types";
11
- import { createPropsContext as S, validatePackage as U, usePropsContext as q, useUnstyled as A, useId as G, dispatchEvent as d, classNames as m, uRadioButton as b, getTabIndex as J } from "@progress/kendo-react-common";
12
- import { packageMetadata as Q } from "../package-metadata.mjs";
13
- const V = S(), P = e.forwardRef((R, x) => {
14
- U(Q);
15
- const E = q(V, R), {
11
+ import { createPropsContext as S, validatePackage as U, usePropsContext as A, useUnstyled as G, useId as J, dispatchEvent as d, classNames as m, uRadioButton as b, getTabIndex as Q } from "@progress/kendo-react-common";
12
+ import { packageMetadata as V } from "../package-metadata.mjs";
13
+ const W = S(), P = e.forwardRef((R, x) => {
14
+ U(V);
15
+ const E = A(W, R), {
16
16
  ariaDescribedBy: F,
17
17
  checked: p,
18
18
  children: f,
19
19
  className: I,
20
20
  disabled: t,
21
21
  id: g,
22
- size: N = W.size,
22
+ size: N = X.size,
23
23
  label: o,
24
24
  labelPlacement: z,
25
25
  name: T,
26
- style: w,
27
- tabIndex: D,
28
- value: c,
29
- valid: H,
26
+ style: q,
27
+ tabIndex: w,
28
+ value: r,
29
+ valid: D,
30
30
  onChange: h,
31
- onFocus: r,
31
+ onFocus: c,
32
32
  onBlur: i,
33
+ required: H,
33
34
  ...j
34
- } = E, y = A(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(
35
+ } = E, y = G(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(
35
36
  () => {
36
37
  l.current && l.current.focus();
37
38
  },
@@ -44,26 +45,26 @@ const V = S(), P = e.forwardRef((R, x) => {
44
45
  [C]
45
46
  );
46
47
  e.useImperativeHandle(x, s);
47
- const v = G(), K = e.useCallback(
48
+ const v = J(), K = e.useCallback(
48
49
  (n) => {
49
50
  d(
50
51
  h,
51
52
  n,
52
53
  s(),
53
- { value: c }
54
+ { value: r }
54
55
  );
55
56
  },
56
- [h, c, t]
57
+ [h, r, t]
57
58
  ), L = e.useCallback(
58
59
  (n) => {
59
- r && !t && d(
60
- r,
60
+ c && !t && d(
61
+ c,
61
62
  n,
62
63
  s(),
63
64
  void 0
64
65
  );
65
66
  },
66
- [r, t]
67
+ [c, t]
67
68
  ), M = e.useCallback(
68
69
  (n) => {
69
70
  i && !t && d(
@@ -82,18 +83,19 @@ const V = S(), P = e.forwardRef((R, x) => {
82
83
  b.input({
83
84
  c: u,
84
85
  size: N,
85
- invalid: H === !1,
86
+ invalid: D === !1,
86
87
  checked: p
87
88
  }),
88
89
  I
89
90
  ),
90
91
  ref: l,
91
92
  disabled: t,
92
- tabIndex: J(D, t),
93
+ tabIndex: Q(w, t),
93
94
  checked: p,
94
- style: w,
95
+ style: q,
95
96
  "aria-describedby": F,
96
- value: c,
97
+ "aria-required": H,
98
+ value: r,
97
99
  onChange: K,
98
100
  onFocus: L,
99
101
  onBlur: M,
@@ -128,11 +130,11 @@ P.propTypes = {
128
130
  onFocus: a.func,
129
131
  onBlur: a.func
130
132
  };
131
- const W = {
133
+ const X = {
132
134
  size: "medium"
133
135
  };
134
136
  P.displayName = "KendoRadioButton";
135
137
  export {
136
138
  P as RadioButton,
137
- V as RadioButtonPropsContext
139
+ W as RadioButtonPropsContext
138
140
  };
@@ -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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react"),e=require("prop-types"),U=require("./RadioButton.js"),a=require("@progress/kendo-react-common"),A=require("../package-metadata.js");function J(o){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const n in o)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(o,n);Object.defineProperty(c,n,i.get?i:{enumerable:!0,get:()=>o[n]})}}return c.default=o,Object.freeze(c)}const s=J(K),N=a.createPropsContext(),y=s.forwardRef((o,c)=>{a.validatePackage(A.packageMetadata);const n=a.usePropsContext(N,o),{id:i,ariaLabelledBy:O,ariaDescribedBy:j,className:B,data:g,defaultValue:I,disabled:l,name:F,labelPlacement:S,layout:d,style:q,value:C,valid:x,item:D=Q.item,onChange:b,onFocus:m}=n,v=a.useUnstyled(),h=v&&v.uRadioGroup,u=s.useRef(null),R=s.useCallback(()=>{u.current&&a.focusFirstFocusableChild(u.current)},[]),p=s.useCallback(()=>({element:u.current,focus:R}),[R]);s.useImperativeHandle(c,p);const[M,k]=s.useState(I),P=C!==void 0,f=P?C:M,T=s.useCallback(t=>{let r=t.value;!P&&!l&&k(r),b&&!l&&a.dispatchEvent(b,t.syntheticEvent,p(),{value:r})},[k,b,l]),V=s.useCallback(t=>{m&&!l&&a.dispatchEvent(m,t.syntheticEvent,p(),void 0)},[m,l]),z=a.useId(),_=a.classNames(a.uRadioGroup.ul({c:h,horizontal:d==="horizontal",vertical:d==="vertical"||d===void 0}),B),w=a.useRtl(u,n.dir),H=g&&g.map((t,r)=>{const G=f===t.value,L=f==null,E={...t,valid:x,checked:G,disabled:!!(t.disabled||l),labelPlacement:t.labelPlacement?t.labelPlacement:S,tabIndex:t.tabIndex?t.tabIndex:L&&r===0||G?0:-1,index:r,name:F||z,onChange:T,onFocus:V};return s.createElement(D,{className:a.classNames(a.uRadioGroup.item({c:h,disabled:E.disabled||l})),key:r,role:"none"},s.createElement(U.RadioButton,{...E}))});return s.createElement("ul",{id:i,role:"radiogroup",className:_,ref:u,dir:w,style:q,"aria-labelledby":O,"aria-describedby":j},H)}),Q={item:o=>s.createElement("li",{...o})};y.propTypes={ariaLabelledBy:e.string,ariaDescribedBy:e.string,className:e.string,data:e.arrayOf(e.object),defaultValue:e.any,dir:e.string,disabled:e.bool,labelPlacement:e.string,layout:e.string,name:e.string,style:e.object,value:e.any,onChange:e.func,onFocus:e.func};y.displayName="KendoRadioGroup";exports.RadioGroup=y;exports.RadioGroupPropsContext=N;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const K=require("react"),e=require("prop-types"),U=require("./RadioButton.js"),t=require("@progress/kendo-react-common"),A=require("../package-metadata.js");function J(n){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const i=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(c,o,i.get?i:{enumerable:!0,get:()=>n[o]})}}return c.default=n,Object.freeze(c)}const s=J(K),N=t.createPropsContext(),y=s.forwardRef((n,c)=>{t.validatePackage(A.packageMetadata);const o=t.usePropsContext(N,n),{id:i,ariaLabelledBy:O,ariaDescribedBy:j,className:q,data:g,defaultValue:B,disabled:r,name:I,labelPlacement:F,layout:d,style:S,value:C,valid:x,item:D=Q.item,onChange:b,onFocus:m}=o,v=t.useUnstyled(),h=v&&v.uRadioGroup,u=s.useRef(null),R=s.useCallback(()=>{u.current&&t.focusFirstFocusableChild(u.current)},[]),p=s.useCallback(()=>({element:u.current,focus:R}),[R]);s.useImperativeHandle(c,p);const[M,k]=s.useState(B),P=C!==void 0,f=P?C:M,T=s.useCallback(a=>{const l=a.value;!P&&!r&&k(l),b&&!r&&t.dispatchEvent(b,a.syntheticEvent,p(),{value:l})},[k,b,r]),V=s.useCallback(a=>{m&&!r&&t.dispatchEvent(m,a.syntheticEvent,p(),void 0)},[m,r]),z=t.useId(),_=t.classNames(t.uRadioGroup.ul({c:h,horizontal:d==="horizontal",vertical:d==="vertical"||d===void 0}),q),w=t.useRtl(u,o.dir),H=g&&g.map((a,l)=>{const G=f===a.value,L=f==null,E={...a,valid:x,checked:G,disabled:!!(a.disabled||r),labelPlacement:a.labelPlacement?a.labelPlacement:F,tabIndex:a.tabIndex?a.tabIndex:L&&l===0||G?0:-1,index:l,name:I||z,required:a.required,onChange:T,onFocus:V};return s.createElement(D,{className:t.classNames(t.uRadioGroup.item({c:h,disabled:E.disabled||r})),key:l,role:"none"},s.createElement(U.RadioButton,{...E}))});return s.createElement("ul",{id:i,role:"radiogroup",className:_,ref:u,dir:w,style:S,"aria-labelledby":O,"aria-describedby":j},H)}),Q={item:n=>s.createElement("li",{...n})};y.propTypes={ariaLabelledBy:e.string,ariaDescribedBy:e.string,className:e.string,data:e.arrayOf(e.object),defaultValue:e.any,dir:e.string,disabled:e.bool,labelPlacement:e.string,layout:e.string,name:e.string,style:e.object,value:e.any,onChange:e.func,onFocus:e.func};y.displayName="KendoRadioGroup";exports.RadioGroup=y;exports.RadioGroupPropsContext=N;
@@ -11,9 +11,9 @@ import e from "prop-types";
11
11
  import { RadioButton as A } from "./RadioButton.mjs";
12
12
  import { createPropsContext as J, validatePackage as Q, usePropsContext as W, useUnstyled as X, focusFirstFocusableChild as Y, dispatchEvent as P, useId as Z, classNames as R, uRadioGroup as E, useRtl as _ } from "@progress/kendo-react-common";
13
13
  import { packageMetadata as $ } from "../package-metadata.mjs";
14
- const ee = J(), G = t.forwardRef((n, I) => {
14
+ const ee = J(), G = t.forwardRef((r, I) => {
15
15
  Q($);
16
- const m = W(ee, n), {
16
+ const m = W(ee, r), {
17
17
  id: N,
18
18
  ariaLabelledBy: B,
19
19
  ariaDescribedBy: F,
@@ -23,11 +23,11 @@ const ee = J(), G = t.forwardRef((n, I) => {
23
23
  disabled: s,
24
24
  name: O,
25
25
  labelPlacement: j,
26
- layout: r,
27
- style: z,
26
+ layout: n,
27
+ style: q,
28
28
  value: p,
29
- valid: D,
30
- item: H = ae.item,
29
+ valid: z,
30
+ item: D = ae.item,
31
31
  onChange: c,
32
32
  onFocus: d
33
33
  } = m, f = X(), y = f && f.uRadioGroup, o = t.useRef(null), C = t.useCallback(
@@ -43,9 +43,9 @@ const ee = J(), G = t.forwardRef((n, I) => {
43
43
  [C]
44
44
  );
45
45
  t.useImperativeHandle(I, i);
46
- const [L, h] = t.useState(V), v = p !== void 0, u = v ? p : L, S = t.useCallback(
46
+ const [H, h] = t.useState(V), v = p !== void 0, u = v ? p : H, L = t.useCallback(
47
47
  (a) => {
48
- let l = a.value;
48
+ const l = a.value;
49
49
  !v && !s && h(l), c && !s && P(
50
50
  c,
51
51
  a.syntheticEvent,
@@ -54,7 +54,7 @@ const ee = J(), G = t.forwardRef((n, I) => {
54
54
  );
55
55
  },
56
56
  [h, c, s]
57
- ), T = t.useCallback(
57
+ ), S = t.useCallback(
58
58
  (a) => {
59
59
  d && !s && P(
60
60
  d,
@@ -64,28 +64,29 @@ const ee = J(), G = t.forwardRef((n, I) => {
64
64
  );
65
65
  },
66
66
  [d, s]
67
- ), w = Z(), K = R(
67
+ ), T = Z(), w = R(
68
68
  E.ul({
69
69
  c: y,
70
- horizontal: r === "horizontal",
71
- vertical: r === "vertical" || r === void 0
70
+ horizontal: n === "horizontal",
71
+ vertical: n === "vertical" || n === void 0
72
72
  }),
73
73
  x
74
- ), M = _(o, m.dir), U = b && b.map((a, l) => {
75
- const g = u === a.value, q = u == null, k = {
74
+ ), K = _(o, m.dir), M = b && b.map((a, l) => {
75
+ const g = u === a.value, U = u == null, k = {
76
76
  ...a,
77
- valid: D,
77
+ valid: z,
78
78
  checked: g,
79
79
  disabled: !!(a.disabled || s),
80
80
  labelPlacement: a.labelPlacement ? a.labelPlacement : j,
81
- tabIndex: a.tabIndex ? a.tabIndex : q && l === 0 || g ? 0 : -1,
81
+ tabIndex: a.tabIndex ? a.tabIndex : U && l === 0 || g ? 0 : -1,
82
82
  index: l,
83
- name: O || w,
84
- onChange: S,
85
- onFocus: T
83
+ name: O || T,
84
+ required: a.required,
85
+ onChange: L,
86
+ onFocus: S
86
87
  };
87
88
  return /* @__PURE__ */ t.createElement(
88
- H,
89
+ D,
89
90
  {
90
91
  className: R(
91
92
  E.item({
@@ -104,17 +105,17 @@ const ee = J(), G = t.forwardRef((n, I) => {
104
105
  {
105
106
  id: N,
106
107
  role: "radiogroup",
107
- className: K,
108
+ className: w,
108
109
  ref: o,
109
- dir: M,
110
- style: z,
110
+ dir: K,
111
+ style: q,
111
112
  "aria-labelledby": B,
112
113
  "aria-describedby": F
113
114
  },
114
- U
115
+ M
115
116
  );
116
117
  }), ae = {
117
- item: (n) => /* @__PURE__ */ t.createElement("li", { ...n })
118
+ item: (r) => /* @__PURE__ */ t.createElement("li", { ...r })
118
119
  };
119
120
  G.propTypes = {
120
121
  ariaLabelledBy: e.string,