@jjlmoya/utils-babies 1.5.0 → 1.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.
- package/package.json +1 -1
- package/src/tool/baby-feeding-calculator/component.astro +40 -40
- package/src/tool/baby-percentile-calculator/component.astro +38 -38
- package/src/tool/baby-size-converter/component.astro +42 -42
- package/src/tool/fertile-days-estimator/component.astro +14 -9
- package/src/tool/pregnancy-calculator/component.astro +55 -48
- package/src/tool/pregnancy-calculator/i18n/en.ts +140 -0
- package/src/tool/pregnancy-calculator/i18n/es.ts +143 -3
- package/src/tool/pregnancy-calculator/i18n/fr.ts +143 -3
- package/src/tool/pregnancy-calculator/index.ts +24 -0
- package/src/tool/pregnancy-calculator/milestones.ts +2 -146
- package/src/tool/vaccination-calendar/component.astro +26 -24
- package/src/tool/vaccination-calendar/i18n/en.ts +20 -0
- package/src/tool/vaccination-calendar/i18n/es.ts +20 -0
- package/src/tool/vaccination-calendar/i18n/fr.ts +20 -0
- package/src/tool/vaccination-calendar/index.ts +20 -0
- package/src/tool/vaccination-calendar/logic.ts +39 -13
|
@@ -297,7 +297,7 @@ const brands = brandsData.brands;
|
|
|
297
297
|
</script>
|
|
298
298
|
|
|
299
299
|
<style>
|
|
300
|
-
.bsc-card {
|
|
300
|
+
:global(.bsc-card) {
|
|
301
301
|
max-width: 900px;
|
|
302
302
|
margin: 0 auto;
|
|
303
303
|
background: #fff;
|
|
@@ -307,7 +307,7 @@ const brands = brandsData.brands;
|
|
|
307
307
|
box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
|
|
308
308
|
}
|
|
309
309
|
|
|
310
|
-
:global(.theme-dark
|
|
310
|
+
:global(.theme-dark .bsc-card) {
|
|
311
311
|
background: #0f172a;
|
|
312
312
|
border-color: #1e293b;
|
|
313
313
|
box-shadow: none;
|
|
@@ -334,11 +334,11 @@ const brands = brandsData.brands;
|
|
|
334
334
|
position: relative;
|
|
335
335
|
}
|
|
336
336
|
|
|
337
|
-
:global(.theme-dark
|
|
337
|
+
:global(.theme-dark .bsc-left) {
|
|
338
338
|
border-right-color: #1e293b;
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
:global(.theme-dark
|
|
341
|
+
:global(.theme-dark .bsc-right) {
|
|
342
342
|
background: rgba(30, 41, 59, 0.15);
|
|
343
343
|
}
|
|
344
344
|
|
|
@@ -354,7 +354,7 @@ const brands = brandsData.brands;
|
|
|
354
354
|
margin-bottom: 0.5rem;
|
|
355
355
|
}
|
|
356
356
|
|
|
357
|
-
.bsc-section-marker::before {
|
|
357
|
+
:global(.bsc-section-marker::before) {
|
|
358
358
|
content: "";
|
|
359
359
|
width: 16px;
|
|
360
360
|
height: 2px;
|
|
@@ -373,7 +373,7 @@ const brands = brandsData.brands;
|
|
|
373
373
|
width: 100%;
|
|
374
374
|
}
|
|
375
375
|
|
|
376
|
-
.bsc-select-box select {
|
|
376
|
+
:global(.bsc-select-box select) {
|
|
377
377
|
width: 100%;
|
|
378
378
|
appearance: none;
|
|
379
379
|
-webkit-appearance: none;
|
|
@@ -389,13 +389,13 @@ const brands = brandsData.brands;
|
|
|
389
389
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
:global(.theme-dark
|
|
392
|
+
:global(.theme-dark .bsc-select-box select) {
|
|
393
393
|
background: #1e293b;
|
|
394
394
|
border-color: #334155;
|
|
395
395
|
color: #f1f5f9;
|
|
396
396
|
}
|
|
397
397
|
|
|
398
|
-
.bsc-select-box::after {
|
|
398
|
+
:global(.bsc-select-box::after) {
|
|
399
399
|
content: "";
|
|
400
400
|
position: absolute;
|
|
401
401
|
right: 1.25rem;
|
|
@@ -417,11 +417,11 @@ const brands = brandsData.brands;
|
|
|
417
417
|
width: fit-content;
|
|
418
418
|
}
|
|
419
419
|
|
|
420
|
-
:global(.theme-dark
|
|
420
|
+
:global(.theme-dark .bsc-unit-nav) {
|
|
421
421
|
background: #0f172a;
|
|
422
422
|
}
|
|
423
423
|
|
|
424
|
-
.bsc-unit-tab {
|
|
424
|
+
:global(.bsc-unit-tab) {
|
|
425
425
|
padding: 0.4rem 1.1rem;
|
|
426
426
|
border-radius: 100px;
|
|
427
427
|
border: none;
|
|
@@ -432,13 +432,13 @@ const brands = brandsData.brands;
|
|
|
432
432
|
cursor: pointer;
|
|
433
433
|
}
|
|
434
434
|
|
|
435
|
-
.bsc-unit-active {
|
|
435
|
+
:global(.bsc-unit-active) {
|
|
436
436
|
background: #fff;
|
|
437
437
|
color: #6366f1;
|
|
438
438
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
439
439
|
}
|
|
440
440
|
|
|
441
|
-
:global(.theme-dark
|
|
441
|
+
:global(.theme-dark .bsc-unit-active) {
|
|
442
442
|
background: #1e293b;
|
|
443
443
|
color: #818cf8;
|
|
444
444
|
}
|
|
@@ -466,12 +466,12 @@ const brands = brandsData.brands;
|
|
|
466
466
|
gap: 1rem;
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
:global(.theme-dark
|
|
469
|
+
:global(.theme-dark .bsc-stepper-box) {
|
|
470
470
|
background: #0f172a;
|
|
471
471
|
border-color: #1e293b;
|
|
472
472
|
}
|
|
473
473
|
|
|
474
|
-
.bsc-btn-step {
|
|
474
|
+
:global(.bsc-btn-step) {
|
|
475
475
|
width: 44px;
|
|
476
476
|
height: 44px;
|
|
477
477
|
border: none;
|
|
@@ -487,7 +487,7 @@ const brands = brandsData.brands;
|
|
|
487
487
|
justify-content: center;
|
|
488
488
|
}
|
|
489
489
|
|
|
490
|
-
:global(.theme-dark
|
|
490
|
+
:global(.theme-dark .bsc-btn-step) {
|
|
491
491
|
background: #1e293b;
|
|
492
492
|
color: #fff;
|
|
493
493
|
border: 1px solid #334155;
|
|
@@ -507,7 +507,7 @@ const brands = brandsData.brands;
|
|
|
507
507
|
line-height: 1;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
:global(.theme-dark
|
|
510
|
+
:global(.theme-dark .bsc-val-big) {
|
|
511
511
|
color: #f1f5f9;
|
|
512
512
|
}
|
|
513
513
|
|
|
@@ -519,7 +519,7 @@ const brands = brandsData.brands;
|
|
|
519
519
|
margin-top: 2px;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
.bsc-slider {
|
|
522
|
+
:global(.bsc-slider) {
|
|
523
523
|
width: 100%;
|
|
524
524
|
appearance: none;
|
|
525
525
|
-webkit-appearance: none;
|
|
@@ -529,7 +529,7 @@ const brands = brandsData.brands;
|
|
|
529
529
|
margin-top: 4px;
|
|
530
530
|
}
|
|
531
531
|
|
|
532
|
-
.bsc-slider::-webkit-slider-thumb {
|
|
532
|
+
:global(.bsc-slider::-webkit-slider-thumb) {
|
|
533
533
|
-webkit-appearance: none;
|
|
534
534
|
width: 18px;
|
|
535
535
|
height: 18px;
|
|
@@ -548,11 +548,11 @@ const brands = brandsData.brands;
|
|
|
548
548
|
border-radius: 16px;
|
|
549
549
|
}
|
|
550
550
|
|
|
551
|
-
:global(.theme-dark
|
|
551
|
+
:global(.theme-dark .bsc-age-rack) {
|
|
552
552
|
background: #0f172a;
|
|
553
553
|
}
|
|
554
554
|
|
|
555
|
-
.bsc-age-tile {
|
|
555
|
+
:global(.bsc-age-tile) {
|
|
556
556
|
padding: 1rem 0.25rem;
|
|
557
557
|
border: none;
|
|
558
558
|
background: transparent;
|
|
@@ -564,14 +564,14 @@ const brands = brandsData.brands;
|
|
|
564
564
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
.bsc-age-active {
|
|
567
|
+
:global(.bsc-age-active) {
|
|
568
568
|
background: #fff;
|
|
569
569
|
color: #4f46e5;
|
|
570
570
|
box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
|
|
571
571
|
transform: translateY(-1px);
|
|
572
572
|
}
|
|
573
573
|
|
|
574
|
-
:global(.theme-dark
|
|
574
|
+
:global(.theme-dark .bsc-age-active) {
|
|
575
575
|
background: #1e293b;
|
|
576
576
|
color: #818cf8;
|
|
577
577
|
}
|
|
@@ -594,7 +594,7 @@ const brands = brandsData.brands;
|
|
|
594
594
|
margin: 0.25rem 0 0.75rem;
|
|
595
595
|
}
|
|
596
596
|
|
|
597
|
-
:global(.theme-dark
|
|
597
|
+
:global(.theme-dark .bsc-res-size-main) {
|
|
598
598
|
color: #f1f5f9;
|
|
599
599
|
}
|
|
600
600
|
|
|
@@ -663,7 +663,7 @@ const brands = brandsData.brands;
|
|
|
663
663
|
border-bottom: 2px solid #f8fafc;
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
:global(.theme-dark
|
|
666
|
+
:global(.theme-dark .bsc-eq-head-row) {
|
|
667
667
|
border-bottom-color: #1e293b;
|
|
668
668
|
}
|
|
669
669
|
|
|
@@ -681,7 +681,7 @@ const brands = brandsData.brands;
|
|
|
681
681
|
width: 100%;
|
|
682
682
|
}
|
|
683
683
|
|
|
684
|
-
.bsc-eq-data-row {
|
|
684
|
+
:global(.bsc-eq-data-row) {
|
|
685
685
|
display: flex;
|
|
686
686
|
justify-content: space-between;
|
|
687
687
|
align-items: center;
|
|
@@ -689,31 +689,31 @@ const brands = brandsData.brands;
|
|
|
689
689
|
border-bottom: 1px solid rgba(241, 245, 249, 0.4);
|
|
690
690
|
}
|
|
691
691
|
|
|
692
|
-
:global(.theme-dark
|
|
692
|
+
:global(.theme-dark .bsc-eq-data-row) {
|
|
693
693
|
border-bottom-color: rgba(30, 41, 59, 0.5);
|
|
694
694
|
}
|
|
695
695
|
|
|
696
|
-
.bsc-eq-data-row:last-child {
|
|
696
|
+
:global(.bsc-eq-data-row:last-child) {
|
|
697
697
|
border-bottom: none;
|
|
698
698
|
}
|
|
699
699
|
|
|
700
|
-
.bsc-eq-brand-v {
|
|
700
|
+
:global(.bsc-eq-brand-v) {
|
|
701
701
|
display: flex;
|
|
702
702
|
flex-direction: column;
|
|
703
703
|
gap: 0;
|
|
704
704
|
}
|
|
705
705
|
|
|
706
|
-
.bsc-eq-brand-name {
|
|
706
|
+
:global(.bsc-eq-brand-name) {
|
|
707
707
|
font-size: 0.95rem;
|
|
708
708
|
font-weight: 900;
|
|
709
709
|
color: #1e293b;
|
|
710
710
|
}
|
|
711
711
|
|
|
712
|
-
:global(.theme-dark
|
|
712
|
+
:global(.theme-dark .bsc-eq-brand-name) {
|
|
713
713
|
color: #f1f5f9;
|
|
714
714
|
}
|
|
715
715
|
|
|
716
|
-
.bsc-eq-fit-v {
|
|
716
|
+
:global(.bsc-eq-fit-v) {
|
|
717
717
|
font-size: 0.525rem;
|
|
718
718
|
font-weight: 900;
|
|
719
719
|
text-transform: uppercase;
|
|
@@ -721,21 +721,21 @@ const brands = brandsData.brands;
|
|
|
721
721
|
letter-spacing: 0.02em;
|
|
722
722
|
}
|
|
723
723
|
|
|
724
|
-
.bsc-eq-fit-large {
|
|
724
|
+
:global(.bsc-eq-fit-large) {
|
|
725
725
|
color: #10b981;
|
|
726
726
|
}
|
|
727
727
|
|
|
728
|
-
.bsc-eq-fit-small {
|
|
728
|
+
:global(.bsc-eq-fit-small) {
|
|
729
729
|
color: #f43f5e;
|
|
730
730
|
}
|
|
731
731
|
|
|
732
|
-
.bsc-eq-size-v {
|
|
732
|
+
:global(.bsc-eq-size-v) {
|
|
733
733
|
font-size: 1.25rem;
|
|
734
734
|
font-weight: 950;
|
|
735
735
|
color: #4f46e5;
|
|
736
736
|
}
|
|
737
737
|
|
|
738
|
-
:global(.theme-dark
|
|
738
|
+
:global(.theme-dark .bsc-eq-size-v) {
|
|
739
739
|
color: #818cf8;
|
|
740
740
|
}
|
|
741
741
|
|
|
@@ -745,7 +745,7 @@ const brands = brandsData.brands;
|
|
|
745
745
|
border-top: 1px dashed #e2e8f0;
|
|
746
746
|
}
|
|
747
747
|
|
|
748
|
-
:global(.theme-dark
|
|
748
|
+
:global(.theme-dark .bsc-clothes-meta) {
|
|
749
749
|
border-top-color: #334155;
|
|
750
750
|
}
|
|
751
751
|
|
|
@@ -769,7 +769,7 @@ const brands = brandsData.brands;
|
|
|
769
769
|
text-align: center;
|
|
770
770
|
}
|
|
771
771
|
|
|
772
|
-
.bsc-meta-cell label {
|
|
772
|
+
:global(.bsc-meta-cell label) {
|
|
773
773
|
font-size: 0.55rem;
|
|
774
774
|
font-weight: 950;
|
|
775
775
|
color: #94a3b8;
|
|
@@ -777,13 +777,13 @@ const brands = brandsData.brands;
|
|
|
777
777
|
margin-bottom: 2px;
|
|
778
778
|
}
|
|
779
779
|
|
|
780
|
-
.bsc-meta-cell span {
|
|
780
|
+
:global(.bsc-meta-cell span) {
|
|
781
781
|
font-size: 1.1rem;
|
|
782
782
|
font-weight: 950;
|
|
783
783
|
color: #1e293b;
|
|
784
784
|
}
|
|
785
785
|
|
|
786
|
-
:global(.theme-dark
|
|
786
|
+
:global(.theme-dark .bsc-meta-cell span) {
|
|
787
787
|
color: #f1f5f9;
|
|
788
788
|
}
|
|
789
789
|
|
|
@@ -809,21 +809,21 @@ const brands = brandsData.brands;
|
|
|
809
809
|
gap: 0.4rem;
|
|
810
810
|
}
|
|
811
811
|
|
|
812
|
-
.bsc-footer-text h5 {
|
|
812
|
+
:global(.bsc-footer-text h5) {
|
|
813
813
|
font-size: 1rem;
|
|
814
814
|
font-weight: 950;
|
|
815
815
|
color: #fff;
|
|
816
816
|
margin: 0;
|
|
817
817
|
}
|
|
818
818
|
|
|
819
|
-
.bsc-footer-text p {
|
|
819
|
+
:global(.bsc-footer-text p) {
|
|
820
820
|
font-size: 0.85rem;
|
|
821
821
|
color: #94a3b8;
|
|
822
822
|
line-height: 1.6;
|
|
823
823
|
margin: 0;
|
|
824
824
|
}
|
|
825
825
|
|
|
826
|
-
.bsc-footer-text strong {
|
|
826
|
+
:global(.bsc-footer-text strong) {
|
|
827
827
|
color: #6366f1;
|
|
828
828
|
}
|
|
829
829
|
|
|
@@ -336,6 +336,11 @@ const { ui } = Astro.props;
|
|
|
336
336
|
display: none;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
+
:global(.theme-dark) .fde-step-first {
|
|
340
|
+
background: radial-gradient(circle at top right, rgba(88, 28, 135, 0.15), transparent),
|
|
341
|
+
radial-gradient(circle at bottom left, rgba(124, 58, 202, 0.1), transparent);
|
|
342
|
+
}
|
|
343
|
+
|
|
339
344
|
.fde-step-header h2 {
|
|
340
345
|
font-size: 2.5rem;
|
|
341
346
|
font-weight: 950;
|
|
@@ -591,7 +596,7 @@ const { ui } = Astro.props;
|
|
|
591
596
|
gap: 8px;
|
|
592
597
|
}
|
|
593
598
|
|
|
594
|
-
.fde-day-header {
|
|
599
|
+
:global(.fde-day-header) {
|
|
595
600
|
text-align: center;
|
|
596
601
|
font-size: 0.8rem;
|
|
597
602
|
font-weight: 800;
|
|
@@ -600,7 +605,7 @@ const { ui } = Astro.props;
|
|
|
600
605
|
padding-bottom: 1rem;
|
|
601
606
|
}
|
|
602
607
|
|
|
603
|
-
.fde-day {
|
|
608
|
+
:global(.fde-day) {
|
|
604
609
|
aspect-ratio: 1;
|
|
605
610
|
display: flex;
|
|
606
611
|
align-items: center;
|
|
@@ -615,44 +620,44 @@ const { ui } = Astro.props;
|
|
|
615
620
|
border: 1px solid #f3f4f6;
|
|
616
621
|
}
|
|
617
622
|
|
|
618
|
-
.fde-day:hover:not(.fde-day-empty) {
|
|
623
|
+
:global(.fde-day:hover:not(.fde-day-empty)) {
|
|
619
624
|
border-color: #db2777;
|
|
620
625
|
background: #fdf2f8;
|
|
621
626
|
}
|
|
622
627
|
|
|
623
|
-
.fde-day-empty {
|
|
628
|
+
:global(.fde-day-empty) {
|
|
624
629
|
background: transparent;
|
|
625
630
|
border: none;
|
|
626
631
|
cursor: default;
|
|
627
632
|
}
|
|
628
633
|
|
|
629
|
-
.fde-day-selected {
|
|
634
|
+
:global(.fde-day-selected) {
|
|
630
635
|
background: #be123c;
|
|
631
636
|
color: #fff;
|
|
632
637
|
border: none;
|
|
633
638
|
box-shadow: 0 8px 20px rgba(190, 18, 60, 0.3);
|
|
634
639
|
}
|
|
635
640
|
|
|
636
|
-
.fde-day-period {
|
|
641
|
+
:global(.fde-day-period) {
|
|
637
642
|
background: #ffe4e6;
|
|
638
643
|
color: #be123c;
|
|
639
644
|
border: none;
|
|
640
645
|
}
|
|
641
646
|
|
|
642
|
-
.fde-day-fertile {
|
|
647
|
+
:global(.fde-day-fertile) {
|
|
643
648
|
background: #fdf2f8;
|
|
644
649
|
color: #db2777;
|
|
645
650
|
border: none;
|
|
646
651
|
}
|
|
647
652
|
|
|
648
|
-
.fde-day-ovulation {
|
|
653
|
+
:global(.fde-day-ovulation) {
|
|
649
654
|
background: #db2777;
|
|
650
655
|
color: #fff;
|
|
651
656
|
box-shadow: 0 8px 20px rgba(219, 39, 119, 0.3);
|
|
652
657
|
border: none;
|
|
653
658
|
}
|
|
654
659
|
|
|
655
|
-
.fde-day-today {
|
|
660
|
+
:global(.fde-day-today) {
|
|
656
661
|
border: 2px solid #111827;
|
|
657
662
|
}
|
|
658
663
|
|
|
@@ -40,25 +40,25 @@ const { ui } = Astro.props;
|
|
|
40
40
|
<select
|
|
41
41
|
id="pc-dp-day"
|
|
42
42
|
class="pregnancy-calculator-dp-select"
|
|
43
|
-
aria-label=
|
|
43
|
+
aria-label={ui.dayLabel}
|
|
44
44
|
>
|
|
45
|
-
<option value="">
|
|
45
|
+
<option value="">{ui.dayLabel}</option>
|
|
46
46
|
</select>
|
|
47
47
|
<span class="pregnancy-calculator-dp-sep">/</span>
|
|
48
48
|
<select
|
|
49
49
|
id="pc-dp-month"
|
|
50
50
|
class="pregnancy-calculator-dp-select"
|
|
51
|
-
aria-label=
|
|
51
|
+
aria-label={ui.monthLabel}
|
|
52
52
|
>
|
|
53
|
-
<option value="">
|
|
53
|
+
<option value="">{ui.monthLabel}</option>
|
|
54
54
|
</select>
|
|
55
55
|
<span class="pregnancy-calculator-dp-sep">/</span>
|
|
56
56
|
<select
|
|
57
57
|
id="pc-dp-year"
|
|
58
58
|
class="pregnancy-calculator-dp-select"
|
|
59
|
-
aria-label=
|
|
59
|
+
aria-label={ui.yearLabel}
|
|
60
60
|
>
|
|
61
|
-
<option value="">
|
|
61
|
+
<option value="">{ui.yearLabel}</option>
|
|
62
62
|
</select>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
@@ -144,7 +144,7 @@ const { ui } = Astro.props;
|
|
|
144
144
|
>
|
|
145
145
|
<div class="pregnancy-calculator-mp-top-row">
|
|
146
146
|
<span class="pregnancy-calculator-mp-badge" id="pc-mp-badge"
|
|
147
|
-
>
|
|
147
|
+
>{ui.labelWeekBadge} —</span
|
|
148
148
|
>
|
|
149
149
|
<div class="pregnancy-calculator-analogy-tabs">
|
|
150
150
|
<button class="pregnancy-calculator-at-btn" data-cat="fruits"
|
|
@@ -207,7 +207,7 @@ const { ui } = Astro.props;
|
|
|
207
207
|
|
|
208
208
|
<script>
|
|
209
209
|
import { getState, setState, subscribe } from "./store";
|
|
210
|
-
import { getMilestone
|
|
210
|
+
import { getMilestone } from "./milestones";
|
|
211
211
|
import type { PCState } from "./store";
|
|
212
212
|
import type { CalcResult } from "./calculator";
|
|
213
213
|
|
|
@@ -244,21 +244,11 @@ const { ui } = Astro.props;
|
|
|
244
244
|
const mpAlert = root.querySelector("#pc-mp-alert") as HTMLElement;
|
|
245
245
|
const tlScroll = root.querySelector("#pc-tl-scroll") as HTMLElement;
|
|
246
246
|
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
"May",
|
|
253
|
-
"Jun",
|
|
254
|
-
"Jul",
|
|
255
|
-
"Ago",
|
|
256
|
-
"Sep",
|
|
257
|
-
"Oct",
|
|
258
|
-
"Nov",
|
|
259
|
-
"Dic",
|
|
260
|
-
];
|
|
261
|
-
const fmtEdd = new Intl.DateTimeFormat("es-ES", {
|
|
247
|
+
const MONTHS = JSON.parse(ui.monthsData as string);
|
|
248
|
+
const timelineLabels = JSON.parse(ui.timelineLabelsData as string);
|
|
249
|
+
const milestones = JSON.parse(ui.milestonesData as string);
|
|
250
|
+
|
|
251
|
+
const fmtEdd = new Intl.DateTimeFormat(document.documentElement.lang || "es", {
|
|
262
252
|
day: "numeric",
|
|
263
253
|
month: "long",
|
|
264
254
|
year: "numeric",
|
|
@@ -271,7 +261,7 @@ const { ui } = Astro.props;
|
|
|
271
261
|
o.textContent = String(d).padStart(2, "0");
|
|
272
262
|
dpDay.appendChild(o);
|
|
273
263
|
}
|
|
274
|
-
|
|
264
|
+
MONTHS.forEach((m: string, i: number) => {
|
|
275
265
|
const o = document.createElement("option");
|
|
276
266
|
o.value = String(i + 1);
|
|
277
267
|
o.textContent = m;
|
|
@@ -426,7 +416,7 @@ const { ui } = Astro.props;
|
|
|
426
416
|
}
|
|
427
417
|
|
|
428
418
|
function renderMilestone(weeks: number, cat: string, partner: boolean): void {
|
|
429
|
-
const ms = getMilestone(weeks);
|
|
419
|
+
const ms = getMilestone(weeks, milestones);
|
|
430
420
|
mpBadge.textContent = `${ui["labelWeekBadge"] ?? "Semana"} ${weeks}`;
|
|
431
421
|
mpAnalogy.textContent =
|
|
432
422
|
ms.analogies[cat as "fruits" | "geek" | "sweets"] ?? ms.analogies.fruits;
|
|
@@ -512,8 +502,8 @@ const { ui } = Astro.props;
|
|
|
512
502
|
`DTSTART;VALUE=DATE:${y}${m}${d}`,
|
|
513
503
|
`DTEND;VALUE=DATE:${y}${m}${d}`,
|
|
514
504
|
`DTSTAMP:${stamp}`,
|
|
515
|
-
|
|
516
|
-
|
|
505
|
+
`SUMMARY:${ui.icsSummary}`,
|
|
506
|
+
`DESCRIPTION:${ui.icsDescription}`,
|
|
517
507
|
"END:VEVENT",
|
|
518
508
|
"END:VCALENDAR",
|
|
519
509
|
];
|
|
@@ -521,7 +511,7 @@ const { ui } = Astro.props;
|
|
|
521
511
|
const url = URL.createObjectURL(blob);
|
|
522
512
|
const a = document.createElement("a");
|
|
523
513
|
a.href = url;
|
|
524
|
-
a.download =
|
|
514
|
+
a.download = ui.icsFilename as string;
|
|
525
515
|
a.click();
|
|
526
516
|
URL.revokeObjectURL(url);
|
|
527
517
|
}
|
|
@@ -658,7 +648,7 @@ const { ui } = Astro.props;
|
|
|
658
648
|
--pc-bg-dark: #0f1923;
|
|
659
649
|
--pc-text: #f1f5f9;
|
|
660
650
|
--pc-text-muted: #94a3b8;
|
|
661
|
-
--pc-text-dim: #
|
|
651
|
+
--pc-text-dim: #cbd5e1;
|
|
662
652
|
--pc-border: rgba(255, 255, 255, 0.04);
|
|
663
653
|
--pc-border-inner: rgba(255, 255, 255, 0.04);
|
|
664
654
|
--pc-shadow: rgba(0, 0, 0, 0.4);
|
|
@@ -866,6 +856,11 @@ const { ui } = Astro.props;
|
|
|
866
856
|
min-width: 0;
|
|
867
857
|
}
|
|
868
858
|
|
|
859
|
+
:global(.theme-dark) .pregnancy-calculator-dp-select {
|
|
860
|
+
background-color: #0f1923;
|
|
861
|
+
color: #f1f5f9;
|
|
862
|
+
}
|
|
863
|
+
|
|
869
864
|
.pregnancy-calculator-dp-sep {
|
|
870
865
|
color: #cbd5e1;
|
|
871
866
|
font-size: 1rem;
|
|
@@ -874,6 +869,10 @@ const { ui } = Astro.props;
|
|
|
874
869
|
padding: 0 2px;
|
|
875
870
|
}
|
|
876
871
|
|
|
872
|
+
:global(.theme-dark) .pregnancy-calculator-dp-sep {
|
|
873
|
+
color: #64748b;
|
|
874
|
+
}
|
|
875
|
+
|
|
877
876
|
.pregnancy-calculator-cs-wrap {
|
|
878
877
|
background: #fff;
|
|
879
878
|
border-radius: 18px;
|
|
@@ -1436,7 +1435,15 @@ const { ui } = Astro.props;
|
|
|
1436
1435
|
border-radius: 2px;
|
|
1437
1436
|
}
|
|
1438
1437
|
|
|
1439
|
-
.pregnancy-calculator-tl-
|
|
1438
|
+
:global(.theme-dark) .pregnancy-calculator-tl-scroll {
|
|
1439
|
+
scrollbar-color: #334155 transparent;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
:global(.theme-dark) .pregnancy-calculator-tl-scroll::-webkit-scrollbar-thumb {
|
|
1443
|
+
background: #334155;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
:global(.pregnancy-calculator-tl-row) {
|
|
1440
1447
|
display: flex;
|
|
1441
1448
|
align-items: flex-start;
|
|
1442
1449
|
gap: 0.5rem;
|
|
@@ -1445,11 +1452,11 @@ const { ui } = Astro.props;
|
|
|
1445
1452
|
transition: background 0.1s;
|
|
1446
1453
|
}
|
|
1447
1454
|
|
|
1448
|
-
.pregnancy-calculator-tl-row-current {
|
|
1455
|
+
:global(.pregnancy-calculator-tl-row-current) {
|
|
1449
1456
|
background: var(--pc-tri-bg);
|
|
1450
1457
|
}
|
|
1451
1458
|
|
|
1452
|
-
.pregnancy-calculator-tl-line-col {
|
|
1459
|
+
:global(.pregnancy-calculator-tl-line-col) {
|
|
1453
1460
|
display: flex;
|
|
1454
1461
|
flex-direction: column;
|
|
1455
1462
|
align-items: center;
|
|
@@ -1458,7 +1465,7 @@ const { ui } = Astro.props;
|
|
|
1458
1465
|
padding-top: 0.2rem;
|
|
1459
1466
|
}
|
|
1460
1467
|
|
|
1461
|
-
.pregnancy-calculator-tl-dot {
|
|
1468
|
+
:global(.pregnancy-calculator-tl-dot) {
|
|
1462
1469
|
width: 0.5rem;
|
|
1463
1470
|
height: 0.5rem;
|
|
1464
1471
|
border-radius: 50%;
|
|
@@ -1467,18 +1474,18 @@ const { ui } = Astro.props;
|
|
|
1467
1474
|
transition: background 0.15s;
|
|
1468
1475
|
}
|
|
1469
1476
|
|
|
1470
|
-
.pregnancy-calculator-tl-row-past .pregnancy-calculator-tl-dot {
|
|
1477
|
+
:global(.pregnancy-calculator-tl-row-past .pregnancy-calculator-tl-dot) {
|
|
1471
1478
|
background: var(--pc-tri-accent);
|
|
1472
1479
|
}
|
|
1473
1480
|
|
|
1474
|
-
.pregnancy-calculator-tl-row-current .pregnancy-calculator-tl-dot {
|
|
1481
|
+
:global(.pregnancy-calculator-tl-row-current .pregnancy-calculator-tl-dot) {
|
|
1475
1482
|
background: var(--pc-tri-accent);
|
|
1476
1483
|
box-shadow: 0 0 0 3px var(--pc-tri-glow);
|
|
1477
1484
|
width: 0.625rem;
|
|
1478
1485
|
height: 0.625rem;
|
|
1479
1486
|
}
|
|
1480
1487
|
|
|
1481
|
-
.pregnancy-calculator-tl-line {
|
|
1488
|
+
:global(.pregnancy-calculator-tl-line) {
|
|
1482
1489
|
width: 2px;
|
|
1483
1490
|
flex: 1;
|
|
1484
1491
|
min-height: 1.25rem;
|
|
@@ -1486,34 +1493,34 @@ const { ui } = Astro.props;
|
|
|
1486
1493
|
margin-top: 2px;
|
|
1487
1494
|
}
|
|
1488
1495
|
|
|
1489
|
-
.pregnancy-calculator-tl-row-past .pregnancy-calculator-tl-line {
|
|
1496
|
+
:global(.pregnancy-calculator-tl-row-past .pregnancy-calculator-tl-line) {
|
|
1490
1497
|
background: var(--pc-tri-primary);
|
|
1491
1498
|
}
|
|
1492
1499
|
|
|
1493
|
-
.pregnancy-calculator-tl-info {
|
|
1500
|
+
:global(.pregnancy-calculator-tl-info) {
|
|
1494
1501
|
display: flex;
|
|
1495
1502
|
align-items: baseline;
|
|
1496
1503
|
gap: 0.375rem;
|
|
1497
1504
|
min-width: 0;
|
|
1498
1505
|
}
|
|
1499
1506
|
|
|
1500
|
-
.pregnancy-calculator-tl-num {
|
|
1507
|
+
:global(.pregnancy-calculator-tl-num) {
|
|
1501
1508
|
font-size: 0.75rem;
|
|
1502
1509
|
font-weight: 700;
|
|
1503
1510
|
color: var(--pc-text-dim);
|
|
1504
1511
|
flex-shrink: 0;
|
|
1505
1512
|
}
|
|
1506
1513
|
|
|
1507
|
-
.pregnancy-calculator-tl-row-past .pregnancy-calculator-tl-num {
|
|
1514
|
+
:global(.pregnancy-calculator-tl-row-past .pregnancy-calculator-tl-num) {
|
|
1508
1515
|
color: var(--pc-tri-accent);
|
|
1509
1516
|
}
|
|
1510
1517
|
|
|
1511
|
-
.pregnancy-calculator-tl-row-current .pregnancy-calculator-tl-num {
|
|
1518
|
+
:global(.pregnancy-calculator-tl-row-current .pregnancy-calculator-tl-num) {
|
|
1512
1519
|
color: var(--pc-tri-accent);
|
|
1513
1520
|
font-size: 0.875rem;
|
|
1514
1521
|
}
|
|
1515
1522
|
|
|
1516
|
-
.pregnancy-calculator-tl-label {
|
|
1523
|
+
:global(.pregnancy-calculator-tl-label) {
|
|
1517
1524
|
font-size: 0.6875rem;
|
|
1518
1525
|
color: var(--pc-text-dim);
|
|
1519
1526
|
white-space: nowrap;
|
|
@@ -1521,7 +1528,7 @@ const { ui } = Astro.props;
|
|
|
1521
1528
|
text-overflow: ellipsis;
|
|
1522
1529
|
}
|
|
1523
1530
|
|
|
1524
|
-
.pregnancy-calculator-tl-row-current .pregnancy-calculator-tl-label {
|
|
1531
|
+
:global(.pregnancy-calculator-tl-row-current .pregnancy-calculator-tl-label) {
|
|
1525
1532
|
color: var(--pc-tri-text);
|
|
1526
1533
|
font-weight: 600;
|
|
1527
1534
|
font-size: 0.75rem;
|
|
@@ -1556,20 +1563,20 @@ const { ui } = Astro.props;
|
|
|
1556
1563
|
gap: 0.25rem;
|
|
1557
1564
|
}
|
|
1558
1565
|
|
|
1559
|
-
.pregnancy-calculator-tl-row {
|
|
1566
|
+
:global(.pregnancy-calculator-tl-row) {
|
|
1560
1567
|
flex-direction: column;
|
|
1561
1568
|
align-items: center;
|
|
1562
1569
|
padding: 0.5rem 0.375rem;
|
|
1563
1570
|
min-width: 3rem;
|
|
1564
1571
|
}
|
|
1565
1572
|
|
|
1566
|
-
.pregnancy-calculator-tl-line-col {
|
|
1573
|
+
:global(.pregnancy-calculator-tl-line-col) {
|
|
1567
1574
|
flex-direction: row;
|
|
1568
1575
|
width: auto;
|
|
1569
1576
|
padding-top: 0;
|
|
1570
1577
|
}
|
|
1571
1578
|
|
|
1572
|
-
.pregnancy-calculator-tl-line {
|
|
1579
|
+
:global(.pregnancy-calculator-tl-line) {
|
|
1573
1580
|
width: 1.25rem;
|
|
1574
1581
|
height: 2px;
|
|
1575
1582
|
min-height: 0;
|
|
@@ -1577,13 +1584,13 @@ const { ui } = Astro.props;
|
|
|
1577
1584
|
margin-left: 2px;
|
|
1578
1585
|
}
|
|
1579
1586
|
|
|
1580
|
-
.pregnancy-calculator-tl-info {
|
|
1587
|
+
:global(.pregnancy-calculator-tl-info) {
|
|
1581
1588
|
flex-direction: column;
|
|
1582
1589
|
align-items: center;
|
|
1583
1590
|
gap: 0.125rem;
|
|
1584
1591
|
}
|
|
1585
1592
|
|
|
1586
|
-
.pregnancy-calculator-tl-label {
|
|
1593
|
+
:global(.pregnancy-calculator-tl-label) {
|
|
1587
1594
|
display: none;
|
|
1588
1595
|
}
|
|
1589
1596
|
|