@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
@@ -0,0 +1,549 @@
1
+ .fde-container {
2
+ width: 100%;
3
+ max-width: 1000px;
4
+ margin: 0 auto;
5
+ background: #fff;
6
+ border-radius: 32px;
7
+ box-shadow: 0 25px 70px rgba(0, 0, 0, 0.08);
8
+ display: flex;
9
+ flex-direction: column;
10
+ overflow: hidden;
11
+ color: #111827;
12
+ border: 1px solid #e5e7eb;
13
+ min-height: 600px;
14
+ transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
15
+ }
16
+
17
+ .fde-step-indicator {
18
+ padding: 1.5rem 2.5rem;
19
+ background: #fdf2f8;
20
+ border-bottom: 1px solid #fbcfe8;
21
+ display: flex;
22
+ justify-content: center;
23
+ gap: 3rem;
24
+ }
25
+
26
+ .fde-step-item {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: 0.75rem;
30
+ font-size: 0.9rem;
31
+ font-weight: 700;
32
+ color: #9d174d;
33
+ opacity: 0.4;
34
+ transition: opacity 0.3s ease;
35
+ }
36
+
37
+ .fde-step-item.fde-step-active {
38
+ opacity: 1;
39
+ }
40
+
41
+ .fde-step-number {
42
+ width: 28px;
43
+ height: 28px;
44
+ background: #db2777;
45
+ color: white;
46
+ border-radius: 50%;
47
+ display: flex;
48
+ align-items: center;
49
+ justify-content: center;
50
+ font-size: 0.75rem;
51
+ }
52
+
53
+ .fde-step-first {
54
+ flex: 1;
55
+ display: flex;
56
+ flex-direction: column;
57
+ align-items: center;
58
+ justify-content: center;
59
+ padding: 4rem 2rem;
60
+ text-align: center;
61
+ gap: 3rem;
62
+ background: radial-gradient(circle at top right, #fff1f2, transparent),
63
+ radial-gradient(circle at bottom left, #fdf2f8, transparent);
64
+ transition: opacity 0.4s ease, transform 0.4s ease;
65
+ }
66
+
67
+ .fde-step-first.fde-hidden {
68
+ display: none;
69
+ }
70
+
71
+ :global(.theme-dark) .fde-step-first {
72
+ background: radial-gradient(circle at top right, rgba(88, 28, 135, 0.15), transparent),
73
+ radial-gradient(circle at bottom left, rgba(124, 58, 202, 0.1), transparent);
74
+ }
75
+
76
+ .fde-step-header h2 {
77
+ font-size: 2.5rem;
78
+ font-weight: 950;
79
+ letter-spacing: -0.04em;
80
+ color: #9d174d;
81
+ margin-bottom: 0.75rem;
82
+ line-height: 1;
83
+ }
84
+
85
+ .fde-step-header p {
86
+ font-size: 1.15rem;
87
+ color: #64748b;
88
+ max-width: 400px;
89
+ margin: 0 auto;
90
+ }
91
+
92
+ .fde-calendar-card {
93
+ max-width: 500px;
94
+ width: 100%;
95
+ background: #fff;
96
+ padding: 2.5rem;
97
+ border-radius: 32px;
98
+ border: 1px solid rgba(251, 207, 232, 0.5);
99
+ box-shadow: 0 30px 60px -12px rgba(219, 39, 119, 0.15),
100
+ 0 18px 36px -18px rgba(0, 0, 0, 0.1);
101
+ transform: translateY(0);
102
+ transition: transform 0.3s ease;
103
+ }
104
+
105
+ .fde-calendar-card:hover {
106
+ transform: translateY(-5px);
107
+ }
108
+
109
+ .fde-pulse-hint {
110
+ font-size: 0.95rem;
111
+ font-weight: 800;
112
+ color: #db2777;
113
+ background: #fdf2f8;
114
+ padding: 0.75rem 1.5rem;
115
+ border-radius: 100px;
116
+ border: 1px solid #fbcfe8;
117
+ animation: fde-pulse 2s infinite;
118
+ }
119
+
120
+ @keyframes fde-pulse {
121
+ 0% { opacity: 0.4; }
122
+ 50% { opacity: 1; }
123
+ 100% { opacity: 0.4; }
124
+ }
125
+
126
+ .fde-layout {
127
+ display: none;
128
+ grid-template-columns: 350px 1fr;
129
+ flex: 1;
130
+ opacity: 0;
131
+ transition: opacity 0.5s ease;
132
+ }
133
+
134
+ .fde-layout.fde-active {
135
+ display: grid;
136
+ opacity: 1;
137
+ }
138
+
139
+ .fde-sidebar {
140
+ background: #fdf2f8;
141
+ padding: 2.5rem;
142
+ display: flex;
143
+ flex-direction: column;
144
+ gap: 2.5rem;
145
+ border-right: 1px solid #fbcfe8;
146
+ }
147
+
148
+ .fde-sidebar-header h2 {
149
+ font-size: 1.5rem;
150
+ font-weight: 800;
151
+ color: #9d174d;
152
+ margin: 0 0 0.5rem;
153
+ }
154
+
155
+ .fde-sidebar-header p {
156
+ font-size: 0.85rem;
157
+ color: #be123c;
158
+ opacity: 0.8;
159
+ margin: 0;
160
+ }
161
+
162
+ .fde-input-card {
163
+ background: #fff;
164
+ padding: 1.5rem;
165
+ border-radius: 20px;
166
+ border: 1px solid #fbcfe8;
167
+ box-shadow: 0 4px 15px rgba(219, 39, 119, 0.05);
168
+ }
169
+
170
+ .fde-input-card label {
171
+ display: flex;
172
+ align-items: center;
173
+ gap: 0.75rem;
174
+ font-size: 0.9rem;
175
+ font-weight: 700;
176
+ color: #9d174d;
177
+ margin-bottom: 1rem;
178
+ }
179
+
180
+ .fde-input-card label svg,
181
+ .fde-input-card label [data-icon] {
182
+ width: 1.25rem;
183
+ height: 1.25rem;
184
+ }
185
+
186
+ .fde-range-control {
187
+ display: flex;
188
+ flex-direction: column;
189
+ gap: 1rem;
190
+ }
191
+
192
+ .fde-range-control input[type='range'] {
193
+ width: 100%;
194
+ accent-color: #db2777;
195
+ cursor: pointer;
196
+ }
197
+
198
+ .fde-range-value {
199
+ text-align: center;
200
+ font-size: 2rem;
201
+ font-weight: 800;
202
+ color: #db2777;
203
+ }
204
+
205
+ .fde-range-value span {
206
+ font-size: 0.9rem;
207
+ font-weight: 600;
208
+ color: #be123c;
209
+ }
210
+
211
+ .fde-results {
212
+ display: flex;
213
+ flex-direction: column;
214
+ gap: 1rem;
215
+ }
216
+
217
+ .fde-stat {
218
+ display: flex;
219
+ align-items: center;
220
+ gap: 1rem;
221
+ padding: 1.25rem;
222
+ background: #fff;
223
+ border-radius: 16px;
224
+ border: 1px solid #fce7f3;
225
+ }
226
+
227
+ .fde-stat svg,
228
+ .fde-stat [data-icon] {
229
+ width: 2rem;
230
+ height: 2rem;
231
+ border-radius: 10px;
232
+ padding: 0.4rem;
233
+ flex-shrink: 0;
234
+ }
235
+
236
+ .fde-stat-ovulation svg,
237
+ .fde-stat-ovulation [data-icon] {
238
+ background: #db2777;
239
+ color: #fff;
240
+ }
241
+
242
+ .fde-stat-fertile svg,
243
+ .fde-stat-fertile [data-icon] {
244
+ background: #fdf2f8;
245
+ color: #db2777;
246
+ border: 1px solid #f9a8d4;
247
+ }
248
+
249
+ .fde-stat-period svg,
250
+ .fde-stat-period [data-icon] {
251
+ background: #ffe4e6;
252
+ color: #be123c;
253
+ border: 1px solid #fca5a5;
254
+ }
255
+
256
+ .fde-stat-info {
257
+ display: flex;
258
+ flex-direction: column;
259
+ }
260
+
261
+ .fde-stat-label {
262
+ font-size: 0.75rem;
263
+ font-weight: 700;
264
+ text-transform: uppercase;
265
+ color: #64748b;
266
+ }
267
+
268
+ .fde-stat-value {
269
+ font-size: 1.1rem;
270
+ font-weight: 900;
271
+ color: #1e293b;
272
+ }
273
+
274
+ .fde-main {
275
+ background: #fff;
276
+ padding: 2.5rem;
277
+ display: flex;
278
+ flex-direction: column;
279
+ gap: 2rem;
280
+ }
281
+
282
+ .fde-calendar-wrapper {
283
+ background: #fff;
284
+ }
285
+
286
+ .fde-cal-nav {
287
+ display: flex;
288
+ justify-content: space-between;
289
+ align-items: center;
290
+ margin-bottom: 2rem;
291
+ }
292
+
293
+ .fde-cal-nav h3 {
294
+ font-size: 1.5rem;
295
+ font-weight: 900;
296
+ color: #111827;
297
+ margin: 0;
298
+ text-transform: capitalize;
299
+ }
300
+
301
+ .fde-nav-buttons {
302
+ display: flex;
303
+ gap: 0.5rem;
304
+ }
305
+
306
+ .fde-nav-btn {
307
+ width: 40px;
308
+ height: 40px;
309
+ border-radius: 10px;
310
+ border: 1px solid #e5e7eb;
311
+ background: #fff;
312
+ display: flex;
313
+ align-items: center;
314
+ justify-content: center;
315
+ cursor: pointer;
316
+ transition: 0.2s all ease;
317
+ color: #374151;
318
+ }
319
+
320
+ .fde-nav-btn:hover {
321
+ background: #f3f4f6;
322
+ border-color: #d1d5db;
323
+ }
324
+
325
+ .fde-grid {
326
+ display: grid;
327
+ grid-template-columns: repeat(7, 1fr);
328
+ gap: 8px;
329
+ }
330
+
331
+ :global(.fde-day-header) {
332
+ text-align: center;
333
+ font-size: 0.8rem;
334
+ font-weight: 800;
335
+ color: #9ca3af;
336
+ text-transform: uppercase;
337
+ padding-bottom: 1rem;
338
+ }
339
+
340
+ :global(.fde-day) {
341
+ aspect-ratio: 1;
342
+ display: flex;
343
+ align-items: center;
344
+ justify-content: center;
345
+ font-size: 1rem;
346
+ font-weight: 700;
347
+ border-radius: 14px;
348
+ background: #fff;
349
+ color: #374151;
350
+ cursor: pointer;
351
+ transition: 0.2s all ease;
352
+ border: 1px solid #f3f4f6;
353
+ }
354
+
355
+ :global(.fde-day:hover:not(.fde-day-empty)) {
356
+ border-color: #db2777;
357
+ background: #fdf2f8;
358
+ }
359
+
360
+ :global(.fde-day-empty) {
361
+ background: transparent;
362
+ border: none;
363
+ cursor: default;
364
+ }
365
+
366
+ :global(.fde-day-selected) {
367
+ background: #be123c;
368
+ color: #fff;
369
+ border: none;
370
+ box-shadow: 0 8px 20px rgba(190, 18, 60, 0.3);
371
+ }
372
+
373
+ :global(.fde-day-period) {
374
+ background: #ffe4e6;
375
+ color: #be123c;
376
+ border: none;
377
+ }
378
+
379
+ :global(.fde-day-fertile) {
380
+ background: #fdf2f8;
381
+ color: #db2777;
382
+ border: none;
383
+ }
384
+
385
+ :global(.fde-day-ovulation) {
386
+ background: #db2777;
387
+ color: #fff;
388
+ box-shadow: 0 8px 20px rgba(219, 39, 119, 0.3);
389
+ border: none;
390
+ }
391
+
392
+ :global(.fde-day-today) {
393
+ border: 2px solid #111827;
394
+ }
395
+
396
+ .fde-legend {
397
+ display: flex;
398
+ justify-content: center;
399
+ gap: 2rem;
400
+ margin-top: 2rem;
401
+ padding: 1.25rem;
402
+ background: #f9fafb;
403
+ border-radius: 20px;
404
+ }
405
+
406
+ .fde-legend-item {
407
+ display: flex;
408
+ align-items: center;
409
+ gap: 0.5rem;
410
+ font-size: 0.85rem;
411
+ font-weight: 700;
412
+ color: #4b5563;
413
+ }
414
+
415
+ .fde-legend-dot {
416
+ width: 12px;
417
+ height: 12px;
418
+ border-radius: 4px;
419
+ }
420
+
421
+ .fde-dot-period { background: #ffe4e6; }
422
+ .fde-dot-fertile { background: #fdf2f8; }
423
+ .fde-dot-ovulation { background: #db2777; }
424
+ .fde-dot-selected { background: #be123c; }
425
+
426
+ :global(.theme-dark) .fde-container {
427
+ background: #18181b;
428
+ border-color: #27272a;
429
+ box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5);
430
+ color: #fff;
431
+ }
432
+
433
+ :global(.theme-dark) .fde-sidebar {
434
+ background: #111113;
435
+ border-right-color: #27272a;
436
+ }
437
+
438
+ :global(.theme-dark) .fde-main { background: #18181b; }
439
+
440
+ :global(.theme-dark) .fde-sidebar-header h2 { color: #f472b6; }
441
+ :global(.theme-dark) .fde-sidebar-header p { color: #f9a8d4; }
442
+
443
+ :global(.theme-dark) .fde-input-card {
444
+ background: #1e1e21;
445
+ border-color: #27272a;
446
+ }
447
+
448
+ :global(.theme-dark) .fde-stat {
449
+ background: #1e1e21;
450
+ border-color: #27272a;
451
+ }
452
+
453
+ :global(.theme-dark) .fde-stat-value { color: #fff; }
454
+ :global(.theme-dark) .fde-cal-nav h3 { color: #fff; }
455
+
456
+ :global(.theme-dark) .fde-day {
457
+ background: #1e1e21;
458
+ border-color: #27272a;
459
+ color: #e5e7eb;
460
+ }
461
+
462
+ :global(.theme-dark) .fde-day:hover:not(.fde-day-empty) { background: #27272a; }
463
+ :global(.theme-dark) .fde-legend { background: #111113; }
464
+ :global(.theme-dark) .fde-legend-item { color: #9ca3af; }
465
+
466
+ @media (max-width: 900px) {
467
+ .fde-layout { grid-template-columns: 1fr; }
468
+ .fde-sidebar {
469
+ border-right: none;
470
+ border-bottom: 1px solid #fbcfe8;
471
+ }
472
+ }
473
+
474
+ @media (max-width: 768px) {
475
+ .fde-container { border-radius: 1.5rem; }
476
+
477
+ .fde-step-indicator {
478
+ padding: 1rem;
479
+ gap: 1rem;
480
+ flex-wrap: wrap;
481
+ }
482
+
483
+ .fde-step-first {
484
+ padding: 2rem 1rem;
485
+ gap: 1.5rem;
486
+ }
487
+
488
+ .fde-calendar-card {
489
+ padding: 1rem;
490
+ border-radius: 1.5rem;
491
+ }
492
+
493
+ .fde-step-header h2 { font-size: 1.75rem; }
494
+ .fde-step-header p { font-size: 0.95rem; }
495
+
496
+ .fde-sidebar {
497
+ padding: 1.25rem;
498
+ gap: 1.5rem;
499
+ }
500
+
501
+ .fde-sidebar-header h2 { font-size: 1.25rem; }
502
+
503
+ .fde-main {
504
+ padding: 1.25rem;
505
+ gap: 1.25rem;
506
+ }
507
+
508
+ .fde-input-card {
509
+ padding: 1rem;
510
+ border-radius: 1rem;
511
+ }
512
+
513
+ .fde-cal-nav { margin-bottom: 1rem; }
514
+ .fde-cal-nav h3 { font-size: 1.2rem; }
515
+ .fde-nav-btn {
516
+ width: 32px;
517
+ height: 32px;
518
+ }
519
+
520
+ .fde-grid { gap: 4px; }
521
+
522
+ .fde-day-header {
523
+ padding-bottom: 0.5rem;
524
+ font-size: 0.7rem;
525
+ }
526
+
527
+ .fde-day {
528
+ font-size: 0.85rem;
529
+ border-radius: 8px;
530
+ }
531
+
532
+ .fde-legend {
533
+ flex-direction: column;
534
+ gap: 0.75rem;
535
+ padding: 1rem;
536
+ align-items: flex-start;
537
+ border-radius: 1rem;
538
+ }
539
+
540
+ .fde-stat {
541
+ padding: 1rem;
542
+ gap: 0.75rem;
543
+ flex-direction: column;
544
+ text-align: center;
545
+ align-items: center;
546
+ }
547
+
548
+ .fde-stat-info { align-items: center; }
549
+ }
@@ -1,52 +1,5 @@
1
- import type { BabiesToolEntry, ToolDefinition, ToolLocaleContent } from '../../types';
2
-
3
- export interface FertileDaysEstimatorUI {
4
- [key: string]: string;
5
- step1Title: string;
6
- step1Desc: string;
7
- pulseHint: string;
8
- step1Indicator: string;
9
- step2Indicator: string;
10
- sidebarTitle: string;
11
- sidebarDesc: string;
12
- labelCycleLength: string;
13
- unitDays: string;
14
- labelOvulation: string;
15
- labelFertileWindow: string;
16
- labelNextPeriod: string;
17
- legendSelection: string;
18
- legendPeriod: string;
19
- legendFertile: string;
20
- legendOvulation: string;
21
- faqTitle: string;
22
- bibliographyTitle: string;
23
- }
24
-
25
- export type FertileDaysEstimatorLocaleContent = ToolLocaleContent<FertileDaysEstimatorUI>;
26
-
27
- export const fertileDaysEstimator: BabiesToolEntry<FertileDaysEstimatorUI> = {
28
- id: 'fertile-days-estimator',
29
- icons: { bg: 'mdi:calendar-heart', fg: 'mdi:calendar-heart' },
30
- i18n: {
31
- es: () => import('./i18n/es').then((m) => m.content),
32
- en: () => import('./i18n/en').then((m) => m.content),
33
- de: () => import('./i18n/de').then((m) => m.content),
34
- fr: () => import('./i18n/fr').then((m) => m.content),
35
- it: () => import('./i18n/it').then((m) => m.content),
36
- pt: () => import('./i18n/pt').then((m) => m.content),
37
- nl: () => import('./i18n/nl').then((m) => m.content),
38
- pl: () => import('./i18n/pl').then((m) => m.content),
39
- ru: () => import('./i18n/ru').then((m) => m.content),
40
- tr: () => import('./i18n/tr').then((m) => m.content),
41
- sv: () => import('./i18n/sv').then((m) => m.content),
42
- id: () => import('./i18n/id').then((m) => m.content),
43
- ja: () => import('./i18n/ja').then((m) => m.content),
44
- ko: () => import('./i18n/ko').then((m) => m.content),
45
- zh: () => import('./i18n/zh').then((m) => m.content),
46
- },
47
- };
48
-
49
-
1
+ import { fertileDaysEstimator } from './entry';
2
+ export * from './entry';
50
3
  export const FERTILE_DAYS_ESTIMATOR_TOOL: ToolDefinition = {
51
4
  entry: fertileDaysEstimator,
52
5
  Component: () => import('./component.astro'),