@jjlmoya/utils-finance 1.12.0 → 1.14.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.
Files changed (26) hide show
  1. package/package.json +5 -3
  2. package/scripts/postinstall.mjs +27 -0
  3. package/src/tool/compoundInterest/component.astro +0 -376
  4. package/src/tool/compoundInterest/compound-interest-calculator.css +79 -0
  5. package/src/tool/courtFeeCalculator/component.astro +0 -237
  6. package/src/tool/courtFeeCalculator/spanish-court-fees-calculator.css +235 -0
  7. package/src/tool/debtSnowball/component.astro +0 -636
  8. package/src/tool/debtSnowball/debt-snowball-calculator.css +634 -0
  9. package/src/tool/fireCalculator/component.astro +0 -334
  10. package/src/tool/fireCalculator/four-percent-rule-fire-calculator.css +332 -0
  11. package/src/tool/ibanBicSwiftConverter/component.astro +0 -414
  12. package/src/tool/ibanBicSwiftConverter/iban-to-bic-swift-converter.css +412 -0
  13. package/src/tool/inflation/component.astro +0 -280
  14. package/src/tool/inflation/inflation-calculator-spain.css +278 -0
  15. package/src/tool/lateInterest/component.astro +0 -400
  16. package/src/tool/lateInterest/late-interest-calculator.css +398 -0
  17. package/src/tool/legalInterestRate/component.astro +0 -509
  18. package/src/tool/legalInterestRate/legal-interest-on-money-spain.css +507 -0
  19. package/src/tool/lotteryOptimizer/component.astro +0 -561
  20. package/src/tool/lotteryOptimizer/spain-lottery-optimizer.css +17 -0
  21. package/src/tool/mortgage/component.astro +0 -641
  22. package/src/tool/mortgage/mortgage-calculator.css +639 -0
  23. package/src/tool/percentageCalculator/component.astro +0 -336
  24. package/src/tool/percentageCalculator/percentage-calculator.css +289 -0
  25. package/src/tool/rentIncreaseCalculator/component.astro +0 -372
  26. package/src/tool/rentIncreaseCalculator/rent-increase-calculator.css +370 -0
@@ -99,515 +99,6 @@ const { ui } = Astro.props;
99
99
  </div>
100
100
  </div>
101
101
 
102
- <style>
103
- :root {
104
- --lir-primary: #856404;
105
- --lir-secondary: #b8860b;
106
- --lir-accent: #6c757d;
107
- --lir-bg-glass: rgba(255, 255, 255, 0.9);
108
- --lir-border-glass: rgba(184, 134, 11, 0.3);
109
- --lir-text-main: #212529;
110
- --lir-text-muted: #495057;
111
- --lir-glow: rgba(184, 134, 11, 0.1);
112
- }
113
-
114
- :global(.theme-dark) {
115
- --lir-bg-glass: rgba(15, 23, 42, 0.9);
116
- --lir-border-glass: rgba(184, 134, 11, 0.3);
117
- --lir-text-main: #f8fafc;
118
- --lir-text-muted: #94a3b8;
119
- --lir-glow: rgba(184, 134, 11, 0.15);
120
- }
121
-
122
- :global([data-theme='dark']) {
123
- --lir-bg-glass: rgba(15, 23, 42, 0.9);
124
- --lir-border-glass: rgba(184, 134, 11, 0.3);
125
- --lir-text-main: #f8fafc;
126
- --lir-text-muted: #94a3b8;
127
- --lir-glow: rgba(184, 134, 11, 0.15);
128
- }
129
-
130
- .lir-wrapper {
131
- max-width: 900px;
132
- margin: 2rem auto;
133
- padding: 1rem;
134
- }
135
-
136
- .lir-container {
137
- background: var(--lir-bg-glass);
138
- backdrop-filter: blur(20px);
139
- -webkit-backdrop-filter: blur(20px);
140
- border: 2px solid var(--lir-border-glass);
141
- border-radius: 2rem;
142
- padding: 2.5rem;
143
- position: relative;
144
- overflow: hidden;
145
- box-shadow: 0 15px 35px -5px rgba(184, 134, 11, 0.1);
146
- }
147
-
148
- .lir-header {
149
- text-align: center;
150
- margin-bottom: 2.5rem;
151
- }
152
-
153
- .lir-badge {
154
- display: inline-block;
155
- padding: 0.25rem 1rem;
156
- background: rgba(184, 134, 11, 0.1);
157
- border: 1px solid var(--lir-primary);
158
- color: var(--lir-primary);
159
- border-radius: 2rem;
160
- font-size: 0.75rem;
161
- font-weight: 800;
162
- text-transform: uppercase;
163
- letter-spacing: 1.5px;
164
- margin-bottom: 1rem;
165
- }
166
-
167
- .lir-title {
168
- font-size: 2.25rem;
169
- font-weight: 900;
170
- color: var(--lir-text-main);
171
- margin-bottom: 0.5rem;
172
- line-height: 1.1;
173
- }
174
-
175
- .lir-subtitle {
176
- color: var(--lir-text-muted);
177
- font-size: 1.1rem;
178
- max-width: 600px;
179
- margin: 0 auto;
180
- }
181
-
182
- .lir-main-rates {
183
- display: grid;
184
- grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
185
- gap: 1.25rem;
186
- margin-bottom: 2.5rem;
187
- }
188
-
189
- .rate-card {
190
- background: white;
191
- border: 1px solid rgba(184, 134, 11, 0.15);
192
- border-radius: 1.5rem;
193
- padding: 1.5rem;
194
- text-align: center;
195
- transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
196
- position: relative;
197
- display: flex;
198
- flex-direction: column;
199
- justify-content: center;
200
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
201
- }
202
-
203
- :global(.theme-dark) .rate-card,
204
- :global([data-theme='dark']) .rate-card {
205
- background: rgba(255, 255, 255, 0.03);
206
- box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
207
- }
208
-
209
- .rate-card:hover {
210
- transform: translateY(-5px);
211
- border-color: var(--lir-primary);
212
- }
213
-
214
- .rate-label {
215
- font-size: 0.85rem;
216
- font-weight: 700;
217
- color: var(--lir-text-muted);
218
- margin-bottom: 0.5rem;
219
- text-transform: uppercase;
220
- letter-spacing: 1px;
221
- }
222
-
223
- .rate-value {
224
- font-size: 3rem;
225
- font-weight: 950;
226
- color: var(--lir-secondary);
227
- line-height: 1;
228
- margin-bottom: 0.25rem;
229
- }
230
-
231
- .rate-subtext {
232
- font-size: 0.95rem;
233
- font-weight: 600;
234
- color: var(--lir-text-main);
235
- }
236
-
237
- .lir-calculator-section {
238
- background: #f8f9fa;
239
- border: 1px solid rgba(0, 0, 0, 0.03);
240
- border-radius: 1.75rem;
241
- padding: 2rem;
242
- }
243
-
244
- :global(.theme-dark) .lir-calculator-section,
245
- :global([data-theme='dark']) .lir-calculator-section {
246
- background: rgba(255, 255, 255, 0.02);
247
- }
248
-
249
- .calculator-title {
250
- font-size: 1.4rem;
251
- font-weight: 800;
252
- color: var(--lir-text-main);
253
- margin-bottom: 1.5rem;
254
- display: flex;
255
- align-items: center;
256
- gap: 0.75rem;
257
- }
258
-
259
- .calculator-title :global(svg) {
260
- color: var(--lir-primary);
261
- }
262
-
263
- .calculator-grid {
264
- display: grid;
265
- grid-template-columns: 1fr 1fr;
266
- gap: 1.5rem;
267
- }
268
-
269
- .input-group {
270
- display: flex;
271
- flex-direction: column;
272
- gap: 0.5rem;
273
- }
274
-
275
- .input-group label {
276
- font-weight: 700;
277
- color: var(--lir-text-muted);
278
- font-size: 0.85rem;
279
- }
280
-
281
- .input-container {
282
- position: relative;
283
- }
284
-
285
- .lir-input {
286
- width: 100%;
287
- background: white;
288
- border: 2px solid #e9ecef;
289
- padding: 0.85rem 1.25rem;
290
- border-radius: 1rem;
291
- color: #212529;
292
- font-size: 1.1rem;
293
- font-weight: 700;
294
- transition: all 0.3s;
295
- }
296
-
297
- :global(.theme-dark) .lir-input,
298
- :global([data-theme='dark']) .lir-input {
299
- background: rgba(15, 23, 42, 0.6);
300
- border-color: rgba(255, 255, 255, 0.1);
301
- color: white;
302
- }
303
-
304
- .lir-input:focus {
305
- outline: none;
306
- border-color: var(--lir-primary);
307
- box-shadow: 0 0 10px var(--lir-glow);
308
- }
309
-
310
- .currency-suffix {
311
- position: absolute;
312
- right: 1.25rem;
313
- top: 50%;
314
- transform: translateY(-50%);
315
- color: var(--lir-text-muted);
316
- font-weight: 800;
317
- font-size: 0.9rem;
318
- }
319
-
320
- .lir-results-card {
321
- grid-column: span 2;
322
- background: linear-gradient(135deg, rgba(184, 134, 11, 0.03) 0%, #fff 100%);
323
- border: 1px solid var(--lir-border-glass);
324
- border-radius: 1.5rem;
325
- padding: 1.5rem 2rem;
326
- margin-top: 0.5rem;
327
- display: flex;
328
- justify-content: space-between;
329
- align-items: center;
330
- }
331
-
332
- :global(.theme-dark) .lir-results-card,
333
- :global([data-theme='dark']) .lir-results-card {
334
- background: linear-gradient(135deg, rgba(184, 134, 11, 0.1) 0%, rgba(15, 23, 42, 0.6) 100%);
335
- }
336
-
337
- .result-item {
338
- display: flex;
339
- flex-direction: column;
340
- }
341
-
342
- .result-label {
343
- font-size: 0.95rem;
344
- font-weight: 600;
345
- color: var(--lir-text-muted);
346
- }
347
-
348
- .result-amount {
349
- font-size: 2.25rem;
350
- font-weight: 950;
351
- color: var(--lir-secondary);
352
- }
353
-
354
- .result-total {
355
- text-align: right;
356
- }
357
-
358
- .total-label {
359
- font-size: 0.95rem;
360
- font-weight: 800;
361
- color: var(--lir-text-main);
362
- }
363
-
364
- .total-amount {
365
- font-size: 2.5rem;
366
- font-weight: 950;
367
- color: var(--lir-primary);
368
- }
369
-
370
- .lir-info-msg {
371
- margin-top: 1.5rem;
372
- padding: 1.25rem;
373
- background: rgba(184, 134, 11, 0.05);
374
- border: 1px solid rgba(184, 134, 11, 0.1);
375
- border-radius: 1.25rem;
376
- display: flex;
377
- gap: 1.25rem;
378
- align-items: flex-start;
379
- }
380
-
381
- :global(.theme-dark) .lir-info-msg,
382
- :global([data-theme='dark']) .lir-info-msg {
383
- background: rgba(184, 134, 11, 0.08);
384
- }
385
-
386
- .info-icon {
387
- background: var(--lir-primary);
388
- color: white;
389
- width: 32px;
390
- height: 32px;
391
- min-width: 32px;
392
- border-radius: 50%;
393
- display: flex;
394
- align-items: center;
395
- justify-content: center;
396
- font-size: 1.2rem;
397
- box-shadow: 0 4px 10px rgba(184, 134, 11, 0.2);
398
- }
399
-
400
- .info-content {
401
- display: flex;
402
- flex-direction: column;
403
- gap: 0.5rem;
404
- min-width: 0;
405
- }
406
-
407
- .info-content p {
408
- margin: 0;
409
- font-size: 0.85rem;
410
- color: var(--lir-text-muted);
411
- line-height: 1.5;
412
- }
413
-
414
- .info-formula {
415
- background: white;
416
- padding: 0.5rem 1rem;
417
- border-radius: 0.75rem;
418
- font-size: 0.9rem;
419
- font-weight: 700;
420
- color: var(--lir-primary);
421
- border: 1px solid rgba(184, 134, 11, 0.1);
422
- display: inline-block;
423
- align-self: flex-start;
424
- margin: 0.25rem 0;
425
- }
426
-
427
- :global(.theme-dark) .info-formula,
428
- :global([data-theme='dark']) .info-formula {
429
- background: rgba(0, 0, 0, 0.2);
430
- color: var(--lir-secondary);
431
- }
432
-
433
- @media (max-width: 768px) {
434
- .lir-wrapper {
435
- padding: 1rem;
436
- margin: 0.5rem auto;
437
- box-sizing: border-box;
438
- }
439
-
440
- .lir-container {
441
- padding: 1.25rem;
442
- border-radius: 1.25rem;
443
- width: 100%;
444
- box-sizing: border-box;
445
- }
446
-
447
- .lir-badge {
448
- padding: 0.2rem 0.75rem;
449
- font-size: 0.65rem;
450
- margin-bottom: 0.5rem;
451
- }
452
-
453
- .lir-title {
454
- font-size: 1.5rem;
455
- padding: 0;
456
- }
457
-
458
- .lir-subtitle {
459
- font-size: 0.9rem;
460
- padding: 0;
461
- }
462
-
463
- .lir-main-rates {
464
- grid-template-columns: 1fr;
465
- gap: 0.75rem;
466
- margin-bottom: 1.5rem;
467
- }
468
-
469
- .rate-card {
470
- padding: 1rem;
471
- border-radius: 1rem;
472
- }
473
-
474
- .rate-label {
475
- font-size: 0.75rem;
476
- }
477
-
478
- .rate-value {
479
- font-size: 2.25rem;
480
- }
481
-
482
- .rate-subtext {
483
- font-size: 0.85rem;
484
- }
485
-
486
- .lir-calculator-section {
487
- padding: 1rem;
488
- border-radius: 1rem;
489
- }
490
-
491
- .calculator-title {
492
- font-size: 1.2rem;
493
- margin-bottom: 1rem;
494
- }
495
-
496
- .calculator-grid {
497
- grid-template-columns: 1fr;
498
- gap: 0.75rem;
499
- }
500
-
501
- .lir-input {
502
- padding: 0.75rem 2.5rem 0.75rem 1rem;
503
- font-size: 1rem;
504
- box-sizing: border-box;
505
- }
506
-
507
- .lir-results-card {
508
- grid-column: span 1;
509
- flex-direction: column;
510
- padding: 1rem;
511
- gap: 1rem;
512
- margin-top: 0.5rem;
513
- }
514
-
515
- .result-item.result-total {
516
- padding-top: 0.75rem;
517
- }
518
-
519
- .result-label,
520
- .total-label {
521
- font-size: 0.85rem;
522
- }
523
-
524
- .result-amount {
525
- font-size: 1.75rem;
526
- }
527
-
528
- .total-amount {
529
- font-size: 2rem;
530
- }
531
-
532
- .lir-info-msg {
533
- padding: 0.75rem;
534
- gap: 0.75rem;
535
- width: 100%;
536
- box-sizing: border-box;
537
- overflow: hidden;
538
- }
539
-
540
- .info-icon {
541
- width: 24px;
542
- height: 24px;
543
- min-width: 24px;
544
- font-size: 0.9rem;
545
- }
546
-
547
- .info-formula {
548
- width: 100%;
549
- box-sizing: border-box;
550
- padding: 0.5rem 0.75rem;
551
- font-size: 0.7rem;
552
- overflow-x: auto;
553
- -webkit-overflow-scrolling: touch;
554
- display: block;
555
- border-radius: 0.5rem;
556
- overflow-wrap: break-word;
557
- white-space: normal;
558
- }
559
- }
560
-
561
- @media (max-width: 480px) {
562
- .lir-wrapper {
563
- padding: 0.75rem;
564
- }
565
-
566
- .lir-container {
567
- padding: 1rem;
568
- }
569
-
570
- .lir-title {
571
- font-size: 1.3rem;
572
- }
573
-
574
- .lir-subtitle {
575
- font-size: 0.85rem;
576
- }
577
-
578
- .rate-value {
579
- font-size: 1.75rem;
580
- }
581
-
582
- .lir-calculator-section {
583
- padding: 0.75rem;
584
- }
585
-
586
- .calculator-title {
587
- font-size: 1rem;
588
- }
589
-
590
- .result-amount {
591
- font-size: 1.4rem;
592
- }
593
-
594
- .total-amount {
595
- font-size: 1.5rem;
596
- }
597
-
598
- .lir-input {
599
- font-size: 0.9rem;
600
- }
601
-
602
- .info-content p {
603
- font-size: 0.75rem;
604
- }
605
-
606
- .info-formula {
607
- font-size: 0.65rem;
608
- }
609
- }
610
- </style>
611
102
 
612
103
  <script>
613
104
  import { LegalInterestLogic } from './logic';