@progress/kendo-react-inputs 7.4.0-develop.9 → 7.5.0-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.
- package/colors/ColorInput.js +1 -1
- package/colors/ColorInput.mjs +40 -41
- package/colors/ColorPalette.js +1 -1
- package/colors/ColorPalette.mjs +1 -1
- package/colors/FlatColorPicker.js +1 -1
- package/colors/FlatColorPicker.mjs +71 -71
- package/colors/Picker.js +1 -1
- package/colors/Picker.mjs +15 -14
- package/dist/cdn/js/kendo-react-inputs.js +1 -1
- package/index.d.mts +32 -2
- package/index.d.ts +32 -2
- package/numerictextbox/utils/index.js +1 -1
- package/numerictextbox/utils/index.mjs +106 -106
- package/package-metadata.mjs +1 -1
- package/package.json +8 -8
- package/radiobutton/RadioButton.js +1 -1
- package/radiobutton/RadioButton.mjs +36 -35
- package/radiobutton/RadioGroup.js +1 -1
- package/radiobutton/RadioGroup.mjs +1 -1
- package/range-slider/RangeSlider.js +7 -7
- package/range-slider/RangeSlider.mjs +62 -60
- package/signature/Signature.js +1 -1
- package/signature/Signature.mjs +80 -79
- package/slider/Slider.js +1 -1
- package/slider/Slider.mjs +27 -25
- package/slider/SliderLabel.js +1 -1
- package/slider/SliderLabel.mjs +13 -18
- package/switch/Switch.js +1 -1
- package/switch/Switch.mjs +37 -38
- package/textarea/TextArea.js +1 -1
- package/textarea/TextArea.mjs +78 -76
|
@@ -8,30 +8,30 @@
|
|
|
8
8
|
"use client";
|
|
9
9
|
import * as e from "react";
|
|
10
10
|
import a from "prop-types";
|
|
11
|
-
import { createPropsContext as
|
|
11
|
+
import { createPropsContext as j, validatePackage as K, usePropsContext as L, useId as O, dispatchEvent as u, classNames as S, kendoThemeMaps as $, getTabIndex as q } from "@progress/kendo-react-common";
|
|
12
12
|
import { packageMetadata as A } from "../package-metadata.mjs";
|
|
13
|
-
const G =
|
|
13
|
+
const G = j(), m = e.forwardRef((y, B) => {
|
|
14
14
|
K(A);
|
|
15
|
-
const
|
|
16
|
-
ariaDescribedBy:
|
|
17
|
-
checked:
|
|
15
|
+
const P = L(G, y), {
|
|
16
|
+
ariaDescribedBy: x,
|
|
17
|
+
checked: p,
|
|
18
18
|
children: b,
|
|
19
|
-
className:
|
|
19
|
+
className: E,
|
|
20
20
|
disabled: n,
|
|
21
|
-
id:
|
|
21
|
+
id: f,
|
|
22
22
|
size: s,
|
|
23
23
|
label: r,
|
|
24
|
-
labelPlacement:
|
|
25
|
-
name:
|
|
26
|
-
style:
|
|
27
|
-
tabIndex:
|
|
24
|
+
labelPlacement: F,
|
|
25
|
+
name: I,
|
|
26
|
+
style: N,
|
|
27
|
+
tabIndex: R,
|
|
28
28
|
value: c,
|
|
29
29
|
valid: z,
|
|
30
|
-
onChange:
|
|
30
|
+
onChange: g,
|
|
31
31
|
onFocus: i,
|
|
32
32
|
onBlur: d,
|
|
33
33
|
...T
|
|
34
|
-
} =
|
|
34
|
+
} = P, l = e.useRef(null), k = e.useCallback(
|
|
35
35
|
() => {
|
|
36
36
|
l.current && l.current.focus();
|
|
37
37
|
},
|
|
@@ -39,22 +39,22 @@ const G = w(), m = e.forwardRef((C, y) => {
|
|
|
39
39
|
), o = e.useCallback(
|
|
40
40
|
() => ({
|
|
41
41
|
element: l.current,
|
|
42
|
-
focus:
|
|
42
|
+
focus: k
|
|
43
43
|
}),
|
|
44
|
-
[
|
|
44
|
+
[k]
|
|
45
45
|
);
|
|
46
|
-
e.useImperativeHandle(
|
|
46
|
+
e.useImperativeHandle(B, o);
|
|
47
47
|
const h = O(), M = e.useCallback(
|
|
48
48
|
(t) => {
|
|
49
49
|
u(
|
|
50
|
-
|
|
50
|
+
g,
|
|
51
51
|
t,
|
|
52
52
|
o(),
|
|
53
53
|
{ value: c }
|
|
54
54
|
);
|
|
55
55
|
},
|
|
56
|
-
[
|
|
57
|
-
),
|
|
56
|
+
[g, c, n]
|
|
57
|
+
), w = e.useCallback(
|
|
58
58
|
(t) => {
|
|
59
59
|
i && !n && u(
|
|
60
60
|
i,
|
|
@@ -64,7 +64,7 @@ const G = w(), m = e.forwardRef((C, y) => {
|
|
|
64
64
|
);
|
|
65
65
|
},
|
|
66
66
|
[i, n]
|
|
67
|
-
),
|
|
67
|
+
), D = e.useCallback(
|
|
68
68
|
(t) => {
|
|
69
69
|
d && !n && u(
|
|
70
70
|
d,
|
|
@@ -74,40 +74,41 @@ const G = w(), m = e.forwardRef((C, y) => {
|
|
|
74
74
|
);
|
|
75
75
|
},
|
|
76
76
|
[d, n]
|
|
77
|
-
),
|
|
77
|
+
), H = {
|
|
78
78
|
type: "radio",
|
|
79
|
-
id:
|
|
80
|
-
name:
|
|
79
|
+
id: f || h,
|
|
80
|
+
name: I,
|
|
81
81
|
className: S(
|
|
82
82
|
"k-radio",
|
|
83
83
|
{
|
|
84
84
|
[`k-radio-${$.sizeMap[s] || s}`]: s,
|
|
85
|
-
"k-invalid": z === !1
|
|
85
|
+
"k-invalid": z === !1,
|
|
86
|
+
"k-checked": p
|
|
86
87
|
},
|
|
87
|
-
|
|
88
|
+
E
|
|
88
89
|
),
|
|
89
90
|
ref: l,
|
|
90
91
|
disabled: n,
|
|
91
|
-
tabIndex: q(
|
|
92
|
-
checked:
|
|
93
|
-
style:
|
|
94
|
-
"aria-describedby":
|
|
92
|
+
tabIndex: q(R, n),
|
|
93
|
+
checked: p,
|
|
94
|
+
style: N,
|
|
95
|
+
"aria-describedby": x,
|
|
95
96
|
value: c,
|
|
96
97
|
onChange: M,
|
|
97
|
-
onFocus:
|
|
98
|
-
onBlur:
|
|
98
|
+
onFocus: w,
|
|
99
|
+
onBlur: D,
|
|
99
100
|
...T
|
|
100
|
-
},
|
|
101
|
+
}, v = /* @__PURE__ */ e.createElement(e.Fragment, null, r !== void 0 ? /* @__PURE__ */ e.createElement(
|
|
101
102
|
"label",
|
|
102
103
|
{
|
|
103
104
|
className: "k-radio-label",
|
|
104
|
-
htmlFor:
|
|
105
|
+
htmlFor: f || h,
|
|
105
106
|
style: { userSelect: "none" },
|
|
106
107
|
"aria-label": r
|
|
107
108
|
},
|
|
108
109
|
r
|
|
109
|
-
) : null),
|
|
110
|
-
return
|
|
110
|
+
) : null), C = /* @__PURE__ */ e.createElement("span", { className: "k-radio-wrap" }, /* @__PURE__ */ e.createElement("input", { ...H }));
|
|
111
|
+
return F === "before" ? /* @__PURE__ */ e.createElement(e.Fragment, null, v, C, b) : /* @__PURE__ */ e.createElement(e.Fragment, null, C, v, b);
|
|
111
112
|
});
|
|
112
113
|
m.propTypes = {
|
|
113
114
|
ariaDescribedBy: a.string,
|
|
@@ -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 L=require("react"),e=require("prop-types"),K=require("./RadioButton.js"),s=require("@progress/kendo-react-common"),A=require("../package-metadata.js");function J(l){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const n in l)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(l,n);Object.defineProperty(c,n,d.get?d:{enumerable:!0,get:()=>l[n]})}}return c.default=l,Object.freeze(c)}const t=J(L),E=s.createPropsContext(),u=t.forwardRef((l,c)=>{s.validatePackage(A.packageMetadata);const n=s.usePropsContext(E,l),{id:d,ariaLabelledBy:O,ariaDescribedBy:j,className:B,data:g,defaultValue:G,disabled:o,name:I,labelPlacement:F,layout:b,style:S,value:k,valid:q,item:x=N.item,onChange:m,onFocus:p}=n,i=t.useRef(null),C=t.useCallback(()=>{i.current&&s.focusFirstFocusableChild(i.current)},[]),f=t.useCallback(()=>({element:i.current,focus:C}),[C]);t.useImperativeHandle(c,f);const[D,v]=t.useState(G),h=k!==void 0,y=h?k:D,M=t.useCallback(a=>{let r=a.value;!h&&!o&&v(r),m&&!o&&s.dispatchEvent(m,a.syntheticEvent,f(),{value:r})},[v,m,o]),T=t.useCallback(a=>{p&&!o&&s.dispatchEvent(p,a.syntheticEvent,f(),void 0)},[p,o]),V=s.useId(),z=s.classNames("k-radio-list",{"k-list-horizontal":b==="horizontal","k-list-vertical":b==="vertical"||b===void 0},B),_=s.useRtl(i,n.dir),w=g&&g.map((a,r)=>{const P=y===a.value,H=y==null,R={...a,valid:q,checked:P,disabled:!!(a.disabled||o),labelPlacement:a.labelPlacement?a.labelPlacement:F,tabIndex:a.tabIndex?a.tabIndex:H&&r===0||P?0:-1,index:r,name:I||V,onChange:M,onFocus:T};return t.createElement(x,{className:s.classNames("k-radio-item",{"k-disabled":R.disabled||o}),key:r,role:"none"},t.createElement(K.RadioButton,{...R}))});return t.createElement("ul",{id:d,role:"radiogroup",className:z,ref:i,dir:_,style:S,"aria-labelledby":O,"aria-describedby":j},w)}),N={item:l=>t.createElement("li",{...l})};u.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};u.defaultProps=N;u.displayName="KendoRadioGroup";exports.RadioGroup=u;exports.RadioGroupPropsContext=E;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react"),e=require("prop-types"),K=require("./RadioButton.js"),s=require("@progress/kendo-react-common"),A=require("../package-metadata.js");function J(l){const c=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(l){for(const n in l)if(n!=="default"){const d=Object.getOwnPropertyDescriptor(l,n);Object.defineProperty(c,n,d.get?d:{enumerable:!0,get:()=>l[n]})}}return c.default=l,Object.freeze(c)}const t=J(L),E=s.createPropsContext(),u=t.forwardRef((l,c)=>{s.validatePackage(A.packageMetadata);const n=s.usePropsContext(E,l),{id:d,ariaLabelledBy:O,ariaDescribedBy:j,className:B,data:g,defaultValue:G,disabled:o,name:I,labelPlacement:F,layout:b,style:S,value:k,valid:q,item:x=N.item,onChange:m,onFocus:p}=n,i=t.useRef(null),C=t.useCallback(()=>{i.current&&s.focusFirstFocusableChild(i.current)},[]),f=t.useCallback(()=>({element:i.current,focus:C}),[C]);t.useImperativeHandle(c,f);const[D,v]=t.useState(G),h=k!==void 0,y=h?k:D,M=t.useCallback(a=>{let r=a.value;!h&&!o&&v(r),m&&!o&&s.dispatchEvent(m,a.syntheticEvent,f(),{value:r})},[v,m,o]),T=t.useCallback(a=>{p&&!o&&s.dispatchEvent(p,a.syntheticEvent,f(),void 0)},[p,o]),V=s.useId(),z=s.classNames("k-radio-list",{"k-list-horizontal":b==="horizontal","k-list-vertical":b==="vertical"||b===void 0},B),_=s.useRtl(i,n.dir),w=g&&g.map((a,r)=>{const P=y===a.value,H=y==null,R={...a,valid:q,checked:P,disabled:!!(a.disabled||o),labelPlacement:a.labelPlacement?a.labelPlacement:F,tabIndex:a.tabIndex?a.tabIndex:H&&r===0||P?0:-1,index:r,name:I||V,onChange:M,onFocus:T};return t.createElement(x,{className:s.classNames("k-radio-list-item",{"k-disabled":R.disabled||o}),key:r,role:"none"},t.createElement(K.RadioButton,{...R}))});return t.createElement("ul",{id:d,role:"radiogroup",className:z,ref:i,dir:_,style:S,"aria-labelledby":O,"aria-describedby":j},w)}),N={item:l=>t.createElement("li",{...l})};u.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};u.defaultProps=N;u.displayName="KendoRadioGroup";exports.RadioGroup=u;exports.RadioGroupPropsContext=E;
|
|
@@ -87,7 +87,7 @@ const Z = A(), m = t.forwardRef((r, E) => {
|
|
|
87
87
|
return /* @__PURE__ */ t.createElement(
|
|
88
88
|
z,
|
|
89
89
|
{
|
|
90
|
-
className: P("k-radio-item", { "k-disabled": v.disabled || l }),
|
|
90
|
+
className: P("k-radio-list-item", { "k-disabled": v.disabled || l }),
|
|
91
91
|
key: s,
|
|
92
92
|
role: "none"
|
|
93
93
|
},
|
|
@@ -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 X=require("react"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const X=require("react"),T=require("prop-types"),i=require("@progress/kendo-react-common"),R=require("../messages/index.js"),W=require("@progress/kendo-react-intl"),l=require("./range-raducer.js"),Y=require("../package-metadata.js");function F(r){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const s=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(n,e,s.get?s:{enumerable:!0,get:()=>r[e]})}}return n.default=r,Object.freeze(n)}const a=F(X),J=(r,n,e)=>{const[s,c]=a.useState(r),m=a.useCallback(f=>{const A=l.rangeReducer(n.state||s,{...f,...n});e&&e(A,f.event),c(A)},[n,e]);return[s,m]},_=i.createPropsContext(),I=a.forwardRef((r,n)=>{i.validatePackage(Y.packageMetadata);const e=i.usePropsContext(_,r),s=a.useRef(null),c=a.useRef(null),m=a.useRef(null),f=a.useRef(null),A=a.useRef(null),G=a.useCallback(()=>{f.current&&f.current.focus()},[f]);a.useImperativeHandle(s,()=>({element:c.current,focus:G,props:e})),a.useImperativeHandle(n,()=>s.current);const p=a.useMemo(()=>e.min,[e.min]),g=a.useMemo(()=>e.max,[e.max]),$=a.useMemo(()=>e.step!==void 0?e.step:C.step,[e.step,C.step]),y=i.useDir(c,e.dir),S=(t,u)=>{e.onChange&&s.current&&e.onChange.call(void 0,{value:t,target:s.current,syntheticEvent:u})},[D,O]=a.useState(""),[b,d]=J(e.defaultValue||C.defaultValue,{min:p,max:g,step:$,state:e.value},S),o=a.useMemo(()=>e.value||b,[e.value,b]),K=a.useRef(null),N=a.useRef(null),k=a.useMemo(()=>(o.start-p)/(g-p)*100,[o.start,p,g]),h=a.useMemo(()=>(o.end-p)/(g-p)*100,[o.end,p,g]),M=a.useMemo(()=>e.vertical?{paddingTop:0,height:"100%"}:{},[e.vertical]),P=a.useMemo(()=>e.vertical?{marginTop:"0.5rem",marginBottom:"0.5rem"}:{marginLeft:"0.5rem",marginRight:"0.5rem"},[e.vertical]),w=W.useLocalization(),x=a.useCallback(t=>{if(!N.current)return;const u=N.current.getBoundingClientRect(),v=e.vertical?u.bottom-t.clientY:y==="rtl"?u.right-t.clientX:t.clientX-u.left,E=e.vertical?u.height:u.width,B=v/E;return p+B*(g-p)},[N,e.vertical,y,p,g,b.start,b.end,e.value&&e.value.start,e.value&&e.value.end]),z=a.useCallback(t=>t<=o.start?"start":t>=o.end?"end":2*t<o.end+o.start?"start":"end",[b.start,b.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:y==="rtl"?l.RANGE_ACTION.decrease:l.RANGE_ACTION.increase,key:"start",event:t});break;case i.Keys.up:t.preventDefault(),d({type:l.RANGE_ACTION.increase,key:"start",event:t});break;case i.Keys.left:t.preventDefault(),d({type:y==="rtl"?l.RANGE_ACTION.increase:l.RANGE_ACTION.decrease,key:"start",event:t});break;case i.Keys.down:t.preventDefault(),d({type:l.RANGE_ACTION.decrease,key:"start",event:t});break;case i.Keys.home:t.preventDefault(),d({type:l.RANGE_ACTION.min,key:"start",event:t});break;case i.Keys.end:t.preventDefault(),d({type:l.RANGE_ACTION.max,key:"start",event:t});break}},[d]),V=a.useCallback(t=>{switch(t.keyCode){case i.Keys.right:t.preventDefault(),d({type:y==="rtl"?l.RANGE_ACTION.decrease:l.RANGE_ACTION.increase,key:"end",event:t});break;case i.Keys.up:t.preventDefault(),d({type:l.RANGE_ACTION.increase,key:"end",event:t});break;case i.Keys.left:t.preventDefault(),d({type:y==="rtl"?l.RANGE_ACTION.increase:l.RANGE_ACTION.decrease,key:"end",event:t});break;case i.Keys.down:t.preventDefault(),d({type:l.RANGE_ACTION.decrease,key:"end",event:t});break;case i.Keys.home:t.preventDefault(),d({type:l.RANGE_ACTION.min,key:"end",event:t});break;case i.Keys.end:t.preventDefault(),d({type:l.RANGE_ACTION.max,key:"end",event:t});break}},[d,y]),j=a.useCallback(t=>{const u=x(t),v=z(u);O(v),v==="end"?A.current.focus():f.current.focus();const E=v==="end"?l.RANGE_ACTION.end:l.RANGE_ACTION.start;d({type:E,payload:u,event:t})},[e.vertical,p,g,d]),H=t=>{const u=x(t),v=D==="end"?l.RANGE_ACTION.end:l.RANGE_ACTION.start;d({type:v,payload:u,event:t})},L=t=>{const u=x(t),v=D==="end"?l.RANGE_ACTION.end:l.RANGE_ACTION.start;d({type:v,payload:u,event:t}),O("")};return i.useDraggable(N,{onPress:j,onDrag:H,onRelease:L}),a.createElement("div",{id:e.id,style:e.style,ref:c,dir:y,className:i.classNames("k-slider",{"k-rtl":y==="rtl","k-disabled":e.disabled,"k-slider-vertical":e.vertical,"k-slider-horizontal":!e.vertical},e.className)},a.createElement("div",{ref:N,className:"k-slider-track-wrap",style:{flexGrow:1,position:"relative",touchAction:"none",...P}},e.children&&a.createElement("ul",{className:"k-reset k-slider-items",style:{...M}},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:K,className:"k-slider-track",style:e.vertical?{bottom:0,height:"100%"}:{[y==="rtl"?"right":"left"]:0,width:"100%"}},k!==null&&h!==null&&a.createElement("div",{"data-selection":!0,ref:m,title:`${o.start} - ${o.end}`,className:"k-slider-selection",style:e.vertical?{height:h-k+"%",bottom:k+"%"}:{[y==="rtl"?"right":"left"]:k+"%",width:h-k+"%"}}),a.createElement("span",{ref:f,role:"slider",tabIndex:i.getTabIndex(e.startTabIndex,e.disabled,void 0),"aria-valuemin":p,"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:w.toLanguageString(R.sliderDragTitle,R.messages[R.sliderDragTitle]),style:e.vertical?{bottom:"calc("+k+"%)",zIndex:1}:y==="rtl"?{right:"calc("+k+"% - 13px)",zIndex:1}:{left:"calc("+k+"%)",zIndex:1},onKeyDown:q}),a.createElement("span",{ref:A,role:"slider",tabIndex:i.getTabIndex(e.endTabIndex,e.disabled,void 0),"aria-valuemin":Math.min(p,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:w.toLanguageString(R.sliderDragTitle,R.messages[R.sliderDragTitle]),style:e.vertical?{bottom:"calc("+h+"%)",zIndex:1}:y==="rtl"?{right:"calc("+h+"% - 13px)",zIndex:1}:{left:"calc("+h+"%)",zIndex:1},onKeyDown:V}))))}),Q={value:(r,n,e)=>{if(r.value){const s=r.value.start,c=r.value.end,m=r.min,f=r.max;if(s>c||s>f||s<m||c>f||c<m||c<s)return new Error(`Invalid prop + ${n} supplied to ${e}.
|
|
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,e)=>{if(r.defaultValue){const s=r.defaultValue.start,c=r.defaultValue.end,
|
|
10
|
+
`)}return null},defaultValue:(r,n,e)=>{if(r.defaultValue){const s=r.defaultValue.start,c=r.defaultValue.end,m=r.min,f=r.max;if(s>c||s>f||s<m||c>f||c<m||c<s)return new Error(`Invalid prop + ${n} supplied to ${e}.
|
|
11
11
|
The { start, end } value must be between the min & max value and { start, end } must be start < end.
|
|
12
|
-
`)}return null},onChange:
|
|
12
|
+
`)}return null},onChange:T.func,step:T.number,min:(r,n,e)=>{const s=r[n],c=r.min,m=r.max;return c===void 0?new Error(`Invalid prop + ${n} supplied to ${e}.
|
|
13
13
|
${n} value can not be undefined.
|
|
14
|
-
`):s&&c>=
|
|
14
|
+
`):s&&c>=m?new Error(`Invalid prop + ${n} supplied to ${e}.
|
|
15
15
|
${n} value can not be equal to or bigger than the max value.
|
|
16
|
-
`):null},max:(r,n,e)=>{const s=r[n],c=r.min,
|
|
16
|
+
`):null},max:(r,n,e)=>{const s=r[n],c=r.min,m=r.max;return m===void 0?new Error(`Invalid prop + ${n} supplied to ${e}.
|
|
17
17
|
${n} value can not be undefined.
|
|
18
|
-
`):s&&
|
|
18
|
+
`):s&&m<=c?new Error(`Invalid prop + ${n} supplied to ${e}.
|
|
19
19
|
${n} value can not be equal to or smaller than the min value.
|
|
20
|
-
`):null},vertical:
|
|
20
|
+
`):null},vertical:T.bool,disabled:T.bool,dir:T.oneOf(["ltr","rtl"])},C={step:1,defaultValue:{start:0,end:0},vertical:!1,disabled:!1};I.displayName="KendoReactRangeSlider";I.propTypes=Q;I.defaultProps=C;exports.RangeSlider=I;exports.RangeSliderPropsContext=_;
|
|
@@ -14,21 +14,21 @@ import { useLocalization as Q } from "@progress/kendo-react-intl";
|
|
|
14
14
|
import { RANGE_ACTION as n, rangeReducer as U } from "./range-raducer.mjs";
|
|
15
15
|
import { packageMetadata as Z } from "../package-metadata.mjs";
|
|
16
16
|
const ee = (r, l, e) => {
|
|
17
|
-
const [s, i] = a.useState(r),
|
|
18
|
-
(
|
|
19
|
-
const x = U(l.state || s, { ...
|
|
20
|
-
e && e(x,
|
|
17
|
+
const [s, i] = a.useState(r), u = a.useCallback(
|
|
18
|
+
(m) => {
|
|
19
|
+
const x = U(l.state || s, { ...m, ...l });
|
|
20
|
+
e && e(x, m.event), i(x);
|
|
21
21
|
},
|
|
22
22
|
[l, e]
|
|
23
23
|
);
|
|
24
|
-
return [s,
|
|
24
|
+
return [s, u];
|
|
25
25
|
}, te = W(), T = a.forwardRef((r, l) => {
|
|
26
26
|
Y(Z);
|
|
27
|
-
const e = _(te, r), s = a.useRef(null), i = a.useRef(null),
|
|
27
|
+
const e = _(te, r), s = a.useRef(null), i = a.useRef(null), u = a.useRef(null), m = a.useRef(null), x = a.useRef(null), V = a.useCallback(
|
|
28
28
|
() => {
|
|
29
|
-
|
|
29
|
+
m.current && m.current.focus();
|
|
30
30
|
},
|
|
31
|
-
[
|
|
31
|
+
[m]
|
|
32
32
|
);
|
|
33
33
|
a.useImperativeHandle(s, () => ({
|
|
34
34
|
element: i.current,
|
|
@@ -44,13 +44,13 @@ const ee = (r, l, e) => {
|
|
|
44
44
|
), K = a.useMemo(
|
|
45
45
|
() => e.step !== void 0 ? e.step : $.step,
|
|
46
46
|
[e.step, $.step]
|
|
47
|
-
), p = j(i, e.dir), A = (t,
|
|
47
|
+
), p = j(i, e.dir), A = (t, o) => {
|
|
48
48
|
e.onChange && s.current && e.onChange.call(void 0, {
|
|
49
49
|
value: t,
|
|
50
50
|
target: s.current,
|
|
51
|
-
syntheticEvent:
|
|
51
|
+
syntheticEvent: o
|
|
52
52
|
});
|
|
53
|
-
}, [E, S] = a.useState(""), [
|
|
53
|
+
}, [E, S] = a.useState(""), [g, c] = ee(
|
|
54
54
|
e.defaultValue || $.defaultValue,
|
|
55
55
|
{
|
|
56
56
|
min: f,
|
|
@@ -59,26 +59,26 @@ const ee = (r, l, e) => {
|
|
|
59
59
|
state: e.value
|
|
60
60
|
},
|
|
61
61
|
A
|
|
62
|
-
),
|
|
63
|
-
() => e.value ||
|
|
64
|
-
[e.value,
|
|
62
|
+
), d = a.useMemo(
|
|
63
|
+
() => e.value || g,
|
|
64
|
+
[e.value, g]
|
|
65
65
|
), H = a.useRef(null), w = a.useRef(null), y = a.useMemo(
|
|
66
|
-
() => (
|
|
67
|
-
[
|
|
68
|
-
),
|
|
69
|
-
() => (
|
|
70
|
-
[
|
|
66
|
+
() => (d.start - f) / (k - f) * 100,
|
|
67
|
+
[d.start, f, k]
|
|
68
|
+
), b = a.useMemo(
|
|
69
|
+
() => (d.end - f) / (k - f) * 100,
|
|
70
|
+
[d.end, f, k]
|
|
71
71
|
), L = a.useMemo(
|
|
72
72
|
() => e.vertical ? { paddingTop: 0, height: "100%" } : {},
|
|
73
73
|
[e.vertical]
|
|
74
74
|
), N = a.useMemo(
|
|
75
75
|
() => e.vertical ? { marginTop: "0.5rem", marginBottom: "0.5rem" } : { marginLeft: "0.5rem", marginRight: "0.5rem" },
|
|
76
76
|
[e.vertical]
|
|
77
|
-
), M = Q(),
|
|
77
|
+
), M = Q(), C = a.useCallback(
|
|
78
78
|
(t) => {
|
|
79
79
|
if (!w.current)
|
|
80
80
|
return;
|
|
81
|
-
const
|
|
81
|
+
const o = w.current.getBoundingClientRect(), h = e.vertical ? o.bottom - t.clientY : p === "rtl" ? o.right - t.clientX : t.clientX - o.left, I = e.vertical ? o.height : o.width, X = h / I;
|
|
82
82
|
return f + X * (k - f);
|
|
83
83
|
},
|
|
84
84
|
[
|
|
@@ -87,16 +87,16 @@ const ee = (r, l, e) => {
|
|
|
87
87
|
p,
|
|
88
88
|
f,
|
|
89
89
|
k,
|
|
90
|
-
|
|
91
|
-
|
|
90
|
+
g.start,
|
|
91
|
+
g.end,
|
|
92
92
|
e.value && e.value.start,
|
|
93
93
|
e.value && e.value.end
|
|
94
94
|
]
|
|
95
95
|
), q = a.useCallback(
|
|
96
|
-
(t) => t <=
|
|
96
|
+
(t) => t <= d.start ? "start" : t >= d.end ? "end" : 2 * t < d.end + d.start ? "start" : "end",
|
|
97
97
|
[
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
g.start,
|
|
99
|
+
g.end,
|
|
100
100
|
e.value && e.value.start,
|
|
101
101
|
e.value && e.value.end
|
|
102
102
|
]
|
|
@@ -150,19 +150,19 @@ const ee = (r, l, e) => {
|
|
|
150
150
|
[c, p]
|
|
151
151
|
), O = a.useCallback(
|
|
152
152
|
(t) => {
|
|
153
|
-
const
|
|
154
|
-
S(h), h === "end" ? x.current.focus() :
|
|
155
|
-
const
|
|
156
|
-
c({ type:
|
|
153
|
+
const o = C(t), h = q(o);
|
|
154
|
+
S(h), h === "end" ? x.current.focus() : m.current.focus();
|
|
155
|
+
const I = h === "end" ? n.end : n.start;
|
|
156
|
+
c({ type: I, payload: o, event: t });
|
|
157
157
|
},
|
|
158
158
|
[e.vertical, f, k, c]
|
|
159
159
|
);
|
|
160
160
|
return F(w, { onPress: O, onDrag: (t) => {
|
|
161
|
-
const
|
|
162
|
-
c({ type: h, payload:
|
|
161
|
+
const o = C(t), h = E === "end" ? n.end : n.start;
|
|
162
|
+
c({ type: h, payload: o, event: t });
|
|
163
163
|
}, onRelease: (t) => {
|
|
164
|
-
const
|
|
165
|
-
c({ type: h, payload:
|
|
164
|
+
const o = C(t), h = E === "end" ? n.end : n.start;
|
|
165
|
+
c({ type: h, payload: o, event: t }), S("");
|
|
166
166
|
} }), /* @__PURE__ */ a.createElement(
|
|
167
167
|
"div",
|
|
168
168
|
{
|
|
@@ -199,11 +199,13 @@ const ee = (r, l, e) => {
|
|
|
199
199
|
className: "k-reset k-slider-items",
|
|
200
200
|
style: { ...L }
|
|
201
201
|
},
|
|
202
|
-
a.Children.map(e.children, (t) => t && a.cloneElement(
|
|
202
|
+
a.Children.map(e.children, (t, o) => t && a.cloneElement(
|
|
203
203
|
t,
|
|
204
204
|
{
|
|
205
205
|
position: 100 * (t.props.position - e.min) / (e.max - e.min),
|
|
206
|
-
vertical: e.vertical
|
|
206
|
+
vertical: e.vertical,
|
|
207
|
+
firstTick: o === 0,
|
|
208
|
+
lastTick: o === a.Children.count(e.children) - 1
|
|
207
209
|
},
|
|
208
210
|
t.props.children
|
|
209
211
|
))
|
|
@@ -215,31 +217,31 @@ const ee = (r, l, e) => {
|
|
|
215
217
|
className: "k-slider-track",
|
|
216
218
|
style: e.vertical ? { bottom: 0, height: "100%" } : { [p === "rtl" ? "right" : "left"]: 0, width: "100%" }
|
|
217
219
|
},
|
|
218
|
-
y !== null &&
|
|
220
|
+
y !== null && b !== null && /* @__PURE__ */ a.createElement(
|
|
219
221
|
"div",
|
|
220
222
|
{
|
|
221
223
|
"data-selection": !0,
|
|
222
|
-
ref:
|
|
223
|
-
title: `${
|
|
224
|
+
ref: u,
|
|
225
|
+
title: `${d.start} - ${d.end}`,
|
|
224
226
|
className: "k-slider-selection",
|
|
225
|
-
style: e.vertical ? { height:
|
|
227
|
+
style: e.vertical ? { height: b - y + "%", bottom: y + "%" } : {
|
|
226
228
|
[p === "rtl" ? "right" : "left"]: y + "%",
|
|
227
|
-
width:
|
|
229
|
+
width: b - y + "%"
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
232
|
),
|
|
231
233
|
/* @__PURE__ */ a.createElement(
|
|
232
234
|
"span",
|
|
233
235
|
{
|
|
234
|
-
ref:
|
|
236
|
+
ref: m,
|
|
235
237
|
role: "slider",
|
|
236
238
|
tabIndex: z(e.startTabIndex, e.disabled, void 0),
|
|
237
239
|
"aria-valuemin": f,
|
|
238
|
-
"aria-valuemax": Math.max(k,
|
|
239
|
-
"aria-valuenow":
|
|
240
|
+
"aria-valuemax": Math.max(k, d.end),
|
|
241
|
+
"aria-valuenow": d.start,
|
|
240
242
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
241
|
-
"aria-valuetext": `${
|
|
242
|
-
className: "k-draghandle",
|
|
243
|
+
"aria-valuetext": `${d.start} - ${d.end}`,
|
|
244
|
+
className: "k-draghandle k-draghandle-start",
|
|
243
245
|
title: M.toLanguageString(R, P[R]),
|
|
244
246
|
style: e.vertical ? { bottom: "calc(" + y + "%)", zIndex: 1 } : p === "rtl" ? { right: "calc(" + y + "% - 13px)", zIndex: 1 } : { left: "calc(" + y + "%)", zIndex: 1 },
|
|
245
247
|
onKeyDown: B
|
|
@@ -251,14 +253,14 @@ const ee = (r, l, e) => {
|
|
|
251
253
|
ref: x,
|
|
252
254
|
role: "slider",
|
|
253
255
|
tabIndex: z(e.endTabIndex, e.disabled, void 0),
|
|
254
|
-
"aria-valuemin": Math.min(f,
|
|
256
|
+
"aria-valuemin": Math.min(f, d.start),
|
|
255
257
|
"aria-valuemax": k,
|
|
256
|
-
"aria-valuenow":
|
|
258
|
+
"aria-valuenow": d.end,
|
|
257
259
|
"aria-disabled": e.disabled ? "true" : void 0,
|
|
258
|
-
"aria-valuetext": `${
|
|
259
|
-
className: "k-draghandle",
|
|
260
|
+
"aria-valuetext": `${d.start} - ${d.end}`,
|
|
261
|
+
className: "k-draghandle k-draghandle-end",
|
|
260
262
|
title: M.toLanguageString(R, P[R]),
|
|
261
|
-
style: e.vertical ? { bottom: "calc(" +
|
|
263
|
+
style: e.vertical ? { bottom: "calc(" + b + "%)", zIndex: 1 } : p === "rtl" ? { right: "calc(" + b + "% - 13px)", zIndex: 1 } : { left: "calc(" + b + "%)", zIndex: 1 },
|
|
262
264
|
onKeyDown: G
|
|
263
265
|
}
|
|
264
266
|
)
|
|
@@ -268,8 +270,8 @@ const ee = (r, l, e) => {
|
|
|
268
270
|
}), ae = {
|
|
269
271
|
value: (r, l, e) => {
|
|
270
272
|
if (r.value) {
|
|
271
|
-
const s = r.value.start, i = r.value.end,
|
|
272
|
-
if (s > i || s >
|
|
273
|
+
const s = r.value.start, i = r.value.end, u = r.min, m = r.max;
|
|
274
|
+
if (s > i || s > m || s < u || i > m || i < u || i < s)
|
|
273
275
|
return new Error(
|
|
274
276
|
`Invalid prop + ${l} supplied to ${e}.
|
|
275
277
|
The { start, end } value must be between the min & max value and { start, end } must be start < end.
|
|
@@ -280,8 +282,8 @@ const ee = (r, l, e) => {
|
|
|
280
282
|
},
|
|
281
283
|
defaultValue: (r, l, e) => {
|
|
282
284
|
if (r.defaultValue) {
|
|
283
|
-
const s = r.defaultValue.start, i = r.defaultValue.end,
|
|
284
|
-
if (s > i || s >
|
|
285
|
+
const s = r.defaultValue.start, i = r.defaultValue.end, u = r.min, m = r.max;
|
|
286
|
+
if (s > i || s > m || s < u || i > m || i < u || i < s)
|
|
285
287
|
return new Error(
|
|
286
288
|
`Invalid prop + ${l} supplied to ${e}.
|
|
287
289
|
The { start, end } value must be between the min & max value and { start, end } must be start < end.
|
|
@@ -293,24 +295,24 @@ const ee = (r, l, e) => {
|
|
|
293
295
|
onChange: D.func,
|
|
294
296
|
step: D.number,
|
|
295
297
|
min: (r, l, e) => {
|
|
296
|
-
const s = r[l], i = r.min,
|
|
298
|
+
const s = r[l], i = r.min, u = r.max;
|
|
297
299
|
return i === void 0 ? new Error(
|
|
298
300
|
`Invalid prop + ${l} supplied to ${e}.
|
|
299
301
|
${l} value can not be undefined.
|
|
300
302
|
`
|
|
301
|
-
) : s && i >=
|
|
303
|
+
) : s && i >= u ? new Error(
|
|
302
304
|
`Invalid prop + ${l} supplied to ${e}.
|
|
303
305
|
${l} value can not be equal to or bigger than the max value.
|
|
304
306
|
`
|
|
305
307
|
) : null;
|
|
306
308
|
},
|
|
307
309
|
max: (r, l, e) => {
|
|
308
|
-
const s = r[l], i = r.min,
|
|
309
|
-
return
|
|
310
|
+
const s = r[l], i = r.min, u = r.max;
|
|
311
|
+
return u === void 0 ? new Error(
|
|
310
312
|
`Invalid prop + ${l} supplied to ${e}.
|
|
311
313
|
${l} value can not be undefined.
|
|
312
314
|
`
|
|
313
|
-
) : s &&
|
|
315
|
+
) : s && u <= i ? new Error(
|
|
314
316
|
`Invalid prop + ${l} supplied to ${e}.
|
|
315
317
|
${l} value can not be equal to or smaller than the min value.
|
|
316
318
|
`
|
package/signature/Signature.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ve=require("@progress/kendo-inputs-common"),R=require("@progress/kendo-react-buttons"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ve=require("@progress/kendo-inputs-common"),R=require("@progress/kendo-react-buttons"),r=require("@progress/kendo-react-common"),ye=require("@progress/kendo-react-dialogs"),Ce=require("@progress/kendo-react-intl"),a=require("prop-types"),he=require("react"),d=require("../messages/index.js"),Se=require("../package-metadata.js"),ze=require("./utils/index.js"),q=require("@progress/kendo-svg-icons");function Oe(i){const p=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const e in i)if(e!=="default"){const f=Object.getOwnPropertyDescriptor(i,e);Object.defineProperty(p,e,f.get?f:{enumerable:!0,get:()=>i[e]})}}return p.default=i,Object.freeze(p)}const n=Oe(he),Ee=250,xe=84,Z=3,ee=2,Me="#000000",Ie="#ffffff",Y=i=>i!==void 0,te=r.createPropsContext(),b=n.forwardRef((i,p)=>{r.validatePackage(Se.packageMetadata);const e=r.usePropsContext(te,i),f=Ce.useLocalization(),c=n.useRef(null),v=n.useRef(null),T=n.useRef(null),B=n.useRef(null),_=n.useRef(null),[s,ne]=n.useState(),[y,N]=n.useState(!1),[O,j]=n.useState(!1),[C,F]=n.useState(),[oe,ae]=n.useState(),G=Y(e.value)?e.value:C,[re,se]=n.useState(!1),k=Y(e.open),g=k?e.open:re,ie=e.maximized||O||!e.maximizable||e.disabled,le=!(e.maximized&&!O),ce=!(!(e.value||C)||O||e.readOnly||e.disabled),A=f.toLanguageString(d.signatureMaximize,d.messages[d.signatureMaximize]),V=f.toLanguageString(d.signatureMinimize,d.messages[d.signatureMinimize]),U=f.toLanguageString(d.signatureClear,d.messages[d.signatureClear]),E=e.popupScale||Z,x=e.exportScale||ee,M=t=>{F(t),e.onChange&&e.onChange({value:t})},ue=t=>{s==null||s.loadImage(t.value),M(t.value)};n.useEffect(()=>{e.value!==C&&(F(e.value),s==null||s.loadImage(e.value))},[e.value]);const de=()=>{s==null||s.clear(),M()},h=n.useCallback(t=>{k||se(t)},[k]),me=t=>{var o,l;X(t),(l=((o=_.current)==null?void 0:o.element)||v.current)==null||l.focus()},I=n.useCallback(()=>{let t=Me;return!e.color&&typeof document!="undefined"&&c.current&&(t=getComputedStyle(c.current).color),e.color||t},[e.color]),w=n.useCallback(()=>{let t=Ie;return!e.backgroundColor&&typeof document!="undefined"&&c.current&&(t=getComputedStyle(c.current).backgroundColor),e.backgroundColor||t},[e.backgroundColor]),W=()=>({scale:e.maximized?e.popupScale:1,color:I(),backgroundColor:w(),strokeWidth:e.strokeWidth,smooth:e.smooth,readonly:e.readOnly}),H=async t=>{const{width:o,height:l}=t;return await(s==null?void 0:s.exportImage({width:o*x,height:l*x}))};n.useEffect(()=>{const t=v.current,o=new ve.SignaturePad(t,W());return G&&o.loadImage(G),ne(o),()=>o.destroy()},[]),n.useEffect(()=>{s==null||s.setOptions({onChange:async()=>M(await H(J())),onDraw:()=>j(!0),onDrawEnd:()=>j(!1)})},[s]),r.useIsomorphicLayoutEffect(()=>s==null?void 0:s.setOptions(W()),[e.readOnly,e.color,e.backgroundColor,e.strokeWidth,e.smooth]),n.useEffect(()=>{var l,m;const t=(m=(l=T.current)==null?void 0:l.element)==null?void 0:m.querySelector(".k-overlay");if(!t)return;const o=()=>h(!1);return t.addEventListener("click",o),()=>t.removeEventListener("click",o)},[g]),n.useEffect(()=>{if(!g||typeof document=="undefined")return;const t=o=>{o.keyCode===r.Keys.esc&&h(!1)};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[g]),n.useEffect(()=>{var t,o;e.maximized&&((o=(t=B.current)==null?void 0:t.element)==null||o.focus())},[]);const P=n.useCallback(()=>{var t;return(t=v.current)==null?void 0:t.focus()},[]),S=n.useCallback(()=>e.value,[e.value]),$=n.useCallback(()=>e.name,[e.name]),z=n.useCallback(()=>e.required,[e.required]),L=n.useCallback(()=>{const t=e.validationMessage!==void 0,l=!S(),m=e.valid!==void 0?e.valid:!z()||!l;return{customError:t,valid:m,valueMissing:l}},[e.validationMessage,e.valid,S,z]),D=n.useCallback(()=>e.validityStyles,[e.validityStyles]),K=n.useCallback(()=>e,[e]),u=n.useCallback(()=>{const t={element:c.current,focus:P};return Object.defineProperty(t,"name",{get:$}),Object.defineProperty(t,"value",{get:S}),Object.defineProperty(t,"validity",{get:L}),Object.defineProperty(t,"validityStyles",{get:D}),Object.defineProperty(t,"required",{get:z}),Object.defineProperty(t,"props",{get:K}),Object.defineProperty(t,"color",{get:I}),Object.defineProperty(t,"backgroundColor",{get:w}),t},[$,S,L,D,z,P,K,I,w]);n.useImperativeHandle(p,u);const fe=n.useCallback(t=>{y||e.maximized||(N(!0),r.dispatchEvent(e.onFocus,t,u(),{}))},[y,e.onFocus,u]),ge=n.useCallback(t=>{ze.hasParent(t.relatedTarget,c.current)||(N(!1),r.dispatchEvent(e.onBlur,t,u(),{}))},[y,e.onBlur,u]),pe=n.useCallback(async t=>{ae(await H(Q())),h(!0),r.dispatchEvent(e.onOpen,t,u(),{})},[g,k,e.onOpen,e.value,C,u]),X=n.useCallback(t=>{h(!1),r.dispatchEvent(e.onClose,t,u(),{})},[g,k,e.onClose,u]),ke=()=>{de(),P()},J=()=>{var l,m;const t=e.width||((l=c.current)==null?void 0:l.offsetWidth)||Ee,o=e.height||((m=c.current)==null?void 0:m.offsetHeight)||xe;return{width:t,height:o}},Q=()=>{const{width:t,height:o}=J();return{width:t*E,height:o*E}},be=!D()||L().valid;return n.createElement("div",{ref:c,dir:e.dir,style:{width:e.width,height:e.height,...e.style},className:r.classNames("k-input","k-signature",{"k-signature-maximized":e.maximized,[`k-signature-${r.kendoThemeMaps.sizeMap[e.size]||e.size}`]:e.size,[`k-signature-${e.fillMode}`]:e.fillMode,[`k-input-${e.fillMode}`]:e.fillMode,[`k-rounded-${r.kendoThemeMaps.roundedMap[e.rounded]||e.rounded}`]:e.rounded,"k-invalid":!be,"k-required":e.required,"k-disabled":e.disabled,"k-focus":y},e.className),onFocus:fe,onBlur:ge},n.createElement("div",{className:"k-signature-canvas",ref:v,tabIndex:r.getTabIndex(e.tabIndex,e.disabled),role:"img",id:e.id,"aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledBy,"aria-describedby":e.ariaDescribedBy,"aria-disabled":e.disabled?"true":void 0}),n.createElement("div",{className:"k-signature-actions k-signature-actions-top"},n.createElement(R.Button,{type:"button",className:r.classNames("k-signature-action","k-signature-maximize",{"k-hidden":e.disabled||ie}),ref:_,icon:"hyperlink-open",svgIcon:q.hyperlinkOpenIcon,fillMode:"flat",size:e.size,onClick:pe,"aria-label":A,title:A}),n.createElement(R.Button,{type:"button",className:r.classNames("k-signature-action","k-signature-minimize","k-rotate-180",{"k-hidden":e.disabled||le}),ref:B,icon:"hyperlink-open",svgIcon:q.hyperlinkOpenIcon,fillMode:"flat",size:e.size,onClick:X,"aria-label":V,title:V})),!e.hideLine&&n.createElement("div",{className:"k-signature-line",style:{zIndex:2,pointerEvents:"none"}}),n.createElement("div",{className:"k-signature-actions k-signature-actions-bottom"},ce&&n.createElement(R.Button,{type:"button",className:"k-signature-action k-signature-clear",icon:"x",svgIcon:q.xIcon,fillMode:"flat",size:e.size,onClick:ke,"aria-label":U,title:U})),g&&n.createElement(ye.Dialog,{ref:T},n.createElement(b,{...e,...Q(),value:oe,maximized:!0,exportScale:1/E*x,open:!1,onChange:ue,onClose:me})))});b.propTypes={value:a.string,width:a.number,height:a.number,tabIndex:a.number,dir:a.string,ariaDescribedBy:a.string,ariaLabelledBy:a.string,ariaLabel:a.string,readOnly:a.bool,disabled:a.bool,validationMessage:a.string,required:a.bool,onChange:a.func,onFocus:a.func,onBlur:a.func,onOpen:a.func,onClose:a.func,size:a.oneOf([null,"small","medium","large"]),rounded:a.oneOf([null,"small","medium","large"]),fillMode:a.oneOf([null,"solid","flat","outline"])};b.displayName="KendoSignature";b.defaultProps={strokeWidth:1,smooth:!1,popupScale:Z,exportScale:ee,maximizable:!0,disabled:!1,required:!1,validityStyles:!0,onChange:i=>r.noop,onFocus:i=>r.noop,onBlur:i=>r.noop,onOpen:i=>r.noop,onClose:i=>r.noop,size:"medium",rounded:"medium",fillMode:"solid"};exports.Signature=b;exports.SignaturePropsContext=te;
|