kira-kit 0.4.0 → 0.6.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.
Files changed (36) hide show
  1. package/README.md +275 -176
  2. package/dist/index.mjs +4795 -1216
  3. package/package.json +71 -64
  4. package/templates/monorepo/kira-kit.json +21 -0
  5. package/templates/monorepo/packages/ui/package.json +37 -32
  6. package/templates/monorepo/packages/ui/src/components/ui/welcome.tsx +52 -52
  7. package/templates/monorepo/packages/ui/src/index.css +738 -89
  8. package/templates/monorepo/packages/ui/src/styles/kira-utilities.css +649 -0
  9. package/templates/monorepo/packages/ui/tsconfig.json +8 -7
  10. package/templates/next/app/globals.css +731 -83
  11. package/templates/next/app/kira-utilities.css +649 -0
  12. package/templates/next/components/ui/welcome.tsx +62 -62
  13. package/templates/next/kira-kit.json +21 -0
  14. package/templates/next/package.json +31 -28
  15. package/templates/next/types/import-meta.d.ts +11 -0
  16. package/templates/tanstack-start/README.md +16 -16
  17. package/templates/tanstack-start/kira-kit.json +21 -0
  18. package/templates/tanstack-start/package.json +33 -30
  19. package/templates/tanstack-start/src/components/ui/route-transition.tsx +116 -0
  20. package/templates/tanstack-start/src/components/ui/welcome.tsx +52 -52
  21. package/templates/tanstack-start/src/index.css +738 -89
  22. package/templates/tanstack-start/src/lib/view-transition.ts +35 -0
  23. package/templates/tanstack-start/src/router.tsx +23 -15
  24. package/templates/tanstack-start/src/routes/__root.tsx +70 -41
  25. package/templates/tanstack-start/src/styles/kira-utilities.css +649 -0
  26. package/templates/tanstack-start/tsconfig.json +22 -21
  27. package/templates/vite/kira-kit.json +21 -0
  28. package/templates/vite/package.json +31 -28
  29. package/templates/vite/src/components/ui/welcome.tsx +60 -60
  30. package/templates/vite/src/index.css +731 -83
  31. package/templates/vite/src/styles/kira-utilities.css +649 -0
  32. package/templates/vite/tsconfig.node.json +25 -22
  33. package/templates/monorepo/components.json +0 -23
  34. package/templates/next/components.json +0 -23
  35. package/templates/tanstack-start/components.json +0 -23
  36. package/templates/vite/components.json +0 -23
@@ -0,0 +1,649 @@
1
+ @theme inline {
2
+ @keyframes accordion-down {
3
+ from {
4
+ height: 0;
5
+ }
6
+ to {
7
+ height: var(
8
+ --radix-accordion-content-height,
9
+ var(--accordion-panel-height, auto)
10
+ );
11
+ }
12
+ }
13
+
14
+ @keyframes accordion-up {
15
+ from {
16
+ height: var(
17
+ --radix-accordion-content-height,
18
+ var(--accordion-panel-height, auto)
19
+ );
20
+ }
21
+ to {
22
+ height: 0;
23
+ }
24
+ }
25
+ }
26
+
27
+ /* Custom variants */
28
+ @custom-variant data-open {
29
+ &:where([data-state="open"]),
30
+ &:where([data-open]:not([data-open="false"])) {
31
+ @slot;
32
+ }
33
+ }
34
+
35
+ @custom-variant data-closed {
36
+ &:where([data-state="closed"]),
37
+ &:where([data-closed]:not([data-closed="false"])) {
38
+ @slot;
39
+ }
40
+ }
41
+
42
+ @custom-variant data-checked {
43
+ &:where([data-state="checked"]),
44
+ &:where([data-checked]:not([data-checked="false"])) {
45
+ @slot;
46
+ }
47
+ }
48
+
49
+ @custom-variant data-unchecked {
50
+ &:where([data-state="unchecked"]),
51
+ &:where([data-unchecked]:not([data-unchecked="false"])) {
52
+ @slot;
53
+ }
54
+ }
55
+
56
+ @custom-variant data-selected {
57
+ &:where([data-selected="true"]) {
58
+ @slot;
59
+ }
60
+ }
61
+
62
+ @custom-variant data-disabled {
63
+ &:where([data-disabled="true"]),
64
+ &:where([data-disabled]:not([data-disabled="false"])) {
65
+ @slot;
66
+ }
67
+ }
68
+
69
+ @custom-variant data-active {
70
+ &:where([data-state="active"]),
71
+ &:where([data-active]:not([data-active="false"])) {
72
+ @slot;
73
+ }
74
+ }
75
+
76
+ @custom-variant data-horizontal {
77
+ &:where([data-orientation="horizontal"]) {
78
+ @slot;
79
+ }
80
+ }
81
+
82
+ @custom-variant data-vertical {
83
+ &:where([data-orientation="vertical"]) {
84
+ @slot;
85
+ }
86
+ }
87
+
88
+ @utility no-scrollbar {
89
+ -ms-overflow-style: none;
90
+ scrollbar-width: none;
91
+
92
+ &::-webkit-scrollbar {
93
+ display: none;
94
+ }
95
+ }
96
+
97
+ /* scroll-fade */
98
+ @property --scroll-fade-t {
99
+ syntax: "<length-percentage>";
100
+ inherits: false;
101
+ initial-value: 0px;
102
+ }
103
+ @property --scroll-fade-b {
104
+ syntax: "<length-percentage>";
105
+ inherits: false;
106
+ initial-value: 0px;
107
+ }
108
+ @property --scroll-fade-s {
109
+ syntax: "<length-percentage>";
110
+ inherits: false;
111
+ initial-value: 0px;
112
+ }
113
+ @property --scroll-fade-e {
114
+ syntax: "<length-percentage>";
115
+ inherits: false;
116
+ initial-value: 0px;
117
+ }
118
+ @property --scroll-fade-mask {
119
+ syntax: "*";
120
+ inherits: false;
121
+ }
122
+
123
+ @theme inline {
124
+ @keyframes scroll-fade-reveal-t {
125
+ from {
126
+ --scroll-fade-t: 0px;
127
+ }
128
+ to {
129
+ --scroll-fade-t: var(
130
+ --_scroll-fade-size-t,
131
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
132
+ );
133
+ }
134
+ }
135
+ @keyframes scroll-fade-reveal-b {
136
+ from {
137
+ --scroll-fade-b: var(
138
+ --_scroll-fade-size-b,
139
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
140
+ );
141
+ }
142
+ to {
143
+ --scroll-fade-b: 0px;
144
+ }
145
+ }
146
+ @keyframes scroll-fade-reveal-s {
147
+ from {
148
+ --scroll-fade-s: 0px;
149
+ }
150
+ to {
151
+ --scroll-fade-s: var(
152
+ --_scroll-fade-size-s,
153
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
154
+ );
155
+ }
156
+ }
157
+ @keyframes scroll-fade-reveal-e {
158
+ from {
159
+ --scroll-fade-e: var(
160
+ --_scroll-fade-size-e,
161
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
162
+ );
163
+ }
164
+ to {
165
+ --scroll-fade-e: 0px;
166
+ }
167
+ }
168
+ }
169
+
170
+ @utility scroll-fade {
171
+ --_scroll-fade-size-t: var(
172
+ --scroll-fade-t-size,
173
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
174
+ );
175
+ --_scroll-fade-size-b: var(
176
+ --scroll-fade-b-size,
177
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
178
+ );
179
+ --scroll-fade-block: linear-gradient(
180
+ to bottom,
181
+ transparent 0,
182
+ #000 var(--scroll-fade-t, 0px),
183
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
184
+ transparent 100%
185
+ );
186
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
187
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
188
+ -webkit-mask-composite: source-in;
189
+ mask-composite: intersect;
190
+ -webkit-mask-repeat: no-repeat;
191
+ mask-repeat: no-repeat;
192
+
193
+ @supports (animation-timeline: scroll()) {
194
+ animation:
195
+ scroll-fade-reveal-t 1ms ease-in-out,
196
+ scroll-fade-reveal-b 1ms ease-in-out;
197
+ animation-timeline: scroll(self y), scroll(self y);
198
+ animation-range:
199
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
200
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
201
+ animation-fill-mode: both;
202
+ }
203
+
204
+ @supports not (animation-timeline: scroll()) {
205
+ --scroll-fade-t: var(--_scroll-fade-size-t);
206
+ --scroll-fade-b: var(--_scroll-fade-size-b);
207
+ }
208
+ }
209
+
210
+ @utility scroll-fade-y {
211
+ --_scroll-fade-size-t: var(
212
+ --scroll-fade-t-size,
213
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
214
+ );
215
+ --_scroll-fade-size-b: var(
216
+ --scroll-fade-b-size,
217
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
218
+ );
219
+ --scroll-fade-block: linear-gradient(
220
+ to bottom,
221
+ transparent 0,
222
+ #000 var(--scroll-fade-t, 0px),
223
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
224
+ transparent 100%
225
+ );
226
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
227
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-block));
228
+ -webkit-mask-composite: source-in;
229
+ mask-composite: intersect;
230
+ -webkit-mask-repeat: no-repeat;
231
+ mask-repeat: no-repeat;
232
+
233
+ @supports (animation-timeline: scroll()) {
234
+ animation:
235
+ scroll-fade-reveal-t 1ms ease-in-out,
236
+ scroll-fade-reveal-b 1ms ease-in-out;
237
+ animation-timeline: scroll(self y), scroll(self y);
238
+ animation-range:
239
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
240
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
241
+ animation-fill-mode: both;
242
+ }
243
+
244
+ @supports not (animation-timeline: scroll()) {
245
+ --scroll-fade-t: var(--_scroll-fade-size-t);
246
+ --scroll-fade-b: var(--_scroll-fade-size-b);
247
+ }
248
+ }
249
+
250
+ @utility scroll-fade-x {
251
+ --_scroll-fade-size-s: var(
252
+ --scroll-fade-s-size,
253
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
254
+ );
255
+ --_scroll-fade-size-e: var(
256
+ --scroll-fade-e-size,
257
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
258
+ );
259
+ --scroll-fade-inline: linear-gradient(
260
+ to right,
261
+ transparent 0,
262
+ #000 var(--scroll-fade-s, 0px),
263
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
264
+ transparent 100%
265
+ );
266
+ &:where([dir="rtl"], [dir="rtl"] *) {
267
+ --scroll-fade-inline: linear-gradient(
268
+ to left,
269
+ transparent 0,
270
+ #000 var(--scroll-fade-s, 0px),
271
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
272
+ transparent 100%
273
+ );
274
+ }
275
+ -webkit-mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
276
+ mask-image: var(--scroll-fade-mask, var(--scroll-fade-inline));
277
+ -webkit-mask-composite: source-in;
278
+ mask-composite: intersect;
279
+ -webkit-mask-repeat: no-repeat;
280
+ mask-repeat: no-repeat;
281
+
282
+ @supports (animation-timeline: scroll()) {
283
+ animation:
284
+ scroll-fade-reveal-s 1ms ease-in-out,
285
+ scroll-fade-reveal-e 1ms ease-in-out;
286
+ animation-timeline: scroll(self inline), scroll(self inline);
287
+ animation-range:
288
+ 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24)),
289
+ calc(100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))) 100%;
290
+ animation-fill-mode: both;
291
+ }
292
+
293
+ @supports not (animation-timeline: scroll()) {
294
+ --scroll-fade-s: var(--_scroll-fade-size-s);
295
+ --scroll-fade-e: var(--_scroll-fade-size-e);
296
+ }
297
+ }
298
+
299
+ @utility scroll-fade-t {
300
+ --_scroll-fade-size-t: var(
301
+ --scroll-fade-t-size,
302
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
303
+ );
304
+ --scroll-fade-mask: linear-gradient(
305
+ to bottom,
306
+ transparent 0,
307
+ #000 var(--scroll-fade-t, 0px),
308
+ #000 100%
309
+ );
310
+ -webkit-mask-image: var(--scroll-fade-mask);
311
+ mask-image: var(--scroll-fade-mask);
312
+ -webkit-mask-composite: source-in;
313
+ mask-composite: intersect;
314
+ -webkit-mask-repeat: no-repeat;
315
+ mask-repeat: no-repeat;
316
+
317
+ @supports (animation-timeline: scroll()) {
318
+ animation: scroll-fade-reveal-t 1ms ease-in-out;
319
+ animation-timeline: scroll(self y);
320
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
321
+ animation-fill-mode: both;
322
+ }
323
+
324
+ @supports not (animation-timeline: scroll()) {
325
+ --scroll-fade-t: var(--_scroll-fade-size-t);
326
+ }
327
+ }
328
+
329
+ @utility scroll-fade-b {
330
+ --_scroll-fade-size-b: var(
331
+ --scroll-fade-b-size,
332
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
333
+ );
334
+ --scroll-fade-mask: linear-gradient(
335
+ to bottom,
336
+ #000 0,
337
+ #000 calc(100% - var(--scroll-fade-b, 0px)),
338
+ transparent 100%
339
+ );
340
+ -webkit-mask-image: var(--scroll-fade-mask);
341
+ mask-image: var(--scroll-fade-mask);
342
+ -webkit-mask-composite: source-in;
343
+ mask-composite: intersect;
344
+ -webkit-mask-repeat: no-repeat;
345
+ mask-repeat: no-repeat;
346
+
347
+ @supports (animation-timeline: scroll()) {
348
+ animation: scroll-fade-reveal-b 1ms ease-in-out;
349
+ animation-timeline: scroll(self y);
350
+ animation-range: calc(
351
+ 100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))
352
+ )
353
+ 100%;
354
+ animation-fill-mode: both;
355
+ }
356
+
357
+ @supports not (animation-timeline: scroll()) {
358
+ --scroll-fade-b: var(--_scroll-fade-size-b);
359
+ }
360
+ }
361
+
362
+ @utility scroll-fade-l {
363
+ --_scroll-fade-size-s: var(
364
+ --scroll-fade-s-size,
365
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
366
+ );
367
+ --scroll-fade-mask: linear-gradient(
368
+ to right,
369
+ transparent 0,
370
+ #000 var(--scroll-fade-s, 0px),
371
+ #000 100%
372
+ );
373
+ -webkit-mask-image: var(--scroll-fade-mask);
374
+ mask-image: var(--scroll-fade-mask);
375
+ -webkit-mask-composite: source-in;
376
+ mask-composite: intersect;
377
+ -webkit-mask-repeat: no-repeat;
378
+ mask-repeat: no-repeat;
379
+
380
+ @supports (animation-timeline: scroll()) {
381
+ animation: scroll-fade-reveal-s 1ms ease-in-out;
382
+ animation-timeline: scroll(self x);
383
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
384
+ animation-fill-mode: both;
385
+ }
386
+
387
+ @supports not (animation-timeline: scroll()) {
388
+ --scroll-fade-s: var(--_scroll-fade-size-s);
389
+ }
390
+ }
391
+
392
+ @utility scroll-fade-r {
393
+ --_scroll-fade-size-e: var(
394
+ --scroll-fade-e-size,
395
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
396
+ );
397
+ --scroll-fade-mask: linear-gradient(
398
+ to right,
399
+ #000 0,
400
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
401
+ transparent 100%
402
+ );
403
+ -webkit-mask-image: var(--scroll-fade-mask);
404
+ mask-image: var(--scroll-fade-mask);
405
+ -webkit-mask-composite: source-in;
406
+ mask-composite: intersect;
407
+ -webkit-mask-repeat: no-repeat;
408
+ mask-repeat: no-repeat;
409
+
410
+ @supports (animation-timeline: scroll()) {
411
+ animation: scroll-fade-reveal-e 1ms ease-in-out;
412
+ animation-timeline: scroll(self x);
413
+ animation-range: calc(
414
+ 100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))
415
+ )
416
+ 100%;
417
+ animation-fill-mode: both;
418
+ }
419
+
420
+ @supports not (animation-timeline: scroll()) {
421
+ --scroll-fade-e: var(--_scroll-fade-size-e);
422
+ }
423
+ }
424
+
425
+ @utility scroll-fade-s {
426
+ --_scroll-fade-size-s: var(
427
+ --scroll-fade-s-size,
428
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
429
+ );
430
+ --scroll-fade-mask: linear-gradient(
431
+ to right,
432
+ transparent 0,
433
+ #000 var(--scroll-fade-s, 0px),
434
+ #000 100%
435
+ );
436
+ &:where([dir="rtl"], [dir="rtl"] *) {
437
+ --scroll-fade-mask: linear-gradient(
438
+ to left,
439
+ transparent 0,
440
+ #000 var(--scroll-fade-s, 0px),
441
+ #000 100%
442
+ );
443
+ }
444
+ -webkit-mask-image: var(--scroll-fade-mask);
445
+ mask-image: var(--scroll-fade-mask);
446
+ -webkit-mask-composite: source-in;
447
+ mask-composite: intersect;
448
+ -webkit-mask-repeat: no-repeat;
449
+ mask-repeat: no-repeat;
450
+
451
+ @supports (animation-timeline: scroll()) {
452
+ animation: scroll-fade-reveal-s 1ms ease-in-out;
453
+ animation-timeline: scroll(self inline);
454
+ animation-range: 0 var(--scroll-fade-reveal, calc(var(--spacing) * 24));
455
+ animation-fill-mode: both;
456
+ }
457
+
458
+ @supports not (animation-timeline: scroll()) {
459
+ --scroll-fade-s: var(--_scroll-fade-size-s);
460
+ }
461
+ }
462
+
463
+ @utility scroll-fade-e {
464
+ --_scroll-fade-size-e: var(
465
+ --scroll-fade-e-size,
466
+ var(--scroll-fade-size, min(12%, calc(var(--spacing) * 10)))
467
+ );
468
+ --scroll-fade-mask: linear-gradient(
469
+ to right,
470
+ #000 0,
471
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
472
+ transparent 100%
473
+ );
474
+ &:where([dir="rtl"], [dir="rtl"] *) {
475
+ --scroll-fade-mask: linear-gradient(
476
+ to left,
477
+ #000 0,
478
+ #000 calc(100% - var(--scroll-fade-e, 0px)),
479
+ transparent 100%
480
+ );
481
+ }
482
+ -webkit-mask-image: var(--scroll-fade-mask);
483
+ mask-image: var(--scroll-fade-mask);
484
+ -webkit-mask-composite: source-in;
485
+ mask-composite: intersect;
486
+ -webkit-mask-repeat: no-repeat;
487
+ mask-repeat: no-repeat;
488
+
489
+ @supports (animation-timeline: scroll()) {
490
+ animation: scroll-fade-reveal-e 1ms ease-in-out;
491
+ animation-timeline: scroll(self inline);
492
+ animation-range: calc(
493
+ 100% - var(--scroll-fade-reveal, calc(var(--spacing) * 24))
494
+ )
495
+ 100%;
496
+ animation-fill-mode: both;
497
+ }
498
+
499
+ @supports not (animation-timeline: scroll()) {
500
+ --scroll-fade-e: var(--_scroll-fade-size-e);
501
+ }
502
+ }
503
+
504
+ @utility scroll-fade-* {
505
+ --scroll-fade-size: calc(var(--spacing) * --value(integer));
506
+ --scroll-fade-size: --value([length], [percentage]);
507
+ }
508
+
509
+ @utility scroll-fade-t-* {
510
+ --scroll-fade-t-size: calc(var(--spacing) * --value(integer));
511
+ --scroll-fade-t-size: --value([length], [percentage]);
512
+ }
513
+
514
+ @utility scroll-fade-b-* {
515
+ --scroll-fade-b-size: calc(var(--spacing) * --value(integer));
516
+ --scroll-fade-b-size: --value([length], [percentage]);
517
+ }
518
+
519
+ @utility scroll-fade-s-* {
520
+ --scroll-fade-s-size: calc(var(--spacing) * --value(integer));
521
+ --scroll-fade-s-size: --value([length], [percentage]);
522
+ }
523
+
524
+ @utility scroll-fade-e-* {
525
+ --scroll-fade-e-size: calc(var(--spacing) * --value(integer));
526
+ --scroll-fade-e-size: --value([length], [percentage]);
527
+ }
528
+
529
+ @utility scroll-fade-none {
530
+ --scroll-fade-mask: none;
531
+ }
532
+
533
+ /* shimmer */
534
+ @property --shimmer-angle {
535
+ syntax: "<angle>";
536
+ inherits: true;
537
+ initial-value: 20deg;
538
+ }
539
+ @property --shimmer-image {
540
+ syntax: "*";
541
+ inherits: false;
542
+ }
543
+ @property --shimmer-text-fill {
544
+ syntax: "*";
545
+ inherits: false;
546
+ }
547
+
548
+ @theme inline {
549
+ @keyframes tw-shimmer {
550
+ from {
551
+ background-position: 100% 0;
552
+ }
553
+ to {
554
+ background-position: 0 0;
555
+ }
556
+ }
557
+ }
558
+
559
+ @utility shimmer {
560
+ --_spread: var(--shimmer-spread, calc(3ch + 40px));
561
+ --_base: currentColor;
562
+ --_highlight: var(
563
+ --shimmer-color,
564
+ oklch(from currentColor l c h / calc(alpha* 0.2))
565
+ );
566
+
567
+ background-image: var(
568
+ --shimmer-image,
569
+ linear-gradient(
570
+ calc(90deg + var(--shimmer-angle)),
571
+ var(--_base) calc(50% - var(--_spread)),
572
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%)
573
+ calc(50% - var(--_spread) * 0.5),
574
+ var(--_highlight) 50%,
575
+ color-mix(in oklch, var(--_highlight), var(--_base) 50%)
576
+ calc(50% + var(--_spread) * 0.5),
577
+ var(--_base) calc(50% + var(--_spread))
578
+ )
579
+ );
580
+ background-repeat: no-repeat;
581
+ background-size: calc(200% + var(--_spread) * 2) 100%;
582
+ background-position: 0 0;
583
+ background-clip: text;
584
+ -webkit-background-clip: text;
585
+ -webkit-text-fill-color: var(--shimmer-text-fill, transparent);
586
+ animation: tw-shimmer var(--shimmer-duration, 2s) linear infinite;
587
+
588
+ @variant dark {
589
+ --_highlight: var(
590
+ --shimmer-color,
591
+ oklch(from currentColor max(0.8, calc(l + 0.4)) c h / calc(alpha + 0.4))
592
+ );
593
+ }
594
+
595
+ &:where([dir="rtl"], [dir="rtl"] *) {
596
+ animation-direction: reverse;
597
+ }
598
+
599
+ @media (prefers-reduced-motion: reduce) {
600
+ animation: none;
601
+ background-image: none;
602
+ -webkit-text-fill-color: currentColor;
603
+ }
604
+ }
605
+
606
+ @utility shimmer-once {
607
+ animation-iteration-count: 1;
608
+ }
609
+
610
+ @utility shimmer-reverse {
611
+ animation-direction: reverse;
612
+ }
613
+
614
+ @utility shimmer-none {
615
+ --shimmer-image: none;
616
+ --shimmer-text-fill: currentColor;
617
+ }
618
+
619
+ @utility shimmer-color-* {
620
+ --shimmer-color: --value(--color, [color]);
621
+ --shimmer-color: color-mix(
622
+ in oklch,
623
+ --value(--color, [color]) calc(--modifier(integer) * 1%),
624
+ transparent
625
+ );
626
+ }
627
+
628
+ @utility shimmer-duration-* {
629
+ --shimmer-duration: calc(--value(integer) * 1ms);
630
+ }
631
+
632
+ @utility shimmer-spread-* {
633
+ --shimmer-spread: calc(var(--spacing) * --value(integer));
634
+ --shimmer-spread: --value([length], [percentage]);
635
+ }
636
+
637
+ @utility shimmer-angle-* {
638
+ --shimmer-angle: calc(--value(integer) * 1deg);
639
+ }
640
+
641
+ /* Kept for backwards compatibility. Unlayered, so it still wins over other
642
+ utilities on a plain .shimmer element. Variants are handled in the utility. */
643
+ @media (prefers-reduced-motion: reduce) {
644
+ .shimmer {
645
+ animation: none;
646
+ background-image: none;
647
+ -webkit-text-fill-color: currentColor;
648
+ }
649
+ }
@@ -1,7 +1,8 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "noEmit": true
5
- },
6
- "include": ["src"]
7
- }
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "compilerOptions": {
4
+ "noEmit": true,
5
+ "types": ["vite/client"]
6
+ },
7
+ "include": ["src"]
8
+ }