@progress/kendo-react-popup 12.0.3-develop.1 → 12.1.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/Popup.js +1 -1
- package/Popup.mjs +154 -131
- package/animation.js +1 -1
- package/animation.mjs +17 -17
- package/dist/cdn/js/kendo-react-popup.js +1 -1
- package/index.d.mts +183 -6
- package/index.d.ts +183 -6
- package/package.json +2 -2
package/Popup.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Oe=require("react"),Ae=require("react-dom"),n=require("prop-types"),oe=require("./animation.js"),a=require("@progress/kendo-react-common"),t=require("@progress/kendo-popup-common"),ie=require("./util.js");function se(r){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const h in r)if(h!=="default"){const v=Object.getOwnPropertyDescriptor(r,h);Object.defineProperty(u,h,v.get?v:{enumerable:!0,get:()=>r[h]})}}return u.default=r,Object.freeze(u)}const c=se(Oe),be=se(Ae),ce=c.createContext(r=>r),Ce=100,Ee=1;function D(r,u){if(r===u)return!0;if(!!r!=!!u)return!1;const h=Object.getOwnPropertyNames(r),v=Object.getOwnPropertyNames(u);if(h.length!==v.length)return!1;for(let P=0;P<h.length;P++){const w=h[P];if(r[w]!==u[w])return!1}return!0}const De={left:-1e3,top:0},K=c.forwardRef((r,u)=>{const v=c.useContext(ce).call(void 0,r),{collision:P=g.collision,anchorAlign:w=g.anchorAlign,popupAlign:y=g.popupAlign,offset:T=g.offset,animate:N=g.animate,show:O=g.show,margin:Z=g.margin,positionMode:F=g.positionMode,appendTo:A,contentKey:z,anchor:d,scale:le,role:ue,onKeyDown:ae,onPosition:V,onOpen:W,onMouseDownOutside:X,onClose:B,className:M,popupClass:S,id:pe,style:j,children:fe}=v,de=a.useUnstyled(),I=v.unstyled||de,b=I&&I.uPopup,[o,L]=c.useState({current:"hidden",previous:"hidden",props:{}}),x=N&&typeof N!="object"?re:{...re,...N},G=e=>{window==null||window.addEventListener("mousedown",Q),_(e),J(e.firstChild,"enter",me),L({...i,current:"shown",previous:i.current})},_=e=>{const{width:s,height:m}=e.style;if(e.offsetWidth===0&&e.offsetHeight===0)return;e.style.width=e.offsetWidth+"px",e.style.height=e.offsetHeight+"px";const p=t.alignElement({anchor:d,anchorAlign:w,element:e,elementAlign:y,offset:T,margin:Z,positionMode:F,scale:le}),f=t.positionElement({anchor:d,anchorAlign:w,element:e,elementAlign:y,collisions:P,currentLocation:p,margin:Z});if(e.style.top=f.offset.top+"px",e.style.left=f.offset.left+"px",e.style.width=s,e.style.height=m,U.current={fit:f.fit,fitted:f.fitted,flip:f.flip,flipped:f.flipped},V){const R={target:E.current,flipped:f.flipped,fitted:f.fitted};V.call(void 0,R)}},me=()=>{const e=l.current;e&&(O&&e.classList.add(...a.classNames(a.uPopup.animationContainerShown({c:b})).split(" ").filter(s=>s)),ge(e),W&&W.call(void 0,{target:E.current}))},J=(e,s,m)=>{if(y){if(x.type==="slide"){let p;const{horizontal:f,vertical:R}=y;typeof r.animate=="object"&&r.animate.direction?p=x.direction:f==="left"&&R==="center"?p="right":f==="right"&&R==="center"?p="left":R==="top"?p="down":p="up";const ye={down:"up",up:"down",left:"right",right:"left"};U.current&&U.current.flipped&&(p=ye[p],oe.animations(e,$()[s],s,m,b,x.type,p))}oe.animations(e,$()[s],s,m,b,x.type,x.direction)}},Q=e=>{var p;const s=((p=e==null?void 0:e.target)==null?void 0:p.closest(".k-animation-container"))===null,m=(d==null?void 0:d.contains(e==null?void 0:e.target))||!1;if(s){if(X){const f={target:E.current,event:e,state:o,isAnchorClicked:m};X.call(void 0,f)}window==null||window.removeEventListener("mousedown",Q)}},he=e=>{if(!O){const s=I&&I.uPopup;e.classList.remove(...a.classNames(a.uPopup.animationContainerShown({c:s})).split(" ").filter(m=>m))}q()},Y=()=>{i.current==="hiding"&&(i.previous==="shown"||i.previous==="reposition")&&L({...i,current:"hidden",previous:i.current}),B&&B.call(void 0,{target:E.current})},$=()=>{const e=N;let s=0,m=0;return e&&(e===!0?s=m=300:(s=e.openDuration||0,m=e.closeDuration||0)),{enter:s,exit:m}},ge=e=>{q(),C.current=t.domUtils.scrollableParents(d||e),C.current&&C.current.map(s=>s.addEventListener("scroll",k)),window.addEventListener("resize",k)},q=()=>{C.current&&(C.current.map(e=>e.removeEventListener("scroll",k)),C.current=void 0),window.removeEventListener("resize",k)},k=ie.throttle(()=>{l.current&&i.current!=="hidden"&&i.current!=="hiding"&&L({...o,current:"reposition",previous:i.current})},ie.FRAME_DURATION),Pe=()=>ee?ee+Ee:Ce,ee=a.useZIndexContext()||0,U=c.useRef(void 0),C=c.useRef(void 0),l=c.useRef(null),E=c.useRef(null),ne=c.useRef({}),H=c.useRef(!1);c.useImperativeHandle(E,()=>({element:l.current,setPosition:_,props:r})),c.useImperativeHandle(u,()=>E.current);const i=c.useMemo(()=>{const e={...o,props:{show:O,anchor:d,anchorAlign:w,appendTo:A,collision:P,popupAlign:y,className:M,popupClass:S,style:j,offset:T,contentKey:z}};return O?o.current==="hidden"||o.current==="hiding"?{...e,current:"showing",previous:o.current}:o.current==="showing"?{...e,current:"shown",previous:o.current}:o.current==="shown"&&(!D(T,o.props.offset)||!D(w,o.props.anchorAlign)||!D(A,o.props.appendTo)||!D(P,o.props.collision)||!D(y,o.props.popupAlign)||!D(j,o.props.style)||d!==o.props.anchor||S!==o.props.popupClass||M!==o.props.className)?{...e,current:"reposition",previous:o.current}:e:o.current==="hiding"||o.current==="hidden"?{...e,current:"hidden",previous:o.current}:{...e,current:"hiding",previous:o.current}},[O,d,w,A,P,y,M,S,j,T,z,o]);c.useEffect(()=>{i.current==="hiding"&&!H.current&&l.current?(H.current=!0,he(l.current),J(l.current.firstChild,"exit",Y)):(H.current=!1,i.current==="showing"&&l.current&&!l.current.classList.contains("k-animation-container-shown")?G(l.current):i.current==="hiding"&&l.current?Y():i.current==="reposition"&&i.previous==="shown"?setTimeout(()=>{L({...i,current:"shown",previous:i.current})},0):i.current==="shown"&&ne.current.contentKey!==z&&l.current&&_(l.current)),i.current==="reposition"&&(i.previous==="shown"||i.previous==="showing")&&l.current&&_(l.current),ne.current={contentKey:z}},[i]),c.useEffect(()=>(i.current==="showing"&&l.current&&G(l.current),()=>{q()}),[]);const te=A||(a.canUseDOM?d&&d.ownerDocument?d.ownerDocument.body:document.body:void 0),we=Object.assign({},{position:F,top:0,left:-1e4},j||{}),ve=i.current==="hiding";if((O||ve)&&te){const e=Pe(),s=c.createElement(a.ZIndexContext.Provider,{value:e},c.createElement("div",{onKeyDown:ae,className:a.classNames(a.uPopup.animationContainer({c:b}),M),id:pe,ref:l,style:{zIndex:e,...we}},c.createElement("div",{className:a.classNames(a.uPopup.animationChild({c:b})),style:{transitionDelay:"0ms"}},c.createElement("div",{role:ue,className:a.classNames(a.uPopup.popup({c:b}),S)},fe))));return A!==null?be.createPortal(s,te):s}return null}),g={collision:{horizontal:t.Collision.fit,vertical:t.Collision.flip},anchorAlign:{horizontal:t.AlignPoint.left,vertical:t.AlignPoint.bottom},popupAlign:{horizontal:t.AlignPoint.left,vertical:t.AlignPoint.top},offset:De,animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},re={type:"slide",direction:"down"};K.displayName="Popup";K.propTypes={anchor:function(r){const u=r.anchor;return u&&typeof u.nodeType!="number"?new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed."):null},appendTo:function(r){const u=r.appendTo;return u&&typeof u.nodeType!="number"?new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed."):null},className:n.oneOfType([n.string,n.arrayOf(n.string.isRequired)]),id:n.string,popupClass:n.oneOfType([n.string,n.arrayOf(n.string),n.object]),collision:n.shape({horizontal:n.oneOf([t.Collision.fit,t.Collision.flip,t.Collision.none]),vertical:n.oneOf([t.Collision.fit,t.Collision.flip,t.Collision.none])}),anchorAlign:n.shape({horizontal:n.oneOf([t.AlignPoint.left,t.AlignPoint.center,t.AlignPoint.right]),vertical:n.oneOf([t.AlignPoint.top,t.AlignPoint.center,t.AlignPoint.bottom])}),popupAlign:n.shape({horizontal:n.oneOf([t.AlignPoint.left,t.AlignPoint.center,t.AlignPoint.right]),vertical:n.oneOf([t.AlignPoint.top,t.AlignPoint.center,t.AlignPoint.bottom])}),offset:n.shape({left:n.number,top:n.number}),children:n.oneOfType([n.element,n.node]),show:n.bool,animate:n.oneOfType([n.bool,n.shape({type:n.oneOf(["slide","zoom","push","expand","fade"]),openDuration:n.number,closeDuration:n.number})]),margin:n.shape({horizontal:n.number,vertical:n.number}),positionMode:n.oneOf(["fixed","absolute"]),scale:n.number,style:n.object,onClose:n.func,onPosition:n.func,onOpen:n.func,onKeyDown:n.func,onMouseDownOutside:n.func};exports.Popup=K;exports.PopupPropsContext=ce;exports.popupDefaultProps=g;
|
package/Popup.mjs
CHANGED
|
@@ -6,157 +6,176 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as i from "react";
|
|
9
|
-
import * as
|
|
9
|
+
import * as Pe from "react-dom";
|
|
10
10
|
import t from "prop-types";
|
|
11
|
-
import {
|
|
12
|
-
import { useUnstyled as
|
|
13
|
-
import { Collision as w, AlignPoint as
|
|
14
|
-
import { throttle as
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
if (
|
|
11
|
+
import { animations as re } from "./animation.mjs";
|
|
12
|
+
import { useUnstyled as Oe, useZIndexContext as Ee, canUseDOM as be, ZIndexContext as Ce, classNames as D, uPopup as T } from "@progress/kendo-react-common";
|
|
13
|
+
import { Collision as w, AlignPoint as c, alignElement as xe, positionElement as Ae, domUtils as De } from "@progress/kendo-popup-common";
|
|
14
|
+
import { throttle as Te, FRAME_DURATION as Re } from "./util.mjs";
|
|
15
|
+
const ze = i.createContext((l) => l), Ne = 100, Ie = 1;
|
|
16
|
+
function C(l, p) {
|
|
17
|
+
if (l === p)
|
|
18
18
|
return !0;
|
|
19
|
-
if (!!
|
|
19
|
+
if (!!l != !!p)
|
|
20
20
|
return !1;
|
|
21
|
-
const
|
|
22
|
-
if (
|
|
21
|
+
const R = Object.getOwnPropertyNames(l), z = Object.getOwnPropertyNames(p);
|
|
22
|
+
if (R.length !== z.length)
|
|
23
23
|
return !1;
|
|
24
|
-
for (let m = 0; m <
|
|
25
|
-
const h =
|
|
26
|
-
if (
|
|
24
|
+
for (let m = 0; m < R.length; m++) {
|
|
25
|
+
const h = R[m];
|
|
26
|
+
if (l[h] !== p[h])
|
|
27
27
|
return !1;
|
|
28
28
|
}
|
|
29
29
|
return !0;
|
|
30
30
|
}
|
|
31
|
-
const
|
|
31
|
+
const Le = {
|
|
32
32
|
left: -1e3,
|
|
33
33
|
top: 0
|
|
34
|
-
},
|
|
35
|
-
const
|
|
34
|
+
}, se = i.forwardRef((l, p) => {
|
|
35
|
+
const z = i.useContext(ze).call(void 0, l), {
|
|
36
36
|
collision: m = g.collision,
|
|
37
37
|
anchorAlign: h = g.anchorAlign,
|
|
38
38
|
popupAlign: v = g.popupAlign,
|
|
39
39
|
offset: N = g.offset,
|
|
40
|
-
animate:
|
|
40
|
+
animate: I = g.animate,
|
|
41
41
|
show: y = g.show,
|
|
42
|
-
margin:
|
|
43
|
-
positionMode:
|
|
42
|
+
margin: q = g.margin,
|
|
43
|
+
positionMode: V = g.positionMode,
|
|
44
44
|
appendTo: P,
|
|
45
|
-
contentKey:
|
|
45
|
+
contentKey: L,
|
|
46
46
|
anchor: f,
|
|
47
|
-
scale:
|
|
48
|
-
role:
|
|
49
|
-
onKeyDown:
|
|
50
|
-
onPosition:
|
|
51
|
-
onOpen:
|
|
52
|
-
onMouseDownOutside:
|
|
53
|
-
onClose:
|
|
54
|
-
className:
|
|
55
|
-
popupClass:
|
|
56
|
-
id:
|
|
57
|
-
style:
|
|
58
|
-
children:
|
|
59
|
-
} =
|
|
47
|
+
scale: ce,
|
|
48
|
+
role: le,
|
|
49
|
+
onKeyDown: ae,
|
|
50
|
+
onPosition: W,
|
|
51
|
+
onOpen: X,
|
|
52
|
+
onMouseDownOutside: B,
|
|
53
|
+
onClose: G,
|
|
54
|
+
className: M,
|
|
55
|
+
popupClass: S,
|
|
56
|
+
id: ue,
|
|
57
|
+
style: U,
|
|
58
|
+
children: pe
|
|
59
|
+
} = z, fe = Oe(), j = z.unstyled || fe, O = j && j.uPopup, [n, k] = i.useState({
|
|
60
60
|
current: "hidden",
|
|
61
61
|
previous: "hidden",
|
|
62
62
|
props: {}
|
|
63
|
-
}),
|
|
64
|
-
window == null || window.addEventListener("mousedown",
|
|
65
|
-
},
|
|
63
|
+
}), x = I && typeof I != "object" ? ie : { ...ie, ...I }, J = (e) => {
|
|
64
|
+
window == null || window.addEventListener("mousedown", Y), H(e), Q(e.firstChild, "enter", de), k({ ...o, current: "shown", previous: o.current });
|
|
65
|
+
}, H = (e) => {
|
|
66
66
|
const { width: r, height: d } = e.style;
|
|
67
67
|
if (e.offsetWidth === 0 && e.offsetHeight === 0)
|
|
68
68
|
return;
|
|
69
69
|
e.style.width = e.offsetWidth + "px", e.style.height = e.offsetHeight + "px";
|
|
70
|
-
const a =
|
|
70
|
+
const a = xe({
|
|
71
71
|
anchor: f,
|
|
72
72
|
anchorAlign: h,
|
|
73
73
|
element: e,
|
|
74
74
|
elementAlign: v,
|
|
75
75
|
offset: N,
|
|
76
|
-
margin:
|
|
77
|
-
positionMode:
|
|
78
|
-
scale:
|
|
79
|
-
}), u =
|
|
76
|
+
margin: q,
|
|
77
|
+
positionMode: V,
|
|
78
|
+
scale: ce
|
|
79
|
+
}), u = Ae({
|
|
80
80
|
anchor: f,
|
|
81
81
|
anchorAlign: h,
|
|
82
82
|
element: e,
|
|
83
83
|
elementAlign: v,
|
|
84
84
|
collisions: m,
|
|
85
85
|
currentLocation: a,
|
|
86
|
-
margin:
|
|
86
|
+
margin: q
|
|
87
87
|
});
|
|
88
|
-
if (e.style.top = u.offset.top + "px", e.style.left = u.offset.left + "px", e.style.width = r, e.style.height = d,
|
|
88
|
+
if (e.style.top = u.offset.top + "px", e.style.left = u.offset.left + "px", e.style.width = r, e.style.height = d, _.current = {
|
|
89
89
|
fit: u.fit,
|
|
90
90
|
fitted: u.fitted,
|
|
91
91
|
flip: u.flip,
|
|
92
92
|
flipped: u.flipped
|
|
93
|
-
},
|
|
94
|
-
const
|
|
95
|
-
target:
|
|
93
|
+
}, W) {
|
|
94
|
+
const A = {
|
|
95
|
+
target: b.current,
|
|
96
96
|
flipped: u.flipped,
|
|
97
97
|
fitted: u.fitted
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
W.call(void 0, A);
|
|
100
100
|
}
|
|
101
|
-
},
|
|
101
|
+
}, de = () => {
|
|
102
102
|
const e = s.current;
|
|
103
103
|
e && (y && e.classList.add(
|
|
104
|
-
...D(
|
|
105
|
-
),
|
|
106
|
-
},
|
|
107
|
-
if (
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
104
|
+
...D(T.animationContainerShown({ c: O })).split(" ").filter((r) => r)
|
|
105
|
+
), he(e), X && X.call(void 0, { target: b.current }));
|
|
106
|
+
}, Q = (e, r, d) => {
|
|
107
|
+
if (v) {
|
|
108
|
+
if (x.type === "slide") {
|
|
109
|
+
let a;
|
|
110
|
+
const { horizontal: u, vertical: A } = v;
|
|
111
|
+
typeof l.animate == "object" && l.animate.direction ? a = x.direction : u === "left" && A === "center" ? a = "right" : u === "right" && A === "center" ? a = "left" : A === "top" ? a = "down" : a = "up";
|
|
112
|
+
const ye = {
|
|
113
|
+
down: "up",
|
|
114
|
+
up: "down",
|
|
115
|
+
left: "right",
|
|
116
|
+
right: "left"
|
|
117
|
+
};
|
|
118
|
+
_.current && _.current.flipped && (a = ye[a], re(
|
|
119
|
+
e,
|
|
120
|
+
ee()[r],
|
|
121
|
+
r,
|
|
122
|
+
d,
|
|
123
|
+
O,
|
|
124
|
+
x.type,
|
|
125
|
+
a
|
|
126
|
+
));
|
|
127
|
+
}
|
|
128
|
+
re(
|
|
129
|
+
e,
|
|
130
|
+
ee()[r],
|
|
131
|
+
r,
|
|
132
|
+
d,
|
|
133
|
+
O,
|
|
134
|
+
x.type,
|
|
135
|
+
x.direction
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}, Y = (e) => {
|
|
120
139
|
var a;
|
|
121
140
|
const r = ((a = e == null ? void 0 : e.target) == null ? void 0 : a.closest(".k-animation-container")) === null, d = (f == null ? void 0 : f.contains(e == null ? void 0 : e.target)) || !1;
|
|
122
141
|
if (r) {
|
|
123
|
-
if (
|
|
142
|
+
if (B) {
|
|
124
143
|
const u = {
|
|
125
|
-
target:
|
|
144
|
+
target: b.current,
|
|
126
145
|
event: e,
|
|
127
146
|
state: n,
|
|
128
147
|
isAnchorClicked: d
|
|
129
148
|
};
|
|
130
|
-
|
|
149
|
+
B.call(void 0, u);
|
|
131
150
|
}
|
|
132
|
-
window == null || window.removeEventListener("mousedown",
|
|
151
|
+
window == null || window.removeEventListener("mousedown", Y);
|
|
133
152
|
}
|
|
134
|
-
},
|
|
153
|
+
}, me = (e) => {
|
|
135
154
|
if (!y) {
|
|
136
|
-
const r =
|
|
155
|
+
const r = j && j.uPopup;
|
|
137
156
|
e.classList.remove(
|
|
138
|
-
...D(
|
|
157
|
+
...D(T.animationContainerShown({ c: r })).split(" ").filter((d) => d)
|
|
139
158
|
);
|
|
140
159
|
}
|
|
141
|
-
|
|
142
|
-
},
|
|
143
|
-
o.current === "hiding" && (o.previous === "shown" || o.previous === "reposition") &&
|
|
144
|
-
},
|
|
145
|
-
const e =
|
|
160
|
+
Z();
|
|
161
|
+
}, $ = () => {
|
|
162
|
+
o.current === "hiding" && (o.previous === "shown" || o.previous === "reposition") && k({ ...o, current: "hidden", previous: o.current }), G && G.call(void 0, { target: b.current });
|
|
163
|
+
}, ee = () => {
|
|
164
|
+
const e = I;
|
|
146
165
|
let r = 0, d = 0;
|
|
147
166
|
return e && (e === !0 ? r = d = 300 : (r = e.openDuration || 0, d = e.closeDuration || 0)), { enter: r, exit: d };
|
|
148
|
-
},
|
|
149
|
-
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
},
|
|
153
|
-
s.current && o.current !== "hidden" && o.current !== "hiding" &&
|
|
154
|
-
},
|
|
155
|
-
i.useImperativeHandle(
|
|
167
|
+
}, he = (e) => {
|
|
168
|
+
Z(), E.current = De.scrollableParents(f || e), E.current && E.current.map((r) => r.addEventListener("scroll", K)), window.addEventListener("resize", K);
|
|
169
|
+
}, Z = () => {
|
|
170
|
+
E.current && (E.current.map((e) => e.removeEventListener("scroll", K)), E.current = void 0), window.removeEventListener("resize", K);
|
|
171
|
+
}, K = Te(() => {
|
|
172
|
+
s.current && o.current !== "hidden" && o.current !== "hiding" && k({ ...n, current: "reposition", previous: o.current });
|
|
173
|
+
}, Re), ge = () => te ? te + Ie : Ne, te = Ee() || 0, _ = i.useRef(void 0), E = i.useRef(void 0), s = i.useRef(null), b = i.useRef(null), ne = i.useRef({}), F = i.useRef(!1);
|
|
174
|
+
i.useImperativeHandle(b, () => ({
|
|
156
175
|
element: s.current,
|
|
157
|
-
setPosition:
|
|
158
|
-
props:
|
|
159
|
-
})), i.useImperativeHandle(p, () =>
|
|
176
|
+
setPosition: H,
|
|
177
|
+
props: l
|
|
178
|
+
})), i.useImperativeHandle(p, () => b.current);
|
|
160
179
|
const o = i.useMemo(() => {
|
|
161
180
|
const e = {
|
|
162
181
|
...n,
|
|
@@ -167,14 +186,14 @@ const ze = {
|
|
|
167
186
|
appendTo: P,
|
|
168
187
|
collision: m,
|
|
169
188
|
popupAlign: v,
|
|
170
|
-
className:
|
|
171
|
-
popupClass:
|
|
172
|
-
style:
|
|
189
|
+
className: M,
|
|
190
|
+
popupClass: S,
|
|
191
|
+
style: U,
|
|
173
192
|
offset: N,
|
|
174
|
-
contentKey:
|
|
193
|
+
contentKey: L
|
|
175
194
|
}
|
|
176
195
|
};
|
|
177
|
-
return y ? n.current === "hidden" || n.current === "hiding" ? { ...e, current: "showing", previous: n.current } : n.current === "showing" ? { ...e, current: "shown", previous: n.current } : n.current === "shown" && (!
|
|
196
|
+
return y ? n.current === "hidden" || n.current === "hiding" ? { ...e, current: "showing", previous: n.current } : n.current === "showing" ? { ...e, current: "shown", previous: n.current } : n.current === "shown" && (!C(N, n.props.offset) || !C(h, n.props.anchorAlign) || !C(P, n.props.appendTo) || !C(m, n.props.collision) || !C(v, n.props.popupAlign) || !C(U, n.props.style) || f !== n.props.anchor || S !== n.props.popupClass || M !== n.props.className) ? { ...e, current: "reposition", previous: n.current } : e : n.current === "hiding" || n.current === "hidden" ? { ...e, current: "hidden", previous: n.current } : { ...e, current: "hiding", previous: n.current };
|
|
178
197
|
}, [
|
|
179
198
|
y,
|
|
180
199
|
f,
|
|
@@ -182,48 +201,48 @@ const ze = {
|
|
|
182
201
|
P,
|
|
183
202
|
m,
|
|
184
203
|
v,
|
|
185
|
-
I,
|
|
186
|
-
L,
|
|
187
204
|
M,
|
|
205
|
+
S,
|
|
206
|
+
U,
|
|
188
207
|
N,
|
|
189
|
-
|
|
208
|
+
L,
|
|
190
209
|
n
|
|
191
210
|
]);
|
|
192
211
|
i.useEffect(() => {
|
|
193
|
-
o.current === "hiding" && !
|
|
194
|
-
|
|
195
|
-
}, 0) : o.current === "shown" &&
|
|
196
|
-
}, [o]), i.useEffect(() => (o.current === "showing" && s.current &&
|
|
197
|
-
|
|
212
|
+
o.current === "hiding" && !F.current && s.current ? (F.current = !0, me(s.current), Q(s.current.firstChild, "exit", $)) : (F.current = !1, o.current === "showing" && s.current && !s.current.classList.contains("k-animation-container-shown") ? J(s.current) : o.current === "hiding" && s.current ? $() : o.current === "reposition" && o.previous === "shown" ? setTimeout(() => {
|
|
213
|
+
k({ ...o, current: "shown", previous: o.current });
|
|
214
|
+
}, 0) : o.current === "shown" && ne.current.contentKey !== L && s.current && H(s.current)), o.current === "reposition" && (o.previous === "shown" || o.previous === "showing") && s.current && H(s.current), ne.current = { contentKey: L };
|
|
215
|
+
}, [o]), i.useEffect(() => (o.current === "showing" && s.current && J(s.current), () => {
|
|
216
|
+
Z();
|
|
198
217
|
}), []);
|
|
199
|
-
const
|
|
218
|
+
const oe = P || (be ? f && f.ownerDocument ? f.ownerDocument.body : document.body : void 0), we = Object.assign(
|
|
200
219
|
{},
|
|
201
|
-
{ position:
|
|
202
|
-
|
|
203
|
-
),
|
|
204
|
-
if ((y ||
|
|
205
|
-
const e =
|
|
220
|
+
{ position: V, top: 0, left: -1e4 },
|
|
221
|
+
U || {}
|
|
222
|
+
), ve = o.current === "hiding";
|
|
223
|
+
if ((y || ve) && oe) {
|
|
224
|
+
const e = ge(), r = /* @__PURE__ */ i.createElement(Ce.Provider, { value: e }, /* @__PURE__ */ i.createElement(
|
|
206
225
|
"div",
|
|
207
226
|
{
|
|
208
|
-
onKeyDown:
|
|
209
|
-
className: D(
|
|
210
|
-
id:
|
|
227
|
+
onKeyDown: ae,
|
|
228
|
+
className: D(T.animationContainer({ c: O }), M),
|
|
229
|
+
id: ue,
|
|
211
230
|
ref: s,
|
|
212
231
|
style: {
|
|
213
232
|
zIndex: e,
|
|
214
|
-
...
|
|
233
|
+
...we
|
|
215
234
|
}
|
|
216
235
|
},
|
|
217
236
|
/* @__PURE__ */ i.createElement(
|
|
218
237
|
"div",
|
|
219
238
|
{
|
|
220
|
-
className: D(
|
|
239
|
+
className: D(T.animationChild({ c: O })),
|
|
221
240
|
style: { transitionDelay: "0ms" }
|
|
222
241
|
},
|
|
223
|
-
/* @__PURE__ */ i.createElement("div", { role:
|
|
242
|
+
/* @__PURE__ */ i.createElement("div", { role: le, className: D(T.popup({ c: O }), S) }, pe)
|
|
224
243
|
)
|
|
225
244
|
));
|
|
226
|
-
return P !== null ?
|
|
245
|
+
return P !== null ? Pe.createPortal(r, oe) : r;
|
|
227
246
|
}
|
|
228
247
|
return null;
|
|
229
248
|
}), g = {
|
|
@@ -232,14 +251,14 @@ const ze = {
|
|
|
232
251
|
vertical: w.flip
|
|
233
252
|
},
|
|
234
253
|
anchorAlign: {
|
|
235
|
-
horizontal:
|
|
236
|
-
vertical:
|
|
254
|
+
horizontal: c.left,
|
|
255
|
+
vertical: c.bottom
|
|
237
256
|
},
|
|
238
257
|
popupAlign: {
|
|
239
|
-
horizontal:
|
|
240
|
-
vertical:
|
|
258
|
+
horizontal: c.left,
|
|
259
|
+
vertical: c.top
|
|
241
260
|
},
|
|
242
|
-
offset:
|
|
261
|
+
offset: Le,
|
|
243
262
|
animate: !0,
|
|
244
263
|
show: !1,
|
|
245
264
|
margin: {
|
|
@@ -247,15 +266,18 @@ const ze = {
|
|
|
247
266
|
vertical: 0
|
|
248
267
|
},
|
|
249
268
|
positionMode: "absolute"
|
|
269
|
+
}, ie = {
|
|
270
|
+
type: "slide",
|
|
271
|
+
direction: "down"
|
|
250
272
|
};
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
anchor: function(
|
|
254
|
-
const p =
|
|
273
|
+
se.displayName = "Popup";
|
|
274
|
+
se.propTypes = {
|
|
275
|
+
anchor: function(l) {
|
|
276
|
+
const p = l.anchor;
|
|
255
277
|
return p && typeof p.nodeType != "number" ? new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed.") : null;
|
|
256
278
|
},
|
|
257
|
-
appendTo: function(
|
|
258
|
-
const p =
|
|
279
|
+
appendTo: function(l) {
|
|
280
|
+
const p = l.appendTo;
|
|
259
281
|
return p && typeof p.nodeType != "number" ? new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed.") : null;
|
|
260
282
|
},
|
|
261
283
|
className: t.oneOfType([t.string, t.arrayOf(t.string.isRequired)]),
|
|
@@ -266,12 +288,12 @@ te.propTypes = {
|
|
|
266
288
|
vertical: t.oneOf([w.fit, w.flip, w.none])
|
|
267
289
|
}),
|
|
268
290
|
anchorAlign: t.shape({
|
|
269
|
-
horizontal: t.oneOf([
|
|
270
|
-
vertical: t.oneOf([
|
|
291
|
+
horizontal: t.oneOf([c.left, c.center, c.right]),
|
|
292
|
+
vertical: t.oneOf([c.top, c.center, c.bottom])
|
|
271
293
|
}),
|
|
272
294
|
popupAlign: t.shape({
|
|
273
|
-
horizontal: t.oneOf([
|
|
274
|
-
vertical: t.oneOf([
|
|
295
|
+
horizontal: t.oneOf([c.left, c.center, c.right]),
|
|
296
|
+
vertical: t.oneOf([c.top, c.center, c.bottom])
|
|
275
297
|
}),
|
|
276
298
|
offset: t.shape({
|
|
277
299
|
left: t.number,
|
|
@@ -282,6 +304,7 @@ te.propTypes = {
|
|
|
282
304
|
animate: t.oneOfType([
|
|
283
305
|
t.bool,
|
|
284
306
|
t.shape({
|
|
307
|
+
type: t.oneOf(["slide", "zoom", "push", "expand", "fade"]),
|
|
285
308
|
openDuration: t.number,
|
|
286
309
|
closeDuration: t.number
|
|
287
310
|
})
|
|
@@ -300,7 +323,7 @@ te.propTypes = {
|
|
|
300
323
|
onMouseDownOutside: t.func
|
|
301
324
|
};
|
|
302
325
|
export {
|
|
303
|
-
|
|
304
|
-
|
|
326
|
+
se as Popup,
|
|
327
|
+
ze as PopupPropsContext,
|
|
305
328
|
g as popupDefaultProps
|
|
306
329
|
};
|
package/animation.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("@progress/kendo-react-common"),y=(i,s,t)=>{i.style.transitionDuration="",s&&i.classList.remove(...s.split(" ")),t&&i.classList.remove(...t.split(" "))},p=typeof window!="undefined"&&/Firefox/.test(window.navigator.userAgent),L=(i,s,t,c,f,u,d)=>{if(s===0)return c();const m=`${u}Active`,o=a.classNames(a.uPopup[u]({direction:d,type:t,c:f})),r=a.classNames(a.uPopup[m]({direction:d,type:t,c:f})),l=n=>{n.target===i&&(i.removeEventListener("transitionend",l),y(i,o,r),t==="exit"?i.style.display="none":i.style.display="",c())};i.addEventListener("transitionend",l);const v=i.ownerDocument;if(!v)return;const e=v.defaultView;if(!e)return;const w=()=>{y(i,o,r),t==="enter"&&(i.style.display=""),o&&i.classList.add(...o.split(" ").filter(n=>n)),e.requestAnimationFrame(()=>{i.style.transitionDuration=s+"ms",i.classList.add(...r.split(" ").filter(n=>n))})};p?e.requestAnimationFrame(w):w()};exports.animations=L;
|
package/animation.mjs
CHANGED
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { classNames as
|
|
9
|
-
const
|
|
8
|
+
import { classNames as l, uPopup as p } from "@progress/kendo-react-common";
|
|
9
|
+
const y = (i, s, t) => {
|
|
10
10
|
i.style.transitionDuration = "", s && i.classList.remove(...s.split(" ")), t && i.classList.remove(...t.split(" "));
|
|
11
|
-
},
|
|
12
|
-
if (
|
|
13
|
-
return
|
|
14
|
-
const o =
|
|
15
|
-
n.target === i && (i.removeEventListener("transitionend",
|
|
11
|
+
}, A = typeof window != "undefined" && /Firefox/.test(window.navigator.userAgent), x = (i, s, t, f, c, e, d) => {
|
|
12
|
+
if (s === 0)
|
|
13
|
+
return f();
|
|
14
|
+
const L = `${e}Active`, o = l(p[e]({ direction: d, type: t, c })), r = l(p[L]({ direction: d, type: t, c })), u = (n) => {
|
|
15
|
+
n.target === i && (i.removeEventListener("transitionend", u), y(i, o, r), t === "exit" ? i.style.display = "none" : i.style.display = "", f());
|
|
16
16
|
};
|
|
17
|
-
i.addEventListener("transitionend",
|
|
18
|
-
const
|
|
19
|
-
if (!
|
|
17
|
+
i.addEventListener("transitionend", u);
|
|
18
|
+
const v = i.ownerDocument;
|
|
19
|
+
if (!v)
|
|
20
20
|
return;
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
21
|
+
const a = v.defaultView;
|
|
22
|
+
if (!a)
|
|
23
23
|
return;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
i.style.transitionDuration =
|
|
24
|
+
const w = () => {
|
|
25
|
+
y(i, o, r), t === "enter" && (i.style.display = ""), o && i.classList.add(...o.split(" ").filter((n) => n)), a.requestAnimationFrame(() => {
|
|
26
|
+
i.style.transitionDuration = s + "ms", i.classList.add(...r.split(" ").filter((n) => n));
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
|
-
|
|
29
|
+
A ? a.requestAnimationFrame(w) : w();
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
x as
|
|
32
|
+
x as animations
|
|
33
33
|
};
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
13
13
|
*-------------------------------------------------------------------------------------------
|
|
14
14
|
*/
|
|
15
|
-
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-popup-common")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-popup-common"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPopup={},e.React,e.ReactDOM,e.PropTypes,e.KendoReactCommon,e.KendoPopupCommon)}(this,(function(e,n,t,o,r,i){"use strict";function s(e){var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var l=s(n),c=s(t);const
|
|
15
|
+
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react"),require("react-dom"),require("prop-types"),require("@progress/kendo-react-common"),require("@progress/kendo-popup-common")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","prop-types","@progress/kendo-react-common","@progress/kendo-popup-common"],n):n((e="undefined"!=typeof globalThis?globalThis:e||self).KendoReactPopup={},e.React,e.ReactDOM,e.PropTypes,e.KendoReactCommon,e.KendoPopupCommon)}(this,(function(e,n,t,o,r,i){"use strict";function s(e){var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var l=s(n),c=s(t);const p=(e,n,t)=>{e.style.transitionDuration="",n&&e.classList.remove(...n.split(" ")),t&&e.classList.remove(...t.split(" "))},u="undefined"!=typeof window&&/Firefox/.test(window.navigator.userAgent),a=(e,n,t,o,i,s,l)=>{if(0===n)return o();const c=`${s}Active`,a=r.classNames(r.uPopup[s]({direction:l,type:t,c:i})),d=r.classNames(r.uPopup[c]({direction:l,type:t,c:i})),f=n=>{n.target===e&&(e.removeEventListener("transitionend",f),p(e,a,d),e.style.display="exit"===t?"none":"",o())};e.addEventListener("transitionend",f);const m=e.ownerDocument;if(!m)return;const h=m.defaultView;if(!h)return;const g=()=>{p(e,a,d),"enter"===t&&(e.style.display=""),a&&e.classList.add(...a.split(" ").filter((e=>e))),h.requestAnimationFrame((()=>{e.style.transitionDuration=n+"ms",e.classList.add(...d.split(" ").filter((e=>e)))}))};u?h.requestAnimationFrame(g):g()},d=l.createContext((e=>e));function f(e,n){if(e===n)return!0;if(!!e!=!!n)return!1;const t=Object.getOwnPropertyNames(e),o=Object.getOwnPropertyNames(n);if(t.length!==o.length)return!1;for(let o=0;o<t.length;o++){const r=t[o];if(e[r]!==n[r])return!1}return!0}const m=l.forwardRef(((e,n)=>{const t=l.useContext(d).call(void 0,e),{collision:o=h.collision,anchorAlign:s=h.anchorAlign,popupAlign:p=h.popupAlign,offset:u=h.offset,animate:m=h.animate,show:v=h.show,margin:y=h.margin,positionMode:w=h.positionMode,appendTo:P,contentKey:A,anchor:b,scale:O,role:C,onKeyDown:x,onPosition:T,onOpen:D,onMouseDownOutside:E,onClose:N,className:L,popupClass:z,id:R,style:j,children:K}=t,M=r.useUnstyled(),k=t.unstyled||M,q=k&&k.uPopup,[I,H]=l.useState({current:"hidden",previous:"hidden",props:{}}),F=m&&"object"!=typeof m?g:{...g,...m},S=e=>{null==window||window.addEventListener("mousedown",Z),U(e),W(e.firstChild,"enter",V),H({...re,current:"shown",previous:re.current})},U=e=>{const{width:n,height:t}=e.style;if(0===e.offsetWidth&&0===e.offsetHeight)return;e.style.width=e.offsetWidth+"px",e.style.height=e.offsetHeight+"px";const r=i.alignElement({anchor:b,anchorAlign:s,element:e,elementAlign:p,offset:u,margin:y,positionMode:w,scale:O}),l=i.positionElement({anchor:b,anchorAlign:s,element:e,elementAlign:p,collisions:o,currentLocation:r,margin:y});if(e.style.top=l.offset.top+"px",e.style.left=l.offset.left+"px",e.style.width=n,e.style.height=t,Y.current={fit:l.fit,fitted:l.fitted,flip:l.flip,flipped:l.flipped},T){const e={target:ne.current,flipped:l.flipped,fitted:l.fitted};T.call(void 0,e)}},V=()=>{const e=ee.current;e&&(v&&e.classList.add(...r.classNames(r.uPopup.animationContainerShown({c:q})).split(" ").filter((e=>e))),G(e),D&&D.call(void 0,{target:ne.current}))},W=(n,t,o)=>{if(p){if("slide"===F.type){let r;const{horizontal:i,vertical:s}=p;r="object"==typeof e.animate&&e.animate.direction?F.direction:"left"===i&&"center"===s?"right":"right"===i&&"center"===s?"left":"top"===s?"down":"up";const l={down:"up",up:"down",left:"right",right:"left"};Y.current&&Y.current.flipped&&(r=l[r],a(n,B()[t],t,o,q,F.type,r))}a(n,B()[t],t,o,q,F.type,F.direction)}},Z=e=>{var n;const t=null===(null==(n=null==e?void 0:e.target)?void 0:n.closest(".k-animation-container")),o=(null==b?void 0:b.contains(null==e?void 0:e.target))||!1;if(t){if(E){const n={target:ne.current,event:e,state:I,isAnchorClicked:o};E.call(void 0,n)}null==window||window.removeEventListener("mousedown",Z)}},$=()=>{"hiding"===re.current&&("shown"===re.previous||"reposition"===re.previous)&&H({...re,current:"hidden",previous:re.current}),N&&N.call(void 0,{target:ne.current})},B=()=>{const e=m;let n=0,t=0;return e&&(!0===e?n=t=300:(n=e.openDuration||0,t=e.closeDuration||0)),{enter:n,exit:t}},G=e=>{J(),_.current=i.domUtils.scrollableParents(b||e),_.current&&_.current.map((e=>e.addEventListener("scroll",Q))),window.addEventListener("resize",Q)},J=()=>{_.current&&(_.current.map((e=>e.removeEventListener("scroll",Q))),_.current=void 0),window.removeEventListener("resize",Q)},Q=function(e,n,t={}){let o,r,i,s,l=0;t=t||{};const c=function(){l=!1===t.leading?0:(new Date).getTime(),o=void 0,s=e.apply(r,i),o||(r=i=null)};return function(){const p=(new Date).getTime();!l&&!1===t.leading&&(l=p);const u=n-(p-l);return r=void 0,i=arguments,u<=0||u>n?(o&&(clearTimeout(o),o=void 0),l=p,s=e.apply(r,i),o||(r=i=null)):!o&&!1!==t.trailing&&(o=window.setTimeout(c,u)),s}}((()=>{ee.current&&"hidden"!==re.current&&"hiding"!==re.current&&H({...I,current:"reposition",previous:re.current})}),16.666666666666668),X=r.useZIndexContext()||0,Y=l.useRef(void 0),_=l.useRef(void 0),ee=l.useRef(null),ne=l.useRef(null),te=l.useRef({}),oe=l.useRef(!1);l.useImperativeHandle(ne,(()=>({element:ee.current,setPosition:U,props:e}))),l.useImperativeHandle(n,(()=>ne.current));const re=l.useMemo((()=>{const e={...I,props:{show:v,anchor:b,anchorAlign:s,appendTo:P,collision:o,popupAlign:p,className:L,popupClass:z,style:j,offset:u,contentKey:A}};return v?"hidden"===I.current||"hiding"===I.current?{...e,current:"showing",previous:I.current}:"showing"===I.current?{...e,current:"shown",previous:I.current}:"shown"!==I.current||f(u,I.props.offset)&&f(s,I.props.anchorAlign)&&f(P,I.props.appendTo)&&f(o,I.props.collision)&&f(p,I.props.popupAlign)&&f(j,I.props.style)&&b===I.props.anchor&&z===I.props.popupClass&&L===I.props.className?e:{...e,current:"reposition",previous:I.current}:"hiding"===I.current||"hidden"===I.current?{...e,current:"hidden",previous:I.current}:{...e,current:"hiding",previous:I.current}}),[v,b,s,P,o,p,L,z,j,u,A,I]);l.useEffect((()=>{"hiding"===re.current&&!oe.current&&ee.current?(oe.current=!0,(e=>{if(!v){const n=k&&k.uPopup;e.classList.remove(...r.classNames(r.uPopup.animationContainerShown({c:n})).split(" ").filter((e=>e)))}J()})(ee.current),W(ee.current.firstChild,"exit",$)):(oe.current=!1,"showing"===re.current&&ee.current&&!ee.current.classList.contains("k-animation-container-shown")?S(ee.current):"hiding"===re.current&&ee.current?$():"reposition"===re.current&&"shown"===re.previous?setTimeout((()=>{H({...re,current:"shown",previous:re.current})}),0):"shown"===re.current&&te.current.contentKey!==A&&ee.current&&U(ee.current)),"reposition"===re.current&&("shown"===re.previous||"showing"===re.previous)&&ee.current&&U(ee.current),te.current={contentKey:A}}),[re]),l.useEffect((()=>("showing"===re.current&&ee.current&&S(ee.current),()=>{J()})),[]);const ie=P||(r.canUseDOM?b&&b.ownerDocument?b.ownerDocument.body:document.body:void 0),se=Object.assign({},{position:w,top:0,left:-1e4},j||{}),le="hiding"===re.current;if((v||le)&&ie){const e=X?X+1:100,n=l.createElement(r.ZIndexContext.Provider,{value:e},l.createElement("div",{onKeyDown:x,className:r.classNames(r.uPopup.animationContainer({c:q}),L),id:R,ref:ee,style:{zIndex:e,...se}},l.createElement("div",{className:r.classNames(r.uPopup.animationChild({c:q})),style:{transitionDelay:"0ms"}},l.createElement("div",{role:C,className:r.classNames(r.uPopup.popup({c:q}),z)},K))));return null!==P?c.createPortal(n,ie):n}return null})),h={collision:{horizontal:i.Collision.fit,vertical:i.Collision.flip},anchorAlign:{horizontal:i.AlignPoint.left,vertical:i.AlignPoint.bottom},popupAlign:{horizontal:i.AlignPoint.left,vertical:i.AlignPoint.top},offset:{left:-1e3,top:0},animate:!0,show:!1,margin:{horizontal:0,vertical:0},positionMode:"absolute"},g={type:"slide",direction:"down"};m.displayName="Popup",m.propTypes={anchor:function(e){const n=e.anchor;return n&&"number"!=typeof n.nodeType?new Error("Invalid prop `anchor` supplied to `Kendo React Popup`. Validation failed."):null},appendTo:function(e){const n=e.appendTo;return n&&"number"!=typeof n.nodeType?new Error("Invalid prop `appendTo` supplied to `Kendo React Popup`. Validation failed."):null},className:o.oneOfType([o.string,o.arrayOf(o.string.isRequired)]),id:o.string,popupClass:o.oneOfType([o.string,o.arrayOf(o.string),o.object]),collision:o.shape({horizontal:o.oneOf([i.Collision.fit,i.Collision.flip,i.Collision.none]),vertical:o.oneOf([i.Collision.fit,i.Collision.flip,i.Collision.none])}),anchorAlign:o.shape({horizontal:o.oneOf([i.AlignPoint.left,i.AlignPoint.center,i.AlignPoint.right]),vertical:o.oneOf([i.AlignPoint.top,i.AlignPoint.center,i.AlignPoint.bottom])}),popupAlign:o.shape({horizontal:o.oneOf([i.AlignPoint.left,i.AlignPoint.center,i.AlignPoint.right]),vertical:o.oneOf([i.AlignPoint.top,i.AlignPoint.center,i.AlignPoint.bottom])}),offset:o.shape({left:o.number,top:o.number}),children:o.oneOfType([o.element,o.node]),show:o.bool,animate:o.oneOfType([o.bool,o.shape({type:o.oneOf(["slide","zoom","push","expand","fade"]),openDuration:o.number,closeDuration:o.number})]),margin:o.shape({horizontal:o.number,vertical:o.number}),positionMode:o.oneOf(["fixed","absolute"]),scale:o.number,style:o.object,onClose:o.func,onPosition:o.func,onOpen:o.func,onKeyDown:o.func,onMouseDownOutside:o.func},e.Popup=m,e.PopupPropsContext=d}));
|
package/index.d.mts
CHANGED
|
@@ -38,6 +38,22 @@ export declare interface Align extends AlignStrategy {
|
|
|
38
38
|
vertical: 'top' | 'center' | 'bottom';
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* The available animation types for the Popup component.
|
|
43
|
+
*
|
|
44
|
+
* Possible values: 'slide', 'zoom', 'push', 'expand', 'fade'.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* <Popup animation={{ type: 'slide' }} />
|
|
48
|
+
*/
|
|
49
|
+
declare const animationTypes: {
|
|
50
|
+
readonly slide: "slide";
|
|
51
|
+
readonly zoom: "zoom";
|
|
52
|
+
readonly push: "push";
|
|
53
|
+
readonly expand: "expand";
|
|
54
|
+
readonly fade: "fade";
|
|
55
|
+
};
|
|
56
|
+
|
|
41
57
|
/**
|
|
42
58
|
* Defines the horizontal and vertical collision behavior of the Popup.
|
|
43
59
|
*/
|
|
@@ -62,6 +78,44 @@ export declare interface Collision {
|
|
|
62
78
|
*/
|
|
63
79
|
export declare type CollisionType = CollisionType_2;
|
|
64
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Defines the expand animation settings for the Popup component.
|
|
83
|
+
*
|
|
84
|
+
* Use this to configure expand type and direction
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* <Popup animation={{ type: 'expand', direction: 'vertical' }} />
|
|
88
|
+
*/
|
|
89
|
+
export declare interface ExpandPopupAnimation {
|
|
90
|
+
/**
|
|
91
|
+
* The type of the animation. Must be 'expand'.
|
|
92
|
+
*/
|
|
93
|
+
type: typeof animationTypes.expand;
|
|
94
|
+
/**
|
|
95
|
+
* The direction of the expand animation. Possible values: 'horizontal', 'vertical'.
|
|
96
|
+
*/
|
|
97
|
+
direction: PopupExpandDirection;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Defines the fade animation settings for the Popup component.
|
|
102
|
+
*
|
|
103
|
+
* Use this to configure fade type. Direction is always 'none'.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* <Popup animation={{ type: 'fade' }} />
|
|
107
|
+
*/
|
|
108
|
+
export declare interface FadePopupAnimation {
|
|
109
|
+
/**
|
|
110
|
+
* The type of the animation. Must be 'fade'.
|
|
111
|
+
*/
|
|
112
|
+
type: typeof animationTypes.fade;
|
|
113
|
+
/**
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
116
|
+
direction?: PopupNoDirection;
|
|
117
|
+
}
|
|
118
|
+
|
|
65
119
|
/**
|
|
66
120
|
* Defines the horizontal and the vertical margin offset of the component.
|
|
67
121
|
*/
|
|
@@ -118,9 +172,19 @@ export declare interface Offset extends OffsetPosition {
|
|
|
118
172
|
export declare const Popup: React_2.ForwardRefExoticComponent<PopupProps & React_2.RefAttributes<PopupHandle | null>>;
|
|
119
173
|
|
|
120
174
|
/**
|
|
121
|
-
* The animation settings for the Popup component
|
|
175
|
+
* The animation settings for the Popup component
|
|
122
176
|
*/
|
|
123
|
-
export declare
|
|
177
|
+
export declare type PopupAnimation = PopupAnimationBase & (FadePopupAnimation | SlidePopupAnimation | ZoomPopupAnimation | PushPopupAnimation | ExpandPopupAnimation);
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Defines the base animation settings for the Popup component.
|
|
181
|
+
*
|
|
182
|
+
* Includes duration properties for opening and closing animations
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* <Popup animation={{ openDuration: 500, closeDuration: 200 }} />
|
|
186
|
+
*/
|
|
187
|
+
export declare interface PopupAnimationBase {
|
|
124
188
|
/**
|
|
125
189
|
* The duration of the opening animation in milliseconds. Defaults to `300ms`.
|
|
126
190
|
*/
|
|
@@ -129,12 +193,38 @@ export declare interface PopupAnimation {
|
|
|
129
193
|
* The duration of the closing animation in milliseconds. Defaults to `300ms`.
|
|
130
194
|
*/
|
|
131
195
|
closeDuration?: number;
|
|
132
|
-
/**
|
|
133
|
-
* The direction of the animation.
|
|
134
|
-
*/
|
|
135
|
-
direction?: 'left' | 'right' | 'up' | 'down';
|
|
136
196
|
}
|
|
137
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Represents all possible direction values for Popup animations.
|
|
200
|
+
*
|
|
201
|
+
* Includes directions for slide, zoom, push, expand, and fade animations.
|
|
202
|
+
* Useful for type-safe direction assignment in animation settings.
|
|
203
|
+
*
|
|
204
|
+
* Possible values: 'left', 'right', 'up', 'down', 'in', 'out', 'horizontal', 'vertical', 'none'.
|
|
205
|
+
*/
|
|
206
|
+
export declare type PopupAnimationDirection = NonNullable<FadePopupAnimation['direction'] | SlidePopupAnimation['direction'] | ZoomPopupAnimation['direction'] | PushPopupAnimation['direction'] | ExpandPopupAnimation['direction']>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The type representing all possible animation type values.
|
|
210
|
+
*
|
|
211
|
+
* Possible values: 'slide', 'zoom', 'push', 'expand', 'fade'
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* <Popup animation={{ type: 'fade' }} />
|
|
215
|
+
*/
|
|
216
|
+
export declare type PopupAnimationType = (typeof animationTypes)[keyof typeof animationTypes];
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The possible base directions for slide and push animations.
|
|
220
|
+
*
|
|
221
|
+
* Possible values: 'left', 'right', 'up', 'down'.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* <Popup animation={{ direction: 'left' }} />
|
|
225
|
+
*/
|
|
226
|
+
export declare type PopupBaseDirections = 'left' | 'right' | 'up' | 'down';
|
|
227
|
+
|
|
138
228
|
/**
|
|
139
229
|
* Represents the object of the `Close` Popup event.
|
|
140
230
|
*/
|
|
@@ -145,6 +235,16 @@ export declare interface PopupCloseEvent {
|
|
|
145
235
|
target: PopupHandle;
|
|
146
236
|
}
|
|
147
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The possible directions for expand animations.
|
|
240
|
+
*
|
|
241
|
+
* Possible values: 'horizontal', 'vertical'.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* <Popup animation={{ type: 'expand', direction: 'vertical' }} />
|
|
245
|
+
*/
|
|
246
|
+
export declare type PopupExpandDirection = 'horizontal' | 'vertical';
|
|
247
|
+
|
|
148
248
|
/**
|
|
149
249
|
* The KendoReact PopupHandle component.
|
|
150
250
|
*/
|
|
@@ -159,6 +259,16 @@ export declare interface PopupHandle {
|
|
|
159
259
|
props: PopupProps;
|
|
160
260
|
}
|
|
161
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Represents no direction for fade animation.
|
|
264
|
+
*
|
|
265
|
+
* Possible value: 'none'.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* <Popup animation={{ type: 'fade', direction: 'none' }} />
|
|
269
|
+
*/
|
|
270
|
+
export declare type PopupNoDirection = 'none';
|
|
271
|
+
|
|
162
272
|
/**
|
|
163
273
|
* Represents the object of the `Open` Popup event.
|
|
164
274
|
*/
|
|
@@ -427,6 +537,16 @@ declare interface PopupState {
|
|
|
427
537
|
};
|
|
428
538
|
}
|
|
429
539
|
|
|
540
|
+
/**
|
|
541
|
+
* The possible directions for zoom animations.
|
|
542
|
+
*
|
|
543
|
+
* Possible values: 'in', 'out'.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* <Popup animation={{ type: 'zoom', direction: 'in' }} />
|
|
547
|
+
*/
|
|
548
|
+
export declare type PopupZoomDirections = 'in' | 'out';
|
|
549
|
+
|
|
430
550
|
/**
|
|
431
551
|
* Represents the object of the `Position` Popup event.
|
|
432
552
|
*/
|
|
@@ -450,6 +570,44 @@ export declare interface PositionEvent {
|
|
|
450
570
|
*/
|
|
451
571
|
export declare type PositionMode = PositionMode_2;
|
|
452
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Defines the push animation settings for the Popup component.
|
|
575
|
+
*
|
|
576
|
+
* Use this to configure push type and direction
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
* <Popup animation={{ type: 'push', direction: 'down' }} />
|
|
580
|
+
*/
|
|
581
|
+
export declare interface PushPopupAnimation {
|
|
582
|
+
/**
|
|
583
|
+
* The type of the animation. Must be 'push'.
|
|
584
|
+
*/
|
|
585
|
+
type: typeof animationTypes.push;
|
|
586
|
+
/**
|
|
587
|
+
* The direction of the push animation. Possible values: 'left', 'right', 'up', 'down'.
|
|
588
|
+
*/
|
|
589
|
+
direction: PopupBaseDirections;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Defines the slide animation settings for the Popup component.
|
|
594
|
+
*
|
|
595
|
+
* Use this to configure slide type and direction
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* <Popup animation={{ type: 'slide', direction: 'left' }} />
|
|
599
|
+
*/
|
|
600
|
+
export declare interface SlidePopupAnimation {
|
|
601
|
+
/**
|
|
602
|
+
* The type of the animation. Default is 'slide'.
|
|
603
|
+
*/
|
|
604
|
+
type?: typeof animationTypes.slide;
|
|
605
|
+
/**
|
|
606
|
+
* The direction of the slide animation. Possible values: 'left', 'right', 'up', 'down'.
|
|
607
|
+
*/
|
|
608
|
+
direction?: PopupBaseDirections;
|
|
609
|
+
}
|
|
610
|
+
|
|
453
611
|
declare enum Status {
|
|
454
612
|
hiding = "hiding",
|
|
455
613
|
hidden = "hidden",
|
|
@@ -458,4 +616,23 @@ declare enum Status {
|
|
|
458
616
|
reposition = "reposition"
|
|
459
617
|
}
|
|
460
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Defines the zoom animation settings for the Popup component.
|
|
621
|
+
*
|
|
622
|
+
* Use this to configure zoom type and direction
|
|
623
|
+
*
|
|
624
|
+
* @example
|
|
625
|
+
* <Popup animation={{ type: 'zoom', direction: 'in' }} />
|
|
626
|
+
*/
|
|
627
|
+
export declare interface ZoomPopupAnimation {
|
|
628
|
+
/**
|
|
629
|
+
* The type of the animation. Must be 'zoom'.
|
|
630
|
+
*/
|
|
631
|
+
type: typeof animationTypes.zoom;
|
|
632
|
+
/**
|
|
633
|
+
* The direction of the zoom animation. Possible values: 'in', 'out'.
|
|
634
|
+
*/
|
|
635
|
+
direction: PopupZoomDirections;
|
|
636
|
+
}
|
|
637
|
+
|
|
461
638
|
export { }
|
package/index.d.ts
CHANGED
|
@@ -38,6 +38,22 @@ export declare interface Align extends AlignStrategy {
|
|
|
38
38
|
vertical: 'top' | 'center' | 'bottom';
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
/**
|
|
42
|
+
* The available animation types for the Popup component.
|
|
43
|
+
*
|
|
44
|
+
* Possible values: 'slide', 'zoom', 'push', 'expand', 'fade'.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* <Popup animation={{ type: 'slide' }} />
|
|
48
|
+
*/
|
|
49
|
+
declare const animationTypes: {
|
|
50
|
+
readonly slide: "slide";
|
|
51
|
+
readonly zoom: "zoom";
|
|
52
|
+
readonly push: "push";
|
|
53
|
+
readonly expand: "expand";
|
|
54
|
+
readonly fade: "fade";
|
|
55
|
+
};
|
|
56
|
+
|
|
41
57
|
/**
|
|
42
58
|
* Defines the horizontal and vertical collision behavior of the Popup.
|
|
43
59
|
*/
|
|
@@ -62,6 +78,44 @@ export declare interface Collision {
|
|
|
62
78
|
*/
|
|
63
79
|
export declare type CollisionType = CollisionType_2;
|
|
64
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Defines the expand animation settings for the Popup component.
|
|
83
|
+
*
|
|
84
|
+
* Use this to configure expand type and direction
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* <Popup animation={{ type: 'expand', direction: 'vertical' }} />
|
|
88
|
+
*/
|
|
89
|
+
export declare interface ExpandPopupAnimation {
|
|
90
|
+
/**
|
|
91
|
+
* The type of the animation. Must be 'expand'.
|
|
92
|
+
*/
|
|
93
|
+
type: typeof animationTypes.expand;
|
|
94
|
+
/**
|
|
95
|
+
* The direction of the expand animation. Possible values: 'horizontal', 'vertical'.
|
|
96
|
+
*/
|
|
97
|
+
direction: PopupExpandDirection;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Defines the fade animation settings for the Popup component.
|
|
102
|
+
*
|
|
103
|
+
* Use this to configure fade type. Direction is always 'none'.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* <Popup animation={{ type: 'fade' }} />
|
|
107
|
+
*/
|
|
108
|
+
export declare interface FadePopupAnimation {
|
|
109
|
+
/**
|
|
110
|
+
* The type of the animation. Must be 'fade'.
|
|
111
|
+
*/
|
|
112
|
+
type: typeof animationTypes.fade;
|
|
113
|
+
/**
|
|
114
|
+
* @hidden
|
|
115
|
+
*/
|
|
116
|
+
direction?: PopupNoDirection;
|
|
117
|
+
}
|
|
118
|
+
|
|
65
119
|
/**
|
|
66
120
|
* Defines the horizontal and the vertical margin offset of the component.
|
|
67
121
|
*/
|
|
@@ -118,9 +172,19 @@ export declare interface Offset extends OffsetPosition {
|
|
|
118
172
|
export declare const Popup: React_2.ForwardRefExoticComponent<PopupProps & React_2.RefAttributes<PopupHandle | null>>;
|
|
119
173
|
|
|
120
174
|
/**
|
|
121
|
-
* The animation settings for the Popup component
|
|
175
|
+
* The animation settings for the Popup component
|
|
122
176
|
*/
|
|
123
|
-
export declare
|
|
177
|
+
export declare type PopupAnimation = PopupAnimationBase & (FadePopupAnimation | SlidePopupAnimation | ZoomPopupAnimation | PushPopupAnimation | ExpandPopupAnimation);
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Defines the base animation settings for the Popup component.
|
|
181
|
+
*
|
|
182
|
+
* Includes duration properties for opening and closing animations
|
|
183
|
+
*
|
|
184
|
+
* @example
|
|
185
|
+
* <Popup animation={{ openDuration: 500, closeDuration: 200 }} />
|
|
186
|
+
*/
|
|
187
|
+
export declare interface PopupAnimationBase {
|
|
124
188
|
/**
|
|
125
189
|
* The duration of the opening animation in milliseconds. Defaults to `300ms`.
|
|
126
190
|
*/
|
|
@@ -129,12 +193,38 @@ export declare interface PopupAnimation {
|
|
|
129
193
|
* The duration of the closing animation in milliseconds. Defaults to `300ms`.
|
|
130
194
|
*/
|
|
131
195
|
closeDuration?: number;
|
|
132
|
-
/**
|
|
133
|
-
* The direction of the animation.
|
|
134
|
-
*/
|
|
135
|
-
direction?: 'left' | 'right' | 'up' | 'down';
|
|
136
196
|
}
|
|
137
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Represents all possible direction values for Popup animations.
|
|
200
|
+
*
|
|
201
|
+
* Includes directions for slide, zoom, push, expand, and fade animations.
|
|
202
|
+
* Useful for type-safe direction assignment in animation settings.
|
|
203
|
+
*
|
|
204
|
+
* Possible values: 'left', 'right', 'up', 'down', 'in', 'out', 'horizontal', 'vertical', 'none'.
|
|
205
|
+
*/
|
|
206
|
+
export declare type PopupAnimationDirection = NonNullable<FadePopupAnimation['direction'] | SlidePopupAnimation['direction'] | ZoomPopupAnimation['direction'] | PushPopupAnimation['direction'] | ExpandPopupAnimation['direction']>;
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* The type representing all possible animation type values.
|
|
210
|
+
*
|
|
211
|
+
* Possible values: 'slide', 'zoom', 'push', 'expand', 'fade'
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* <Popup animation={{ type: 'fade' }} />
|
|
215
|
+
*/
|
|
216
|
+
export declare type PopupAnimationType = (typeof animationTypes)[keyof typeof animationTypes];
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The possible base directions for slide and push animations.
|
|
220
|
+
*
|
|
221
|
+
* Possible values: 'left', 'right', 'up', 'down'.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* <Popup animation={{ direction: 'left' }} />
|
|
225
|
+
*/
|
|
226
|
+
export declare type PopupBaseDirections = 'left' | 'right' | 'up' | 'down';
|
|
227
|
+
|
|
138
228
|
/**
|
|
139
229
|
* Represents the object of the `Close` Popup event.
|
|
140
230
|
*/
|
|
@@ -145,6 +235,16 @@ export declare interface PopupCloseEvent {
|
|
|
145
235
|
target: PopupHandle;
|
|
146
236
|
}
|
|
147
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The possible directions for expand animations.
|
|
240
|
+
*
|
|
241
|
+
* Possible values: 'horizontal', 'vertical'.
|
|
242
|
+
*
|
|
243
|
+
* @example
|
|
244
|
+
* <Popup animation={{ type: 'expand', direction: 'vertical' }} />
|
|
245
|
+
*/
|
|
246
|
+
export declare type PopupExpandDirection = 'horizontal' | 'vertical';
|
|
247
|
+
|
|
148
248
|
/**
|
|
149
249
|
* The KendoReact PopupHandle component.
|
|
150
250
|
*/
|
|
@@ -159,6 +259,16 @@ export declare interface PopupHandle {
|
|
|
159
259
|
props: PopupProps;
|
|
160
260
|
}
|
|
161
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Represents no direction for fade animation.
|
|
264
|
+
*
|
|
265
|
+
* Possible value: 'none'.
|
|
266
|
+
*
|
|
267
|
+
* @example
|
|
268
|
+
* <Popup animation={{ type: 'fade', direction: 'none' }} />
|
|
269
|
+
*/
|
|
270
|
+
export declare type PopupNoDirection = 'none';
|
|
271
|
+
|
|
162
272
|
/**
|
|
163
273
|
* Represents the object of the `Open` Popup event.
|
|
164
274
|
*/
|
|
@@ -427,6 +537,16 @@ declare interface PopupState {
|
|
|
427
537
|
};
|
|
428
538
|
}
|
|
429
539
|
|
|
540
|
+
/**
|
|
541
|
+
* The possible directions for zoom animations.
|
|
542
|
+
*
|
|
543
|
+
* Possible values: 'in', 'out'.
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* <Popup animation={{ type: 'zoom', direction: 'in' }} />
|
|
547
|
+
*/
|
|
548
|
+
export declare type PopupZoomDirections = 'in' | 'out';
|
|
549
|
+
|
|
430
550
|
/**
|
|
431
551
|
* Represents the object of the `Position` Popup event.
|
|
432
552
|
*/
|
|
@@ -450,6 +570,44 @@ export declare interface PositionEvent {
|
|
|
450
570
|
*/
|
|
451
571
|
export declare type PositionMode = PositionMode_2;
|
|
452
572
|
|
|
573
|
+
/**
|
|
574
|
+
* Defines the push animation settings for the Popup component.
|
|
575
|
+
*
|
|
576
|
+
* Use this to configure push type and direction
|
|
577
|
+
*
|
|
578
|
+
* @example
|
|
579
|
+
* <Popup animation={{ type: 'push', direction: 'down' }} />
|
|
580
|
+
*/
|
|
581
|
+
export declare interface PushPopupAnimation {
|
|
582
|
+
/**
|
|
583
|
+
* The type of the animation. Must be 'push'.
|
|
584
|
+
*/
|
|
585
|
+
type: typeof animationTypes.push;
|
|
586
|
+
/**
|
|
587
|
+
* The direction of the push animation. Possible values: 'left', 'right', 'up', 'down'.
|
|
588
|
+
*/
|
|
589
|
+
direction: PopupBaseDirections;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
/**
|
|
593
|
+
* Defines the slide animation settings for the Popup component.
|
|
594
|
+
*
|
|
595
|
+
* Use this to configure slide type and direction
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* <Popup animation={{ type: 'slide', direction: 'left' }} />
|
|
599
|
+
*/
|
|
600
|
+
export declare interface SlidePopupAnimation {
|
|
601
|
+
/**
|
|
602
|
+
* The type of the animation. Default is 'slide'.
|
|
603
|
+
*/
|
|
604
|
+
type?: typeof animationTypes.slide;
|
|
605
|
+
/**
|
|
606
|
+
* The direction of the slide animation. Possible values: 'left', 'right', 'up', 'down'.
|
|
607
|
+
*/
|
|
608
|
+
direction?: PopupBaseDirections;
|
|
609
|
+
}
|
|
610
|
+
|
|
453
611
|
declare enum Status {
|
|
454
612
|
hiding = "hiding",
|
|
455
613
|
hidden = "hidden",
|
|
@@ -458,4 +616,23 @@ declare enum Status {
|
|
|
458
616
|
reposition = "reposition"
|
|
459
617
|
}
|
|
460
618
|
|
|
619
|
+
/**
|
|
620
|
+
* Defines the zoom animation settings for the Popup component.
|
|
621
|
+
*
|
|
622
|
+
* Use this to configure zoom type and direction
|
|
623
|
+
*
|
|
624
|
+
* @example
|
|
625
|
+
* <Popup animation={{ type: 'zoom', direction: 'in' }} />
|
|
626
|
+
*/
|
|
627
|
+
export declare interface ZoomPopupAnimation {
|
|
628
|
+
/**
|
|
629
|
+
* The type of the animation. Must be 'zoom'.
|
|
630
|
+
*/
|
|
631
|
+
type: typeof animationTypes.zoom;
|
|
632
|
+
/**
|
|
633
|
+
* The direction of the zoom animation. Possible values: 'in', 'out'.
|
|
634
|
+
*/
|
|
635
|
+
direction: PopupZoomDirections;
|
|
636
|
+
}
|
|
637
|
+
|
|
461
638
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-popup",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.0-develop.1",
|
|
4
4
|
"description": "React Popup positions a piece of content next to a specific anchor component. KendoReact Popup package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@progress/kendo-licensing": "^1.7.0",
|
|
29
29
|
"@progress/kendo-popup-common": "^1.9.0",
|
|
30
|
-
"@progress/kendo-react-common": "12.0
|
|
30
|
+
"@progress/kendo-react-common": "12.1.0-develop.1",
|
|
31
31
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc",
|
|
32
32
|
"react-dom": "^16.8.2 || ^17.0.0 || ^18.0.0 || ^19.0.0 || ^19.0.0-rc"
|
|
33
33
|
},
|