@lovince/motion 0.0.0-stage → 0.1.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/LICENSE +21 -0
- package/README.md +254 -2
- package/dist/accessibility/focus-management.d.ts +9 -0
- package/dist/accessibility/index.d.ts +2 -0
- package/dist/accessibility/reduced-motion.d.ts +7 -0
- package/dist/core/cleanup.d.ts +10 -0
- package/dist/core/config.d.ts +7 -0
- package/dist/core/context.d.ts +40 -0
- package/dist/core/entrance.d.ts +22 -0
- package/dist/core/index.d.ts +7 -0
- package/dist/core/preferences.d.ts +6 -0
- package/dist/core/targets.d.ts +4 -0
- package/dist/core/types.d.ts +20 -0
- package/dist/css/dom.d.ts +9 -0
- package/dist/css/fade-in.d.ts +25 -0
- package/dist/css/index.d.ts +3 -0
- package/dist/css/reveal.d.ts +22 -0
- package/dist/dom-CK6FnKcV.js +74 -0
- package/dist/focus-management-DTJ2C7Pn.js +8 -0
- package/dist/gsap/engine.d.ts +17 -0
- package/dist/gsap/horizontal-scroll.d.ts +14 -0
- package/dist/gsap/index.d.ts +8 -0
- package/dist/gsap/parallax.d.ts +14 -0
- package/dist/gsap/scroll-reveal.d.ts +18 -0
- package/dist/gsap/split-text.d.ts +27 -0
- package/dist/gsap/stagger.d.ts +15 -0
- package/dist/gsap/timeline.d.ts +23 -0
- package/dist/gsap.js +96 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +75 -0
- package/dist/presets/entrance.d.ts +20 -0
- package/dist/presets/image.d.ts +14 -0
- package/dist/presets/index.d.ts +5 -0
- package/dist/presets/navigation.d.ts +17 -0
- package/dist/presets/page-transition.d.ts +26 -0
- package/dist/presets/typography.d.ts +20 -0
- package/dist/presets.js +138 -0
- package/dist/reveal-By5zvLLc.js +39 -0
- package/dist/scroll/create-smooth-scroll.d.ts +37 -0
- package/dist/scroll/gsap-integration.d.ts +8 -0
- package/dist/scroll/index.d.ts +1 -0
- package/dist/scroll.js +89 -0
- package/dist/split-text-Cnl9gkUu.js +141 -0
- package/dist/targets-x7JiHhWI.js +49 -0
- package/dist/timeline-Cg3eq5ft.js +60 -0
- package/dist/vue/index.d.ts +27 -0
- package/dist/vue.js +33 -0
- package/package.json +97 -4
- package/styles/motion.css +4 -0
- package/styles/presets.css +58 -0
- package/styles/tokens.css +23 -0
- package/styles/utilities.css +128 -0
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Opt-in utilities. Every rule sits behind a `motion-*` class, so nothing
|
|
3
|
+
* here touches an element that did not ask for it. No JavaScript needed.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.motion-link {
|
|
7
|
+
position: relative;
|
|
8
|
+
text-decoration: none;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.motion-link::after {
|
|
12
|
+
content: '';
|
|
13
|
+
position: absolute;
|
|
14
|
+
inset-inline: 0;
|
|
15
|
+
bottom: -0.2em;
|
|
16
|
+
height: 1px;
|
|
17
|
+
background: currentColor;
|
|
18
|
+
transform: scaleX(0);
|
|
19
|
+
transform-origin: right;
|
|
20
|
+
transition: transform var(--motion-duration-normal) var(--motion-ease-standard);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.motion-link:hover::after,
|
|
24
|
+
.motion-link:focus-visible::after {
|
|
25
|
+
transform: scaleX(1);
|
|
26
|
+
transform-origin: left;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.motion-lift {
|
|
30
|
+
transition: transform var(--motion-duration-fast) var(--motion-ease-standard);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.motion-lift:hover,
|
|
34
|
+
.motion-lift:focus-visible {
|
|
35
|
+
transform: translate3d(0, calc(var(--motion-distance-sm) / -3), 0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.motion-press {
|
|
39
|
+
transition: transform var(--motion-duration-instant) var(--motion-ease-standard);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.motion-press:active {
|
|
43
|
+
transform: scale(0.97);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes motion-fade-up {
|
|
47
|
+
from {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translate3d(0, var(--motion-distance-md), 0);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
@keyframes motion-fade-in {
|
|
54
|
+
from {
|
|
55
|
+
opacity: 0;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
@keyframes motion-scale-in {
|
|
60
|
+
from {
|
|
61
|
+
opacity: 0;
|
|
62
|
+
transform: scale(0.94);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes motion-spin {
|
|
67
|
+
to {
|
|
68
|
+
transform: rotate(1turn);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@keyframes motion-pulse {
|
|
73
|
+
50% {
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* One-shot entrances on load; `--motion-delay` staggers them by hand. */
|
|
79
|
+
.motion-fade-up,
|
|
80
|
+
.motion-fade-in,
|
|
81
|
+
.motion-scale-in {
|
|
82
|
+
animation-duration: var(--motion-duration-slow);
|
|
83
|
+
animation-timing-function: var(--motion-ease-emphasized);
|
|
84
|
+
animation-delay: var(--motion-delay, 0s);
|
|
85
|
+
animation-fill-mode: both;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.motion-fade-up {
|
|
89
|
+
animation-name: motion-fade-up;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.motion-fade-in {
|
|
93
|
+
animation-name: motion-fade-in;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.motion-scale-in {
|
|
97
|
+
animation-name: motion-scale-in;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.motion-spin {
|
|
101
|
+
animation: motion-spin calc(var(--motion-duration-scene) * 1.5) linear infinite;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.motion-pulse {
|
|
105
|
+
animation: motion-pulse calc(var(--motion-duration-scene) * 2) var(--motion-ease-reversible) infinite;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@media (prefers-reduced-motion: reduce) {
|
|
109
|
+
.motion-link::after,
|
|
110
|
+
.motion-lift,
|
|
111
|
+
.motion-press {
|
|
112
|
+
transition: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.motion-lift:hover,
|
|
116
|
+
.motion-lift:focus-visible,
|
|
117
|
+
.motion-press:active {
|
|
118
|
+
transform: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.motion-fade-up,
|
|
122
|
+
.motion-fade-in,
|
|
123
|
+
.motion-scale-in,
|
|
124
|
+
.motion-spin,
|
|
125
|
+
.motion-pulse {
|
|
126
|
+
animation: none;
|
|
127
|
+
}
|
|
128
|
+
}
|