@arthurzakharov/ui-kit 1.0.26 → 1.0.27

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.
@@ -8,10 +8,7 @@ interface FadeScaleProps extends PropsWithChildren {
8
8
  ease?: Easing | Easing[];
9
9
  duration?: number;
10
10
  delay?: number;
11
- initial?: boolean | {
12
- opacity: number;
13
- scale: number;
14
- };
11
+ suppressFirstAnimation?: boolean;
15
12
  }
16
13
  export declare const FadeScale: (props: FadeScaleProps) => import("react/jsx-runtime").JSX.Element | null;
17
14
  export {};
@@ -1,29 +1,34 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { m as d } from "../../../proxy-BfgGIllg.js";
3
- const y = (e) => {
1
+ import { jsx as f } from "react/jsx-runtime";
2
+ import { useRef as p, useEffect as d } from "react";
3
+ import { m as y } from "../../../proxy-BfgGIllg.js";
4
+ const R = (t) => {
4
5
  const {
5
- children: t,
6
+ children: n,
6
7
  name: a,
7
- condition: i,
8
- ease: n = "easeInOut",
9
- type: o = "tween",
10
- className: r = "",
11
- duration: s = 0.125,
12
- delay: c = 0,
13
- initial: l = { opacity: 0, scale: 0.95 }
14
- } = e;
15
- return i ? /* @__PURE__ */ m(
16
- d.div,
8
+ condition: r,
9
+ ease: s = "easeInOut",
10
+ type: i = "tween",
11
+ className: o = "",
12
+ duration: c = 0.125,
13
+ delay: m = 0,
14
+ suppressFirstAnimation: l = !1
15
+ } = t, e = p(l);
16
+ if (d(() => {
17
+ e.current = !0;
18
+ }, []), !r) return null;
19
+ const u = e.current ? { opacity: 0, scale: 0.95 } : !1;
20
+ return /* @__PURE__ */ f(
21
+ y.div,
17
22
  {
18
- initial: l,
23
+ initial: u,
19
24
  animate: { opacity: 1, scale: 1 },
20
- transition: { ease: n, duration: s, delay: c, type: o },
21
- className: r,
22
- children: t
25
+ transition: { ease: s, duration: c, delay: m, type: i },
26
+ className: o,
27
+ children: n
23
28
  },
24
29
  a
25
- ) : null;
30
+ );
26
31
  };
27
32
  export {
28
- y as FadeScale
33
+ R as FadeScale
29
34
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.0.26",
4
+ "version": "1.0.27",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",