@medialane/ui 0.126.15 → 0.127.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/components/card.cjs +1 -1
- package/dist/components/card.cjs.map +1 -1
- package/dist/components/card.js +1 -1
- package/dist/components/card.js.map +1 -1
- package/dist/components/marketplace-dialog-primitives.cjs +292 -0
- package/dist/components/marketplace-dialog-primitives.cjs.map +1 -0
- package/dist/components/marketplace-dialog-primitives.d.cts +91 -0
- package/dist/components/marketplace-dialog-primitives.d.ts +91 -0
- package/dist/components/marketplace-dialog-primitives.js +250 -0
- package/dist/components/marketplace-dialog-primitives.js.map +1 -0
- package/dist/index.cjs +19 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components/card.cjs
CHANGED
|
@@ -44,7 +44,7 @@ const Card = React.forwardRef(
|
|
|
44
44
|
"div",
|
|
45
45
|
{
|
|
46
46
|
ref,
|
|
47
|
-
className: (0, import_cn.cn)("rounded-lg border bg-card text-card-foreground
|
|
47
|
+
className: (0, import_cn.cn)("rounded-lg border border-border bg-card text-card-foreground", className),
|
|
48
48
|
...props
|
|
49
49
|
}
|
|
50
50
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border bg-card text-card-foreground
|
|
1
|
+
{"version":3,"sources":["../../src/components/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border border-border bg-card text-card-foreground\", className)}\n {...props}\n />\n )\n);\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-6\", className)} {...props} />\n )\n);\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"text-2xl font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n )\n);\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n )\n);\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center p-6 pt-0\", className)} {...props} />\n )\n);\nCardFooter.displayName = \"CardFooter\";\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKI;AALJ,YAAuB;AACvB,gBAAmB;AAEnB,MAAM,OAAO,MAAM;AAAA,EACjB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAW,cAAG,gEAAgE,SAAS;AAAA,MACtF,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,KAAK,cAAc;AAEnB,MAAM,aAAa,MAAM;AAAA,EACvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,4CAAC,SAAI,KAAU,eAAW,cAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEzF;AACA,WAAW,cAAc;AAEzB,MAAM,YAAY,MAAM;AAAA,EACtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAW,cAAG,sDAAsD,SAAS;AAAA,MAC5E,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,UAAU,cAAc;AAExB,MAAM,kBAAkB,MAAM,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,4CAAC,OAAE,KAAU,eAAW,cAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO,CACpF;AACD,gBAAgB,cAAc;AAE9B,MAAM,cAAc,MAAM;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,4CAAC,SAAI,KAAU,eAAW,cAAG,YAAY,SAAS,GAAI,GAAG,OAAO;AAEpE;AACA,YAAY,cAAc;AAE1B,MAAM,aAAa,MAAM;AAAA,EACvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,4CAAC,SAAI,KAAU,eAAW,cAAG,8BAA8B,SAAS,GAAI,GAAG,OAAO;AAEtF;AACA,WAAW,cAAc;","names":[]}
|
package/dist/components/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border bg-card text-card-foreground
|
|
1
|
+
{"version":3,"sources":["../../src/components/card.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div\n ref={ref}\n className={cn(\"rounded-lg border border-border bg-card text-card-foreground\", className)}\n {...props}\n />\n )\n);\nCard.displayName = \"Card\";\n\nconst CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex flex-col space-y-1.5 p-6\", className)} {...props} />\n )\n);\nCardHeader.displayName = \"CardHeader\";\n\nconst CardTitle = React.forwardRef<HTMLParagraphElement, React.HTMLAttributes<HTMLHeadingElement>>(\n ({ className, ...props }, ref) => (\n <h3\n ref={ref}\n className={cn(\"text-2xl font-semibold leading-none tracking-tight\", className)}\n {...props}\n />\n )\n);\nCardTitle.displayName = \"CardTitle\";\n\nconst CardDescription = React.forwardRef<\n HTMLParagraphElement,\n React.HTMLAttributes<HTMLParagraphElement>\n>(({ className, ...props }, ref) => (\n <p ref={ref} className={cn(\"text-sm text-muted-foreground\", className)} {...props} />\n));\nCardDescription.displayName = \"CardDescription\";\n\nconst CardContent = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"p-6 pt-0\", className)} {...props} />\n )\n);\nCardContent.displayName = \"CardContent\";\n\nconst CardFooter = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(\n ({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center p-6 pt-0\", className)} {...props} />\n )\n);\nCardFooter.displayName = \"CardFooter\";\n\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };\n"],"mappings":"AAKI;AALJ,YAAY,WAAW;AACvB,SAAS,UAAU;AAEnB,MAAM,OAAO,MAAM;AAAA,EACjB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,gEAAgE,SAAS;AAAA,MACtF,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,KAAK,cAAc;AAEnB,MAAM,aAAa,MAAM;AAAA,EACvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO;AAEzF;AACA,WAAW,cAAc;AAEzB,MAAM,YAAY,MAAM;AAAA,EACtB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW,GAAG,sDAAsD,SAAS;AAAA,MAC5E,GAAG;AAAA;AAAA,EACN;AAEJ;AACA,UAAU,cAAc;AAExB,MAAM,kBAAkB,MAAM,WAG5B,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QAC1B,oBAAC,OAAE,KAAU,WAAW,GAAG,iCAAiC,SAAS,GAAI,GAAG,OAAO,CACpF;AACD,gBAAgB,cAAc;AAE9B,MAAM,cAAc,MAAM;AAAA,EACxB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,KAAU,WAAW,GAAG,YAAY,SAAS,GAAI,GAAG,OAAO;AAEpE;AACA,YAAY,cAAc;AAE1B,MAAM,aAAa,MAAM;AAAA,EACvB,CAAC,EAAE,WAAW,GAAG,MAAM,GAAG,QACxB,oBAAC,SAAI,KAAU,WAAW,GAAG,8BAA8B,SAAS,GAAI,GAAG,OAAO;AAEtF;AACA,WAAW,cAAc;","names":[]}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var marketplace_dialog_primitives_exports = {};
|
|
31
|
+
__export(marketplace_dialog_primitives_exports, {
|
|
32
|
+
CurrencyPicker: () => CurrencyPicker,
|
|
33
|
+
DurationPicker: () => DurationPicker,
|
|
34
|
+
MarketplaceConfirmStep: () => MarketplaceConfirmStep,
|
|
35
|
+
MarketplaceDialogHero: () => MarketplaceDialogHero,
|
|
36
|
+
MarketplaceErrorState: () => MarketplaceErrorState,
|
|
37
|
+
MarketplaceProcessingState: () => MarketplaceProcessingState,
|
|
38
|
+
MarketplaceSignInGate: () => MarketplaceSignInGate,
|
|
39
|
+
MarketplaceSuccessState: () => MarketplaceSuccessState,
|
|
40
|
+
MarketplaceTxLink: () => MarketplaceTxLink
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(marketplace_dialog_primitives_exports);
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var import_image = __toESM(require("next/image"), 1);
|
|
45
|
+
var import_lucide_react = require("lucide-react");
|
|
46
|
+
var import_alert = require("./alert.js");
|
|
47
|
+
var import_button = require("./button.js");
|
|
48
|
+
var import_currency_icon = require("./currency-icon.js");
|
|
49
|
+
var import_cn = require("../utils/cn.js");
|
|
50
|
+
function MarketplaceTxLink({ txHash, explorerUrl, className }) {
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
52
|
+
"a",
|
|
53
|
+
{
|
|
54
|
+
href: `${explorerUrl}/tx/${txHash}`,
|
|
55
|
+
target: "_blank",
|
|
56
|
+
rel: "noopener noreferrer",
|
|
57
|
+
className: (0, import_cn.cn)(
|
|
58
|
+
"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors",
|
|
59
|
+
className
|
|
60
|
+
),
|
|
61
|
+
children: [
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "tabular-nums", children: [
|
|
63
|
+
txHash.slice(0, 10),
|
|
64
|
+
"\u2026",
|
|
65
|
+
txHash.slice(-8)
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-3 w-3" })
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function MarketplaceProcessingState({
|
|
73
|
+
title,
|
|
74
|
+
description = "Please wait, do not close this window.",
|
|
75
|
+
imageUrl,
|
|
76
|
+
imageAlt = "Token preview",
|
|
77
|
+
txHash,
|
|
78
|
+
explorerUrl
|
|
79
|
+
}) {
|
|
80
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
|
|
81
|
+
imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative h-20 w-20 rounded-2xl overflow-hidden border border-border", children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: imageUrl, alt: imageAlt, fill: true, sizes: "80px", className: "object-cover", unoptimized: true }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 bg-background/50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-7 w-7 animate-spin text-primary" }) })
|
|
84
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-10 w-10 animate-spin text-primary" }),
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center space-y-1", children: [
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-semibold", children: title }),
|
|
87
|
+
txHash && explorerUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarketplaceTxLink, { txHash, explorerUrl, className: "mt-1" }) : null
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: description })
|
|
90
|
+
] });
|
|
91
|
+
}
|
|
92
|
+
function MarketplaceSignInGate({ title, description, href, ctaLabel = "Set up account" }) {
|
|
93
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-4 p-6 py-10 text-center", children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Wallet, { className: "h-10 w-10 text-muted-foreground" }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-semibold", children: title }),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground mt-1", children: description })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "btn-border-animated w-full p-[1px] rounded-lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
|
+
import_button.Button,
|
|
101
|
+
{
|
|
102
|
+
asChild: true,
|
|
103
|
+
className: "w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all",
|
|
104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href, children: ctaLabel })
|
|
105
|
+
}
|
|
106
|
+
) })
|
|
107
|
+
] });
|
|
108
|
+
}
|
|
109
|
+
function MarketplaceSuccessState({
|
|
110
|
+
tokenImage,
|
|
111
|
+
name,
|
|
112
|
+
title,
|
|
113
|
+
description,
|
|
114
|
+
txHash,
|
|
115
|
+
explorerUrl,
|
|
116
|
+
onDone,
|
|
117
|
+
footer
|
|
118
|
+
}) {
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
|
|
120
|
+
tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
|
|
121
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
|
|
122
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-emerald-500 flex items-center justify-center border-2 border-background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-5 w-5 text-white" }) }),
|
|
123
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "absolute -top-2 -right-2 h-5 w-5 text-brand-orange" })
|
|
124
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-16 w-16 rounded-full bg-emerald-500/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-9 w-9 text-emerald-500" }) }),
|
|
126
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "absolute -top-1 -right-1 h-5 w-5 text-brand-orange" })
|
|
127
|
+
] }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center space-y-1 max-w-full", children: [
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-xl break-words", children: title }),
|
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground break-words", children: description })
|
|
131
|
+
] }),
|
|
132
|
+
txHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarketplaceTxLink, { txHash, explorerUrl }),
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { className: "w-full h-11", onClick: onDone, children: "Done" }),
|
|
134
|
+
footer
|
|
135
|
+
] });
|
|
136
|
+
}
|
|
137
|
+
function MarketplaceErrorState({
|
|
138
|
+
tokenImage,
|
|
139
|
+
name,
|
|
140
|
+
title,
|
|
141
|
+
description,
|
|
142
|
+
error,
|
|
143
|
+
txHash,
|
|
144
|
+
explorerUrl,
|
|
145
|
+
onRetry,
|
|
146
|
+
onDone,
|
|
147
|
+
doneLabel = "Done"
|
|
148
|
+
}) {
|
|
149
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
|
|
150
|
+
tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
|
|
152
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-5 w-5 text-white" }) })
|
|
153
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-9 w-9 text-destructive" }) }),
|
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center space-y-1 max-w-full", children: [
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-xl break-words", children: title }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground break-words", children: description })
|
|
157
|
+
] }),
|
|
158
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.Alert, { variant: "destructive", className: "text-left", children: [
|
|
159
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-4 w-4" }),
|
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert.AlertDescription, { children: error })
|
|
161
|
+
] }) : null,
|
|
162
|
+
txHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarketplaceTxLink, { txHash, explorerUrl }),
|
|
163
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex w-full gap-2", children: [
|
|
164
|
+
onRetry ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "outline", className: "flex-1 h-11", onClick: onRetry, children: "Try again" }) : null,
|
|
165
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { className: "flex-1 h-11", onClick: onDone, children: doneLabel })
|
|
166
|
+
] })
|
|
167
|
+
] });
|
|
168
|
+
}
|
|
169
|
+
function MarketplaceDialogHero({
|
|
170
|
+
tokenImage,
|
|
171
|
+
tokenName,
|
|
172
|
+
tokenId,
|
|
173
|
+
fallbackIcon,
|
|
174
|
+
badge
|
|
175
|
+
}) {
|
|
176
|
+
const name = tokenName || `Token #${tokenId}`;
|
|
177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative h-32 w-full bg-muted overflow-hidden shrink-0", children: [
|
|
178
|
+
tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "384px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center", children: fallbackIcon }),
|
|
179
|
+
badge
|
|
180
|
+
] });
|
|
181
|
+
}
|
|
182
|
+
function CurrencyPicker({ currencies, value, onChange, disabled }) {
|
|
183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-5 gap-1.5", children: currencies.map((c) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
184
|
+
import_button.Button,
|
|
185
|
+
{
|
|
186
|
+
type: "button",
|
|
187
|
+
variant: value === c ? "default" : "outline",
|
|
188
|
+
size: "sm",
|
|
189
|
+
onClick: () => onChange(c),
|
|
190
|
+
disabled,
|
|
191
|
+
className: "gap-1 px-2 text-xs w-full",
|
|
192
|
+
children: [
|
|
193
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: c, size: 13, className: "shrink-0" }),
|
|
194
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "truncate", children: c })
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
c
|
|
198
|
+
)) });
|
|
199
|
+
}
|
|
200
|
+
function DurationPicker({ options, value, onChange, disabled, cols = 3 }) {
|
|
201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: cols === 4 ? "grid grid-cols-4 gap-2" : "grid grid-cols-3 gap-2", children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
202
|
+
import_button.Button,
|
|
203
|
+
{
|
|
204
|
+
type: "button",
|
|
205
|
+
variant: value === opt.seconds ? "default" : "outline",
|
|
206
|
+
size: "sm",
|
|
207
|
+
onClick: () => onChange(opt.seconds),
|
|
208
|
+
disabled,
|
|
209
|
+
className: "text-xs",
|
|
210
|
+
children: opt.label
|
|
211
|
+
},
|
|
212
|
+
opt.label
|
|
213
|
+
)) });
|
|
214
|
+
}
|
|
215
|
+
function MarketplaceConfirmStep({
|
|
216
|
+
summary,
|
|
217
|
+
description,
|
|
218
|
+
error,
|
|
219
|
+
secondaryLabel,
|
|
220
|
+
onSecondary,
|
|
221
|
+
primaryLabel,
|
|
222
|
+
onPrimary,
|
|
223
|
+
primaryDisabled,
|
|
224
|
+
primaryIcon,
|
|
225
|
+
primaryVariant = "default",
|
|
226
|
+
footer
|
|
227
|
+
}) {
|
|
228
|
+
const primaryButton = primaryVariant === "destructive" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
229
|
+
import_button.Button,
|
|
230
|
+
{
|
|
231
|
+
variant: "destructive",
|
|
232
|
+
className: "flex-1 h-11",
|
|
233
|
+
disabled: primaryDisabled,
|
|
234
|
+
onClick: onPrimary,
|
|
235
|
+
children: primaryLabel
|
|
236
|
+
}
|
|
237
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
238
|
+
"div",
|
|
239
|
+
{
|
|
240
|
+
className: (0, import_cn.cn)(
|
|
241
|
+
"btn-border-animated p-[1px] rounded-xl flex-1",
|
|
242
|
+
primaryDisabled && "pointer-events-none"
|
|
243
|
+
),
|
|
244
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
245
|
+
"button",
|
|
246
|
+
{
|
|
247
|
+
className: "w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent",
|
|
248
|
+
disabled: primaryDisabled,
|
|
249
|
+
onClick: onPrimary,
|
|
250
|
+
children: [
|
|
251
|
+
primaryIcon,
|
|
252
|
+
primaryLabel
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
);
|
|
258
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-6 pb-6 pt-3 space-y-4", children: [
|
|
259
|
+
summary,
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: description }),
|
|
261
|
+
error ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.Alert, { variant: "destructive", children: [
|
|
262
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-4 w-4" }),
|
|
263
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert.AlertDescription, { children: error })
|
|
264
|
+
] }) : null,
|
|
265
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2 pt-1", children: [
|
|
266
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
267
|
+
import_button.Button,
|
|
268
|
+
{
|
|
269
|
+
variant: "outline",
|
|
270
|
+
className: "gap-1.5",
|
|
271
|
+
onClick: onSecondary,
|
|
272
|
+
children: secondaryLabel
|
|
273
|
+
}
|
|
274
|
+
),
|
|
275
|
+
primaryButton
|
|
276
|
+
] }),
|
|
277
|
+
footer
|
|
278
|
+
] });
|
|
279
|
+
}
|
|
280
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
281
|
+
0 && (module.exports = {
|
|
282
|
+
CurrencyPicker,
|
|
283
|
+
DurationPicker,
|
|
284
|
+
MarketplaceConfirmStep,
|
|
285
|
+
MarketplaceDialogHero,
|
|
286
|
+
MarketplaceErrorState,
|
|
287
|
+
MarketplaceProcessingState,
|
|
288
|
+
MarketplaceSignInGate,
|
|
289
|
+
MarketplaceSuccessState,
|
|
290
|
+
MarketplaceTxLink
|
|
291
|
+
});
|
|
292
|
+
//# sourceMappingURL=marketplace-dialog-primitives.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"next/image\";\nimport { AlertCircle, CheckCircle2, ExternalLink, Loader2, Sparkles, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Please wait, do not close this window.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceSuccessStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n txHash?: string | null;\n explorerUrl: string;\n onDone: () => void;\n footer?: ReactNode;\n}\n\nexport function MarketplaceSuccessState({\n tokenImage,\n name,\n title,\n description,\n txHash,\n explorerUrl,\n onDone,\n footer,\n}: MarketplaceSuccessStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-emerald-500 flex items-center justify-center border-2 border-background\">\n <CheckCircle2 className=\"h-5 w-5 text-white\" />\n </div>\n <Sparkles className=\"absolute -top-2 -right-2 h-5 w-5 text-brand-orange\" />\n </div>\n ) : (\n <div className=\"relative\">\n <div className=\"h-16 w-16 rounded-full bg-emerald-500/15 flex items-center justify-center\">\n <CheckCircle2 className=\"h-9 w-9 text-emerald-500\" />\n </div>\n <Sparkles className=\"absolute -top-1 -right-1 h-5 w-5 text-brand-orange\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <Button className=\"w-full h-11\" onClick={onDone}>Done</Button>\n {footer}\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative h-32 w-full bg-muted overflow-hidden shrink-0\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"384px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n {badge}\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BM;AAxBN,mBAAkB;AAClB,0BAAmF;AACnF,mBAAwC;AACxC,oBAAuB;AACvB,2BAA6B;AAC7B,gBAAmB;AAQZ,SAAS,kBAAkB,EAAE,QAAQ,aAAa,UAAU,GAA2B;AAC5F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,WAAW,OAAO,MAAM;AAAA,MACjC,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,eAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,UAAK,WAAU,gBAAgB;AAAA,iBAAO,MAAM,GAAG,EAAE;AAAA,UAAE;AAAA,UAAE,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Q,eACb;AAAA,kDAAC,mCAAY,WAAU,WAAU;AAAA,MACjC,4CAAC,iCAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,6CAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":["Image"]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface MarketplaceTxLinkProps {
|
|
5
|
+
txHash: string;
|
|
6
|
+
explorerUrl: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
interface MarketplaceProcessingStateProps {
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
imageUrl?: string | null;
|
|
14
|
+
imageAlt?: string;
|
|
15
|
+
txHash?: string | null;
|
|
16
|
+
explorerUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function MarketplaceProcessingState({ title, description, imageUrl, imageAlt, txHash, explorerUrl, }: MarketplaceProcessingStateProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
interface MarketplaceSignInGateProps {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
href: string;
|
|
23
|
+
ctaLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
declare function MarketplaceSignInGate({ title, description, href, ctaLabel }: MarketplaceSignInGateProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
interface MarketplaceSuccessStateProps {
|
|
27
|
+
tokenImage?: string | null;
|
|
28
|
+
name: string;
|
|
29
|
+
title: string;
|
|
30
|
+
description: ReactNode;
|
|
31
|
+
txHash?: string | null;
|
|
32
|
+
explorerUrl: string;
|
|
33
|
+
onDone: () => void;
|
|
34
|
+
footer?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare function MarketplaceSuccessState({ tokenImage, name, title, description, txHash, explorerUrl, onDone, footer, }: MarketplaceSuccessStateProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
interface MarketplaceErrorStateProps {
|
|
38
|
+
tokenImage?: string | null;
|
|
39
|
+
name: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description: ReactNode;
|
|
42
|
+
error?: string | null;
|
|
43
|
+
txHash?: string | null;
|
|
44
|
+
explorerUrl: string;
|
|
45
|
+
onRetry?: () => void;
|
|
46
|
+
onDone: () => void;
|
|
47
|
+
doneLabel?: string;
|
|
48
|
+
}
|
|
49
|
+
declare function MarketplaceErrorState({ tokenImage, name, title, description, error, txHash, explorerUrl, onRetry, onDone, doneLabel, }: MarketplaceErrorStateProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
interface MarketplaceDialogHeroProps {
|
|
51
|
+
tokenImage?: string | null;
|
|
52
|
+
tokenName?: string;
|
|
53
|
+
tokenId: string;
|
|
54
|
+
fallbackIcon: ReactNode;
|
|
55
|
+
badge?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
declare function MarketplaceDialogHero({ tokenImage, tokenName, tokenId, fallbackIcon, badge, }: MarketplaceDialogHeroProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
interface CurrencyPickerProps {
|
|
59
|
+
currencies: string[];
|
|
60
|
+
value: string;
|
|
61
|
+
onChange: (value: string) => void;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
interface DurationPickerProps {
|
|
66
|
+
options: ReadonlyArray<{
|
|
67
|
+
label: string;
|
|
68
|
+
seconds: number;
|
|
69
|
+
}>;
|
|
70
|
+
value: number;
|
|
71
|
+
onChange: (value: number) => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
cols?: 3 | 4;
|
|
74
|
+
}
|
|
75
|
+
declare function DurationPicker({ options, value, onChange, disabled, cols }: DurationPickerProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
interface MarketplaceConfirmStepProps {
|
|
77
|
+
summary?: ReactNode;
|
|
78
|
+
description: string;
|
|
79
|
+
error?: string | null;
|
|
80
|
+
secondaryLabel: string;
|
|
81
|
+
onSecondary: () => void;
|
|
82
|
+
primaryLabel: string;
|
|
83
|
+
onPrimary: () => void;
|
|
84
|
+
primaryDisabled?: boolean;
|
|
85
|
+
primaryIcon?: ReactNode;
|
|
86
|
+
primaryVariant?: "default" | "destructive";
|
|
87
|
+
footer?: ReactNode;
|
|
88
|
+
}
|
|
89
|
+
declare function MarketplaceConfirmStep({ summary, description, error, secondaryLabel, onSecondary, primaryLabel, onPrimary, primaryDisabled, primaryIcon, primaryVariant, footer, }: MarketplaceConfirmStepProps): react_jsx_runtime.JSX.Element;
|
|
90
|
+
|
|
91
|
+
export { CurrencyPicker, DurationPicker, MarketplaceConfirmStep, MarketplaceDialogHero, MarketplaceErrorState, MarketplaceProcessingState, MarketplaceSignInGate, MarketplaceSuccessState, MarketplaceTxLink };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
interface MarketplaceTxLinkProps {
|
|
5
|
+
txHash: string;
|
|
6
|
+
explorerUrl: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
interface MarketplaceProcessingStateProps {
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
imageUrl?: string | null;
|
|
14
|
+
imageAlt?: string;
|
|
15
|
+
txHash?: string | null;
|
|
16
|
+
explorerUrl?: string;
|
|
17
|
+
}
|
|
18
|
+
declare function MarketplaceProcessingState({ title, description, imageUrl, imageAlt, txHash, explorerUrl, }: MarketplaceProcessingStateProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
interface MarketplaceSignInGateProps {
|
|
20
|
+
title: string;
|
|
21
|
+
description: string;
|
|
22
|
+
href: string;
|
|
23
|
+
ctaLabel?: string;
|
|
24
|
+
}
|
|
25
|
+
declare function MarketplaceSignInGate({ title, description, href, ctaLabel }: MarketplaceSignInGateProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
interface MarketplaceSuccessStateProps {
|
|
27
|
+
tokenImage?: string | null;
|
|
28
|
+
name: string;
|
|
29
|
+
title: string;
|
|
30
|
+
description: ReactNode;
|
|
31
|
+
txHash?: string | null;
|
|
32
|
+
explorerUrl: string;
|
|
33
|
+
onDone: () => void;
|
|
34
|
+
footer?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
declare function MarketplaceSuccessState({ tokenImage, name, title, description, txHash, explorerUrl, onDone, footer, }: MarketplaceSuccessStateProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
interface MarketplaceErrorStateProps {
|
|
38
|
+
tokenImage?: string | null;
|
|
39
|
+
name: string;
|
|
40
|
+
title: string;
|
|
41
|
+
description: ReactNode;
|
|
42
|
+
error?: string | null;
|
|
43
|
+
txHash?: string | null;
|
|
44
|
+
explorerUrl: string;
|
|
45
|
+
onRetry?: () => void;
|
|
46
|
+
onDone: () => void;
|
|
47
|
+
doneLabel?: string;
|
|
48
|
+
}
|
|
49
|
+
declare function MarketplaceErrorState({ tokenImage, name, title, description, error, txHash, explorerUrl, onRetry, onDone, doneLabel, }: MarketplaceErrorStateProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
interface MarketplaceDialogHeroProps {
|
|
51
|
+
tokenImage?: string | null;
|
|
52
|
+
tokenName?: string;
|
|
53
|
+
tokenId: string;
|
|
54
|
+
fallbackIcon: ReactNode;
|
|
55
|
+
badge?: ReactNode;
|
|
56
|
+
}
|
|
57
|
+
declare function MarketplaceDialogHero({ tokenImage, tokenName, tokenId, fallbackIcon, badge, }: MarketplaceDialogHeroProps): react_jsx_runtime.JSX.Element;
|
|
58
|
+
interface CurrencyPickerProps {
|
|
59
|
+
currencies: string[];
|
|
60
|
+
value: string;
|
|
61
|
+
onChange: (value: string) => void;
|
|
62
|
+
disabled?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps): react_jsx_runtime.JSX.Element;
|
|
65
|
+
interface DurationPickerProps {
|
|
66
|
+
options: ReadonlyArray<{
|
|
67
|
+
label: string;
|
|
68
|
+
seconds: number;
|
|
69
|
+
}>;
|
|
70
|
+
value: number;
|
|
71
|
+
onChange: (value: number) => void;
|
|
72
|
+
disabled?: boolean;
|
|
73
|
+
cols?: 3 | 4;
|
|
74
|
+
}
|
|
75
|
+
declare function DurationPicker({ options, value, onChange, disabled, cols }: DurationPickerProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
interface MarketplaceConfirmStepProps {
|
|
77
|
+
summary?: ReactNode;
|
|
78
|
+
description: string;
|
|
79
|
+
error?: string | null;
|
|
80
|
+
secondaryLabel: string;
|
|
81
|
+
onSecondary: () => void;
|
|
82
|
+
primaryLabel: string;
|
|
83
|
+
onPrimary: () => void;
|
|
84
|
+
primaryDisabled?: boolean;
|
|
85
|
+
primaryIcon?: ReactNode;
|
|
86
|
+
primaryVariant?: "default" | "destructive";
|
|
87
|
+
footer?: ReactNode;
|
|
88
|
+
}
|
|
89
|
+
declare function MarketplaceConfirmStep({ summary, description, error, secondaryLabel, onSecondary, primaryLabel, onPrimary, primaryDisabled, primaryIcon, primaryVariant, footer, }: MarketplaceConfirmStepProps): react_jsx_runtime.JSX.Element;
|
|
90
|
+
|
|
91
|
+
export { CurrencyPicker, DurationPicker, MarketplaceConfirmStep, MarketplaceDialogHero, MarketplaceErrorState, MarketplaceProcessingState, MarketplaceSignInGate, MarketplaceSuccessState, MarketplaceTxLink };
|