@jjlmoya/utils-babies 1.3.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 { BabyPercentileCalculatorUI } from './index';
4
3
  interface Props { ui: BabyPercentileCalculatorUI; }
5
4
  const { ui } = Astro.props;
@@ -244,3 +243,457 @@ const { ui } = Astro.props;
244
243
  loadHistory();
245
244
  initChart();
246
245
  </script>
246
+
247
+ <style>
248
+ .bpc-card {
249
+ background: #fff;
250
+ border: 1px solid #e2e8f0;
251
+ border-radius: 32px;
252
+ overflow: hidden;
253
+ display: flex;
254
+ flex-direction: column;
255
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
256
+ transition: all 0.3s ease;
257
+ border-top: 8px solid #0ea5e9;
258
+ }
259
+
260
+ .bpc-card:not(.bpc-boy) {
261
+ border-top-color: #0d9488;
262
+ }
263
+
264
+ :global(.theme-dark) .bpc-card {
265
+ background: #0f172a;
266
+ border-color: #1e293b;
267
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
268
+ }
269
+
270
+ .bpc-main {
271
+ display: grid;
272
+ grid-template-columns: 1fr 1.2fr;
273
+ }
274
+
275
+ .bpc-left {
276
+ background: #f8fafc;
277
+ padding: 40px;
278
+ border-right: 1px solid #e2e8f0;
279
+ }
280
+
281
+ :global(.theme-dark) .bpc-left {
282
+ background: #1e293b;
283
+ border-right-color: #334155;
284
+ }
285
+
286
+ .bpc-right {
287
+ background: #fff;
288
+ padding: 40px;
289
+ }
290
+
291
+ :global(.theme-dark) .bpc-right {
292
+ background: #0f172a;
293
+ }
294
+
295
+ .bpc-section-marker {
296
+ display: block;
297
+ font-size: 0.8rem;
298
+ font-weight: 800;
299
+ text-transform: uppercase;
300
+ letter-spacing: 0.1em;
301
+ color: #475569;
302
+ margin-bottom: 32px;
303
+ }
304
+
305
+ :global(.theme-dark) .bpc-section-marker {
306
+ color: #94a3b8;
307
+ }
308
+
309
+ .bpc-input-group {
310
+ margin-bottom: 24px;
311
+ }
312
+
313
+ .bpc-input-label {
314
+ display: block;
315
+ font-size: 0.95rem;
316
+ font-weight: 700;
317
+ color: #1e293b;
318
+ margin-bottom: 12px;
319
+ }
320
+
321
+ :global(.theme-dark) .bpc-input-label {
322
+ color: #f8fafc;
323
+ }
324
+
325
+ .bpc-sex-selector {
326
+ display: flex;
327
+ gap: 8px;
328
+ background: #f1f5f9;
329
+ padding: 6px;
330
+ border-radius: 14px;
331
+ }
332
+
333
+ :global(.theme-dark) .bpc-sex-selector {
334
+ background: #334155;
335
+ }
336
+
337
+ .bpc-sex-btn {
338
+ flex: 1;
339
+ padding: 12px;
340
+ border: none;
341
+ background: transparent;
342
+ border-radius: 10px;
343
+ font-size: 0.9rem;
344
+ font-weight: 700;
345
+ color: #64748b;
346
+ cursor: pointer;
347
+ transition: all 0.2s ease;
348
+ }
349
+
350
+ .bpc-sex-btn.bpc-active {
351
+ background: #fff;
352
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
353
+ }
354
+
355
+ :global(.theme-dark) .bpc-sex-btn.bpc-active {
356
+ background: #0f172a;
357
+ }
358
+
359
+ .bpc-boy .bpc-sex-btn[data-sex="boy"].bpc-active {
360
+ color: #0ea5e9;
361
+ }
362
+
363
+ .bpc-card:not(.bpc-boy) .bpc-sex-btn[data-sex="girl"].bpc-active {
364
+ color: #0d9488;
365
+ }
366
+
367
+ .bpc-unit-nav {
368
+ display: flex;
369
+ background: #f1f5f9;
370
+ padding: 6px;
371
+ border-radius: 14px;
372
+ }
373
+
374
+ :global(.theme-dark) .bpc-unit-nav {
375
+ background: #334155;
376
+ }
377
+
378
+ .bpc-unit-tab {
379
+ flex: 1;
380
+ padding: 10px;
381
+ border: none;
382
+ background: transparent;
383
+ color: #64748b;
384
+ border-radius: 10px;
385
+ font-size: 0.85rem;
386
+ font-weight: 700;
387
+ cursor: pointer;
388
+ transition: all 0.2s ease;
389
+ }
390
+
391
+ .bpc-unit-tab.bpc-active {
392
+ background: #fff;
393
+ color: #0d9488;
394
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
395
+ }
396
+
397
+ .bpc-boy .bpc-unit-tab.bpc-active {
398
+ color: #0ea5e9;
399
+ }
400
+
401
+ :global(.theme-dark) .bpc-unit-tab.bpc-active {
402
+ background: #0f172a;
403
+ }
404
+
405
+ .bpc-stepper-box {
406
+ display: flex;
407
+ align-items: center;
408
+ justify-content: space-between;
409
+ background: #fff;
410
+ border: 2px solid #e2e8f0;
411
+ border-radius: 18px;
412
+ padding: 10px;
413
+ margin-bottom: 12px;
414
+ }
415
+
416
+ :global(.theme-dark) .bpc-stepper-box {
417
+ background: #334155;
418
+ border-color: #475569;
419
+ }
420
+
421
+ .bpc-btn-step {
422
+ width: 44px;
423
+ height: 44px;
424
+ border-radius: 12px;
425
+ border: none;
426
+ background: #f8fafc;
427
+ color: #1e293b;
428
+ font-size: 1.5rem;
429
+ font-weight: 700;
430
+ cursor: pointer;
431
+ transition: all 0.2s ease;
432
+ }
433
+
434
+ :global(.theme-dark) .bpc-btn-step {
435
+ background: #0f172a;
436
+ color: #fff;
437
+ }
438
+
439
+ .bpc-btn-step:hover {
440
+ background: #0d9488;
441
+ color: #fff;
442
+ }
443
+
444
+ .bpc-boy .bpc-btn-step:hover {
445
+ background: #0ea5e9;
446
+ }
447
+
448
+ .bpc-val-view {
449
+ text-align: center;
450
+ }
451
+
452
+ .bpc-val-big {
453
+ display: block;
454
+ font-size: 2.25rem;
455
+ font-weight: 900;
456
+ color: #0f172a;
457
+ }
458
+
459
+ :global(.theme-dark) .bpc-val-big {
460
+ color: #fff;
461
+ }
462
+
463
+ .bpc-val-sub {
464
+ font-size: 0.8rem;
465
+ color: #64748b;
466
+ font-weight: 700;
467
+ }
468
+
469
+ .bpc-slider {
470
+ -webkit-appearance: none;
471
+ appearance: none;
472
+ width: 100%;
473
+ margin: 16px 0;
474
+ height: 6px;
475
+ background: #e2e8f0;
476
+ border-radius: 3px;
477
+ outline: none;
478
+ }
479
+
480
+ :global(.theme-dark) .bpc-slider {
481
+ background: #475569;
482
+ }
483
+
484
+ .bpc-slider::-webkit-slider-thumb {
485
+ -webkit-appearance: none;
486
+ appearance: none;
487
+ width: 24px;
488
+ height: 24px;
489
+ border-radius: 50%;
490
+ background: #0d9488;
491
+ cursor: pointer;
492
+ border: 4px solid #fff;
493
+ box-shadow: 0 4px 10px rgba(13, 148, 136, 0.4);
494
+ }
495
+
496
+ .bpc-boy .bpc-slider::-webkit-slider-thumb {
497
+ background: #0ea5e9;
498
+ box-shadow: 0 4px 10px rgba(14, 165, 233, 0.4);
499
+ }
500
+
501
+ .bpc-grid-2 {
502
+ display: grid;
503
+ grid-template-columns: 1fr 1fr;
504
+ gap: 16px;
505
+ }
506
+
507
+ .bpc-num-input {
508
+ width: 100%;
509
+ padding: 16px;
510
+ border: 2px solid #e2e8f0;
511
+ border-radius: 14px;
512
+ font-size: 1.25rem;
513
+ font-weight: 800;
514
+ color: #0f172a;
515
+ background: #fff;
516
+ transition: all 0.2s ease;
517
+ box-sizing: border-box;
518
+ }
519
+
520
+ :global(.theme-dark) .bpc-num-input {
521
+ background: #334155;
522
+ border-color: #475569;
523
+ color: #fff;
524
+ }
525
+
526
+ .bpc-num-input:focus {
527
+ border-color: #0d9488;
528
+ outline: none;
529
+ box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.1);
530
+ }
531
+
532
+ .bpc-boy .bpc-num-input:focus {
533
+ border-color: #0ea5e9;
534
+ }
535
+
536
+ .bpc-history-actions {
537
+ display: flex;
538
+ flex-direction: column;
539
+ gap: 12px;
540
+ margin-top: 32px;
541
+ }
542
+
543
+ .bpc-btn-secondary {
544
+ padding: 16px;
545
+ background: #0f172a;
546
+ color: #fff;
547
+ border: none;
548
+ border-radius: 14px;
549
+ font-size: 0.95rem;
550
+ font-weight: 800;
551
+ cursor: pointer;
552
+ transition: all 0.2s ease;
553
+ }
554
+
555
+ .bpc-btn-secondary:hover {
556
+ background: #0d9488;
557
+ transform: translateY(-2px);
558
+ }
559
+
560
+ .bpc-boy .bpc-btn-secondary:hover {
561
+ background: #0ea5e9;
562
+ }
563
+
564
+ .bpc-btn-clear {
565
+ padding: 12px;
566
+ background: transparent;
567
+ color: #64748b;
568
+ border: 1px solid #e2e8f0;
569
+ border-radius: 14px;
570
+ font-size: 0.85rem;
571
+ font-weight: 700;
572
+ cursor: pointer;
573
+ transition: all 0.2s ease;
574
+ }
575
+
576
+ :global(.theme-dark) .bpc-btn-clear {
577
+ border-color: #334155;
578
+ }
579
+
580
+ .bpc-btn-clear:hover {
581
+ color: #f43f5e;
582
+ border-color: #f43f5e;
583
+ }
584
+
585
+ .bpc-res-grid {
586
+ display: grid;
587
+ grid-template-columns: repeat(3, 1fr);
588
+ gap: 20px;
589
+ margin-bottom: 24px;
590
+ }
591
+
592
+ .bpc-res-item {
593
+ background: #f8fafc;
594
+ padding: 24px 12px;
595
+ border-radius: 24px;
596
+ text-align: center;
597
+ border: 1px solid #e2e8f0;
598
+ }
599
+
600
+ :global(.theme-dark) .bpc-res-item {
601
+ background: #1e293b;
602
+ border-color: #334155;
603
+ }
604
+
605
+ .bpc-res-title {
606
+ display: block;
607
+ font-size: 0.75rem;
608
+ font-weight: 800;
609
+ text-transform: uppercase;
610
+ color: #94a3b8;
611
+ margin-bottom: 8px;
612
+ }
613
+
614
+ .bpc-percent-val {
615
+ display: block;
616
+ font-size: 2.25rem;
617
+ font-weight: 950;
618
+ color: #0d9488;
619
+ line-height: 1;
620
+ margin-bottom: 4px;
621
+ }
622
+
623
+ .bpc-boy .bpc-percent-val {
624
+ color: #0ea5e9;
625
+ }
626
+
627
+ :global(.theme-dark) .bpc-percent-val {
628
+ color: #2dd4bf;
629
+ }
630
+
631
+ .bpc-res-desc {
632
+ font-size: 0.85rem;
633
+ font-weight: 700;
634
+ color: #64748b;
635
+ }
636
+
637
+ .bpc-alert-msg {
638
+ background: #fff7ed;
639
+ border: 1px solid #fed7aa;
640
+ color: #9a3412;
641
+ padding: 16px;
642
+ border-radius: 16px;
643
+ font-size: 0.85rem;
644
+ font-weight: 600;
645
+ line-height: 1.5;
646
+ margin-bottom: 24px;
647
+ }
648
+
649
+ :global(.theme-dark) .bpc-alert-msg {
650
+ background: rgba(154, 52, 18, 0.1);
651
+ border-color: rgba(154, 52, 18, 0.2);
652
+ color: #fdba74;
653
+ }
654
+
655
+ .bpc-hidden {
656
+ display: none;
657
+ }
658
+
659
+ .bpc-chart-box {
660
+ margin-top: 16px;
661
+ height: 300px;
662
+ width: 100%;
663
+ }
664
+
665
+ .bpc-disclaimer {
666
+ margin-top: 40px;
667
+ padding: 20px;
668
+ background: #f1f5f9;
669
+ border-radius: 16px;
670
+ font-size: 0.85rem;
671
+ color: #64748b;
672
+ line-height: 1.5;
673
+ font-style: italic;
674
+ }
675
+
676
+ :global(.theme-dark) .bpc-disclaimer {
677
+ background: #1e293b;
678
+ }
679
+
680
+ @media (max-width: 900px) {
681
+ .bpc-main {
682
+ grid-template-columns: 1fr;
683
+ }
684
+
685
+ .bpc-left {
686
+ border-right: none;
687
+ border-bottom: 1px solid #e2e8f0;
688
+ padding: 40px 20px;
689
+ }
690
+
691
+ .bpc-right {
692
+ padding: 40px 20px;
693
+ }
694
+
695
+ .bpc-res-grid {
696
+ grid-template-columns: 1fr;
697
+ }
698
+ }
699
+ </style>