@progress/kendo-react-animation 9.0.0-develop.2 → 9.0.0-develop.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/Push.mjs CHANGED
@@ -6,48 +6,37 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as i from "react";
9
+ import * as u from "react";
10
10
  import t from "prop-types";
11
- import { Animation as a } from "./Animation.mjs";
12
- const p = { position: "absolute", top: "0", left: "0" }, e = class e extends i.Component {
13
- /**
14
- * @hidden
15
- */
16
- render() {
17
- const {
18
- children: r,
19
- direction: o,
20
- ...s
21
- } = this.props;
22
- return /* @__PURE__ */ i.createElement(
23
- a,
24
- {
25
- ...s,
26
- transitionName: `push-${o}`,
27
- animationExitingStyle: this.props.stackChildren ? p : void 0
28
- },
29
- r
30
- );
31
- }
32
- };
33
- e.propTypes = {
34
- children: t.oneOfType([
35
- t.arrayOf(t.node),
36
- t.node
37
- ]),
38
- childFactory: t.any,
39
- className: t.string,
40
- direction: t.oneOf([
41
- "up",
42
- "down",
43
- "left",
44
- "right"
45
- ]),
46
- component: t.string,
47
- id: t.string,
48
- style: t.any,
49
- stackChildren: t.bool
50
- }, e.defaultProps = {
11
+ import { Animation as h } from "./Animation.mjs";
12
+ const m = { position: "absolute", top: "0", left: "0" }, f = (i) => {
13
+ const {
14
+ appear: e = n.appear,
15
+ enter: r = n.enter,
16
+ exit: o = n.exit,
17
+ transitionEnterDuration: a = n.transitionEnterDuration,
18
+ transitionExitDuration: s = n.transitionExitDuration,
19
+ stackChildren: c = n.stackChildren,
20
+ direction: l = n.direction,
21
+ children: p,
22
+ ...d
23
+ } = i;
24
+ return /* @__PURE__ */ u.createElement(
25
+ h,
26
+ {
27
+ appear: e,
28
+ enter: r,
29
+ exit: o,
30
+ transitionEnterDuration: a,
31
+ transitionExitDuration: s,
32
+ stackChildren: c,
33
+ ...d,
34
+ transitionName: `push-${l}`,
35
+ animationExitingStyle: i.stackChildren ? m : void 0
36
+ },
37
+ p
38
+ );
39
+ }, n = {
51
40
  appear: !1,
52
41
  enter: !0,
53
42
  exit: !0,
@@ -56,7 +45,16 @@ e.propTypes = {
56
45
  direction: "right",
57
46
  stackChildren: !1
58
47
  };
59
- let n = e;
48
+ f.propTypes = {
49
+ children: t.oneOfType([t.arrayOf(t.node), t.node]),
50
+ childFactory: t.any,
51
+ className: t.string,
52
+ direction: t.oneOf(["up", "down", "left", "right"]),
53
+ component: t.string,
54
+ id: t.string,
55
+ style: t.any,
56
+ stackChildren: t.bool
57
+ };
60
58
  export {
61
- n as Push
59
+ f as Push
62
60
  };
package/README.md CHANGED
@@ -5,10 +5,11 @@
5
5
  # KendoReact Animation Component for React
6
6
 
7
7
  > **Important**
8
- > * This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—a commercial UI library.
9
- > * You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation).
10
- > * To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation).
11
- > * The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
8
+ >
9
+ > - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—a commercial UI library.
10
+ > - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation).
11
+ > - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation).
12
+ > - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
12
13
  >
13
14
  > [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) and speed up your development process!
14
15
 
@@ -16,38 +17,38 @@
16
17
 
17
18
  The [React Animation Component](https://www.telerik.com/kendo-react-ui/animation), part of KendoReact, delivers a set of features such as:
18
19
 
19
- * [Types](https://www.telerik.com/kendo-react-ui/components/animation/types/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animation components animate their content by using various animation effects (Fade, Expand, Push, Reveal, Slide and Zoom).
20
- * [Disabled animations](https://www.telerik.com/kendo-react-ui/components/animation/disabled-state/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animations allow you to enable or disable their showing or hiding effect.
21
- * [Stacked animations](https://www.telerik.com/kendo-react-ui/components/animation/stacked/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animations extend the Animation component. However, the Push and Zoom Animations further extend Animation by using [the `stackChildren`](https://www.telerik.com/kendo-react-ui/components/animation/api/PushProps/#toc-stackchildren/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) options and enable you to stack animations.
22
- * [Life-cycle hooks](https://www.telerik.com/kendo-react-ui/components/animation/hooks/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—When you declaratively add or remove a child element, all Animations call specific hooks during the entering or exiting of the element.
23
- * [Duration](https://www.telerik.com/kendo-react-ui/components/animation/duration/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animation types enable you to control the duration of the entering and exiting animation effects.
24
- * [Direction](https://www.telerik.com/kendo-react-ui/components/animation/direction/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—Except for the Fade Animation, the Animations provide a set of the predefined directions which allow you to control their entering and exiting effect
25
- * [Exiting child components](https://www.telerik.com/kendo-react-ui/components/animation/exiting-components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—While an exiting child component is rendered because it still exists in the React Virtual DOM, it is no longer available in the DOM.
26
- * [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The KendoReact Animation, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
20
+ - [Types](https://www.telerik.com/kendo-react-ui/components/animation/types/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animation components animate their content by using various animation effects (Fade, Expand, Push, Reveal, Slide and Zoom).
21
+ - [Disabled animations](https://www.telerik.com/kendo-react-ui/components/animation/disabled-state/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The Animations allow you to enable or disable their showing or hiding effect.
22
+ - [Stacked animations](https://www.telerik.com/kendo-react-ui/components/animation/stacked/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animations extend the Animation component. However, the Push and Zoom Animations further extend Animation by using [the `stackChildren`](https://www.telerik.com/kendo-react-ui/components/animation/api/PushProps/#toc-stackchildren/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) options and enable you to stack animations.
23
+ - [Life-cycle hooks](https://www.telerik.com/kendo-react-ui/components/animation/hooks/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—When you declaratively add or remove a child element, all Animations call specific hooks during the entering or exiting of the element.
24
+ - [Duration](https://www.telerik.com/kendo-react-ui/components/animation/duration/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—All Animation types enable you to control the duration of the entering and exiting animation effects.
25
+ - [Direction](https://www.telerik.com/kendo-react-ui/components/animation/direction/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—Except for the Fade Animation, the Animations provide a set of the predefined directions which allow you to control their entering and exiting effect
26
+ - [Exiting child components](https://www.telerik.com/kendo-react-ui/components/animation/exiting-components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—While an exiting child component is rendered because it still exists in the React Virtual DOM, it is no longer available in the DOM.
27
+ - [Theme support](https://www.telerik.com/kendo-react-ui/components/styling/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)—The KendoReact Animation, as well as all 100+ components in the KendoReact suite, are styled in three polished themes (Bootstrap, Material, and Default) and can be further customized to match your specific design guidelines.
27
28
 
28
29
  ## Support Options
29
30
 
30
31
  For any issues you might encounter while working with the KendoReact animation, use any of the available support channels:
31
32
 
32
- * Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation).
33
- * Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) are part of the free support you can get from the community and from the KendoReact team.
34
- * Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) is where you can request and vote for new features to be added.
33
+ - Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation).
34
+ - Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) are part of the free support you can get from the community and from the KendoReact team.
35
+ - Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation) is where you can request and vote for new features to be added.
35
36
 
36
37
  ## Resources
37
38
 
38
- * [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
39
- * [Get Started with the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
40
- * [API Reference of the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/api/АnimationProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
41
- * [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
42
- * [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
43
- * [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
44
- * [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
45
- * [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
39
+ - [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
40
+ - [Get Started with the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
41
+ - [API Reference of the KendoReact Аnimation](https://www.telerik.com/kendo-react-ui/components/animation/api/АnimationProps/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
42
+ - [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
43
+ - [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
44
+ - [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
45
+ - [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
46
+ - [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-animation)
46
47
 
47
48
  High-level component overview pages
48
49
 
49
- * [React Animation Component](https://www.telerik.com/kendo-react-ui/animation)
50
+ - [React Animation Component](https://www.telerik.com/kendo-react-ui/animation)
50
51
 
51
- *Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.*
52
+ _Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
52
53
 
53
- *Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries.*
54
+ _Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
package/Reveal.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 x=require("react"),i=require("prop-types"),E=require("./Animation.js"),y=require("@progress/kendo-react-common"),u=require("./util.js");function W(r){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const e in r)if(e!=="default"){const n=Object.getOwnPropertyDescriptor(r,e);Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>r[e]})}}return t.default=r,Object.freeze(t)}const m=W(x),c=class c extends m.Component{constructor(){super(...arguments),this.state={maxHeight:void 0,maxWidth:void 0},this.componentWillEnter=t=>{const{onEnter:e,onBeforeEnter:n}=this.props;n&&n.call(void 0,t),this.updateContainerDimensions(t.animatedElement,()=>{e&&e.call(void 0,t)})},this.componentIsEntering=t=>{const{onEntering:e}=this.props;this.updateContainerDimensions(t.animatedElement,()=>{e&&e.call(void 0,t)})},this.componentWillExit=t=>{const{onExit:e}=this.props;this.updateContainerDimensions(t.animatedElement,()=>{e&&e.call(void 0,t)})},this.updateContainerDimensions=(t,e=y.noop)=>{const n=t.firstChild;if(n){const l=u.outerHeight(n),a=u.outerWidth(n);this.setState({maxHeight:l,maxWidth:a},e)}}}render(){const{direction:t,children:e,childFactory:n,...l}=this.props,{maxHeight:a,maxWidth:p}=this.state;let o;t==="vertical"?o={maxHeight:a?`${a}px`:""}:o={maxWidth:p?`${p}px`:""};const f={maxHeight:o.maxHeight,maxWidth:o.maxWidth},g=d=>{let s=n?n(d):d;return s.props.in?s:m.cloneElement(s,{...s.props,style:{...s.props.style,maxHeight:o.maxHeight,maxWidth:o.maxWidth}})};return m.createElement(E.Animation,{...l,childFactory:g,onEnter:this.componentWillEnter,onEntering:this.componentIsEntering,onExit:this.componentWillExit,animationEnteringStyle:f,transitionName:`reveal-${t}`},e)}};c.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any},c.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};let h=c;exports.Reveal=h;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react"),i=require("prop-types"),F=require("./Animation.js"),x=require("./util.js");function N(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const a=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,a.get?a:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const s=N(w),h=e=>{const[r,o]=s.useState(),[a,p]=s.useState(),[u,E]=s.useState({}),{appear:y=l.appear,enter:v=l.enter,exit:W=l.exit,transitionEnterDuration:O=l.transitionEnterDuration,transitionExitDuration:D=l.transitionExitDuration,direction:f=l.direction,children:H,childFactory:g,...T}=e;let c;f==="vertical"?c={maxHeight:r?`${r}px`:""}:c={maxWidth:a?`${a}px`:""};const b={maxHeight:c.maxHeight,maxWidth:c.maxWidth};s.useEffect(()=>{e&&u.name&&e[u.name]&&e[u.name].call(void 0,u.event)},[r,a,u]);const S=t=>{const{onBeforeEnter:n}=e;n&&n.call(void 0,t),m(t,"onEnter")},j=t=>{m(t,"onEntering")},P=t=>{m(t,"onExit")},m=(t,n)=>{const d=t.animatedElement.firstChild;if(d){const M=x.outerHeight(d),R=x.outerWidth(d);o(M),p(R),E({name:n,event:t})}},q=t=>{const n=g?g(t):t;return n.props.in?n:s.cloneElement(n,{...n.props,style:{...n.props.style,maxHeight:c.maxHeight,maxWidth:c.maxWidth}})};return s.createElement(F.Animation,{...T,appear:y,enter:v,exit:W,transitionEnterDuration:O,transitionExitDuration:D,childFactory:q,onEnter:S,onEntering:j,onExit:P,animationEnteringStyle:b,transitionName:`reveal-${f}`},H)},l={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"vertical"};h.propTypes={children:i.oneOfType([i.arrayOf(i.node),i.node]),childFactory:i.any,className:i.string,direction:i.oneOf(["horizontal","vertical"]),component:i.string,id:i.string,style:i.any};exports.Reveal=h;
package/Reveal.mjs CHANGED
@@ -6,104 +6,77 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as c from "react";
9
+ import * as o from "react";
10
10
  import n from "prop-types";
11
- import { Animation as E } from "./Animation.mjs";
12
- import { noop as g } from "@progress/kendo-react-common";
13
- import l from "./util.mjs";
14
- const a = class a extends c.Component {
15
- constructor() {
16
- super(...arguments), this.state = {
17
- maxHeight: void 0,
18
- maxWidth: void 0
19
- }, this.componentWillEnter = (t) => {
20
- const { onEnter: i, onBeforeEnter: e } = this.props;
21
- e && e.call(void 0, t), this.updateContainerDimensions(t.animatedElement, () => {
22
- i && i.call(void 0, t);
11
+ import { Animation as N } from "./Animation.mjs";
12
+ import p from "./util.mjs";
13
+ const P = (a) => {
14
+ const [c, E] = o.useState(), [m, f] = o.useState(), [s, u] = o.useState({}), {
15
+ appear: g = r.appear,
16
+ enter: y = r.enter,
17
+ exit: W = r.exit,
18
+ transitionEnterDuration: H = r.transitionEnterDuration,
19
+ transitionExitDuration: v = r.transitionExitDuration,
20
+ direction: d = r.direction,
21
+ children: D,
22
+ childFactory: h,
23
+ ...T
24
+ } = a;
25
+ let i;
26
+ d === "vertical" ? i = { maxHeight: c ? `${c}px` : "" } : i = { maxWidth: m ? `${m}px` : "" };
27
+ const O = {
28
+ maxHeight: i.maxHeight,
29
+ maxWidth: i.maxWidth
30
+ };
31
+ o.useEffect(() => {
32
+ a && s.name && a[s.name] && a[s.name].call(void 0, s.event);
33
+ }, [c, m, s]);
34
+ const S = (t) => {
35
+ const { onBeforeEnter: e } = a;
36
+ e && e.call(void 0, t), l(t, "onEnter");
37
+ }, F = (t) => {
38
+ l(t, "onEntering");
39
+ }, M = (t) => {
40
+ l(t, "onExit");
41
+ }, l = (t, e) => {
42
+ const x = t.animatedElement.firstChild;
43
+ if (x) {
44
+ const w = p.outerHeight(x), C = p.outerWidth(x);
45
+ E(w), f(C), u({
46
+ name: e,
47
+ event: t
23
48
  });
24
- }, this.componentIsEntering = (t) => {
25
- const { onEntering: i } = this.props;
26
- this.updateContainerDimensions(t.animatedElement, () => {
27
- i && i.call(void 0, t);
28
- });
29
- }, this.componentWillExit = (t) => {
30
- const { onExit: i } = this.props;
31
- this.updateContainerDimensions(t.animatedElement, () => {
32
- i && i.call(void 0, t);
33
- });
34
- }, this.updateContainerDimensions = (t, i = g) => {
35
- const e = t.firstChild;
36
- if (e) {
37
- const m = l.outerHeight(e), s = l.outerWidth(e);
38
- this.setState(
39
- {
40
- maxHeight: m,
41
- maxWidth: s
42
- },
43
- i
44
- );
49
+ }
50
+ }, $ = (t) => {
51
+ const e = h ? h(t) : t;
52
+ return e.props.in ? e : o.cloneElement(e, {
53
+ ...e.props,
54
+ style: {
55
+ ...e.props.style,
56
+ maxHeight: i.maxHeight,
57
+ maxWidth: i.maxWidth
45
58
  }
46
- };
47
- }
48
- /**
49
- * @hidden
50
- */
51
- render() {
52
- const {
53
- direction: t,
54
- children: i,
55
- childFactory: e,
56
- ...m
57
- } = this.props, {
58
- maxHeight: s,
59
- maxWidth: h
60
- } = this.state;
61
- let o;
62
- t === "vertical" ? o = { maxHeight: s ? `${s}px` : "" } : o = { maxWidth: h ? `${h}px` : "" };
63
- const x = {
64
- maxHeight: o.maxHeight,
65
- maxWidth: o.maxWidth
66
- }, f = (p) => {
67
- let r = e ? e(p) : p;
68
- return r.props.in ? r : c.cloneElement(r, {
69
- ...r.props,
70
- style: {
71
- ...r.props.style,
72
- maxHeight: o.maxHeight,
73
- maxWidth: o.maxWidth
74
- }
75
- });
76
- };
77
- return /* @__PURE__ */ c.createElement(
78
- E,
79
- {
80
- ...m,
81
- childFactory: f,
82
- onEnter: this.componentWillEnter,
83
- onEntering: this.componentIsEntering,
84
- onExit: this.componentWillExit,
85
- animationEnteringStyle: x,
86
- transitionName: `reveal-${t}`
87
- },
88
- i
89
- );
90
- }
91
- };
92
- a.propTypes = {
93
- children: n.oneOfType([
94
- n.arrayOf(n.node),
95
- n.node
96
- ]),
97
- childFactory: n.any,
98
- className: n.string,
99
- direction: n.oneOf([
100
- "horizontal",
101
- "vertical"
102
- ]),
103
- component: n.string,
104
- id: n.string,
105
- style: n.any
106
- }, a.defaultProps = {
59
+ });
60
+ };
61
+ return /* @__PURE__ */ o.createElement(
62
+ N,
63
+ {
64
+ ...T,
65
+ appear: g,
66
+ enter: y,
67
+ exit: W,
68
+ transitionEnterDuration: H,
69
+ transitionExitDuration: v,
70
+ childFactory: $,
71
+ onEnter: S,
72
+ onEntering: F,
73
+ onExit: M,
74
+ animationEnteringStyle: O,
75
+ transitionName: `reveal-${d}`
76
+ },
77
+ D
78
+ );
79
+ }, r = {
107
80
  appear: !1,
108
81
  enter: !0,
109
82
  exit: !0,
@@ -111,7 +84,15 @@ a.propTypes = {
111
84
  transitionExitDuration: 300,
112
85
  direction: "vertical"
113
86
  };
114
- let d = a;
87
+ P.propTypes = {
88
+ children: n.oneOfType([n.arrayOf(n.node), n.node]),
89
+ childFactory: n.any,
90
+ className: n.string,
91
+ direction: n.oneOf(["horizontal", "vertical"]),
92
+ component: n.string,
93
+ id: n.string,
94
+ style: n.any
95
+ };
115
96
  export {
116
- d as Reveal
97
+ P as Reveal
117
98
  };
package/Slide.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 u=require("react"),e=require("prop-types"),l=require("./Animation.js");function p(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const t in n)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(n,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>n[t]})}}return r.default=n,Object.freeze(r)}const s=p(u),i=class i extends s.Component{render(){const{direction:r,children:t,...o}=this.props,c={transitionName:`slide-${r}`};return s.createElement(l.Animation,{...c,...o},t)}};i.propTypes={children:e.oneOfType([e.arrayOf(e.node),e.node]),childFactory:e.any,className:e.string,direction:e.oneOf(["up","down","left","right"]),component:e.string,id:e.string,style:e.any},i.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};let a=i;exports.Slide=a;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),y=require("./Animation.js");function m(e){const i=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(i,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return i.default=e,Object.freeze(i)}const g=m(f),a=e=>{const{appear:i=r.appear,enter:n=r.enter,exit:o=r.exit,transitionEnterDuration:c=r.transitionEnterDuration,transitionExitDuration:s=r.transitionExitDuration,direction:u=r.direction,children:l,...d}=e,p={transitionName:`slide-${u}`};return g.createElement(y.Animation,{...p,appear:i,enter:n,exit:o,transitionEnterDuration:c,transitionExitDuration:s,...d},l)},r={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"down"};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["up","down","left","right"]),component:t.string,id:t.string,style:t.any};exports.Slide=a;
package/Slide.mjs CHANGED
@@ -6,41 +6,36 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as r from "react";
9
+ import * as m from "react";
10
10
  import t from "prop-types";
11
- import { Animation as p } from "./Animation.mjs";
12
- const n = class n extends r.Component {
13
- /**
14
- * @hidden
15
- */
16
- render() {
17
- const {
18
- direction: o,
19
- children: i,
20
- ...s
21
- } = this.props, a = {
22
- transitionName: `slide-${o}`
23
- };
24
- return /* @__PURE__ */ r.createElement(p, { ...a, ...s }, i);
25
- }
26
- };
27
- n.propTypes = {
28
- children: t.oneOfType([
29
- t.arrayOf(t.node),
30
- t.node
31
- ]),
32
- childFactory: t.any,
33
- className: t.string,
34
- direction: t.oneOf([
35
- "up",
36
- "down",
37
- "left",
38
- "right"
39
- ]),
40
- component: t.string,
41
- id: t.string,
42
- style: t.any
43
- }, n.defaultProps = {
11
+ import { Animation as u } from "./Animation.mjs";
12
+ const f = (i) => {
13
+ const {
14
+ appear: r = n.appear,
15
+ enter: e = n.enter,
16
+ exit: o = n.exit,
17
+ transitionEnterDuration: a = n.transitionEnterDuration,
18
+ transitionExitDuration: s = n.transitionExitDuration,
19
+ direction: p = n.direction,
20
+ children: c,
21
+ ...d
22
+ } = i, l = {
23
+ transitionName: `slide-${p}`
24
+ };
25
+ return /* @__PURE__ */ m.createElement(
26
+ u,
27
+ {
28
+ ...l,
29
+ appear: r,
30
+ enter: e,
31
+ exit: o,
32
+ transitionEnterDuration: a,
33
+ transitionExitDuration: s,
34
+ ...d
35
+ },
36
+ c
37
+ );
38
+ }, n = {
44
39
  appear: !1,
45
40
  enter: !0,
46
41
  exit: !0,
@@ -48,7 +43,15 @@ n.propTypes = {
48
43
  transitionExitDuration: 300,
49
44
  direction: "down"
50
45
  };
51
- let e = n;
46
+ f.propTypes = {
47
+ children: t.oneOfType([t.arrayOf(t.node), t.node]),
48
+ childFactory: t.any,
49
+ className: t.string,
50
+ direction: t.oneOf(["up", "down", "left", "right"]),
51
+ component: t.string,
52
+ id: t.string,
53
+ style: t.any
54
+ };
52
55
  export {
53
- e as Slide
56
+ f as Slide
54
57
  };
package/Zoom.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 c=require("react"),t=require("prop-types"),l=require("./Animation.js");function u(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const e in n)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(n,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:()=>n[e]})}}return r.default=n,Object.freeze(r)}const s=u(c),p={position:"absolute",top:"0",left:"0"},o=class o extends s.Component{render(){const{children:r,direction:e,...i}=this.props;return s.createElement(l.Animation,{...i,transitionName:`zoom-${e}`,animationExitingStyle:this.props.stackChildren?p:void 0},r)}};o.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["in","out"]),component:t.string,id:t.string,style:t.any,stackChildren:t.bool},o.defaultProps={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};let a=o;exports.Zoom=a;
8
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),t=require("prop-types"),m=require("./Animation.js");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const o=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,o.get?o:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const g=y(f),b={position:"absolute",top:"0",left:"0"},a=e=>{const{appear:r=n.appear,enter:i=n.enter,exit:o=n.exit,transitionEnterDuration:c=n.transitionEnterDuration,transitionExitDuration:s=n.transitionExitDuration,stackChildren:l=n.stackChildren,direction:u=n.direction,children:d,...p}=e;return g.createElement(m.Animation,{appear:r,enter:i,exit:o,transitionEnterDuration:c,transitionExitDuration:s,stackChildren:l,...p,transitionName:`zoom-${u}`,animationExitingStyle:e.stackChildren?b:void 0},d)},n={appear:!1,enter:!0,exit:!0,transitionEnterDuration:300,transitionExitDuration:300,direction:"out",stackChildren:!1};a.propTypes={children:t.oneOfType([t.arrayOf(t.node),t.node]),childFactory:t.any,className:t.string,direction:t.oneOf(["in","out"]),component:t.string,id:t.string,style:t.any,stackChildren:t.bool};exports.Zoom=a;
package/Zoom.mjs CHANGED
@@ -6,46 +6,37 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  "use client";
9
- import * as i from "react";
9
+ import * as m from "react";
10
10
  import t from "prop-types";
11
- import { Animation as a } from "./Animation.mjs";
12
- const p = { position: "absolute", top: "0", left: "0" }, e = class e extends i.Component {
13
- /**
14
- * @hidden
15
- */
16
- render() {
17
- const {
18
- children: r,
19
- direction: o,
20
- ...s
21
- } = this.props;
22
- return /* @__PURE__ */ i.createElement(
23
- a,
24
- {
25
- ...s,
26
- transitionName: `zoom-${o}`,
27
- animationExitingStyle: this.props.stackChildren ? p : void 0
28
- },
29
- r
30
- );
31
- }
32
- };
33
- e.propTypes = {
34
- children: t.oneOfType([
35
- t.arrayOf(t.node),
36
- t.node
37
- ]),
38
- childFactory: t.any,
39
- className: t.string,
40
- direction: t.oneOf([
41
- "in",
42
- "out"
43
- ]),
44
- component: t.string,
45
- id: t.string,
46
- style: t.any,
47
- stackChildren: t.bool
48
- }, e.defaultProps = {
11
+ import { Animation as u } from "./Animation.mjs";
12
+ const f = { position: "absolute", top: "0", left: "0" }, E = (i) => {
13
+ const {
14
+ appear: e = n.appear,
15
+ enter: r = n.enter,
16
+ exit: o = n.exit,
17
+ transitionEnterDuration: a = n.transitionEnterDuration,
18
+ transitionExitDuration: s = n.transitionExitDuration,
19
+ stackChildren: c = n.stackChildren,
20
+ direction: l = n.direction,
21
+ children: p,
22
+ ...d
23
+ } = i;
24
+ return /* @__PURE__ */ m.createElement(
25
+ u,
26
+ {
27
+ appear: e,
28
+ enter: r,
29
+ exit: o,
30
+ transitionEnterDuration: a,
31
+ transitionExitDuration: s,
32
+ stackChildren: c,
33
+ ...d,
34
+ transitionName: `zoom-${l}`,
35
+ animationExitingStyle: i.stackChildren ? f : void 0
36
+ },
37
+ p
38
+ );
39
+ }, n = {
49
40
  appear: !1,
50
41
  enter: !0,
51
42
  exit: !0,
@@ -54,7 +45,16 @@ e.propTypes = {
54
45
  direction: "out",
55
46
  stackChildren: !1
56
47
  };
57
- let n = e;
48
+ E.propTypes = {
49
+ children: t.oneOfType([t.arrayOf(t.node), t.node]),
50
+ childFactory: t.any,
51
+ className: t.string,
52
+ direction: t.oneOf(["in", "out"]),
53
+ component: t.string,
54
+ id: t.string,
55
+ style: t.any,
56
+ stackChildren: t.bool
57
+ };
58
58
  export {
59
- n as Zoom
59
+ E as Zoom
60
60
  };