@calm-xyz/stripe 0.15.0 → 0.16.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/dist/index.js +17 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -399,9 +399,16 @@ function Button$1({ className, variant = "default", size = "default", ...props }
|
|
|
399
399
|
...props
|
|
400
400
|
});
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function sizeClass(size) {
|
|
403
|
+
switch (size) {
|
|
404
|
+
case "sm": return "calm:size-4";
|
|
405
|
+
case "md": return "calm:size-6";
|
|
406
|
+
case "lg": return "calm:size-10";
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
function Spinner({ size = "sm" }) {
|
|
403
410
|
return /* @__PURE__ */ jsx(Loader2, {
|
|
404
|
-
className: "calm:animate-spin-pause
|
|
411
|
+
className: cn("calm:animate-spin-pause", sizeClass(size)),
|
|
405
412
|
"aria-hidden": true
|
|
406
413
|
});
|
|
407
414
|
}
|
|
@@ -415,7 +422,14 @@ function LoadingButton({ loading = false, disabled, children, ...props }) {
|
|
|
415
422
|
return /* @__PURE__ */ jsxs(Button$1, {
|
|
416
423
|
...props,
|
|
417
424
|
disabled: disabled || loading,
|
|
418
|
-
children: [
|
|
425
|
+
children: [
|
|
426
|
+
loading && /* @__PURE__ */ jsx(Spinner, { size: "md" }),
|
|
427
|
+
loading && /* @__PURE__ */ jsx("span", {
|
|
428
|
+
className: "calm:sr-only",
|
|
429
|
+
children
|
|
430
|
+
}),
|
|
431
|
+
!loading && children
|
|
432
|
+
]
|
|
419
433
|
});
|
|
420
434
|
}
|
|
421
435
|
function ServerErrorAlert(props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calm-xyz/stripe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Stripe card payments for the Calm fiat-to-crypto onramp API.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"peerDependenciesMeta": {},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@base-ui/react": "^1.9.0",
|
|
60
|
-
"@calm-xyz/core": "0.
|
|
60
|
+
"@calm-xyz/core": "0.16.0",
|
|
61
61
|
"@stripe/crypto": "^1.1.2",
|
|
62
62
|
"@stripe/stripe-js": "^1.46.0",
|
|
63
63
|
"class-variance-authority": "^0.7.1",
|