@jjlmoya/utils-creative 1.17.0 → 1.18.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.
@@ -297,348 +297,3 @@ const ASSETS = {
297
297
  new FortuneCookie();
298
298
  </script>
299
299
 
300
- <style>
301
- .fortune-cookie {
302
- --fortune-cookie-bg: #fff;
303
- --fortune-cookie-bg-muted: #fffbeb;
304
- --fortune-cookie-text: #0f172a;
305
- --fortune-cookie-text-muted: #475569;
306
- --fortune-cookie-text-dim: #64748b;
307
- --fortune-cookie-border: #fef3c7;
308
- --fortune-cookie-shadow: rgba(0, 0, 0, 0.05);
309
- --fortune-cookie-primary: #f59e0b;
310
- --fortune-cookie-primary-on: #fff;
311
- --fortune-cookie-accent: #fcd34d;
312
- --fortune-cookie-success: #10b981;
313
- --fortune-cookie-warning: #f59e0b;
314
- --fortune-cookie-error: #f43f5e;
315
- }
316
-
317
- :global(.theme-dark) .fortune-cookie {
318
- --fortune-cookie-bg: #0f172a;
319
- --fortune-cookie-bg-muted: #1e293b;
320
- --fortune-cookie-text: #f8fafc;
321
- --fortune-cookie-text-muted: #94a3b8;
322
- --fortune-cookie-text-dim: #64748b;
323
- --fortune-cookie-border: #334155;
324
- --fortune-cookie-shadow: rgba(0, 0, 0, 0.3);
325
- --fortune-cookie-primary: #fbbf24;
326
- --fortune-cookie-primary-on: #fff;
327
- --fortune-cookie-accent: #fcd34d;
328
- --fortune-cookie-success: #34d399;
329
- --fortune-cookie-warning: #fbbf24;
330
- --fortune-cookie-error: #fb7185;
331
- }
332
-
333
- .fortune-cookie-root {
334
- width: 100%;
335
- max-width: 64rem;
336
- margin-left: auto;
337
- margin-right: auto;
338
- }
339
-
340
- .fortune-cookie-card {
341
- position: relative;
342
- background-color: var(--fortune-cookie-bg);
343
- border-radius: 1.5rem;
344
- box-shadow: 0 25px 50px -12px var(--fortune-cookie-shadow);
345
- overflow: hidden;
346
- border: 1px solid var(--fortune-cookie-border);
347
- min-height: 600px;
348
- display: flex;
349
- flex-direction: column;
350
- align-items: center;
351
- justify-content: center;
352
- padding: 2rem;
353
- }
354
-
355
- .fortune-cookie-glow {
356
- position: absolute;
357
- inset: 0;
358
- opacity: 0.1;
359
- pointer-events: none;
360
- background-image: radial-gradient(circle at center, var(--fortune-cookie-primary), transparent, transparent);
361
- }
362
-
363
- .fortune-cookie-content {
364
- position: relative;
365
- z-index: 10;
366
- width: 100%;
367
- display: flex;
368
- flex-direction: column;
369
- align-items: center;
370
- }
371
-
372
- .fortune-cookie-instruction {
373
- font-size: 1.25rem;
374
- line-height: 1.75rem;
375
- font-weight: 700;
376
- color: #92400e;
377
- margin-bottom: 2rem;
378
- text-transform: uppercase;
379
- letter-spacing: 0.1em;
380
- animation: fortune-cookie-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
381
- }
382
-
383
- :global(.theme-dark) .fortune-cookie-instruction {
384
- color: #fbbf24;
385
- }
386
-
387
- @keyframes fortune-cookie-pulse {
388
- 0%, 100% { opacity: 1; }
389
- 50% { opacity: .5; }
390
- }
391
-
392
- .fortune-cookie-stage {
393
- position: relative;
394
- width: 20rem;
395
- height: 20rem;
396
- cursor: pointer;
397
- }
398
-
399
- @media (min-width: 768px) {
400
- .fortune-cookie-stage {
401
- width: 24rem;
402
- height: 24rem;
403
- }
404
- }
405
-
406
- .fortune-cookie-body {
407
- position: absolute;
408
- inset: 2rem;
409
- transition-property: transform;
410
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
411
- transition-duration: 100ms;
412
- }
413
-
414
- @media (min-width: 768px) {
415
- .fortune-cookie-body {
416
- inset: 3rem;
417
- }
418
- }
419
-
420
- .fortune-cookie-body:active {
421
- transform: scale(0.95);
422
- }
423
-
424
- .fortune-cookie-img {
425
- width: 100%;
426
- height: 100%;
427
- object-fit: contain;
428
- z-index: 10;
429
- position: relative;
430
- }
431
-
432
- .fortune-cookie-broken {
433
- position: absolute;
434
- inset: 2rem;
435
- pointer-events: none;
436
- }
437
-
438
- .fortune-cookie-broken.hidden {
439
- display: none;
440
- }
441
-
442
- @media (min-width: 768px) {
443
- .fortune-cookie-broken {
444
- inset: 3rem;
445
- }
446
- }
447
-
448
- .fortune-cookie-half {
449
- position: absolute;
450
- width: 50%;
451
- height: 100%;
452
- object-fit: contain;
453
- transition-property: all;
454
- transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
455
- transition-duration: 1000ms;
456
- }
457
-
458
- .fortune-cookie-half-left {
459
- left: 0;
460
- transform-origin: bottom left;
461
- }
462
-
463
- .fortune-cookie-half-right {
464
- right: 0;
465
- transform-origin: bottom right;
466
- }
467
-
468
- .fortune-cookie-paper {
469
- position: absolute;
470
- top: 50%;
471
- left: 50%;
472
- transform: translate(-50%, -50%) scale(0.5);
473
- width: 85%;
474
- max-width: 320px;
475
- background-color: #fff;
476
- border-radius: 2px;
477
- box-shadow:
478
- 0 10px 15px -3px rgba(0, 0, 0, 0.2),
479
- 0 4px 6px -2px rgba(0, 0, 0, 0.1),
480
- inset 0 0 20px rgba(0, 0, 0, 0.05);
481
- opacity: 0;
482
- transition-property: all;
483
- transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
484
- transition-duration: 800ms;
485
- z-index: 0;
486
- overflow: hidden;
487
- }
488
-
489
- .fortune-cookie-paper.visible {
490
- opacity: 1;
491
- transform: translate(-50%, -50%) scale(1) rotate(-1deg);
492
- z-index: 20;
493
- }
494
-
495
- .fortune-cookie-paper-img {
496
- width: 100%;
497
- height: auto;
498
- display: block;
499
- opacity: 0.15;
500
- pointer-events: none;
501
- mix-blend-mode: multiply;
502
- }
503
-
504
- .fortune-cookie-paper-content {
505
- position: absolute;
506
- inset: 0;
507
- display: flex;
508
- flex-direction: column;
509
- align-items: center;
510
- justify-content: center;
511
- padding: 1.5rem;
512
- text-align: center;
513
- z-index: 10;
514
- }
515
-
516
- .fortune-cookie-text {
517
- color: #1e293b;
518
- font-weight: 800;
519
- font-size: 1.125rem;
520
- line-height: 1.4;
521
- transform: rotate(-1deg);
522
- user-select: text;
523
- margin: 0;
524
- }
525
-
526
- @media (min-width: 768px) {
527
- .fortune-cookie-text {
528
- font-size: 1.25rem;
529
- }
530
- }
531
-
532
- .fortune-cookie-lucky-numbers {
533
- margin-top: 1rem;
534
- display: flex;
535
- flex-wrap: wrap;
536
- gap: 0.5rem;
537
- justify-content: center;
538
- transform: rotate(-1deg);
539
- }
540
-
541
- :global(.fortune-cookie-number) {
542
- font-size: 0.75rem;
543
- line-height: 1rem;
544
- font-weight: 700;
545
- background-color: #f1f5f9;
546
- color: #dc2626;
547
- padding-left: 0.5rem;
548
- padding-right: 0.5rem;
549
- padding-top: 0.125rem;
550
- padding-bottom: 0.125rem;
551
- border-radius: 0.25rem;
552
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
553
- border: 1px solid #fee2e2;
554
- }
555
-
556
- .fortune-cookie-particles {
557
- position: absolute;
558
- inset: 0;
559
- pointer-events: none;
560
- overflow: visible;
561
- z-index: 20;
562
- }
563
-
564
- .fortune-cookie-reset {
565
- display: none;
566
- margin-top: 3rem;
567
- flex-direction: column;
568
- align-items: center;
569
- gap: 1rem;
570
- }
571
-
572
- .fortune-cookie-reset.visible {
573
- display: flex;
574
- }
575
-
576
- .fortune-cookie-status {
577
- font-size: 0.875rem;
578
- line-height: 1.25rem;
579
- color: var(--fortune-cookie-text-dim);
580
- }
581
-
582
- .fortune-cookie-share-btn {
583
- padding-left: 1.5rem;
584
- padding-right: 1.5rem;
585
- padding-top: 0.5rem;
586
- padding-bottom: 0.5rem;
587
- background-color: #f1f5f9;
588
- color: #334155;
589
- border-radius: 9999px;
590
- font-size: 0.875rem;
591
- line-height: 1.25rem;
592
- font-weight: 700;
593
- border: none;
594
- cursor: pointer;
595
- display: flex;
596
- align-items: center;
597
- gap: 0.5rem;
598
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
599
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
600
- transition-duration: 150ms;
601
- }
602
-
603
- :global(.theme-dark) .fortune-cookie-share-btn {
604
- background-color: #1e293b;
605
- color: #cbd5e1;
606
- }
607
-
608
- .fortune-cookie-share-btn:hover {
609
- background-color: #e2e8f0;
610
- }
611
-
612
- :global(.theme-dark) .fortune-cookie-share-btn:hover {
613
- background-color: #334155;
614
- }
615
-
616
- .fortune-cookie-shake-1 {
617
- animation: fortune-cookie-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
618
- }
619
-
620
- .fortune-cookie-shake-2 {
621
- animation: fortune-cookie-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
622
- }
623
-
624
- .fortune-cookie-shake-3 {
625
- animation: fortune-cookie-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
626
- }
627
-
628
- @keyframes fortune-cookie-shake {
629
- 10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); }
630
- 20%, 80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
631
- 30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-4deg); }
632
- 40%, 60% { transform: translate3d(4px, 0, 0) rotate(4deg); }
633
- }
634
-
635
- :global(.fortune-cookie-crumb) {
636
- position: absolute;
637
- width: 20px;
638
- height: 20px;
639
- background-image: url("/images/utilities/fortune/fc-crumbs.webp");
640
- background-size: contain;
641
- background-repeat: no-repeat;
642
- pointer-events: none;
643
- }
644
- </style>
@@ -0,0 +1,343 @@
1
+ .fortune-cookie {
2
+ --fortune-cookie-bg: #fff;
3
+ --fortune-cookie-bg-muted: #fffbeb;
4
+ --fortune-cookie-text: #0f172a;
5
+ --fortune-cookie-text-muted: #475569;
6
+ --fortune-cookie-text-dim: #64748b;
7
+ --fortune-cookie-border: #fef3c7;
8
+ --fortune-cookie-shadow: rgba(0, 0, 0, 0.05);
9
+ --fortune-cookie-primary: #f59e0b;
10
+ --fortune-cookie-primary-on: #fff;
11
+ --fortune-cookie-accent: #fcd34d;
12
+ --fortune-cookie-success: #10b981;
13
+ --fortune-cookie-warning: #f59e0b;
14
+ --fortune-cookie-error: #f43f5e;
15
+ }
16
+
17
+ :global(.theme-dark) .fortune-cookie {
18
+ --fortune-cookie-bg: #0f172a;
19
+ --fortune-cookie-bg-muted: #1e293b;
20
+ --fortune-cookie-text: #f8fafc;
21
+ --fortune-cookie-text-muted: #94a3b8;
22
+ --fortune-cookie-text-dim: #64748b;
23
+ --fortune-cookie-border: #334155;
24
+ --fortune-cookie-shadow: rgba(0, 0, 0, 0.3);
25
+ --fortune-cookie-primary: #fbbf24;
26
+ --fortune-cookie-primary-on: #fff;
27
+ --fortune-cookie-accent: #fcd34d;
28
+ --fortune-cookie-success: #34d399;
29
+ --fortune-cookie-warning: #fbbf24;
30
+ --fortune-cookie-error: #fb7185;
31
+ }
32
+
33
+ .fortune-cookie-root {
34
+ width: 100%;
35
+ max-width: 64rem;
36
+ margin-left: auto;
37
+ margin-right: auto;
38
+ }
39
+
40
+ .fortune-cookie-card {
41
+ position: relative;
42
+ background-color: var(--fortune-cookie-bg);
43
+ border-radius: 1.5rem;
44
+ box-shadow: 0 25px 50px -12px var(--fortune-cookie-shadow);
45
+ overflow: hidden;
46
+ border: 1px solid var(--fortune-cookie-border);
47
+ min-height: 600px;
48
+ display: flex;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ justify-content: center;
52
+ padding: 2rem;
53
+ }
54
+
55
+ .fortune-cookie-glow {
56
+ position: absolute;
57
+ inset: 0;
58
+ opacity: 0.1;
59
+ pointer-events: none;
60
+ background-image: radial-gradient(circle at center, var(--fortune-cookie-primary), transparent, transparent);
61
+ }
62
+
63
+ .fortune-cookie-content {
64
+ position: relative;
65
+ z-index: 10;
66
+ width: 100%;
67
+ display: flex;
68
+ flex-direction: column;
69
+ align-items: center;
70
+ }
71
+
72
+ .fortune-cookie-instruction {
73
+ font-size: 1.25rem;
74
+ line-height: 1.75rem;
75
+ font-weight: 700;
76
+ color: #92400e;
77
+ margin-bottom: 2rem;
78
+ text-transform: uppercase;
79
+ letter-spacing: 0.1em;
80
+ animation: fortune-cookie-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
81
+ }
82
+
83
+ :global(.theme-dark) .fortune-cookie-instruction {
84
+ color: #fbbf24;
85
+ }
86
+
87
+ @keyframes fortune-cookie-pulse {
88
+ 0%, 100% { opacity: 1; }
89
+ 50% { opacity: .5; }
90
+ }
91
+
92
+ .fortune-cookie-stage {
93
+ position: relative;
94
+ width: 20rem;
95
+ height: 20rem;
96
+ cursor: pointer;
97
+ }
98
+
99
+ @media (min-width: 768px) {
100
+ .fortune-cookie-stage {
101
+ width: 24rem;
102
+ height: 24rem;
103
+ }
104
+ }
105
+
106
+ .fortune-cookie-body {
107
+ position: absolute;
108
+ inset: 2rem;
109
+ transition-property: transform;
110
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
111
+ transition-duration: 100ms;
112
+ }
113
+
114
+ @media (min-width: 768px) {
115
+ .fortune-cookie-body {
116
+ inset: 3rem;
117
+ }
118
+ }
119
+
120
+ .fortune-cookie-body:active {
121
+ transform: scale(0.95);
122
+ }
123
+
124
+ .fortune-cookie-img {
125
+ width: 100%;
126
+ height: 100%;
127
+ object-fit: contain;
128
+ z-index: 10;
129
+ position: relative;
130
+ }
131
+
132
+ .fortune-cookie-broken {
133
+ position: absolute;
134
+ inset: 2rem;
135
+ pointer-events: none;
136
+ }
137
+
138
+ .fortune-cookie-broken.hidden {
139
+ display: none;
140
+ }
141
+
142
+ @media (min-width: 768px) {
143
+ .fortune-cookie-broken {
144
+ inset: 3rem;
145
+ }
146
+ }
147
+
148
+ .fortune-cookie-half {
149
+ position: absolute;
150
+ width: 50%;
151
+ height: 100%;
152
+ object-fit: contain;
153
+ transition-property: all;
154
+ transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
155
+ transition-duration: 1000ms;
156
+ }
157
+
158
+ .fortune-cookie-half-left {
159
+ left: 0;
160
+ transform-origin: bottom left;
161
+ }
162
+
163
+ .fortune-cookie-half-right {
164
+ right: 0;
165
+ transform-origin: bottom right;
166
+ }
167
+
168
+ .fortune-cookie-paper {
169
+ position: absolute;
170
+ top: 50%;
171
+ left: 50%;
172
+ transform: translate(-50%, -50%) scale(0.5);
173
+ width: 85%;
174
+ max-width: 320px;
175
+ background-color: #fff;
176
+ border-radius: 2px;
177
+ box-shadow:
178
+ 0 10px 15px -3px rgba(0, 0, 0, 0.2),
179
+ 0 4px 6px -2px rgba(0, 0, 0, 0.1),
180
+ inset 0 0 20px rgba(0, 0, 0, 0.05);
181
+ opacity: 0;
182
+ transition-property: all;
183
+ transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
184
+ transition-duration: 800ms;
185
+ z-index: 0;
186
+ overflow: hidden;
187
+ }
188
+
189
+ .fortune-cookie-paper.visible {
190
+ opacity: 1;
191
+ transform: translate(-50%, -50%) scale(1) rotate(-1deg);
192
+ z-index: 20;
193
+ }
194
+
195
+ .fortune-cookie-paper-img {
196
+ width: 100%;
197
+ height: auto;
198
+ display: block;
199
+ opacity: 0.15;
200
+ pointer-events: none;
201
+ mix-blend-mode: multiply;
202
+ }
203
+
204
+ .fortune-cookie-paper-content {
205
+ position: absolute;
206
+ inset: 0;
207
+ display: flex;
208
+ flex-direction: column;
209
+ align-items: center;
210
+ justify-content: center;
211
+ padding: 1.5rem;
212
+ text-align: center;
213
+ z-index: 10;
214
+ }
215
+
216
+ .fortune-cookie-text {
217
+ color: #1e293b;
218
+ font-weight: 800;
219
+ font-size: 1.125rem;
220
+ line-height: 1.4;
221
+ transform: rotate(-1deg);
222
+ user-select: text;
223
+ margin: 0;
224
+ }
225
+
226
+ @media (min-width: 768px) {
227
+ .fortune-cookie-text {
228
+ font-size: 1.25rem;
229
+ }
230
+ }
231
+
232
+ .fortune-cookie-lucky-numbers {
233
+ margin-top: 1rem;
234
+ display: flex;
235
+ flex-wrap: wrap;
236
+ gap: 0.5rem;
237
+ justify-content: center;
238
+ transform: rotate(-1deg);
239
+ }
240
+
241
+ :global(.fortune-cookie-number) {
242
+ font-size: 0.75rem;
243
+ line-height: 1rem;
244
+ font-weight: 700;
245
+ background-color: #f1f5f9;
246
+ color: #dc2626;
247
+ padding-left: 0.5rem;
248
+ padding-right: 0.5rem;
249
+ padding-top: 0.125rem;
250
+ padding-bottom: 0.125rem;
251
+ border-radius: 0.25rem;
252
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
253
+ border: 1px solid #fee2e2;
254
+ }
255
+
256
+ .fortune-cookie-particles {
257
+ position: absolute;
258
+ inset: 0;
259
+ pointer-events: none;
260
+ overflow: visible;
261
+ z-index: 20;
262
+ }
263
+
264
+ .fortune-cookie-reset {
265
+ display: none;
266
+ margin-top: 3rem;
267
+ flex-direction: column;
268
+ align-items: center;
269
+ gap: 1rem;
270
+ }
271
+
272
+ .fortune-cookie-reset.visible {
273
+ display: flex;
274
+ }
275
+
276
+ .fortune-cookie-status {
277
+ font-size: 0.875rem;
278
+ line-height: 1.25rem;
279
+ color: var(--fortune-cookie-text-dim);
280
+ }
281
+
282
+ .fortune-cookie-share-btn {
283
+ padding-left: 1.5rem;
284
+ padding-right: 1.5rem;
285
+ padding-top: 0.5rem;
286
+ padding-bottom: 0.5rem;
287
+ background-color: #f1f5f9;
288
+ color: #334155;
289
+ border-radius: 9999px;
290
+ font-size: 0.875rem;
291
+ line-height: 1.25rem;
292
+ font-weight: 700;
293
+ border: none;
294
+ cursor: pointer;
295
+ display: flex;
296
+ align-items: center;
297
+ gap: 0.5rem;
298
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
299
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
300
+ transition-duration: 150ms;
301
+ }
302
+
303
+ :global(.theme-dark) .fortune-cookie-share-btn {
304
+ background-color: #1e293b;
305
+ color: #cbd5e1;
306
+ }
307
+
308
+ .fortune-cookie-share-btn:hover {
309
+ background-color: #e2e8f0;
310
+ }
311
+
312
+ :global(.theme-dark) .fortune-cookie-share-btn:hover {
313
+ background-color: #334155;
314
+ }
315
+
316
+ .fortune-cookie-shake-1 {
317
+ animation: fortune-cookie-shake 0.3s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
318
+ }
319
+
320
+ .fortune-cookie-shake-2 {
321
+ animation: fortune-cookie-shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
322
+ }
323
+
324
+ .fortune-cookie-shake-3 {
325
+ animation: fortune-cookie-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
326
+ }
327
+
328
+ @keyframes fortune-cookie-shake {
329
+ 10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); }
330
+ 20%, 80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
331
+ 30%, 50%, 70% { transform: translate3d(-4px, 0, 0) rotate(-4deg); }
332
+ 40%, 60% { transform: translate3d(4px, 0, 0) rotate(4deg); }
333
+ }
334
+
335
+ :global(.fortune-cookie-crumb) {
336
+ position: absolute;
337
+ width: 20px;
338
+ height: 20px;
339
+ background-image: url("/images/utilities/fortune/fc-crumbs.webp");
340
+ background-size: contain;
341
+ background-repeat: no-repeat;
342
+ pointer-events: none;
343
+ }