@vkzstudio/muza-ui 1.0.8 → 1.0.9
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/dist/components/Button/Button.js +19 -19
- package/dist/components/Button/ButtonLoader.d.ts +7 -0
- package/dist/components/Button/ButtonLoader.d.ts.map +1 -0
- package/dist/components/Button/ButtonLoader.js +40 -0
- package/dist/components/Icons/CustomIcons.js +1 -1
- package/dist/components/ReorderableTable/ReorderableTable.js +1 -1
- package/dist/components/SwipeButton/SwipeButton.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/resolve-subjects.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/animation/animate/subject.js +24 -24
- package/dist/node_modules/framer-motion/dist/es/animation/sequence/create.js +61 -56
- package/dist/node_modules/framer-motion/dist/es/animation/utils/create-visual-element.js +8 -8
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PopChild.js +32 -30
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js +22 -22
- package/dist/node_modules/framer-motion/dist/es/components/AnimatePresence/index.js +34 -32
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Group.js +34 -26
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/Item.js +30 -25
- package/dist/node_modules/framer-motion/dist/es/components/Reorder/utils/auto-scroll.js +64 -0
- package/dist/node_modules/framer-motion/dist/es/context/MotionContext/utils.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/events/add-pointer-event.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js +100 -89
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/index.js +11 -7
- package/dist/node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/gestures/focus.js +2 -2
- package/dist/node_modules/framer-motion/dist/es/gestures/hover.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/PanSession.js +106 -59
- package/dist/node_modules/framer-motion/dist/es/gestures/pan/index.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/gestures/press.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/exit.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/animation/index.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/motion/features/definitions.js +18 -6
- package/dist/node_modules/framer-motion/dist/es/motion/features/drag.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout/MeasureLayout.js +27 -42
- package/dist/node_modules/framer-motion/dist/es/motion/features/layout.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/features/load-features.js +10 -7
- package/dist/node_modules/framer-motion/dist/es/motion/features/viewport/index.js +4 -4
- package/dist/node_modules/framer-motion/dist/es/motion/index.js +49 -49
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js +18 -13
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js +41 -40
- package/dist/node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js +13 -13
- package/dist/node_modules/framer-motion/dist/es/render/dom/create-visual-element.js +6 -6
- package/dist/node_modules/framer-motion/dist/es/render/dom/use-render.js +12 -12
- package/dist/node_modules/framer-motion/dist/es/render/html/use-html-visual-state.js +3 -3
- package/dist/node_modules/framer-motion/dist/es/render/html/use-props.js +7 -7
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-props.js +5 -5
- package/dist/node_modules/framer-motion/dist/es/render/svg/use-svg-visual-state.js +1 -1
- package/dist/node_modules/framer-motion/dist/es/value/use-transform.js +26 -18
- package/dist/node_modules/motion-dom/dist/es/animation/AsyncMotionValueAnimation.js +33 -30
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimation.js +17 -17
- package/dist/node_modules/motion-dom/dist/es/animation/NativeAnimationExtended.js +20 -19
- package/dist/node_modules/motion-dom/dist/es/animation/animate/single-value.js +10 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/motion-value.js +13 -13
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-target.js +11 -11
- package/dist/node_modules/motion-dom/dist/es/animation/keyframes/DOMKeyframesResolver.js +24 -20
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/default-transitions.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/animation/utils/is-css-variable.js +7 -3
- package/dist/node_modules/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/animation/mix-values.js +2 -2
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-apply.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-calc.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/delta-remove.js +6 -6
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/DocumentProjectionNode.js +7 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/create-projection-node.js +149 -149
- package/dist/node_modules/motion-dom/dist/es/projection/shared/stack.js +60 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-border-radius.js +1 -1
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/scale-box-shadow.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/projection/styles/scale-correction.js +21 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/VisualElement.js +58 -50
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/dom/DOMVisualElement.js +7 -6
- package/dist/node_modules/motion-dom/dist/es/render/dom/utils/camel-to-dash.js +6 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/HTMLVisualElement.js +38 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-styles.js +29 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/build-transform.js +37 -0
- package/dist/node_modules/motion-dom/dist/es/render/html/utils/scrape-motion-values.js +14 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/SVGVisualElement.js +40 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/build-attrs.js +32 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/path.js +15 -0
- package/dist/node_modules/motion-dom/dist/es/render/svg/utils/scrape-motion-values.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/animation-state.js +31 -31
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-controlling-variants.js +1 -1
- package/dist/node_modules/motion-dom/dist/es/render/utils/is-forced-motion-value.js +9 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/motion-values.js +6 -6
- package/dist/node_modules/motion-dom/dist/es/render/utils/reduced-motion/index.js +15 -0
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/setters.js +4 -4
- package/dist/node_modules/{framer-motion → motion-dom}/dist/es/utils/delay.js +2 -2
- package/dist/node_modules/motion-dom/dist/es/utils/resolve-elements.js +8 -6
- package/dist/node_modules/motion-dom/dist/es/value/types/maps/number.js +62 -42
- package/dist/node_modules/motion-dom/dist/es/value/utils/resolve-motion-value.js +7 -0
- package/dist/node_modules/motion-dom/dist/es/value/will-change/is.js +7 -0
- package/dist/node_modules/motion-utils/dist/es/errors.js +10 -9
- package/package.json +1 -1
- package/dist/node_modules/framer-motion/dist/es/animation/animate/single-value.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js +0 -8
- package/dist/node_modules/framer-motion/dist/es/projection/shared/stack.js +0 -58
- package/dist/node_modules/framer-motion/dist/es/projection/styles/scale-correction.js +0 -10
- package/dist/node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js +0 -4
- package/dist/node_modules/framer-motion/dist/es/render/html/HTMLVisualElement.js +0 -38
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-styles.js +0 -29
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/build-transform.js +0 -31
- package/dist/node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js +0 -12
- package/dist/node_modules/framer-motion/dist/es/render/svg/SVGVisualElement.js +0 -40
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js +0 -23
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/path.js +0 -18
- package/dist/node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js +0 -15
- package/dist/node_modules/framer-motion/dist/es/utils/reduced-motion/index.js +0 -13
- package/dist/node_modules/framer-motion/dist/es/value/use-will-change/is.js +0 -7
- package/dist/node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js +0 -7
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element-variant.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/interfaces/visual-element.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/data-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/optimized-appear/get-appear-id.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/calc-child-stagger.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation}/utils/get-final-keyframe.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/animation/utils/is-transition-defined.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/events/add-dom-event.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/conversion.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/copy.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/models.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/geometry/utils.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/HTMLProjectionNode.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/node/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/styles/transform.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/compare-by-depth.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/each-axis.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/render → motion-dom/dist/es/projection}/utils/flat-tree.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/has-transform.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/projection/utils/measure.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/motion/features → motion-dom/dist/es/render}/Feature.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/html/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/object/ObjectVisualElement.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/store.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/camel-case-attrs.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/is-svg-tag.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/svg/utils/render.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/get-variant-context.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-animation-controls.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/animation → motion-dom/dist/es/render}/utils/is-keyframes-target.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/is-variant-label.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/reduced-motion/state.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-dynamic-variants.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/resolve-variants.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es → motion-dom/dist/es/render}/utils/shallow-compare.js +0 -0
- /package/dist/node_modules/{framer-motion → motion-dom}/dist/es/render/utils/variant-props.js +0 -0
- /package/dist/node_modules/{framer-motion/dist/es/value/use-will-change → motion-dom/dist/es/value/will-change}/add-will-change.js +0 -0
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as x from "react";
|
|
3
3
|
import "class-variance-authority";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Typography as
|
|
4
|
+
import { ButtonLoader as b } from "./ButtonLoader.js";
|
|
5
|
+
import { buttonVariants as N } from "./buttonVariants.js";
|
|
6
|
+
import { Typography as B } from "../Typography/Typography.js";
|
|
7
7
|
import { cn as n } from "../../utils/cn.js";
|
|
8
|
-
const
|
|
8
|
+
const h = x.forwardRef(
|
|
9
9
|
({
|
|
10
10
|
className: f,
|
|
11
11
|
variant: i,
|
|
12
12
|
size: t,
|
|
13
13
|
fullWidth: c,
|
|
14
|
-
asChild:
|
|
14
|
+
asChild: u = !1,
|
|
15
15
|
icon: r,
|
|
16
16
|
iconPosition: m = "start",
|
|
17
17
|
ghost: e = !1,
|
|
18
18
|
danger: p = !1,
|
|
19
19
|
loading: a = !1,
|
|
20
|
-
children:
|
|
21
|
-
...
|
|
20
|
+
children: o,
|
|
21
|
+
...l
|
|
22
22
|
}, y) => /* @__PURE__ */ d(
|
|
23
|
-
|
|
23
|
+
u ? "span" : "button",
|
|
24
24
|
{
|
|
25
25
|
className: n(
|
|
26
|
-
|
|
26
|
+
N({
|
|
27
27
|
variant: i,
|
|
28
28
|
size: t,
|
|
29
29
|
fullWidth: c,
|
|
30
|
-
iconOnly: !
|
|
30
|
+
iconOnly: !o,
|
|
31
31
|
ghost: e,
|
|
32
32
|
danger: p,
|
|
33
33
|
loading: a,
|
|
@@ -37,12 +37,12 @@ const j = x.forwardRef(
|
|
|
37
37
|
ref: y,
|
|
38
38
|
"data-ghost": e,
|
|
39
39
|
"data-danger": p,
|
|
40
|
-
...
|
|
40
|
+
...l,
|
|
41
41
|
children: [
|
|
42
|
-
a && /* @__PURE__ */
|
|
42
|
+
a && /* @__PURE__ */ s("span", { className: "absolute", children: /* @__PURE__ */ s(b, {}) }),
|
|
43
43
|
m === "start" && r,
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
o && /* @__PURE__ */ s(
|
|
45
|
+
B,
|
|
46
46
|
{
|
|
47
47
|
variant: "cta",
|
|
48
48
|
size: t == "sm" || t == "xs" ? "sm" : "base",
|
|
@@ -52,7 +52,7 @@ const j = x.forwardRef(
|
|
|
52
52
|
className: n("transition-opacity", {
|
|
53
53
|
"opacity-0": a
|
|
54
54
|
}),
|
|
55
|
-
children:
|
|
55
|
+
children: o
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
58
|
m === "end" && r
|
|
@@ -60,8 +60,8 @@ const j = x.forwardRef(
|
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
);
|
|
63
|
-
|
|
63
|
+
h.displayName = "Button";
|
|
64
64
|
export {
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
h as Button,
|
|
66
|
+
N as buttonVariants
|
|
67
67
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ButtonLoaderProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
}
|
|
5
|
+
declare const ButtonLoader: React.ForwardRefExoticComponent<ButtonLoaderProps & React.RefAttributes<SVGSVGElement>>;
|
|
6
|
+
export { ButtonLoader };
|
|
7
|
+
//# sourceMappingURL=ButtonLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonLoader.d.ts","sourceRoot":"","sources":["../../../src/components/Button/ButtonLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,YAAY,yFA2BjB,CAAA;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as o from "react";
|
|
3
|
+
import { cn as a } from "../../utils/cn.js";
|
|
4
|
+
const i = o.forwardRef(
|
|
5
|
+
({ className: r }, e) => /* @__PURE__ */ t(
|
|
6
|
+
"svg",
|
|
7
|
+
{
|
|
8
|
+
ref: e,
|
|
9
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10
|
+
width: "24",
|
|
11
|
+
height: "24",
|
|
12
|
+
viewBox: "0 0 24 24",
|
|
13
|
+
fill: "none",
|
|
14
|
+
className: a(r),
|
|
15
|
+
children: /* @__PURE__ */ t(
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M2 12C2 6.47715 6.47715 2 12 2C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z",
|
|
19
|
+
fill: "currentColor",
|
|
20
|
+
children: /* @__PURE__ */ t(
|
|
21
|
+
"animateTransform",
|
|
22
|
+
{
|
|
23
|
+
attributeType: "xml",
|
|
24
|
+
attributeName: "transform",
|
|
25
|
+
type: "rotate",
|
|
26
|
+
from: "-10 12 12",
|
|
27
|
+
to: "360 12 12",
|
|
28
|
+
dur: "0.75s",
|
|
29
|
+
repeatCount: "indefinite"
|
|
30
|
+
}
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
);
|
|
37
|
+
i.displayName = "ButtonLoader";
|
|
38
|
+
export {
|
|
39
|
+
i as ButtonLoader
|
|
40
|
+
};
|
|
@@ -423,7 +423,7 @@ const _ = r(
|
|
|
423
423
|
(L, l) => /* @__PURE__ */ C(e, { ref: l, ...L, children: /* @__PURE__ */ C(
|
|
424
424
|
"path",
|
|
425
425
|
{
|
|
426
|
-
d: "
|
|
426
|
+
d: "M2 12C2 6.47715 6.47715 2 12 2C12.5523 2 13 2.44772 13 3C13 3.55228 12.5523 4 12 4C7.58172 4 4 7.58172 4 12C4 16.4183 7.58172 20 12 20C16.4183 20 20 16.4183 20 12C20 11.4477 20.4477 11 21 11C21.5523 11 22 11.4477 22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12Z",
|
|
427
427
|
fill: "currentColor"
|
|
428
428
|
}
|
|
429
429
|
) })
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I } from "react";
|
|
3
3
|
import { typographyVariants as T, Typography as w } from "../Typography/Typography.js";
|
|
4
|
+
import { motion as n } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
4
5
|
import { ReorderableGroup as A, ReorderableItem as C, ReorderableHandle as H } from "../Reorderable/Reorderable.js";
|
|
5
6
|
import { Reorder as O } from "../Icons/CustomIcons.js";
|
|
6
7
|
import { cn as s } from "../../utils/cn.js";
|
|
7
|
-
import { motion as n } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
8
8
|
const p = 72, u = 20, k = 24, E = 4, D = ({
|
|
9
9
|
data: b,
|
|
10
10
|
onReorder: N,
|
|
@@ -9,11 +9,11 @@ import { useMotionValue as J } from "../../node_modules/framer-motion/dist/es/va
|
|
|
9
9
|
import { useTransform as T } from "../../node_modules/framer-motion/dist/es/value/use-transform.js";
|
|
10
10
|
import { useMotionValueEvent as Q } from "../../node_modules/framer-motion/dist/es/utils/use-motion-value-event.js";
|
|
11
11
|
import { animate as u } from "../../node_modules/framer-motion/dist/es/animation/animate/index.js";
|
|
12
|
+
import { motion as E } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
12
13
|
import { Typography as V } from "../Typography/Typography.js";
|
|
13
14
|
import { DoubleArrowRight as X } from "../Icons/CustomIcons.js";
|
|
14
15
|
import { useDragControls as Z } from "../../node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js";
|
|
15
16
|
import { cn as y } from "../../utils/cn.js";
|
|
16
|
-
import { motion as E } from "../../node_modules/framer-motion/dist/es/render/components/motion/proxy.js";
|
|
17
17
|
import { UnreadOutline as ee } from "@solar-icons/react-perf";
|
|
18
18
|
const ve = ({
|
|
19
19
|
text: z,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { isDOMKeyframes as
|
|
2
|
-
import { resolveElements as
|
|
3
|
-
function s(r, e,
|
|
4
|
-
return typeof r == "string" &&
|
|
1
|
+
import { isDOMKeyframes as o } from "../utils/is-dom-keyframes.js";
|
|
2
|
+
import { resolveElements as l } from "../../../../../motion-dom/dist/es/utils/resolve-elements.js";
|
|
3
|
+
function s(r, e, i, n) {
|
|
4
|
+
return r == null ? [] : typeof r == "string" && o(e) ? l(r, i, n) : r instanceof NodeList ? Array.from(r) : Array.isArray(r) ? r.filter((f) => f != null) : [r];
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
7
|
s as resolveSubjects
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { isMotionValue as
|
|
8
|
-
import { invariant as
|
|
9
|
-
function
|
|
10
|
-
return
|
|
1
|
+
import { createDOMVisualElement as d, createObjectVisualElement as v } from "../utils/create-visual-element.js";
|
|
2
|
+
import { isDOMKeyframes as f } from "../utils/is-dom-keyframes.js";
|
|
3
|
+
import { resolveSubjects as S } from "./resolve-subjects.js";
|
|
4
|
+
import { animateSingleValue as g } from "../../../../../motion-dom/dist/es/animation/animate/single-value.js";
|
|
5
|
+
import { visualElementStore as u } from "../../../../../motion-dom/dist/es/render/store.js";
|
|
6
|
+
import { animateTarget as E } from "../../../../../motion-dom/dist/es/animation/interfaces/visual-element-target.js";
|
|
7
|
+
import { isMotionValue as V } from "../../../../../motion-dom/dist/es/value/utils/is-motion-value.js";
|
|
8
|
+
import { invariant as h } from "../../../../../motion-utils/dist/es/errors.js";
|
|
9
|
+
function M(e, t) {
|
|
10
|
+
return V(e) || typeof e == "number" || typeof e == "string" && !f(t);
|
|
11
11
|
}
|
|
12
|
-
function N(
|
|
13
|
-
const
|
|
14
|
-
if (
|
|
15
|
-
|
|
12
|
+
function N(e, t, n, s) {
|
|
13
|
+
const o = [];
|
|
14
|
+
if (M(e, t))
|
|
15
|
+
o.push(g(e, f(t) && t.default || t, n && (n.default || n)));
|
|
16
16
|
else {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
u.has(
|
|
24
|
-
const p = u.get(
|
|
25
|
-
"delay" in
|
|
17
|
+
if (e == null)
|
|
18
|
+
return o;
|
|
19
|
+
const m = S(e, t, s), a = m.length;
|
|
20
|
+
h(!!a, "No valid elements provided.", "no-valid-elements");
|
|
21
|
+
for (let l = 0; l < a; l++) {
|
|
22
|
+
const r = m[l], c = r instanceof Element ? d : v;
|
|
23
|
+
u.has(r) || c(r);
|
|
24
|
+
const p = u.get(r), i = { ...n };
|
|
25
|
+
"delay" in i && typeof i.delay == "function" && (i.delay = i.delay(l, a)), o.push(...E(p, { ...t, transition: i }, {}));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return o;
|
|
29
29
|
}
|
|
30
30
|
export {
|
|
31
31
|
N as animateSubject
|
|
@@ -13,111 +13,116 @@ import { isGenerator as oe } from "../../../../../motion-dom/dist/es/animation/g
|
|
|
13
13
|
import { secondsToMilliseconds as re } from "../../../../../motion-utils/dist/es/time-conversion.js";
|
|
14
14
|
import { invariant as se } from "../../../../../motion-utils/dist/es/errors.js";
|
|
15
15
|
import { progress as ie } from "../../../../../motion-utils/dist/es/progress.js";
|
|
16
|
-
const ae = "easeInOut",
|
|
17
|
-
function Ke(e, { defaultTransition: n = {}, ...
|
|
18
|
-
const
|
|
19
|
-
let
|
|
16
|
+
const ae = "easeInOut", ce = 20;
|
|
17
|
+
function Ke(e, { defaultTransition: n = {}, ...B } = {}, C, O) {
|
|
18
|
+
const P = n.duration || 0.3, M = /* @__PURE__ */ new Map(), K = /* @__PURE__ */ new Map(), X = {}, v = /* @__PURE__ */ new Map();
|
|
19
|
+
let I = 0, l = 0, x = 0;
|
|
20
20
|
for (let g = 0; g < e.length; g++) {
|
|
21
21
|
const s = e[g];
|
|
22
22
|
if (typeof s == "string") {
|
|
23
|
-
v.set(s,
|
|
23
|
+
v.set(s, l);
|
|
24
24
|
continue;
|
|
25
25
|
} else if (!Array.isArray(s)) {
|
|
26
|
-
v.set(s.name, F(
|
|
26
|
+
v.set(s.name, F(l, s.at, I, v));
|
|
27
27
|
continue;
|
|
28
28
|
}
|
|
29
|
-
let [
|
|
30
|
-
o.at !== void 0 && (
|
|
29
|
+
let [p, i, o = {}] = s;
|
|
30
|
+
o.at !== void 0 && (l = F(l, o.at, I, v));
|
|
31
31
|
let r = 0;
|
|
32
|
-
const y = (a,
|
|
33
|
-
const t =
|
|
34
|
-
let { ease:
|
|
35
|
-
const w = typeof
|
|
32
|
+
const y = (a, d, m, h = 0, b = 0) => {
|
|
33
|
+
const t = fe(a), { delay: A = 0, times: c = $(t), type: V = n.type || "keyframes", repeat: S, repeatType: pe, repeatDelay: he = 0, ...H } = d;
|
|
34
|
+
let { ease: u = n.ease || "easeOut", duration: f } = d;
|
|
35
|
+
const w = typeof A == "function" ? A(h, b) : A, G = t.length, L = oe(V) ? V : O == null ? void 0 : O[V || "keyframes"];
|
|
36
36
|
if (G <= 2 && L) {
|
|
37
|
-
let
|
|
37
|
+
let T = 100;
|
|
38
38
|
if (G === 2 && le(t)) {
|
|
39
|
-
const
|
|
40
|
-
|
|
39
|
+
const D = t[1] - t[0];
|
|
40
|
+
T = Math.abs(D);
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
const j = {
|
|
43
|
+
...n,
|
|
44
|
+
...H
|
|
45
|
+
};
|
|
46
|
+
f !== void 0 && (j.duration = re(f));
|
|
47
|
+
const k = ee(j, T, L);
|
|
48
|
+
u = k.ease, f = k.duration;
|
|
46
49
|
}
|
|
47
|
-
|
|
48
|
-
const N =
|
|
50
|
+
f ?? (f = P);
|
|
51
|
+
const N = l + w;
|
|
49
52
|
c.length === 1 && c[0] === 0 && (c[1] = 1);
|
|
50
53
|
const R = c.length - t.length;
|
|
51
|
-
if (R > 0 && te(c, R), t.length === 1 && t.unshift(null),
|
|
52
|
-
se(
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const
|
|
56
|
-
for (let
|
|
57
|
-
t.push(...
|
|
58
|
-
for (let E = 0; E <
|
|
59
|
-
c.push(
|
|
54
|
+
if (R > 0 && te(c, R), t.length === 1 && t.unshift(null), S) {
|
|
55
|
+
se(S < ce, "Repeat count too high, must be less than 20", "repeat-count-high"), f = Q(f, S);
|
|
56
|
+
const T = [...t], j = [...c];
|
|
57
|
+
u = Array.isArray(u) ? [...u] : [u];
|
|
58
|
+
const k = [...u];
|
|
59
|
+
for (let D = 0; D < S; D++) {
|
|
60
|
+
t.push(...T);
|
|
61
|
+
for (let E = 0; E < T.length; E++)
|
|
62
|
+
c.push(j[E] + (D + 1)), u.push(E === 0 ? "linear" : ne(k, E - 1));
|
|
60
63
|
}
|
|
61
|
-
W(c,
|
|
64
|
+
W(c, S);
|
|
62
65
|
}
|
|
63
|
-
const q = N +
|
|
64
|
-
U(m, t,
|
|
66
|
+
const q = N + f;
|
|
67
|
+
U(m, t, u, c, N, q), r = Math.max(w + f, r), x = Math.max(q, x);
|
|
65
68
|
};
|
|
66
|
-
if (Z(
|
|
67
|
-
const a =
|
|
68
|
-
y(i, o,
|
|
69
|
+
if (Z(p)) {
|
|
70
|
+
const a = _(p, K);
|
|
71
|
+
y(i, o, z("default", a));
|
|
69
72
|
} else {
|
|
70
|
-
const a = J(
|
|
71
|
-
for (let m = 0; m <
|
|
73
|
+
const a = J(p, i, C, X), d = a.length;
|
|
74
|
+
for (let m = 0; m < d; m++) {
|
|
72
75
|
i = i, o = o;
|
|
73
|
-
const
|
|
76
|
+
const h = a[m], b = _(h, K);
|
|
74
77
|
for (const t in i)
|
|
75
|
-
y(i[t],
|
|
78
|
+
y(i[t], me(o, t), z(t, b), m, d);
|
|
76
79
|
}
|
|
77
80
|
}
|
|
78
|
-
|
|
81
|
+
I = l, l += r;
|
|
79
82
|
}
|
|
80
|
-
return
|
|
81
|
-
for (const
|
|
82
|
-
const i = g[
|
|
83
|
+
return K.forEach((g, s) => {
|
|
84
|
+
for (const p in g) {
|
|
85
|
+
const i = g[p];
|
|
83
86
|
i.sort(Y);
|
|
84
87
|
const o = [], r = [], y = [];
|
|
85
|
-
for (let
|
|
86
|
-
const { at:
|
|
87
|
-
o.push(
|
|
88
|
+
for (let h = 0; h < i.length; h++) {
|
|
89
|
+
const { at: b, value: t, easing: A } = i[h];
|
|
90
|
+
o.push(t), r.push(ie(0, x, b)), y.push(A || "easeOut");
|
|
88
91
|
}
|
|
89
92
|
r[0] !== 0 && (r.unshift(0), o.unshift(o[0]), y.unshift(ae)), r[r.length - 1] !== 1 && (r.push(1), o.push(null)), M.has(s) || M.set(s, {
|
|
90
93
|
keyframes: {},
|
|
91
94
|
transition: {}
|
|
92
95
|
});
|
|
93
96
|
const a = M.get(s);
|
|
94
|
-
a.keyframes[
|
|
95
|
-
|
|
97
|
+
a.keyframes[p] = o;
|
|
98
|
+
const { type: d, ...m } = n;
|
|
99
|
+
a.transition[p] = {
|
|
100
|
+
...m,
|
|
96
101
|
duration: x,
|
|
97
102
|
ease: y,
|
|
98
103
|
times: r,
|
|
99
|
-
...
|
|
104
|
+
...B
|
|
100
105
|
};
|
|
101
106
|
}
|
|
102
107
|
}), M;
|
|
103
108
|
}
|
|
104
|
-
function
|
|
109
|
+
function _(e, n) {
|
|
105
110
|
return !n.has(e) && n.set(e, {}), n.get(e);
|
|
106
111
|
}
|
|
107
|
-
function
|
|
112
|
+
function z(e, n) {
|
|
108
113
|
return n[e] || (n[e] = []), n[e];
|
|
109
114
|
}
|
|
110
|
-
function
|
|
115
|
+
function fe(e) {
|
|
111
116
|
return Array.isArray(e) ? e : [e];
|
|
112
117
|
}
|
|
113
|
-
function
|
|
118
|
+
function me(e, n) {
|
|
114
119
|
return e && e[n] ? {
|
|
115
120
|
...e,
|
|
116
121
|
...e[n]
|
|
117
122
|
} : { ...e };
|
|
118
123
|
}
|
|
119
|
-
const
|
|
124
|
+
const ue = (e) => typeof e == "number", le = (e) => e.every(ue);
|
|
120
125
|
export {
|
|
121
126
|
Ke as createAnimationsFromSequence,
|
|
122
|
-
|
|
127
|
+
me as getValueTransition
|
|
123
128
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { isSVGElement as r } from "../../../../../motion-dom/dist/es/utils/is-svg-element.js";
|
|
2
|
+
import { isSVGSVGElement as s } from "../../../../../motion-dom/dist/es/utils/is-svg-svg-element.js";
|
|
3
|
+
import { SVGVisualElement as a } from "../../../../../motion-dom/dist/es/render/svg/SVGVisualElement.js";
|
|
4
|
+
import { HTMLVisualElement as i } from "../../../../../motion-dom/dist/es/render/html/HTMLVisualElement.js";
|
|
5
|
+
import { visualElementStore as n } from "../../../../../motion-dom/dist/es/render/store.js";
|
|
6
|
+
import { ObjectVisualElement as l } from "../../../../../motion-dom/dist/es/render/object/ObjectVisualElement.js";
|
|
7
7
|
function S(t) {
|
|
8
8
|
const o = {
|
|
9
9
|
presenceContext: null,
|
|
@@ -18,7 +18,7 @@ function S(t) {
|
|
|
18
18
|
},
|
|
19
19
|
latestValues: {}
|
|
20
20
|
}
|
|
21
|
-
}, e =
|
|
21
|
+
}, e = r(t) && !s(t) ? new a(o) : new i(o);
|
|
22
22
|
e.mount(t), n.set(t, e);
|
|
23
23
|
}
|
|
24
24
|
function E(t) {
|
|
@@ -31,7 +31,7 @@ function E(t) {
|
|
|
31
31
|
},
|
|
32
32
|
latestValues: {}
|
|
33
33
|
}
|
|
34
|
-
}, e = new
|
|
34
|
+
}, e = new l(o);
|
|
35
35
|
e.mount(t), n.set(t, e);
|
|
36
36
|
}
|
|
37
37
|
export {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { MotionConfigContext as
|
|
5
|
-
import { useComposedRefs as
|
|
6
|
-
import { isHTMLElement as
|
|
7
|
-
class
|
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import { useId as H, useRef as l, useContext as y, useInsertionEffect as I } from "react";
|
|
4
|
+
import { MotionConfigContext as M } from "../../context/MotionConfigContext.js";
|
|
5
|
+
import { useComposedRefs as W } from "../../utils/use-composed-ref.js";
|
|
6
|
+
import { isHTMLElement as u } from "../../../../../motion-dom/dist/es/utils/is-html-element.js";
|
|
7
|
+
class L extends g.Component {
|
|
8
8
|
getSnapshotBeforeUpdate(i) {
|
|
9
9
|
const e = this.props.childRef.current;
|
|
10
10
|
if (e && i.isPresent && !this.props.isPresent) {
|
|
11
|
-
const
|
|
12
|
-
t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right =
|
|
11
|
+
const n = e.offsetParent, p = u(n) && n.offsetWidth || 0, r = u(n) && n.offsetHeight || 0, t = this.props.sizeRef.current;
|
|
12
|
+
t.height = e.offsetHeight || 0, t.width = e.offsetWidth || 0, t.top = e.offsetTop, t.left = e.offsetLeft, t.right = p - t.width - t.left, t.bottom = r - t.height - t.top;
|
|
13
13
|
}
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
@@ -22,36 +22,38 @@ class M extends a.Component {
|
|
|
22
22
|
return this.props.children;
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
|
|
25
|
+
function D({ children: o, isPresent: i, anchorX: e, anchorY: n, root: p }) {
|
|
26
|
+
var c;
|
|
27
|
+
const r = H(), t = l(null), h = l({
|
|
27
28
|
width: 0,
|
|
28
29
|
height: 0,
|
|
29
30
|
top: 0,
|
|
30
31
|
left: 0,
|
|
31
|
-
right: 0
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
right: 0,
|
|
33
|
+
bottom: 0
|
|
34
|
+
}), { nonce: m } = y(M), x = ((c = o.props) == null ? void 0 : c.ref) ?? (o == null ? void 0 : o.ref), R = W(t, x);
|
|
35
|
+
return I(() => {
|
|
36
|
+
const { width: d, height: a, top: C, left: $, right: b, bottom: w } = h.current;
|
|
37
|
+
if (i || !t.current || !d || !a)
|
|
36
38
|
return;
|
|
37
|
-
const
|
|
38
|
-
t.current.dataset.motionPopId =
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
return
|
|
43
|
-
[data-motion-pop-id="${
|
|
39
|
+
const P = e === "left" ? `left: ${$}` : `right: ${b}`, z = n === "bottom" ? `bottom: ${w}` : `top: ${C}`;
|
|
40
|
+
t.current.dataset.motionPopId = r;
|
|
41
|
+
const s = document.createElement("style");
|
|
42
|
+
m && (s.nonce = m);
|
|
43
|
+
const f = p ?? document.head;
|
|
44
|
+
return f.appendChild(s), s.sheet && s.sheet.insertRule(`
|
|
45
|
+
[data-motion-pop-id="${r}"] {
|
|
44
46
|
position: absolute !important;
|
|
45
|
-
width: ${
|
|
46
|
-
height: ${
|
|
47
|
-
${
|
|
48
|
-
|
|
47
|
+
width: ${d}px !important;
|
|
48
|
+
height: ${a}px !important;
|
|
49
|
+
${P}px !important;
|
|
50
|
+
${z}px !important;
|
|
49
51
|
}
|
|
50
52
|
`), () => {
|
|
51
|
-
|
|
53
|
+
f.contains(s) && f.removeChild(s);
|
|
52
54
|
};
|
|
53
|
-
}, [i]),
|
|
55
|
+
}, [i]), E(L, { isPresent: i, childRef: t, sizeRef: h, children: g.cloneElement(o, { ref: R }) });
|
|
54
56
|
}
|
|
55
57
|
export {
|
|
56
|
-
|
|
58
|
+
D as PopChild
|
|
57
59
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
3
|
-
import { useId as
|
|
4
|
-
import { PresenceContext as
|
|
5
|
-
import { useConstant as
|
|
6
|
-
import { PopChild as
|
|
7
|
-
const _ = ({ children: f, initial: i, isPresent: r, onExitComplete:
|
|
8
|
-
const e =
|
|
9
|
-
let u = !0,
|
|
10
|
-
id:
|
|
2
|
+
import * as M from "react";
|
|
3
|
+
import { useId as w, useMemo as c } from "react";
|
|
4
|
+
import { PresenceContext as x } from "../../context/PresenceContext.js";
|
|
5
|
+
import { useConstant as R } from "../../utils/use-constant.js";
|
|
6
|
+
import { PopChild as g } from "./PopChild.js";
|
|
7
|
+
const _ = ({ children: f, initial: i, isPresent: r, onExitComplete: o, custom: m, presenceAffectsLayout: p, mode: l, anchorX: d, anchorY: h, root: C }) => {
|
|
8
|
+
const e = R(j), v = w();
|
|
9
|
+
let u = !0, n = c(() => (u = !1, {
|
|
10
|
+
id: v,
|
|
11
11
|
initial: i,
|
|
12
12
|
isPresent: r,
|
|
13
13
|
custom: m,
|
|
14
|
-
onExitComplete: (
|
|
15
|
-
e.set(
|
|
16
|
-
for (const
|
|
17
|
-
if (!
|
|
14
|
+
onExitComplete: (t) => {
|
|
15
|
+
e.set(t, !0);
|
|
16
|
+
for (const s of e.values())
|
|
17
|
+
if (!s)
|
|
18
18
|
return;
|
|
19
|
-
|
|
19
|
+
o && o();
|
|
20
20
|
},
|
|
21
|
-
register: (
|
|
22
|
-
}), [r, e,
|
|
23
|
-
return p && u && (
|
|
24
|
-
e.forEach((
|
|
25
|
-
}, [r]),
|
|
26
|
-
!r && !e.size &&
|
|
27
|
-
}, [r]), l === "popLayout" && (f = a(
|
|
21
|
+
register: (t) => (e.set(t, !1), () => e.delete(t))
|
|
22
|
+
}), [r, e, o]);
|
|
23
|
+
return p && u && (n = { ...n }), c(() => {
|
|
24
|
+
e.forEach((t, s) => e.set(s, !1));
|
|
25
|
+
}, [r]), M.useEffect(() => {
|
|
26
|
+
!r && !e.size && o && o();
|
|
27
|
+
}, [r]), l === "popLayout" && (f = a(g, { isPresent: r, anchorX: d, anchorY: h, root: C, children: f })), a(x.Provider, { value: n, children: f });
|
|
28
28
|
};
|
|
29
|
-
function
|
|
29
|
+
function j() {
|
|
30
30
|
return /* @__PURE__ */ new Map();
|
|
31
31
|
}
|
|
32
32
|
export {
|