easemotion-css 1.0.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.
@@ -0,0 +1,210 @@
1
+ /* ============================================================
2
+ EaseMotion CSS — cards.css
3
+ Composable card components with hover animations
4
+ ============================================================ */
5
+
6
+ /* ── Base Card ─────────────────────────────────────────────── */
7
+
8
+ .ease-card {
9
+ background-color: var(--ease-color-surface);
10
+ border: 1px solid var(--ease-color-neutral-200);
11
+ border-radius: var(--ease-radius-lg);
12
+ padding: var(--ease-space-6);
13
+ overflow: hidden;
14
+ position: relative;
15
+ }
16
+
17
+ /* ── Card Sections ─────────────────────────────────────────── */
18
+
19
+ .ease-card-header {
20
+ padding-bottom: var(--ease-space-4);
21
+ margin-bottom: var(--ease-space-4);
22
+ border-bottom: 1px solid var(--ease-color-neutral-100);
23
+ }
24
+
25
+ .ease-card-body {
26
+ flex: 1;
27
+ }
28
+
29
+ .ease-card-footer {
30
+ padding-top: var(--ease-space-4);
31
+ margin-top: var(--ease-space-4);
32
+ border-top: 1px solid var(--ease-color-neutral-100);
33
+ display: flex;
34
+ align-items: center;
35
+ gap: var(--ease-space-3);
36
+ }
37
+
38
+ /* Card title & subtitle helpers */
39
+ .ease-card-title {
40
+ font-size: var(--ease-text-2xl);
41
+ font-weight: 700;
42
+ color: var(--ease-color-neutral-900);
43
+ margin-bottom: var(--ease-space-1);
44
+ line-height: var(--ease-leading-tight);
45
+ }
46
+
47
+ .ease-card-subtitle {
48
+ font-size: var(--ease-text-sm);
49
+ color: var(--ease-color-muted);
50
+ font-weight: 400;
51
+ }
52
+
53
+ .ease-card-body p:last-child {
54
+ margin-bottom: 0;
55
+ }
56
+
57
+ /* ── Shadow Modifier ───────────────────────────────────────── */
58
+
59
+ .ease-card-shadow {
60
+ box-shadow: var(--ease-shadow-lg);
61
+ border-color: transparent;
62
+ }
63
+
64
+ /* ── Hover Card ────────────────────────────────────────────── */
65
+
66
+ .ease-card-hover {
67
+ cursor: pointer;
68
+ transition:
69
+ transform var(--ease-speed-medium) var(--ease-ease),
70
+ box-shadow var(--ease-speed-medium) var(--ease-ease),
71
+ border-color var(--ease-speed-medium) var(--ease-ease);
72
+ will-change: transform, box-shadow;
73
+ }
74
+
75
+ .ease-card-hover:hover {
76
+ transform: translateY(-6px);
77
+ box-shadow: var(--ease-shadow-xl);
78
+ border-color: var(--ease-color-primary-light);
79
+ }
80
+
81
+ /* ── Glow Hover Card ───────────────────────────────────────── */
82
+
83
+ .ease-card-glow {
84
+ transition:
85
+ box-shadow var(--ease-speed-medium) var(--ease-ease),
86
+ border-color var(--ease-speed-medium) var(--ease-ease);
87
+ }
88
+
89
+ .ease-card-glow:hover {
90
+ box-shadow: var(--ease-glow-primary), var(--ease-shadow-lg);
91
+ border-color: var(--ease-color-primary-light);
92
+ }
93
+
94
+ /* ── Flat Card (no border) ─────────────────────────────────── */
95
+
96
+ .ease-card-flat {
97
+ border-color: transparent;
98
+ background-color: var(--ease-color-neutral-100);
99
+ }
100
+
101
+ /* ── Outlined Card ─────────────────────────────────────────── */
102
+
103
+ .ease-card-outlined {
104
+ background-color: transparent;
105
+ border: 2px solid var(--ease-color-neutral-200);
106
+ }
107
+
108
+ /* ── Glass Card (glassmorphism) ────────────────────────────── */
109
+
110
+ .ease-card-glass {
111
+ background: rgba(255, 255, 255, 0.12);
112
+ border: 1px solid rgba(255, 255, 255, 0.2);
113
+ backdrop-filter: blur(16px);
114
+ -webkit-backdrop-filter: blur(16px);
115
+ color: #ffffff;
116
+ }
117
+
118
+ /* ── Color Accent Cards ────────────────────────────────────── */
119
+
120
+ /* Left border accent */
121
+ .ease-card-accent {
122
+ border-left: 4px solid var(--ease-color-primary);
123
+ }
124
+
125
+ .ease-card-accent-success {
126
+ border-left: 4px solid var(--ease-color-success);
127
+ }
128
+
129
+ .ease-card-accent-danger {
130
+ border-left: 4px solid var(--ease-color-danger);
131
+ }
132
+
133
+ .ease-card-accent-warning {
134
+ border-left: 4px solid var(--ease-color-warning);
135
+ }
136
+
137
+ /* ── Image Card ────────────────────────────────────────────── */
138
+
139
+ .ease-card-image {
140
+ padding: 0;
141
+ }
142
+
143
+ .ease-card-image .ease-card-img {
144
+ width: 100%;
145
+ height: 200px;
146
+ object-fit: cover;
147
+ display: block;
148
+ border-radius: var(--ease-radius-lg) var(--ease-radius-lg) 0 0;
149
+ }
150
+
151
+ .ease-card-image .ease-card-body {
152
+ padding: var(--ease-space-6);
153
+ }
154
+
155
+ /* ── Compact Card ──────────────────────────────────────────── */
156
+
157
+ .ease-card-compact {
158
+ padding: var(--ease-space-4);
159
+ }
160
+
161
+ /* ── Horizontal Card ───────────────────────────────────────── */
162
+
163
+ .ease-card-horizontal {
164
+ display: flex;
165
+ flex-direction: row;
166
+ gap: var(--ease-space-4);
167
+ align-items: flex-start;
168
+ padding: var(--ease-space-4);
169
+ }
170
+
171
+ /* ── Info / Alert-style Cards ──────────────────────────────── */
172
+
173
+ .ease-card-info {
174
+ background-color: rgba(108, 99, 255, 0.06);
175
+ border-color: var(--ease-color-primary-light);
176
+ color: var(--ease-color-primary-dark);
177
+ }
178
+
179
+ .ease-card-success-bg {
180
+ background-color: rgba(34, 197, 94, 0.06);
181
+ border-color: var(--ease-color-success-light);
182
+ }
183
+
184
+ .ease-card-danger-bg {
185
+ background-color: rgba(239, 68, 68, 0.06);
186
+ border-color: var(--ease-color-danger-light);
187
+ }
188
+
189
+ /* ── Stat Card ─────────────────────────────────────────────── */
190
+
191
+ .ease-card-stat {
192
+ text-align: center;
193
+ padding: var(--ease-space-8);
194
+ }
195
+
196
+ .ease-card-stat .ease-stat-value {
197
+ font-size: var(--ease-text-4xl);
198
+ font-weight: 700;
199
+ color: var(--ease-color-primary);
200
+ line-height: 1;
201
+ margin-bottom: var(--ease-space-2);
202
+ }
203
+
204
+ .ease-card-stat .ease-stat-label {
205
+ font-size: var(--ease-text-sm);
206
+ color: var(--ease-color-muted);
207
+ font-weight: 500;
208
+ text-transform: uppercase;
209
+ letter-spacing: 0.08em;
210
+ }
@@ -0,0 +1,336 @@
1
+ /* ============================================================
2
+ EaseMotion CSS — animations.css
3
+ Production-ready, composable animation classes
4
+
5
+ Integration log:
6
+ Classes marked [INTEGRATED] were originally submitted by
7
+ community contributors inside submissions/examples/,
8
+ then standardized and merged here by the maintainer.
9
+ ============================================================ */
10
+
11
+ /* ── Keyframe Definitions ──────────────────────────────────── */
12
+
13
+ @keyframes ease-kf-fade-in {
14
+ from { opacity: 0; }
15
+ to { opacity: 1; }
16
+ }
17
+
18
+ @keyframes ease-kf-fade-out {
19
+ from { opacity: 1; }
20
+ to { opacity: 0; }
21
+ }
22
+
23
+ @keyframes ease-kf-slide-up {
24
+ from {
25
+ opacity: 0;
26
+ transform: translateY(24px);
27
+ }
28
+ to {
29
+ opacity: 1;
30
+ transform: translateY(0);
31
+ }
32
+ }
33
+
34
+ @keyframes ease-kf-slide-down {
35
+ from {
36
+ opacity: 0;
37
+ transform: translateY(-24px);
38
+ }
39
+ to {
40
+ opacity: 1;
41
+ transform: translateY(0);
42
+ }
43
+ }
44
+
45
+ @keyframes ease-kf-slide-in-left {
46
+ from {
47
+ opacity: 0;
48
+ transform: translateX(-32px);
49
+ }
50
+ to {
51
+ opacity: 1;
52
+ transform: translateX(0);
53
+ }
54
+ }
55
+
56
+ @keyframes ease-kf-slide-in-right {
57
+ from {
58
+ opacity: 0;
59
+ transform: translateX(32px);
60
+ }
61
+ to {
62
+ opacity: 1;
63
+ transform: translateX(0);
64
+ }
65
+ }
66
+
67
+ @keyframes ease-kf-bounce {
68
+ 0%, 100% {
69
+ transform: translateY(0);
70
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
71
+ }
72
+ 50% {
73
+ transform: translateY(-20px);
74
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
75
+ }
76
+ }
77
+
78
+ @keyframes ease-kf-pulse {
79
+ 0%, 100% { opacity: 1; }
80
+ 50% { opacity: 0.45; }
81
+ }
82
+
83
+ @keyframes ease-kf-rotate {
84
+ from { transform: rotate(0deg); }
85
+ to { transform: rotate(360deg); }
86
+ }
87
+
88
+ @keyframes ease-kf-ping {
89
+ 75%, 100% {
90
+ transform: scale(2);
91
+ opacity: 0;
92
+ }
93
+ }
94
+
95
+ @keyframes ease-kf-shake {
96
+ 0%, 100% { transform: translateX(0); }
97
+ 10%, 50%, 90% { transform: translateX(-6px); }
98
+ 30%, 70% { transform: translateX(6px); }
99
+ }
100
+
101
+ @keyframes ease-kf-zoom-in {
102
+ from {
103
+ opacity: 0;
104
+ transform: scale(0.85);
105
+ }
106
+ to {
107
+ opacity: 1;
108
+ transform: scale(1);
109
+ }
110
+ }
111
+
112
+ @keyframes ease-kf-flip {
113
+ from { transform: perspective(400px) rotateY(90deg); opacity: 0; }
114
+ to { transform: perspective(400px) rotateY(0deg); opacity: 1; }
115
+ }
116
+
117
+ @keyframes ease-kf-shimmer {
118
+ 0% { background-position: -1000px 0; }
119
+ 100% { background-position: 1000px 0; }
120
+ }
121
+
122
+ @keyframes ease-kf-pulse-fade {
123
+ 0%, 100% { opacity: 1; }
124
+ 50% { opacity: 0.45; }
125
+ }
126
+
127
+ /* ── Animation Utility Classes ─────────────────────────────── */
128
+
129
+ /* Entrance Animations */
130
+
131
+ /* Skeleton Loading Animations*/
132
+
133
+ .ease-skeleton-shimmer {
134
+ background: var(--ease-color-neutral-100);
135
+ background-image: linear-gradient(
136
+ 90deg,
137
+ var(--ease-color-neutral-100) 0px,
138
+ var(--ease-color-neutral-200) 40px,
139
+ var(--ease-color-neutral-100) 80px
140
+ );
141
+ background-size: 1000px 100%;
142
+ animation: ease-kf-shimmer 2s infinite linear forwards;
143
+ }
144
+
145
+ .ease-skeleton-pulse {
146
+ background-color: var(--ease-color-neutral-200);
147
+ animation: ease-kf-pulse-fade 1.5s var(--ease-ease) infinite;
148
+ }
149
+
150
+ .ease-skeleton-block {
151
+ border-radius: var(--ease-radius-md);
152
+ display: block;
153
+ }
154
+
155
+ .ease-fade-in {
156
+ animation: ease-kf-fade-in var(--ease-speed-medium) var(--ease-ease) both;
157
+ }
158
+
159
+ .ease-fade-out {
160
+ animation: ease-kf-fade-out var(--ease-speed-medium) var(--ease-ease) both;
161
+ }
162
+
163
+ .ease-slide-up {
164
+ animation: ease-kf-slide-up var(--ease-speed-medium) var(--ease-ease) both;
165
+ }
166
+
167
+ .ease-slide-down {
168
+ animation: ease-kf-slide-down var(--ease-speed-medium) var(--ease-ease) both;
169
+ }
170
+
171
+ .ease-slide-in-left {
172
+ animation: ease-kf-slide-in-left var(--ease-speed-medium) var(--ease-ease) both;
173
+ }
174
+
175
+ .ease-slide-in-right {
176
+ animation: ease-kf-slide-in-right var(--ease-speed-medium) var(--ease-ease) both;
177
+ }
178
+
179
+ .ease-zoom-in {
180
+ animation: ease-kf-zoom-in var(--ease-speed-medium) var(--ease-ease-bounce) both;
181
+ }
182
+
183
+ .ease-flip {
184
+ animation: ease-kf-flip var(--ease-speed-medium) var(--ease-ease) both;
185
+ }
186
+
187
+ /* Looping Animations */
188
+ .ease-bounce {
189
+ animation: ease-kf-bounce 1s infinite;
190
+ }
191
+
192
+ .ease-rotate {
193
+ animation: ease-kf-rotate 1.2s linear infinite;
194
+ }
195
+
196
+ .ease-pulse {
197
+ animation: ease-kf-pulse 2s var(--ease-ease) infinite;
198
+ }
199
+
200
+ .ease-ping {
201
+ animation: ease-kf-ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
202
+ }
203
+
204
+ .ease-shake {
205
+ animation: ease-kf-shake 0.5s var(--ease-ease) both;
206
+ }
207
+
208
+ /* ── Hover Animations ──────────────────────────────────────── */
209
+
210
+ /* Grow on hover
211
+ [INTEGRATED] from submissions/examples/hover-grow/
212
+ Original class name: .hover-grow-card / .hover-grow-btn
213
+ Standardized to: .ease-hover-grow */
214
+ .ease-hover-grow {
215
+ transition: transform var(--ease-speed-medium) var(--ease-ease-bounce);
216
+ will-change: transform;
217
+ }
218
+ .ease-hover-grow:hover {
219
+ transform: scale(1.06);
220
+ }
221
+
222
+ /* Shrink on hover */
223
+ .ease-hover-shrink {
224
+ transition: transform var(--ease-speed-fast) var(--ease-ease);
225
+ will-change: transform;
226
+ }
227
+ .ease-hover-shrink:hover {
228
+ transform: scale(0.95);
229
+ }
230
+
231
+ /* Glow on hover */
232
+ .ease-hover-glow {
233
+ transition: box-shadow var(--ease-speed-medium) var(--ease-ease);
234
+ }
235
+ .ease-hover-glow:hover {
236
+ box-shadow: var(--ease-glow-primary);
237
+ }
238
+
239
+ /* Lift (shadow depth) on hover */
240
+ .ease-hover-lift {
241
+ transition: transform var(--ease-speed-medium) var(--ease-ease),
242
+ box-shadow var(--ease-speed-medium) var(--ease-ease);
243
+ }
244
+ .ease-hover-lift:hover {
245
+ transform: translateY(-4px);
246
+ box-shadow: var(--ease-shadow-xl);
247
+ }
248
+
249
+ /* Color shift underline on hover */
250
+ .ease-hover-underline {
251
+ position: relative;
252
+ }
253
+ .ease-hover-underline::after {
254
+ content: '';
255
+ position: absolute;
256
+ left: 0;
257
+ bottom: -2px;
258
+ width: 0;
259
+ height: 2px;
260
+ background-color: var(--ease-color-primary);
261
+ transition: width var(--ease-speed-medium) var(--ease-ease);
262
+ }
263
+ .ease-hover-underline:hover::after {
264
+ width: 100%;
265
+ }
266
+
267
+ /* Card lift on hover
268
+ [INTEGRATED] from submissions/examples/card-lift/
269
+ Original class name: .lift-card
270
+ Standardized to: .ease-card-lift
271
+ (also available as .ease-hover-lift in the cards component) */
272
+ .ease-card-lift {
273
+ transition:
274
+ transform var(--ease-speed-medium) var(--ease-ease-out),
275
+ box-shadow var(--ease-speed-medium) var(--ease-ease-out);
276
+ will-change: transform, box-shadow;
277
+ }
278
+ .ease-card-lift:hover {
279
+ transform: translateY(-8px);
280
+ box-shadow: var(--ease-shadow-xl);
281
+ }
282
+
283
+ /* Shimmer sweep on hover
284
+ [INTEGRATED] from submissions/examples/hover-shimmer/
285
+ Original class name: .hover-shimmer-card
286
+ Standardized to: .ease-hover-shimmer */
287
+ .ease-hover-shimmer {
288
+ position: relative;
289
+ overflow: hidden;
290
+ }
291
+ .ease-hover-shimmer::before {
292
+ content: '';
293
+ position: absolute;
294
+ top: 0;
295
+ left: -100%;
296
+ width: 60%;
297
+ height: 100%;
298
+ background: linear-gradient(
299
+ 120deg,
300
+ transparent 0%,
301
+ rgba(255, 255, 255, 0.08) 50%,
302
+ transparent 100%
303
+ );
304
+ transition: left var(--ease-speed-slow) var(--ease-ease);
305
+ pointer-events: none;
306
+ }
307
+ .ease-hover-shimmer:hover::before {
308
+ left: 150%;
309
+ }
310
+
311
+ /* ── Stagger Delay Helpers ─────────────────────────────────── */
312
+ /* Use these with entrance animations to stagger children */
313
+
314
+ .ease-delay-75 { animation-delay: 75ms; }
315
+ .ease-delay-100 { animation-delay: 100ms; }
316
+ .ease-delay-150 { animation-delay: 150ms; }
317
+ .ease-delay-200 { animation-delay: 200ms; }
318
+ .ease-delay-300 { animation-delay: 300ms; }
319
+ .ease-delay-500 { animation-delay: 500ms; }
320
+ .ease-delay-700 { animation-delay: 700ms; }
321
+
322
+ /* ── Duration Overrides ────────────────────────────────────── */
323
+ .ease-duration-fast { animation-duration: var(--ease-speed-fast); }
324
+ .ease-duration-medium { animation-duration: var(--ease-speed-medium); }
325
+ .ease-duration-slow { animation-duration: var(--ease-speed-slow); }
326
+
327
+ /* ── Reduced Motion: Respect user preference ───────────────── */
328
+ @media (prefers-reduced-motion: reduce) {
329
+ *,
330
+ *::before,
331
+ *::after {
332
+ animation-duration: 0.01ms !important;
333
+ animation-iteration-count: 1 !important;
334
+ transition-duration: 0.01ms !important;
335
+ }
336
+ }
package/core/base.css ADDED
@@ -0,0 +1,137 @@
1
+ /* ============================================================
2
+ EaseMotion CSS — base.css
3
+ Resets, base element styles, and typographic foundation
4
+ ============================================================ */
5
+
6
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
7
+
8
+ /* ── Box Model Reset ───────────────────────────────────────── */
9
+ *,
10
+ *::before,
11
+ *::after {
12
+ box-sizing: border-box;
13
+ margin: 0;
14
+ padding: 0;
15
+ }
16
+
17
+ /* ── Root & Body ───────────────────────────────────────────── */
18
+ html {
19
+ font-size: 16px;
20
+ scroll-behavior: smooth;
21
+ -webkit-text-size-adjust: 100%;
22
+ }
23
+
24
+ body {
25
+ font-family: var(--ease-font-sans);
26
+ font-size: var(--ease-text-base);
27
+ line-height: var(--ease-leading-normal);
28
+ color: var(--ease-color-text);
29
+ background-color: var(--ease-color-bg);
30
+ -webkit-font-smoothing: antialiased;
31
+ -moz-osx-font-smoothing: grayscale;
32
+ }
33
+
34
+ /* ── Typography ────────────────────────────────────────────── */
35
+ h1, h2, h3, h4, h5, h6 {
36
+ font-weight: 700;
37
+ line-height: var(--ease-leading-tight);
38
+ color: var(--ease-color-neutral-900);
39
+ }
40
+
41
+ h1 { font-size: var(--ease-text-4xl); }
42
+ h2 { font-size: var(--ease-text-3xl); }
43
+ h3 { font-size: var(--ease-text-2xl); }
44
+ h4 { font-size: var(--ease-text-xl); }
45
+ h5 { font-size: var(--ease-text-lg); }
46
+ h6 { font-size: var(--ease-text-base); }
47
+
48
+ p {
49
+ margin-bottom: var(--ease-space-4);
50
+ color: var(--ease-color-neutral-700);
51
+ }
52
+
53
+ a {
54
+ color: var(--ease-color-primary);
55
+ text-decoration: none;
56
+ transition: color var(--ease-speed-fast) var(--ease-ease);
57
+ }
58
+
59
+ a:hover {
60
+ color: var(--ease-color-primary-dark);
61
+ text-decoration: underline;
62
+ }
63
+
64
+ /* ── Lists ─────────────────────────────────────────────────── */
65
+ ul, ol {
66
+ padding-left: var(--ease-space-6);
67
+ }
68
+
69
+ li {
70
+ margin-bottom: var(--ease-space-1);
71
+ }
72
+
73
+ /* ── Media ─────────────────────────────────────────────────── */
74
+ img, video, svg {
75
+ display: block;
76
+ max-width: 100%;
77
+ }
78
+
79
+ /* ── Code ──────────────────────────────────────────────────── */
80
+ code,
81
+ kbd,
82
+ samp,
83
+ pre {
84
+ font-family: var(--ease-font-mono);
85
+ font-size: var(--ease-text-sm);
86
+ }
87
+
88
+ code {
89
+ background-color: var(--ease-color-neutral-100);
90
+ color: var(--ease-color-primary-dark);
91
+ padding: 0.1em 0.4em;
92
+ border-radius: var(--ease-radius-sm);
93
+ }
94
+
95
+ pre {
96
+ background-color: var(--ease-color-neutral-900);
97
+ color: var(--ease-color-neutral-50);
98
+ padding: var(--ease-space-6);
99
+ border-radius: var(--ease-radius-md);
100
+ overflow-x: auto;
101
+ line-height: var(--ease-leading-loose);
102
+ }
103
+
104
+ /* ── Form Elements ─────────────────────────────────────────── */
105
+ input,
106
+ textarea,
107
+ select,
108
+ button {
109
+ font-family: inherit;
110
+ font-size: inherit;
111
+ }
112
+
113
+ button {
114
+ cursor: pointer;
115
+ border: none;
116
+ background: none;
117
+ }
118
+
119
+ /* ── Horizontal Rule ───────────────────────────────────────── */
120
+ hr {
121
+ border: none;
122
+ border-top: 1px solid var(--ease-color-neutral-200);
123
+ margin: var(--ease-space-8) 0;
124
+ }
125
+
126
+ /* ── Focus Ring (accessible) ───────────────────────────────── */
127
+ :focus-visible {
128
+ outline: 2px solid var(--ease-color-primary);
129
+ outline-offset: 3px;
130
+ border-radius: var(--ease-radius-sm);
131
+ }
132
+
133
+ /* ── Selection ─────────────────────────────────────────────── */
134
+ ::selection {
135
+ background-color: var(--ease-color-primary);
136
+ color: #ffffff;
137
+ }