@jjlmoya/utils-babies 1.11.0 → 1.13.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 (29) hide show
  1. package/package.json +7 -4
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/category/index.ts +6 -6
  4. package/src/entries.ts +20 -0
  5. package/src/tool/baby-feeding-calculator/baby-feeding-calculator.css +402 -0
  6. package/src/tool/baby-feeding-calculator/component.astro +0 -404
  7. package/src/tool/baby-feeding-calculator/entry.ts +47 -0
  8. package/src/tool/baby-feeding-calculator/index.ts +2 -49
  9. package/src/tool/baby-percentile-calculator/baby-weight-height-percentile.css +451 -0
  10. package/src/tool/baby-percentile-calculator/component.astro +0 -453
  11. package/src/tool/baby-percentile-calculator/entry.ts +55 -0
  12. package/src/tool/baby-percentile-calculator/index.ts +2 -57
  13. package/src/tool/baby-size-converter/baby-size-converter.css +553 -0
  14. package/src/tool/baby-size-converter/component.astro +0 -555
  15. package/src/tool/baby-size-converter/entry.ts +53 -0
  16. package/src/tool/baby-size-converter/index.ts +2 -55
  17. package/src/tool/fertile-days-estimator/component.astro +0 -551
  18. package/src/tool/fertile-days-estimator/entry.ts +47 -0
  19. package/src/tool/fertile-days-estimator/fertile-days-calculator.css +549 -0
  20. package/src/tool/fertile-days-estimator/index.ts +2 -49
  21. package/src/tool/pregnancy-calculator/component.astro +0 -1054
  22. package/src/tool/pregnancy-calculator/entry.ts +87 -0
  23. package/src/tool/pregnancy-calculator/index.ts +2 -89
  24. package/src/tool/pregnancy-calculator/pregnancy-weeks-calculator.css +1053 -0
  25. package/src/tool/vaccination-calendar/baby-vaccination-calendar-spain.css +396 -0
  26. package/src/tool/vaccination-calendar/component.astro +0 -398
  27. package/src/tool/vaccination-calendar/entry.ts +67 -0
  28. package/src/tool/vaccination-calendar/index.ts +2 -69
  29. package/src/tools.ts +1 -1
@@ -281,401 +281,3 @@ const { ui } = Astro.props;
281
281
  clearDisplay();
282
282
  </script>
283
283
 
284
- <style>
285
- .vc-card {
286
- --primary: #4f46e5;
287
- --primary-soft: #eef2ff;
288
- --success: #10b981;
289
- --warning: #f59e0b;
290
- --text-main: #1e293b;
291
- --text-muted: #64748b;
292
- --bg-card: #fff;
293
- --border: #e2e8f0;
294
- --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
295
-
296
- max-width: 600px;
297
- margin: 0 auto;
298
- background: var(--bg-card);
299
- border-radius: 28px;
300
- border: 1px solid var(--border);
301
- box-shadow: var(--shadow);
302
- overflow: hidden;
303
- color: var(--text-main);
304
- transition: transform 0.3s ease;
305
- }
306
-
307
- :global(.theme-dark) .vc-card {
308
- --bg-card: #1e293b;
309
- --border: rgba(255, 255, 255, 0.1);
310
- --text-main: #f1f5f9;
311
- --text-muted: #94a3b8;
312
- --primary: #a5b4fc;
313
- --primary-soft: rgba(79, 70, 229, 0.15);
314
- }
315
-
316
- .vc-header {
317
- padding: 2rem 1.5rem;
318
- background: linear-gradient(to bottom, var(--primary-soft), transparent);
319
- border-bottom: 1px solid var(--border);
320
- display: flex;
321
- flex-direction: column;
322
- align-items: center;
323
- gap: 1.5rem;
324
- }
325
-
326
- .vc-inputs {
327
- width: 100%;
328
- display: flex;
329
- justify-content: center;
330
- }
331
-
332
- .vc-field {
333
- display: flex;
334
- flex-direction: column;
335
- align-items: center;
336
- gap: 0.75rem;
337
- width: 100%;
338
- }
339
-
340
- .vc-field label {
341
- font-size: 0.8rem;
342
- font-weight: 800;
343
- text-transform: uppercase;
344
- color: var(--text-muted);
345
- letter-spacing: 0.05em;
346
- }
347
-
348
- .vc-triple-input {
349
- display: flex;
350
- align-items: center;
351
- gap: 0.5rem;
352
- background: var(--bg-card);
353
- border: 2px solid var(--border);
354
- border-radius: 16px;
355
- padding: 0.25rem 1rem;
356
- transition: all 0.2s ease;
357
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
358
- }
359
-
360
- .vc-triple-input:focus-within {
361
- border-color: var(--primary);
362
- box-shadow: 0 0 0 4px var(--primary-soft);
363
- transform: translateY(-1px);
364
- }
365
-
366
- .vc-triple-input.has-error {
367
- border-color: #ef4444;
368
- background: #fef2f2;
369
- }
370
-
371
- :global(.theme-dark) .vc-triple-input.has-error {
372
- background: rgba(239, 68, 68, 0.05);
373
- }
374
-
375
- .vc-triple-input.has-error:focus-within {
376
- box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
377
- }
378
-
379
- .vc-segment {
380
- border: none;
381
- padding: 0.8rem 0;
382
- width: 3rem;
383
- text-align: center;
384
- background: transparent;
385
- font-size: 1.1rem;
386
- font-weight: 700;
387
- color: inherit;
388
- outline: none;
389
- }
390
-
391
- .vc-segment-year {
392
- width: 4.5rem;
393
- }
394
-
395
- .vc-sep {
396
- color: var(--text-muted);
397
- font-weight: 700;
398
- font-size: 1.2rem;
399
- opacity: 0.3;
400
- pointer-events: none;
401
- }
402
-
403
- .vc-age-badge {
404
- margin-top: 0.25rem;
405
- font-size: 0.85rem;
406
- font-weight: 700;
407
- color: var(--text-muted);
408
- opacity: 0;
409
- transform: translateY(-5px);
410
- transition: all 0.3s ease;
411
- }
412
-
413
- .vc-age-badge.vc-age-visible {
414
- opacity: 1;
415
- transform: translateY(0);
416
- }
417
-
418
- .vc-empty-state {
419
- padding: 3rem 1.5rem;
420
- text-align: center;
421
- color: var(--text-muted);
422
- }
423
-
424
- .vc-main-context {
425
- padding: 2rem 1.5rem;
426
- text-align: center;
427
- border-bottom: 1px solid var(--border);
428
- display: none;
429
- }
430
-
431
- .vc-active .vc-main-context {
432
- display: block;
433
- animation: vc-slide-up 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
434
- }
435
-
436
- @keyframes vc-slide-up {
437
- from {
438
- opacity: 0;
439
- transform: translateY(20px);
440
- }
441
-
442
- to {
443
- opacity: 1;
444
- transform: translateY(0);
445
- }
446
- }
447
-
448
- .vc-next-title {
449
- font-size: 0.9rem;
450
- font-weight: 700;
451
- color: var(--primary);
452
- text-transform: uppercase;
453
- margin: 0 0 0.5rem;
454
- }
455
-
456
- .vc-next-date {
457
- font-size: 1.75rem;
458
- font-weight: 900;
459
- margin-bottom: 1.5rem;
460
- }
461
-
462
- .vc-is-today .vc-next-date {
463
- color: #ef4444;
464
- animation: vc-pulse-today 2s infinite;
465
- }
466
-
467
- @keyframes vc-pulse-today {
468
- 0% { transform: scale(1); }
469
- 50% { transform: scale(1.02); }
470
- 100% { transform: scale(1); }
471
- }
472
-
473
- .vc-is-today .vc-btn-primary {
474
- background: #ef4444;
475
- box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
476
- }
477
-
478
- .vc-vac-list {
479
- display: flex;
480
- flex-direction: column;
481
- gap: 0.75rem;
482
- margin-bottom: 2rem;
483
- }
484
-
485
- :global(.vc-vac-item) {
486
- display: flex;
487
- align-items: center;
488
- gap: 1rem;
489
- padding: 1rem;
490
- background: var(--primary-soft);
491
- border-radius: 16px;
492
- text-align: left;
493
- border: 1px solid transparent;
494
- transition: 0.2s;
495
- }
496
-
497
- :global(.vc-vac-icon) {
498
- width: 48px;
499
- height: 48px;
500
- display: flex;
501
- align-items: center;
502
- justify-content: center;
503
- background: #fff;
504
- border-radius: 12px;
505
- font-weight: 700;
506
- color: var(--primary);
507
- border: 1px solid var(--border);
508
- flex-shrink: 0;
509
- }
510
-
511
- :global(.theme-dark) :global(.vc-vac-icon) {
512
- background: #0f172a;
513
- }
514
-
515
- :global(.vc-vac-info) {
516
- flex: 1;
517
- }
518
-
519
- :global(.vc-vac-name) {
520
- display: block;
521
- font-weight: 700;
522
- font-size: 1rem;
523
- }
524
-
525
- .vc-btn-primary {
526
- display: inline-flex;
527
- align-items: center;
528
- gap: 0.5rem;
529
- padding: 0.8rem 1.5rem;
530
- background: var(--primary);
531
- color: #fff;
532
- border-radius: 12px;
533
- font-weight: 700;
534
- border: none;
535
- cursor: pointer;
536
- width: 100%;
537
- justify-content: center;
538
- }
539
-
540
- .vc-sections {
541
- display: none;
542
- }
543
-
544
- .vc-active .vc-sections {
545
- display: block;
546
- }
547
-
548
- .vc-accordion-item {
549
- border-bottom: 1px solid var(--border);
550
- }
551
-
552
- .vc-accordion-item:last-child {
553
- border-bottom: none;
554
- }
555
-
556
- .vc-accordion-trigger {
557
- width: 100%;
558
- padding: 1.25rem 1.5rem;
559
- display: flex;
560
- justify-content: space-between;
561
- align-items: center;
562
- background: none;
563
- border: none;
564
- color: inherit;
565
- font-weight: 700;
566
- cursor: pointer;
567
- font-size: 1rem;
568
- }
569
-
570
- .vc-accordion-trigger:hover {
571
- background: var(--primary-soft);
572
- }
573
-
574
- .vc-accordion-content {
575
- max-height: 0;
576
- overflow: hidden;
577
- transition: max-height 0.3s ease;
578
- }
579
-
580
- .vc-accordion-item.vc-open .vc-accordion-content {
581
- max-height: 800px;
582
- }
583
-
584
- .vc-timeline-compact {
585
- padding: 0 1.5rem 1.5rem;
586
- display: flex;
587
- flex-direction: column;
588
- gap: 0.5rem;
589
- }
590
-
591
- :global(.vc-timeline-row) {
592
- display: flex;
593
- justify-content: space-between;
594
- align-items: center;
595
- padding: 0.6rem 0;
596
- border-bottom: 1px dashed var(--border);
597
- font-size: 0.9rem;
598
- }
599
-
600
- :global(.vc-timeline-row:last-child) {
601
- border-bottom: none;
602
- }
603
-
604
- :global(.vc-timeline-age) {
605
- font-weight: 800;
606
- color: var(--primary);
607
- width: 6.5rem;
608
- flex-shrink: 0;
609
- font-size: 0.8rem;
610
- text-transform: uppercase;
611
- letter-spacing: 0.02em;
612
- }
613
-
614
- :global(.vc-timeline-vac) {
615
- flex: 1;
616
- font-weight: 600;
617
- color: var(--text-main);
618
- display: flex;
619
- flex-wrap: wrap;
620
- gap: 0.4rem;
621
- padding: 0 0.5rem;
622
- }
623
-
624
- :global(.vc-vac-pill) {
625
- padding: 0.15rem 0.5rem;
626
- background: var(--primary-soft);
627
- border-radius: 6px;
628
- font-size: 0.8rem;
629
- color: var(--primary);
630
- border: 1px solid rgba(79, 70, 229, 0.1);
631
- }
632
-
633
- :global(.theme-dark) .vc-vac-pill {
634
- background: var(--primary-soft);
635
- color: var(--primary);
636
- border: 1px solid var(--primary-soft);
637
- }
638
-
639
- :global(.vc-timeline-status) {
640
- font-size: 0.65rem;
641
- font-weight: 900;
642
- text-transform: uppercase;
643
- width: 3.5rem;
644
- flex-shrink: 0;
645
- text-align: right;
646
- letter-spacing: 0.05em;
647
- }
648
-
649
- :global(.vc-check) {
650
- color: var(--success);
651
- }
652
-
653
- :global(.vc-clock) {
654
- color: var(--warning);
655
- }
656
-
657
- .vc-footer {
658
- padding: 1rem;
659
- text-align: center;
660
- font-size: 0.75rem;
661
- color: var(--text-muted);
662
- background: var(--primary-soft);
663
- }
664
-
665
- .vc-share-link {
666
- display: none;
667
- color: var(--primary);
668
- font-weight: 700;
669
- text-decoration: none;
670
- }
671
-
672
- .vc-active .vc-share-link {
673
- display: inline;
674
- }
675
-
676
- @media (max-width: 480px) {
677
- .vc-timeline-age {
678
- width: 5rem;
679
- }
680
- }
681
- </style>
@@ -0,0 +1,67 @@
1
+ import type { BabiesToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface VaccinationCalendarUI {
4
+ [key: string]: string;
5
+ labelBirthDate: string;
6
+ placeholderDD: string;
7
+ placeholderMM: string;
8
+ placeholderAAAA: string;
9
+ emptyMsg: string;
10
+ invalidMsg: string;
11
+ futureMsg: string;
12
+ labelNextAppointment: string;
13
+ btnAddReminder: string;
14
+ btnToday: string;
15
+ labelPassed: string;
16
+ labelFuture: string;
17
+ labelStatusOk: string;
18
+ labelStatusPending: string;
19
+ labelSource: string;
20
+ labelShare: string;
21
+ faqTitle: string;
22
+ bibliographyTitle: string;
23
+ labelMonth: string;
24
+ labelMonths: string;
25
+ labelYear: string;
26
+ labelYears: string;
27
+ labelDay: string;
28
+ labelDays: string;
29
+ labelAnd: string;
30
+ labelVaccination: string;
31
+ labelAppointment: string;
32
+ vac_hexavalente: string;
33
+ vac_neumococo: string;
34
+ vac_meningococo_b: string;
35
+ vac_rotavirus: string;
36
+ vac_meningococo_acwy: string;
37
+ vac_triple_virica: string;
38
+ vac_varicela: string;
39
+ vac_gripe: string;
40
+ vac_vph: string;
41
+ vac_tdpa: string;
42
+ vac_polio_booster: string;
43
+ }
44
+
45
+ export type VaccinationCalendarLocaleContent = ToolLocaleContent<VaccinationCalendarUI>;
46
+
47
+ export const vaccinationCalendar: BabiesToolEntry<VaccinationCalendarUI> = {
48
+ id: 'vaccination-calendar',
49
+ icons: { bg: 'mdi:needle', fg: 'mdi:needle' },
50
+ i18n: {
51
+ de: () => import('./i18n/de').then((m) => m.content),
52
+ en: () => import('./i18n/en').then((m) => m.content),
53
+ es: () => import('./i18n/es').then((m) => m.content),
54
+ fr: () => import('./i18n/fr').then((m) => m.content),
55
+ id: () => import('./i18n/id').then((m) => m.content),
56
+ it: () => import('./i18n/it').then((m) => m.content),
57
+ ja: () => import('./i18n/ja').then((m) => m.content),
58
+ ko: () => import('./i18n/ko').then((m) => m.content),
59
+ nl: () => import('./i18n/nl').then((m) => m.content),
60
+ pl: () => import('./i18n/pl').then((m) => m.content),
61
+ pt: () => import('./i18n/pt').then((m) => m.content),
62
+ ru: () => import('./i18n/ru').then((m) => m.content),
63
+ sv: () => import('./i18n/sv').then((m) => m.content),
64
+ tr: () => import('./i18n/tr').then((m) => m.content),
65
+ zh: () => import('./i18n/zh').then((m) => m.content),
66
+ },
67
+ };
@@ -1,72 +1,5 @@
1
- import type { BabiesToolEntry, ToolDefinition, ToolLocaleContent } from '../../types';
2
-
3
- export interface VaccinationCalendarUI {
4
- [key: string]: string;
5
- labelBirthDate: string;
6
- placeholderDD: string;
7
- placeholderMM: string;
8
- placeholderAAAA: string;
9
- emptyMsg: string;
10
- invalidMsg: string;
11
- futureMsg: string;
12
- labelNextAppointment: string;
13
- btnAddReminder: string;
14
- btnToday: string;
15
- labelPassed: string;
16
- labelFuture: string;
17
- labelStatusOk: string;
18
- labelStatusPending: string;
19
- labelSource: string;
20
- labelShare: string;
21
- faqTitle: string;
22
- bibliographyTitle: string;
23
- labelMonth: string;
24
- labelMonths: string;
25
- labelYear: string;
26
- labelYears: string;
27
- labelDay: string;
28
- labelDays: string;
29
- labelAnd: string;
30
- labelVaccination: string;
31
- labelAppointment: string;
32
- vac_hexavalente: string;
33
- vac_neumococo: string;
34
- vac_meningococo_b: string;
35
- vac_rotavirus: string;
36
- vac_meningococo_acwy: string;
37
- vac_triple_virica: string;
38
- vac_varicela: string;
39
- vac_gripe: string;
40
- vac_vph: string;
41
- vac_tdpa: string;
42
- vac_polio_booster: string;
43
- }
44
-
45
- export type VaccinationCalendarLocaleContent = ToolLocaleContent<VaccinationCalendarUI>;
46
-
47
- export const vaccinationCalendar: BabiesToolEntry<VaccinationCalendarUI> = {
48
- id: 'vaccination-calendar',
49
- icons: { bg: 'mdi:needle', fg: 'mdi:needle' },
50
- i18n: {
51
- de: () => import('./i18n/de').then((m) => m.content),
52
- en: () => import('./i18n/en').then((m) => m.content),
53
- es: () => import('./i18n/es').then((m) => m.content),
54
- fr: () => import('./i18n/fr').then((m) => m.content),
55
- id: () => import('./i18n/id').then((m) => m.content),
56
- it: () => import('./i18n/it').then((m) => m.content),
57
- ja: () => import('./i18n/ja').then((m) => m.content),
58
- ko: () => import('./i18n/ko').then((m) => m.content),
59
- nl: () => import('./i18n/nl').then((m) => m.content),
60
- pl: () => import('./i18n/pl').then((m) => m.content),
61
- pt: () => import('./i18n/pt').then((m) => m.content),
62
- ru: () => import('./i18n/ru').then((m) => m.content),
63
- sv: () => import('./i18n/sv').then((m) => m.content),
64
- tr: () => import('./i18n/tr').then((m) => m.content),
65
- zh: () => import('./i18n/zh').then((m) => m.content),
66
- },
67
- };
68
-
69
-
1
+ import { vaccinationCalendar } from './entry';
2
+ export * from './entry';
70
3
  export const VACCINATION_CALENDAR_TOOL: ToolDefinition = {
71
4
  entry: vaccinationCalendar,
72
5
  Component: () => import('./component.astro'),
package/src/tools.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { ALL_ENTRIES } from './entries';
1
2
  import type { ToolDefinition } from './types';
2
3
  import { BABY_FEEDING_CALCULATOR_TOOL } from './tool/baby-feeding-calculator/index';
3
4
  import { BABY_SIZE_CONVERTER_TOOL } from './tool/baby-size-converter/index';
@@ -16,4 +17,3 @@ export const ALL_TOOLS: ToolDefinition[] = [
16
17
  ];
17
18
 
18
19
 
19
- export const ALL_ENTRIES = ALL_TOOLS.map(t => t.entry);