@jjlmoya/utils-alcohol 1.11.0 → 1.12.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.12.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,375 @@ 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
+ .alc-results-panel {
442
+ display: flex;
443
+ flex-direction: column;
444
+ background: #f8fafc;
445
+ }
446
+ :global(.theme-dark) .alc-results-panel { background: rgba(0,0,0,0.2); }
447
+
448
+ .bac-section {
449
+ background: #4f46e5;
450
+ color: #fff;
451
+ padding: 1.5rem;
452
+ position: relative;
453
+ overflow: hidden;
454
+ flex-shrink: 0;
455
+ }
456
+ :global(.theme-dark) .bac-section { background: #4338ca; }
457
+ .bac-bg-icon {
458
+ position: absolute;
459
+ top: 0;
460
+ right: 0;
461
+ padding: 1.5rem;
462
+ opacity: 0.1;
463
+ }
464
+ .bac-bg-icon-svg {
465
+ width: 5rem;
466
+ height: 5rem;
467
+ transform: rotate(12deg);
468
+ }
469
+ .bac-content {
470
+ position: relative;
471
+ z-index: 1;
472
+ display: flex;
473
+ flex-direction: column;
474
+ gap: 1rem;
475
+ }
476
+ .bac-label {
477
+ font-size: 0.75rem;
478
+ font-weight: 700;
479
+ text-transform: uppercase;
480
+ letter-spacing: 0.2em;
481
+ opacity: 0.6;
482
+ }
483
+ .bac-value-row {
484
+ display: flex;
485
+ align-items: baseline;
486
+ gap: 0.5rem;
487
+ }
488
+ .bac-number {
489
+ font-size: 3.5rem;
490
+ font-weight: 900;
491
+ letter-spacing: -0.05em;
492
+ line-height: 1;
493
+ font-variant-numeric: tabular-nums;
494
+ }
495
+ .bac-unit {
496
+ font-size: 1rem;
497
+ font-weight: 700;
498
+ opacity: 0.6;
499
+ }
500
+
501
+ .time-box {
502
+ display: flex;
503
+ align-items: center;
504
+ gap: 0.75rem;
505
+ background: rgba(255,255,255,0.1);
506
+ border-radius: 0.75rem;
507
+ padding: 0.75rem;
508
+ border: 1px solid rgba(255,255,255,0.1);
509
+ }
510
+ .time-icon {
511
+ width: 1.25rem;
512
+ height: 1.25rem;
513
+ flex-shrink: 0;
514
+ }
515
+ .time-text {
516
+ font-weight: 700;
517
+ font-size: 0.875rem;
518
+ }
519
+
520
+ .alc-advice-sec {
521
+ display: flex;
522
+ flex-direction: column;
523
+ gap: 1rem;
524
+ }
525
+ .advice-row {
526
+ display: flex;
527
+ align-items: center;
528
+ gap: 1rem;
529
+ }
530
+ .advice-icon {
531
+ width: 2.25rem;
532
+ height: 2.25rem;
533
+ border-radius: 0.6rem;
534
+ display: flex;
535
+ align-items: center;
536
+ justify-content: center;
537
+ flex-shrink: 0;
538
+ }
539
+ .advice-icon-blue {
540
+ background: #dbeafe;
541
+ color: #3b82f6;
542
+ }
543
+ :global(.theme-dark) .advice-icon-blue { background: rgba(59,130,246,0.2); }
544
+ .advice-icon-amber {
545
+ background: #fef3c7;
546
+ color: #f59e0b;
547
+ }
548
+ :global(.theme-dark) .advice-icon-amber { background: rgba(245,158,11,0.2); }
549
+ .advice-icon-svg {
550
+ width: 1.25rem;
551
+ height: 1.25rem;
552
+ }
553
+ .advice-label {
554
+ font-size: 0.75rem;
555
+ font-weight: 700;
556
+ color: #94a3b8;
557
+ text-transform: uppercase;
558
+ margin: 0 0 0.2rem;
559
+ }
560
+ .advice-value {
561
+ font-size: 1.125rem;
562
+ font-weight: 900;
563
+ margin: 0;
564
+ }
565
+ .advice-value-sm { font-size: 0.875rem; }
566
+
567
+ .alc-disclaimer-sec { margin-top: auto; }
568
+ .disclaimer {
569
+ background: #fffbeb;
570
+ border-radius: 0.75rem;
571
+ padding: 0.875rem;
572
+ display: flex;
573
+ gap: 0.75rem;
574
+ color: #92400e;
575
+ font-size: 0.75rem;
576
+ line-height: 1.6;
577
+ border: 1px solid #fde68a;
578
+ }
579
+ :global(.theme-dark) .disclaimer {
580
+ background: rgba(120,53,15,0.2);
581
+ border-color: rgba(120,53,15,0.5);
582
+ color: #f59e0b;
583
+ }
584
+ .disclaimer-icon {
585
+ width: 1.5rem;
586
+ height: 1.5rem;
587
+ flex-shrink: 0;
588
+ }
589
+ .disclaimer-text { margin: 0; }
590
+ </style>