@arthurzakharov/ui-kit 1.0.59 → 1.0.60

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.
@@ -0,0 +1 @@
1
+ ._Flex_1t96l_1{display:flex}
@@ -3,6 +3,7 @@ import { PropsWithChildren } from 'react';
3
3
  export interface FadeScaleProps extends PropsWithChildren {
4
4
  name: string;
5
5
  condition: boolean;
6
+ flex?: boolean;
6
7
  className?: string;
7
8
  type?: AnimationGeneratorType;
8
9
  ease?: Easing | Easing[];
@@ -1,34 +1,40 @@
1
- import { jsx as f } from "react/jsx-runtime";
2
- import { useRef as d, useEffect as p } from "react";
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { useRef as p, useEffect as x } from "react";
3
+ import F from "clsx";
3
4
  import { m as y } from "../../../proxy-BfgGIllg.js";
4
- const R = (t) => {
5
+ import '../../../assets/fade-scale-B23oZuuD.css';const _ = "_Flex_1t96l_1", h = {
6
+ Flex: _
7
+ }, j = (t) => {
5
8
  const {
6
9
  children: a,
7
10
  name: n,
8
- condition: r,
9
- ease: i = "easeInOut",
10
- type: o = "tween",
11
- className: s = "",
12
- duration: c = 0.125,
11
+ condition: s,
12
+ flex: o = !1,
13
+ ease: r = "easeInOut",
14
+ type: c = "tween",
15
+ className: i = "",
16
+ duration: l = 0.125,
13
17
  delay: m = 0,
14
- animateOnStart: l = !1
15
- } = t, e = d(l);
16
- if (p(() => {
18
+ animateOnStart: f = !1
19
+ } = t, e = p(f);
20
+ if (x(() => {
17
21
  e.current = !0;
18
- }, []), !r) return null;
22
+ }, []), !s) return null;
19
23
  const u = e.current ? { opacity: 0, scale: 0.95 } : !1;
20
- return /* @__PURE__ */ f(
24
+ return /* @__PURE__ */ d(
21
25
  y.div,
22
26
  {
23
27
  initial: u,
24
28
  animate: { opacity: 1, scale: 1 },
25
- transition: { ease: i, duration: c, delay: m, type: o },
26
- className: s,
29
+ transition: { ease: r, duration: l, delay: m, type: c },
30
+ className: F(i, {
31
+ [h.Flex]: o
32
+ }),
27
33
  children: a
28
34
  },
29
35
  n
30
36
  );
31
37
  };
32
38
  export {
33
- R as FadeScale
39
+ j as FadeScale
34
40
  };
@@ -3,6 +3,7 @@ import { PropsWithChildren } from 'react';
3
3
  export interface FadeSlideProps extends PropsWithChildren {
4
4
  name: string;
5
5
  condition: boolean;
6
+ flex?: boolean;
6
7
  direction?: 'ltr' | 'rtl';
7
8
  className?: string;
8
9
  type?: AnimationGeneratorType;
@@ -1,35 +1,41 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import { useRef as p, useEffect as y } from "react";
3
+ import F from "clsx";
3
4
  import { m as h } from "../../../proxy-BfgGIllg.js";
4
- const O = (n) => {
5
+ import '../../../assets/fade-scale-B23oZuuD.css';const v = "_Flex_1t96l_1", _ = {
6
+ Flex: v
7
+ }, S = (n) => {
5
8
  const {
6
9
  children: r,
7
10
  name: i,
8
11
  condition: o,
9
- direction: a = "ltr",
12
+ flex: a = !1,
13
+ direction: l = "ltr",
10
14
  ease: s = "easeInOut",
11
15
  type: c = "tween",
12
- className: d = "",
13
- duration: l = 0.125,
14
- delay: m = 0,
15
- animateOnStart: f = !1
16
- } = n, e = p(f);
16
+ className: m = "",
17
+ duration: d = 0.125,
18
+ delay: f = 0,
19
+ animateOnStart: u = !1
20
+ } = n, e = p(u);
17
21
  if (y(() => {
18
22
  e.current = !0;
19
23
  }, []), !o) return null;
20
- const u = e.current ? { x: a === "ltr" ? "-100%" : "100%", opacity: 0 } : !1;
24
+ const x = e.current ? { x: l === "ltr" ? "-100%" : "100%", opacity: 0 } : !1;
21
25
  return /* @__PURE__ */ t("div", { style: { overflow: "hidden" }, children: /* @__PURE__ */ t(
22
26
  h.div,
23
27
  {
24
- initial: u,
28
+ initial: x,
25
29
  animate: { x: 0, opacity: 1 },
26
- transition: { ease: s, duration: l, delay: m, type: c },
27
- className: d,
30
+ transition: { ease: s, duration: d, delay: f, type: c },
31
+ className: F(m, {
32
+ [_.Flex]: a
33
+ }),
28
34
  children: r
29
35
  },
30
36
  i
31
37
  ) });
32
38
  };
33
39
  export {
34
- O as FadeSlide
40
+ S as FadeSlide
35
41
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arthurzakharov/ui-kit",
3
3
  "private": false,
4
- "version": "1.0.59",
4
+ "version": "1.0.60",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
7
7
  "types": "dist/main.d.ts",