@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.
- package/package.json +5 -3
- package/scripts/postinstall.mjs +27 -0
- package/src/tool/compoundInterest/component.astro +0 -376
- package/src/tool/compoundInterest/compound-interest-calculator.css +79 -0
- package/src/tool/courtFeeCalculator/component.astro +0 -237
- package/src/tool/courtFeeCalculator/spanish-court-fees-calculator.css +235 -0
- package/src/tool/debtSnowball/component.astro +0 -636
- package/src/tool/debtSnowball/debt-snowball-calculator.css +634 -0
- package/src/tool/fireCalculator/component.astro +0 -334
- package/src/tool/fireCalculator/four-percent-rule-fire-calculator.css +332 -0
- package/src/tool/ibanBicSwiftConverter/component.astro +0 -414
- package/src/tool/ibanBicSwiftConverter/iban-to-bic-swift-converter.css +412 -0
- package/src/tool/inflation/component.astro +0 -280
- package/src/tool/inflation/inflation-calculator-spain.css +278 -0
- package/src/tool/lateInterest/component.astro +0 -400
- package/src/tool/lateInterest/late-interest-calculator.css +398 -0
- package/src/tool/legalInterestRate/component.astro +0 -509
- package/src/tool/legalInterestRate/legal-interest-on-money-spain.css +507 -0
- package/src/tool/lotteryOptimizer/component.astro +0 -561
- package/src/tool/lotteryOptimizer/spain-lottery-optimizer.css +17 -0
- package/src/tool/mortgage/component.astro +0 -641
- package/src/tool/mortgage/mortgage-calculator.css +639 -0
- package/src/tool/percentageCalculator/component.astro +0 -336
- package/src/tool/percentageCalculator/percentage-calculator.css +289 -0
- package/src/tool/rentIncreaseCalculator/component.astro +0 -372
- package/src/tool/rentIncreaseCalculator/rent-increase-calculator.css +370 -0
|
@@ -106,378 +106,6 @@ const { ui } = Astro.props;
|
|
|
106
106
|
</div>
|
|
107
107
|
</div>
|
|
108
108
|
|
|
109
|
-
<style>
|
|
110
|
-
:root {
|
|
111
|
-
--ric-bg-card: #fff;
|
|
112
|
-
--ric-border-card: #eef2f6;
|
|
113
|
-
--ric-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 20px 40px -8px rgba(0, 0, 0, 0.05);
|
|
114
|
-
--ric-header-bg: linear-gradient(90deg, #10b981, #14b8a6);
|
|
115
|
-
--ric-text-title: #0f172a;
|
|
116
|
-
--ric-text-secondary: #64748b;
|
|
117
|
-
--ric-text-primary: #1e293b;
|
|
118
|
-
--ric-bg-input-section: #f8fafc;
|
|
119
|
-
--ric-border-input-section: #f1f5f9;
|
|
120
|
-
--ric-bg-input: #fff;
|
|
121
|
-
--ric-text-input: #1e293b;
|
|
122
|
-
--ric-border-input: transparent;
|
|
123
|
-
--ric-focus-border: #10b981;
|
|
124
|
-
--ric-focus-ring: rgba(16, 185, 129, 0.15);
|
|
125
|
-
--ric-icon-color: #10b981;
|
|
126
|
-
--ric-bg-result: #fff;
|
|
127
|
-
--ric-border-result: #eef2f6;
|
|
128
|
-
--ric-text-result-value: #0f172a;
|
|
129
|
-
--ric-text-result-label: #94a3b8;
|
|
130
|
-
--ric-bg-bar: #f1f5f9;
|
|
131
|
-
--ric-bg-bar-fill: #10b981;
|
|
132
|
-
--ric-text-bar: #64748b;
|
|
133
|
-
--ric-bg-badge: #d1fae5;
|
|
134
|
-
--ric-text-badge: #059669;
|
|
135
|
-
--ric-bg-button: #0f172a;
|
|
136
|
-
--ric-text-button: #fff;
|
|
137
|
-
--ric-bg-button-hover: #1e293b;
|
|
138
|
-
--ric-highlight-color: #10b981;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
:global(.theme-dark) {
|
|
142
|
-
--ric-bg-card: #0f172a;
|
|
143
|
-
--ric-border-card: rgba(255, 255, 255, 0.05);
|
|
144
|
-
--ric-text-title: #f8fafc;
|
|
145
|
-
--ric-text-secondary: #94a3b8;
|
|
146
|
-
--ric-text-primary: #f8fafc;
|
|
147
|
-
--ric-bg-input-section: rgba(30, 41, 59, 0.5);
|
|
148
|
-
--ric-border-input-section: rgba(255, 255, 255, 0.05);
|
|
149
|
-
--ric-bg-input: #1e293b;
|
|
150
|
-
--ric-text-input: #f8fafc;
|
|
151
|
-
--ric-border-input: #334155;
|
|
152
|
-
--ric-focus-border: #10b981;
|
|
153
|
-
--ric-focus-ring: rgba(16, 185, 129, 0.15);
|
|
154
|
-
--ric-icon-color: #34d399;
|
|
155
|
-
--ric-bg-result: #1e293b;
|
|
156
|
-
--ric-border-result: rgba(255, 255, 255, 0.05);
|
|
157
|
-
--ric-text-result-value: #f8fafc;
|
|
158
|
-
--ric-text-result-label: #94a3b8;
|
|
159
|
-
--ric-bg-bar: #1e293b;
|
|
160
|
-
--ric-bg-bar-fill: #10b981;
|
|
161
|
-
--ric-text-bar: #cbd5e1;
|
|
162
|
-
--ric-bg-badge: rgba(16, 185, 129, 0.1);
|
|
163
|
-
--ric-text-badge: #6ee7b7;
|
|
164
|
-
--ric-bg-button: #10b981;
|
|
165
|
-
--ric-text-button: #fff;
|
|
166
|
-
--ric-bg-button-hover: #059669;
|
|
167
|
-
--ric-highlight-color: #34d399;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
:global([data-theme='dark']) {
|
|
171
|
-
--ric-bg-card: #0f172a;
|
|
172
|
-
--ric-border-card: rgba(255, 255, 255, 0.05);
|
|
173
|
-
--ric-text-title: #f8fafc;
|
|
174
|
-
--ric-text-secondary: #94a3b8;
|
|
175
|
-
--ric-text-primary: #f8fafc;
|
|
176
|
-
--ric-bg-input-section: rgba(30, 41, 59, 0.5);
|
|
177
|
-
--ric-border-input-section: rgba(255, 255, 255, 0.05);
|
|
178
|
-
--ric-bg-input: #1e293b;
|
|
179
|
-
--ric-text-input: #f8fafc;
|
|
180
|
-
--ric-border-input: #334155;
|
|
181
|
-
--ric-focus-border: #10b981;
|
|
182
|
-
--ric-focus-ring: rgba(16, 185, 129, 0.15);
|
|
183
|
-
--ric-icon-color: #34d399;
|
|
184
|
-
--ric-bg-result: #1e293b;
|
|
185
|
-
--ric-border-result: rgba(255, 255, 255, 0.05);
|
|
186
|
-
--ric-text-result-value: #f8fafc;
|
|
187
|
-
--ric-text-result-label: #94a3b8;
|
|
188
|
-
--ric-bg-bar: #1e293b;
|
|
189
|
-
--ric-bg-bar-fill: #10b981;
|
|
190
|
-
--ric-text-bar: #cbd5e1;
|
|
191
|
-
--ric-bg-badge: rgba(16, 185, 129, 0.1);
|
|
192
|
-
--ric-text-badge: #6ee7b7;
|
|
193
|
-
--ric-bg-button: #10b981;
|
|
194
|
-
--ric-text-button: #fff;
|
|
195
|
-
--ric-bg-button-hover: #059669;
|
|
196
|
-
--ric-highlight-color: #34d399;
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
.ric-container {
|
|
200
|
-
width: 100%;
|
|
201
|
-
max-width: 900px;
|
|
202
|
-
margin: 0 auto;
|
|
203
|
-
perspective: 1000px;
|
|
204
|
-
padding: 2rem 1rem;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.ric-card {
|
|
208
|
-
background: var(--ric-bg-card);
|
|
209
|
-
border: 1px solid var(--ric-border-card);
|
|
210
|
-
border-radius: 32px;
|
|
211
|
-
padding: 3rem;
|
|
212
|
-
box-shadow: var(--ric-shadow-card);
|
|
213
|
-
position: relative;
|
|
214
|
-
overflow: hidden;
|
|
215
|
-
color-scheme: light;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
:global(.theme-dark) .ric-card,
|
|
219
|
-
:global([data-theme='dark']) .ric-card {
|
|
220
|
-
color-scheme: dark;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
.ric-card::before {
|
|
224
|
-
content: '';
|
|
225
|
-
position: absolute;
|
|
226
|
-
top: 0;
|
|
227
|
-
left: 0;
|
|
228
|
-
right: 0;
|
|
229
|
-
height: 6px;
|
|
230
|
-
background: var(--ric-header-bg);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
.ric-header {
|
|
234
|
-
text-align: left;
|
|
235
|
-
margin-bottom: 3rem;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
.ric-header h3 {
|
|
239
|
-
font-size: 2.25rem;
|
|
240
|
-
font-weight: 950;
|
|
241
|
-
color: var(--ric-text-title);
|
|
242
|
-
letter-spacing: -0.04em;
|
|
243
|
-
margin-bottom: 0.75rem;
|
|
244
|
-
line-height: 1;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.ric-header p {
|
|
248
|
-
color: var(--ric-text-secondary);
|
|
249
|
-
font-size: 1.1rem;
|
|
250
|
-
max-width: 500px;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
.ric-layout {
|
|
254
|
-
display: grid;
|
|
255
|
-
grid-template-columns: 1fr 1fr;
|
|
256
|
-
gap: 2rem;
|
|
257
|
-
margin-bottom: 2rem;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.ric-inputs-section {
|
|
261
|
-
display: flex;
|
|
262
|
-
flex-direction: column;
|
|
263
|
-
gap: 1.5rem;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.ric-input-group {
|
|
267
|
-
display: flex;
|
|
268
|
-
flex-direction: column;
|
|
269
|
-
gap: 0.75rem;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
.ric-input-group label {
|
|
273
|
-
font-size: 0.875rem;
|
|
274
|
-
font-weight: 600;
|
|
275
|
-
color: var(--ric-text-primary);
|
|
276
|
-
text-transform: uppercase;
|
|
277
|
-
letter-spacing: 0.05em;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.ric-input-wrapper {
|
|
281
|
-
position: relative;
|
|
282
|
-
display: flex;
|
|
283
|
-
align-items: center;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.ric-input-wrapper input,
|
|
287
|
-
.ric-input-wrapper select {
|
|
288
|
-
width: 100%;
|
|
289
|
-
padding: 0.875rem 1rem;
|
|
290
|
-
padding-left: 1rem;
|
|
291
|
-
border: 1px solid var(--ric-border-input);
|
|
292
|
-
border-radius: 12px;
|
|
293
|
-
background: var(--ric-bg-input);
|
|
294
|
-
color: var(--ric-text-input);
|
|
295
|
-
font-size: 1rem;
|
|
296
|
-
transition: all 0.2s;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
.ric-input-wrapper input:focus,
|
|
300
|
-
.ric-input-wrapper select:focus {
|
|
301
|
-
outline: none;
|
|
302
|
-
border-color: var(--ric-focus-border);
|
|
303
|
-
box-shadow: 0 0 0 3px var(--ric-focus-ring);
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.ric-input-unit {
|
|
307
|
-
position: absolute;
|
|
308
|
-
right: 1rem;
|
|
309
|
-
font-size: 0.875rem;
|
|
310
|
-
font-weight: 600;
|
|
311
|
-
color: var(--ric-text-secondary);
|
|
312
|
-
pointer-events: none;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.ric-results-section {
|
|
316
|
-
display: flex;
|
|
317
|
-
flex-direction: column;
|
|
318
|
-
gap: 1.5rem;
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
.ric-result-header {
|
|
322
|
-
display: flex;
|
|
323
|
-
flex-direction: column;
|
|
324
|
-
gap: 0.5rem;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.ric-result-label {
|
|
328
|
-
font-size: 0.875rem;
|
|
329
|
-
font-weight: 600;
|
|
330
|
-
color: var(--ric-text-result-label);
|
|
331
|
-
text-transform: uppercase;
|
|
332
|
-
letter-spacing: 0.05em;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.ric-result-main-value {
|
|
336
|
-
font-size: 2.5rem;
|
|
337
|
-
font-weight: 900;
|
|
338
|
-
color: var(--ric-text-result-value);
|
|
339
|
-
letter-spacing: -0.02em;
|
|
340
|
-
overflow-wrap: break-word;
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.ric-comparison-bar {
|
|
344
|
-
display: flex;
|
|
345
|
-
flex-direction: column;
|
|
346
|
-
gap: 0.75rem;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.ric-bar-base {
|
|
350
|
-
width: 100%;
|
|
351
|
-
height: 24px;
|
|
352
|
-
background: var(--ric-bg-bar);
|
|
353
|
-
border-radius: 12px;
|
|
354
|
-
overflow: hidden;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.ric-bar-fill {
|
|
358
|
-
height: 100%;
|
|
359
|
-
background: var(--ric-bg-bar-fill);
|
|
360
|
-
transition: width 0.3s ease;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.ric-bar-labels {
|
|
364
|
-
display: flex;
|
|
365
|
-
justify-content: space-between;
|
|
366
|
-
font-size: 0.875rem;
|
|
367
|
-
font-weight: 600;
|
|
368
|
-
color: var(--ric-text-bar);
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
.ric-summary-details {
|
|
372
|
-
display: grid;
|
|
373
|
-
grid-template-columns: 1fr 1fr;
|
|
374
|
-
gap: 1rem;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.ric-detail-item {
|
|
378
|
-
display: flex;
|
|
379
|
-
flex-direction: column;
|
|
380
|
-
gap: 0.5rem;
|
|
381
|
-
padding: 1rem;
|
|
382
|
-
background: var(--ric-bg-result);
|
|
383
|
-
border: 1px solid var(--ric-border-result);
|
|
384
|
-
border-radius: 12px;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.ric-detail-label {
|
|
388
|
-
font-size: 0.75rem;
|
|
389
|
-
font-weight: 700;
|
|
390
|
-
color: var(--ric-text-result-label);
|
|
391
|
-
text-transform: uppercase;
|
|
392
|
-
}
|
|
393
|
-
|
|
394
|
-
.ric-detail-value {
|
|
395
|
-
font-size: 1.25rem;
|
|
396
|
-
font-weight: 800;
|
|
397
|
-
color: var(--ric-text-result-value);
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
.ric-highlight {
|
|
401
|
-
color: var(--ric-highlight-color);
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
.ric-info-footer {
|
|
405
|
-
display: flex;
|
|
406
|
-
justify-content: space-between;
|
|
407
|
-
align-items: center;
|
|
408
|
-
padding-top: 2rem;
|
|
409
|
-
border-top: 1px solid var(--ric-border-card);
|
|
410
|
-
gap: 1rem;
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
.ric-legal-badge {
|
|
414
|
-
display: flex;
|
|
415
|
-
align-items: center;
|
|
416
|
-
gap: 0.75rem;
|
|
417
|
-
padding: 0.875rem 1.25rem;
|
|
418
|
-
background: var(--ric-bg-badge);
|
|
419
|
-
color: var(--ric-text-badge);
|
|
420
|
-
border-radius: 12px;
|
|
421
|
-
font-size: 0.875rem;
|
|
422
|
-
font-weight: 600;
|
|
423
|
-
}
|
|
424
|
-
|
|
425
|
-
.ric-action-btn {
|
|
426
|
-
display: flex;
|
|
427
|
-
align-items: center;
|
|
428
|
-
gap: 0.75rem;
|
|
429
|
-
padding: 0.875rem 1.5rem;
|
|
430
|
-
background: var(--ric-bg-button);
|
|
431
|
-
color: var(--ric-text-button);
|
|
432
|
-
border: none;
|
|
433
|
-
border-radius: 12px;
|
|
434
|
-
font-size: 0.875rem;
|
|
435
|
-
font-weight: 600;
|
|
436
|
-
cursor: pointer;
|
|
437
|
-
transition: all 0.2s;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.ric-action-btn:hover {
|
|
441
|
-
background: var(--ric-bg-button-hover);
|
|
442
|
-
transform: translateY(-2px);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
:global(.ric-results-section.ric-hidden) {
|
|
446
|
-
display: none;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
:global(.ric-input-group.ric-hidden) {
|
|
450
|
-
display: none;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
@media (max-width: 768px) {
|
|
454
|
-
.ric-layout {
|
|
455
|
-
grid-template-columns: 1fr;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.ric-header h3 {
|
|
459
|
-
font-size: 1.75rem;
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.ric-result-main-value {
|
|
463
|
-
font-size: 2rem;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
.ric-info-footer {
|
|
467
|
-
flex-direction: column;
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
.ric-action-btn {
|
|
471
|
-
width: 100%;
|
|
472
|
-
justify-content: center;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.ric-legal-badge {
|
|
476
|
-
width: 100%;
|
|
477
|
-
justify-content: center;
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
</style>
|
|
481
109
|
|
|
482
110
|
<script>
|
|
483
111
|
import { RentIncreaseCalculator } from './logic';
|