@doujins/payments-ui 0.1.0 → 0.1.2
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 +140 -0
- package/dist/index.cjs +231 -127
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -10
- package/dist/index.d.ts +8 -10
- package/dist/index.js +230 -126
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -109,18 +109,10 @@ var ensureFetch = (fetchImpl) => {
|
|
|
109
109
|
var createClient = (config) => {
|
|
110
110
|
const fetchImpl = ensureFetch(config.fetch);
|
|
111
111
|
const normalizeBase = (value) => value.replace(/\/$/, "");
|
|
112
|
-
const normalizePath = (value, fallback = "/v1") => {
|
|
113
|
-
if (!value) return fallback;
|
|
114
|
-
return value.startsWith("/") ? value : `/${value}`;
|
|
115
|
-
};
|
|
116
112
|
const billingBaseUrl = normalizeBase(config.billingBaseUrl);
|
|
117
113
|
const accountBaseUrl = normalizeBase(
|
|
118
114
|
config.accountBaseUrl ?? config.billingBaseUrl
|
|
119
115
|
);
|
|
120
|
-
const billingBasePath = normalizePath(config.billingBasePath ?? "/v1");
|
|
121
|
-
const accountBasePath = normalizePath(
|
|
122
|
-
config.accountBasePath ?? config.billingBasePath ?? "/v1"
|
|
123
|
-
);
|
|
124
116
|
const defaultHeaders = config.defaultHeaders ?? {};
|
|
125
117
|
const resolveAuthToken = async () => {
|
|
126
118
|
if (!config.getAuthToken) return null;
|
|
@@ -134,11 +126,8 @@ var createClient = (config) => {
|
|
|
134
126
|
};
|
|
135
127
|
const buildUrl = (path, query, target) => {
|
|
136
128
|
const normalizedPath = path.startsWith("/") ? path : `/${path}`;
|
|
137
|
-
const basePath = target === "account" ? accountBasePath : billingBasePath;
|
|
138
129
|
const baseUrl = target === "account" ? accountBaseUrl : billingBaseUrl;
|
|
139
|
-
const
|
|
140
|
-
const finalPath = needsBasePrefix ? `${basePath}${normalizedPath}` : normalizedPath;
|
|
141
|
-
const url = new URL(`${baseUrl}${finalPath}`);
|
|
130
|
+
const url = new URL(`${baseUrl}${normalizedPath}`);
|
|
142
131
|
if (query) {
|
|
143
132
|
Object.entries(query).forEach(([key, value]) => {
|
|
144
133
|
if (value === void 0 || value === null) return;
|
|
@@ -327,27 +316,27 @@ var DialogOverlay = React17__namespace.forwardRef(({ className, ...props }, ref)
|
|
|
327
316
|
}
|
|
328
317
|
));
|
|
329
318
|
DialogOverlay.displayName = DialogPrimitive__namespace.Overlay.displayName;
|
|
330
|
-
var DialogContent = React17__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.
|
|
319
|
+
var DialogContent = React17__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(DialogPortal, { children: [
|
|
331
320
|
/* @__PURE__ */ jsxRuntime.jsx(DialogOverlay, {}),
|
|
332
321
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
333
322
|
DialogPrimitive__namespace.Content,
|
|
334
323
|
{
|
|
335
324
|
ref,
|
|
336
325
|
className: cn(
|
|
337
|
-
"fixed left-[50%] top-[50%] z-50 grid w-
|
|
326
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
338
327
|
className
|
|
339
328
|
),
|
|
340
329
|
...props,
|
|
341
330
|
children: [
|
|
342
331
|
children,
|
|
343
|
-
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-
|
|
344
|
-
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogPrimitive__namespace.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
333
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" }),
|
|
345
334
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Close" })
|
|
346
335
|
] })
|
|
347
336
|
]
|
|
348
337
|
}
|
|
349
338
|
)
|
|
350
|
-
] })
|
|
339
|
+
] }));
|
|
351
340
|
DialogContent.displayName = DialogPrimitive__namespace.Content.displayName;
|
|
352
341
|
var DialogHeader = ({
|
|
353
342
|
className,
|
|
@@ -379,7 +368,7 @@ var DialogDescription = React17__namespace.forwardRef(({ className, ...props },
|
|
|
379
368
|
DialogPrimitive__namespace.Description,
|
|
380
369
|
{
|
|
381
370
|
ref,
|
|
382
|
-
className: cn("text-
|
|
371
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
383
372
|
...props
|
|
384
373
|
}
|
|
385
374
|
));
|
|
@@ -400,16 +389,16 @@ var customCountries = [
|
|
|
400
389
|
countryList__default.default.overwrite(customCountries);
|
|
401
390
|
var countries = countryList__default.default.getData().sort((a, b) => a.name.localeCompare(b.name));
|
|
402
391
|
var buttonVariants = classVarianceAuthority.cva(
|
|
403
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
392
|
+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
404
393
|
{
|
|
405
394
|
variants: {
|
|
406
395
|
variant: {
|
|
407
|
-
default: "bg-
|
|
408
|
-
|
|
409
|
-
outline: "border border-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
link: "text-
|
|
396
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
397
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
|
|
398
|
+
outline: "border border-input bg-background hover:bg-accent hover:text-accent-foreground",
|
|
399
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
400
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
401
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
413
402
|
},
|
|
414
403
|
size: {
|
|
415
404
|
default: "h-10 px-4 py-2",
|
|
@@ -445,7 +434,7 @@ var Input = React17__namespace.forwardRef(
|
|
|
445
434
|
{
|
|
446
435
|
type,
|
|
447
436
|
className: cn(
|
|
448
|
-
"flex h-10 w-full rounded-md border border-
|
|
437
|
+
"flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
449
438
|
className
|
|
450
439
|
),
|
|
451
440
|
ref,
|
|
@@ -455,14 +444,14 @@ var Input = React17__namespace.forwardRef(
|
|
|
455
444
|
}
|
|
456
445
|
);
|
|
457
446
|
Input.displayName = "Input";
|
|
447
|
+
var labelVariants = classVarianceAuthority.cva(
|
|
448
|
+
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
449
|
+
);
|
|
458
450
|
var Label = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
459
451
|
LabelPrimitive__namespace.Root,
|
|
460
452
|
{
|
|
461
453
|
ref,
|
|
462
|
-
className: cn(
|
|
463
|
-
"text-sm font-medium leading-none text-white peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
464
|
-
className
|
|
465
|
-
),
|
|
454
|
+
className: cn(labelVariants(), className),
|
|
466
455
|
...props
|
|
467
456
|
}
|
|
468
457
|
));
|
|
@@ -474,7 +463,7 @@ var SelectTrigger = React17__namespace.forwardRef(({ className, children, ...pro
|
|
|
474
463
|
{
|
|
475
464
|
ref,
|
|
476
465
|
className: cn(
|
|
477
|
-
"flex h-10 w-full items-center justify-between rounded-md border border-
|
|
466
|
+
"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
478
467
|
className
|
|
479
468
|
),
|
|
480
469
|
...props,
|
|
@@ -485,29 +474,65 @@ var SelectTrigger = React17__namespace.forwardRef(({ className, children, ...pro
|
|
|
485
474
|
}
|
|
486
475
|
));
|
|
487
476
|
SelectTrigger.displayName = SelectPrimitive__namespace.Trigger.displayName;
|
|
488
|
-
var
|
|
477
|
+
var SelectScrollUpButton = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
478
|
+
SelectPrimitive__namespace.ScrollUpButton,
|
|
479
|
+
{
|
|
480
|
+
ref,
|
|
481
|
+
className: cn(
|
|
482
|
+
"flex cursor-default items-center justify-center py-1",
|
|
483
|
+
className
|
|
484
|
+
),
|
|
485
|
+
...props,
|
|
486
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronUp, { className: "h-4 w-4" })
|
|
487
|
+
}
|
|
488
|
+
));
|
|
489
|
+
SelectScrollUpButton.displayName = SelectPrimitive__namespace.ScrollUpButton.displayName;
|
|
490
|
+
var SelectScrollDownButton = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
491
|
+
SelectPrimitive__namespace.ScrollDownButton,
|
|
492
|
+
{
|
|
493
|
+
ref,
|
|
494
|
+
className: cn(
|
|
495
|
+
"flex cursor-default items-center justify-center py-1",
|
|
496
|
+
className
|
|
497
|
+
),
|
|
498
|
+
...props,
|
|
499
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4" })
|
|
500
|
+
}
|
|
501
|
+
));
|
|
502
|
+
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
503
|
+
var SelectContent = React17__namespace.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
489
504
|
SelectPrimitive__namespace.Content,
|
|
490
505
|
{
|
|
491
506
|
ref,
|
|
492
507
|
className: cn(
|
|
493
|
-
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border
|
|
508
|
+
"relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",
|
|
509
|
+
position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
|
494
510
|
className
|
|
495
511
|
),
|
|
496
512
|
position,
|
|
497
513
|
...props,
|
|
498
514
|
children: [
|
|
499
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
500
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
501
|
-
|
|
515
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollUpButton, {}),
|
|
516
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
517
|
+
SelectPrimitive__namespace.Viewport,
|
|
518
|
+
{
|
|
519
|
+
className: cn(
|
|
520
|
+
"p-1",
|
|
521
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
522
|
+
),
|
|
523
|
+
children
|
|
524
|
+
}
|
|
525
|
+
),
|
|
526
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectScrollDownButton, {})
|
|
502
527
|
]
|
|
503
528
|
}
|
|
504
|
-
) })
|
|
529
|
+
) }));
|
|
505
530
|
SelectContent.displayName = SelectPrimitive__namespace.Content.displayName;
|
|
506
531
|
var SelectLabel = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
507
532
|
SelectPrimitive__namespace.Label,
|
|
508
533
|
{
|
|
509
534
|
ref,
|
|
510
|
-
className: cn("
|
|
535
|
+
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
511
536
|
...props
|
|
512
537
|
}
|
|
513
538
|
));
|
|
@@ -517,7 +542,7 @@ var SelectItem = React17__namespace.forwardRef(({ className, children, ...props
|
|
|
517
542
|
{
|
|
518
543
|
ref,
|
|
519
544
|
className: cn(
|
|
520
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm
|
|
545
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
521
546
|
className
|
|
522
547
|
),
|
|
523
548
|
...props,
|
|
@@ -532,7 +557,7 @@ var SelectSeparator = React17__namespace.forwardRef(({ className, ...props }, re
|
|
|
532
557
|
SelectPrimitive__namespace.Separator,
|
|
533
558
|
{
|
|
534
559
|
ref,
|
|
535
|
-
className: cn("mx-1 my-1 h-px bg-
|
|
560
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
536
561
|
...props
|
|
537
562
|
}
|
|
538
563
|
));
|
|
@@ -904,14 +929,14 @@ var usePaymentMethods = () => {
|
|
|
904
929
|
};
|
|
905
930
|
};
|
|
906
931
|
var badgeVariants = classVarianceAuthority.cva(
|
|
907
|
-
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none",
|
|
932
|
+
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
908
933
|
{
|
|
909
934
|
variants: {
|
|
910
935
|
variant: {
|
|
911
|
-
default: "border-transparent bg-
|
|
912
|
-
secondary: "border-transparent bg-
|
|
913
|
-
|
|
914
|
-
|
|
936
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
937
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
938
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
939
|
+
outline: "text-foreground"
|
|
915
940
|
}
|
|
916
941
|
},
|
|
917
942
|
defaultVariants: {
|
|
@@ -944,7 +969,7 @@ var ScrollBar = React17__namespace.forwardRef(({ className, orientation = "verti
|
|
|
944
969
|
className: cn(
|
|
945
970
|
"flex touch-none select-none transition-colors",
|
|
946
971
|
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
947
|
-
orientation === "horizontal" && "h-2.5 border-t border-t-transparent p-[1px]",
|
|
972
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
948
973
|
className
|
|
949
974
|
),
|
|
950
975
|
...props,
|
|
@@ -1079,7 +1104,7 @@ var TabsList = React17__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
1079
1104
|
{
|
|
1080
1105
|
ref,
|
|
1081
1106
|
className: cn(
|
|
1082
|
-
"inline-flex h-10 items-center justify-center rounded-md bg-
|
|
1107
|
+
"inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
|
|
1083
1108
|
className
|
|
1084
1109
|
),
|
|
1085
1110
|
...props
|
|
@@ -1091,7 +1116,7 @@ var TabsTrigger = React17__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1091
1116
|
{
|
|
1092
1117
|
ref,
|
|
1093
1118
|
className: cn(
|
|
1094
|
-
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
1119
|
+
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
|
|
1095
1120
|
className
|
|
1096
1121
|
),
|
|
1097
1122
|
...props
|
|
@@ -1103,7 +1128,7 @@ var TabsContent = React17__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
1103
1128
|
{
|
|
1104
1129
|
ref,
|
|
1105
1130
|
className: cn(
|
|
1106
|
-
"mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
1131
|
+
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
1107
1132
|
className
|
|
1108
1133
|
),
|
|
1109
1134
|
...props
|
|
@@ -1334,16 +1359,17 @@ var useSolanaQrPayment = (options) => {
|
|
|
1334
1359
|
refresh
|
|
1335
1360
|
};
|
|
1336
1361
|
};
|
|
1337
|
-
var Card = React17__namespace.forwardRef(
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1362
|
+
var Card = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1363
|
+
"div",
|
|
1364
|
+
{
|
|
1365
|
+
ref,
|
|
1366
|
+
className: cn(
|
|
1367
|
+
"rounded-lg border bg-card text-card-foreground shadow-sm",
|
|
1368
|
+
className
|
|
1369
|
+
),
|
|
1370
|
+
...props
|
|
1371
|
+
}
|
|
1372
|
+
));
|
|
1347
1373
|
Card.displayName = "Card";
|
|
1348
1374
|
var CardHeader = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1349
1375
|
"div",
|
|
@@ -1354,11 +1380,26 @@ var CardHeader = React17__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1354
1380
|
}
|
|
1355
1381
|
));
|
|
1356
1382
|
CardHeader.displayName = "CardHeader";
|
|
1357
|
-
var CardTitle = React17__namespace.forwardRef(
|
|
1358
|
-
|
|
1359
|
-
|
|
1383
|
+
var CardTitle = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1384
|
+
"div",
|
|
1385
|
+
{
|
|
1386
|
+
ref,
|
|
1387
|
+
className: cn(
|
|
1388
|
+
"text-2xl font-semibold leading-none tracking-tight",
|
|
1389
|
+
className
|
|
1390
|
+
),
|
|
1391
|
+
...props
|
|
1392
|
+
}
|
|
1393
|
+
));
|
|
1360
1394
|
CardTitle.displayName = "CardTitle";
|
|
1361
|
-
var CardDescription = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1395
|
+
var CardDescription = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1396
|
+
"div",
|
|
1397
|
+
{
|
|
1398
|
+
ref,
|
|
1399
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
1400
|
+
...props
|
|
1401
|
+
}
|
|
1402
|
+
));
|
|
1362
1403
|
CardDescription.displayName = "CardDescription";
|
|
1363
1404
|
var CardContent = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
1364
1405
|
CardContent.displayName = "CardContent";
|
|
@@ -2396,9 +2437,7 @@ var PaymentProvider = ({
|
|
|
2396
2437
|
}) : void 0;
|
|
2397
2438
|
return createClient({
|
|
2398
2439
|
billingBaseUrl: config.endpoints.billingBaseUrl,
|
|
2399
|
-
billingBasePath: config.endpoints.billingBasePath,
|
|
2400
2440
|
accountBaseUrl: config.endpoints.accountBaseUrl,
|
|
2401
|
-
accountBasePath: config.endpoints.accountBasePath,
|
|
2402
2441
|
getAuthToken: authProvider,
|
|
2403
2442
|
defaultHeaders: config.defaultHeaders,
|
|
2404
2443
|
fetch: wrappedFetch
|
|
@@ -2441,7 +2480,7 @@ var usePaymentContext = () => {
|
|
|
2441
2480
|
}
|
|
2442
2481
|
return context;
|
|
2443
2482
|
};
|
|
2444
|
-
var
|
|
2483
|
+
var BillingThemeProvider = ({
|
|
2445
2484
|
children,
|
|
2446
2485
|
className,
|
|
2447
2486
|
dark = false
|
|
@@ -2458,7 +2497,7 @@ var PaymentsUIRoot = ({
|
|
|
2458
2497
|
}
|
|
2459
2498
|
);
|
|
2460
2499
|
};
|
|
2461
|
-
var
|
|
2500
|
+
var BillingThemePortal = ({
|
|
2462
2501
|
children,
|
|
2463
2502
|
className,
|
|
2464
2503
|
dark = false
|
|
@@ -2482,51 +2521,79 @@ var SolanaPaymentSelector = ({
|
|
|
2482
2521
|
}) => {
|
|
2483
2522
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog, { open: isOpen, onOpenChange: (value) => value ? void 0 : onClose(), children: /* @__PURE__ */ jsxRuntime.jsx(DialogContent, { className: "w-full max-w-2xl max-h-[90vh] overflow-y-auto rounded-md border border-border/70 bg-background/95 p-0 shadow-2xl [&::-webkit-scrollbar]:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(SolanaPaymentView, { ...props, onClose }) }) });
|
|
2484
2523
|
};
|
|
2485
|
-
var Table = React17__namespace.forwardRef(
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
)
|
|
2494
|
-
);
|
|
2524
|
+
var Table = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2525
|
+
"table",
|
|
2526
|
+
{
|
|
2527
|
+
ref,
|
|
2528
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
2529
|
+
...props
|
|
2530
|
+
}
|
|
2531
|
+
) }));
|
|
2495
2532
|
Table.displayName = "Table";
|
|
2496
2533
|
var TableHeader = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
2497
2534
|
TableHeader.displayName = "TableHeader";
|
|
2498
|
-
var TableBody = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2535
|
+
var TableBody = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2536
|
+
"tbody",
|
|
2537
|
+
{
|
|
2538
|
+
ref,
|
|
2539
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
2540
|
+
...props
|
|
2541
|
+
}
|
|
2542
|
+
));
|
|
2499
2543
|
TableBody.displayName = "TableBody";
|
|
2500
|
-
var TableFooter = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2544
|
+
var TableFooter = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2545
|
+
"tfoot",
|
|
2546
|
+
{
|
|
2547
|
+
ref,
|
|
2548
|
+
className: cn(
|
|
2549
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
2550
|
+
className
|
|
2551
|
+
),
|
|
2552
|
+
...props
|
|
2553
|
+
}
|
|
2554
|
+
));
|
|
2501
2555
|
TableFooter.displayName = "TableFooter";
|
|
2502
|
-
var TableRow = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2556
|
+
var TableRow = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2557
|
+
"tr",
|
|
2558
|
+
{
|
|
2559
|
+
ref,
|
|
2560
|
+
className: cn(
|
|
2561
|
+
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
2562
|
+
className
|
|
2563
|
+
),
|
|
2564
|
+
...props
|
|
2565
|
+
}
|
|
2566
|
+
));
|
|
2503
2567
|
TableRow.displayName = "TableRow";
|
|
2504
|
-
var TableHead = React17__namespace.forwardRef(
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
)
|
|
2516
|
-
);
|
|
2568
|
+
var TableHead = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2569
|
+
"th",
|
|
2570
|
+
{
|
|
2571
|
+
ref,
|
|
2572
|
+
className: cn(
|
|
2573
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
2574
|
+
className
|
|
2575
|
+
),
|
|
2576
|
+
...props
|
|
2577
|
+
}
|
|
2578
|
+
));
|
|
2517
2579
|
TableHead.displayName = "TableHead";
|
|
2518
|
-
var TableCell = React17__namespace.forwardRef(
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
)
|
|
2527
|
-
);
|
|
2580
|
+
var TableCell = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2581
|
+
"td",
|
|
2582
|
+
{
|
|
2583
|
+
ref,
|
|
2584
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
2585
|
+
...props
|
|
2586
|
+
}
|
|
2587
|
+
));
|
|
2528
2588
|
TableCell.displayName = "TableCell";
|
|
2529
|
-
var TableCaption = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2589
|
+
var TableCaption = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2590
|
+
"caption",
|
|
2591
|
+
{
|
|
2592
|
+
ref,
|
|
2593
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
2594
|
+
...props
|
|
2595
|
+
}
|
|
2596
|
+
));
|
|
2530
2597
|
TableCaption.displayName = "TableCaption";
|
|
2531
2598
|
var AlertDialog = AlertDialogPrimitive__namespace.Root;
|
|
2532
2599
|
var AlertDialogTrigger = AlertDialogPrimitive__namespace.Trigger;
|
|
@@ -2534,34 +2601,43 @@ var AlertDialogPortal = AlertDialogPrimitive__namespace.Portal;
|
|
|
2534
2601
|
var AlertDialogOverlay = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2535
2602
|
AlertDialogPrimitive__namespace.Overlay,
|
|
2536
2603
|
{
|
|
2537
|
-
ref,
|
|
2538
2604
|
className: cn(
|
|
2539
|
-
"fixed inset-0 z-50 bg-black/80
|
|
2605
|
+
"fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2540
2606
|
className
|
|
2541
2607
|
),
|
|
2542
|
-
...props
|
|
2608
|
+
...props,
|
|
2609
|
+
ref
|
|
2543
2610
|
}
|
|
2544
2611
|
));
|
|
2545
2612
|
AlertDialogOverlay.displayName = AlertDialogPrimitive__namespace.Overlay.displayName;
|
|
2546
|
-
var AlertDialogContent = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.
|
|
2613
|
+
var AlertDialogContent = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(AlertDialogPortal, { children: [
|
|
2547
2614
|
/* @__PURE__ */ jsxRuntime.jsx(AlertDialogOverlay, {}),
|
|
2548
2615
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2549
2616
|
AlertDialogPrimitive__namespace.Content,
|
|
2550
2617
|
{
|
|
2551
2618
|
ref,
|
|
2552
2619
|
className: cn(
|
|
2553
|
-
"fixed left-
|
|
2620
|
+
"fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
|
|
2554
2621
|
className
|
|
2555
2622
|
),
|
|
2556
2623
|
...props
|
|
2557
2624
|
}
|
|
2558
2625
|
)
|
|
2559
|
-
] })
|
|
2626
|
+
] }));
|
|
2560
2627
|
AlertDialogContent.displayName = AlertDialogPrimitive__namespace.Content.displayName;
|
|
2561
2628
|
var AlertDialogHeader = ({
|
|
2562
2629
|
className,
|
|
2563
2630
|
...props
|
|
2564
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2631
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2632
|
+
"div",
|
|
2633
|
+
{
|
|
2634
|
+
className: cn(
|
|
2635
|
+
"flex flex-col space-y-2 text-center sm:text-left",
|
|
2636
|
+
className
|
|
2637
|
+
),
|
|
2638
|
+
...props
|
|
2639
|
+
}
|
|
2640
|
+
);
|
|
2565
2641
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
2566
2642
|
var AlertDialogFooter = ({
|
|
2567
2643
|
className,
|
|
@@ -2569,39 +2645,67 @@ var AlertDialogFooter = ({
|
|
|
2569
2645
|
}) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2570
2646
|
"div",
|
|
2571
2647
|
{
|
|
2572
|
-
className: cn(
|
|
2648
|
+
className: cn(
|
|
2649
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
|
2650
|
+
className
|
|
2651
|
+
),
|
|
2573
2652
|
...props
|
|
2574
2653
|
}
|
|
2575
2654
|
);
|
|
2576
2655
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
2577
|
-
var AlertDialogTitle = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2656
|
+
var AlertDialogTitle = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2657
|
+
AlertDialogPrimitive__namespace.Title,
|
|
2658
|
+
{
|
|
2659
|
+
ref,
|
|
2660
|
+
className: cn("text-lg font-semibold", className),
|
|
2661
|
+
...props
|
|
2662
|
+
}
|
|
2663
|
+
));
|
|
2578
2664
|
AlertDialogTitle.displayName = AlertDialogPrimitive__namespace.Title.displayName;
|
|
2579
|
-
var AlertDialogDescription = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2665
|
+
var AlertDialogDescription = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2666
|
+
AlertDialogPrimitive__namespace.Description,
|
|
2667
|
+
{
|
|
2668
|
+
ref,
|
|
2669
|
+
className: cn("text-sm text-muted-foreground", className),
|
|
2670
|
+
...props
|
|
2671
|
+
}
|
|
2672
|
+
));
|
|
2580
2673
|
AlertDialogDescription.displayName = AlertDialogPrimitive__namespace.Description.displayName;
|
|
2581
|
-
var AlertDialogAction = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2674
|
+
var AlertDialogAction = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2675
|
+
AlertDialogPrimitive__namespace.Action,
|
|
2676
|
+
{
|
|
2677
|
+
ref,
|
|
2678
|
+
className: cn(buttonVariants(), className),
|
|
2679
|
+
...props
|
|
2680
|
+
}
|
|
2681
|
+
));
|
|
2582
2682
|
AlertDialogAction.displayName = AlertDialogPrimitive__namespace.Action.displayName;
|
|
2583
2683
|
var AlertDialogCancel = React17__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2584
2684
|
AlertDialogPrimitive__namespace.Cancel,
|
|
2585
2685
|
{
|
|
2586
2686
|
ref,
|
|
2587
|
-
className: cn(
|
|
2687
|
+
className: cn(
|
|
2688
|
+
buttonVariants({ variant: "outline" }),
|
|
2689
|
+
"mt-2 sm:mt-0",
|
|
2690
|
+
className
|
|
2691
|
+
),
|
|
2588
2692
|
...props
|
|
2589
2693
|
}
|
|
2590
2694
|
));
|
|
2591
2695
|
AlertDialogCancel.displayName = AlertDialogPrimitive__namespace.Cancel.displayName;
|
|
2592
|
-
var Textarea = React17__namespace.forwardRef(
|
|
2593
|
-
|
|
2696
|
+
var Textarea = React17__namespace.forwardRef(({ className, ...props }, ref) => {
|
|
2697
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2594
2698
|
"textarea",
|
|
2595
2699
|
{
|
|
2596
|
-
ref,
|
|
2597
2700
|
className: cn(
|
|
2598
|
-
"flex min-h-[
|
|
2701
|
+
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
|
|
2599
2702
|
className
|
|
2600
2703
|
),
|
|
2704
|
+
ref,
|
|
2601
2705
|
...props
|
|
2602
2706
|
}
|
|
2603
|
-
)
|
|
2604
|
-
);
|
|
2707
|
+
);
|
|
2708
|
+
});
|
|
2605
2709
|
Textarea.displayName = "Textarea";
|
|
2606
2710
|
var notifyDefault = (payload) => {
|
|
2607
2711
|
const level = payload.status === "destructive" ? "error" : "info";
|
|
@@ -3174,15 +3278,15 @@ var Checkbox = React17__namespace.forwardRef(({ className, ...props }, ref) => /
|
|
|
3174
3278
|
{
|
|
3175
3279
|
ref,
|
|
3176
3280
|
className: cn(
|
|
3177
|
-
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
3281
|
+
"grid place-content-center peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
|
3178
3282
|
className
|
|
3179
3283
|
),
|
|
3180
3284
|
...props,
|
|
3181
3285
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3182
3286
|
CheckboxPrimitive__namespace.Indicator,
|
|
3183
3287
|
{
|
|
3184
|
-
className: cn("
|
|
3185
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-
|
|
3288
|
+
className: cn("grid place-content-center text-current"),
|
|
3289
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Check, { className: "h-4 w-4" })
|
|
3186
3290
|
}
|
|
3187
3291
|
)
|
|
3188
3292
|
}
|
|
@@ -3685,6 +3789,8 @@ var usePaymentStatus = (options = {}) => {
|
|
|
3685
3789
|
};
|
|
3686
3790
|
|
|
3687
3791
|
exports.BillingHistory = BillingHistory;
|
|
3792
|
+
exports.BillingThemePortal = BillingThemePortal;
|
|
3793
|
+
exports.BillingThemeProvider = BillingThemeProvider;
|
|
3688
3794
|
exports.CancelMembershipDialog = CancelMembershipDialog;
|
|
3689
3795
|
exports.CardDetailsForm = CardDetailsForm;
|
|
3690
3796
|
exports.ClientApiError = ClientApiError;
|
|
@@ -3693,8 +3799,6 @@ exports.PaymentExperience = PaymentExperience;
|
|
|
3693
3799
|
exports.PaymentMethodsSection = PaymentMethodsSection;
|
|
3694
3800
|
exports.PaymentProvider = PaymentProvider;
|
|
3695
3801
|
exports.PaymentsDialogProvider = PaymentsDialogProvider;
|
|
3696
|
-
exports.PaymentsUIPortalRoot = PaymentsUIPortalRoot;
|
|
3697
|
-
exports.PaymentsUIRoot = PaymentsUIRoot;
|
|
3698
3802
|
exports.SolanaPaymentSelector = SolanaPaymentSelector;
|
|
3699
3803
|
exports.SolanaPaymentView = SolanaPaymentView;
|
|
3700
3804
|
exports.StoredPaymentMethods = StoredPaymentMethods;
|