@superlogic/spree-pay 0.3.2 → 0.3.3
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 +10 -16
- package/build/{CryptoComTab-XPQRAAD5.js → CryptoComTab-OW42JVO5.js} +2 -2
- package/build/{CryptoTab-VDQLJRGP.js → CryptoTab-NTHHA7YO.js} +2 -2
- package/build/{chunk-QNXCPSL7.js → chunk-6RZ4XF7B.js} +9 -9
- package/build/{chunk-256NJIJQ.js → chunk-BSDEX662.js} +1 -1
- package/build/{chunk-STFEOIP4.js → chunk-ZPFV3WW6.js} +7 -4
- package/build/index.cjs +15 -12
- package/build/index.css +4 -0
- package/build/index.js +5 -5
- package/package.json +1 -1
- package/src/styles/globals.css +0 -1
package/README.md
CHANGED
|
@@ -213,24 +213,18 @@ enum LogLevel {
|
|
|
213
213
|
|
|
214
214
|
## Theme Customization
|
|
215
215
|
|
|
216
|
-
The widget uses CSS variables for theming.
|
|
217
|
-
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
// ... see packages/spree-pay/src/styles/globals.css for all 54 variables
|
|
226
|
-
} as React.CSSProperties
|
|
227
|
-
}
|
|
228
|
-
>
|
|
229
|
-
<SpreePay {...props} />
|
|
230
|
-
</div>
|
|
216
|
+
The widget uses CSS variables for theming. The `<SpreePay>` component renders with the `sl-spreepay` class, so you can override theme variables by targeting that class in your CSS:
|
|
217
|
+
|
|
218
|
+
```css
|
|
219
|
+
.sl-spreepay {
|
|
220
|
+
--primary: #your-color;
|
|
221
|
+
--accent: #your-accent;
|
|
222
|
+
--s-default: #your-surface-color;
|
|
223
|
+
/* ... see packages/spree-pay/src/styles/globals.css for all 58 variables */
|
|
224
|
+
}
|
|
231
225
|
```
|
|
232
226
|
|
|
233
|
-
All available CSS variables are documented in `packages/spree-pay/src/styles/globals.css:
|
|
227
|
+
All available CSS variables are documented in `packages/spree-pay/src/styles/globals.css:22-82`.
|
|
234
228
|
|
|
235
229
|
## Keycloak SSO page example (/silent-check-sso.html)
|
|
236
230
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Iframe3ds
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-BSDEX662.js";
|
|
4
4
|
import {
|
|
5
5
|
InfoBanner,
|
|
6
6
|
Legal,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
useSpreePayRegister,
|
|
13
13
|
useSpreePaymentMethod,
|
|
14
14
|
useStaticConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6RZ4XF7B.js";
|
|
16
16
|
|
|
17
17
|
// src/components/CryptoComTab/CryptoComTab.tsx
|
|
18
18
|
import { useCallback, useEffect } from "react";
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CheckoutButton,
|
|
3
3
|
PointsSwitch,
|
|
4
4
|
cn as cn2
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ZPFV3WW6.js";
|
|
6
6
|
import {
|
|
7
7
|
Dialog,
|
|
8
8
|
DialogContent,
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
useSpreePayConfig,
|
|
17
17
|
useSpreePayRegister,
|
|
18
18
|
useSpreePaymentMethod
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6RZ4XF7B.js";
|
|
20
20
|
|
|
21
21
|
// src/components/CryptoTab/Crypto/CryptoWrapper.tsx
|
|
22
22
|
import { useMemo as useMemo2 } from "react";
|
|
@@ -9,7 +9,7 @@ var PaymentType = /* @__PURE__ */ ((PaymentType2) => {
|
|
|
9
9
|
})(PaymentType || {});
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
|
-
var version = "0.3.
|
|
12
|
+
var version = "0.3.3";
|
|
13
13
|
|
|
14
14
|
// src/utils/logger.ts
|
|
15
15
|
var LogLevel = /* @__PURE__ */ ((LogLevel2) => {
|
|
@@ -256,8 +256,8 @@ var config = {
|
|
|
256
256
|
keycloakUrl: "https://auth.dev.umusicpassport.com"
|
|
257
257
|
},
|
|
258
258
|
cdc: {
|
|
259
|
-
slapiUrl: "https://slapi.dev.superlogic.com",
|
|
260
|
-
keycloakUrl: "https://auth.
|
|
259
|
+
slapiUrl: "https://slapi.dev.travel.crypto.superlogic.com",
|
|
260
|
+
keycloakUrl: "https://auth.dev.travel.crypto.superlogic.com"
|
|
261
261
|
},
|
|
262
262
|
tria: {
|
|
263
263
|
slapiUrl: "https://slapi.dev.tria.superlogic.com",
|
|
@@ -282,8 +282,8 @@ var config = {
|
|
|
282
282
|
keycloakUrl: "https://auth.stg.umusicpassport.com"
|
|
283
283
|
},
|
|
284
284
|
cdc: {
|
|
285
|
-
slapiUrl: "https://slapi.stg.superlogic.com",
|
|
286
|
-
keycloakUrl: "https://auth.
|
|
285
|
+
slapiUrl: "https://slapi.stg.travel.crypto.superlogic.com",
|
|
286
|
+
keycloakUrl: "https://auth.stg.travel.crypto.superlogic.com"
|
|
287
287
|
},
|
|
288
288
|
tria: {
|
|
289
289
|
slapiUrl: "https://slapi.stg.tria.superlogic.com",
|
|
@@ -308,12 +308,12 @@ var config = {
|
|
|
308
308
|
keycloakUrl: "https://auth.umusicpassport.com"
|
|
309
309
|
},
|
|
310
310
|
cdc: {
|
|
311
|
-
slapiUrl: "https://slapi.
|
|
312
|
-
keycloakUrl: "https://auth.
|
|
311
|
+
slapiUrl: "https://slapi.travel.crypto.com",
|
|
312
|
+
keycloakUrl: "https://auth.travel.crypto.com"
|
|
313
313
|
},
|
|
314
314
|
tria: {
|
|
315
|
-
slapiUrl: "https://
|
|
316
|
-
keycloakUrl: "https://
|
|
315
|
+
slapiUrl: "https://slapi.travel.tria.so",
|
|
316
|
+
keycloakUrl: "https://auth.travel.tria.so"
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
};
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
useSpreePayEnv,
|
|
7
7
|
useSpreePaymentMethod,
|
|
8
8
|
useStaticConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-6RZ4XF7B.js";
|
|
10
10
|
|
|
11
11
|
// src/components/common/PointsSwitch.tsx
|
|
12
12
|
import { useId } from "react";
|
|
@@ -234,15 +234,18 @@ var CheckoutButton = ({ isLoggedIn }) => {
|
|
|
234
234
|
}
|
|
235
235
|
return "Checkout";
|
|
236
236
|
};
|
|
237
|
-
const checkoutClass = "text-(--inverse) h-14 w-full cursor-pointer rounded-4xl bg-(--s-brand) hover:bg-(--s-brand-hover) px-4 text-center text-xl leading-6 font-medium disabled:cursor-not-allowed disabled:bg-(--s-disabled) disabled:text-(--disabled)";
|
|
237
|
+
const checkoutClass = "text-(--inverse) h-14 leading-14 w-full cursor-pointer rounded-4xl bg-(--s-brand) hover:bg-(--s-brand-hover) px-4 text-center text-xl leading-6 font-medium disabled:cursor-not-allowed disabled:bg-(--s-disabled) disabled:text-(--disabled)";
|
|
238
238
|
return /* @__PURE__ */ jsxs3("div", { className: "flex w-full flex-col gap-4 p-6 text-xs leading-5 font-medium text-(--secondary) md:px-7", children: [
|
|
239
239
|
/* @__PURE__ */ jsx5(Legal, {}),
|
|
240
|
-
isLoggedIn ? /* @__PURE__ */ jsx5(Fragment, { children: onProcess && /* @__PURE__ */ jsx5("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */
|
|
240
|
+
isLoggedIn ? /* @__PURE__ */ jsx5(Fragment, { children: onProcess && /* @__PURE__ */ jsx5("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */ jsxs3(
|
|
241
241
|
"a",
|
|
242
242
|
{
|
|
243
243
|
href: `${staticConfig.keycloakUrl}/realms/${env.tenantId}/protocol/openid-connect/auth?client_id=${env.keycloakClientId ?? "oneof-next"}&response_type=code&redirect_uri=${window.location.href}`,
|
|
244
244
|
className: checkoutClass,
|
|
245
|
-
children:
|
|
245
|
+
children: [
|
|
246
|
+
"Log in / Sign up",
|
|
247
|
+
env.tenantId === "moca" ? " for an AIR account" : ""
|
|
248
|
+
]
|
|
246
249
|
}
|
|
247
250
|
),
|
|
248
251
|
/* @__PURE__ */ jsxs3("a", { href: "https://www.spree.finance/", className: "flex items-center justify-center gap-2 hover:underline", children: [
|
package/build/index.cjs
CHANGED
|
@@ -68,7 +68,7 @@ var init_payments = __esm({
|
|
|
68
68
|
var version;
|
|
69
69
|
var init_package = __esm({
|
|
70
70
|
"package.json"() {
|
|
71
|
-
version = "0.3.
|
|
71
|
+
version = "0.3.3";
|
|
72
72
|
}
|
|
73
73
|
});
|
|
74
74
|
|
|
@@ -319,8 +319,8 @@ var init_config = __esm({
|
|
|
319
319
|
keycloakUrl: "https://auth.dev.umusicpassport.com"
|
|
320
320
|
},
|
|
321
321
|
cdc: {
|
|
322
|
-
slapiUrl: "https://slapi.dev.superlogic.com",
|
|
323
|
-
keycloakUrl: "https://auth.
|
|
322
|
+
slapiUrl: "https://slapi.dev.travel.crypto.superlogic.com",
|
|
323
|
+
keycloakUrl: "https://auth.dev.travel.crypto.superlogic.com"
|
|
324
324
|
},
|
|
325
325
|
tria: {
|
|
326
326
|
slapiUrl: "https://slapi.dev.tria.superlogic.com",
|
|
@@ -345,8 +345,8 @@ var init_config = __esm({
|
|
|
345
345
|
keycloakUrl: "https://auth.stg.umusicpassport.com"
|
|
346
346
|
},
|
|
347
347
|
cdc: {
|
|
348
|
-
slapiUrl: "https://slapi.stg.superlogic.com",
|
|
349
|
-
keycloakUrl: "https://auth.
|
|
348
|
+
slapiUrl: "https://slapi.stg.travel.crypto.superlogic.com",
|
|
349
|
+
keycloakUrl: "https://auth.stg.travel.crypto.superlogic.com"
|
|
350
350
|
},
|
|
351
351
|
tria: {
|
|
352
352
|
slapiUrl: "https://slapi.stg.tria.superlogic.com",
|
|
@@ -371,12 +371,12 @@ var init_config = __esm({
|
|
|
371
371
|
keycloakUrl: "https://auth.umusicpassport.com"
|
|
372
372
|
},
|
|
373
373
|
cdc: {
|
|
374
|
-
slapiUrl: "https://slapi.
|
|
375
|
-
keycloakUrl: "https://auth.
|
|
374
|
+
slapiUrl: "https://slapi.travel.crypto.com",
|
|
375
|
+
keycloakUrl: "https://auth.travel.crypto.com"
|
|
376
376
|
},
|
|
377
377
|
tria: {
|
|
378
|
-
slapiUrl: "https://
|
|
379
|
-
keycloakUrl: "https://
|
|
378
|
+
slapiUrl: "https://slapi.travel.tria.so",
|
|
379
|
+
keycloakUrl: "https://auth.travel.tria.so"
|
|
380
380
|
}
|
|
381
381
|
}
|
|
382
382
|
};
|
|
@@ -1261,15 +1261,18 @@ var init_CheckoutButton = __esm({
|
|
|
1261
1261
|
}
|
|
1262
1262
|
return "Checkout";
|
|
1263
1263
|
};
|
|
1264
|
-
const checkoutClass = "text-(--inverse) h-14 w-full cursor-pointer rounded-4xl bg-(--s-brand) hover:bg-(--s-brand-hover) px-4 text-center text-xl leading-6 font-medium disabled:cursor-not-allowed disabled:bg-(--s-disabled) disabled:text-(--disabled)";
|
|
1264
|
+
const checkoutClass = "text-(--inverse) h-14 leading-14 w-full cursor-pointer rounded-4xl bg-(--s-brand) hover:bg-(--s-brand-hover) px-4 text-center text-xl leading-6 font-medium disabled:cursor-not-allowed disabled:bg-(--s-disabled) disabled:text-(--disabled)";
|
|
1265
1265
|
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex w-full flex-col gap-4 p-6 text-xs leading-5 font-medium text-(--secondary) md:px-7", children: [
|
|
1266
1266
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Legal, {}),
|
|
1267
|
-
isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: onProcess && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.
|
|
1267
|
+
isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: onProcess && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { disabled: isDisabled, onClick: onProcess, className: checkoutClass, children: getCheckoutContent() }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1268
1268
|
"a",
|
|
1269
1269
|
{
|
|
1270
1270
|
href: `${staticConfig.keycloakUrl}/realms/${env.tenantId}/protocol/openid-connect/auth?client_id=${env.keycloakClientId ?? "oneof-next"}&response_type=code&redirect_uri=${window.location.href}`,
|
|
1271
1271
|
className: checkoutClass,
|
|
1272
|
-
children:
|
|
1272
|
+
children: [
|
|
1273
|
+
"Log in / Sign up",
|
|
1274
|
+
env.tenantId === "moca" ? " for an AIR account" : ""
|
|
1275
|
+
]
|
|
1273
1276
|
}
|
|
1274
1277
|
),
|
|
1275
1278
|
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("a", { href: "https://www.spree.finance/", className: "flex items-center justify-center gap-2 hover:underline", children: [
|
package/build/index.css
CHANGED
|
@@ -844,6 +844,10 @@
|
|
|
844
844
|
--tw-leading: calc(var(--spacing) * 9);
|
|
845
845
|
line-height: calc(var(--spacing) * 9);
|
|
846
846
|
}
|
|
847
|
+
.sl-spreepay .leading-14 {
|
|
848
|
+
--tw-leading: calc(var(--spacing) * 14);
|
|
849
|
+
line-height: calc(var(--spacing) * 14);
|
|
850
|
+
}
|
|
847
851
|
.sl-spreepay .leading-\[1\.3\] {
|
|
848
852
|
--tw-leading: 1.3;
|
|
849
853
|
line-height: 1.3;
|
package/build/index.js
CHANGED
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
getSplitAmount,
|
|
9
9
|
getTransactionFee,
|
|
10
10
|
useSlapiBalance
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZPFV3WW6.js";
|
|
12
12
|
import {
|
|
13
13
|
Iframe3ds
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-BSDEX662.js";
|
|
15
15
|
import {
|
|
16
16
|
InfoBanner,
|
|
17
17
|
LogLevel,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
useSpreePayRegister,
|
|
32
32
|
useSpreePaymentMethod,
|
|
33
33
|
useStaticConfig
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6RZ4XF7B.js";
|
|
35
35
|
|
|
36
36
|
// src/SpreePay.tsx
|
|
37
37
|
import { useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo7, useState as useState10 } from "react";
|
|
@@ -2190,9 +2190,9 @@ var TabButtons = (props) => {
|
|
|
2190
2190
|
|
|
2191
2191
|
// src/SpreePayContent.tsx
|
|
2192
2192
|
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2193
|
-
var CryptoTab = lazy(() => import("./CryptoTab-
|
|
2193
|
+
var CryptoTab = lazy(() => import("./CryptoTab-NTHHA7YO.js").then((module) => ({ default: module.CryptoTab })));
|
|
2194
2194
|
var CryptoComTab = lazy(
|
|
2195
|
-
() => import("./CryptoComTab-
|
|
2195
|
+
() => import("./CryptoComTab-OW42JVO5.js").then((module) => ({ default: module.CryptoComTab }))
|
|
2196
2196
|
);
|
|
2197
2197
|
var TabLoadingFallback = () => /* @__PURE__ */ jsx18("div", { className: "flex items-center justify-center px-5 py-8 md:px-7", children: /* @__PURE__ */ jsxs11("div", { className: "flex flex-col items-center gap-3", children: [
|
|
2198
2198
|
/* @__PURE__ */ jsx18("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-(--border-component-specific-card) border-t-(--brand-primary)" }),
|
package/package.json
CHANGED
package/src/styles/globals.css
CHANGED
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
@custom-variant dark (&:is(.dark *));
|
|
17
17
|
|
|
18
18
|
/* Default theme values in :root for standalone use.
|
|
19
|
-
These match the moca/bookit theme from live-tickets.
|
|
20
19
|
When used inside live-tickets, these are overridden by the host's :root variables. */
|
|
21
20
|
:root {
|
|
22
21
|
/* color / text-icons */
|