@jjlmoya/utils-babies 1.4.0 → 1.5.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.
@@ -1,5 +1,4 @@
1
1
  ---
2
- import './style.css';
3
2
  import type { VaccinationCalendarUI } from './index';
4
3
  interface Props { ui: VaccinationCalendarUI; }
5
4
  const { ui } = Astro.props;
@@ -280,3 +279,401 @@ const { ui } = Astro.props;
280
279
 
281
280
  clearDisplay();
282
281
  </script>
282
+
283
+ <style>
284
+ .vc-card {
285
+ --primary: #4f46e5;
286
+ --primary-soft: #eef2ff;
287
+ --success: #10b981;
288
+ --warning: #f59e0b;
289
+ --text-main: #1e293b;
290
+ --text-muted: #64748b;
291
+ --bg-card: #fff;
292
+ --border: #e2e8f0;
293
+ --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
294
+
295
+ max-width: 600px;
296
+ margin: 0 auto;
297
+ background: var(--bg-card);
298
+ border-radius: 28px;
299
+ border: 1px solid var(--border);
300
+ box-shadow: var(--shadow);
301
+ overflow: hidden;
302
+ color: var(--text-main);
303
+ transition: transform 0.3s ease;
304
+ }
305
+
306
+ :global(.theme-dark) .vc-card {
307
+ --bg-card: #1e293b;
308
+ --border: rgba(255, 255, 255, 0.1);
309
+ --text-main: #f1f5f9;
310
+ --text-muted: #94a3b8;
311
+ --primary-soft: rgba(79, 70, 229, 0.1);
312
+ }
313
+
314
+ .vc-header {
315
+ padding: 2rem 1.5rem;
316
+ background: linear-gradient(to bottom, var(--primary-soft), transparent);
317
+ border-bottom: 1px solid var(--border);
318
+ display: flex;
319
+ flex-direction: column;
320
+ align-items: center;
321
+ gap: 1.5rem;
322
+ }
323
+
324
+ .vc-inputs {
325
+ width: 100%;
326
+ display: flex;
327
+ justify-content: center;
328
+ }
329
+
330
+ .vc-field {
331
+ display: flex;
332
+ flex-direction: column;
333
+ align-items: center;
334
+ gap: 0.75rem;
335
+ width: 100%;
336
+ }
337
+
338
+ .vc-field label {
339
+ font-size: 0.8rem;
340
+ font-weight: 800;
341
+ text-transform: uppercase;
342
+ color: var(--text-muted);
343
+ letter-spacing: 0.05em;
344
+ }
345
+
346
+ .vc-triple-input {
347
+ display: flex;
348
+ align-items: center;
349
+ gap: 0.5rem;
350
+ background: var(--bg-card);
351
+ border: 2px solid var(--border);
352
+ border-radius: 16px;
353
+ padding: 0.25rem 1rem;
354
+ transition: all 0.2s ease;
355
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
356
+ }
357
+
358
+ .vc-triple-input:focus-within {
359
+ border-color: var(--primary);
360
+ box-shadow: 0 0 0 4px var(--primary-soft);
361
+ transform: translateY(-1px);
362
+ }
363
+
364
+ .vc-triple-input.has-error {
365
+ border-color: #ef4444;
366
+ background: #fef2f2;
367
+ }
368
+
369
+ :global(.theme-dark) .vc-triple-input.has-error {
370
+ background: rgba(239, 68, 68, 0.05);
371
+ }
372
+
373
+ .vc-triple-input.has-error:focus-within {
374
+ box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
375
+ }
376
+
377
+ .vc-segment {
378
+ border: none;
379
+ padding: 0.8rem 0;
380
+ width: 3rem;
381
+ text-align: center;
382
+ background: transparent;
383
+ font-size: 1.1rem;
384
+ font-weight: 700;
385
+ color: inherit;
386
+ outline: none;
387
+ }
388
+
389
+ .vc-segment-year {
390
+ width: 4.5rem;
391
+ }
392
+
393
+ .vc-sep {
394
+ color: var(--text-muted);
395
+ font-weight: 700;
396
+ font-size: 1.2rem;
397
+ opacity: 0.3;
398
+ pointer-events: none;
399
+ }
400
+
401
+ .vc-age-badge {
402
+ margin-top: 0.25rem;
403
+ font-size: 0.85rem;
404
+ font-weight: 700;
405
+ color: var(--text-muted);
406
+ opacity: 0;
407
+ transform: translateY(-5px);
408
+ transition: all 0.3s ease;
409
+ }
410
+
411
+ .vc-age-badge.vc-age-visible {
412
+ opacity: 1;
413
+ transform: translateY(0);
414
+ }
415
+
416
+ .vc-empty-state {
417
+ padding: 3rem 1.5rem;
418
+ text-align: center;
419
+ color: var(--text-muted);
420
+ }
421
+
422
+ .vc-main-context {
423
+ padding: 2rem 1.5rem;
424
+ text-align: center;
425
+ border-bottom: 1px solid var(--border);
426
+ display: none;
427
+ }
428
+
429
+ .vc-active .vc-main-context {
430
+ display: block;
431
+ animation: vc-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
432
+ }
433
+
434
+ @keyframes vc-slide-up {
435
+ from {
436
+ opacity: 0;
437
+ transform: translateY(20px);
438
+ }
439
+
440
+ to {
441
+ opacity: 1;
442
+ transform: translateY(0);
443
+ }
444
+ }
445
+
446
+ .vc-next-title {
447
+ font-size: 0.9rem;
448
+ font-weight: 700;
449
+ color: var(--primary);
450
+ text-transform: uppercase;
451
+ margin: 0 0 0.5rem;
452
+ }
453
+
454
+ .vc-next-date {
455
+ font-size: 1.75rem;
456
+ font-weight: 900;
457
+ margin-bottom: 1.5rem;
458
+ }
459
+
460
+ .vc-is-today .vc-next-date {
461
+ color: #ef4444;
462
+ animation: vc-pulse-today 2s infinite;
463
+ }
464
+
465
+ @keyframes vc-pulse-today {
466
+ 0% { transform: scale(1); }
467
+ 50% { transform: scale(1.02); }
468
+ 100% { transform: scale(1); }
469
+ }
470
+
471
+ .vc-is-today .vc-btn-primary {
472
+ background: #ef4444;
473
+ box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
474
+ }
475
+
476
+ .vc-vac-list {
477
+ display: flex;
478
+ flex-direction: column;
479
+ gap: 0.75rem;
480
+ margin-bottom: 2rem;
481
+ }
482
+
483
+ .vc-vac-item {
484
+ display: flex;
485
+ align-items: center;
486
+ gap: 1rem;
487
+ padding: 1rem;
488
+ background: var(--primary-soft);
489
+ border-radius: 16px;
490
+ text-align: left;
491
+ border: 1px solid transparent;
492
+ transition: 0.2s;
493
+ }
494
+
495
+ .vc-vac-icon {
496
+ width: 48px;
497
+ height: 48px;
498
+ display: flex;
499
+ align-items: center;
500
+ justify-content: center;
501
+ background: #fff;
502
+ border-radius: 12px;
503
+ font-weight: 700;
504
+ color: var(--primary);
505
+ border: 1px solid var(--border);
506
+ flex-shrink: 0;
507
+ }
508
+
509
+ :global(.theme-dark) .vc-vac-icon {
510
+ background: #0f172a;
511
+ }
512
+
513
+ .vc-vac-info {
514
+ flex: 1;
515
+ }
516
+
517
+ .vc-vac-name {
518
+ display: block;
519
+ font-weight: 700;
520
+ font-size: 1rem;
521
+ }
522
+
523
+ .vc-btn-primary {
524
+ display: inline-flex;
525
+ align-items: center;
526
+ gap: 0.5rem;
527
+ padding: 0.8rem 1.5rem;
528
+ background: var(--primary);
529
+ color: #fff;
530
+ border-radius: 12px;
531
+ font-weight: 700;
532
+ border: none;
533
+ cursor: pointer;
534
+ width: 100%;
535
+ justify-content: center;
536
+ }
537
+
538
+ .vc-sections {
539
+ display: none;
540
+ }
541
+
542
+ .vc-active .vc-sections {
543
+ display: block;
544
+ }
545
+
546
+ .vc-accordion-item {
547
+ border-bottom: 1px solid var(--border);
548
+ }
549
+
550
+ .vc-accordion-item:last-child {
551
+ border-bottom: none;
552
+ }
553
+
554
+ .vc-accordion-trigger {
555
+ width: 100%;
556
+ padding: 1.25rem 1.5rem;
557
+ display: flex;
558
+ justify-content: space-between;
559
+ align-items: center;
560
+ background: none;
561
+ border: none;
562
+ color: inherit;
563
+ font-weight: 700;
564
+ cursor: pointer;
565
+ font-size: 1rem;
566
+ }
567
+
568
+ .vc-accordion-trigger:hover {
569
+ background: var(--primary-soft);
570
+ }
571
+
572
+ .vc-accordion-content {
573
+ max-height: 0;
574
+ overflow: hidden;
575
+ transition: max-height 0.3s ease;
576
+ }
577
+
578
+ .vc-accordion-item.vc-open .vc-accordion-content {
579
+ max-height: 800px;
580
+ }
581
+
582
+ .vc-timeline-compact {
583
+ padding: 0 1.5rem 1.5rem;
584
+ display: flex;
585
+ flex-direction: column;
586
+ gap: 0.5rem;
587
+ }
588
+
589
+ .vc-timeline-row {
590
+ display: flex;
591
+ justify-content: space-between;
592
+ align-items: center;
593
+ padding: 0.6rem 0;
594
+ border-bottom: 1px dashed var(--border);
595
+ font-size: 0.9rem;
596
+ }
597
+
598
+ .vc-timeline-row:last-child {
599
+ border-bottom: none;
600
+ }
601
+
602
+ .vc-timeline-age {
603
+ font-weight: 800;
604
+ color: var(--primary);
605
+ width: 6.5rem;
606
+ flex-shrink: 0;
607
+ font-size: 0.8rem;
608
+ text-transform: uppercase;
609
+ letter-spacing: 0.02em;
610
+ }
611
+
612
+ .vc-timeline-vac {
613
+ flex: 1;
614
+ font-weight: 600;
615
+ color: var(--text-main);
616
+ display: flex;
617
+ flex-wrap: wrap;
618
+ gap: 0.4rem;
619
+ padding: 0 0.5rem;
620
+ }
621
+
622
+ .vc-vac-pill {
623
+ padding: 0.15rem 0.5rem;
624
+ background: var(--primary-soft);
625
+ border-radius: 6px;
626
+ font-size: 0.8rem;
627
+ color: var(--primary);
628
+ border: 1px solid rgba(79, 70, 229, 0.1);
629
+ }
630
+
631
+ :global(.theme-dark) .vc-vac-pill {
632
+ background: rgba(255, 255, 255, 0.05);
633
+ color: var(--text-main);
634
+ border-color: rgba(255, 255, 255, 0.1);
635
+ }
636
+
637
+ .vc-timeline-status {
638
+ font-size: 0.65rem;
639
+ font-weight: 900;
640
+ text-transform: uppercase;
641
+ width: 3.5rem;
642
+ flex-shrink: 0;
643
+ text-align: right;
644
+ letter-spacing: 0.05em;
645
+ }
646
+
647
+ .vc-check {
648
+ color: var(--success);
649
+ }
650
+
651
+ .vc-clock {
652
+ color: var(--warning);
653
+ }
654
+
655
+ .vc-footer {
656
+ padding: 1rem;
657
+ text-align: center;
658
+ font-size: 0.75rem;
659
+ color: var(--text-muted);
660
+ background: var(--primary-soft);
661
+ }
662
+
663
+ .vc-share-link {
664
+ display: none;
665
+ color: var(--primary);
666
+ font-weight: 700;
667
+ text-decoration: none;
668
+ }
669
+
670
+ .vc-active .vc-share-link {
671
+ display: inline;
672
+ }
673
+
674
+ @media (max-width: 480px) {
675
+ .vc-timeline-age {
676
+ width: 5rem;
677
+ }
678
+ }
679
+ </style>