@jjlmoya/utils-cooking 1.8.0 → 1.10.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,6 +1,5 @@
1
1
  ---
2
2
  import { Icon } from 'astro-icon/components';
3
- import './SourdoughCalculator.css';
4
3
 
5
4
  interface Props {
6
5
  ui: Record<string, string>;
@@ -196,3 +195,375 @@ const { ui } = Astro.props;
196
195
  init();
197
196
  }
198
197
  </script>
198
+
199
+ <style>
200
+ :root {
201
+ --sc-primary: hsl(38deg, 92%, 50%);
202
+ --sc-primary-light: hsl(38deg, 92%, 90%);
203
+ --sc-success: hsl(142deg, 72%, 45%);
204
+ --sc-bg-card: hsl(0deg, 0%, 100%);
205
+ --sc-bg-app: hsl(210deg, 20%, 98%);
206
+ --sc-border: hsl(210deg, 20%, 90%);
207
+ --sc-text-main: hsl(210deg, 30%, 20%);
208
+ --sc-text-muted: hsl(210deg, 15%, 50%);
209
+ --sc-text-disabled: hsl(210deg, 15%, 75%);
210
+ --sc-shadow-md: 0 4px 6px -1px rgb(0, 0, 0, 0.1);
211
+ --sc-shadow-lg: 0 10px 15px -3px rgb(0, 0, 0, 0.1);
212
+ --sc-radius: 1rem;
213
+ --sc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
214
+ }
215
+
216
+ :global(.theme-dark) {
217
+ --sc-bg-card: hsl(220deg, 25%, 12%);
218
+ --sc-bg-app: hsl(220deg, 30%, 7%);
219
+ --sc-border: hsl(220deg, 20%, 20%);
220
+ --sc-text-main: hsl(210deg, 20%, 95%);
221
+ --sc-text-muted: hsl(210deg, 15%, 70%);
222
+ --sc-text-disabled: hsl(210deg, 15%, 50%);
223
+ --sc-primary-light: hsl(38deg, 92%, 12%);
224
+ }
225
+
226
+ .sourdough-calculator {
227
+ width: 100%;
228
+ max-width: 100%;
229
+ padding: 2rem;
230
+ background: var(--sc-bg-card);
231
+ border: 1px solid var(--sc-border);
232
+ border-radius: var(--sc-radius);
233
+ box-shadow: var(--sc-shadow-lg);
234
+ }
235
+
236
+ .sc-header {
237
+ width: 100%;
238
+ height: 0.5rem;
239
+ background: var(--sc-primary);
240
+ border-radius: var(--sc-radius) var(--sc-radius) 0 0;
241
+ margin: -2rem -2rem 2rem;
242
+ }
243
+
244
+ .sc-grid {
245
+ display: grid;
246
+ grid-template-columns: 1fr;
247
+ gap: 3rem;
248
+ }
249
+
250
+ @media (min-width: 1024px) {
251
+ .sc-grid {
252
+ grid-template-columns: 2fr 3fr;
253
+ }
254
+
255
+ .sc-grid > * {
256
+ min-width: 0;
257
+ }
258
+ }
259
+
260
+ .sc-section {
261
+ display: flex;
262
+ flex-direction: column;
263
+ gap: 2.5rem;
264
+ }
265
+
266
+ .sc-control-group {
267
+ display: flex;
268
+ flex-direction: column;
269
+ gap: 1rem;
270
+ }
271
+
272
+ .sc-label {
273
+ font-size: 0.875rem;
274
+ font-weight: 700;
275
+ color: var(--sc-text-muted);
276
+ text-transform: uppercase;
277
+ letter-spacing: 0.05em;
278
+ display: flex;
279
+ align-items: center;
280
+ gap: 0.5rem;
281
+ }
282
+
283
+ .sc-input {
284
+ width: 100%;
285
+ padding: 1rem;
286
+ border: 2px solid var(--sc-border);
287
+ border-radius: 0.75rem;
288
+ background: var(--sc-bg-app);
289
+ color: var(--sc-text-main);
290
+ font-weight: 600;
291
+ font-size: 2rem;
292
+ text-align: center;
293
+ transition: var(--sc-transition);
294
+ }
295
+
296
+ .sc-input:focus {
297
+ outline: none;
298
+ border-color: var(--sc-primary);
299
+ box-shadow: 0 0 0 3px hsl(38deg, 92%, 50%, 0.1);
300
+ }
301
+
302
+ .sc-input::placeholder {
303
+ color: var(--sc-text-disabled);
304
+ }
305
+
306
+ input[type='number']::-webkit-outer-spin-button,
307
+ input[type='number']::-webkit-inner-spin-button {
308
+ -webkit-appearance: none;
309
+ margin: 0;
310
+ }
311
+
312
+ .sc-ratio-buttons {
313
+ display: grid;
314
+ grid-template-columns: repeat(3, 1fr);
315
+ gap: 0.75rem;
316
+ }
317
+
318
+ .ratio-btn {
319
+ display: flex;
320
+ flex-direction: column;
321
+ align-items: center;
322
+ justify-content: center;
323
+ padding: 0.75rem 0.5rem;
324
+ border-radius: 0.75rem;
325
+ border: 2px solid var(--sc-border);
326
+ background: var(--sc-bg-app);
327
+ color: var(--sc-text-muted);
328
+ font-weight: 600;
329
+ cursor: pointer;
330
+ transition: var(--sc-transition);
331
+ }
332
+
333
+ .ratio-btn:hover {
334
+ border-color: var(--sc-primary);
335
+ color: var(--sc-primary);
336
+ }
337
+
338
+ .ratio-btn.ratio-active {
339
+ background: var(--sc-primary-light);
340
+ border-color: var(--sc-primary);
341
+ color: var(--sc-primary);
342
+ box-shadow: var(--sc-shadow-md);
343
+ }
344
+
345
+ .ratio-btn.ratio-inactive {
346
+ background: var(--sc-bg-app);
347
+ border-color: var(--sc-border);
348
+ color: var(--sc-text-muted);
349
+ }
350
+
351
+ .sc-ratio-label {
352
+ font-size: 0.625rem;
353
+ text-transform: uppercase;
354
+ opacity: 0.75;
355
+ margin-bottom: 0.25rem;
356
+ }
357
+
358
+ .sc-ratio-value {
359
+ font-size: 1.125rem;
360
+ font-weight: 700;
361
+ }
362
+
363
+ .sc-custom-inputs {
364
+ display: none;
365
+ gap: 1.5rem;
366
+ padding: 1.5rem;
367
+ background: var(--sc-bg-app);
368
+ border-radius: 0.75rem;
369
+ border: 1px solid var(--sc-border);
370
+ }
371
+
372
+ .sc-custom-inputs.visible {
373
+ display: flex;
374
+ justify-content: space-around;
375
+ align-items: flex-end;
376
+ }
377
+
378
+ .sc-custom-input-group {
379
+ display: flex;
380
+ flex-direction: column;
381
+ align-items: center;
382
+ gap: 0.5rem;
383
+ }
384
+
385
+ .custom-input {
386
+ padding: 0.75rem;
387
+ border: 1px solid var(--sc-border);
388
+ border-radius: 0.5rem;
389
+ background: var(--sc-bg-card);
390
+ color: var(--sc-text-main);
391
+ width: 80px;
392
+ text-align: center;
393
+ font-weight: 600;
394
+ font-size: 1rem;
395
+ transition: var(--sc-transition);
396
+ }
397
+
398
+ .custom-input:focus {
399
+ outline: none;
400
+ border-color: var(--sc-primary);
401
+ }
402
+
403
+ .sc-custom-label {
404
+ font-size: 0.625rem;
405
+ text-transform: uppercase;
406
+ font-weight: 700;
407
+ color: var(--sc-text-muted);
408
+ margin-bottom: 0.25rem;
409
+ display: block;
410
+ text-align: center;
411
+ }
412
+
413
+ .sc-results {
414
+ display: flex;
415
+ flex-direction: column;
416
+ gap: 1rem;
417
+ }
418
+
419
+ .sc-results-header {
420
+ padding: 1rem;
421
+ background: var(--sc-bg-app);
422
+ border: 1px solid var(--sc-border);
423
+ border-radius: 0.75rem;
424
+ display: flex;
425
+ justify-content: space-between;
426
+ align-items: center;
427
+ }
428
+
429
+ .sc-results-title {
430
+ font-size: 0.75rem;
431
+ font-weight: 700;
432
+ color: var(--sc-text-muted);
433
+ text-transform: uppercase;
434
+ letter-spacing: 0.05em;
435
+ }
436
+
437
+ .sc-hydration-badge {
438
+ font-size: 0.75rem;
439
+ font-weight: 600;
440
+ color: var(--sc-primary);
441
+ background: var(--sc-primary-light);
442
+ padding: 0.25rem 0.75rem;
443
+ border-radius: 9999px;
444
+ }
445
+
446
+ .sc-result-rows {
447
+ display: flex;
448
+ flex-direction: column;
449
+ gap: 0;
450
+ border: 1px solid var(--sc-border);
451
+ border-radius: 0.75rem;
452
+ overflow: hidden;
453
+ }
454
+
455
+ .sc-result-row {
456
+ display: flex;
457
+ justify-content: space-between;
458
+ align-items: center;
459
+ padding: 1rem;
460
+ border-bottom: 1px solid var(--sc-border);
461
+ transition: var(--sc-transition);
462
+ }
463
+
464
+ .sc-result-row:last-child {
465
+ border-bottom: none;
466
+ }
467
+
468
+ .sc-result-row:hover {
469
+ background: var(--sc-primary-light);
470
+ }
471
+
472
+ .sc-result-content {
473
+ display: flex;
474
+ align-items: center;
475
+ gap: 1rem;
476
+ flex: 1;
477
+ }
478
+
479
+ .sc-result-icon {
480
+ width: 3rem;
481
+ height: 3rem;
482
+ border-radius: 0.5rem;
483
+ display: flex;
484
+ align-items: center;
485
+ justify-content: center;
486
+ font-size: 1.5rem;
487
+ }
488
+
489
+ .sc-result-icon.starter {
490
+ background: hsl(38deg, 92%, 90%);
491
+ color: var(--sc-primary);
492
+ }
493
+
494
+ :global(.theme-dark) .sc-result-icon.starter {
495
+ background: hsl(38deg, 92%, 15%);
496
+ }
497
+
498
+ .sc-result-icon.flour {
499
+ background: hsl(45deg, 93%, 90%);
500
+ color: hsl(45deg, 93%, 50%);
501
+ }
502
+
503
+ :global(.theme-dark) .sc-result-icon.flour {
504
+ background: hsl(45deg, 93%, 15%);
505
+ }
506
+
507
+ .sc-result-icon.water {
508
+ background: hsl(196deg, 95%, 90%);
509
+ color: hsl(196deg, 95%, 50%);
510
+ }
511
+
512
+ :global(.theme-dark) .sc-result-icon.water {
513
+ background: hsl(196deg, 95%, 15%);
514
+ }
515
+
516
+ .sc-result-name {
517
+ font-weight: 700;
518
+ color: var(--sc-text-main);
519
+ font-size: 1.125rem;
520
+ }
521
+
522
+ .sc-result-desc {
523
+ font-size: 0.875rem;
524
+ color: var(--sc-text-muted);
525
+ }
526
+
527
+ .sc-result-value {
528
+ display: flex;
529
+ flex-direction: column;
530
+ align-items: flex-end;
531
+ gap: 0.25rem;
532
+ }
533
+
534
+ .sc-result-amount {
535
+ font-size: 1.875rem;
536
+ font-weight: 800;
537
+ color: var(--sc-text-main);
538
+ line-height: 1;
539
+ }
540
+
541
+ .sc-result-unit {
542
+ font-size: 0.875rem;
543
+ color: var(--sc-text-muted);
544
+ font-weight: 600;
545
+ }
546
+
547
+ .sc-total {
548
+ display: flex;
549
+ justify-content: flex-end;
550
+ align-items: center;
551
+ gap: 1rem;
552
+ padding: 1rem;
553
+ margin-top: 1rem;
554
+ opacity: 0.75;
555
+ }
556
+
557
+ .sc-total-label {
558
+ font-size: 0.875rem;
559
+ font-weight: 600;
560
+ color: var(--sc-text-muted);
561
+ text-transform: uppercase;
562
+ }
563
+
564
+ .sc-total-value {
565
+ font-size: 1.25rem;
566
+ font-weight: 700;
567
+ color: var(--sc-text-main);
568
+ }
569
+ </style>