@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
@@ -68,420 +68,6 @@ const { ui } = Astro.props;
68
68
  </div>
69
69
  </div>
70
70
 
71
- <style>
72
- :root {
73
- --ibs-bg-card: #fff;
74
- --ibs-border-card: #eef2f6;
75
- --ibs-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 20px 40px -8px rgba(0, 0, 0, 0.05);
76
- --ibs-header-bg: linear-gradient(90deg, #6366f1, #a855f7);
77
- --ibs-text-title: #0f172a;
78
- --ibs-text-secondary: #64748b;
79
- --ibs-text-primary: #1e293b;
80
- --ibs-bg-input-section: #f8fafc;
81
- --ibs-border-input-section: #f1f5f9;
82
- --ibs-bg-input: #fff;
83
- --ibs-text-input: #1e293b;
84
- --ibs-border-input: transparent;
85
- --ibs-focus-border: #6366f1;
86
- --ibs-focus-ring: rgba(99, 102, 241, 0.15);
87
- --ibs-icon-color: #6366f1;
88
- --ibs-bg-button: #0f172a;
89
- --ibs-text-button: #fff;
90
- --ibs-bg-button-hover: #1e293b;
91
- --ibs-bg-result: #fff;
92
- --ibs-border-result: #eef2f6;
93
- --ibs-text-result-value: #0f172a;
94
- --ibs-text-result-label: #94a3b8;
95
- --ibs-bg-bank-info: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
96
- --ibs-border-bank-info: #e2e8f0;
97
- --ibs-bg-error: #fef2f2;
98
- --ibs-border-error: #fee2e2;
99
- --ibs-text-error: #dc2626;
100
- --ibs-bg-copy-btn: #f1f5f9;
101
- --ibs-text-copy-btn: #64748b;
102
- }
103
-
104
- :global(.theme-dark) {
105
- --ibs-bg-card: #0f172a;
106
- --ibs-border-card: rgba(255, 255, 255, 0.05);
107
- --ibs-text-title: #f8fafc;
108
- --ibs-text-secondary: #94a3b8;
109
- --ibs-text-primary: #f8fafc;
110
- --ibs-bg-input-section: rgba(30, 41, 59, 0.5);
111
- --ibs-border-input-section: rgba(255, 255, 255, 0.05);
112
- --ibs-bg-input: #1e293b;
113
- --ibs-text-input: #f8fafc;
114
- --ibs-border-input: #334155;
115
- --ibs-focus-border: #6366f1;
116
- --ibs-focus-ring: rgba(99, 102, 241, 0.15);
117
- --ibs-icon-color: #60a5fa;
118
- --ibs-bg-button: #6366f1;
119
- --ibs-text-button: #fff;
120
- --ibs-bg-button-hover: #4f46e5;
121
- --ibs-bg-result: #1e293b;
122
- --ibs-border-result: rgba(255, 255, 255, 0.05);
123
- --ibs-text-result-value: #f8fafc;
124
- --ibs-text-result-label: #94a3b8;
125
- --ibs-bg-bank-info: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
126
- --ibs-border-bank-info: rgba(255, 255, 255, 0.05);
127
- --ibs-bg-error: rgba(220, 38, 38, 0.1);
128
- --ibs-border-error: rgba(220, 38, 38, 0.2);
129
- --ibs-text-error: #fca5a5;
130
- --ibs-bg-copy-btn: #0f172a;
131
- --ibs-text-copy-btn: #94a3b8;
132
- }
133
-
134
- :global([data-theme='dark']) {
135
- --ibs-bg-card: #0f172a;
136
- --ibs-border-card: rgba(255, 255, 255, 0.05);
137
- --ibs-text-title: #f8fafc;
138
- --ibs-text-secondary: #94a3b8;
139
- --ibs-text-primary: #f8fafc;
140
- --ibs-bg-input-section: rgba(30, 41, 59, 0.5);
141
- --ibs-border-input-section: rgba(255, 255, 255, 0.05);
142
- --ibs-bg-input: #1e293b;
143
- --ibs-text-input: #f8fafc;
144
- --ibs-border-input: #334155;
145
- --ibs-focus-border: #6366f1;
146
- --ibs-focus-ring: rgba(99, 102, 241, 0.15);
147
- --ibs-icon-color: #60a5fa;
148
- --ibs-bg-button: #6366f1;
149
- --ibs-text-button: #fff;
150
- --ibs-bg-button-hover: #4f46e5;
151
- --ibs-bg-result: #1e293b;
152
- --ibs-border-result: rgba(255, 255, 255, 0.05);
153
- --ibs-text-result-value: #f8fafc;
154
- --ibs-text-result-label: #94a3b8;
155
- --ibs-bg-bank-info: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
156
- --ibs-border-bank-info: rgba(255, 255, 255, 0.05);
157
- --ibs-bg-error: rgba(220, 38, 38, 0.1);
158
- --ibs-border-error: rgba(220, 38, 38, 0.2);
159
- --ibs-text-error: #fca5a5;
160
- --ibs-bg-copy-btn: #0f172a;
161
- --ibs-text-copy-btn: #94a3b8;
162
- }
163
-
164
- .ibs-container {
165
- width: 100%;
166
- max-width: 900px;
167
- margin: 0 auto;
168
- perspective: 1000px;
169
- padding: 2rem 1rem;
170
- }
171
-
172
- .ibs-card {
173
- background: var(--ibs-bg-card);
174
- border: 1px solid var(--ibs-border-card);
175
- border-radius: 32px;
176
- padding: 3rem;
177
- box-shadow: var(--ibs-shadow-card);
178
- position: relative;
179
- overflow: hidden;
180
- color-scheme: light;
181
- }
182
-
183
- :global(.theme-dark) .ibs-card,
184
- :global([data-theme='dark']) .ibs-card {
185
- color-scheme: dark;
186
- }
187
-
188
- .ibs-card::before {
189
- content: '';
190
- position: absolute;
191
- top: 0;
192
- left: 0;
193
- right: 0;
194
- height: 6px;
195
- background: var(--ibs-header-bg);
196
- }
197
-
198
- .ibs-header {
199
- text-align: left;
200
- margin-bottom: 3rem;
201
- }
202
-
203
- .ibs-header h3 {
204
- font-size: 2.25rem;
205
- font-weight: 950;
206
- color: var(--ibs-text-title);
207
- letter-spacing: -0.04em;
208
- margin-bottom: 0.75rem;
209
- line-height: 1;
210
- }
211
-
212
- .ibs-header p {
213
- color: var(--ibs-text-secondary);
214
- font-size: 1.1rem;
215
- max-width: 500px;
216
- line-height: 1.6;
217
- }
218
-
219
- .ibs-input-section {
220
- display: flex;
221
- flex-direction: column;
222
- gap: 2rem;
223
- background: var(--ibs-bg-input-section);
224
- padding: 2rem;
225
- border-radius: 24px;
226
- border: 1px solid var(--ibs-border-input-section);
227
- }
228
-
229
- .ibs-input-group {
230
- display: flex;
231
- flex-direction: column;
232
- gap: 1rem;
233
- }
234
-
235
- .ibs-input-group label {
236
- font-size: 0.75rem;
237
- font-weight: 800;
238
- color: var(--ibs-text-secondary);
239
- text-transform: uppercase;
240
- letter-spacing: 0.1em;
241
- }
242
-
243
- .ibs-input-wrapper {
244
- position: relative;
245
- display: flex;
246
- align-items: center;
247
- background: var(--ibs-bg-input);
248
- border-radius: 20px;
249
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
250
- border: 2px solid var(--ibs-border-input);
251
- transition: all 0.3s ease;
252
- }
253
-
254
- .ibs-input-wrapper:focus-within {
255
- border-color: var(--ibs-focus-border);
256
- box-shadow: 0 0 0 4px var(--ibs-focus-ring);
257
- }
258
-
259
- .ibs-input-wrapper input {
260
- width: 100%;
261
- padding: 1.5rem;
262
- border: none;
263
- background: transparent;
264
- font-size: 1.5rem;
265
- font-weight: 800;
266
- color: var(--ibs-text-input);
267
- outline: none;
268
- letter-spacing: 0.02em;
269
- }
270
-
271
- .ibs-input-wrapper input::placeholder {
272
- color: var(--ibs-text-secondary);
273
- opacity: 0.5;
274
- }
275
-
276
- .ibs-input-icon {
277
- margin-right: 1.5rem;
278
- font-size: 1.75rem;
279
- opacity: 0.6;
280
- flex-shrink: 0;
281
- }
282
-
283
- .ibs-btn-convert {
284
- width: 100%;
285
- padding: 1.25rem;
286
- background: var(--ibs-bg-button);
287
- color: var(--ibs-text-button);
288
- border: none;
289
- border-radius: 20px;
290
- font-size: 1.1rem;
291
- font-weight: 800;
292
- cursor: pointer;
293
- transition: all 0.3s ease;
294
- display: flex;
295
- align-items: center;
296
- justify-content: center;
297
- gap: 0.75rem;
298
- }
299
-
300
- .ibs-btn-convert:hover {
301
- background: var(--ibs-bg-button-hover);
302
- transform: translateY(-2px);
303
- box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
304
- }
305
-
306
- .ibs-results-section {
307
- margin-top: 3rem;
308
- display: grid;
309
- grid-template-columns: repeat(2, 1fr);
310
- gap: 1.5rem;
311
- animation: ibs-slide-up 0.5s ease-out;
312
- }
313
-
314
- :global(.ibs-results-section.ibs-hidden) {
315
- display: none;
316
- }
317
-
318
- :global(.ibs-error-message.ibs-hidden) {
319
- display: none;
320
- }
321
-
322
- :global(.ibs-btn-copy-success span[data-icon]) {
323
- background-color: #10b981;
324
- }
325
-
326
- @keyframes ibs-slide-up {
327
- from {
328
- opacity: 0;
329
- transform: translateY(20px);
330
- }
331
- to {
332
- opacity: 1;
333
- transform: translateY(0);
334
- }
335
- }
336
-
337
- .ibs-result-card {
338
- background: var(--ibs-bg-result);
339
- border: 1px solid var(--ibs-border-result);
340
- padding: 1.5rem 2rem;
341
- border-radius: 24px;
342
- display: flex;
343
- flex-direction: column;
344
- justify-content: center;
345
- gap: 0.5rem;
346
- position: relative;
347
- transition: all 0.3s ease;
348
- }
349
-
350
- .ibs-result-card:hover {
351
- border-color: var(--ibs-border-card);
352
- box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.05);
353
- }
354
-
355
- .ibs-result-label {
356
- font-size: 0.7rem;
357
- font-weight: 800;
358
- color: var(--ibs-text-result-label);
359
- text-transform: uppercase;
360
- letter-spacing: 0.08em;
361
- }
362
-
363
- .ibs-result-value {
364
- font-size: 1.5rem;
365
- font-weight: 900;
366
- color: var(--ibs-text-result-value);
367
- letter-spacing: -0.02em;
368
- overflow-wrap: break-word;
369
- }
370
-
371
- .ibs-btn-copy-result {
372
- position: absolute;
373
- top: 1rem;
374
- right: 1rem;
375
- cursor: pointer;
376
- background: var(--ibs-bg-copy-btn);
377
- border: none;
378
- padding: 8px;
379
- border-radius: 10px;
380
- color: var(--ibs-text-copy-btn);
381
- transition: all 0.2s;
382
- display: flex;
383
- font-size: 1.2rem;
384
- }
385
-
386
- .ibs-btn-copy-result:hover {
387
- background: var(--ibs-focus-border);
388
- color: #fff;
389
- transform: scale(1.1);
390
- }
391
-
392
- .ibs-btn-copy-success {
393
- background: #10b981;
394
- }
395
-
396
- .ibs-bank-info {
397
- grid-column: span 2;
398
- background: var(--ibs-bg-bank-info);
399
- padding: 2rem;
400
- border-radius: 24px;
401
- display: flex;
402
- align-items: center;
403
- gap: 1.5rem;
404
- border: 1px solid var(--ibs-border-bank-info);
405
- }
406
-
407
- .ibs-bank-logo-placeholder {
408
- width: 64px;
409
- height: 64px;
410
- background: var(--ibs-bg-input);
411
- border-radius: 20px;
412
- display: flex;
413
- align-items: center;
414
- justify-content: center;
415
- border: 1px solid var(--ibs-border-result);
416
- font-size: 2rem;
417
- box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.04);
418
- flex-shrink: 0;
419
- }
420
-
421
- .ibs-bank-details {
422
- flex: 1;
423
- }
424
-
425
- .ibs-bank-name-label {
426
- font-size: 0.75rem;
427
- font-weight: 800;
428
- color: var(--ibs-text-secondary);
429
- text-transform: uppercase;
430
- margin-bottom: 0.25rem;
431
- }
432
-
433
- .ibs-bank-name-value {
434
- font-size: 1.5rem;
435
- font-weight: 900;
436
- color: var(--ibs-text-result-value);
437
- letter-spacing: -0.03em;
438
- }
439
-
440
- .ibs-error-message {
441
- grid-column: span 2;
442
- background: var(--ibs-bg-error);
443
- border: 1px solid var(--ibs-border-error);
444
- padding: 1.25rem;
445
- border-radius: 20px;
446
- color: var(--ibs-text-error);
447
- font-size: 1rem;
448
- font-weight: 700;
449
- display: flex;
450
- align-items: center;
451
- gap: 0.75rem;
452
- }
453
-
454
- @media (max-width: 768px) {
455
- .ibs-card {
456
- padding: 2rem;
457
- }
458
-
459
- .ibs-header h3 {
460
- font-size: 1.75rem;
461
- }
462
-
463
- .ibs-input-wrapper input {
464
- font-size: 1.2rem;
465
- }
466
- }
467
-
468
- @media (max-width: 640px) {
469
- .ibs-results-section {
470
- grid-template-columns: 1fr;
471
- }
472
-
473
- .ibs-bank-info {
474
- grid-column: span 1;
475
- flex-direction: column;
476
- text-align: center;
477
- gap: 1rem;
478
- }
479
-
480
- .ibs-error-message {
481
- grid-column: span 1;
482
- }
483
- }
484
- </style>
485
71
 
486
72
  <script>
487
73
  import { IBANConverter } from './logic';