@jjlmoya/utils-pets 1.9.0 → 1.11.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.
@@ -179,432 +179,3 @@ const { ui } = Astro.props;
179
179
  document.addEventListener("astro:page-load", initPetRation);
180
180
  </script>
181
181
 
182
- <style>
183
- .pet-ration-calculator-final {
184
- position: relative;
185
- max-width: 650px;
186
- margin: 2rem auto;
187
- background: var(--color-surface, #fff);
188
- border-radius: 2rem;
189
- padding: 2.5rem;
190
- box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.08);
191
- color: var(--color-text, #334155);
192
- border: 1px solid var(--color-border, #f1f5f9);
193
- min-height: 400px;
194
- }
195
-
196
- .calc-loader {
197
- position: absolute;
198
- top: 0;
199
- left: 0;
200
- width: 100%;
201
- height: 100%;
202
- background: var(--color-surface, #fff);
203
- display: flex;
204
- align-items: center;
205
- justify-content: center;
206
- border-radius: 2rem;
207
- z-index: 50;
208
- transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s;
209
- }
210
-
211
- :global(.theme-dark) .pet-ration-calculator-final {
212
- background: var(--color-surface-dark, #1e293b);
213
- color: var(--color-text-dark, #e2e8f0);
214
- border-color: var(--color-border-dark, #334155);
215
- box-shadow: 0 20px 50px -15px rgba(0, 0, 0, 0.3);
216
- }
217
-
218
- :global(.theme-dark) .calc-loader {
219
- background: var(--color-surface-dark, #1e293b);
220
- }
221
-
222
- .calc-loader.hidden {
223
- opacity: 0;
224
- visibility: hidden;
225
- pointer-events: none;
226
- }
227
-
228
- .loader-spinner {
229
- width: 3rem;
230
- height: 3rem;
231
- color: var(--color-accent, #f59e0b);
232
- animation: spin-pulse 2s infinite linear;
233
- }
234
-
235
- @keyframes spin-pulse {
236
- from { transform: rotate(0deg); }
237
- to { transform: rotate(360deg); }
238
- }
239
-
240
- .calc-container {
241
- display: flex;
242
- flex-direction: column;
243
- gap: 3rem;
244
- animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1);
245
- }
246
-
247
- @keyframes fade-in-up {
248
- from {
249
- opacity: 0;
250
- transform: translateY(10px);
251
- }
252
- to {
253
- opacity: 1;
254
- transform: translateY(0);
255
- }
256
- }
257
-
258
- .section-title {
259
- font-size: 1.1rem;
260
- font-weight: 950;
261
- color: var(--color-heading, #0f172a);
262
- margin-bottom: 2rem;
263
- display: flex;
264
- align-items: center;
265
- gap: 0.75rem;
266
- text-transform: uppercase;
267
- letter-spacing: 0.05em;
268
- }
269
-
270
- :global(.theme-dark) .section-title {
271
- color: var(--color-heading-dark, #f8fafc);
272
- }
273
-
274
- .calc-section {
275
- border-bottom: 1px dashed var(--color-border-dashed, #e2e8f0);
276
- padding-bottom: 2rem;
277
- }
278
-
279
- .calc-section:last-of-type {
280
- border-bottom: none;
281
- }
282
-
283
- :global(.theme-dark) .calc-section {
284
- border-bottom-color: var(--color-border-dark, #334155);
285
- }
286
-
287
- .input-item {
288
- margin-bottom: 2rem;
289
- }
290
-
291
- .item-label {
292
- display: block;
293
- font-size: 0.75rem;
294
- font-weight: 800;
295
- text-transform: uppercase;
296
- color: var(--color-label, #94a3b8);
297
- margin-bottom: 1rem;
298
- letter-spacing: 0.1em;
299
- }
300
-
301
- .species-selector-v2 {
302
- display: flex;
303
- gap: 1rem;
304
- }
305
-
306
- .species-selector-v2 input {
307
- display: none;
308
- }
309
-
310
- .btn-species {
311
- flex: 1;
312
- display: flex;
313
- align-items: center;
314
- justify-content: center;
315
- gap: 0.5rem;
316
- padding: 1.25rem 0.75rem;
317
- background: var(--color-btn-bg, #f8fafc);
318
- border: 2px solid var(--color-btn-border, #e2e8f0);
319
- border-radius: 1rem;
320
- cursor: pointer;
321
- font-weight: 800;
322
- font-size: 1rem;
323
- transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
324
- }
325
-
326
- :global(.theme-dark) .btn-species {
327
- background: var(--color-btn-bg-dark, #0f172a);
328
- border-color: var(--color-btn-border-dark, #334155);
329
- }
330
-
331
- .icon-v2 {
332
- width: 1.5rem;
333
- height: 1.5rem;
334
- }
335
-
336
- .species-selector-v2 input:checked + .btn-species {
337
- background: var(--color-surface, #fff);
338
- border-color: var(--color-accent, #f59e0b);
339
- color: var(--color-accent, #f59e0b);
340
- box-shadow: 0 4px 15px rgba(245, 158, 11, 0.15);
341
- transform: translateY(-2px);
342
- }
343
-
344
- :global(.theme-dark) .species-selector-v2 input:checked + .btn-species {
345
- background: var(--color-surface-elevated-dark, #1e293b);
346
- }
347
-
348
- .segmented-v2 {
349
- display: flex;
350
- background: var(--color-btn-bg, #f8fafc);
351
- padding: 6px;
352
- border-radius: 1rem;
353
- border: 1px solid var(--color-btn-border, #e2e8f0);
354
- }
355
-
356
- :global(.theme-dark) .segmented-v2 {
357
- background: var(--color-btn-bg-dark, #0f172a);
358
- border-color: var(--color-btn-border-dark, #334155);
359
- }
360
-
361
- .segmented-v2 input {
362
- display: none;
363
- }
364
-
365
- .segmented-v2 label {
366
- flex: 1;
367
- text-align: center;
368
- padding: 0.85rem;
369
- border-radius: 0.75rem;
370
- cursor: pointer;
371
- font-weight: 700;
372
- font-size: 0.85rem;
373
- transition: all 0.2s;
374
- color: var(--color-muted, #64748b);
375
- }
376
-
377
- .segmented-v2 input:checked + label {
378
- background: var(--color-accent, #f59e0b);
379
- color: var(--color-on-accent, #fff);
380
- box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
381
- }
382
-
383
- .val-badge {
384
- font-weight: 950;
385
- color: var(--color-accent, #f59e0b);
386
- font-size: 1.25rem;
387
- }
388
-
389
- .label-row-v2 {
390
- display: flex;
391
- justify-content: space-between;
392
- }
393
-
394
- .range-v2 {
395
- -webkit-appearance: none;
396
- appearance: none;
397
- width: 100%;
398
- height: 8px;
399
- background: var(--color-range-track, #e2e8f0);
400
- border-radius: 10px;
401
- }
402
-
403
- :global(.theme-dark) .range-v2 {
404
- background: var(--color-range-track-dark, #334155);
405
- }
406
-
407
- .range-v2::-webkit-slider-thumb {
408
- -webkit-appearance: none;
409
- appearance: none;
410
- width: 26px;
411
- height: 26px;
412
- background: var(--color-surface, #fff);
413
- border: 6px solid var(--color-accent, #f59e0b);
414
- border-radius: 50%;
415
- cursor: pointer;
416
- box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
417
- }
418
-
419
- .ratio-presets {
420
- display: grid;
421
- grid-template-columns: repeat(2, 1fr);
422
- gap: 0.75rem;
423
- }
424
-
425
- .ratio-presets input {
426
- display: none;
427
- }
428
-
429
- .ratio-presets label {
430
- padding: 0.85rem;
431
- text-align: center;
432
- background: var(--color-btn-bg, #f8fafc);
433
- border: 1px solid var(--color-btn-border, #e2e8f0);
434
- border-radius: 0.75rem;
435
- cursor: pointer;
436
- font-weight: 700;
437
- font-size: 0.85rem;
438
- transition: all 0.2s;
439
- }
440
-
441
- :global(.theme-dark) .ratio-presets label {
442
- background: var(--color-btn-bg-dark, #0f172a);
443
- border-color: var(--color-btn-border-dark, #334155);
444
- }
445
-
446
- .ratio-presets input:checked + label {
447
- background: var(--color-surface, #fff);
448
- border-color: var(--color-accent, #f59e0b);
449
- color: var(--color-accent, #f59e0b);
450
- box-shadow: 0 4px 10px rgba(245, 158, 11, 0.1);
451
- }
452
-
453
- :global(.theme-dark) .ratio-presets input:checked + label {
454
- background: var(--color-surface-elevated-dark, #1e293b);
455
- }
456
-
457
- .custom-ratio-link {
458
- display: block;
459
- text-align: right;
460
- font-size: 0.75rem;
461
- color: var(--color-label, #94a3b8);
462
- margin-top: 1rem;
463
- cursor: pointer;
464
- text-decoration: underline;
465
- }
466
-
467
- .manual-slider-box {
468
- margin-top: 2rem;
469
- padding: 1.5rem;
470
- background: var(--color-btn-bg, #f8fafc);
471
- border-radius: 1rem;
472
- border: 1px solid var(--color-btn-border, #e2e8f0);
473
- }
474
-
475
- :global(.theme-dark) .manual-slider-box {
476
- background: var(--color-btn-bg-dark, #0f172a);
477
- border-color: var(--color-btn-border-dark, #334155);
478
- }
479
-
480
- .ratio-labels {
481
- display: flex;
482
- justify-content: space-between;
483
- font-size: 0.8rem;
484
- margin-top: 1rem;
485
- font-weight: 700;
486
- }
487
-
488
- .results-v2 {
489
- background: var(--color-results-bg, #0f172a);
490
- border-radius: 2rem;
491
- padding: 2.5rem;
492
- color: var(--color-results-text, #fff);
493
- box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.3);
494
- }
495
-
496
- :global(.theme-dark) .results-v2 {
497
- background: var(--color-accent, #f59e0b);
498
- color: var(--color-results-text-dark, #0f172a);
499
- box-shadow: 0 20px 40px -10px rgba(245, 158, 11, 0.2);
500
- }
501
-
502
- .res-cards-v2 {
503
- display: flex;
504
- gap: 1.5rem;
505
- margin-bottom: 2rem;
506
- }
507
-
508
- .res-card-v2 {
509
- flex: 1;
510
- display: flex;
511
- flex-direction: column;
512
- align-items: center;
513
- border-left: 4px solid var(--color-accent, #f59e0b);
514
- padding: 0.5rem 1.5rem;
515
- }
516
-
517
- :global(.theme-dark) .res-card-v2 {
518
- border-left-color: var(--color-results-bg, #0f172a);
519
- }
520
-
521
- .res-tag {
522
- font-size: 0.8rem;
523
- font-weight: 900;
524
- text-transform: uppercase;
525
- color: var(--color-accent, #f59e0b);
526
- margin-bottom: 0.25rem;
527
- align-self: flex-start;
528
- }
529
-
530
- :global(.theme-dark) .res-tag {
531
- color: var(--color-results-bg, #0f172a);
532
- opacity: 0.7;
533
- }
534
-
535
- .res-num {
536
- font-size: 4rem;
537
- font-weight: 950;
538
- line-height: 1;
539
- align-self: flex-start;
540
- }
541
-
542
- .res-num small {
543
- font-size: 1.25rem;
544
- margin-left: 4px;
545
- opacity: 0.6;
546
- }
547
-
548
- .res-footer-v2 {
549
- display: flex;
550
- justify-content: space-between;
551
- align-items: center;
552
- padding-top: 1.5rem;
553
- border-top: 1px solid rgba(255, 255, 255, 0.1);
554
- }
555
-
556
- :global(.theme-dark) .res-footer-v2 {
557
- border-top-color: rgba(0, 0, 0, 0.1);
558
- }
559
-
560
- .total-info {
561
- font-weight: 800;
562
- display: flex;
563
- align-items: center;
564
- gap: 0.5rem;
565
- }
566
-
567
- .total-info strong {
568
- font-size: 1.4rem;
569
- }
570
-
571
- .footer-icon {
572
- width: 1.5rem;
573
- height: 1.5rem;
574
- }
575
-
576
- .status-box-v2 {
577
- background: var(--color-accent, #f59e0b);
578
- color: var(--color-on-accent, #fff);
579
- padding: 0.4rem 1.25rem;
580
- border-radius: 2rem;
581
- font-size: 0.85rem;
582
- font-weight: 900;
583
- }
584
-
585
- :global(.theme-dark) .status-box-v2 {
586
- background: var(--color-results-bg, #0f172a);
587
- color: var(--color-results-text, #fff);
588
- }
589
-
590
- @media (max-width: 600px) {
591
- .pet-ration-calculator-final {
592
- padding: 1.5rem;
593
- margin: 1rem;
594
- }
595
-
596
- .species-selector-v2 {
597
- flex-direction: column;
598
- }
599
-
600
- .res-cards-v2 {
601
- flex-direction: column;
602
- }
603
-
604
- .res-footer-v2 {
605
- flex-direction: column;
606
- gap: 1.5rem;
607
- text-align: center;
608
- }
609
- }
610
- </style>
@@ -0,0 +1,63 @@
1
+ import type { PetToolEntry, ToolLocaleContent } from '../../types';
2
+
3
+ export interface PetRationUI {
4
+ [key: string]: string;
5
+ toolTitle: string;
6
+ sectionProfile: string;
7
+ labelAnimal: string;
8
+ labelStage: string;
9
+ labelWeight: string;
10
+ labelActivity: string;
11
+ sectionDiet: string;
12
+ labelDietType: string;
13
+ speciesDog: string;
14
+ speciesCat: string;
15
+ speciesRabbit: string;
16
+ stagePuppy: string;
17
+ stageAdult: string;
18
+ stageSenior: string;
19
+ activityLow: string;
20
+ activityMod: string;
21
+ activityHigh: string;
22
+ dietDry: string;
23
+ dietMixed25: string;
24
+ dietHalf: string;
25
+ dietWet: string;
26
+ manualAdjust: string;
27
+ wetPercentLabel: string;
28
+ tagDry: string;
29
+ tagWet: string;
30
+ totalKcal: string;
31
+ kcalUnit: string;
32
+ statusPuppy: string;
33
+ statusSenior: string;
34
+ statusLargeDog: string;
35
+ statusDefault: string;
36
+ }
37
+
38
+ export type PetRationLocaleContent = ToolLocaleContent<PetRationUI>;
39
+
40
+ export const petRation: PetToolEntry<PetRationUI> = {
41
+ id: 'pet-ration',
42
+ icons: {
43
+ bg: 'mdi:dog',
44
+ fg: 'mdi:scale',
45
+ },
46
+ i18n: {
47
+ de: () => import('./i18n/de').then((m) => m.content),
48
+ en: () => import('./i18n/en').then((m) => m.content),
49
+ es: () => import('./i18n/es').then((m) => m.content),
50
+ fr: () => import('./i18n/fr').then((m) => m.content),
51
+ id: () => import('./i18n/id').then((m) => m.content),
52
+ it: () => import('./i18n/it').then((m) => m.content),
53
+ ja: () => import('./i18n/ja').then((m) => m.content),
54
+ ko: () => import('./i18n/ko').then((m) => m.content),
55
+ nl: () => import('./i18n/nl').then((m) => m.content),
56
+ pl: () => import('./i18n/pl').then((m) => m.content),
57
+ pt: () => import('./i18n/pt').then((m) => m.content),
58
+ ru: () => import('./i18n/ru').then((m) => m.content),
59
+ sv: () => import('./i18n/sv').then((m) => m.content),
60
+ tr: () => import('./i18n/tr').then((m) => m.content),
61
+ zh: () => import('./i18n/zh').then((m) => m.content),
62
+ },
63
+ };
@@ -1,68 +1,5 @@
1
- import type { PetToolEntry, ToolLocaleContent, ToolDefinition } from '../../types';
2
-
3
- export interface PetRationUI {
4
- [key: string]: string;
5
- toolTitle: string;
6
- sectionProfile: string;
7
- labelAnimal: string;
8
- labelStage: string;
9
- labelWeight: string;
10
- labelActivity: string;
11
- sectionDiet: string;
12
- labelDietType: string;
13
- speciesDog: string;
14
- speciesCat: string;
15
- speciesRabbit: string;
16
- stagePuppy: string;
17
- stageAdult: string;
18
- stageSenior: string;
19
- activityLow: string;
20
- activityMod: string;
21
- activityHigh: string;
22
- dietDry: string;
23
- dietMixed25: string;
24
- dietHalf: string;
25
- dietWet: string;
26
- manualAdjust: string;
27
- wetPercentLabel: string;
28
- tagDry: string;
29
- tagWet: string;
30
- totalKcal: string;
31
- kcalUnit: string;
32
- statusPuppy: string;
33
- statusSenior: string;
34
- statusLargeDog: string;
35
- statusDefault: string;
36
- }
37
-
38
- export type PetRationLocaleContent = ToolLocaleContent<PetRationUI>;
39
-
40
- export const petRation: PetToolEntry<PetRationUI> = {
41
- id: 'pet-ration',
42
- icons: {
43
- bg: 'mdi:dog',
44
- fg: 'mdi:scale',
45
- },
46
- i18n: {
47
- de: () => import('./i18n/de').then((m) => m.content),
48
- en: () => import('./i18n/en').then((m) => m.content),
49
- es: () => import('./i18n/es').then((m) => m.content),
50
- fr: () => import('./i18n/fr').then((m) => m.content),
51
- id: () => import('./i18n/id').then((m) => m.content),
52
- it: () => import('./i18n/it').then((m) => m.content),
53
- ja: () => import('./i18n/ja').then((m) => m.content),
54
- ko: () => import('./i18n/ko').then((m) => m.content),
55
- nl: () => import('./i18n/nl').then((m) => m.content),
56
- pl: () => import('./i18n/pl').then((m) => m.content),
57
- pt: () => import('./i18n/pt').then((m) => m.content),
58
- ru: () => import('./i18n/ru').then((m) => m.content),
59
- sv: () => import('./i18n/sv').then((m) => m.content),
60
- tr: () => import('./i18n/tr').then((m) => m.content),
61
- zh: () => import('./i18n/zh').then((m) => m.content),
62
- },
63
- };
64
-
65
-
1
+ import { petRation } from './entry';
2
+ export * from './entry';
66
3
  export const PET_RATION_TOOL: ToolDefinition = {
67
4
  entry: petRation,
68
5
  Component: () => import('./component.astro'),