@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 +1 -1
- package/src/tool/alcoholClearance/component.astro +372 -1
- package/src/tool/beerCooler/component.astro +384 -1
- package/src/tool/carbonationCalculator/component.astro +486 -1
- package/src/tool/cocktailBalancer/component.astro +1221 -1
- package/src/tool/partyKeg/component.astro +663 -1
- package/src/tool/alcoholClearance/component.css +0 -369
- package/src/tool/beerCooler/component.css +0 -381
- package/src/tool/carbonationCalculator/component.css +0 -483
- package/src/tool/cocktailBalancer/component.css +0 -1218
- package/src/tool/partyKeg/component.css +0 -660
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
import { Icon } from "astro-icon/components";
|
|
3
3
|
import type { BeerCoolerUI } from "./index";
|
|
4
|
-
import './component.css';
|
|
5
4
|
|
|
6
5
|
interface Props {
|
|
7
6
|
ui: BeerCoolerUI;
|
|
@@ -234,3 +233,387 @@ const { ui } = Astro.props;
|
|
|
234
233
|
}
|
|
235
234
|
new BeerApp();
|
|
236
235
|
</script>
|
|
236
|
+
|
|
237
|
+
<style>
|
|
238
|
+
.beer-app {
|
|
239
|
+
width: 100%;
|
|
240
|
+
max-width: 72rem;
|
|
241
|
+
margin: 0 auto;
|
|
242
|
+
padding: 0.5rem;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.beer-card {
|
|
246
|
+
background: #fff;
|
|
247
|
+
border: 1px solid #e2e8f0;
|
|
248
|
+
border-radius: 1.25rem;
|
|
249
|
+
overflow: clip;
|
|
250
|
+
box-shadow: 0 4px 20px rgba(0,0,0,0.06);
|
|
251
|
+
color: #1e293b;
|
|
252
|
+
}
|
|
253
|
+
:global(.theme-dark) .beer-card {
|
|
254
|
+
background: #0f172a;
|
|
255
|
+
border-color: #1e293b;
|
|
256
|
+
color: #f1f5f9;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.beer-grid { display: grid; }
|
|
260
|
+
|
|
261
|
+
@media (min-width: 1024px) {
|
|
262
|
+
.beer-grid {
|
|
263
|
+
grid-template-columns: 1fr 1fr;
|
|
264
|
+
align-items: stretch;
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.beer-steps-panel {
|
|
269
|
+
display: flex;
|
|
270
|
+
flex-direction: column;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.beer-sec {
|
|
274
|
+
padding: 1.25rem 1.5rem;
|
|
275
|
+
border-bottom: 1px solid #e2e8f0;
|
|
276
|
+
}
|
|
277
|
+
:global(.theme-dark) .beer-sec { border-color: #1e293b; }
|
|
278
|
+
.beer-sec:last-child { border-bottom: none; }
|
|
279
|
+
|
|
280
|
+
.step-header {
|
|
281
|
+
font-size: 1rem;
|
|
282
|
+
font-weight: 700;
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
gap: 0.75rem;
|
|
286
|
+
margin: 0 0 1rem;
|
|
287
|
+
color: #1e293b;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
:global(.theme-dark) .step-header { color: #f1f5f9; }
|
|
291
|
+
.step-number {
|
|
292
|
+
width: 1.75rem;
|
|
293
|
+
height: 1.75rem;
|
|
294
|
+
border-radius: 50%;
|
|
295
|
+
background: #0f172a;
|
|
296
|
+
color: #fff;
|
|
297
|
+
display: flex;
|
|
298
|
+
align-items: center;
|
|
299
|
+
justify-content: center;
|
|
300
|
+
font-size: 0.75rem;
|
|
301
|
+
flex-shrink: 0;
|
|
302
|
+
}
|
|
303
|
+
:global(.theme-dark) .step-number {
|
|
304
|
+
background: #fff;
|
|
305
|
+
color: #0f172a;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.selector-grid {
|
|
309
|
+
display: grid;
|
|
310
|
+
grid-template-columns: 1fr 1fr;
|
|
311
|
+
gap: 0.75rem;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.selector-card {
|
|
315
|
+
width: 100%;
|
|
316
|
+
text-align: left;
|
|
317
|
+
padding: 1rem;
|
|
318
|
+
border-radius: 0.75rem;
|
|
319
|
+
border: 2px solid #e2e8f0;
|
|
320
|
+
transition: border-color 0.2s;
|
|
321
|
+
position: relative;
|
|
322
|
+
overflow: hidden;
|
|
323
|
+
background: #f8fafc;
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
}
|
|
326
|
+
:global(.theme-dark) .selector-card {
|
|
327
|
+
border-color: #1e293b;
|
|
328
|
+
background: #0c1527;
|
|
329
|
+
}
|
|
330
|
+
.selector-card:hover { border-color: #cbd5e1; }
|
|
331
|
+
:global(.theme-dark) .selector-card:hover { border-color: #334155; }
|
|
332
|
+
|
|
333
|
+
.selector-content {
|
|
334
|
+
position: relative;
|
|
335
|
+
z-index: 1;
|
|
336
|
+
display: flex;
|
|
337
|
+
flex-direction: column;
|
|
338
|
+
align-items: center;
|
|
339
|
+
gap: 0.5rem;
|
|
340
|
+
}
|
|
341
|
+
.icon-el {
|
|
342
|
+
width: 2rem;
|
|
343
|
+
height: 2rem;
|
|
344
|
+
color: #94a3b8;
|
|
345
|
+
transition: color 0.2s;
|
|
346
|
+
}
|
|
347
|
+
.selector-card:hover .icon-el { color: #f59e0b; }
|
|
348
|
+
.selector-card[data-value="bottle"]:hover .icon-el { color: #10b981; }
|
|
349
|
+
.selector-card[data-value="fridge"]:hover .icon-el { color: #06b6d4; }
|
|
350
|
+
.selector-card[data-value="freezer"]:hover .icon-el { color: #3b82f6; }
|
|
351
|
+
|
|
352
|
+
.selector-label {
|
|
353
|
+
font-weight: 700;
|
|
354
|
+
font-size: 1rem;
|
|
355
|
+
color: #1e293b;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
:global(.theme-dark) .selector-label { color: #f1f5f9; }
|
|
359
|
+
|
|
360
|
+
.selector-sub {
|
|
361
|
+
font-size: 0.7rem;
|
|
362
|
+
color: #64748b;
|
|
363
|
+
font-weight: 500;
|
|
364
|
+
text-transform: uppercase;
|
|
365
|
+
letter-spacing: 0.05em;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
:global(.theme-dark) .selector-sub { color: #94a3b8; }
|
|
369
|
+
|
|
370
|
+
.bg-el {
|
|
371
|
+
position: absolute;
|
|
372
|
+
inset: 0;
|
|
373
|
+
opacity: 0;
|
|
374
|
+
transition: opacity 0.2s;
|
|
375
|
+
background: rgba(245,158,11,0.08);
|
|
376
|
+
}
|
|
377
|
+
.selector-card[data-value="bottle"] .bg-el { background: rgba(16,185,129,0.08); }
|
|
378
|
+
.selector-card[data-value="fridge"] .bg-el { background: rgba(6,182,212,0.08); }
|
|
379
|
+
.selector-card[data-value="freezer"] .bg-el { background: rgba(59,130,246,0.08); }
|
|
380
|
+
|
|
381
|
+
.selector-card.selected[data-value="can"] { border-color: #f59e0b; }
|
|
382
|
+
.selector-card.selected[data-value="bottle"] { border-color: #10b981; }
|
|
383
|
+
.selector-card.selected[data-value="fridge"] { border-color: #06b6d4; }
|
|
384
|
+
.selector-card.selected[data-value="freezer"] { border-color: #3b82f6; }
|
|
385
|
+
.selector-card.selected .bg-el { opacity: 1; }
|
|
386
|
+
|
|
387
|
+
.slider-row { margin-bottom: 1.25rem; }
|
|
388
|
+
.slider-row-last { margin-bottom: 0; }
|
|
389
|
+
.slider-label-row {
|
|
390
|
+
display: flex;
|
|
391
|
+
justify-content: space-between;
|
|
392
|
+
align-items: center;
|
|
393
|
+
margin-bottom: 0.75rem;
|
|
394
|
+
}
|
|
395
|
+
.slider-label {
|
|
396
|
+
font-size: 0.75rem;
|
|
397
|
+
font-weight: 700;
|
|
398
|
+
color: #64748b;
|
|
399
|
+
text-transform: uppercase;
|
|
400
|
+
letter-spacing: 0.1em;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
:global(.theme-dark) .slider-label { color: #94a3b8; }
|
|
404
|
+
|
|
405
|
+
.temp-display {
|
|
406
|
+
font-size: 1rem;
|
|
407
|
+
font-weight: 700;
|
|
408
|
+
background: #f1f5f9;
|
|
409
|
+
color: #1e293b;
|
|
410
|
+
padding: 0.2rem 0.6rem;
|
|
411
|
+
border-radius: 0.4rem;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
:global(.theme-dark) .temp-display {
|
|
415
|
+
background: #1e293b;
|
|
416
|
+
color: #f1f5f9;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.slider-custom {
|
|
420
|
+
width: 100%;
|
|
421
|
+
height: 0.5rem;
|
|
422
|
+
border-radius: 0.5rem;
|
|
423
|
+
appearance: none;
|
|
424
|
+
cursor: pointer;
|
|
425
|
+
background: #e2e8f0;
|
|
426
|
+
}
|
|
427
|
+
:global(.theme-dark) .slider-custom { background: #334155; }
|
|
428
|
+
.slider-dark { accent-color: #0f172a; }
|
|
429
|
+
:global(.theme-dark) .slider-dark { accent-color: #fff; }
|
|
430
|
+
.slider-blue { accent-color: #3b82f6; }
|
|
431
|
+
.slider-custom::-webkit-slider-thumb {
|
|
432
|
+
-webkit-appearance: none;
|
|
433
|
+
height: 20px;
|
|
434
|
+
width: 20px;
|
|
435
|
+
border-radius: 50%;
|
|
436
|
+
background: currentcolor;
|
|
437
|
+
cursor: pointer;
|
|
438
|
+
margin-top: -6px;
|
|
439
|
+
}
|
|
440
|
+
.slider-custom::-webkit-slider-runnable-track {
|
|
441
|
+
width: 100%;
|
|
442
|
+
height: 8px;
|
|
443
|
+
background: transparent;
|
|
444
|
+
border-radius: 4px;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
.beer-result-panel {
|
|
448
|
+
background: linear-gradient(to bottom right, #eff6ff, #eef2ff);
|
|
449
|
+
color: #1e293b;
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: stretch;
|
|
452
|
+
min-height: 380px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
@media (min-width: 1024px) { .beer-result-panel { border-left: 1px solid #e2e8f0; } }
|
|
456
|
+
|
|
457
|
+
:global(.theme-dark) .beer-result-panel {
|
|
458
|
+
background: linear-gradient(to bottom right, #1e293b, #020617);
|
|
459
|
+
color: #fff;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
@media (min-width: 1024px) { :global(.theme-dark) .beer-result-panel { border-left-color: #334155; } }
|
|
463
|
+
|
|
464
|
+
.result-inner {
|
|
465
|
+
width: 100%;
|
|
466
|
+
display: flex;
|
|
467
|
+
flex-direction: column;
|
|
468
|
+
align-items: center;
|
|
469
|
+
justify-content: center;
|
|
470
|
+
text-align: center;
|
|
471
|
+
padding: 2rem;
|
|
472
|
+
position: relative;
|
|
473
|
+
z-index: 1;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.empty-state {
|
|
477
|
+
display: flex;
|
|
478
|
+
flex-direction: column;
|
|
479
|
+
align-items: center;
|
|
480
|
+
gap: 1.5rem;
|
|
481
|
+
}
|
|
482
|
+
.empty-icon {
|
|
483
|
+
width: 4rem;
|
|
484
|
+
height: 4rem;
|
|
485
|
+
border-radius: 50%;
|
|
486
|
+
background: #e0e7ff;
|
|
487
|
+
display: flex;
|
|
488
|
+
align-items: center;
|
|
489
|
+
justify-content: center;
|
|
490
|
+
color: #6366f1;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
:global(.theme-dark) .empty-icon {
|
|
494
|
+
background: #1e293b;
|
|
495
|
+
color: #475569;
|
|
496
|
+
}
|
|
497
|
+
.empty-icon-svg {
|
|
498
|
+
width: 2rem;
|
|
499
|
+
height: 2rem;
|
|
500
|
+
}
|
|
501
|
+
.empty-title {
|
|
502
|
+
font-size: 1.25rem;
|
|
503
|
+
font-weight: 700;
|
|
504
|
+
color: #475569;
|
|
505
|
+
margin: 0;
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
:global(.theme-dark) .empty-title { color: #64748b; }
|
|
509
|
+
|
|
510
|
+
.empty-desc {
|
|
511
|
+
color: #94a3b8;
|
|
512
|
+
margin: 0;
|
|
513
|
+
font-size: 0.875rem;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
:global(.theme-dark) .empty-desc { color: #475569; }
|
|
517
|
+
|
|
518
|
+
.result-content {
|
|
519
|
+
flex-direction: column;
|
|
520
|
+
align-items: center;
|
|
521
|
+
width: 100%;
|
|
522
|
+
position: relative;
|
|
523
|
+
z-index: 1;
|
|
524
|
+
}
|
|
525
|
+
.result-time-wrap {
|
|
526
|
+
position: relative;
|
|
527
|
+
margin-bottom: 1.5rem;
|
|
528
|
+
}
|
|
529
|
+
.result-glow {
|
|
530
|
+
position: absolute;
|
|
531
|
+
inset: -2rem;
|
|
532
|
+
background: rgba(59,130,246,0.2);
|
|
533
|
+
border-radius: 50%;
|
|
534
|
+
filter: blur(2rem);
|
|
535
|
+
}
|
|
536
|
+
.result-time-num {
|
|
537
|
+
position: relative;
|
|
538
|
+
font-size: 5rem;
|
|
539
|
+
font-weight: 900;
|
|
540
|
+
color: #1e293b;
|
|
541
|
+
letter-spacing: -0.05em;
|
|
542
|
+
line-height: 1;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
:global(.theme-dark) .result-time-num { color: #fff; }
|
|
546
|
+
|
|
547
|
+
.result-time-unit {
|
|
548
|
+
position: absolute;
|
|
549
|
+
right: -1.5rem;
|
|
550
|
+
bottom: 0.75rem;
|
|
551
|
+
font-size: 1.25rem;
|
|
552
|
+
font-weight: 700;
|
|
553
|
+
color: #94a3b8;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
.result-labels { margin-bottom: 2rem; }
|
|
557
|
+
.result-est-label {
|
|
558
|
+
font-size: 0.75rem;
|
|
559
|
+
font-weight: 700;
|
|
560
|
+
text-transform: uppercase;
|
|
561
|
+
letter-spacing: 0.2em;
|
|
562
|
+
color: #6366f1;
|
|
563
|
+
margin: 0 0 0.5rem;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
:global(.theme-dark) .result-est-label { color: #60a5fa; }
|
|
567
|
+
|
|
568
|
+
.result-finish-time {
|
|
569
|
+
font-size: 1.5rem;
|
|
570
|
+
font-weight: 700;
|
|
571
|
+
color: #1e293b;
|
|
572
|
+
margin: 0;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
:global(.theme-dark) .result-finish-time { color: #fff; }
|
|
576
|
+
|
|
577
|
+
.result-meta-grid {
|
|
578
|
+
display: grid;
|
|
579
|
+
grid-template-columns: 1fr 1fr;
|
|
580
|
+
gap: 0.75rem;
|
|
581
|
+
width: 100%;
|
|
582
|
+
text-align: left;
|
|
583
|
+
}
|
|
584
|
+
.result-meta-item {
|
|
585
|
+
background: rgba(255,255,255,0.7);
|
|
586
|
+
padding: 0.75rem;
|
|
587
|
+
border-radius: 0.5rem;
|
|
588
|
+
border: 1px solid #e2e8f0;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
:global(.theme-dark) .result-meta-item {
|
|
592
|
+
background: rgba(30,41,59,0.5);
|
|
593
|
+
border-color: #334155;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.result-meta-label {
|
|
597
|
+
font-size: 0.7rem;
|
|
598
|
+
color: #94a3b8;
|
|
599
|
+
text-transform: uppercase;
|
|
600
|
+
font-weight: 700;
|
|
601
|
+
margin-bottom: 0.25rem;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
.result-meta-value {
|
|
605
|
+
color: #1e293b;
|
|
606
|
+
font-weight: 700;
|
|
607
|
+
font-size: 0.875rem;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
:global(.theme-dark) .result-meta-value { color: #fff; }
|
|
611
|
+
|
|
612
|
+
.bubbles-layer {
|
|
613
|
+
position: absolute;
|
|
614
|
+
inset: 0;
|
|
615
|
+
overflow: hidden;
|
|
616
|
+
pointer-events: none;
|
|
617
|
+
z-index: 0;
|
|
618
|
+
}
|
|
619
|
+
</style>
|