@progress/kendo-react-animation 7.2.4-develop.3 → 7.3.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/Animation.js +8 -0
- package/Animation.mjs +79 -0
- package/AnimationChild.js +8 -0
- package/AnimationChild.mjs +152 -0
- package/Expand.js +8 -0
- package/Expand.mjs +52 -0
- package/Fade.js +8 -0
- package/Fade.mjs +46 -0
- package/Push.js +8 -0
- package/Push.mjs +62 -0
- package/Reveal.js +8 -0
- package/Reveal.mjs +117 -0
- package/Slide.js +8 -0
- package/Slide.mjs +54 -0
- package/Zoom.js +8 -0
- package/Zoom.mjs +60 -0
- package/dist/cdn/js/kendo-react-animation.js +8 -5
- package/hooks/useAnimation.js +8 -0
- package/hooks/useAnimation.mjs +36 -0
- package/index.d.mts +756 -5
- package/index.d.ts +756 -14
- package/index.js +8 -5
- package/index.mjs +25 -668
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +2 -2
- package/util.js +8 -0
- package/util.mjs +126 -0
- package/Animation.d.ts +0 -86
- package/AnimationChild.d.ts +0 -93
- package/AnimationInterface.d.ts +0 -92
- package/Expand.d.ts +0 -79
- package/Fade.d.ts +0 -65
- package/Push.d.ts +0 -87
- package/Reveal.d.ts +0 -99
- package/Slide.d.ts +0 -81
- package/Zoom.d.ts +0 -85
- package/hooks/useAnimation.d.ts +0 -16
- package/package-metadata.d.ts +0 -9
- package/util.d.ts +0 -15
package/index.mjs
CHANGED
|
@@ -1,671 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
5
8
|
"use client";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}, K = (o) => {
|
|
16
|
-
if (!o || !o.ownerDocument.defaultView)
|
|
17
|
-
return 0;
|
|
18
|
-
const t = o.ownerDocument.defaultView.getComputedStyle(o), n = parseFloat(t.marginLeft), s = parseFloat(t.marginRight);
|
|
19
|
-
return o.offsetWidth + n + s;
|
|
20
|
-
}, X = {
|
|
21
|
-
"animation-container": "k-animation-container",
|
|
22
|
-
"animation-container-shown": "k-animation-container-shown",
|
|
23
|
-
"animation-container-relative": "k-animation-container-relative",
|
|
24
|
-
"animation-container-fixed": "k-animation-container-fixed",
|
|
25
|
-
"push-right-enter": "k-push-right-enter",
|
|
26
|
-
"push-right-appear": "k-push-right-appear",
|
|
27
|
-
"push-right-enter-active": "k-push-right-enter-active",
|
|
28
|
-
"push-right-appear-active": "k-push-right-appear-active",
|
|
29
|
-
"push-right-exit": "k-push-right-exit",
|
|
30
|
-
"push-right-exit-active": "k-push-right-exit-active",
|
|
31
|
-
"push-left-enter": "k-push-left-enter",
|
|
32
|
-
"push-left-appear": "k-push-left-appear",
|
|
33
|
-
"push-left-enter-active": "k-push-left-enter-active",
|
|
34
|
-
"push-left-appear-active": "k-push-left-appear-active",
|
|
35
|
-
"push-left-exit": "k-push-left-exit",
|
|
36
|
-
"push-left-exit-active": "k-push-left-exit-active",
|
|
37
|
-
"push-down-enter": "k-push-down-enter",
|
|
38
|
-
"push-down-appear": "k-push-down-appear",
|
|
39
|
-
"push-down-enter-active": "k-push-down-enter-active",
|
|
40
|
-
"push-down-appear-active": "k-push-down-appear-active",
|
|
41
|
-
"push-down-exit": "k-push-down-exit",
|
|
42
|
-
"push-down-exit-active": "k-push-down-exit-active",
|
|
43
|
-
"push-up-enter": "k-push-up-enter",
|
|
44
|
-
"push-up-appear": "k-push-up-appear",
|
|
45
|
-
"push-up-enter-active": "k-push-up-enter-active",
|
|
46
|
-
"push-up-appear-active": "k-push-up-appear-active",
|
|
47
|
-
"push-up-exit": "k-push-up-exit",
|
|
48
|
-
"push-up-exit-active": "k-push-up-exit-active",
|
|
49
|
-
expand: "k-expand",
|
|
50
|
-
"expand-vertical-enter": "k-expand-vertical-enter",
|
|
51
|
-
"expand-vertical-appear": "k-expand-vertical-appear",
|
|
52
|
-
"expand-vertical-enter-active": "k-expand-vertical-enter-active",
|
|
53
|
-
"expand-vertical-appear-active": "k-expand-vertical-appear-active",
|
|
54
|
-
"expand-vertical-exit": "k-expand-vertical-exit",
|
|
55
|
-
"expand-vertical-exit-active": "k-expand-vertical-exit-active",
|
|
56
|
-
"expand-horizontal-enter": "k-expand-horizontal-enter",
|
|
57
|
-
"expand-horizontal-appear": "k-expand-horizontal-appear",
|
|
58
|
-
"expand-horizontal-enter-active": "k-expand-horizontal-enter-active",
|
|
59
|
-
"expand-horizontal-appear-active": "k-expand-horizontal-appear-active",
|
|
60
|
-
"expand-horizontal-exit": "k-expand-horizontal-exit",
|
|
61
|
-
"expand-horizontal-exit-active": "k-expand-horizontal-exit-active",
|
|
62
|
-
"child-animation-container": "k-child-animation-container",
|
|
63
|
-
"fade-enter": "k-fade-enter",
|
|
64
|
-
"fade-appear": "k-fade-appear",
|
|
65
|
-
"fade-enter-active": "k-fade-enter-active",
|
|
66
|
-
"fade-appear-active": "k-fade-appear-active",
|
|
67
|
-
"fade-exit": "k-fade-exit",
|
|
68
|
-
"fade-exit-active": "k-fade-exit-active",
|
|
69
|
-
"zoom-in-enter": "k-zoom-in-enter",
|
|
70
|
-
"zoom-in-appear": "k-zoom-in-appear",
|
|
71
|
-
"zoom-in-enter-active": "k-zoom-in-enter-active",
|
|
72
|
-
"zoom-in-appear-active": "k-zoom-in-appear-active",
|
|
73
|
-
"zoom-in-exit": "k-zoom-in-exit",
|
|
74
|
-
"zoom-in-exit-active": "k-zoom-in-exit-active",
|
|
75
|
-
"zoom-out-enter": "k-zoom-out-enter",
|
|
76
|
-
"zoom-out-appear": "k-zoom-out-appear",
|
|
77
|
-
"zoom-out-enter-active": "k-zoom-out-enter-active",
|
|
78
|
-
"zoom-out-appear-active": "k-zoom-out-appear-active",
|
|
79
|
-
"zoom-out-exit": "k-zoom-out-exit",
|
|
80
|
-
"zoom-out-exit-active": "k-zoom-out-exit-active",
|
|
81
|
-
"slide-in-appear": "k-slide-in-appear",
|
|
82
|
-
centered: "k-centered",
|
|
83
|
-
"slide-in-appear-active": "k-slide-in-appear-active",
|
|
84
|
-
"slide-down-enter": "k-slide-down-enter",
|
|
85
|
-
"slide-down-appear": "k-slide-down-appear",
|
|
86
|
-
"slide-down-enter-active": "k-slide-down-enter-active",
|
|
87
|
-
"slide-down-appear-active": "k-slide-down-appear-active",
|
|
88
|
-
"slide-down-exit": "k-slide-down-exit",
|
|
89
|
-
"slide-down-exit-active": "k-slide-down-exit-active",
|
|
90
|
-
"slide-up-enter": "k-slide-up-enter",
|
|
91
|
-
"slide-up-appear": "k-slide-up-appear",
|
|
92
|
-
"slide-up-enter-active": "k-slide-up-enter-active",
|
|
93
|
-
"slide-up-appear-active": "k-slide-up-appear-active",
|
|
94
|
-
"slide-up-exit": "k-slide-up-exit",
|
|
95
|
-
"slide-up-exit-active": "k-slide-up-exit-active",
|
|
96
|
-
"slide-right-enter": "k-slide-right-enter",
|
|
97
|
-
"slide-right-appear": "k-slide-right-appear",
|
|
98
|
-
"slide-right-enter-active": "k-slide-right-enter-active",
|
|
99
|
-
"slide-right-appear-active": "k-slide-right-appear-active",
|
|
100
|
-
"slide-right-exit": "k-slide-right-exit",
|
|
101
|
-
"slide-right-exit-active": "k-slide-right-exit-active",
|
|
102
|
-
"slide-left-enter": "k-slide-left-enter",
|
|
103
|
-
"slide-left-appear": "k-slide-left-appear",
|
|
104
|
-
"slide-left-enter-active": "k-slide-left-enter-active",
|
|
105
|
-
"slide-left-appear-active": "k-slide-left-appear-active",
|
|
106
|
-
"slide-left-exit": "k-slide-left-exit",
|
|
107
|
-
"slide-left-exit-active": "k-slide-left-exit-active",
|
|
108
|
-
"reveal-vertical-enter": "k-reveal-vertical-enter",
|
|
109
|
-
"reveal-vertical-appear": "k-reveal-vertical-appear",
|
|
110
|
-
"reveal-vertical-enter-active": "k-reveal-vertical-enter-active",
|
|
111
|
-
"reveal-vertical-appear-active": "k-reveal-vertical-appear-active",
|
|
112
|
-
"reveal-vertical-exit": "k-reveal-vertical-exit",
|
|
113
|
-
"reveal-vertical-exit-active": "k-reveal-vertical-exit-active",
|
|
114
|
-
"reveal-horizontal-enter": "k-reveal-horizontal-enter",
|
|
115
|
-
"reveal-horizontal-appear": "k-reveal-horizontal-appear",
|
|
116
|
-
"reveal-horizontal-enter-active": "k-reveal-horizontal-enter-active",
|
|
117
|
-
"reveal-horizontal-appear-active": "k-reveal-horizontal-appear-active",
|
|
118
|
-
"reveal-horizontal-exit": "k-reveal-horizontal-exit",
|
|
119
|
-
"reveal-horizontal-exit-active": "k-reveal-horizontal-exit-active"
|
|
120
|
-
}, Y = {
|
|
121
|
-
outerHeight: G,
|
|
122
|
-
outerWidth: K,
|
|
123
|
-
styles: X
|
|
124
|
-
}, g = Y, k = g.styles;
|
|
125
|
-
class E extends a.Component {
|
|
126
|
-
constructor() {
|
|
127
|
-
super(...arguments), this.elementRef = a.createRef();
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* The element that is being animated.
|
|
131
|
-
*/
|
|
132
|
-
get element() {
|
|
133
|
-
return this.elementRef.current;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* @hidden
|
|
137
|
-
*/
|
|
138
|
-
render() {
|
|
139
|
-
const {
|
|
140
|
-
children: i,
|
|
141
|
-
style: t,
|
|
142
|
-
appear: n,
|
|
143
|
-
enter: s,
|
|
144
|
-
exit: c,
|
|
145
|
-
transitionName: r,
|
|
146
|
-
transitionEnterDuration: l,
|
|
147
|
-
transitionExitDuration: d,
|
|
148
|
-
className: h,
|
|
149
|
-
onEnter: u,
|
|
150
|
-
onEntering: p,
|
|
151
|
-
onEntered: f,
|
|
152
|
-
onExit: m,
|
|
153
|
-
onExiting: y,
|
|
154
|
-
onExited: w,
|
|
155
|
-
onAfterExited: z,
|
|
156
|
-
mountOnEnter: b,
|
|
157
|
-
unmountOnExit: F,
|
|
158
|
-
animationEnteringStyle: A,
|
|
159
|
-
animationEnteredStyle: P,
|
|
160
|
-
animationExitingStyle: W,
|
|
161
|
-
animationExitedStyle: H,
|
|
162
|
-
...I
|
|
163
|
-
} = this.props, q = C(
|
|
164
|
-
h,
|
|
165
|
-
k["child-animation-container"]
|
|
166
|
-
), L = {
|
|
167
|
-
transitionDelay: "0ms",
|
|
168
|
-
...t
|
|
169
|
-
}, M = {
|
|
170
|
-
entering: { transitionDuration: `${l}ms`, ...A },
|
|
171
|
-
entered: { ...P },
|
|
172
|
-
exiting: { transitionDuration: `${d}ms`, ...W },
|
|
173
|
-
exited: { ...H }
|
|
174
|
-
}, U = {
|
|
175
|
-
in: this.props.in,
|
|
176
|
-
appear: n,
|
|
177
|
-
enter: s,
|
|
178
|
-
exit: c,
|
|
179
|
-
mountOnEnter: b,
|
|
180
|
-
unmountOnExit: F,
|
|
181
|
-
timeout: {
|
|
182
|
-
enter: l,
|
|
183
|
-
exit: d
|
|
184
|
-
},
|
|
185
|
-
onEnter: () => {
|
|
186
|
-
u && u.call(void 0, { animatedElement: this.element, target: this });
|
|
187
|
-
},
|
|
188
|
-
onEntering: () => {
|
|
189
|
-
p && p.call(void 0, { animatedElement: this.element, target: this });
|
|
190
|
-
},
|
|
191
|
-
onEntered: () => {
|
|
192
|
-
f && f.call(void 0, { animatedElement: this.element, target: this });
|
|
193
|
-
},
|
|
194
|
-
onExit: () => {
|
|
195
|
-
m && m.call(void 0, { animatedElement: this.element, target: this });
|
|
196
|
-
},
|
|
197
|
-
onExiting: () => {
|
|
198
|
-
y && y.call(void 0, { animatedElement: this.element, target: this });
|
|
199
|
-
},
|
|
200
|
-
onExited: () => {
|
|
201
|
-
z && z.call(void 0, { animatedElement: this.element, target: this }), w && w.call(void 0, { animatedElement: this.element, target: this });
|
|
202
|
-
},
|
|
203
|
-
classNames: {
|
|
204
|
-
appear: k[`${r}-appear`] || `${r}-appear`,
|
|
205
|
-
appearActive: k[`${r}-appear-active`] || `${r}-appear-active`,
|
|
206
|
-
enter: k[`${r}-enter`] || `${r}-enter`,
|
|
207
|
-
enterActive: k[`${r}-enter-active`] || `${r}-enter-active`,
|
|
208
|
-
exit: k[`${r}-exit`] || `${r}-exit`,
|
|
209
|
-
exitActive: k[`${r}-exit-active`] || `${r}-exit-active`
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
return /* @__PURE__ */ a.createElement(_, { ...U, ...I, nodeRef: this.elementRef }, (j) => /* @__PURE__ */ a.createElement(
|
|
213
|
-
"div",
|
|
214
|
-
{
|
|
215
|
-
style: {
|
|
216
|
-
...L,
|
|
217
|
-
...M[j]
|
|
218
|
-
},
|
|
219
|
-
className: q,
|
|
220
|
-
ref: this.elementRef
|
|
221
|
-
},
|
|
222
|
-
i
|
|
223
|
-
));
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
E.propTypes = {
|
|
227
|
-
in: e.bool,
|
|
228
|
-
children: e.oneOfType([
|
|
229
|
-
e.arrayOf(e.node),
|
|
230
|
-
e.node
|
|
231
|
-
]),
|
|
232
|
-
transitionName: e.string.isRequired,
|
|
233
|
-
className: e.string,
|
|
234
|
-
appear: e.bool,
|
|
235
|
-
enter: e.bool,
|
|
236
|
-
exit: e.bool,
|
|
237
|
-
transitionEnterDuration: e.number.isRequired,
|
|
238
|
-
transitionExitDuration: e.number.isRequired,
|
|
239
|
-
mountOnEnter: e.bool,
|
|
240
|
-
unmountOnExit: e.bool,
|
|
241
|
-
animationEnteringStyle: e.object,
|
|
242
|
-
animationEnteredStyle: e.object,
|
|
243
|
-
animationExitingStyle: e.object,
|
|
244
|
-
animationExitedStyle: e.object
|
|
245
|
-
};
|
|
246
|
-
E.defaultProps = {
|
|
247
|
-
mountOnEnter: !0,
|
|
248
|
-
unmountOnExit: !1,
|
|
249
|
-
onEnter: v,
|
|
250
|
-
onEntering: v,
|
|
251
|
-
onEntered: v,
|
|
252
|
-
onExit: v,
|
|
253
|
-
onExiting: v,
|
|
254
|
-
onExited: v,
|
|
255
|
-
onAfterExited: v,
|
|
256
|
-
animationEnteringStyle: {},
|
|
257
|
-
animationEnteredStyle: {},
|
|
258
|
-
animationExitingStyle: {},
|
|
259
|
-
animationExitedStyle: {}
|
|
260
|
-
};
|
|
261
|
-
const Z = {
|
|
262
|
-
name: "@progress/kendo-react-animation",
|
|
263
|
-
productName: "KendoReact",
|
|
264
|
-
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
265
|
-
publishDate: 1709631738,
|
|
266
|
-
version: "",
|
|
267
|
-
licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/components/my-license/"
|
|
268
|
-
}, N = g.styles;
|
|
269
|
-
class x extends a.Component {
|
|
270
|
-
constructor(i) {
|
|
271
|
-
super(i), V(Z);
|
|
272
|
-
}
|
|
273
|
-
/**
|
|
274
|
-
* @hidden
|
|
275
|
-
*/
|
|
276
|
-
render() {
|
|
277
|
-
const {
|
|
278
|
-
id: i,
|
|
279
|
-
style: t,
|
|
280
|
-
children: n,
|
|
281
|
-
component: s,
|
|
282
|
-
className: c,
|
|
283
|
-
childFactory: r,
|
|
284
|
-
stackChildren: l,
|
|
285
|
-
componentChildStyle: d,
|
|
286
|
-
componentChildClassName: h,
|
|
287
|
-
...u
|
|
288
|
-
} = this.props, p = {
|
|
289
|
-
id: i,
|
|
290
|
-
style: t,
|
|
291
|
-
component: s,
|
|
292
|
-
childFactory: r,
|
|
293
|
-
className: C(
|
|
294
|
-
N["animation-container"],
|
|
295
|
-
N["animation-container-relative"],
|
|
296
|
-
c
|
|
297
|
-
)
|
|
298
|
-
}, f = a.Children.map(n || null, (m) => /* @__PURE__ */ a.createElement(
|
|
299
|
-
E,
|
|
300
|
-
{
|
|
301
|
-
...u,
|
|
302
|
-
style: d,
|
|
303
|
-
className: h
|
|
304
|
-
},
|
|
305
|
-
m
|
|
306
|
-
));
|
|
307
|
-
return /* @__PURE__ */ a.createElement(B, { ...p }, f);
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
x.propTypes = {
|
|
311
|
-
children: e.oneOfType([
|
|
312
|
-
e.arrayOf(e.node),
|
|
313
|
-
e.node
|
|
314
|
-
]),
|
|
315
|
-
childFactory: e.any,
|
|
316
|
-
className: e.string,
|
|
317
|
-
component: e.string,
|
|
318
|
-
id: e.string,
|
|
319
|
-
style: e.any,
|
|
320
|
-
transitionName: e.string.isRequired,
|
|
321
|
-
appear: e.bool.isRequired,
|
|
322
|
-
enter: e.bool.isRequired,
|
|
323
|
-
exit: e.bool.isRequired,
|
|
324
|
-
transitionEnterDuration: e.number.isRequired,
|
|
325
|
-
transitionExitDuration: e.number.isRequired
|
|
326
|
-
};
|
|
327
|
-
x.defaultProps = {
|
|
328
|
-
component: "div"
|
|
329
|
-
};
|
|
330
|
-
class D extends a.Component {
|
|
331
|
-
/**
|
|
332
|
-
* @hidden
|
|
333
|
-
*/
|
|
334
|
-
render() {
|
|
335
|
-
const {
|
|
336
|
-
children: i,
|
|
337
|
-
...t
|
|
338
|
-
} = this.props, n = {
|
|
339
|
-
transitionName: "fade"
|
|
340
|
-
};
|
|
341
|
-
return /* @__PURE__ */ a.createElement(x, { ...n, ...t }, i);
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
D.propTypes = {
|
|
345
|
-
children: e.oneOfType([
|
|
346
|
-
e.arrayOf(e.node),
|
|
347
|
-
e.node
|
|
348
|
-
]),
|
|
349
|
-
childFactory: e.any,
|
|
350
|
-
className: e.string,
|
|
351
|
-
component: e.string,
|
|
352
|
-
id: e.string,
|
|
353
|
-
style: e.any
|
|
354
|
-
};
|
|
355
|
-
D.defaultProps = {
|
|
356
|
-
appear: !1,
|
|
357
|
-
enter: !0,
|
|
358
|
-
exit: !1,
|
|
359
|
-
transitionEnterDuration: 500,
|
|
360
|
-
transitionExitDuration: 500
|
|
361
|
-
};
|
|
362
|
-
class O extends a.Component {
|
|
363
|
-
/**
|
|
364
|
-
* @hidden
|
|
365
|
-
*/
|
|
366
|
-
render() {
|
|
367
|
-
const {
|
|
368
|
-
direction: i,
|
|
369
|
-
children: t,
|
|
370
|
-
...n
|
|
371
|
-
} = this.props, s = {
|
|
372
|
-
transitionName: `expand-${i}`
|
|
373
|
-
};
|
|
374
|
-
return /* @__PURE__ */ a.createElement(x, { ...s, ...n }, t);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
O.propTypes = {
|
|
378
|
-
children: e.oneOfType([
|
|
379
|
-
e.arrayOf(e.node),
|
|
380
|
-
e.node
|
|
381
|
-
]),
|
|
382
|
-
childFactory: e.any,
|
|
383
|
-
className: e.string,
|
|
384
|
-
direction: e.oneOf([
|
|
385
|
-
"horizontal",
|
|
386
|
-
"vertical"
|
|
387
|
-
]),
|
|
388
|
-
component: e.string,
|
|
389
|
-
id: e.string,
|
|
390
|
-
style: e.any
|
|
391
|
-
};
|
|
392
|
-
O.defaultProps = {
|
|
393
|
-
appear: !1,
|
|
394
|
-
enter: !0,
|
|
395
|
-
exit: !0,
|
|
396
|
-
transitionEnterDuration: 300,
|
|
397
|
-
transitionExitDuration: 300,
|
|
398
|
-
direction: "vertical"
|
|
399
|
-
};
|
|
400
|
-
const J = { position: "absolute", top: "0", left: "0" };
|
|
401
|
-
class S extends a.Component {
|
|
402
|
-
/**
|
|
403
|
-
* @hidden
|
|
404
|
-
*/
|
|
405
|
-
render() {
|
|
406
|
-
const {
|
|
407
|
-
children: i,
|
|
408
|
-
direction: t,
|
|
409
|
-
...n
|
|
410
|
-
} = this.props;
|
|
411
|
-
return /* @__PURE__ */ a.createElement(
|
|
412
|
-
x,
|
|
413
|
-
{
|
|
414
|
-
...n,
|
|
415
|
-
transitionName: `push-${t}`,
|
|
416
|
-
animationExitingStyle: this.props.stackChildren ? J : void 0
|
|
417
|
-
},
|
|
418
|
-
i
|
|
419
|
-
);
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
S.propTypes = {
|
|
423
|
-
children: e.oneOfType([
|
|
424
|
-
e.arrayOf(e.node),
|
|
425
|
-
e.node
|
|
426
|
-
]),
|
|
427
|
-
childFactory: e.any,
|
|
428
|
-
className: e.string,
|
|
429
|
-
direction: e.oneOf([
|
|
430
|
-
"up",
|
|
431
|
-
"down",
|
|
432
|
-
"left",
|
|
433
|
-
"right"
|
|
434
|
-
]),
|
|
435
|
-
component: e.string,
|
|
436
|
-
id: e.string,
|
|
437
|
-
style: e.any,
|
|
438
|
-
stackChildren: e.bool
|
|
439
|
-
};
|
|
440
|
-
S.defaultProps = {
|
|
441
|
-
appear: !1,
|
|
442
|
-
enter: !0,
|
|
443
|
-
exit: !0,
|
|
444
|
-
transitionEnterDuration: 300,
|
|
445
|
-
transitionExitDuration: 300,
|
|
446
|
-
direction: "right",
|
|
447
|
-
stackChildren: !1
|
|
448
|
-
};
|
|
449
|
-
class T extends a.Component {
|
|
450
|
-
/**
|
|
451
|
-
* @hidden
|
|
452
|
-
*/
|
|
453
|
-
render() {
|
|
454
|
-
const {
|
|
455
|
-
direction: i,
|
|
456
|
-
children: t,
|
|
457
|
-
...n
|
|
458
|
-
} = this.props, s = {
|
|
459
|
-
transitionName: `slide-${i}`
|
|
460
|
-
};
|
|
461
|
-
return /* @__PURE__ */ a.createElement(x, { ...s, ...n }, t);
|
|
462
|
-
}
|
|
463
|
-
}
|
|
464
|
-
T.propTypes = {
|
|
465
|
-
children: e.oneOfType([
|
|
466
|
-
e.arrayOf(e.node),
|
|
467
|
-
e.node
|
|
468
|
-
]),
|
|
469
|
-
childFactory: e.any,
|
|
470
|
-
className: e.string,
|
|
471
|
-
direction: e.oneOf([
|
|
472
|
-
"up",
|
|
473
|
-
"down",
|
|
474
|
-
"left",
|
|
475
|
-
"right"
|
|
476
|
-
]),
|
|
477
|
-
component: e.string,
|
|
478
|
-
id: e.string,
|
|
479
|
-
style: e.any
|
|
480
|
-
};
|
|
481
|
-
T.defaultProps = {
|
|
482
|
-
appear: !1,
|
|
483
|
-
enter: !0,
|
|
484
|
-
exit: !0,
|
|
485
|
-
transitionEnterDuration: 300,
|
|
486
|
-
transitionExitDuration: 300,
|
|
487
|
-
direction: "down"
|
|
488
|
-
};
|
|
489
|
-
const Q = { position: "absolute", top: "0", left: "0" };
|
|
490
|
-
class R extends a.Component {
|
|
491
|
-
/**
|
|
492
|
-
* @hidden
|
|
493
|
-
*/
|
|
494
|
-
render() {
|
|
495
|
-
const {
|
|
496
|
-
children: i,
|
|
497
|
-
direction: t,
|
|
498
|
-
...n
|
|
499
|
-
} = this.props;
|
|
500
|
-
return /* @__PURE__ */ a.createElement(
|
|
501
|
-
x,
|
|
502
|
-
{
|
|
503
|
-
...n,
|
|
504
|
-
transitionName: `zoom-${t}`,
|
|
505
|
-
animationExitingStyle: this.props.stackChildren ? Q : void 0
|
|
506
|
-
},
|
|
507
|
-
i
|
|
508
|
-
);
|
|
509
|
-
}
|
|
510
|
-
}
|
|
511
|
-
R.propTypes = {
|
|
512
|
-
children: e.oneOfType([
|
|
513
|
-
e.arrayOf(e.node),
|
|
514
|
-
e.node
|
|
515
|
-
]),
|
|
516
|
-
childFactory: e.any,
|
|
517
|
-
className: e.string,
|
|
518
|
-
direction: e.oneOf([
|
|
519
|
-
"in",
|
|
520
|
-
"out"
|
|
521
|
-
]),
|
|
522
|
-
component: e.string,
|
|
523
|
-
id: e.string,
|
|
524
|
-
style: e.any,
|
|
525
|
-
stackChildren: e.bool
|
|
526
|
-
};
|
|
527
|
-
R.defaultProps = {
|
|
528
|
-
appear: !1,
|
|
529
|
-
enter: !0,
|
|
530
|
-
exit: !0,
|
|
531
|
-
transitionEnterDuration: 300,
|
|
532
|
-
transitionExitDuration: 300,
|
|
533
|
-
direction: "out",
|
|
534
|
-
stackChildren: !1
|
|
535
|
-
};
|
|
536
|
-
class $ extends a.Component {
|
|
537
|
-
constructor() {
|
|
538
|
-
super(...arguments), this.state = {
|
|
539
|
-
maxHeight: void 0,
|
|
540
|
-
maxWidth: void 0
|
|
541
|
-
}, this.componentWillEnter = (i) => {
|
|
542
|
-
const { onEnter: t, onBeforeEnter: n } = this.props;
|
|
543
|
-
n && n.call(void 0, i), this.updateContainerDimensions(i.animatedElement, () => {
|
|
544
|
-
t && t.call(void 0, i);
|
|
545
|
-
});
|
|
546
|
-
}, this.componentIsEntering = (i) => {
|
|
547
|
-
const { onEntering: t } = this.props;
|
|
548
|
-
this.updateContainerDimensions(i.animatedElement, () => {
|
|
549
|
-
t && t.call(void 0, i);
|
|
550
|
-
});
|
|
551
|
-
}, this.componentWillExit = (i) => {
|
|
552
|
-
const { onExit: t } = this.props;
|
|
553
|
-
this.updateContainerDimensions(i.animatedElement, () => {
|
|
554
|
-
t && t.call(void 0, i);
|
|
555
|
-
});
|
|
556
|
-
}, this.updateContainerDimensions = (i, t = v) => {
|
|
557
|
-
const n = i.firstChild;
|
|
558
|
-
if (n) {
|
|
559
|
-
const s = g.outerHeight(n), c = g.outerWidth(n);
|
|
560
|
-
this.setState(
|
|
561
|
-
{
|
|
562
|
-
maxHeight: s,
|
|
563
|
-
maxWidth: c
|
|
564
|
-
},
|
|
565
|
-
t
|
|
566
|
-
);
|
|
567
|
-
}
|
|
568
|
-
};
|
|
569
|
-
}
|
|
570
|
-
/**
|
|
571
|
-
* @hidden
|
|
572
|
-
*/
|
|
573
|
-
render() {
|
|
574
|
-
const {
|
|
575
|
-
direction: i,
|
|
576
|
-
children: t,
|
|
577
|
-
childFactory: n,
|
|
578
|
-
...s
|
|
579
|
-
} = this.props, {
|
|
580
|
-
maxHeight: c,
|
|
581
|
-
maxWidth: r
|
|
582
|
-
} = this.state;
|
|
583
|
-
let l;
|
|
584
|
-
i === "vertical" ? l = { maxHeight: c ? `${c}px` : "" } : l = { maxWidth: r ? `${r}px` : "" };
|
|
585
|
-
const d = {
|
|
586
|
-
maxHeight: l.maxHeight,
|
|
587
|
-
maxWidth: l.maxWidth
|
|
588
|
-
}, h = (u) => {
|
|
589
|
-
let p = n ? n(u) : u;
|
|
590
|
-
return p.props.in ? p : a.cloneElement(p, {
|
|
591
|
-
...p.props,
|
|
592
|
-
style: {
|
|
593
|
-
...p.props.style,
|
|
594
|
-
maxHeight: l.maxHeight,
|
|
595
|
-
maxWidth: l.maxWidth
|
|
596
|
-
}
|
|
597
|
-
});
|
|
598
|
-
};
|
|
599
|
-
return /* @__PURE__ */ a.createElement(
|
|
600
|
-
x,
|
|
601
|
-
{
|
|
602
|
-
...s,
|
|
603
|
-
childFactory: h,
|
|
604
|
-
onEnter: this.componentWillEnter,
|
|
605
|
-
onEntering: this.componentIsEntering,
|
|
606
|
-
onExit: this.componentWillExit,
|
|
607
|
-
animationEnteringStyle: d,
|
|
608
|
-
transitionName: `reveal-${i}`
|
|
609
|
-
},
|
|
610
|
-
t
|
|
611
|
-
);
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
$.propTypes = {
|
|
615
|
-
children: e.oneOfType([
|
|
616
|
-
e.arrayOf(e.node),
|
|
617
|
-
e.node
|
|
618
|
-
]),
|
|
619
|
-
childFactory: e.any,
|
|
620
|
-
className: e.string,
|
|
621
|
-
direction: e.oneOf([
|
|
622
|
-
"horizontal",
|
|
623
|
-
"vertical"
|
|
624
|
-
]),
|
|
625
|
-
component: e.string,
|
|
626
|
-
id: e.string,
|
|
627
|
-
style: e.any
|
|
628
|
-
};
|
|
629
|
-
$.defaultProps = {
|
|
630
|
-
appear: !1,
|
|
631
|
-
enter: !0,
|
|
632
|
-
exit: !0,
|
|
633
|
-
transitionEnterDuration: 300,
|
|
634
|
-
transitionExitDuration: 300,
|
|
635
|
-
direction: "vertical"
|
|
636
|
-
};
|
|
637
|
-
const ne = (o, i) => {
|
|
638
|
-
const t = a.useRef(0), n = a.useRef(!1), s = a.useRef(), c = (r) => {
|
|
639
|
-
const l = r.duration;
|
|
640
|
-
let d, h, u = t.current && 1 - t.current;
|
|
641
|
-
r.onStart && r.onStart();
|
|
642
|
-
const p = (f) => {
|
|
643
|
-
d || (d = f), h = f - d + 1;
|
|
644
|
-
const m = h / l + u;
|
|
645
|
-
m <= 1 ? (r.onUpdate && r.onUpdate(m), s.current = window.requestAnimationFrame(p), t.current = m) : (r.onEnd && r.onEnd(1), t.current = 0);
|
|
646
|
-
};
|
|
647
|
-
s.current = window.requestAnimationFrame(p);
|
|
648
|
-
};
|
|
649
|
-
a.useEffect(
|
|
650
|
-
() => (c(o), () => {
|
|
651
|
-
s.current && window.cancelAnimationFrame(s.current);
|
|
652
|
-
}),
|
|
653
|
-
i
|
|
654
|
-
), a.useEffect(
|
|
655
|
-
() => {
|
|
656
|
-
n.current = !0;
|
|
657
|
-
},
|
|
658
|
-
[]
|
|
659
|
-
);
|
|
660
|
-
};
|
|
9
|
+
import { Animation as e } from "./Animation.mjs";
|
|
10
|
+
import { AnimationChild as t } from "./AnimationChild.mjs";
|
|
11
|
+
import { Fade as x } from "./Fade.mjs";
|
|
12
|
+
import { Expand as i } from "./Expand.mjs";
|
|
13
|
+
import { Push as a } from "./Push.mjs";
|
|
14
|
+
import { Slide as l } from "./Slide.mjs";
|
|
15
|
+
import { Zoom as u } from "./Zoom.mjs";
|
|
16
|
+
import { Reveal as h } from "./Reveal.mjs";
|
|
17
|
+
import { useAnimation as v } from "./hooks/useAnimation.mjs";
|
|
661
18
|
export {
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
19
|
+
e as Animation,
|
|
20
|
+
t as AnimationChild,
|
|
21
|
+
i as Expand,
|
|
22
|
+
x as Fade,
|
|
23
|
+
a as Push,
|
|
24
|
+
h as Reveal,
|
|
25
|
+
l as Slide,
|
|
26
|
+
u as Zoom,
|
|
27
|
+
v as useAnimation
|
|
671
28
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"@progress/kendo-react-animation",productName:"KendoReact",productCodes:["KENDOUIREACT","KENDOUICOMPLETE"],publishDate:0,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"};exports.packageMetadata=e;
|