@fylib/animation 0.1.0 → 0.2.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/dist/default-animations.js +382 -382
- package/package.json +23 -21
|
@@ -1,333 +1,333 @@
|
|
|
1
1
|
import { animationEngine } from './engine';
|
|
2
|
-
const buttonAnimationsCss = `
|
|
3
|
-
.fy-anim-button-hover-soft:hover {
|
|
4
|
-
transform: translateY(-1px);
|
|
5
|
-
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.fy-anim-button-hover-glow:hover {
|
|
9
|
-
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.fy-anim-button-hover-lift:hover {
|
|
13
|
-
transform: translateY(-2px) scale(1.02);
|
|
14
|
-
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.fy-anim-button-click-press:active {
|
|
18
|
-
transform: translateY(1px) scale(0.97);
|
|
19
|
-
}
|
|
2
|
+
const buttonAnimationsCss = `
|
|
3
|
+
.fy-anim-button-hover-soft:hover {
|
|
4
|
+
transform: translateY(-1px);
|
|
5
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.fy-anim-button-hover-glow:hover {
|
|
9
|
+
box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.fy-anim-button-hover-lift:hover {
|
|
13
|
+
transform: translateY(-2px) scale(1.02);
|
|
14
|
+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fy-anim-button-click-press:active {
|
|
18
|
+
transform: translateY(1px) scale(0.97);
|
|
19
|
+
}
|
|
20
20
|
`;
|
|
21
|
-
const layoutAnimationsCss = `
|
|
22
|
-
.fy-anim-layout-fade-in {
|
|
23
|
-
animation: fy-layout-fade-in 0.4s ease-out;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@keyframes fy-layout-fade-in {
|
|
27
|
-
from {
|
|
28
|
-
opacity: 0;
|
|
29
|
-
transform: translateY(8px);
|
|
30
|
-
}
|
|
31
|
-
to {
|
|
32
|
-
opacity: 1;
|
|
33
|
-
transform: translateY(0);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
21
|
+
const layoutAnimationsCss = `
|
|
22
|
+
.fy-anim-layout-fade-in {
|
|
23
|
+
animation: fy-layout-fade-in 0.4s ease-out;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@keyframes fy-layout-fade-in {
|
|
27
|
+
from {
|
|
28
|
+
opacity: 0;
|
|
29
|
+
transform: translateY(8px);
|
|
30
|
+
}
|
|
31
|
+
to {
|
|
32
|
+
opacity: 1;
|
|
33
|
+
transform: translateY(0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
36
|
`;
|
|
37
|
-
const sidebarAnimationsCss = `
|
|
38
|
-
.fy-anim-sidebar-slide-in {
|
|
39
|
-
animation: fy-sidebar-slide-in 0.25s ease-out;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.fy-anim-sidebar-slide-out {
|
|
43
|
-
animation: fy-sidebar-slide-out 0.25s ease-in;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
@keyframes fy-sidebar-slide-in {
|
|
47
|
-
from {
|
|
48
|
-
transform: translateX(-100%);
|
|
49
|
-
}
|
|
50
|
-
to {
|
|
51
|
-
transform: translateX(0);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
@keyframes fy-sidebar-slide-out {
|
|
56
|
-
from {
|
|
57
|
-
transform: translateX(0);
|
|
58
|
-
}
|
|
59
|
-
to {
|
|
60
|
-
transform: translateX(-100%);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
37
|
+
const sidebarAnimationsCss = `
|
|
38
|
+
.fy-anim-sidebar-slide-in {
|
|
39
|
+
animation: fy-sidebar-slide-in 0.25s ease-out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.fy-anim-sidebar-slide-out {
|
|
43
|
+
animation: fy-sidebar-slide-out 0.25s ease-in;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@keyframes fy-sidebar-slide-in {
|
|
47
|
+
from {
|
|
48
|
+
transform: translateX(-100%);
|
|
49
|
+
}
|
|
50
|
+
to {
|
|
51
|
+
transform: translateX(0);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes fy-sidebar-slide-out {
|
|
56
|
+
from {
|
|
57
|
+
transform: translateX(0);
|
|
58
|
+
}
|
|
59
|
+
to {
|
|
60
|
+
transform: translateX(-100%);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
63
|
`;
|
|
64
|
-
const headerMenuAnimationsCss = `
|
|
65
|
-
.fy-anim-header-menu-dropdown-in {
|
|
66
|
-
animation: fy-header-menu-dropdown-in 0.25s ease-out;
|
|
67
|
-
}
|
|
68
|
-
.fy-anim-header-menu-dropdown-out {
|
|
69
|
-
animation: fy-header-menu-dropdown-out 0.25s ease-in;
|
|
70
|
-
}
|
|
71
|
-
@keyframes fy-header-menu-dropdown-in {
|
|
72
|
-
from { transform: translateY(-8px); opacity: 0; }
|
|
73
|
-
to { transform: translateY(0); opacity: 1; }
|
|
74
|
-
}
|
|
75
|
-
@keyframes fy-header-menu-dropdown-out {
|
|
76
|
-
from { transform: translateY(0); opacity: 1; }
|
|
77
|
-
to { transform: translateY(-8px); opacity: 0; }
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.fy-anim-header-menu-macos-slide-in {
|
|
81
|
-
animation: fy-header-menu-macos-slide-in 0.3s ease-out;
|
|
82
|
-
}
|
|
83
|
-
.fy-anim-header-menu-macos-slide-out {
|
|
84
|
-
animation: fy-header-menu-macos-slide-out 0.26s ease-in;
|
|
85
|
-
}
|
|
86
|
-
@keyframes fy-header-menu-macos-slide-in {
|
|
87
|
-
from { transform: translateY(-16px); opacity: 0; }
|
|
88
|
-
to { transform: translateY(0); opacity: 1; }
|
|
89
|
-
}
|
|
90
|
-
@keyframes fy-header-menu-macos-slide-out {
|
|
91
|
-
from { transform: translateY(0); opacity: 1; }
|
|
92
|
-
to { transform: translateY(-16px); opacity: 0; }
|
|
93
|
-
}
|
|
64
|
+
const headerMenuAnimationsCss = `
|
|
65
|
+
.fy-anim-header-menu-dropdown-in {
|
|
66
|
+
animation: fy-header-menu-dropdown-in 0.25s ease-out;
|
|
67
|
+
}
|
|
68
|
+
.fy-anim-header-menu-dropdown-out {
|
|
69
|
+
animation: fy-header-menu-dropdown-out 0.25s ease-in;
|
|
70
|
+
}
|
|
71
|
+
@keyframes fy-header-menu-dropdown-in {
|
|
72
|
+
from { transform: translateY(-8px); opacity: 0; }
|
|
73
|
+
to { transform: translateY(0); opacity: 1; }
|
|
74
|
+
}
|
|
75
|
+
@keyframes fy-header-menu-dropdown-out {
|
|
76
|
+
from { transform: translateY(0); opacity: 1; }
|
|
77
|
+
to { transform: translateY(-8px); opacity: 0; }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.fy-anim-header-menu-macos-slide-in {
|
|
81
|
+
animation: fy-header-menu-macos-slide-in 0.3s ease-out;
|
|
82
|
+
}
|
|
83
|
+
.fy-anim-header-menu-macos-slide-out {
|
|
84
|
+
animation: fy-header-menu-macos-slide-out 0.26s ease-in;
|
|
85
|
+
}
|
|
86
|
+
@keyframes fy-header-menu-macos-slide-in {
|
|
87
|
+
from { transform: translateY(-16px); opacity: 0; }
|
|
88
|
+
to { transform: translateY(0); opacity: 1; }
|
|
89
|
+
}
|
|
90
|
+
@keyframes fy-header-menu-macos-slide-out {
|
|
91
|
+
from { transform: translateY(0); opacity: 1; }
|
|
92
|
+
to { transform: translateY(-16px); opacity: 0; }
|
|
93
|
+
}
|
|
94
94
|
`;
|
|
95
|
-
const inputAnimationsCss = `
|
|
96
|
-
.fy-anim-input-focus-glow:focus-within {
|
|
97
|
-
box-shadow: 0 0 0 2px rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.45);
|
|
98
|
-
border-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.7);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.fy-anim-input-focus-soft:focus-within {
|
|
102
|
-
box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.fy-anim-input-success-pulse {
|
|
106
|
-
animation: fy-input-success-pulse 0.4s ease-out;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.fy-anim-input-error-shake {
|
|
110
|
-
animation: fy-input-error-shake 0.3s ease-in-out;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
@keyframes fy-input-success-pulse {
|
|
114
|
-
0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
|
|
115
|
-
100% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
@keyframes fy-input-error-shake {
|
|
119
|
-
0%, 100% { transform: translateX(0); }
|
|
120
|
-
25% { transform: translateX(-2px); }
|
|
121
|
-
75% { transform: translateX(2px); }
|
|
122
|
-
}
|
|
95
|
+
const inputAnimationsCss = `
|
|
96
|
+
.fy-anim-input-focus-glow:focus-within {
|
|
97
|
+
box-shadow: 0 0 0 2px rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.45);
|
|
98
|
+
border-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.7);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.fy-anim-input-focus-soft:focus-within {
|
|
102
|
+
box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.fy-anim-input-success-pulse {
|
|
106
|
+
animation: fy-input-success-pulse 0.4s ease-out;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.fy-anim-input-error-shake {
|
|
110
|
+
animation: fy-input-error-shake 0.3s ease-in-out;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@keyframes fy-input-success-pulse {
|
|
114
|
+
0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
|
|
115
|
+
100% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes fy-input-error-shake {
|
|
119
|
+
0%, 100% { transform: translateX(0); }
|
|
120
|
+
25% { transform: translateX(-2px); }
|
|
121
|
+
75% { transform: translateX(2px); }
|
|
122
|
+
}
|
|
123
123
|
`;
|
|
124
|
-
const tableAnimationsCss = `
|
|
125
|
-
.fy-anim-table-fade-in {
|
|
126
|
-
animation: fy-table-fade-in 0.4s ease-out;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
.fy-anim-table-row-enter {
|
|
130
|
-
animation: fy-table-row-enter 0.3s ease-out;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
@keyframes fy-table-fade-in {
|
|
134
|
-
from { opacity: 0; transform: translateY(4px); }
|
|
135
|
-
to { opacity: 1; transform: translateY(0); }
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
@keyframes fy-table-row-enter {
|
|
139
|
-
from { opacity: 0; transform: translateX(-4px); }
|
|
140
|
-
to { opacity: 1; transform: translateX(0); }
|
|
141
|
-
}
|
|
124
|
+
const tableAnimationsCss = `
|
|
125
|
+
.fy-anim-table-fade-in {
|
|
126
|
+
animation: fy-table-fade-in 0.4s ease-out;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.fy-anim-table-row-enter {
|
|
130
|
+
animation: fy-table-row-enter 0.3s ease-out;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
@keyframes fy-table-fade-in {
|
|
134
|
+
from { opacity: 0; transform: translateY(4px); }
|
|
135
|
+
to { opacity: 1; transform: translateY(0); }
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@keyframes fy-table-row-enter {
|
|
139
|
+
from { opacity: 0; transform: translateX(-4px); }
|
|
140
|
+
to { opacity: 1; transform: translateX(0); }
|
|
141
|
+
}
|
|
142
142
|
`;
|
|
143
|
-
const cardAnimationsCss = `
|
|
144
|
-
.fy-anim-card-fade-in {
|
|
145
|
-
animation: fy-card-fade-in 0.4s ease-out;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
@keyframes fy-card-fade-in {
|
|
149
|
-
from {
|
|
150
|
-
opacity: 0;
|
|
151
|
-
transform: translateY(4px);
|
|
152
|
-
}
|
|
153
|
-
to {
|
|
154
|
-
opacity: 1;
|
|
155
|
-
transform: translateY(0);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
143
|
+
const cardAnimationsCss = `
|
|
144
|
+
.fy-anim-card-fade-in {
|
|
145
|
+
animation: fy-card-fade-in 0.4s ease-out;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
@keyframes fy-card-fade-in {
|
|
149
|
+
from {
|
|
150
|
+
opacity: 0;
|
|
151
|
+
transform: translateY(4px);
|
|
152
|
+
}
|
|
153
|
+
to {
|
|
154
|
+
opacity: 1;
|
|
155
|
+
transform: translateY(0);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
158
|
`;
|
|
159
|
-
const selectAnimationsCss = `
|
|
160
|
-
.fy-anim-select-focus-glow:focus-within {
|
|
161
|
-
box-shadow: 0 0 0 2px rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.45);
|
|
162
|
-
border-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.7);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
.fy-anim-select-focus-soft:focus-within {
|
|
166
|
-
box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.fy-anim-select-success-pulse {
|
|
170
|
-
animation: fy-select-success-pulse 0.4s ease-out;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.fy-anim-select-error-shake {
|
|
174
|
-
animation: fy-select-error-shake 0.3s ease-in-out;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
@keyframes fy-select-success-pulse {
|
|
178
|
-
0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
|
|
179
|
-
100% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
@keyframes fy-select-error-shake {
|
|
183
|
-
0%, 100% { transform: translateX(0); }
|
|
184
|
-
25% { transform: translateX(-2px); }
|
|
185
|
-
75% { transform: translateX(2px); }
|
|
186
|
-
}
|
|
159
|
+
const selectAnimationsCss = `
|
|
160
|
+
.fy-anim-select-focus-glow:focus-within {
|
|
161
|
+
box-shadow: 0 0 0 2px rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.45);
|
|
162
|
+
border-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.7);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.fy-anim-select-focus-soft:focus-within {
|
|
166
|
+
box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.fy-anim-select-success-pulse {
|
|
170
|
+
animation: fy-select-success-pulse 0.4s ease-out;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.fy-anim-select-error-shake {
|
|
174
|
+
animation: fy-select-error-shake 0.3s ease-in-out;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@keyframes fy-select-success-pulse {
|
|
178
|
+
0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
|
|
179
|
+
100% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@keyframes fy-select-error-shake {
|
|
183
|
+
0%, 100% { transform: translateX(0); }
|
|
184
|
+
25% { transform: translateX(-2px); }
|
|
185
|
+
75% { transform: translateX(2px); }
|
|
186
|
+
}
|
|
187
187
|
`;
|
|
188
|
-
const macosAnimationsCss = `
|
|
189
|
-
.fy-anim-layout-macos-window-enter {
|
|
190
|
-
animation: fy-layout-macos-window-enter 0.45s ease-out;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
@keyframes fy-layout-macos-window-enter {
|
|
194
|
-
0% {
|
|
195
|
-
opacity: 0;
|
|
196
|
-
transform: translateY(-12px) scale(0.98);
|
|
197
|
-
}
|
|
198
|
-
60% {
|
|
199
|
-
opacity: 1;
|
|
200
|
-
transform: translateY(2px) scale(1.01);
|
|
201
|
-
}
|
|
202
|
-
100% {
|
|
203
|
-
opacity: 1;
|
|
204
|
-
transform: translateY(0) scale(1);
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
.fy-anim-sidebar-macos-slide-in {
|
|
209
|
-
animation: fy-sidebar-macos-slide-in 0.3s ease-out;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.fy-anim-sidebar-macos-slide-out {
|
|
213
|
-
animation: fy-sidebar-macos-slide-out 0.26s ease-in;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
@keyframes fy-sidebar-macos-slide-in {
|
|
217
|
-
from {
|
|
218
|
-
transform: translateX(-16px);
|
|
219
|
-
opacity: 0;
|
|
220
|
-
}
|
|
221
|
-
to {
|
|
222
|
-
transform: translateX(0);
|
|
223
|
-
opacity: 1;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
@keyframes fy-sidebar-macos-slide-out {
|
|
228
|
-
from {
|
|
229
|
-
transform: translateX(0);
|
|
230
|
-
opacity: 1;
|
|
231
|
-
}
|
|
232
|
-
to {
|
|
233
|
-
transform: translateX(-16px);
|
|
234
|
-
opacity: 0;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.fy-anim-input-focus-macos-glow:focus-within {
|
|
239
|
-
box-shadow: 0 0 0 2px rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.45);
|
|
240
|
-
border-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.8);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
.fy-anim-input-success-macos-pulse {
|
|
244
|
-
animation: fy-input-success-macos-pulse 0.45s ease-out;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
@keyframes fy-input-success-macos-pulse {
|
|
248
|
-
0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5); }
|
|
249
|
-
100% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); }
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
.fy-anim-input-error-macos-shake {
|
|
253
|
-
animation: fy-input-error-macos-shake 0.35s ease-in-out;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
@keyframes fy-input-error-macos-shake {
|
|
257
|
-
0%, 100% { transform: translateX(0); }
|
|
258
|
-
20% { transform: translateX(-3px); }
|
|
259
|
-
40% { transform: translateX(3px); }
|
|
260
|
-
60% { transform: translateX(-2px); }
|
|
261
|
-
80% { transform: translateX(2px); }
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.fy-anim-card-macos-fade-in {
|
|
265
|
-
animation: fy-card-macos-fade-in 0.45s ease-out;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
@keyframes fy-card-macos-fade-in {
|
|
269
|
-
from {
|
|
270
|
-
opacity: 0;
|
|
271
|
-
transform: translateY(6px) scale(0.99);
|
|
272
|
-
}
|
|
273
|
-
to {
|
|
274
|
-
opacity: 1;
|
|
275
|
-
transform: translateY(0) scale(1);
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
.fy-anim-button-hover-macos-soft:hover {
|
|
280
|
-
transform: translateY(-1px);
|
|
281
|
-
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
.fy-anim-button-click-macos-press:active {
|
|
285
|
-
transform: translateY(1px) scale(0.97);
|
|
286
|
-
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
|
|
287
|
-
}
|
|
188
|
+
const macosAnimationsCss = `
|
|
189
|
+
.fy-anim-layout-macos-window-enter {
|
|
190
|
+
animation: fy-layout-macos-window-enter 0.45s ease-out;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
@keyframes fy-layout-macos-window-enter {
|
|
194
|
+
0% {
|
|
195
|
+
opacity: 0;
|
|
196
|
+
transform: translateY(-12px) scale(0.98);
|
|
197
|
+
}
|
|
198
|
+
60% {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
transform: translateY(2px) scale(1.01);
|
|
201
|
+
}
|
|
202
|
+
100% {
|
|
203
|
+
opacity: 1;
|
|
204
|
+
transform: translateY(0) scale(1);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.fy-anim-sidebar-macos-slide-in {
|
|
209
|
+
animation: fy-sidebar-macos-slide-in 0.3s ease-out;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.fy-anim-sidebar-macos-slide-out {
|
|
213
|
+
animation: fy-sidebar-macos-slide-out 0.26s ease-in;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@keyframes fy-sidebar-macos-slide-in {
|
|
217
|
+
from {
|
|
218
|
+
transform: translateX(-16px);
|
|
219
|
+
opacity: 0;
|
|
220
|
+
}
|
|
221
|
+
to {
|
|
222
|
+
transform: translateX(0);
|
|
223
|
+
opacity: 1;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@keyframes fy-sidebar-macos-slide-out {
|
|
228
|
+
from {
|
|
229
|
+
transform: translateX(0);
|
|
230
|
+
opacity: 1;
|
|
231
|
+
}
|
|
232
|
+
to {
|
|
233
|
+
transform: translateX(-16px);
|
|
234
|
+
opacity: 0;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.fy-anim-input-focus-macos-glow:focus-within {
|
|
239
|
+
box-shadow: 0 0 0 2px rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.45);
|
|
240
|
+
border-color: rgba(var(--fy-colors-primary-rgb, 59,130,246), 0.8);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.fy-anim-input-success-macos-pulse {
|
|
244
|
+
animation: fy-input-success-macos-pulse 0.45s ease-out;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@keyframes fy-input-success-macos-pulse {
|
|
248
|
+
0% { box-shadow: 0 0 0 0 rgba(52, 199, 89, 0.5); }
|
|
249
|
+
100% { box-shadow: 0 0 0 7px rgba(52, 199, 89, 0); }
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.fy-anim-input-error-macos-shake {
|
|
253
|
+
animation: fy-input-error-macos-shake 0.35s ease-in-out;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@keyframes fy-input-error-macos-shake {
|
|
257
|
+
0%, 100% { transform: translateX(0); }
|
|
258
|
+
20% { transform: translateX(-3px); }
|
|
259
|
+
40% { transform: translateX(3px); }
|
|
260
|
+
60% { transform: translateX(-2px); }
|
|
261
|
+
80% { transform: translateX(2px); }
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.fy-anim-card-macos-fade-in {
|
|
265
|
+
animation: fy-card-macos-fade-in 0.45s ease-out;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
@keyframes fy-card-macos-fade-in {
|
|
269
|
+
from {
|
|
270
|
+
opacity: 0;
|
|
271
|
+
transform: translateY(6px) scale(0.99);
|
|
272
|
+
}
|
|
273
|
+
to {
|
|
274
|
+
opacity: 1;
|
|
275
|
+
transform: translateY(0) scale(1);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.fy-anim-button-hover-macos-soft:hover {
|
|
280
|
+
transform: translateY(-1px);
|
|
281
|
+
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.fy-anim-button-click-macos-press:active {
|
|
285
|
+
transform: translateY(1px) scale(0.97);
|
|
286
|
+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
|
|
287
|
+
}
|
|
288
288
|
`;
|
|
289
|
-
const puffyAnimationsCss = `
|
|
290
|
-
.fy-anim-button-puffy-bounce:hover {
|
|
291
|
-
transform: scale(1.05);
|
|
292
|
-
box-shadow: 0 8px 25px rgba(255, 133, 162, 0.4);
|
|
293
|
-
}
|
|
294
|
-
.fy-anim-button-puffy-press:active {
|
|
295
|
-
transform: scale(0.95);
|
|
296
|
-
}
|
|
297
|
-
.fy-anim-card-puffy-float {
|
|
298
|
-
animation: fy-puffy-float 3s ease-in-out infinite;
|
|
299
|
-
}
|
|
300
|
-
.fy-anim-input-puffy-glow:focus-within {
|
|
301
|
-
box-shadow: 0 0 0 4px rgba(255, 133, 162, 0.25);
|
|
302
|
-
border-color: #ff85a2;
|
|
303
|
-
}
|
|
304
|
-
.fy-anim-puffy-sparkle {
|
|
305
|
-
animation: fy-puffy-sparkle 1.5s ease-in-out infinite;
|
|
306
|
-
background: linear-gradient(90deg, #ff4d6d, #ff85a2, #ff4d6d);
|
|
307
|
-
background-size: 200% auto;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
@keyframes fy-puffy-float {
|
|
311
|
-
0%, 100% { transform: translateY(0); }
|
|
312
|
-
50% { transform: translateY(-6px); }
|
|
313
|
-
}
|
|
314
|
-
@keyframes fy-puffy-sparkle {
|
|
315
|
-
0% { background-position: 0% center; opacity: 0.8; }
|
|
316
|
-
50% { background-position: 100% center; opacity: 1; transform: scale(1.05); }
|
|
317
|
-
100% { background-position: 0% center; opacity: 0.8; }
|
|
318
|
-
}
|
|
289
|
+
const puffyAnimationsCss = `
|
|
290
|
+
.fy-anim-button-puffy-bounce:hover {
|
|
291
|
+
transform: scale(1.05);
|
|
292
|
+
box-shadow: 0 8px 25px rgba(255, 133, 162, 0.4);
|
|
293
|
+
}
|
|
294
|
+
.fy-anim-button-puffy-press:active {
|
|
295
|
+
transform: scale(0.95);
|
|
296
|
+
}
|
|
297
|
+
.fy-anim-card-puffy-float {
|
|
298
|
+
animation: fy-puffy-float 3s ease-in-out infinite;
|
|
299
|
+
}
|
|
300
|
+
.fy-anim-input-puffy-glow:focus-within {
|
|
301
|
+
box-shadow: 0 0 0 4px rgba(255, 133, 162, 0.25);
|
|
302
|
+
border-color: #ff85a2;
|
|
303
|
+
}
|
|
304
|
+
.fy-anim-puffy-sparkle {
|
|
305
|
+
animation: fy-puffy-sparkle 1.5s ease-in-out infinite;
|
|
306
|
+
background: linear-gradient(90deg, #ff4d6d, #ff85a2, #ff4d6d);
|
|
307
|
+
background-size: 200% auto;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@keyframes fy-puffy-float {
|
|
311
|
+
0%, 100% { transform: translateY(0); }
|
|
312
|
+
50% { transform: translateY(-6px); }
|
|
313
|
+
}
|
|
314
|
+
@keyframes fy-puffy-sparkle {
|
|
315
|
+
0% { background-position: 0% center; opacity: 0.8; }
|
|
316
|
+
50% { background-position: 100% center; opacity: 1; transform: scale(1.05); }
|
|
317
|
+
100% { background-position: 0% center; opacity: 0.8; }
|
|
318
|
+
}
|
|
319
319
|
`;
|
|
320
|
-
const allAnimationsCss = `
|
|
321
|
-
${buttonAnimationsCss}
|
|
322
|
-
${layoutAnimationsCss}
|
|
323
|
-
${sidebarAnimationsCss}
|
|
324
|
-
${headerMenuAnimationsCss}
|
|
325
|
-
${inputAnimationsCss}
|
|
326
|
-
${tableAnimationsCss}
|
|
327
|
-
${cardAnimationsCss}
|
|
328
|
-
${selectAnimationsCss}
|
|
329
|
-
${macosAnimationsCss}
|
|
330
|
-
${puffyAnimationsCss}
|
|
320
|
+
const allAnimationsCss = `
|
|
321
|
+
${buttonAnimationsCss}
|
|
322
|
+
${layoutAnimationsCss}
|
|
323
|
+
${sidebarAnimationsCss}
|
|
324
|
+
${headerMenuAnimationsCss}
|
|
325
|
+
${inputAnimationsCss}
|
|
326
|
+
${tableAnimationsCss}
|
|
327
|
+
${cardAnimationsCss}
|
|
328
|
+
${selectAnimationsCss}
|
|
329
|
+
${macosAnimationsCss}
|
|
330
|
+
${puffyAnimationsCss}
|
|
331
331
|
`;
|
|
332
332
|
function injectCssOnce(id, css) {
|
|
333
333
|
if (typeof document === 'undefined')
|
|
@@ -347,71 +347,71 @@ injectCssOnce('fy-input-animations', inputAnimationsCss);
|
|
|
347
347
|
injectCssOnce('fy-card-animations', cardAnimationsCss);
|
|
348
348
|
injectCssOnce('fy-table-animations', tableAnimationsCss);
|
|
349
349
|
injectCssOnce('fy-macos-animations', macosAnimationsCss);
|
|
350
|
-
const modalAnimationsCss = `
|
|
351
|
-
.fy-anim-modal-fade-in {
|
|
352
|
-
animation: fy-modal-fade-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
|
|
353
|
-
}
|
|
354
|
-
.fy-anim-modal-fade-out {
|
|
355
|
-
animation: fy-modal-fade-out 0.22s cubic-bezier(0.4, 0, 1, 1);
|
|
356
|
-
}
|
|
357
|
-
@keyframes fy-modal-fade-in {
|
|
358
|
-
0% {
|
|
359
|
-
opacity: 0;
|
|
360
|
-
transform: translate(-50%, -50%) scale(0.96);
|
|
361
|
-
}
|
|
362
|
-
100% {
|
|
363
|
-
opacity: 1;
|
|
364
|
-
transform: translate(-50%, -50%) scale(1);
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
@keyframes fy-modal-fade-out {
|
|
368
|
-
0% {
|
|
369
|
-
opacity: 1;
|
|
370
|
-
transform: translate(-50%, -50%) scale(1);
|
|
371
|
-
}
|
|
372
|
-
100% {
|
|
373
|
-
opacity: 0;
|
|
374
|
-
transform: translate(-50%, -50%) scale(0.96);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
350
|
+
const modalAnimationsCss = `
|
|
351
|
+
.fy-anim-modal-fade-in {
|
|
352
|
+
animation: fy-modal-fade-in 0.28s cubic-bezier(0.22, 1, 0.36, 1);
|
|
353
|
+
}
|
|
354
|
+
.fy-anim-modal-fade-out {
|
|
355
|
+
animation: fy-modal-fade-out 0.22s cubic-bezier(0.4, 0, 1, 1);
|
|
356
|
+
}
|
|
357
|
+
@keyframes fy-modal-fade-in {
|
|
358
|
+
0% {
|
|
359
|
+
opacity: 0;
|
|
360
|
+
transform: translate(-50%, -50%) scale(0.96);
|
|
361
|
+
}
|
|
362
|
+
100% {
|
|
363
|
+
opacity: 1;
|
|
364
|
+
transform: translate(-50%, -50%) scale(1);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
@keyframes fy-modal-fade-out {
|
|
368
|
+
0% {
|
|
369
|
+
opacity: 1;
|
|
370
|
+
transform: translate(-50%, -50%) scale(1);
|
|
371
|
+
}
|
|
372
|
+
100% {
|
|
373
|
+
opacity: 0;
|
|
374
|
+
transform: translate(-50%, -50%) scale(0.96);
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
377
|
`;
|
|
378
|
-
const dropdownAnimationsCss = `
|
|
379
|
-
.fy-anim-dropdown-in {
|
|
380
|
-
animation: fy-dropdown-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
|
|
381
|
-
transform-origin: top right;
|
|
382
|
-
}
|
|
383
|
-
.fy-anim-dropdown-out {
|
|
384
|
-
animation: fy-dropdown-out 0.2s cubic-bezier(0.4, 0, 1, 1);
|
|
385
|
-
transform-origin: top right;
|
|
386
|
-
}
|
|
387
|
-
@keyframes fy-dropdown-in {
|
|
388
|
-
from { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
389
|
-
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
390
|
-
}
|
|
391
|
-
@keyframes fy-dropdown-out {
|
|
392
|
-
from { opacity: 1; transform: scale(1) translateY(0); }
|
|
393
|
-
to { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
394
|
-
}
|
|
378
|
+
const dropdownAnimationsCss = `
|
|
379
|
+
.fy-anim-dropdown-in {
|
|
380
|
+
animation: fy-dropdown-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
|
|
381
|
+
transform-origin: top right;
|
|
382
|
+
}
|
|
383
|
+
.fy-anim-dropdown-out {
|
|
384
|
+
animation: fy-dropdown-out 0.2s cubic-bezier(0.4, 0, 1, 1);
|
|
385
|
+
transform-origin: top right;
|
|
386
|
+
}
|
|
387
|
+
@keyframes fy-dropdown-in {
|
|
388
|
+
from { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
389
|
+
to { opacity: 1; transform: scale(1) translateY(0); }
|
|
390
|
+
}
|
|
391
|
+
@keyframes fy-dropdown-out {
|
|
392
|
+
from { opacity: 1; transform: scale(1) translateY(0); }
|
|
393
|
+
to { opacity: 0; transform: scale(0.95) translateY(-8px); }
|
|
394
|
+
}
|
|
395
395
|
`;
|
|
396
|
-
const accordionAnimationsCss = `
|
|
397
|
-
.fy-accordion__panel {
|
|
398
|
-
overflow: hidden;
|
|
399
|
-
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.3s ease;
|
|
400
|
-
}
|
|
401
|
-
.fy-anim-accordion-expand {
|
|
402
|
-
animation: fy-accordion-expand 0.3s ease-out;
|
|
403
|
-
}
|
|
404
|
-
.fy-anim-accordion-collapse {
|
|
405
|
-
animation: fy-accordion-collapse 0.25s ease-in;
|
|
406
|
-
}
|
|
407
|
-
@keyframes fy-accordion-expand {
|
|
408
|
-
from { opacity: 0; transform: translateY(-4px); }
|
|
409
|
-
to { opacity: 1; transform: translateY(0); }
|
|
410
|
-
}
|
|
411
|
-
@keyframes fy-accordion-collapse {
|
|
412
|
-
from { opacity: 1; transform: translateY(0); }
|
|
413
|
-
to { opacity: 0; transform: translateY(-4px); }
|
|
414
|
-
}
|
|
396
|
+
const accordionAnimationsCss = `
|
|
397
|
+
.fy-accordion__panel {
|
|
398
|
+
overflow: hidden;
|
|
399
|
+
transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease, padding 0.3s ease;
|
|
400
|
+
}
|
|
401
|
+
.fy-anim-accordion-expand {
|
|
402
|
+
animation: fy-accordion-expand 0.3s ease-out;
|
|
403
|
+
}
|
|
404
|
+
.fy-anim-accordion-collapse {
|
|
405
|
+
animation: fy-accordion-collapse 0.25s ease-in;
|
|
406
|
+
}
|
|
407
|
+
@keyframes fy-accordion-expand {
|
|
408
|
+
from { opacity: 0; transform: translateY(-4px); }
|
|
409
|
+
to { opacity: 1; transform: translateY(0); }
|
|
410
|
+
}
|
|
411
|
+
@keyframes fy-accordion-collapse {
|
|
412
|
+
from { opacity: 1; transform: translateY(0); }
|
|
413
|
+
to { opacity: 0; transform: translateY(-4px); }
|
|
414
|
+
}
|
|
415
415
|
`;
|
|
416
416
|
injectCssOnce('fy-modal-animations', modalAnimationsCss);
|
|
417
417
|
injectCssOnce('fy-dropdown-animations', dropdownAnimationsCss);
|
package/package.json
CHANGED
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@fylib/animation",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"main": "dist/index.js",
|
|
5
|
-
"types": "dist/index.d.ts",
|
|
6
|
-
"files": [
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
"@fylib/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@fylib/animation",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist"
|
|
8
|
+
],
|
|
9
|
+
"publishConfig": {
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@fylib/core": "0.2.0",
|
|
14
|
+
"@fylib/logger": "0.2.0"
|
|
15
|
+
},
|
|
16
|
+
"devDependencies": {
|
|
17
|
+
"typescript": "^5.9.3",
|
|
18
|
+
"@types/node": "^20.17.19"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc -p tsconfig.json"
|
|
22
|
+
}
|
|
23
|
+
}
|