@arthurzakharov/ui-kit 1.0.27 → 1.0.28

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