@medialane/ui 0.304.0 → 0.306.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/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/account-page.cjs +151 -0
- package/dist/components/account-page.cjs.map +1 -0
- package/dist/components/account-page.d.cts +15 -0
- package/dist/components/account-page.d.ts +15 -0
- package/dist/components/account-page.js +117 -0
- package/dist/components/account-page.js.map +1 -0
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/cancel-order-confirm.cjs +48 -0
- package/dist/components/cancel-order-confirm.cjs.map +1 -0
- package/dist/components/cancel-order-confirm.d.cts +16 -0
- package/dist/components/cancel-order-confirm.d.ts +16 -0
- package/dist/components/cancel-order-confirm.js +24 -0
- package/dist/components/cancel-order-confirm.js.map +1 -0
- package/dist/components/creator-page.cjs +47 -68
- package/dist/components/creator-page.cjs.map +1 -1
- package/dist/components/creator-page.d.cts +2 -3
- package/dist/components/creator-page.d.ts +2 -3
- package/dist/components/creator-page.js +48 -69
- package/dist/components/creator-page.js.map +1 -1
- package/dist/components/fast-mint/fast-mint.d.cts +2 -2
- package/dist/components/fast-mint/fast-mint.d.ts +2 -2
- package/dist/components/launchpad/edition-mint-schema.d.cts +2 -2
- package/dist/components/launchpad/edition-mint-schema.d.ts +2 -2
- package/dist/components/marketplace-dialog-primitives.cjs +5 -5
- package/dist/components/marketplace-dialog-primitives.cjs.map +1 -1
- package/dist/components/marketplace-dialog-primitives.d.cts +1 -1
- package/dist/components/marketplace-dialog-primitives.d.ts +1 -1
- package/dist/components/marketplace-dialog-primitives.js +5 -5
- package/dist/components/marketplace-dialog-primitives.js.map +1 -1
- package/dist/components/sheet.d.cts +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/underline-tabs.cjs +62 -0
- package/dist/components/underline-tabs.cjs.map +1 -0
- package/dist/components/underline-tabs.d.cts +20 -0
- package/dist/components/underline-tabs.d.ts +20 -0
- package/dist/components/underline-tabs.js +28 -0
- package/dist/components/underline-tabs.js.map +1 -0
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/query-keys.cjs +1 -0
- package/dist/utils/query-keys.cjs.map +1 -1
- package/dist/utils/query-keys.d.cts +1 -0
- package/dist/utils/query-keys.d.ts +1 -0
- package/dist/utils/query-keys.js +1 -0
- package/dist/utils/query-keys.js.map +1 -1
- package/dist/utils/use-tokens.cjs +23 -0
- package/dist/utils/use-tokens.cjs.map +1 -1
- package/dist/utils/use-tokens.d.cts +180 -1
- package/dist/utils/use-tokens.d.ts +180 -1
- package/dist/utils/use-tokens.js +23 -1
- package/dist/utils/use-tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -16,7 +16,6 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
16
16
|
royalty: zod.ZodNumber;
|
|
17
17
|
}, "strip", zod.ZodTypeAny, {
|
|
18
18
|
name: string;
|
|
19
|
-
value: string;
|
|
20
19
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
21
20
|
licenseType: string;
|
|
22
21
|
commercialUse: "Yes" | "No";
|
|
@@ -25,12 +24,12 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
25
24
|
geographicScope: string;
|
|
26
25
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
27
26
|
royalty: number;
|
|
27
|
+
value: string;
|
|
28
28
|
recipient: string;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
external_url?: string | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
name: string;
|
|
33
|
-
value: string;
|
|
34
33
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
35
34
|
licenseType: string;
|
|
36
35
|
commercialUse: "Yes" | "No";
|
|
@@ -39,6 +38,7 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
39
38
|
geographicScope: string;
|
|
40
39
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
41
40
|
royalty: number;
|
|
41
|
+
value: string;
|
|
42
42
|
recipient: string;
|
|
43
43
|
description?: string | undefined;
|
|
44
44
|
external_url?: string | undefined;
|
|
@@ -16,7 +16,6 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
16
16
|
royalty: zod.ZodNumber;
|
|
17
17
|
}, "strip", zod.ZodTypeAny, {
|
|
18
18
|
name: string;
|
|
19
|
-
value: string;
|
|
20
19
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
21
20
|
licenseType: string;
|
|
22
21
|
commercialUse: "Yes" | "No";
|
|
@@ -25,12 +24,12 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
25
24
|
geographicScope: string;
|
|
26
25
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
27
26
|
royalty: number;
|
|
27
|
+
value: string;
|
|
28
28
|
recipient: string;
|
|
29
29
|
description?: string | undefined;
|
|
30
30
|
external_url?: string | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
name: string;
|
|
33
|
-
value: string;
|
|
34
33
|
ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
|
|
35
34
|
licenseType: string;
|
|
36
35
|
commercialUse: "Yes" | "No";
|
|
@@ -39,6 +38,7 @@ declare const editionMintSchema: zod.ZodObject<{
|
|
|
39
38
|
geographicScope: string;
|
|
40
39
|
aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
|
|
41
40
|
royalty: number;
|
|
41
|
+
value: string;
|
|
42
42
|
recipient: string;
|
|
43
43
|
description?: string | undefined;
|
|
44
44
|
external_url?: string | undefined;
|
|
@@ -121,7 +121,7 @@ function MarketplaceErrorState({
|
|
|
121
121
|
}) {
|
|
122
122
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
|
|
123
123
|
tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
|
|
124
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden
|
|
124
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
|
|
125
125
|
/* @__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" }) })
|
|
126
126
|
] }) : /* @__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" }) }),
|
|
127
127
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center space-y-1 max-w-full", children: [
|
|
@@ -148,7 +148,7 @@ function MarketplaceDialogHero({
|
|
|
148
148
|
}) {
|
|
149
149
|
const name = tokenName || `Token #${tokenId}`;
|
|
150
150
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative flex justify-center pt-6 shrink-0", children: [
|
|
151
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden
|
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", 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 }) }),
|
|
152
152
|
badge
|
|
153
153
|
] });
|
|
154
154
|
}
|
|
@@ -168,7 +168,7 @@ function OrderSummaryHero({
|
|
|
168
168
|
const stable = price ? (0, import_format.isStableCurrency)(price.currency) : false;
|
|
169
169
|
const face = "font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums";
|
|
170
170
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
171
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden
|
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: image, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
174
|
className: (0, import_cn.cn)(
|
|
@@ -180,7 +180,7 @@ function OrderSummaryHero({
|
|
|
180
180
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-4 px-5 pt-4 pb-1", children: [
|
|
181
181
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
182
182
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-lg leading-tight truncate", children: name }),
|
|
183
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle })
|
|
183
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle }) : null
|
|
184
184
|
] }),
|
|
185
185
|
price ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "shrink-0 text-right", children: [
|
|
186
186
|
usdTotal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: (0, import_cn.cn)(face, "text-2xl"), children: usdTotal }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: (0, import_cn.cn)("flex items-center gap-2 justify-end text-2xl", face), children: [
|
|
@@ -290,7 +290,7 @@ function MarketplaceConfirmStep({
|
|
|
290
290
|
import_button.Button,
|
|
291
291
|
{
|
|
292
292
|
variant: "outline",
|
|
293
|
-
className: "gap-1.5",
|
|
293
|
+
className: "h-11 flex-1 gap-1.5",
|
|
294
294
|
onClick: onSecondary,
|
|
295
295
|
children: secondaryLabel
|
|
296
296
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, 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\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.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 = \"Keep this window open until it finishes.\",\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 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 flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" 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 </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div>\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\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;AA4BM;AAzBN,mBAAkB;AAClB,0BAA2D;AAC3D,mBAAwC;AACxC,oBAAuB;AACvB,2BAA6B;AAC7B,gBAAmB;AACnB,oBAAqD;AAQ9C,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,OAAO,MAAM,EAAE;AAAA,WAAE;AAAA,QACvE,4CAAC,oCAAa,WAAU,WAAU;AAAA;AAAA;AAAA,EACpC;AAEJ;AAWO,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA;AACF,GAA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AAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACF,GAAgC;AAC9B,QAAM,gBAAgB,mBAAmB,gBACvC;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MAER;AAAA;AAAA,EACH,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,6CAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,4CAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,6CAAC,sBAAM,SAAQ,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"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, 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\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.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 = \"Keep this window open until it finishes.\",\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 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\">\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 flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" 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 </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle?: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n {subtitle ? <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div> : null}\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\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=\"h-11 flex-1 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;AA4BM;AAzBN,mBAAkB;AAClB,0BAA2D;AAC3D,mBAAwC;AACxC,oBAAuB;AACvB,2BAA6B;AAC7B,gBAAmB;AACnB,oBAAqD;AAQ9C,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,OAAO,MAAM,EAAE;AAAA,WAAE;AAAA,QACvE,4CAAC,oCAAa,WAAU,WAAU;AAAA;AAAA;AAAA,EACpC;AAEJ;AAWO,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,WAAW;AAAA,EACX;AAAA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A;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACF,GAAgC;AAC9B,QAAM,gBAAgB,mBAAmB,gBACvC;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MAER;AAAA;AAAA,EACH,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,6CAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,4CAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,6CAAC,sBAAM,SAAQ,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"]}
|
|
@@ -47,7 +47,7 @@ declare function MarketplaceDialogHero({ tokenImage, tokenName, tokenId, fallbac
|
|
|
47
47
|
interface OrderSummaryHeroProps {
|
|
48
48
|
name: string;
|
|
49
49
|
image?: string | null;
|
|
50
|
-
subtitle
|
|
50
|
+
subtitle?: ReactNode;
|
|
51
51
|
tone?: "default" | "destructive";
|
|
52
52
|
price?: {
|
|
53
53
|
formatted: string | null;
|
|
@@ -47,7 +47,7 @@ declare function MarketplaceDialogHero({ tokenImage, tokenName, tokenId, fallbac
|
|
|
47
47
|
interface OrderSummaryHeroProps {
|
|
48
48
|
name: string;
|
|
49
49
|
image?: string | null;
|
|
50
|
-
subtitle
|
|
50
|
+
subtitle?: ReactNode;
|
|
51
51
|
tone?: "default" | "destructive";
|
|
52
52
|
price?: {
|
|
53
53
|
formatted: string | null;
|
|
@@ -80,7 +80,7 @@ function MarketplaceErrorState({
|
|
|
80
80
|
}) {
|
|
81
81
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
|
|
82
82
|
tokenImage ? /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
83
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden
|
|
83
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden", children: /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
|
|
84
84
|
/* @__PURE__ */ 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__ */ jsx(AlertCircle, { className: "h-5 w-5 text-white" }) })
|
|
85
85
|
] }) : /* @__PURE__ */ jsx("div", { className: "h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center", children: /* @__PURE__ */ jsx(AlertCircle, { className: "h-9 w-9 text-destructive" }) }),
|
|
86
86
|
/* @__PURE__ */ jsxs("div", { className: "text-center space-y-1 max-w-full", children: [
|
|
@@ -107,7 +107,7 @@ function MarketplaceDialogHero({
|
|
|
107
107
|
}) {
|
|
108
108
|
const name = tokenName || `Token #${tokenId}`;
|
|
109
109
|
return /* @__PURE__ */ jsxs("div", { className: "relative flex justify-center pt-6 shrink-0", children: [
|
|
110
|
-
/* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden
|
|
110
|
+
/* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: tokenImage ? /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ 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 }) }),
|
|
111
111
|
badge
|
|
112
112
|
] });
|
|
113
113
|
}
|
|
@@ -127,7 +127,7 @@ function OrderSummaryHero({
|
|
|
127
127
|
const stable = price ? isStableCurrency(price.currency) : false;
|
|
128
128
|
const face = "font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums";
|
|
129
129
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
130
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden
|
|
130
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center pt-6 shrink-0", children: /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden bg-muted", children: image ? /* @__PURE__ */ jsx(Image, { src: image, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) : /* @__PURE__ */ jsx(
|
|
131
131
|
"div",
|
|
132
132
|
{
|
|
133
133
|
className: cn(
|
|
@@ -139,7 +139,7 @@ function OrderSummaryHero({
|
|
|
139
139
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4 px-5 pt-4 pb-1", children: [
|
|
140
140
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
141
141
|
/* @__PURE__ */ jsx("p", { className: "font-bold text-lg leading-tight truncate", children: name }),
|
|
142
|
-
/* @__PURE__ */ jsx("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle })
|
|
142
|
+
subtitle ? /* @__PURE__ */ jsx("div", { className: "mt-1 text-2xs font-medium text-muted-foreground", children: subtitle }) : null
|
|
143
143
|
] }),
|
|
144
144
|
price ? /* @__PURE__ */ jsxs("div", { className: "shrink-0 text-right", children: [
|
|
145
145
|
usdTotal ? /* @__PURE__ */ jsx("p", { className: cn(face, "text-2xl"), children: usdTotal }) : /* @__PURE__ */ jsxs("p", { className: cn("flex items-center gap-2 justify-end text-2xl", face), children: [
|
|
@@ -249,7 +249,7 @@ function MarketplaceConfirmStep({
|
|
|
249
249
|
Button,
|
|
250
250
|
{
|
|
251
251
|
variant: "outline",
|
|
252
|
-
className: "gap-1.5",
|
|
252
|
+
className: "h-11 flex-1 gap-1.5",
|
|
253
253
|
onClick: onSecondary,
|
|
254
254
|
children: secondaryLabel
|
|
255
255
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, 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\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.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 = \"Keep this window open until it finishes.\",\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 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 flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" 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 </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div>\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\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 {primaryBut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AU,iCAAiC,uBAAY;AAAA,IACzD,QACC,qBAAC,SAAM,SAAQ,eACb;AAAA,0BAAC,eAAY,WAAU,WAAU;AAAA,MACjC,oBAAC,oBAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,qBAAC,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":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, 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\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.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 = \"Keep this window open until it finishes.\",\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 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\">\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 flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" 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 </div>\n {badge}\n </div>\n );\n}\n\ninterface OrderSummaryHeroProps {\n name: string;\n image?: string | null;\n subtitle?: ReactNode;\n tone?: \"default\" | \"destructive\";\n price?: { formatted: string | null; currency: string | null; decimals: number } | null;\n quantity?: number;\n usdTotal?: string | null;\n}\n\nexport function OrderSummaryHero({\n name,\n image,\n subtitle,\n tone = \"default\",\n price: rawPrice,\n quantity = 1,\n usdTotal,\n}: OrderSummaryHeroProps) {\n const price = rawPrice?.formatted && rawPrice.currency\n ? { formatted: rawPrice.formatted, currency: rawPrice.currency, decimals: rawPrice.decimals }\n : null;\n const unit = price ? parseFloat(price.formatted) : null;\n const showTotal = unit !== null && quantity > 1;\n const crypto = price\n ? formatDisplayPrice(showTotal ? (unit! * quantity).toFixed(price.decimals <= 6 ? 2 : 4) : price.formatted)\n : \"\";\n const stable = price ? isStableCurrency(price.currency) : false;\n const face = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\n return (\n <div>\n <div className=\"flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden bg-muted\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div\n className={cn(\n \"h-full w-full bg-gradient-to-br to-transparent\",\n tone === \"destructive\"\n ? \"from-destructive/20 via-brand-rose/10\"\n : \"from-primary/20 via-brand-purple/10\",\n )}\n />\n )}\n </div>\n </div>\n\n <div className=\"flex items-center justify-between gap-4 px-5 pt-4 pb-1\">\n <div className=\"min-w-0\">\n <p className=\"font-bold text-lg leading-tight truncate\">{name}</p>\n {subtitle ? <div className=\"mt-1 text-2xs font-medium text-muted-foreground\">{subtitle}</div> : null}\n </div>\n {price ? (\n <div className=\"shrink-0 text-right\">\n {usdTotal ? (\n <p className={cn(face, \"text-2xl\")}>{usdTotal}</p>\n ) : (\n <p className={cn(\"flex items-center gap-2 justify-end text-2xl\", face)}>\n <span className=\"grid h-6 w-6 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={13} />\n </span>\n {crypto}\n </p>\n )}\n <p className=\"mt-0.5 inline-flex items-center justify-end gap-1.5 text-sm font-semibold text-muted-foreground\">\n {usdTotal ? (\n <span className=\"grid h-4 w-4 shrink-0 place-items-center rounded-full bg-foreground/[0.06]\">\n <CurrencyIcon symbol={price.currency} size={10} />\n </span>\n ) : null}\n {usdTotal ? (stable ? price.currency : `${crypto} ${price.currency}`) : price.currency}\n </p>\n {showTotal ? (\n <p className=\"mt-0.5 text-2xs text-muted-foreground/60\">\n {formatDisplayPrice(price.formatted)} × {quantity} {price.currency}\n </p>\n ) : null}\n </div>\n ) : null}\n </div>\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=\"h-11 flex-1 gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";AA4BM,SACA,KADA;AAzBN,OAAO,WAAW;AAClB,SAAS,aAA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AAU,WAAU;AAAA,MACjC,oBAAC,oBAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,qBAAC,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":[]}
|
|
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
10
10
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
11
11
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
|
-
side?: "
|
|
13
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
15
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
overlayClassName?: string;
|
|
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
10
10
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
11
11
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
|
-
side?: "
|
|
13
|
+
side?: "bottom" | "left" | "right" | "top" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
15
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
overlayClassName?: string;
|
|
@@ -0,0 +1,62 @@
|
|
|
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 underline_tabs_exports = {};
|
|
31
|
+
__export(underline_tabs_exports, {
|
|
32
|
+
UnderlineTabs: () => UnderlineTabs
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(underline_tabs_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var TabsPrimitive = __toESM(require("@radix-ui/react-tabs"), 1);
|
|
37
|
+
function UnderlineTabs({ tabs, value, onValueChange, trailing, children }) {
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(TabsPrimitive.Root, { value, onValueChange, children: [
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sticky top-0 z-20 mt-4 flex items-center gap-2 bg-background/95 px-6 backdrop-blur-sm", children: [
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TabsPrimitive.List, { className: "flex min-w-0 flex-1 items-center gap-0.5 overflow-x-auto scrollbar-none", children: tabs.map(({ id, label, icon: Icon, count }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
41
|
+
TabsPrimitive.Trigger,
|
|
42
|
+
{
|
|
43
|
+
value: id,
|
|
44
|
+
className: "group relative flex shrink-0 items-center gap-2 whitespace-nowrap rounded-lg px-4 py-3 text-sm font-medium text-muted-foreground transition-colors duration-200 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=active]:text-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-primary after:opacity-0 data-[state=active]:after:opacity-100",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-3.5 w-3.5" }),
|
|
47
|
+
label,
|
|
48
|
+
count ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "min-w-[18px] rounded-full bg-muted px-1.5 py-px text-center text-2xs font-bold tabular-nums text-muted-foreground group-data-[state=active]:bg-primary/15 group-data-[state=active]:text-primary", children: count }) : null
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
id
|
|
52
|
+
)) }),
|
|
53
|
+
trailing
|
|
54
|
+
] }),
|
|
55
|
+
children
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
UnderlineTabs
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=underline-tabs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/underline-tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type { LucideIcon } from \"lucide-react\";\n\nexport interface UnderlineTab {\n id: string;\n label: string;\n icon: LucideIcon;\n count?: number;\n}\n\nexport interface UnderlineTabsProps {\n tabs: ReadonlyArray<UnderlineTab>;\n value: string;\n onValueChange: (id: string) => void;\n trailing?: ReactNode;\n children: ReactNode;\n}\n\nexport function UnderlineTabs({ tabs, value, onValueChange, trailing, children }: UnderlineTabsProps) {\n return (\n <TabsPrimitive.Root value={value} onValueChange={onValueChange}>\n <div className=\"sticky top-0 z-20 mt-4 flex items-center gap-2 bg-background/95 px-6 backdrop-blur-sm\">\n <TabsPrimitive.List className=\"flex min-w-0 flex-1 items-center gap-0.5 overflow-x-auto scrollbar-none\">\n {tabs.map(({ id, label, icon: Icon, count }) => (\n <TabsPrimitive.Trigger\n key={id}\n value={id}\n className=\"group relative flex shrink-0 items-center gap-2 whitespace-nowrap rounded-lg px-4 py-3 text-sm font-medium text-muted-foreground transition-colors duration-200 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=active]:text-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-primary after:opacity-0 data-[state=active]:after:opacity-100\"\n >\n <Icon className=\"h-3.5 w-3.5\" />\n {label}\n {count ? (\n <span className=\"min-w-[18px] rounded-full bg-muted px-1.5 py-px text-center text-2xs font-bold tabular-nums text-muted-foreground group-data-[state=active]:bg-primary/15 group-data-[state=active]:text-primary\">{count}</span>\n ) : null}\n </TabsPrimitive.Trigger>\n ))}\n </TabsPrimitive.List>\n {trailing}\n </div>\n {children}\n </TabsPrimitive.Root>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BY;AAxBZ,oBAA+B;AAkBxB,SAAS,cAAc,EAAE,MAAM,OAAO,eAAe,UAAU,SAAS,GAAuB;AACpG,SACE,6CAAC,cAAc,MAAd,EAAmB,OAAc,eAChC;AAAA,iDAAC,SAAI,WAAU,yFACb;AAAA,kDAAC,cAAc,MAAd,EAAmB,WAAU,2EAC3B,eAAK,IAAI,CAAC,EAAE,IAAI,OAAO,MAAM,MAAM,MAAM,MACxC;AAAA,QAAC,cAAc;AAAA,QAAd;AAAA,UAEC,OAAO;AAAA,UACP,WAAU;AAAA,UAEV;AAAA,wDAAC,QAAK,WAAU,eAAc;AAAA,YAC7B;AAAA,YACA,QACC,4CAAC,UAAK,WAAU,oMAAoM,iBAAM,IACxN;AAAA;AAAA;AAAA,QARC;AAAA,MASP,CACD,GACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
interface UnderlineTab {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
count?: number;
|
|
10
|
+
}
|
|
11
|
+
interface UnderlineTabsProps {
|
|
12
|
+
tabs: ReadonlyArray<UnderlineTab>;
|
|
13
|
+
value: string;
|
|
14
|
+
onValueChange: (id: string) => void;
|
|
15
|
+
trailing?: ReactNode;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare function UnderlineTabs({ tabs, value, onValueChange, trailing, children }: UnderlineTabsProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { type UnderlineTab, UnderlineTabs, type UnderlineTabsProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { LucideIcon } from 'lucide-react';
|
|
4
|
+
|
|
5
|
+
interface UnderlineTab {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
icon: LucideIcon;
|
|
9
|
+
count?: number;
|
|
10
|
+
}
|
|
11
|
+
interface UnderlineTabsProps {
|
|
12
|
+
tabs: ReadonlyArray<UnderlineTab>;
|
|
13
|
+
value: string;
|
|
14
|
+
onValueChange: (id: string) => void;
|
|
15
|
+
trailing?: ReactNode;
|
|
16
|
+
children: ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare function UnderlineTabs({ tabs, value, onValueChange, trailing, children }: UnderlineTabsProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
|
|
20
|
+
export { type UnderlineTab, UnderlineTabs, type UnderlineTabsProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
|
+
function UnderlineTabs({ tabs, value, onValueChange, trailing, children }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs(TabsPrimitive.Root, { value, onValueChange, children: [
|
|
6
|
+
/* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-20 mt-4 flex items-center gap-2 bg-background/95 px-6 backdrop-blur-sm", children: [
|
|
7
|
+
/* @__PURE__ */ jsx(TabsPrimitive.List, { className: "flex min-w-0 flex-1 items-center gap-0.5 overflow-x-auto scrollbar-none", children: tabs.map(({ id, label, icon: Icon, count }) => /* @__PURE__ */ jsxs(
|
|
8
|
+
TabsPrimitive.Trigger,
|
|
9
|
+
{
|
|
10
|
+
value: id,
|
|
11
|
+
className: "group relative flex shrink-0 items-center gap-2 whitespace-nowrap rounded-lg px-4 py-3 text-sm font-medium text-muted-foreground transition-colors duration-200 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=active]:text-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-primary after:opacity-0 data-[state=active]:after:opacity-100",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5" }),
|
|
14
|
+
label,
|
|
15
|
+
count ? /* @__PURE__ */ jsx("span", { className: "min-w-[18px] rounded-full bg-muted px-1.5 py-px text-center text-2xs font-bold tabular-nums text-muted-foreground group-data-[state=active]:bg-primary/15 group-data-[state=active]:text-primary", children: count }) : null
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
id
|
|
19
|
+
)) }),
|
|
20
|
+
trailing
|
|
21
|
+
] }),
|
|
22
|
+
children
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
UnderlineTabs
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=underline-tabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/underline-tabs.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport * as TabsPrimitive from \"@radix-ui/react-tabs\";\nimport type { LucideIcon } from \"lucide-react\";\n\nexport interface UnderlineTab {\n id: string;\n label: string;\n icon: LucideIcon;\n count?: number;\n}\n\nexport interface UnderlineTabsProps {\n tabs: ReadonlyArray<UnderlineTab>;\n value: string;\n onValueChange: (id: string) => void;\n trailing?: ReactNode;\n children: ReactNode;\n}\n\nexport function UnderlineTabs({ tabs, value, onValueChange, trailing, children }: UnderlineTabsProps) {\n return (\n <TabsPrimitive.Root value={value} onValueChange={onValueChange}>\n <div className=\"sticky top-0 z-20 mt-4 flex items-center gap-2 bg-background/95 px-6 backdrop-blur-sm\">\n <TabsPrimitive.List className=\"flex min-w-0 flex-1 items-center gap-0.5 overflow-x-auto scrollbar-none\">\n {tabs.map(({ id, label, icon: Icon, count }) => (\n <TabsPrimitive.Trigger\n key={id}\n value={id}\n className=\"group relative flex shrink-0 items-center gap-2 whitespace-nowrap rounded-lg px-4 py-3 text-sm font-medium text-muted-foreground transition-colors duration-200 hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 data-[state=active]:text-foreground after:absolute after:inset-x-0 after:bottom-0 after:h-0.5 after:rounded-full after:bg-primary after:opacity-0 data-[state=active]:after:opacity-100\"\n >\n <Icon className=\"h-3.5 w-3.5\" />\n {label}\n {count ? (\n <span className=\"min-w-[18px] rounded-full bg-muted px-1.5 py-px text-center text-2xs font-bold tabular-nums text-muted-foreground group-data-[state=active]:bg-primary/15 group-data-[state=active]:text-primary\">{count}</span>\n ) : null}\n </TabsPrimitive.Trigger>\n ))}\n </TabsPrimitive.List>\n {trailing}\n </div>\n {children}\n </TabsPrimitive.Root>\n );\n}\n"],"mappings":";AA2BY,SAKE,KALF;AAxBZ,YAAY,mBAAmB;AAkBxB,SAAS,cAAc,EAAE,MAAM,OAAO,eAAe,UAAU,SAAS,GAAuB;AACpG,SACE,qBAAC,cAAc,MAAd,EAAmB,OAAc,eAChC;AAAA,yBAAC,SAAI,WAAU,yFACb;AAAA,0BAAC,cAAc,MAAd,EAAmB,WAAU,2EAC3B,eAAK,IAAI,CAAC,EAAE,IAAI,OAAO,MAAM,MAAM,MAAM,MACxC;AAAA,QAAC,cAAc;AAAA,QAAd;AAAA,UAEC,OAAO;AAAA,UACP,WAAU;AAAA,UAEV;AAAA,gCAAC,QAAK,WAAU,eAAc;AAAA,YAC7B;AAAA,YACA,QACC,oBAAC,UAAK,WAAU,oMAAoM,iBAAM,IACxN;AAAA;AAAA;AAAA,QARC;AAAA,MASP,CACD,GACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|