@xanui/core 1.2.71 → 1.3.0
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/Iframe/index.cjs +1 -2
- package/Iframe/index.cjs.map +1 -1
- package/Iframe/index.d.ts +2 -1
- package/Iframe/index.js +1 -2
- package/Iframe/index.js.map +1 -1
- package/Transition/index.cjs +40 -97
- package/Transition/index.cjs.map +1 -1
- package/Transition/index.d.ts +13 -18
- package/Transition/index.js +41 -98
- package/Transition/index.js.map +1 -1
- package/Transition/variants.cjs +92 -171
- package/Transition/variants.cjs.map +1 -1
- package/Transition/variants.d.ts +65 -83
- package/Transition/variants.js +93 -170
- package/Transition/variants.js.map +1 -1
- package/animate/easing.cjs +59 -0
- package/animate/easing.cjs.map +1 -0
- package/animate/easing.d.ts +13 -0
- package/animate/easing.js +57 -0
- package/animate/easing.js.map +1 -0
- package/animate/index.cjs +104 -0
- package/animate/index.cjs.map +1 -0
- package/animate/index.d.ts +19 -0
- package/animate/index.js +99 -0
- package/animate/index.js.map +1 -0
- package/hooks/useTransition.cjs +98 -0
- package/hooks/useTransition.cjs.map +1 -0
- package/hooks/useTransition.d.ts +23 -0
- package/hooks/useTransition.js +96 -0
- package/hooks/useTransition.js.map +1 -0
- package/hooks/useTransitionGroup.cjs +95 -0
- package/hooks/useTransitionGroup.cjs.map +1 -0
- package/hooks/useTransitionGroup.d.ts +32 -0
- package/hooks/useTransitionGroup.js +93 -0
- package/hooks/useTransitionGroup.js.map +1 -0
- package/index.cjs +16 -11
- package/index.cjs.map +1 -1
- package/index.d.ts +5 -2
- package/index.js +4 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/hooks/useAnimation.cjs +0 -44
- package/hooks/useAnimation.cjs.map +0 -1
- package/hooks/useAnimation.d.ts +0 -20
- package/hooks/useAnimation.js +0 -39
- package/hooks/useAnimation.js.map +0 -1
package/index.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var index$2 = require('./Tag/index.cjs');
|
|
4
4
|
var useTagProps = require('./Tag/useTagProps.cjs');
|
|
5
|
-
var useAnimation = require('./hooks/useAnimation.cjs');
|
|
6
5
|
var useColorTemplate = require('./hooks/useColorTemplate.cjs');
|
|
7
6
|
var useBreakpoint = require('./breakpoint/useBreakpoint.cjs');
|
|
8
7
|
var useBreakpointProps = require('./breakpoint/useBreakpointProps.cjs');
|
|
@@ -16,11 +15,15 @@ var index$4 = require('./Document/index.cjs');
|
|
|
16
15
|
var AppRootProvider = require('./AppRoot/AppRootProvider.cjs');
|
|
17
16
|
var CSSCacheProvider = require('./css/CSSCacheProvider.cjs');
|
|
18
17
|
var index$1 = require('./Iframe/index.cjs');
|
|
19
|
-
var index$6 = require('./
|
|
20
|
-
var
|
|
18
|
+
var index$6 = require('./animate/index.cjs');
|
|
19
|
+
var useTransition = require('./hooks/useTransition.cjs');
|
|
20
|
+
var useTransitionGroup = require('./hooks/useTransitionGroup.cjs');
|
|
21
|
+
var index$7 = require('./css/index.cjs');
|
|
22
|
+
var index$8 = require('./theme/index.cjs');
|
|
21
23
|
var getValue = require('./css/getValue.cjs');
|
|
22
24
|
var getProps = require('./css/getProps.cjs');
|
|
23
25
|
var ThemeProvider = require('./theme/ThemeProvider.cjs');
|
|
26
|
+
var easing = require('./animate/easing.cjs');
|
|
24
27
|
var core = require('./theme/core.cjs');
|
|
25
28
|
var ThemeDefaultOptions = require('./theme/ThemeDefaultOptions.cjs');
|
|
26
29
|
|
|
@@ -28,8 +31,6 @@ var ThemeDefaultOptions = require('./theme/ThemeDefaultOptions.cjs');
|
|
|
28
31
|
|
|
29
32
|
exports.Tag = index$2;
|
|
30
33
|
exports.useTagProps = useTagProps;
|
|
31
|
-
exports.animationEases = useAnimation.animationEases;
|
|
32
|
-
exports.useAnimation = useAnimation.default;
|
|
33
34
|
exports.useColorTemplate = useColorTemplate;
|
|
34
35
|
exports.useBreakpoint = useBreakpoint;
|
|
35
36
|
exports.useBreakpointProps = useBreakpointProps;
|
|
@@ -45,15 +46,19 @@ exports.getCSSCache = CSSCacheProvider.getCSSCache;
|
|
|
45
46
|
exports.useCSSCache = CSSCacheProvider.useCSSCache;
|
|
46
47
|
exports.useCSSCacheId = CSSCacheProvider.useCSSCacheId;
|
|
47
48
|
exports.Iframe = index$1;
|
|
48
|
-
exports.
|
|
49
|
-
exports.
|
|
50
|
-
exports.
|
|
51
|
-
exports.
|
|
52
|
-
exports.
|
|
53
|
-
exports.
|
|
49
|
+
exports.animate = index$6.default;
|
|
50
|
+
exports.useTransition = useTransition;
|
|
51
|
+
exports.useTransitionGroup = useTransitionGroup;
|
|
52
|
+
exports.adjustColor = index$7.adjustColor;
|
|
53
|
+
exports.adjustTextContrast = index$7.adjustTextContrast;
|
|
54
|
+
exports.alpha = index$7.alpha;
|
|
55
|
+
exports.breakpoints = index$7.breakpoints;
|
|
56
|
+
exports.css = index$7.css;
|
|
57
|
+
exports.themeRootClass = index$8.themeRootClass;
|
|
54
58
|
exports.getValue = getValue;
|
|
55
59
|
exports.getProps = getProps;
|
|
56
60
|
exports.ThemeProvider = ThemeProvider;
|
|
61
|
+
exports.Easing = easing;
|
|
57
62
|
exports.createTheme = core.createTheme;
|
|
58
63
|
exports.useTheme = core.useTheme;
|
|
59
64
|
exports.darkThemeOptions = ThemeDefaultOptions.darkThemeOptions;
|
package/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export { default as Tag } from './Tag/index.js';
|
|
2
2
|
export { default as useTagProps } from './Tag/useTagProps.js';
|
|
3
|
-
export { UseAnimationProps, animationEases, default as useAnimation } from './hooks/useAnimation.js';
|
|
4
3
|
export { UseColorTemplateColor, UseColorTemplateType, default as useColorTemplate } from './hooks/useColorTemplate.js';
|
|
5
4
|
export { default as useBreakpoint } from './breakpoint/useBreakpoint.js';
|
|
6
5
|
export { default as useBreakpointProps, useBreakpointPropsType } from './breakpoint/useBreakpointProps.js';
|
|
7
6
|
export { default as useInterface } from './hooks/useInterface.js';
|
|
8
7
|
export { default as useMergeRefs } from './hooks/useMergeRefs.js';
|
|
9
|
-
export { default as Transition, TransitionProps,
|
|
8
|
+
export { default as Transition, TransitionProps, TransitionVariantTypes } from './Transition/index.js';
|
|
10
9
|
export { default as AppRoot, AppRootProps } from './AppRoot/index.js';
|
|
11
10
|
export { default as Portal, PortalProps } from './Portal/index.js';
|
|
12
11
|
export { Renderar } from './AppRoot/Renderar.js';
|
|
@@ -14,6 +13,9 @@ export { useDocument } from './Document/index.js';
|
|
|
14
13
|
export { useAppRootElement } from './AppRoot/AppRootProvider.js';
|
|
15
14
|
export { getCSSCache, useCSSCache, useCSSCacheId } from './css/CSSCacheProvider.js';
|
|
16
15
|
export { default as Iframe, IframeProps } from './Iframe/index.js';
|
|
16
|
+
export { AnimateOptions, default as animate } from './animate/index.js';
|
|
17
|
+
export { UseTransitionProps, UseTransitionStatus, default as useTransition } from './hooks/useTransition.js';
|
|
18
|
+
export { UseTransitionGroupItem, UseTransitionGroupProps, default as useTransitionGroup } from './hooks/useTransitionGroup.js';
|
|
17
19
|
export { adjustColor, adjustTextContrast, alpha, breakpoints, css } from './css/index.js';
|
|
18
20
|
export { themeRootClass } from './theme/index.js';
|
|
19
21
|
export { Aliases, BreakpointKeys, CSSBreakpointType, CSSOptionProps, CSSProps, CSSValueType, FN, GlobalCSS } from './css/types.js';
|
|
@@ -22,5 +24,6 @@ export { ColorsRefTypes, ObjectType, ThemeColorOption, ThemeOptionInput, ThemeOp
|
|
|
22
24
|
export { default as getValue } from './css/getValue.js';
|
|
23
25
|
export { default as getProps } from './css/getProps.js';
|
|
24
26
|
export { default as ThemeProvider, ThemeProviderProps } from './theme/ThemeProvider.js';
|
|
27
|
+
export { default as Easing } from './animate/easing.js';
|
|
25
28
|
export { createTheme, useTheme } from './theme/core.js';
|
|
26
29
|
export { darkThemeOptions, lightThemeOptions } from './theme/ThemeDefaultOptions.js';
|
package/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export { default as Tag } from './Tag/index.js';
|
|
2
2
|
export { default as useTagProps } from './Tag/useTagProps.js';
|
|
3
|
-
export { animationEases, default as useAnimation } from './hooks/useAnimation.js';
|
|
4
3
|
export { default as useColorTemplate } from './hooks/useColorTemplate.js';
|
|
5
4
|
export { default as useBreakpoint } from './breakpoint/useBreakpoint.js';
|
|
6
5
|
export { default as useBreakpointProps } from './breakpoint/useBreakpointProps.js';
|
|
@@ -14,11 +13,15 @@ export { useDocument } from './Document/index.js';
|
|
|
14
13
|
export { useAppRootElement } from './AppRoot/AppRootProvider.js';
|
|
15
14
|
export { getCSSCache, useCSSCache, useCSSCacheId } from './css/CSSCacheProvider.js';
|
|
16
15
|
export { default as Iframe } from './Iframe/index.js';
|
|
16
|
+
export { default as animate } from './animate/index.js';
|
|
17
|
+
export { default as useTransition } from './hooks/useTransition.js';
|
|
18
|
+
export { default as useTransitionGroup } from './hooks/useTransitionGroup.js';
|
|
17
19
|
export { adjustColor, adjustTextContrast, alpha, breakpoints, css } from './css/index.js';
|
|
18
20
|
export { themeRootClass } from './theme/index.js';
|
|
19
21
|
export { default as getValue } from './css/getValue.js';
|
|
20
22
|
export { default as getProps } from './css/getProps.js';
|
|
21
23
|
export { default as ThemeProvider } from './theme/ThemeProvider.js';
|
|
24
|
+
export { default as Easing } from './animate/easing.js';
|
|
22
25
|
export { createTheme, useTheme } from './theme/core.js';
|
|
23
26
|
export { darkThemeOptions, lightThemeOptions } from './theme/ThemeDefaultOptions.js';
|
|
24
27
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
package/hooks/useAnimation.cjs
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
'use strict';
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
-
|
|
6
|
-
var index$1 = require('../css/index.cjs');
|
|
7
|
-
var React = require('react');
|
|
8
|
-
var index = require('../Document/index.cjs');
|
|
9
|
-
var CSSCacheProvider = require('../css/CSSCacheProvider.cjs');
|
|
10
|
-
|
|
11
|
-
const animationEases = {
|
|
12
|
-
standard: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
13
|
-
fast: "cubic-bezier(0.2, 0, 0, 1)",
|
|
14
|
-
smooth: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
15
|
-
linear: "cubic-bezier(0, 0, 1, 1)",
|
|
16
|
-
bounce: "cubic-bezier(0.34, 1.50, 0.64, 1)",
|
|
17
|
-
};
|
|
18
|
-
const useAnimation = ({ from, to, delay, ease, duration }) => {
|
|
19
|
-
let _delay = delay || 0;
|
|
20
|
-
let _duration = duration || 600;
|
|
21
|
-
let _ease = ease || "standard";
|
|
22
|
-
const id = "anim" + React.useId().replace(/:/g, "");
|
|
23
|
-
const doc = index.useDocument();
|
|
24
|
-
const cacheId = CSSCacheProvider.useCSSCacheId();
|
|
25
|
-
const anim = index$1.css({
|
|
26
|
-
animationName: id,
|
|
27
|
-
animationDelay: _delay + "ms",
|
|
28
|
-
animationDuration: _duration + "ms",
|
|
29
|
-
animationTimingFunction: animationEases[_ease] || animationEases.standard,
|
|
30
|
-
[`@keyframes ${id}`]: {
|
|
31
|
-
from: from,
|
|
32
|
-
to: to
|
|
33
|
-
}
|
|
34
|
-
}, {
|
|
35
|
-
container: doc === null || doc === void 0 ? void 0 : doc.document,
|
|
36
|
-
cacheId,
|
|
37
|
-
injectStyle: typeof window !== 'undefined'
|
|
38
|
-
});
|
|
39
|
-
return anim.classname;
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
exports.animationEases = animationEases;
|
|
43
|
-
exports.default = useAnimation;
|
|
44
|
-
//# sourceMappingURL=useAnimation.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimation.cjs","sources":["../../src/hooks/useAnimation.ts"],"sourcesContent":["\"use client\";\nimport { css } from '../css'\nimport { useId } from 'react'\nimport { CSSProps } from '../css/types'\nimport { useDocument } from '../Document';\nimport { useCSSCacheId } from '../css/CSSCacheProvider';\n\nexport const animationEases = {\n standard: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n fast: \"cubic-bezier(0.2, 0, 0, 1)\",\n smooth: \"cubic-bezier(0.25, 0.46, 0.45, 0.94)\",\n linear: \"cubic-bezier(0, 0, 1, 1)\",\n bounce: \"cubic-bezier(0.34, 1.50, 0.64, 1)\",\n};\n\nexport interface UseAnimationProps {\n delay?: number;\n duration?: number;\n from: CSSProps;\n to: CSSProps;\n ease?: keyof typeof animationEases;\n}\n\nconst useAnimation = ({ from, to, delay, ease, duration }: UseAnimationProps) => {\n let _delay = delay || 0;\n let _duration = duration || 600;\n let _ease = ease || \"standard\"\n const id = \"anim\" + useId().replace(/:/g, \"\")\n const doc = useDocument()\n const cacheId = useCSSCacheId()\n\n const anim = css({\n animationName: id,\n animationDelay: _delay + \"ms\",\n animationDuration: _duration + \"ms\",\n animationTimingFunction: animationEases[_ease] || animationEases.standard,\n [`@keyframes ${id}`]: {\n from: from as any,\n to: to as any\n }\n }, {\n container: doc?.document,\n cacheId,\n injectStyle: typeof window !== 'undefined'\n })\n return anim.classname\n}\n\nexport default useAnimation"],"names":[],"mappings":";;;;;;;;;;AAOO;AACH;AACA;AACA;AACA;AACA;;AAWJ;AACI;AACA;AACA;AACA;AACA;AACA;;AAGI;;;;AAIA;AACI;AACA;AACH;;AAED;;AAEA;AACH;;AAEL;;;"}
|
package/hooks/useAnimation.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { CSSProps } from '../css/types.js';
|
|
2
|
-
|
|
3
|
-
declare const animationEases: {
|
|
4
|
-
standard: string;
|
|
5
|
-
fast: string;
|
|
6
|
-
smooth: string;
|
|
7
|
-
linear: string;
|
|
8
|
-
bounce: string;
|
|
9
|
-
};
|
|
10
|
-
interface UseAnimationProps {
|
|
11
|
-
delay?: number;
|
|
12
|
-
duration?: number;
|
|
13
|
-
from: CSSProps;
|
|
14
|
-
to: CSSProps;
|
|
15
|
-
ease?: keyof typeof animationEases;
|
|
16
|
-
}
|
|
17
|
-
declare const useAnimation: ({ from, to, delay, ease, duration }: UseAnimationProps) => string;
|
|
18
|
-
|
|
19
|
-
export { animationEases, useAnimation as default };
|
|
20
|
-
export type { UseAnimationProps };
|
package/hooks/useAnimation.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { css } from '../css/index.js';
|
|
3
|
-
import { useId } from 'react';
|
|
4
|
-
import { useDocument } from '../Document/index.js';
|
|
5
|
-
import { useCSSCacheId } from '../css/CSSCacheProvider.js';
|
|
6
|
-
|
|
7
|
-
const animationEases = {
|
|
8
|
-
standard: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
9
|
-
fast: "cubic-bezier(0.2, 0, 0, 1)",
|
|
10
|
-
smooth: "cubic-bezier(0.25, 0.46, 0.45, 0.94)",
|
|
11
|
-
linear: "cubic-bezier(0, 0, 1, 1)",
|
|
12
|
-
bounce: "cubic-bezier(0.34, 1.50, 0.64, 1)",
|
|
13
|
-
};
|
|
14
|
-
const useAnimation = ({ from, to, delay, ease, duration }) => {
|
|
15
|
-
let _delay = delay || 0;
|
|
16
|
-
let _duration = duration || 600;
|
|
17
|
-
let _ease = ease || "standard";
|
|
18
|
-
const id = "anim" + useId().replace(/:/g, "");
|
|
19
|
-
const doc = useDocument();
|
|
20
|
-
const cacheId = useCSSCacheId();
|
|
21
|
-
const anim = css({
|
|
22
|
-
animationName: id,
|
|
23
|
-
animationDelay: _delay + "ms",
|
|
24
|
-
animationDuration: _duration + "ms",
|
|
25
|
-
animationTimingFunction: animationEases[_ease] || animationEases.standard,
|
|
26
|
-
[`@keyframes ${id}`]: {
|
|
27
|
-
from: from,
|
|
28
|
-
to: to
|
|
29
|
-
}
|
|
30
|
-
}, {
|
|
31
|
-
container: doc === null || doc === void 0 ? void 0 : doc.document,
|
|
32
|
-
cacheId,
|
|
33
|
-
injectStyle: typeof window !== 'undefined'
|
|
34
|
-
});
|
|
35
|
-
return anim.classname;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { animationEases, useAnimation as default };
|
|
39
|
-
//# sourceMappingURL=useAnimation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAnimation.js","sources":["../../src/hooks/useAnimation.ts"],"sourcesContent":["\"use client\";\nimport { css } from '../css'\nimport { useId } from 'react'\nimport { CSSProps } from '../css/types'\nimport { useDocument } from '../Document';\nimport { useCSSCacheId } from '../css/CSSCacheProvider';\n\nexport const animationEases = {\n standard: \"cubic-bezier(0.4, 0, 0.2, 1)\",\n fast: \"cubic-bezier(0.2, 0, 0, 1)\",\n smooth: \"cubic-bezier(0.25, 0.46, 0.45, 0.94)\",\n linear: \"cubic-bezier(0, 0, 1, 1)\",\n bounce: \"cubic-bezier(0.34, 1.50, 0.64, 1)\",\n};\n\nexport interface UseAnimationProps {\n delay?: number;\n duration?: number;\n from: CSSProps;\n to: CSSProps;\n ease?: keyof typeof animationEases;\n}\n\nconst useAnimation = ({ from, to, delay, ease, duration }: UseAnimationProps) => {\n let _delay = delay || 0;\n let _duration = duration || 600;\n let _ease = ease || \"standard\"\n const id = \"anim\" + useId().replace(/:/g, \"\")\n const doc = useDocument()\n const cacheId = useCSSCacheId()\n\n const anim = css({\n animationName: id,\n animationDelay: _delay + \"ms\",\n animationDuration: _duration + \"ms\",\n animationTimingFunction: animationEases[_ease] || animationEases.standard,\n [`@keyframes ${id}`]: {\n from: from as any,\n to: to as any\n }\n }, {\n container: doc?.document,\n cacheId,\n injectStyle: typeof window !== 'undefined'\n })\n return anim.classname\n}\n\nexport default useAnimation"],"names":[],"mappings":";;;;;;AAOO;AACH;AACA;AACA;AACA;AACA;;AAWJ;AACI;AACA;AACA;AACA;AACA;AACA;;AAGI;;;;AAIA;AACI;AACA;AACH;;AAED;;AAEA;AACH;;AAEL;;"}
|