@jjlmoya/utils-finance 1.12.0 → 1.13.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
@@ -184,340 +184,6 @@ const { ui } = Astro.props;
184
184
  </div>
185
185
  </div>
186
186
 
187
- <style>
188
- :root {
189
- --fire-primary: #10b981;
190
- --fire-primary-hover: #059669;
191
- --fire-secondary: #3b82f6;
192
- --fire-accent: #f59e0b;
193
- --fire-bg: rgba(255, 255, 255, 0.7);
194
- --fire-card-bg: rgba(255, 255, 255, 0.8);
195
- --fire-text: #1f2937;
196
- --fire-text-muted: #6b7280;
197
- --fire-border: rgba(16, 185, 129, 0.2);
198
- --fire-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
199
- }
200
-
201
- :global(.theme-dark) {
202
- --fire-bg: rgba(17, 24, 39, 0.7);
203
- --fire-card-bg: rgba(31, 41, 55, 0.8);
204
- --fire-text: #f3f4f6;
205
- --fire-text-muted: #9ca3af;
206
- --fire-border: rgba(16, 185, 129, 0.3);
207
- }
208
-
209
- :global([data-theme='dark']) {
210
- --fire-bg: rgba(17, 24, 39, 0.7);
211
- --fire-card-bg: rgba(31, 41, 55, 0.8);
212
- --fire-text: #f3f4f6;
213
- --fire-text-muted: #9ca3af;
214
- --fire-border: rgba(16, 185, 129, 0.3);
215
- }
216
-
217
- .fire-container {
218
- max-width: 1000px;
219
- margin: 0 auto;
220
- padding: 2rem;
221
- border-radius: 24px;
222
- background: var(--fire-bg);
223
- backdrop-filter: blur(12px);
224
- -webkit-backdrop-filter: blur(12px);
225
- border: 1px solid var(--fire-border);
226
- box-shadow: var(--fire-shadow);
227
- color: var(--fire-text);
228
- }
229
-
230
- .fire-grid {
231
- display: grid;
232
- grid-template-columns: 1fr 1fr;
233
- gap: 2rem;
234
- }
235
-
236
- .fire-panel {
237
- display: flex;
238
- flex-direction: column;
239
- gap: 1.5rem;
240
- }
241
-
242
- .fire-input-group {
243
- display: flex;
244
- flex-direction: column;
245
- gap: 0.75rem;
246
- }
247
-
248
- .fire-label-row {
249
- display: flex;
250
- justify-content: space-between;
251
- align-items: center;
252
- }
253
-
254
- .fire-label {
255
- font-weight: 600;
256
- font-size: 0.95rem;
257
- }
258
-
259
- .fire-value-display {
260
- font-weight: 700;
261
- color: var(--fire-primary);
262
- background: var(--fire-card-bg);
263
- padding: 2px 8px;
264
- border-radius: 6px;
265
- font-size: 1.1rem;
266
- }
267
-
268
- .fire-range {
269
- -webkit-appearance: none;
270
- appearance: none;
271
- width: 100%;
272
- height: 6px;
273
- background: var(--fire-border);
274
- border-radius: 5px;
275
- outline: none;
276
- }
277
-
278
- .fire-range::-webkit-slider-thumb {
279
- -webkit-appearance: none;
280
- appearance: none;
281
- width: 20px;
282
- height: 20px;
283
- background: var(--fire-primary);
284
- cursor: pointer;
285
- border-radius: 50%;
286
- box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
287
- }
288
-
289
- .fire-range::-moz-range-thumb {
290
- width: 20px;
291
- height: 20px;
292
- background: var(--fire-primary);
293
- cursor: pointer;
294
- border-radius: 50%;
295
- border: none;
296
- box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
297
- }
298
-
299
- .fire-help {
300
- display: inline-flex;
301
- align-items: center;
302
- gap: 4px;
303
- cursor: help;
304
- color: var(--fire-secondary);
305
- position: relative;
306
- }
307
-
308
- .fire-tooltip {
309
- display: none;
310
- position: absolute;
311
- bottom: 125%;
312
- left: 50%;
313
- transform: translateX(-50%);
314
- background: var(--fire-card-bg);
315
- border: 1px solid var(--fire-border);
316
- color: var(--fire-text-muted);
317
- padding: 8px 12px;
318
- border-radius: 8px;
319
- font-size: 0.85rem;
320
- white-space: nowrap;
321
- z-index: 10;
322
- box-shadow: var(--fire-shadow);
323
- }
324
-
325
- .fire-help:hover .fire-tooltip {
326
- display: block;
327
- }
328
-
329
- .fire-checklist {
330
- display: flex;
331
- flex-direction: column;
332
- gap: 1rem;
333
- }
334
-
335
- .fire-checklist h3 {
336
- margin: 0;
337
- font-size: 1rem;
338
- font-weight: 700;
339
- }
340
-
341
- .fire-milestones {
342
- display: flex;
343
- flex-direction: column;
344
- gap: 1rem;
345
- }
346
-
347
- .milestone-item {
348
- display: flex;
349
- flex-direction: column;
350
- gap: 0.5rem;
351
- }
352
-
353
- .milestone-header {
354
- display: flex;
355
- justify-content: space-between;
356
- font-size: 0.9rem;
357
- font-weight: 600;
358
- }
359
-
360
- .milestone-item.lean .milestone-bar-fill {
361
- background: linear-gradient(90deg, #ef4444, #f97316);
362
- }
363
-
364
- .milestone-item.barista .milestone-bar-fill {
365
- background: linear-gradient(90deg, #f59e0b, #f59e0b);
366
- }
367
-
368
- .milestone-item.fat .milestone-bar-fill {
369
- background: linear-gradient(90deg, #10b981, #14b8a6);
370
- }
371
-
372
- .milestone-bar-bg {
373
- width: 100%;
374
- height: 10px;
375
- background: var(--fire-border);
376
- border-radius: 5px;
377
- overflow: hidden;
378
- }
379
-
380
- .milestone-bar-fill {
381
- height: 100%;
382
- transition: width 0.3s ease;
383
- border-radius: 5px;
384
- }
385
-
386
- .fire-result-panel {
387
- display: flex;
388
- flex-direction: column;
389
- gap: 1.5rem;
390
- }
391
-
392
- .fire-main-result {
393
- text-align: center;
394
- padding: 1.5rem;
395
- background: var(--fire-card-bg);
396
- border-radius: 12px;
397
- border: 1px solid var(--fire-border);
398
- }
399
-
400
- .fire-magic-number-label {
401
- display: block;
402
- font-size: 0.9rem;
403
- color: var(--fire-text-muted);
404
- margin-bottom: 0.5rem;
405
- }
406
-
407
- .fire-magic-number {
408
- font-size: 2.5rem;
409
- font-weight: 900;
410
- color: var(--fire-primary);
411
- margin-bottom: 0.5rem;
412
- }
413
-
414
- .fire-countdown {
415
- font-size: 0.95rem;
416
- color: var(--fire-text-muted);
417
- }
418
-
419
- .fire-chart-container {
420
- width: 100%;
421
- height: 200px;
422
- background: var(--fire-card-bg);
423
- border-radius: 12px;
424
- border: 1px solid var(--fire-border);
425
- padding: 1rem;
426
- box-sizing: border-box;
427
- }
428
-
429
- .fire-line-svg {
430
- width: 100%;
431
- height: 100%;
432
- }
433
-
434
- .fire-path {
435
- fill: none;
436
- stroke: var(--fire-primary);
437
- stroke-width: 2;
438
- }
439
-
440
- .fire-path-savings {
441
- fill: rgba(16, 185, 129, 0.1);
442
- }
443
-
444
- .checklist-grid {
445
- display: grid;
446
- grid-template-columns: 1fr 1fr;
447
- gap: 1rem;
448
- }
449
-
450
- .checklist-item {
451
- display: flex;
452
- align-items: center;
453
- gap: 0.5rem;
454
- font-size: 0.9rem;
455
- cursor: pointer;
456
- }
457
-
458
- .checklist-item input[type="checkbox"] {
459
- cursor: pointer;
460
- accent-color: var(--fire-primary);
461
- }
462
-
463
- .checklist-feedback {
464
- display: none;
465
- padding: 0.75rem;
466
- background: rgba(16, 185, 129, 0.1);
467
- border: 1px solid rgba(16, 185, 129, 0.3);
468
- border-radius: 8px;
469
- color: var(--fire-primary);
470
- font-size: 0.85rem;
471
- font-weight: 600;
472
- }
473
-
474
- .checklist-feedback.visible {
475
- display: block;
476
- }
477
-
478
- .fire-actions {
479
- display: flex;
480
- gap: 1rem;
481
- }
482
-
483
- .fire-btn {
484
- padding: 0.75rem 1.5rem;
485
- border: none;
486
- border-radius: 8px;
487
- font-weight: 600;
488
- cursor: pointer;
489
- display: flex;
490
- align-items: center;
491
- gap: 0.5rem;
492
- transition: all 0.3s ease;
493
- font-size: 0.9rem;
494
- }
495
-
496
- .fire-btn-primary {
497
- background: var(--fire-primary);
498
- color: white;
499
- }
500
-
501
- .fire-btn-primary:hover {
502
- background: var(--fire-primary-hover);
503
- transform: translateY(-2px);
504
- box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
505
- }
506
-
507
- @media (max-width: 768px) {
508
- .fire-grid {
509
- grid-template-columns: 1fr;
510
- }
511
-
512
- .fire-container {
513
- padding: 1rem;
514
- }
515
-
516
- .checklist-grid {
517
- grid-template-columns: 1fr;
518
- }
519
- }
520
- </style>
521
187
 
522
188
  <script>
523
189
  import { FIRELogic } from './logic';
@@ -0,0 +1,332 @@
1
+ :root {
2
+ --fire-primary: #10b981;
3
+ --fire-primary-hover: #059669;
4
+ --fire-secondary: #3b82f6;
5
+ --fire-accent: #f59e0b;
6
+ --fire-bg: rgba(255, 255, 255, 0.7);
7
+ --fire-card-bg: rgba(255, 255, 255, 0.8);
8
+ --fire-text: #1f2937;
9
+ --fire-text-muted: #6b7280;
10
+ --fire-border: rgba(16, 185, 129, 0.2);
11
+ --fire-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
12
+ }
13
+
14
+ :global(.theme-dark) {
15
+ --fire-bg: rgba(17, 24, 39, 0.7);
16
+ --fire-card-bg: rgba(31, 41, 55, 0.8);
17
+ --fire-text: #f3f4f6;
18
+ --fire-text-muted: #9ca3af;
19
+ --fire-border: rgba(16, 185, 129, 0.3);
20
+ }
21
+
22
+ :global([data-theme='dark']) {
23
+ --fire-bg: rgba(17, 24, 39, 0.7);
24
+ --fire-card-bg: rgba(31, 41, 55, 0.8);
25
+ --fire-text: #f3f4f6;
26
+ --fire-text-muted: #9ca3af;
27
+ --fire-border: rgba(16, 185, 129, 0.3);
28
+ }
29
+
30
+ .fire-container {
31
+ max-width: 1000px;
32
+ margin: 0 auto;
33
+ padding: 2rem;
34
+ border-radius: 24px;
35
+ background: var(--fire-bg);
36
+ backdrop-filter: blur(12px);
37
+ -webkit-backdrop-filter: blur(12px);
38
+ border: 1px solid var(--fire-border);
39
+ box-shadow: var(--fire-shadow);
40
+ color: var(--fire-text);
41
+ }
42
+
43
+ .fire-grid {
44
+ display: grid;
45
+ grid-template-columns: 1fr 1fr;
46
+ gap: 2rem;
47
+ }
48
+
49
+ .fire-panel {
50
+ display: flex;
51
+ flex-direction: column;
52
+ gap: 1.5rem;
53
+ }
54
+
55
+ .fire-input-group {
56
+ display: flex;
57
+ flex-direction: column;
58
+ gap: 0.75rem;
59
+ }
60
+
61
+ .fire-label-row {
62
+ display: flex;
63
+ justify-content: space-between;
64
+ align-items: center;
65
+ }
66
+
67
+ .fire-label {
68
+ font-weight: 600;
69
+ font-size: 0.95rem;
70
+ }
71
+
72
+ .fire-value-display {
73
+ font-weight: 700;
74
+ color: var(--fire-primary);
75
+ background: var(--fire-card-bg);
76
+ padding: 2px 8px;
77
+ border-radius: 6px;
78
+ font-size: 1.1rem;
79
+ }
80
+
81
+ .fire-range {
82
+ -webkit-appearance: none;
83
+ appearance: none;
84
+ width: 100%;
85
+ height: 6px;
86
+ background: var(--fire-border);
87
+ border-radius: 5px;
88
+ outline: none;
89
+ }
90
+
91
+ .fire-range::-webkit-slider-thumb {
92
+ -webkit-appearance: none;
93
+ appearance: none;
94
+ width: 20px;
95
+ height: 20px;
96
+ background: var(--fire-primary);
97
+ cursor: pointer;
98
+ border-radius: 50%;
99
+ box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
100
+ }
101
+
102
+ .fire-range::-moz-range-thumb {
103
+ width: 20px;
104
+ height: 20px;
105
+ background: var(--fire-primary);
106
+ cursor: pointer;
107
+ border-radius: 50%;
108
+ border: none;
109
+ box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
110
+ }
111
+
112
+ .fire-help {
113
+ display: inline-flex;
114
+ align-items: center;
115
+ gap: 4px;
116
+ cursor: help;
117
+ color: var(--fire-secondary);
118
+ position: relative;
119
+ }
120
+
121
+ .fire-tooltip {
122
+ display: none;
123
+ position: absolute;
124
+ bottom: 125%;
125
+ left: 50%;
126
+ transform: translateX(-50%);
127
+ background: var(--fire-card-bg);
128
+ border: 1px solid var(--fire-border);
129
+ color: var(--fire-text-muted);
130
+ padding: 8px 12px;
131
+ border-radius: 8px;
132
+ font-size: 0.85rem;
133
+ white-space: nowrap;
134
+ z-index: 10;
135
+ box-shadow: var(--fire-shadow);
136
+ }
137
+
138
+ .fire-help:hover .fire-tooltip {
139
+ display: block;
140
+ }
141
+
142
+ .fire-checklist {
143
+ display: flex;
144
+ flex-direction: column;
145
+ gap: 1rem;
146
+ }
147
+
148
+ .fire-checklist h3 {
149
+ margin: 0;
150
+ font-size: 1rem;
151
+ font-weight: 700;
152
+ }
153
+
154
+ .fire-milestones {
155
+ display: flex;
156
+ flex-direction: column;
157
+ gap: 1rem;
158
+ }
159
+
160
+ .milestone-item {
161
+ display: flex;
162
+ flex-direction: column;
163
+ gap: 0.5rem;
164
+ }
165
+
166
+ .milestone-header {
167
+ display: flex;
168
+ justify-content: space-between;
169
+ font-size: 0.9rem;
170
+ font-weight: 600;
171
+ }
172
+
173
+ .milestone-item.lean .milestone-bar-fill {
174
+ background: linear-gradient(90deg, #ef4444, #f97316);
175
+ }
176
+
177
+ .milestone-item.barista .milestone-bar-fill {
178
+ background: linear-gradient(90deg, #f59e0b, #f59e0b);
179
+ }
180
+
181
+ .milestone-item.fat .milestone-bar-fill {
182
+ background: linear-gradient(90deg, #10b981, #14b8a6);
183
+ }
184
+
185
+ .milestone-bar-bg {
186
+ width: 100%;
187
+ height: 10px;
188
+ background: var(--fire-border);
189
+ border-radius: 5px;
190
+ overflow: hidden;
191
+ }
192
+
193
+ .milestone-bar-fill {
194
+ height: 100%;
195
+ transition: width 0.3s ease;
196
+ border-radius: 5px;
197
+ }
198
+
199
+ .fire-result-panel {
200
+ display: flex;
201
+ flex-direction: column;
202
+ gap: 1.5rem;
203
+ }
204
+
205
+ .fire-main-result {
206
+ text-align: center;
207
+ padding: 1.5rem;
208
+ background: var(--fire-card-bg);
209
+ border-radius: 12px;
210
+ border: 1px solid var(--fire-border);
211
+ }
212
+
213
+ .fire-magic-number-label {
214
+ display: block;
215
+ font-size: 0.9rem;
216
+ color: var(--fire-text-muted);
217
+ margin-bottom: 0.5rem;
218
+ }
219
+
220
+ .fire-magic-number {
221
+ font-size: 2.5rem;
222
+ font-weight: 900;
223
+ color: var(--fire-primary);
224
+ margin-bottom: 0.5rem;
225
+ }
226
+
227
+ .fire-countdown {
228
+ font-size: 0.95rem;
229
+ color: var(--fire-text-muted);
230
+ }
231
+
232
+ .fire-chart-container {
233
+ width: 100%;
234
+ height: 200px;
235
+ background: var(--fire-card-bg);
236
+ border-radius: 12px;
237
+ border: 1px solid var(--fire-border);
238
+ padding: 1rem;
239
+ box-sizing: border-box;
240
+ }
241
+
242
+ .fire-line-svg {
243
+ width: 100%;
244
+ height: 100%;
245
+ }
246
+
247
+ .fire-path {
248
+ fill: none;
249
+ stroke: var(--fire-primary);
250
+ stroke-width: 2;
251
+ }
252
+
253
+ .fire-path-savings {
254
+ fill: rgba(16, 185, 129, 0.1);
255
+ }
256
+
257
+ .checklist-grid {
258
+ display: grid;
259
+ grid-template-columns: 1fr 1fr;
260
+ gap: 1rem;
261
+ }
262
+
263
+ .checklist-item {
264
+ display: flex;
265
+ align-items: center;
266
+ gap: 0.5rem;
267
+ font-size: 0.9rem;
268
+ cursor: pointer;
269
+ }
270
+
271
+ .checklist-item input[type="checkbox"] {
272
+ cursor: pointer;
273
+ accent-color: var(--fire-primary);
274
+ }
275
+
276
+ .checklist-feedback {
277
+ display: none;
278
+ padding: 0.75rem;
279
+ background: rgba(16, 185, 129, 0.1);
280
+ border: 1px solid rgba(16, 185, 129, 0.3);
281
+ border-radius: 8px;
282
+ color: var(--fire-primary);
283
+ font-size: 0.85rem;
284
+ font-weight: 600;
285
+ }
286
+
287
+ .checklist-feedback.visible {
288
+ display: block;
289
+ }
290
+
291
+ .fire-actions {
292
+ display: flex;
293
+ gap: 1rem;
294
+ }
295
+
296
+ .fire-btn {
297
+ padding: 0.75rem 1.5rem;
298
+ border: none;
299
+ border-radius: 8px;
300
+ font-weight: 600;
301
+ cursor: pointer;
302
+ display: flex;
303
+ align-items: center;
304
+ gap: 0.5rem;
305
+ transition: all 0.3s ease;
306
+ font-size: 0.9rem;
307
+ }
308
+
309
+ .fire-btn-primary {
310
+ background: var(--fire-primary);
311
+ color: white;
312
+ }
313
+
314
+ .fire-btn-primary:hover {
315
+ background: var(--fire-primary-hover);
316
+ transform: translateY(-2px);
317
+ box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
318
+ }
319
+
320
+ @media (max-width: 768px) {
321
+ .fire-grid {
322
+ grid-template-columns: 1fr;
323
+ }
324
+
325
+ .fire-container {
326
+ padding: 1rem;
327
+ }
328
+
329
+ .checklist-grid {
330
+ grid-template-columns: 1fr;
331
+ }
332
+ }