@jjlmoya/utils-alcohol 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jjlmoya/utils-alcohol",
3
- "version": "1.11.0",
3
+ "version": "1.13.0",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  import { Icon } from "astro-icon/components";
3
3
  import type { AlcoholClearanceUI } from "./index";
4
- import './component.css';
5
4
 
6
5
  interface Props {
7
6
  ui: AlcoholClearanceUI;
@@ -217,3 +216,437 @@ const { ui } = Astro.props;
217
216
  }
218
217
  new AlcoholClearanceApp();
219
218
  </script>
219
+
220
+ <style>
221
+ .alc-app {
222
+ width: 100%;
223
+ max-width: 56rem;
224
+ margin: 0 auto;
225
+ padding: 0.5rem;
226
+ }
227
+
228
+ .alc-card {
229
+ background: #fff;
230
+ border: 1px solid #e2e8f0;
231
+ border-radius: 1.25rem;
232
+ overflow: clip;
233
+ box-shadow: 0 4px 20px rgba(0,0,0,0.06);
234
+ color: #1e293b;
235
+ }
236
+ :global(.theme-dark) .alc-card {
237
+ background: #0f172a;
238
+ border-color: #1e293b;
239
+ color: #f1f5f9;
240
+ }
241
+
242
+ .alc-grid { display: grid; }
243
+
244
+ @media (min-width: 768px) {
245
+ .alc-grid {
246
+ grid-template-columns: 1fr 1fr;
247
+ align-items: stretch;
248
+ }
249
+ }
250
+
251
+ .alc-inputs-panel {
252
+ display: flex;
253
+ flex-direction: column;
254
+ }
255
+
256
+ @media (min-width: 768px) { .alc-inputs-panel { border-right: 1px solid #e2e8f0; } }
257
+ :global(.theme-dark) .alc-inputs-panel { border-color: #1e293b; }
258
+
259
+ .alc-sec {
260
+ padding: 1.25rem 1.5rem;
261
+ border-bottom: 1px solid #e2e8f0;
262
+ }
263
+ :global(.theme-dark) .alc-sec { border-color: #1e293b; }
264
+ .alc-sec:last-child { border-bottom: none; }
265
+
266
+ .alc-sex-weight {
267
+ display: grid;
268
+ grid-template-columns: 1fr 1fr;
269
+ gap: 1.25rem;
270
+ }
271
+ .alc-field {
272
+ display: flex;
273
+ flex-direction: column;
274
+ gap: 0.75rem;
275
+ }
276
+
277
+ .field-label {
278
+ font-size: 0.75rem;
279
+ font-weight: 700;
280
+ text-transform: uppercase;
281
+ letter-spacing: 0.1em;
282
+ color: #94a3b8;
283
+ display: flex;
284
+ align-items: center;
285
+ gap: 0.5rem;
286
+ }
287
+ .field-label-icon {
288
+ width: 1rem;
289
+ height: 1rem;
290
+ }
291
+
292
+ .sex-toggle {
293
+ display: flex;
294
+ gap: 0.5rem;
295
+ padding: 0.25rem;
296
+ background: #f1f5f9;
297
+ border-radius: 0.75rem;
298
+ }
299
+ :global(.theme-dark) .sex-toggle { background: #1e293b; }
300
+
301
+ .sex-btn {
302
+ flex: 1;
303
+ padding: 0.75rem;
304
+ border-radius: 0.5rem;
305
+ border: none;
306
+ cursor: pointer;
307
+ display: flex;
308
+ align-items: center;
309
+ justify-content: center;
310
+ color: #94a3b8;
311
+ background: transparent;
312
+ transition: all 0.2s;
313
+ }
314
+ .sex-btn:hover { color: #64748b; }
315
+ .sex-btn.selected {
316
+ background: #fff;
317
+ color: #4f46e5;
318
+ box-shadow: 0 1px 3px rgba(0,0,0,0.1);
319
+ }
320
+ :global(.theme-dark) .sex-btn.selected {
321
+ background: #334155;
322
+ color: #818cf8;
323
+ }
324
+ .sex-icon {
325
+ width: 1.5rem;
326
+ height: 1.5rem;
327
+ }
328
+
329
+ .weight-input-wrap { position: relative; }
330
+ .weight-input {
331
+ width: 100%;
332
+ background: #f8fafc;
333
+ border: 2px solid #e2e8f0;
334
+ border-radius: 0.75rem;
335
+ padding: 0.75rem 3rem 0.75rem 1rem;
336
+ font-weight: 700;
337
+ font-size: 1.125rem;
338
+ outline: none;
339
+ transition: border-color 0.2s;
340
+ box-sizing: border-box;
341
+ }
342
+ :global(.theme-dark) .weight-input {
343
+ background: rgba(0,0,0,0.2);
344
+ border-color: #334155;
345
+ color: #f1f5f9;
346
+ }
347
+ .weight-input:focus { border-color: #6366f1; }
348
+ .weight-unit {
349
+ position: absolute;
350
+ right: 1rem;
351
+ top: 50%;
352
+ transform: translateY(-50%);
353
+ color: #94a3b8;
354
+ font-weight: 700;
355
+ font-size: 0.75rem;
356
+ text-transform: uppercase;
357
+ }
358
+
359
+ .drink-btns {
360
+ display: grid;
361
+ grid-template-columns: repeat(4, 1fr);
362
+ gap: 0.75rem;
363
+ margin-top: 0.75rem;
364
+ }
365
+ .drink-add-btn {
366
+ display: flex;
367
+ flex-direction: column;
368
+ align-items: center;
369
+ gap: 0.5rem;
370
+ padding: 1rem;
371
+ border-radius: 0.75rem;
372
+ border: none;
373
+ cursor: pointer;
374
+ background: #f1f5f9;
375
+ color: #475569;
376
+ transition: all 0.15s;
377
+ }
378
+ :global(.theme-dark) .drink-add-btn {
379
+ background: #1e293b;
380
+ color: #94a3b8;
381
+ }
382
+ .drink-add-btn:hover {
383
+ background: #e0e7ff;
384
+ color: #6366f1;
385
+ transform: scale(1.05);
386
+ }
387
+ .drink-add-btn:active { transform: scale(0.95); }
388
+ .drink-icon {
389
+ width: 2rem;
390
+ height: 2rem;
391
+ }
392
+
393
+ .list-header {
394
+ display: flex;
395
+ justify-content: space-between;
396
+ align-items: center;
397
+ margin-bottom: 0.75rem;
398
+ }
399
+ .items-count {
400
+ font-size: 0.75rem;
401
+ font-weight: 900;
402
+ color: #6366f1;
403
+ text-transform: uppercase;
404
+ }
405
+
406
+ .drinks-list {
407
+ max-height: 250px;
408
+ overflow-y: auto;
409
+ display: flex;
410
+ flex-direction: column;
411
+ gap: 0.5rem;
412
+ padding-right: 0.5rem;
413
+ }
414
+ .list-empty {
415
+ text-align: center;
416
+ padding: 2rem 0;
417
+ color: #cbd5e1;
418
+ display: flex;
419
+ flex-direction: column;
420
+ align-items: center;
421
+ gap: 0.75rem;
422
+ }
423
+ :global(.theme-dark) .list-empty { color: #334155; }
424
+ .list-empty-icon {
425
+ width: 2.5rem;
426
+ height: 2.5rem;
427
+ opacity: 0.2;
428
+ }
429
+ .list-empty-text {
430
+ font-size: 0.875rem;
431
+ font-weight: 500;
432
+ }
433
+
434
+ .custom-scroll::-webkit-scrollbar { width: 4px; }
435
+ .custom-scroll::-webkit-scrollbar-track { background: transparent; }
436
+ .custom-scroll::-webkit-scrollbar-thumb {
437
+ background: #e2e8f0;
438
+ border-radius: 10px;
439
+ }
440
+
441
+ :global(.drink-list-row) {
442
+ display: flex;
443
+ align-items: center;
444
+ justify-content: space-between;
445
+ padding: 0.75rem;
446
+ background: #f8fafc;
447
+ border-radius: 0.75rem;
448
+ border: 1px solid #e2e8f0;
449
+ }
450
+ :global(.theme-dark) :global(.drink-list-row) {
451
+ background: #1e293b;
452
+ border-color: #334155;
453
+ }
454
+
455
+ :global(.drink-row-info) {
456
+ display: flex;
457
+ align-items: center;
458
+ gap: 0.75rem;
459
+ }
460
+
461
+ :global(.drink-row-name) {
462
+ font-weight: 700;
463
+ color: #334155;
464
+ }
465
+ :global(.theme-dark) :global(.drink-row-name) {
466
+ color: #e2e8f0;
467
+ }
468
+
469
+ :global(.drink-row-qty) {
470
+ font-size: 0.75rem;
471
+ background: #e0e7ff;
472
+ color: #4f46e5;
473
+ padding: 0.125rem 0.5rem;
474
+ border-radius: 0.25rem;
475
+ font-weight: 700;
476
+ }
477
+ :global(.theme-dark) :global(.drink-row-qty) {
478
+ background: #312e81;
479
+ color: #a5b4fc;
480
+ }
481
+
482
+ :global(.drink-row-del) {
483
+ display: flex;
484
+ align-items: center;
485
+ justify-content: center;
486
+ width: 2rem;
487
+ height: 2rem;
488
+ padding: 0;
489
+ background: none;
490
+ border: none;
491
+ color: #ef4444;
492
+ cursor: pointer;
493
+ transition: background 0.2s;
494
+ }
495
+ :global(.drink-row-del:hover) {
496
+ background: #fef2f2;
497
+ border-radius: 0.5rem;
498
+ }
499
+ :global(.theme-dark) :global(.drink-row-del:hover) {
500
+ background: rgba(239,68,68,0.1);
501
+ }
502
+
503
+ .alc-results-panel {
504
+ display: flex;
505
+ flex-direction: column;
506
+ background: #f8fafc;
507
+ }
508
+ :global(.theme-dark) .alc-results-panel { background: rgba(0,0,0,0.2); }
509
+
510
+ .bac-section {
511
+ background: #4f46e5;
512
+ color: #fff;
513
+ padding: 1.5rem;
514
+ position: relative;
515
+ overflow: hidden;
516
+ flex-shrink: 0;
517
+ }
518
+ :global(.theme-dark) .bac-section { background: #4338ca; }
519
+ .bac-bg-icon {
520
+ position: absolute;
521
+ top: 0;
522
+ right: 0;
523
+ padding: 1.5rem;
524
+ opacity: 0.1;
525
+ }
526
+ .bac-bg-icon-svg {
527
+ width: 5rem;
528
+ height: 5rem;
529
+ transform: rotate(12deg);
530
+ }
531
+ .bac-content {
532
+ position: relative;
533
+ z-index: 1;
534
+ display: flex;
535
+ flex-direction: column;
536
+ gap: 1rem;
537
+ }
538
+ .bac-label {
539
+ font-size: 0.75rem;
540
+ font-weight: 700;
541
+ text-transform: uppercase;
542
+ letter-spacing: 0.2em;
543
+ opacity: 0.6;
544
+ }
545
+ .bac-value-row {
546
+ display: flex;
547
+ align-items: baseline;
548
+ gap: 0.5rem;
549
+ }
550
+ .bac-number {
551
+ font-size: 3.5rem;
552
+ font-weight: 900;
553
+ letter-spacing: -0.05em;
554
+ line-height: 1;
555
+ font-variant-numeric: tabular-nums;
556
+ }
557
+ .bac-unit {
558
+ font-size: 1rem;
559
+ font-weight: 700;
560
+ opacity: 0.6;
561
+ }
562
+
563
+ .time-box {
564
+ display: flex;
565
+ align-items: center;
566
+ gap: 0.75rem;
567
+ background: rgba(255,255,255,0.1);
568
+ border-radius: 0.75rem;
569
+ padding: 0.75rem;
570
+ border: 1px solid rgba(255,255,255,0.1);
571
+ }
572
+ .time-icon {
573
+ width: 1.25rem;
574
+ height: 1.25rem;
575
+ flex-shrink: 0;
576
+ }
577
+ .time-text {
578
+ font-weight: 700;
579
+ font-size: 0.875rem;
580
+ }
581
+
582
+ .alc-advice-sec {
583
+ display: flex;
584
+ flex-direction: column;
585
+ gap: 1rem;
586
+ }
587
+ .advice-row {
588
+ display: flex;
589
+ align-items: center;
590
+ gap: 1rem;
591
+ }
592
+ .advice-icon {
593
+ width: 2.25rem;
594
+ height: 2.25rem;
595
+ border-radius: 0.6rem;
596
+ display: flex;
597
+ align-items: center;
598
+ justify-content: center;
599
+ flex-shrink: 0;
600
+ }
601
+ .advice-icon-blue {
602
+ background: #dbeafe;
603
+ color: #3b82f6;
604
+ }
605
+ :global(.theme-dark) .advice-icon-blue { background: rgba(59,130,246,0.2); }
606
+ .advice-icon-amber {
607
+ background: #fef3c7;
608
+ color: #f59e0b;
609
+ }
610
+ :global(.theme-dark) .advice-icon-amber { background: rgba(245,158,11,0.2); }
611
+ .advice-icon-svg {
612
+ width: 1.25rem;
613
+ height: 1.25rem;
614
+ }
615
+ .advice-label {
616
+ font-size: 0.75rem;
617
+ font-weight: 700;
618
+ color: #94a3b8;
619
+ text-transform: uppercase;
620
+ margin: 0 0 0.2rem;
621
+ }
622
+ .advice-value {
623
+ font-size: 1.125rem;
624
+ font-weight: 900;
625
+ margin: 0;
626
+ }
627
+ .advice-value-sm { font-size: 0.875rem; }
628
+
629
+ .alc-disclaimer-sec { margin-top: auto; }
630
+ .disclaimer {
631
+ background: #fffbeb;
632
+ border-radius: 0.75rem;
633
+ padding: 0.875rem;
634
+ display: flex;
635
+ gap: 0.75rem;
636
+ color: #92400e;
637
+ font-size: 0.75rem;
638
+ line-height: 1.6;
639
+ border: 1px solid #fde68a;
640
+ }
641
+ :global(.theme-dark) .disclaimer {
642
+ background: rgba(120,53,15,0.2);
643
+ border-color: rgba(120,53,15,0.5);
644
+ color: #f59e0b;
645
+ }
646
+ .disclaimer-icon {
647
+ width: 1.5rem;
648
+ height: 1.5rem;
649
+ flex-shrink: 0;
650
+ }
651
+ .disclaimer-text { margin: 0; }
652
+ </style>