@progress/kendo-react-inputs 8.3.0-develop.2 → 8.3.0-develop.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +8 -3
- package/index.d.ts +8 -3
- package/maskedtextbox/MaskedTextBox.js +1 -1
- package/maskedtextbox/MaskedTextBox.mjs +69 -69
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +80 -80
- package/radiobutton/RadioGroup.js +1 -1
- package/radiobutton/RadioGroup.mjs +76 -71
|
@@ -8,109 +8,109 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
10
|
import a from "prop-types";
|
|
11
|
-
import { createPropsContext as
|
|
12
|
-
import { packageMetadata as
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
ariaDescribedBy:
|
|
17
|
-
checked:
|
|
18
|
-
children:
|
|
19
|
-
className:
|
|
20
|
-
disabled:
|
|
21
|
-
id:
|
|
22
|
-
size:
|
|
23
|
-
label:
|
|
24
|
-
labelPlacement:
|
|
25
|
-
name:
|
|
26
|
-
style:
|
|
27
|
-
tabIndex:
|
|
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), {
|
|
16
|
+
ariaDescribedBy: F,
|
|
17
|
+
checked: p,
|
|
18
|
+
children: f,
|
|
19
|
+
className: I,
|
|
20
|
+
disabled: t,
|
|
21
|
+
id: g,
|
|
22
|
+
size: N = W.size,
|
|
23
|
+
label: o,
|
|
24
|
+
labelPlacement: z,
|
|
25
|
+
name: T,
|
|
26
|
+
style: w,
|
|
27
|
+
tabIndex: D,
|
|
28
28
|
value: c,
|
|
29
|
-
valid:
|
|
30
|
-
onChange:
|
|
31
|
-
onFocus:
|
|
32
|
-
onBlur:
|
|
33
|
-
...
|
|
34
|
-
} =
|
|
29
|
+
valid: H,
|
|
30
|
+
onChange: h,
|
|
31
|
+
onFocus: r,
|
|
32
|
+
onBlur: i,
|
|
33
|
+
...j
|
|
34
|
+
} = E, y = A(), u = y && y.uRadioButton, l = e.useRef(null), C = e.useCallback(
|
|
35
35
|
() => {
|
|
36
36
|
l.current && l.current.focus();
|
|
37
37
|
},
|
|
38
38
|
[]
|
|
39
|
-
),
|
|
39
|
+
), s = e.useCallback(
|
|
40
40
|
() => ({
|
|
41
41
|
element: l.current,
|
|
42
|
-
focus:
|
|
42
|
+
focus: C
|
|
43
43
|
}),
|
|
44
|
-
[
|
|
44
|
+
[C]
|
|
45
45
|
);
|
|
46
|
-
e.useImperativeHandle(
|
|
47
|
-
const
|
|
48
|
-
(
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
e.useImperativeHandle(x, s);
|
|
47
|
+
const v = G(), K = e.useCallback(
|
|
48
|
+
(n) => {
|
|
49
|
+
d(
|
|
50
|
+
h,
|
|
51
|
+
n,
|
|
52
|
+
s(),
|
|
53
53
|
{ value: c }
|
|
54
54
|
);
|
|
55
55
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
58
|
-
(
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
56
|
+
[h, c, t]
|
|
57
|
+
), L = e.useCallback(
|
|
58
|
+
(n) => {
|
|
59
|
+
r && !t && d(
|
|
60
|
+
r,
|
|
61
|
+
n,
|
|
62
|
+
s(),
|
|
63
63
|
void 0
|
|
64
64
|
);
|
|
65
65
|
},
|
|
66
|
-
[
|
|
67
|
-
),
|
|
68
|
-
(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
[r, t]
|
|
67
|
+
), M = e.useCallback(
|
|
68
|
+
(n) => {
|
|
69
|
+
i && !t && d(
|
|
70
|
+
i,
|
|
71
|
+
n,
|
|
72
|
+
s(),
|
|
73
73
|
void 0
|
|
74
74
|
);
|
|
75
75
|
},
|
|
76
|
-
[
|
|
77
|
-
),
|
|
76
|
+
[i, t]
|
|
77
|
+
), O = {
|
|
78
78
|
type: "radio",
|
|
79
|
-
id:
|
|
80
|
-
name:
|
|
81
|
-
className:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
79
|
+
id: g || v,
|
|
80
|
+
name: T,
|
|
81
|
+
className: m(
|
|
82
|
+
b.input({
|
|
83
|
+
c: u,
|
|
84
|
+
size: N,
|
|
85
|
+
invalid: H === !1,
|
|
86
|
+
checked: p
|
|
87
|
+
}),
|
|
88
|
+
I
|
|
89
89
|
),
|
|
90
90
|
ref: l,
|
|
91
|
-
disabled:
|
|
92
|
-
tabIndex:
|
|
93
|
-
checked:
|
|
94
|
-
style:
|
|
95
|
-
"aria-describedby":
|
|
91
|
+
disabled: t,
|
|
92
|
+
tabIndex: J(D, t),
|
|
93
|
+
checked: p,
|
|
94
|
+
style: w,
|
|
95
|
+
"aria-describedby": F,
|
|
96
96
|
value: c,
|
|
97
|
-
onChange:
|
|
98
|
-
onFocus:
|
|
99
|
-
onBlur:
|
|
100
|
-
...
|
|
101
|
-
},
|
|
97
|
+
onChange: K,
|
|
98
|
+
onFocus: L,
|
|
99
|
+
onBlur: M,
|
|
100
|
+
...j
|
|
101
|
+
}, B = /* @__PURE__ */ e.createElement(e.Fragment, null, o !== void 0 ? /* @__PURE__ */ e.createElement(
|
|
102
102
|
"label",
|
|
103
103
|
{
|
|
104
|
-
className:
|
|
105
|
-
htmlFor:
|
|
104
|
+
className: m(b.label({ c: u })),
|
|
105
|
+
htmlFor: g || v,
|
|
106
106
|
style: { userSelect: "none" },
|
|
107
|
-
"aria-label":
|
|
107
|
+
"aria-label": o
|
|
108
108
|
},
|
|
109
|
-
|
|
110
|
-
) : null),
|
|
111
|
-
return
|
|
109
|
+
o
|
|
110
|
+
) : null), k = /* @__PURE__ */ e.createElement("span", { className: m(b.wrap({ c: u })) }, /* @__PURE__ */ e.createElement("input", { ...O }));
|
|
111
|
+
return z === "before" ? /* @__PURE__ */ e.createElement(e.Fragment, null, B, k, f) : /* @__PURE__ */ e.createElement(e.Fragment, null, k, B, f);
|
|
112
112
|
});
|
|
113
|
-
|
|
113
|
+
P.propTypes = {
|
|
114
114
|
ariaDescribedBy: a.string,
|
|
115
115
|
checked: a.bool,
|
|
116
116
|
className: a.string,
|
|
@@ -128,11 +128,11 @@ C.propTypes = {
|
|
|
128
128
|
onFocus: a.func,
|
|
129
129
|
onBlur: a.func
|
|
130
130
|
};
|
|
131
|
-
const
|
|
131
|
+
const W = {
|
|
132
132
|
size: "medium"
|
|
133
133
|
};
|
|
134
|
-
|
|
134
|
+
P.displayName = "KendoRadioButton";
|
|
135
135
|
export {
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
P as RadioButton,
|
|
137
|
+
V as RadioButtonPropsContext
|
|
138
138
|
};
|
|
@@ -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
|
|
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,110 +8,115 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as t from "react";
|
|
10
10
|
import e from "prop-types";
|
|
11
|
-
import { RadioButton as
|
|
12
|
-
import { createPropsContext as
|
|
13
|
-
import { packageMetadata as
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const m =
|
|
17
|
-
id:
|
|
18
|
-
ariaLabelledBy:
|
|
19
|
-
ariaDescribedBy:
|
|
20
|
-
className:
|
|
11
|
+
import { RadioButton as A } from "./RadioButton.mjs";
|
|
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
|
+
import { packageMetadata as $ } from "../package-metadata.mjs";
|
|
14
|
+
const ee = J(), G = t.forwardRef((n, I) => {
|
|
15
|
+
Q($);
|
|
16
|
+
const m = W(ee, n), {
|
|
17
|
+
id: N,
|
|
18
|
+
ariaLabelledBy: B,
|
|
19
|
+
ariaDescribedBy: F,
|
|
20
|
+
className: x,
|
|
21
21
|
data: b,
|
|
22
|
-
defaultValue:
|
|
23
|
-
disabled:
|
|
24
|
-
name:
|
|
25
|
-
labelPlacement:
|
|
26
|
-
layout:
|
|
27
|
-
style:
|
|
22
|
+
defaultValue: V,
|
|
23
|
+
disabled: s,
|
|
24
|
+
name: O,
|
|
25
|
+
labelPlacement: j,
|
|
26
|
+
layout: r,
|
|
27
|
+
style: z,
|
|
28
28
|
value: p,
|
|
29
|
-
valid:
|
|
30
|
-
item:
|
|
29
|
+
valid: D,
|
|
30
|
+
item: H = ae.item,
|
|
31
31
|
onChange: c,
|
|
32
|
-
onFocus:
|
|
33
|
-
} = m, o = t.useRef(null),
|
|
32
|
+
onFocus: d
|
|
33
|
+
} = m, f = X(), y = f && f.uRadioGroup, o = t.useRef(null), C = t.useCallback(
|
|
34
34
|
() => {
|
|
35
|
-
o.current &&
|
|
35
|
+
o.current && Y(o.current);
|
|
36
36
|
},
|
|
37
37
|
[]
|
|
38
|
-
),
|
|
38
|
+
), i = t.useCallback(
|
|
39
39
|
() => ({
|
|
40
40
|
element: o.current,
|
|
41
|
-
focus:
|
|
41
|
+
focus: C
|
|
42
42
|
}),
|
|
43
|
-
[
|
|
43
|
+
[C]
|
|
44
44
|
);
|
|
45
|
-
t.useImperativeHandle(
|
|
46
|
-
const [
|
|
45
|
+
t.useImperativeHandle(I, i);
|
|
46
|
+
const [L, h] = t.useState(V), v = p !== void 0, u = v ? p : L, S = t.useCallback(
|
|
47
47
|
(a) => {
|
|
48
|
-
let
|
|
49
|
-
!
|
|
48
|
+
let l = a.value;
|
|
49
|
+
!v && !s && h(l), c && !s && P(
|
|
50
50
|
c,
|
|
51
51
|
a.syntheticEvent,
|
|
52
|
-
|
|
53
|
-
{ value:
|
|
52
|
+
i(),
|
|
53
|
+
{ value: l }
|
|
54
54
|
);
|
|
55
55
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
56
|
+
[h, c, s]
|
|
57
|
+
), T = t.useCallback(
|
|
58
58
|
(a) => {
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
d && !s && P(
|
|
60
|
+
d,
|
|
61
61
|
a.syntheticEvent,
|
|
62
|
-
|
|
62
|
+
i(),
|
|
63
63
|
void 0
|
|
64
64
|
);
|
|
65
65
|
},
|
|
66
|
-
[
|
|
67
|
-
),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
),
|
|
75
|
-
const
|
|
66
|
+
[d, s]
|
|
67
|
+
), w = Z(), K = R(
|
|
68
|
+
E.ul({
|
|
69
|
+
c: y,
|
|
70
|
+
horizontal: r === "horizontal",
|
|
71
|
+
vertical: r === "vertical" || r === void 0
|
|
72
|
+
}),
|
|
73
|
+
x
|
|
74
|
+
), M = _(o, m.dir), U = b && b.map((a, l) => {
|
|
75
|
+
const g = u === a.value, q = u == null, k = {
|
|
76
76
|
...a,
|
|
77
|
-
valid:
|
|
78
|
-
checked:
|
|
79
|
-
disabled: !!(a.disabled ||
|
|
80
|
-
labelPlacement: a.labelPlacement ? a.labelPlacement :
|
|
81
|
-
tabIndex: a.tabIndex ? a.tabIndex :
|
|
82
|
-
index:
|
|
83
|
-
name:
|
|
84
|
-
onChange:
|
|
85
|
-
onFocus:
|
|
77
|
+
valid: D,
|
|
78
|
+
checked: g,
|
|
79
|
+
disabled: !!(a.disabled || s),
|
|
80
|
+
labelPlacement: a.labelPlacement ? a.labelPlacement : j,
|
|
81
|
+
tabIndex: a.tabIndex ? a.tabIndex : q && l === 0 || g ? 0 : -1,
|
|
82
|
+
index: l,
|
|
83
|
+
name: O || w,
|
|
84
|
+
onChange: S,
|
|
85
|
+
onFocus: T
|
|
86
86
|
};
|
|
87
87
|
return /* @__PURE__ */ t.createElement(
|
|
88
|
-
|
|
88
|
+
H,
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
91
|
-
|
|
90
|
+
className: R(
|
|
91
|
+
E.item({
|
|
92
|
+
c: y,
|
|
93
|
+
disabled: k.disabled || s
|
|
94
|
+
})
|
|
95
|
+
),
|
|
96
|
+
key: l,
|
|
92
97
|
role: "none"
|
|
93
98
|
},
|
|
94
|
-
/* @__PURE__ */ t.createElement(
|
|
99
|
+
/* @__PURE__ */ t.createElement(A, { ...k })
|
|
95
100
|
);
|
|
96
101
|
});
|
|
97
102
|
return /* @__PURE__ */ t.createElement(
|
|
98
103
|
"ul",
|
|
99
104
|
{
|
|
100
|
-
id:
|
|
105
|
+
id: N,
|
|
101
106
|
role: "radiogroup",
|
|
102
|
-
className:
|
|
107
|
+
className: K,
|
|
103
108
|
ref: o,
|
|
104
|
-
dir:
|
|
105
|
-
style:
|
|
106
|
-
"aria-labelledby":
|
|
107
|
-
"aria-describedby":
|
|
109
|
+
dir: M,
|
|
110
|
+
style: z,
|
|
111
|
+
"aria-labelledby": B,
|
|
112
|
+
"aria-describedby": F
|
|
108
113
|
},
|
|
109
|
-
|
|
114
|
+
U
|
|
110
115
|
);
|
|
111
|
-
}),
|
|
112
|
-
item: (
|
|
116
|
+
}), ae = {
|
|
117
|
+
item: (n) => /* @__PURE__ */ t.createElement("li", { ...n })
|
|
113
118
|
};
|
|
114
|
-
|
|
119
|
+
G.propTypes = {
|
|
115
120
|
ariaLabelledBy: e.string,
|
|
116
121
|
ariaDescribedBy: e.string,
|
|
117
122
|
className: e.string,
|
|
@@ -127,8 +132,8 @@ P.propTypes = {
|
|
|
127
132
|
onChange: e.func,
|
|
128
133
|
onFocus: e.func
|
|
129
134
|
};
|
|
130
|
-
|
|
135
|
+
G.displayName = "KendoRadioGroup";
|
|
131
136
|
export {
|
|
132
|
-
|
|
133
|
-
|
|
137
|
+
G as RadioGroup,
|
|
138
|
+
ee as RadioGroupPropsContext
|
|
134
139
|
};
|