@sazito/checkout 0.2.1 → 0.4.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/README.md +54 -0
- package/dist/chunks/{labels-BlZiVd3n.cjs → labels-CnPllzhT.cjs} +28 -9
- package/dist/chunks/labels-CnPllzhT.cjs.map +1 -0
- package/dist/chunks/{labels-CTR6b-KZ.js → labels-e8w4zRbg.js} +28 -9
- package/dist/chunks/labels-e8w4zRbg.js.map +1 -0
- package/dist/chunks/{use-checkout-DwHd4uFh.js → use-checkout-BM810__v.js} +5 -3
- package/dist/chunks/use-checkout-BM810__v.js.map +1 -0
- package/dist/chunks/{use-checkout-BEaLKgNa.cjs → use-checkout-DPtLgxlA.cjs} +5 -3
- package/dist/chunks/use-checkout-DPtLgxlA.cjs.map +1 -0
- package/dist/core/index.cjs +3 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +27 -3
- package/dist/core/index.d.ts +27 -3
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/next/index.cjs +34 -13
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +48 -9
- package/dist/next/index.d.ts +48 -9
- package/dist/next/index.js +35 -14
- package/dist/next/index.js.map +1 -1
- package/dist/next/payment-return.cjs +40 -0
- package/dist/next/payment-return.cjs.map +1 -0
- package/dist/next/payment-return.d.cts +26 -0
- package/dist/next/payment-return.d.ts +26 -0
- package/dist/next/payment-return.js +38 -0
- package/dist/next/payment-return.js.map +1 -0
- package/dist/react/index.cjs +2 -2
- package/dist/react/index.d.cts +9 -1
- package/dist/react/index.d.ts +9 -1
- package/dist/react/index.js +2 -2
- package/dist/styles.css +29 -28
- package/package.json +15 -1
- package/dist/chunks/labels-BlZiVd3n.cjs.map +0 -1
- package/dist/chunks/labels-CTR6b-KZ.js.map +0 -1
- package/dist/chunks/use-checkout-BEaLKgNa.cjs.map +0 -1
- package/dist/chunks/use-checkout-DwHd4uFh.js.map +0 -1
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Parse Sazito's nested payment callback path into checkout-ready data.
|
|
5
|
+
* Returns undefined for ordinary checkout URLs and malformed callbacks.
|
|
6
|
+
*/
|
|
7
|
+
function parsePaymentReturn(segments, searchParams = {}) {
|
|
8
|
+
const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] = segments ?? [];
|
|
9
|
+
const paymentId = Number(rawPaymentId);
|
|
10
|
+
const identifier = rawIdentifier?.trim();
|
|
11
|
+
if (segments?.length !== 5 ||
|
|
12
|
+
!resultRoute?.toLowerCase().endsWith('result') ||
|
|
13
|
+
paymentSegment?.toLowerCase() !== 'payment' ||
|
|
14
|
+
identifierSegment?.toLowerCase() !== 'identifier' ||
|
|
15
|
+
!Number.isSafeInteger(paymentId) ||
|
|
16
|
+
paymentId <= 0 ||
|
|
17
|
+
!identifier) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const params = normalizeSearchParams(searchParams);
|
|
21
|
+
params.id = String(paymentId);
|
|
22
|
+
params.paymentIdentifier = identifier;
|
|
23
|
+
return {
|
|
24
|
+
payment: { id: paymentId, identifier },
|
|
25
|
+
params
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function normalizeSearchParams(searchParams) {
|
|
29
|
+
const normalized = {};
|
|
30
|
+
for (const [key, value] of Object.entries(searchParams)) {
|
|
31
|
+
const firstValue = Array.isArray(value) ? value[0] : value;
|
|
32
|
+
if (firstValue !== undefined) {
|
|
33
|
+
normalized[key] = firstValue;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return normalized;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports.parsePaymentReturn = parsePaymentReturn;
|
|
40
|
+
//# sourceMappingURL=payment-return.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-return.cjs","sources":["../../src/core/payment-return.ts"],"sourcesContent":["import type {\n CheckoutPaymentReturn,\n PaymentReturnSearchParams\n} from './types';\n\n/**\n * Parse Sazito's nested payment callback path into checkout-ready data.\n * Returns undefined for ordinary checkout URLs and malformed callbacks.\n */\nexport function parsePaymentReturn(\n segments: readonly string[] | undefined,\n searchParams: PaymentReturnSearchParams = {}\n): CheckoutPaymentReturn | undefined {\n const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] =\n segments ?? [];\n const paymentId = Number(rawPaymentId);\n const identifier = rawIdentifier?.trim();\n\n if (\n segments?.length !== 5 ||\n !resultRoute?.toLowerCase().endsWith('result') ||\n paymentSegment?.toLowerCase() !== 'payment' ||\n identifierSegment?.toLowerCase() !== 'identifier' ||\n !Number.isSafeInteger(paymentId) ||\n paymentId <= 0 ||\n !identifier\n ) {\n return undefined;\n }\n\n const params = normalizeSearchParams(searchParams);\n params.id = String(paymentId);\n params.paymentIdentifier = identifier;\n\n return {\n payment: { id: paymentId, identifier },\n params\n };\n}\n\nfunction normalizeSearchParams(\n searchParams: PaymentReturnSearchParams\n): Record<string, string> {\n const normalized: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(searchParams)) {\n const firstValue = Array.isArray(value) ? value[0] : value;\n if (firstValue !== undefined) {\n normalized[key] = firstValue;\n }\n }\n\n return normalized;\n}\n"],"names":[],"mappings":";;AAKA;;;AAGG;SACa,kBAAkB,CAChC,QAAuC,EACvC,eAA0C,EAAE,EAAA;AAE5C,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,CAAC,GACjF,QAAQ,IAAI,EAAE;AAChB,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE;AAExC,IAAA,IACE,QAAQ,EAAE,MAAM,KAAK,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC9C,QAAA,cAAc,EAAE,WAAW,EAAE,KAAK,SAAS;AAC3C,QAAA,iBAAiB,EAAE,WAAW,EAAE,KAAK,YAAY;AACjD,QAAA,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;AAChC,QAAA,SAAS,IAAI,CAAC;QACd,CAAC,UAAU,EACX;AACA,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAClD,IAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,MAAM,CAAC,iBAAiB,GAAG,UAAU;IAErC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;QACtC;KACD;AACH;AAEA,SAAS,qBAAqB,CAC5B,YAAuC,EAAA;IAEvC,MAAM,UAAU,GAA2B,EAAE;AAE7C,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACvD,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1D,QAAA,IAAI,UAAU,KAAK,SAAS,EAAE;AAC5B,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;QAC9B;IACF;AAEA,IAAA,OAAO,UAAU;AACnB;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout domain types.
|
|
3
|
+
*
|
|
4
|
+
* The package re-exports the SDK data models (camelCase) and layers
|
|
5
|
+
* checkout-specific state, config, events and effects on top.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Normalized payment callback data accepted by `SazitoCheckoutPage`. */
|
|
9
|
+
interface CheckoutPaymentReturn {
|
|
10
|
+
payment: {
|
|
11
|
+
id: number;
|
|
12
|
+
identifier: string;
|
|
13
|
+
};
|
|
14
|
+
params: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
/** Search-param shape exposed by current Next.js App Router pages. */
|
|
17
|
+
type PaymentReturnSearchParams = Record<string, string | string[] | undefined>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Parse Sazito's nested payment callback path into checkout-ready data.
|
|
21
|
+
* Returns undefined for ordinary checkout URLs and malformed callbacks.
|
|
22
|
+
*/
|
|
23
|
+
declare function parsePaymentReturn(segments: readonly string[] | undefined, searchParams?: PaymentReturnSearchParams): CheckoutPaymentReturn | undefined;
|
|
24
|
+
|
|
25
|
+
export { parsePaymentReturn };
|
|
26
|
+
export type { CheckoutPaymentReturn, PaymentReturnSearchParams };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkout domain types.
|
|
3
|
+
*
|
|
4
|
+
* The package re-exports the SDK data models (camelCase) and layers
|
|
5
|
+
* checkout-specific state, config, events and effects on top.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/** Normalized payment callback data accepted by `SazitoCheckoutPage`. */
|
|
9
|
+
interface CheckoutPaymentReturn {
|
|
10
|
+
payment: {
|
|
11
|
+
id: number;
|
|
12
|
+
identifier: string;
|
|
13
|
+
};
|
|
14
|
+
params: Record<string, string>;
|
|
15
|
+
}
|
|
16
|
+
/** Search-param shape exposed by current Next.js App Router pages. */
|
|
17
|
+
type PaymentReturnSearchParams = Record<string, string | string[] | undefined>;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Parse Sazito's nested payment callback path into checkout-ready data.
|
|
21
|
+
* Returns undefined for ordinary checkout URLs and malformed callbacks.
|
|
22
|
+
*/
|
|
23
|
+
declare function parsePaymentReturn(segments: readonly string[] | undefined, searchParams?: PaymentReturnSearchParams): CheckoutPaymentReturn | undefined;
|
|
24
|
+
|
|
25
|
+
export { parsePaymentReturn };
|
|
26
|
+
export type { CheckoutPaymentReturn, PaymentReturnSearchParams };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse Sazito's nested payment callback path into checkout-ready data.
|
|
3
|
+
* Returns undefined for ordinary checkout URLs and malformed callbacks.
|
|
4
|
+
*/
|
|
5
|
+
function parsePaymentReturn(segments, searchParams = {}) {
|
|
6
|
+
const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] = segments ?? [];
|
|
7
|
+
const paymentId = Number(rawPaymentId);
|
|
8
|
+
const identifier = rawIdentifier?.trim();
|
|
9
|
+
if (segments?.length !== 5 ||
|
|
10
|
+
!resultRoute?.toLowerCase().endsWith('result') ||
|
|
11
|
+
paymentSegment?.toLowerCase() !== 'payment' ||
|
|
12
|
+
identifierSegment?.toLowerCase() !== 'identifier' ||
|
|
13
|
+
!Number.isSafeInteger(paymentId) ||
|
|
14
|
+
paymentId <= 0 ||
|
|
15
|
+
!identifier) {
|
|
16
|
+
return undefined;
|
|
17
|
+
}
|
|
18
|
+
const params = normalizeSearchParams(searchParams);
|
|
19
|
+
params.id = String(paymentId);
|
|
20
|
+
params.paymentIdentifier = identifier;
|
|
21
|
+
return {
|
|
22
|
+
payment: { id: paymentId, identifier },
|
|
23
|
+
params
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function normalizeSearchParams(searchParams) {
|
|
27
|
+
const normalized = {};
|
|
28
|
+
for (const [key, value] of Object.entries(searchParams)) {
|
|
29
|
+
const firstValue = Array.isArray(value) ? value[0] : value;
|
|
30
|
+
if (firstValue !== undefined) {
|
|
31
|
+
normalized[key] = firstValue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return normalized;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { parsePaymentReturn };
|
|
38
|
+
//# sourceMappingURL=payment-return.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payment-return.js","sources":["../../src/core/payment-return.ts"],"sourcesContent":["import type {\n CheckoutPaymentReturn,\n PaymentReturnSearchParams\n} from './types';\n\n/**\n * Parse Sazito's nested payment callback path into checkout-ready data.\n * Returns undefined for ordinary checkout URLs and malformed callbacks.\n */\nexport function parsePaymentReturn(\n segments: readonly string[] | undefined,\n searchParams: PaymentReturnSearchParams = {}\n): CheckoutPaymentReturn | undefined {\n const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] =\n segments ?? [];\n const paymentId = Number(rawPaymentId);\n const identifier = rawIdentifier?.trim();\n\n if (\n segments?.length !== 5 ||\n !resultRoute?.toLowerCase().endsWith('result') ||\n paymentSegment?.toLowerCase() !== 'payment' ||\n identifierSegment?.toLowerCase() !== 'identifier' ||\n !Number.isSafeInteger(paymentId) ||\n paymentId <= 0 ||\n !identifier\n ) {\n return undefined;\n }\n\n const params = normalizeSearchParams(searchParams);\n params.id = String(paymentId);\n params.paymentIdentifier = identifier;\n\n return {\n payment: { id: paymentId, identifier },\n params\n };\n}\n\nfunction normalizeSearchParams(\n searchParams: PaymentReturnSearchParams\n): Record<string, string> {\n const normalized: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(searchParams)) {\n const firstValue = Array.isArray(value) ? value[0] : value;\n if (firstValue !== undefined) {\n normalized[key] = firstValue;\n }\n }\n\n return normalized;\n}\n"],"names":[],"mappings":"AAKA;;;AAGG;SACa,kBAAkB,CAChC,QAAuC,EACvC,eAA0C,EAAE,EAAA;AAE5C,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,CAAC,GACjF,QAAQ,IAAI,EAAE;AAChB,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE;AAExC,IAAA,IACE,QAAQ,EAAE,MAAM,KAAK,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC9C,QAAA,cAAc,EAAE,WAAW,EAAE,KAAK,SAAS;AAC3C,QAAA,iBAAiB,EAAE,WAAW,EAAE,KAAK,YAAY;AACjD,QAAA,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;AAChC,QAAA,SAAS,IAAI,CAAC;QACd,CAAC,UAAU,EACX;AACA,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAClD,IAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,MAAM,CAAC,iBAAiB,GAAG,UAAU;IAErC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;QACtC;KACD;AACH;AAEA,SAAS,qBAAqB,CAC5B,YAAuC,EAAA;IAEvC,MAAM,UAAU,GAA2B,EAAE;AAE7C,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACvD,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1D,QAAA,IAAI,UAAU,KAAK,SAAS,EAAE;AAC5B,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;QAC9B;IACF;AAEA,IAAA,OAAO,UAAU;AACnB;;;;"}
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var useCheckout = require('../chunks/use-checkout-
|
|
4
|
+
var useCheckout = require('../chunks/use-checkout-DPtLgxlA.cjs');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
|
-
require('../chunks/labels-
|
|
7
|
+
require('../chunks/labels-CnPllzhT.cjs');
|
|
8
8
|
require('@sazito/client-sdk');
|
|
9
9
|
|
|
10
10
|
|
package/dist/react/index.d.cts
CHANGED
|
@@ -94,6 +94,10 @@ interface CheckoutCredentials {
|
|
|
94
94
|
id: number;
|
|
95
95
|
identifier: string;
|
|
96
96
|
};
|
|
97
|
+
payment?: {
|
|
98
|
+
id: number;
|
|
99
|
+
identifier: string;
|
|
100
|
+
};
|
|
97
101
|
}
|
|
98
102
|
interface CheckoutConfig {
|
|
99
103
|
locale?: CheckoutLocale;
|
|
@@ -101,7 +105,11 @@ interface CheckoutConfig {
|
|
|
101
105
|
theme?: CheckoutTheme;
|
|
102
106
|
/** URL for the "continue shopping" / back-to-store action. */
|
|
103
107
|
continueShoppingUrl?: string;
|
|
104
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Reserved for gateways that support a caller-provided return URL.
|
|
110
|
+
* Current Sazito legacy callbacks use their generated nested result path.
|
|
111
|
+
* @deprecated Use an optional catch-all route with `parsePaymentReturn`.
|
|
112
|
+
*/
|
|
105
113
|
returnUrl?: string;
|
|
106
114
|
/** Pending-payment poll interval in ms (default 15000). */
|
|
107
115
|
pollIntervalMs?: number;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -94,6 +94,10 @@ interface CheckoutCredentials {
|
|
|
94
94
|
id: number;
|
|
95
95
|
identifier: string;
|
|
96
96
|
};
|
|
97
|
+
payment?: {
|
|
98
|
+
id: number;
|
|
99
|
+
identifier: string;
|
|
100
|
+
};
|
|
97
101
|
}
|
|
98
102
|
interface CheckoutConfig {
|
|
99
103
|
locale?: CheckoutLocale;
|
|
@@ -101,7 +105,11 @@ interface CheckoutConfig {
|
|
|
101
105
|
theme?: CheckoutTheme;
|
|
102
106
|
/** URL for the "continue shopping" / back-to-store action. */
|
|
103
107
|
continueShoppingUrl?: string;
|
|
104
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* Reserved for gateways that support a caller-provided return URL.
|
|
110
|
+
* Current Sazito legacy callbacks use their generated nested result path.
|
|
111
|
+
* @deprecated Use an optional catch-all route with `parsePaymentReturn`.
|
|
112
|
+
*/
|
|
105
113
|
returnUrl?: string;
|
|
106
114
|
/** Pending-payment poll interval in ms (default 15000). */
|
|
107
115
|
pollIntervalMs?: number;
|
package/dist/react/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { C as CheckoutProvider, S as SazitoProvider, u as useCheckout, a as useCheckoutEngine, b as useSazitoClient } from '../chunks/use-checkout-
|
|
2
|
+
export { C as CheckoutProvider, S as SazitoProvider, u as useCheckout, a as useCheckoutEngine, b as useSazitoClient } from '../chunks/use-checkout-BM810__v.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../chunks/labels-
|
|
5
|
+
import '../chunks/labels-e8w4zRbg.js';
|
|
6
6
|
import '@sazito/client-sdk';
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/styles.css
CHANGED
|
@@ -228,75 +228,76 @@
|
|
|
228
228
|
font-size: 13px;
|
|
229
229
|
}
|
|
230
230
|
.szc-empty {
|
|
231
|
-
|
|
231
|
+
display: flex;
|
|
232
|
+
justify-content: center;
|
|
233
|
+
width: 100%;
|
|
234
|
+
min-height: 320px;
|
|
232
235
|
}
|
|
233
236
|
.szc-empty__card {
|
|
234
237
|
display: flex;
|
|
235
238
|
flex-direction: column;
|
|
236
239
|
align-items: center;
|
|
237
240
|
text-align: center;
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
box-shadow: 0 1px 4px color-mix(in srgb, var(--szc-fg) 5%, transparent);
|
|
241
|
+
justify-content: center;
|
|
242
|
+
gap: 16px;
|
|
243
|
+
width: 100%;
|
|
244
|
+
max-width: 480px;
|
|
245
|
+
padding: 48px 24px;
|
|
244
246
|
}
|
|
245
247
|
.szc-empty__badge {
|
|
246
248
|
display: inline-flex;
|
|
247
249
|
align-items: center;
|
|
248
250
|
justify-content: center;
|
|
249
251
|
flex: none;
|
|
250
|
-
width:
|
|
251
|
-
height:
|
|
252
|
-
border-radius: calc(var(--szc-radius) *
|
|
252
|
+
width: 52px;
|
|
253
|
+
height: 52px;
|
|
254
|
+
border-radius: calc(var(--szc-radius) * 0.75);
|
|
253
255
|
color: var(--szc-accent);
|
|
254
256
|
background: var(--szc-accent-soft);
|
|
255
|
-
box-shadow:
|
|
256
|
-
inset 0 0 0 1px color-mix(in srgb, var(--szc-accent) 18%, transparent),
|
|
257
|
-
0 4px 16px color-mix(in srgb, var(--szc-accent) 12%, transparent);
|
|
258
257
|
}
|
|
259
258
|
.szc-empty__badge svg {
|
|
260
|
-
width:
|
|
261
|
-
height:
|
|
259
|
+
width: 22px;
|
|
260
|
+
height: 22px;
|
|
262
261
|
}
|
|
263
262
|
.szc-empty__copy {
|
|
264
263
|
display: flex;
|
|
265
264
|
flex-direction: column;
|
|
266
|
-
gap:
|
|
265
|
+
gap: 5px;
|
|
267
266
|
align-items: center;
|
|
267
|
+
max-width: 400px;
|
|
268
268
|
}
|
|
269
269
|
.szc-empty__title {
|
|
270
270
|
margin: 0;
|
|
271
|
-
font-size:
|
|
271
|
+
font-size: 19px;
|
|
272
272
|
font-weight: 700;
|
|
273
|
-
line-height: 1.
|
|
273
|
+
line-height: 1.45;
|
|
274
274
|
letter-spacing: -0.015em;
|
|
275
275
|
color: var(--szc-fg);
|
|
276
276
|
}
|
|
277
277
|
.szc-empty__hint {
|
|
278
278
|
margin: 0;
|
|
279
|
+
max-width: 40ch;
|
|
279
280
|
font-size: 14px;
|
|
280
|
-
line-height: 1.
|
|
281
|
+
line-height: 1.7;
|
|
281
282
|
color: var(--szc-muted-fg);
|
|
282
283
|
}
|
|
283
284
|
.szc-empty__cta {
|
|
284
285
|
flex: none;
|
|
285
286
|
white-space: nowrap;
|
|
286
|
-
min-width:
|
|
287
|
-
|
|
287
|
+
min-width: 168px;
|
|
288
|
+
margin-block-start: 2px;
|
|
289
|
+
padding-inline: 24px;
|
|
290
|
+
text-decoration: none;
|
|
288
291
|
}
|
|
289
292
|
@media (max-width: 560px) {
|
|
290
|
-
.szc-
|
|
291
|
-
|
|
292
|
-
gap: 16px;
|
|
293
|
+
.szc-empty {
|
|
294
|
+
min-height: 280px;
|
|
293
295
|
}
|
|
294
|
-
.szc-
|
|
295
|
-
|
|
296
|
-
height: 76px;
|
|
296
|
+
.szc-empty__card {
|
|
297
|
+
padding: 36px 16px;
|
|
297
298
|
}
|
|
298
299
|
.szc-empty__cta {
|
|
299
|
-
width:
|
|
300
|
+
min-width: 160px;
|
|
300
301
|
}
|
|
301
302
|
}
|
|
302
303
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sazito/checkout",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Headless checkout engine + React UI for the Sazito platform, powered by @sazito/client-sdk",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -56,6 +56,17 @@
|
|
|
56
56
|
},
|
|
57
57
|
"default": "./dist/next/index.js"
|
|
58
58
|
},
|
|
59
|
+
"./next/payment-return": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./dist/next/payment-return.d.ts",
|
|
62
|
+
"default": "./dist/next/payment-return.js"
|
|
63
|
+
},
|
|
64
|
+
"require": {
|
|
65
|
+
"types": "./dist/next/payment-return.d.cts",
|
|
66
|
+
"default": "./dist/next/payment-return.cjs"
|
|
67
|
+
},
|
|
68
|
+
"default": "./dist/next/payment-return.js"
|
|
69
|
+
},
|
|
59
70
|
"./styles.css": "./dist/styles.css"
|
|
60
71
|
},
|
|
61
72
|
"typesVersions": {
|
|
@@ -68,6 +79,9 @@
|
|
|
68
79
|
],
|
|
69
80
|
"next": [
|
|
70
81
|
"dist/next/index.d.ts"
|
|
82
|
+
],
|
|
83
|
+
"next/payment-return": [
|
|
84
|
+
"dist/next/payment-return.d.ts"
|
|
71
85
|
]
|
|
72
86
|
}
|
|
73
87
|
},
|