@nice2dev/ui-money 1.0.11 → 1.0.14
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/dist/components/NiceMoneyInput.d.ts +15 -0
- package/dist/components/NiceTaxBreakdown.d.ts +46 -0
- package/dist/exchange.d.ts +39 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +948 -755
- package/dist/processors.d.ts +23 -0
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/processors.d.ts
CHANGED
|
@@ -76,6 +76,29 @@ export declare function makeRazorpayAdapter(executor?: Partial<ProcessorExecutor
|
|
|
76
76
|
export declare function makePayUAdapter(executor?: Partial<ProcessorExecutor>): PaymentProcessor;
|
|
77
77
|
/** Przelewy24 (https://www.przelewy24.pl) — Polish bank-transfer aggregator + BLIK. */
|
|
78
78
|
export declare function makePrzelewy24Adapter(executor?: Partial<ProcessorExecutor>): PaymentProcessor;
|
|
79
|
+
/** Tpay (https://tpay.com) — Polish payment gateway (cards, BLIK, transfers, Apple Pay). */
|
|
80
|
+
export declare function makeTpayAdapter(executor?: Partial<ProcessorExecutor> & {
|
|
81
|
+
merchantId?: string;
|
|
82
|
+
apiKey?: string;
|
|
83
|
+
sandbox?: boolean;
|
|
84
|
+
}): PaymentProcessor;
|
|
85
|
+
/** Autopay (formerly BlueMedia, https://autopay.pl) — popular PL e-commerce gateway. */
|
|
86
|
+
export declare function makeAutopayAdapter(executor?: Partial<ProcessorExecutor> & {
|
|
87
|
+
serviceId?: string;
|
|
88
|
+
sharedSecret?: string;
|
|
89
|
+
sandbox?: boolean;
|
|
90
|
+
}): PaymentProcessor;
|
|
91
|
+
/**
|
|
92
|
+
* BLIK (PL native one-time-code payment scheme). Wraps an underlying acquirer
|
|
93
|
+
* (P24 / Tpay / PayU) so consumers can switch routing without changing UI code.
|
|
94
|
+
*
|
|
95
|
+
* `code` accepts the 6-digit BLIK code captured by `NiceCreditCardInput` (with
|
|
96
|
+
* `mode='blik'`) or a custom `NiceBlikInput`.
|
|
97
|
+
*/
|
|
98
|
+
export declare function makeBlikAdapter(options?: {
|
|
99
|
+
acquirer?: 'p24' | 'tpay' | 'payu' | 'native';
|
|
100
|
+
code?: string;
|
|
101
|
+
} & Partial<ProcessorExecutor>): PaymentProcessor;
|
|
79
102
|
/** Klarna (https://www.klarna.com) — pay-later / instalments. */
|
|
80
103
|
export declare function makeKlarnaAdapter(executor?: Partial<ProcessorExecutor>): PaymentProcessor;
|
|
81
104
|
/** Coinbase Commerce — crypto payments (BTC, ETH, USDC, …). */
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.nice-money{font-variant-numeric:tabular-nums}.nice-money--negative .nice-money__value{color:var(--nice-
|
|
1
|
+
.nice-money{font-variant-numeric:tabular-nums}.nice-money--negative .nice-money__value{color:var(--nice-danger, #dc2626)}.nice-money__converted{margin-left:.25em;opacity:.7;font-size:.875em}.nice-currency-selector{display:inline-flex;align-items:center;gap:.25rem}.nice-currency-selector__select{font:inherit;padding:.375rem .5rem;border:1px solid var(--nice-border, #d1d5db);border-radius:var(--nice-radius-sm, 4px);background:var(--nice-bg, #fff);color:inherit}.nice-currency-selector__search{font:inherit;padding:.25rem .5rem;border:1px solid var(--nice-border, #d1d5db);border-radius:var(--nice-radius-sm, 4px);width:8rem}.nice-currency-selector--compact .nice-currency-selector__search{display:none}.nice-money-input{display:flex;flex-direction:column;gap:.25rem}.nice-money-input__label{font-size:.875rem;font-weight:500}.nice-money-input__required{color:var(--nice-danger, #dc2626);margin-left:.125rem}.nice-money-input__row{display:flex;align-items:stretch;gap:.25rem;border:1px solid var(--nice-border, #d1d5db);border-radius:var(--nice-radius-md, 6px);background:var(--nice-bg, #fff);padding:.125rem}.nice-money-input--error .nice-money-input__row{border-color:var(--nice-danger, #dc2626)}.nice-money-input--disabled{opacity:.6;pointer-events:none}.nice-money-input__currency .nice-currency-selector__select{border:none;background:transparent;padding:.5rem}.nice-money-input__symbol{display:inline-flex;align-items:center;padding:0 .5rem;color:var(--nice-text-muted, #6b7280);font-weight:600}.nice-money-input__amount{flex:1;border:none;background:transparent;font:inherit;padding:.5rem;outline:none;font-variant-numeric:tabular-nums;text-align:right;min-width:0}.nice-money-input__step{border:none;background:var(--nice-bg-secondary, #f3f4f6);border-radius:var(--nice-radius-sm, 4px);width:2rem;font-size:1.125rem;cursor:pointer}.nice-money-input__step:disabled{opacity:.4;cursor:not-allowed}.nice-money-input--sm .nice-money-input__amount{padding:.25rem;font-size:.875rem}.nice-money-input--lg .nice-money-input__amount{padding:.75rem;font-size:1.125rem}.nice-money-input__preview{font-size:.8125rem;color:var(--nice-text-muted, #6b7280)}.nice-money-input__error{font-size:.8125rem;color:var(--nice-danger, #dc2626)}.nice-money-input__helper{font-size:.8125rem;color:var(--nice-text-muted, #6b7280)}.nice-credit-card{display:flex;flex-direction:column;gap:.5rem}.nice-credit-card__row{display:flex;flex-direction:column;gap:.25rem}.nice-credit-card__row--split{flex-direction:row;gap:.5rem}.nice-credit-card__row--split .nice-credit-card__field{flex:1}.nice-credit-card__field{display:flex;flex-direction:column;gap:.125rem}.nice-credit-card__label{font-size:.8125rem;font-weight:500;color:var(--nice-text-muted, #4b5563)}.nice-credit-card__input-wrapper{position:relative;display:flex;align-items:center}.nice-credit-card__input{font:inherit;font-variant-numeric:tabular-nums;padding:.5rem .75rem;border:1px solid var(--nice-border, #d1d5db);border-radius:var(--nice-radius-md, 6px);background:var(--nice-bg, #fff);width:100%;outline:none}.nice-credit-card__input:focus{border-color:var(--nice-primary, #2563eb);box-shadow:0 0 0 2px var(--nice-primary-bg, #bfdbfe)}.nice-credit-card__input[aria-invalid=true]{border-color:var(--nice-danger, #dc2626)}.nice-credit-card__brand{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);font-size:.75rem;font-weight:700;letter-spacing:.05em;padding:.125rem .375rem;border-radius:var(--nice-radius-sm, 4px);background:var(--nice-bg-secondary, #f3f4f6);color:var(--nice-text-muted, #4b5563);pointer-events:none}.nice-credit-card__brand--visa{background:#1a1f71;color:var(--nice-bg, #FFF)}.nice-credit-card__brand--mastercard{background:#eb001b;color:var(--nice-bg, #FFF)}.nice-credit-card__brand--amex{background:#2e77bb;color:var(--nice-bg, #FFF)}.nice-credit-card__brand--discover{background:#ff6000;color:var(--nice-bg, #FFF)}.nice-credit-card__error{font-size:.75rem;color:var(--nice-danger, #dc2626)}.nice-payment-form{display:flex;flex-direction:column;gap:.75rem;max-width:28rem}.nice-payment-form__total{display:flex;justify-content:space-between;align-items:baseline;padding:.75rem 1rem;background:var(--nice-bg-secondary, #f9fafb);border-radius:var(--nice-radius-md, 6px);font-size:1.125rem;font-weight:600}.nice-payment-form__total-label{color:var(--nice-text-muted, #6b7280);font-size:.875rem;font-weight:500}.nice-payment-form__description{font-size:.875rem;color:var(--nice-text-muted, #4b5563);margin:0}.nice-payment-form__warning,.nice-payment-form__error{padding:.5rem .75rem;border-radius:var(--nice-radius-md, 6px);font-size:.875rem}.nice-payment-form__warning{background:var(--nice-warning-bg, #fef3c7);color:var(--nice-warning-text, #92400e)}.nice-payment-form__error{background:var(--nice-danger-bg, #fee2e2);color:var(--nice-danger-text, #991b1b)}.nice-payment-form__submit{font:inherit;font-weight:600;padding:.75rem 1rem;border:none;border-radius:var(--nice-radius-md, 6px);background:var(--nice-primary, #2563eb);color:var(--nice-text-inverse, #fff);cursor:pointer}.nice-payment-form__submit:disabled{opacity:.5;cursor:not-allowed}.nice-payment-form__processor{text-align:center;font-size:.75rem;color:var(--nice-text-muted, #6b7280);margin:0}.nice-price-tag{display:inline-flex;align-items:baseline;gap:.5rem;font-variant-numeric:tabular-nums}.nice-price-tag__amount{font-weight:700}.nice-price-tag--sm{font-size:.875rem}.nice-price-tag--md{font-size:1rem}.nice-price-tag--lg{font-size:1.25rem}.nice-price-tag--xl{font-size:1.75rem}.nice-price-tag__period{font-size:.75em;color:var(--nice-text-muted, #6b7280);margin-left:.125em}.nice-price-tag__original{color:var(--nice-text-muted, #9ca3af);font-size:.875em}.nice-price-tag__discount{background:var(--nice-success, #16a34a);color:var(--nice-text-inverse, #fff);border-radius:var(--nice-radius-sm, 4px);padding:.125em .375em;font-size:.75em;font-weight:700}.nice-currency-converter{display:flex;flex-direction:column;gap:.5rem}.nice-currency-converter__output{display:flex;align-items:center;gap:.5rem;padding:.5rem;border:1px solid var(--nice-border, #d1d5db);border-radius:var(--nice-radius-md, 6px)}.nice-currency-converter__amount{font-weight:600;font-variant-numeric:tabular-nums;margin-left:auto}.nice-currency-converter__rate{font-size:.8125rem;color:var(--nice-text-muted, #6b7280);margin:0}.nice-currency-converter__inverse{opacity:.7}.nice-currency-converter__error{color:var(--nice-danger, #dc2626);font-size:.8125rem}.nice-tax-breakdown{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}.nice-tax-breakdown th,.nice-tax-breakdown td{padding:var(--nice-space-2, 8px) var(--nice-space-2-5, 10px);border-bottom:1px solid var(--nice-border, #e5e7eb);text-align:left}.nice-tax-breakdown--compact th,.nice-tax-breakdown--compact td{padding:var(--nice-space-1, 4px) var(--nice-space-2, 8px);font-size:.875rem}.nice-tax-breakdown__num{text-align:right;font-variant-numeric:tabular-nums}.nice-tax-breakdown__rate{text-align:right}.nice-tax-breakdown__totals{font-weight:600;background:var(--nice-surface-alt, #f9fafb)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nice2dev/ui-money",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"description": "Nice2Dev Money & Payments — Money / MoneyInput / CurrencySelector / CreditCardInput / PaymentForm + ISO 4217 catalog, Luhn validation, exchange-rate & payment-processor adapters",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"prepublishOnly": "npm run build"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
|
-
"@nice2dev/ui-core": "1.0.
|
|
36
|
+
"@nice2dev/ui-core": "^1.0.14",
|
|
37
37
|
"react": ">=17.0.0",
|
|
38
38
|
"react-dom": ">=17.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@nice2dev/ui-core": "1.0.
|
|
41
|
+
"@nice2dev/ui-core": "^1.0.14",
|
|
42
42
|
"@testing-library/jest-dom": "^6.9.1",
|
|
43
43
|
"@testing-library/react": "^14.0.0",
|
|
44
44
|
"@types/react": "^18.2.0",
|