@medialane/ui 0.93.1 → 0.94.1
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/portfolio-bento-tile.cjs +16 -27
- package/dist/components/portfolio-bento-tile.cjs.map +1 -1
- package/dist/components/portfolio-bento-tile.d.cts +10 -15
- package/dist/components/portfolio-bento-tile.d.ts +10 -15
- package/dist/components/portfolio-bento-tile.js +16 -27
- package/dist/components/portfolio-bento-tile.js.map +1 -1
- package/dist/components/portfolio-chip-filter.cjs +29 -11
- package/dist/components/portfolio-chip-filter.cjs.map +1 -1
- package/dist/components/portfolio-chip-filter.d.cts +15 -5
- package/dist/components/portfolio-chip-filter.d.ts +15 -5
- package/dist/components/portfolio-chip-filter.js +19 -11
- package/dist/components/portfolio-chip-filter.js.map +1 -1
- package/dist/components/portfolio-header.cjs +14 -17
- package/dist/components/portfolio-header.cjs.map +1 -1
- package/dist/components/portfolio-header.d.cts +4 -4
- package/dist/components/portfolio-header.d.ts +4 -4
- package/dist/components/portfolio-header.js +14 -17
- package/dist/components/portfolio-header.js.map +1 -1
- package/dist/components/portfolio-overview.cjs +11 -27
- package/dist/components/portfolio-overview.cjs.map +1 -1
- package/dist/components/portfolio-overview.d.cts +6 -10
- package/dist/components/portfolio-overview.d.ts +6 -10
- package/dist/components/portfolio-overview.js +12 -28
- package/dist/components/portfolio-overview.js.map +1 -1
- package/package.json +1 -1
|
@@ -36,18 +36,10 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
36
36
|
var import_link = __toESM(require("next/link"), 1);
|
|
37
37
|
var import_lucide_react = require("lucide-react");
|
|
38
38
|
var import_cn = require("../utils/cn.js");
|
|
39
|
-
const SIZE_CLASS = {
|
|
40
|
-
large: "md:col-span-2 md:row-span-2",
|
|
41
|
-
half: "md:col-span-2 md:row-span-1",
|
|
42
|
-
full: "md:col-span-4 md:row-span-1"
|
|
43
|
-
};
|
|
44
39
|
function PortfolioBentoTile({
|
|
45
40
|
title,
|
|
46
41
|
href,
|
|
47
|
-
size = "
|
|
48
|
-
action,
|
|
49
|
-
isEmpty,
|
|
50
|
-
emptyState,
|
|
42
|
+
size = "default",
|
|
51
43
|
children,
|
|
52
44
|
className
|
|
53
45
|
}) {
|
|
@@ -55,29 +47,26 @@ function PortfolioBentoTile({
|
|
|
55
47
|
"section",
|
|
56
48
|
{
|
|
57
49
|
className: (0, import_cn.cn)(
|
|
58
|
-
"rounded-2xl border border-border/
|
|
59
|
-
|
|
50
|
+
"rounded-2xl border border-border/50 bg-card/60 min-w-0 mb-4 break-inside-avoid",
|
|
51
|
+
size === "wide" && "[column-span:all]",
|
|
60
52
|
className
|
|
61
53
|
),
|
|
62
54
|
children: [
|
|
63
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 px-4 pt-
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 px-4 pt-4 pb-3", children: [
|
|
64
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
|
|
65
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
] })
|
|
57
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
58
|
+
import_link.default,
|
|
59
|
+
{
|
|
60
|
+
href,
|
|
61
|
+
className: "inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",
|
|
62
|
+
children: [
|
|
63
|
+
"See all",
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3 w-3" })
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
)
|
|
79
68
|
] }),
|
|
80
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 pb-4
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 pb-4", children })
|
|
81
70
|
]
|
|
82
71
|
}
|
|
83
72
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-bento-tile.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioBentoTileProps {\n /** Tile heading, e.g. \"Collections\". */\n title: string;\n /** \"See all\" link target
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-bento-tile.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioBentoTileProps {\n /** Tile heading, e.g. \"Collections\". */\n title: string;\n /** \"See all\" link target. */\n href: string;\n /**\n * \"wide\" breaks the tile out of the masonry column flow to span full\n * width (for list-shaped content like Activity). Default sits in the\n * masonry flow, sized to its own content.\n */\n size?: \"wide\" | \"default\";\n children: React.ReactNode;\n className?: string;\n}\n\n/**\n * A single masonry cell on the portfolio landing page: a titled,\n * media-forward preview of one section, sized to its own content rather\n * than a fixed grid track, expanding into its full subpage via \"See all\".\n * Pure presentation — content is supplied by the caller.\n */\nexport function PortfolioBentoTile({\n title,\n href,\n size = \"default\",\n children,\n className,\n}: PortfolioBentoTileProps) {\n return (\n <section\n className={cn(\n \"rounded-2xl border border-border/50 bg-card/60 min-w-0 mb-4 break-inside-avoid\",\n size === \"wide\" && \"[column-span:all]\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between gap-3 px-4 pt-4 pb-3\">\n <h2 className=\"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground\">\n {title}\n </h2>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors\"\n >\n See all\n <ArrowRight className=\"h-3 w-3\" />\n </Link>\n </div>\n <div className=\"px-4 pb-4\">{children}</div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CQ;AAzCR,kBAAiB;AACjB,0BAA2B;AAC3B,gBAAmB;AAuBZ,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AACF,GAA4B;AAC1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,SAAS,UAAU;AAAA,QACnB;AAAA,MACF;AAAA,MAEA;AAAA,qDAAC,SAAI,WAAU,0DACb;AAAA,sDAAC,QAAG,WAAU,4EACX,iBACH;AAAA,UACA;AAAA,YAAC,YAAAA;AAAA,YAAA;AAAA,cACC;AAAA,cACA,WAAU;AAAA,cACX;AAAA;AAAA,gBAEC,4CAAC,kCAAW,WAAU,WAAU;AAAA;AAAA;AAAA,UAClC;AAAA,WACF;AAAA,QACA,4CAAC,SAAI,WAAU,aAAa,UAAS;AAAA;AAAA;AAAA,EACvC;AAEJ;","names":["Link"]}
|
|
@@ -3,28 +3,23 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface PortfolioBentoTileProps {
|
|
4
4
|
/** Tile heading, e.g. "Collections". */
|
|
5
5
|
title: string;
|
|
6
|
-
/** "See all" link target
|
|
6
|
+
/** "See all" link target. */
|
|
7
7
|
href: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* (
|
|
11
|
-
*
|
|
9
|
+
* "wide" breaks the tile out of the masonry column flow to span full
|
|
10
|
+
* width (for list-shaped content like Activity). Default sits in the
|
|
11
|
+
* masonry flow, sized to its own content.
|
|
12
12
|
*/
|
|
13
|
-
size?: "
|
|
14
|
-
/** Single primary in-tile action, rendered top-right of the tile header (e.g. a "List" button). */
|
|
15
|
-
action?: React.ReactNode;
|
|
16
|
-
/** True when this tile's content is empty — renders emptyState instead of children. */
|
|
17
|
-
isEmpty?: boolean;
|
|
18
|
-
emptyState?: React.ReactNode;
|
|
13
|
+
size?: "wide" | "default";
|
|
19
14
|
children: React.ReactNode;
|
|
20
15
|
className?: string;
|
|
21
16
|
}
|
|
22
17
|
/**
|
|
23
|
-
* A single
|
|
24
|
-
* preview of one section
|
|
25
|
-
*
|
|
26
|
-
*
|
|
18
|
+
* A single masonry cell on the portfolio landing page: a titled,
|
|
19
|
+
* media-forward preview of one section, sized to its own content rather
|
|
20
|
+
* than a fixed grid track, expanding into its full subpage via "See all".
|
|
21
|
+
* Pure presentation — content is supplied by the caller.
|
|
27
22
|
*/
|
|
28
|
-
declare function PortfolioBentoTile({ title, href, size,
|
|
23
|
+
declare function PortfolioBentoTile({ title, href, size, children, className, }: PortfolioBentoTileProps): react_jsx_runtime.JSX.Element;
|
|
29
24
|
|
|
30
25
|
export { PortfolioBentoTile, type PortfolioBentoTileProps };
|
|
@@ -3,28 +3,23 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface PortfolioBentoTileProps {
|
|
4
4
|
/** Tile heading, e.g. "Collections". */
|
|
5
5
|
title: string;
|
|
6
|
-
/** "See all" link target
|
|
6
|
+
/** "See all" link target. */
|
|
7
7
|
href: string;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* (
|
|
11
|
-
*
|
|
9
|
+
* "wide" breaks the tile out of the masonry column flow to span full
|
|
10
|
+
* width (for list-shaped content like Activity). Default sits in the
|
|
11
|
+
* masonry flow, sized to its own content.
|
|
12
12
|
*/
|
|
13
|
-
size?: "
|
|
14
|
-
/** Single primary in-tile action, rendered top-right of the tile header (e.g. a "List" button). */
|
|
15
|
-
action?: React.ReactNode;
|
|
16
|
-
/** True when this tile's content is empty — renders emptyState instead of children. */
|
|
17
|
-
isEmpty?: boolean;
|
|
18
|
-
emptyState?: React.ReactNode;
|
|
13
|
+
size?: "wide" | "default";
|
|
19
14
|
children: React.ReactNode;
|
|
20
15
|
className?: string;
|
|
21
16
|
}
|
|
22
17
|
/**
|
|
23
|
-
* A single
|
|
24
|
-
* preview of one section
|
|
25
|
-
*
|
|
26
|
-
*
|
|
18
|
+
* A single masonry cell on the portfolio landing page: a titled,
|
|
19
|
+
* media-forward preview of one section, sized to its own content rather
|
|
20
|
+
* than a fixed grid track, expanding into its full subpage via "See all".
|
|
21
|
+
* Pure presentation — content is supplied by the caller.
|
|
27
22
|
*/
|
|
28
|
-
declare function PortfolioBentoTile({ title, href, size,
|
|
23
|
+
declare function PortfolioBentoTile({ title, href, size, children, className, }: PortfolioBentoTileProps): react_jsx_runtime.JSX.Element;
|
|
29
24
|
|
|
30
25
|
export { PortfolioBentoTile, type PortfolioBentoTileProps };
|
|
@@ -3,18 +3,10 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import Link from "next/link";
|
|
4
4
|
import { ArrowRight } from "lucide-react";
|
|
5
5
|
import { cn } from "../utils/cn.js";
|
|
6
|
-
const SIZE_CLASS = {
|
|
7
|
-
large: "md:col-span-2 md:row-span-2",
|
|
8
|
-
half: "md:col-span-2 md:row-span-1",
|
|
9
|
-
full: "md:col-span-4 md:row-span-1"
|
|
10
|
-
};
|
|
11
6
|
function PortfolioBentoTile({
|
|
12
7
|
title,
|
|
13
8
|
href,
|
|
14
|
-
size = "
|
|
15
|
-
action,
|
|
16
|
-
isEmpty,
|
|
17
|
-
emptyState,
|
|
9
|
+
size = "default",
|
|
18
10
|
children,
|
|
19
11
|
className
|
|
20
12
|
}) {
|
|
@@ -22,29 +14,26 @@ function PortfolioBentoTile({
|
|
|
22
14
|
"section",
|
|
23
15
|
{
|
|
24
16
|
className: cn(
|
|
25
|
-
"rounded-2xl border border-border/
|
|
26
|
-
|
|
17
|
+
"rounded-2xl border border-border/50 bg-card/60 min-w-0 mb-4 break-inside-avoid",
|
|
18
|
+
size === "wide" && "[column-span:all]",
|
|
27
19
|
className
|
|
28
20
|
),
|
|
29
21
|
children: [
|
|
30
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 px-4 pt-
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3 px-4 pt-4 pb-3", children: [
|
|
31
23
|
/* @__PURE__ */ jsx("h2", { className: "text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: title }),
|
|
32
|
-
/* @__PURE__ */ jsxs(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
)
|
|
45
|
-
] })
|
|
24
|
+
/* @__PURE__ */ jsxs(
|
|
25
|
+
Link,
|
|
26
|
+
{
|
|
27
|
+
href,
|
|
28
|
+
className: "inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors",
|
|
29
|
+
children: [
|
|
30
|
+
"See all",
|
|
31
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3 w-3" })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
)
|
|
46
35
|
] }),
|
|
47
|
-
/* @__PURE__ */ jsx("div", { className: "px-4 pb-4
|
|
36
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 pb-4", children })
|
|
48
37
|
]
|
|
49
38
|
}
|
|
50
39
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-bento-tile.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioBentoTileProps {\n /** Tile heading, e.g. \"Collections\". */\n title: string;\n /** \"See all\" link target
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-bento-tile.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { ArrowRight } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioBentoTileProps {\n /** Tile heading, e.g. \"Collections\". */\n title: string;\n /** \"See all\" link target. */\n href: string;\n /**\n * \"wide\" breaks the tile out of the masonry column flow to span full\n * width (for list-shaped content like Activity). Default sits in the\n * masonry flow, sized to its own content.\n */\n size?: \"wide\" | \"default\";\n children: React.ReactNode;\n className?: string;\n}\n\n/**\n * A single masonry cell on the portfolio landing page: a titled,\n * media-forward preview of one section, sized to its own content rather\n * than a fixed grid track, expanding into its full subpage via \"See all\".\n * Pure presentation — content is supplied by the caller.\n */\nexport function PortfolioBentoTile({\n title,\n href,\n size = \"default\",\n children,\n className,\n}: PortfolioBentoTileProps) {\n return (\n <section\n className={cn(\n \"rounded-2xl border border-border/50 bg-card/60 min-w-0 mb-4 break-inside-avoid\",\n size === \"wide\" && \"[column-span:all]\",\n className,\n )}\n >\n <div className=\"flex items-center justify-between gap-3 px-4 pt-4 pb-3\">\n <h2 className=\"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground\">\n {title}\n </h2>\n <Link\n href={href}\n className=\"inline-flex items-center gap-1 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors\"\n >\n See all\n <ArrowRight className=\"h-3 w-3\" />\n </Link>\n </div>\n <div className=\"px-4 pb-4\">{children}</div>\n </section>\n );\n}\n"],"mappings":";AA2CQ,cAGA,YAHA;AAzCR,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,UAAU;AAuBZ,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AACF,GAA4B;AAC1B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,SAAS,UAAU;AAAA,QACnB;AAAA,MACF;AAAA,MAEA;AAAA,6BAAC,SAAI,WAAU,0DACb;AAAA,8BAAC,QAAG,WAAU,4EACX,iBACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,WAAU;AAAA,cACX;AAAA;AAAA,gBAEC,oBAAC,cAAW,WAAU,WAAU;AAAA;AAAA;AAAA,UAClC;AAAA,WACF;AAAA,QACA,oBAAC,SAAI,WAAU,aAAa,UAAS;AAAA;AAAA;AAAA,EACvC;AAEJ;","names":[]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
8
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
10
|
for (var name in all)
|
|
@@ -16,6 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
18
|
}
|
|
17
19
|
return to;
|
|
18
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
|
+
));
|
|
19
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
30
|
var portfolio_chip_filter_exports = {};
|
|
21
31
|
__export(portfolio_chip_filter_exports, {
|
|
@@ -23,15 +33,19 @@ __export(portfolio_chip_filter_exports, {
|
|
|
23
33
|
});
|
|
24
34
|
module.exports = __toCommonJS(portfolio_chip_filter_exports);
|
|
25
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_link = __toESM(require("next/link"), 1);
|
|
26
37
|
var import_cn = require("../utils/cn.js");
|
|
38
|
+
const CHIP_CLASS = "shrink-0 rounded-full px-3.5 py-1.5 text-[13px] whitespace-nowrap transition-colors";
|
|
39
|
+
const INACTIVE_CLASS = "bg-muted text-muted-foreground hover:text-foreground";
|
|
40
|
+
const ACTIVE_CLASS = "bg-primary text-primary-foreground font-medium";
|
|
27
41
|
function PortfolioChipFilter({
|
|
28
42
|
options,
|
|
29
43
|
value,
|
|
30
44
|
onChange,
|
|
45
|
+
showAll = true,
|
|
31
46
|
className
|
|
32
47
|
}) {
|
|
33
|
-
const
|
|
34
|
-
const items = [all, ...options];
|
|
48
|
+
const items = showAll ? [{ key: "all", label: "All" }, ...options] : options;
|
|
35
49
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
36
50
|
"div",
|
|
37
51
|
{
|
|
@@ -39,22 +53,26 @@ function PortfolioChipFilter({
|
|
|
39
53
|
"flex items-center gap-1.5 overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8",
|
|
40
54
|
className
|
|
41
55
|
),
|
|
42
|
-
children: items.map(
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
children: items.map(
|
|
57
|
+
(item) => item.href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
+
import_link.default,
|
|
59
|
+
{
|
|
60
|
+
href: item.href,
|
|
61
|
+
className: (0, import_cn.cn)(CHIP_CLASS, item.href === value ? ACTIVE_CLASS : INACTIVE_CLASS),
|
|
62
|
+
children: item.label
|
|
63
|
+
},
|
|
64
|
+
item.key
|
|
65
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
45
66
|
"button",
|
|
46
67
|
{
|
|
47
68
|
type: "button",
|
|
48
69
|
onClick: () => onChange(item.key),
|
|
49
|
-
className: (0, import_cn.cn)(
|
|
50
|
-
"shrink-0 rounded-full px-3.5 py-1.5 text-[13px] whitespace-nowrap transition-colors",
|
|
51
|
-
active ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:text-foreground"
|
|
52
|
-
),
|
|
70
|
+
className: (0, import_cn.cn)(CHIP_CLASS, item.key === value ? ACTIVE_CLASS : INACTIVE_CLASS),
|
|
53
71
|
children: item.label
|
|
54
72
|
},
|
|
55
73
|
item.key
|
|
56
|
-
)
|
|
57
|
-
|
|
74
|
+
)
|
|
75
|
+
)
|
|
58
76
|
}
|
|
59
77
|
);
|
|
60
78
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-chip-filter.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioChipFilterOption {\n key: string;\n label: string;\n}\n\nexport interface PortfolioChipFilterProps {\n options: PortfolioChipFilterOption[];\n /** Selected
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-chip-filter.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioChipFilterOption {\n key: string;\n label: string;\n /**\n * When set, this chip is a direct navigation link rather than an in-page\n * filter. It's marked active when `href` equals the current `value`\n * (pass the current pathname as `value` for a location-aware nav bar).\n */\n href?: string;\n}\n\nexport interface PortfolioChipFilterProps {\n options: PortfolioChipFilterOption[];\n /** Selected filter key, or the current pathname when used for navigation. */\n value: string;\n onChange: (key: string) => void;\n /** Suppress the auto-injected \"All\" chip — for pure navigation bars where every option already has an href. Default true. */\n showAll?: boolean;\n className?: string;\n}\n\nconst CHIP_CLASS =\n \"shrink-0 rounded-full px-3.5 py-1.5 text-[13px] whitespace-nowrap transition-colors\";\nconst INACTIVE_CLASS = \"bg-muted text-muted-foreground hover:text-foreground\";\nconst ACTIVE_CLASS = \"bg-primary text-primary-foreground font-medium\";\n\n/**\n * Horizontally-scrollable chip row — the portfolio section's sole\n * navigation mechanism (Instagram/YouTube-style chips), used both as an\n * in-page filter (chips with no `href`, toggled via `onChange`) and as\n * cross-page navigation (chips with `href`, highlighted active by matching\n * `value` against the current pathname).\n */\nexport function PortfolioChipFilter({\n options,\n value,\n onChange,\n showAll = true,\n className,\n}: PortfolioChipFilterProps) {\n const items = showAll ? [{ key: \"all\", label: \"All\" }, ...options] : options;\n\n return (\n <div\n className={cn(\n \"flex items-center gap-1.5 overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8\",\n className,\n )}\n >\n {items.map((item) =>\n item.href ? (\n <Link\n key={item.key}\n href={item.href}\n className={cn(CHIP_CLASS, item.href === value ? ACTIVE_CLASS : INACTIVE_CLASS)}\n >\n {item.label}\n </Link>\n ) : (\n <button\n key={item.key}\n type=\"button\"\n onClick={() => onChange(item.key)}\n className={cn(CHIP_CLASS, item.key === value ? ACTIVE_CLASS : INACTIVE_CLASS)}\n >\n {item.label}\n </button>\n ),\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwDU;AAtDV,kBAAiB;AACjB,gBAAmB;AAuBnB,MAAM,aACJ;AACF,MAAM,iBAAiB;AACvB,MAAM,eAAe;AASd,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AACF,GAA6B;AAC3B,QAAM,QAAQ,UAAU,CAAC,EAAE,KAAK,OAAO,OAAO,MAAM,GAAG,GAAG,OAAO,IAAI;AAErE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEC,gBAAM;AAAA,QAAI,CAAC,SACV,KAAK,OACH;AAAA,UAAC,YAAAA;AAAA,UAAA;AAAA,YAEC,MAAM,KAAK;AAAA,YACX,eAAW,cAAG,YAAY,KAAK,SAAS,QAAQ,eAAe,cAAc;AAAA,YAE5E,eAAK;AAAA;AAAA,UAJD,KAAK;AAAA,QAKZ,IAEA;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,SAAS,MAAM,SAAS,KAAK,GAAG;AAAA,YAChC,eAAW,cAAG,YAAY,KAAK,QAAQ,QAAQ,eAAe,cAAc;AAAA,YAE3E,eAAK;AAAA;AAAA,UALD,KAAK;AAAA,QAMZ;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;","names":["Link"]}
|
|
@@ -3,19 +3,29 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface PortfolioChipFilterOption {
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* When set, this chip is a direct navigation link rather than an in-page
|
|
8
|
+
* filter. It's marked active when `href` equals the current `value`
|
|
9
|
+
* (pass the current pathname as `value` for a location-aware nav bar).
|
|
10
|
+
*/
|
|
11
|
+
href?: string;
|
|
6
12
|
}
|
|
7
13
|
interface PortfolioChipFilterProps {
|
|
8
14
|
options: PortfolioChipFilterOption[];
|
|
9
|
-
/** Selected
|
|
15
|
+
/** Selected filter key, or the current pathname when used for navigation. */
|
|
10
16
|
value: string;
|
|
11
17
|
onChange: (key: string) => void;
|
|
18
|
+
/** Suppress the auto-injected "All" chip — for pure navigation bars where every option already has an href. Default true. */
|
|
19
|
+
showAll?: boolean;
|
|
12
20
|
className?: string;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
|
-
* Horizontally-scrollable chip row
|
|
16
|
-
*
|
|
17
|
-
*
|
|
23
|
+
* Horizontally-scrollable chip row — the portfolio section's sole
|
|
24
|
+
* navigation mechanism (Instagram/YouTube-style chips), used both as an
|
|
25
|
+
* in-page filter (chips with no `href`, toggled via `onChange`) and as
|
|
26
|
+
* cross-page navigation (chips with `href`, highlighted active by matching
|
|
27
|
+
* `value` against the current pathname).
|
|
18
28
|
*/
|
|
19
|
-
declare function PortfolioChipFilter({ options, value, onChange, className, }: PortfolioChipFilterProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function PortfolioChipFilter({ options, value, onChange, showAll, className, }: PortfolioChipFilterProps): react_jsx_runtime.JSX.Element;
|
|
20
30
|
|
|
21
31
|
export { PortfolioChipFilter, type PortfolioChipFilterOption, type PortfolioChipFilterProps };
|
|
@@ -3,19 +3,29 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface PortfolioChipFilterOption {
|
|
4
4
|
key: string;
|
|
5
5
|
label: string;
|
|
6
|
+
/**
|
|
7
|
+
* When set, this chip is a direct navigation link rather than an in-page
|
|
8
|
+
* filter. It's marked active when `href` equals the current `value`
|
|
9
|
+
* (pass the current pathname as `value` for a location-aware nav bar).
|
|
10
|
+
*/
|
|
11
|
+
href?: string;
|
|
6
12
|
}
|
|
7
13
|
interface PortfolioChipFilterProps {
|
|
8
14
|
options: PortfolioChipFilterOption[];
|
|
9
|
-
/** Selected
|
|
15
|
+
/** Selected filter key, or the current pathname when used for navigation. */
|
|
10
16
|
value: string;
|
|
11
17
|
onChange: (key: string) => void;
|
|
18
|
+
/** Suppress the auto-injected "All" chip — for pure navigation bars where every option already has an href. Default true. */
|
|
19
|
+
showAll?: boolean;
|
|
12
20
|
className?: string;
|
|
13
21
|
}
|
|
14
22
|
/**
|
|
15
|
-
* Horizontally-scrollable chip row
|
|
16
|
-
*
|
|
17
|
-
*
|
|
23
|
+
* Horizontally-scrollable chip row — the portfolio section's sole
|
|
24
|
+
* navigation mechanism (Instagram/YouTube-style chips), used both as an
|
|
25
|
+
* in-page filter (chips with no `href`, toggled via `onChange`) and as
|
|
26
|
+
* cross-page navigation (chips with `href`, highlighted active by matching
|
|
27
|
+
* `value` against the current pathname).
|
|
18
28
|
*/
|
|
19
|
-
declare function PortfolioChipFilter({ options, value, onChange, className, }: PortfolioChipFilterProps): react_jsx_runtime.JSX.Element;
|
|
29
|
+
declare function PortfolioChipFilter({ options, value, onChange, showAll, className, }: PortfolioChipFilterProps): react_jsx_runtime.JSX.Element;
|
|
20
30
|
|
|
21
31
|
export { PortfolioChipFilter, type PortfolioChipFilterOption, type PortfolioChipFilterProps };
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import Link from "next/link";
|
|
3
4
|
import { cn } from "../utils/cn.js";
|
|
5
|
+
const CHIP_CLASS = "shrink-0 rounded-full px-3.5 py-1.5 text-[13px] whitespace-nowrap transition-colors";
|
|
6
|
+
const INACTIVE_CLASS = "bg-muted text-muted-foreground hover:text-foreground";
|
|
7
|
+
const ACTIVE_CLASS = "bg-primary text-primary-foreground font-medium";
|
|
4
8
|
function PortfolioChipFilter({
|
|
5
9
|
options,
|
|
6
10
|
value,
|
|
7
11
|
onChange,
|
|
12
|
+
showAll = true,
|
|
8
13
|
className
|
|
9
14
|
}) {
|
|
10
|
-
const
|
|
11
|
-
const items = [all, ...options];
|
|
15
|
+
const items = showAll ? [{ key: "all", label: "All" }, ...options] : options;
|
|
12
16
|
return /* @__PURE__ */ jsx(
|
|
13
17
|
"div",
|
|
14
18
|
{
|
|
@@ -16,22 +20,26 @@ function PortfolioChipFilter({
|
|
|
16
20
|
"flex items-center gap-1.5 overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8",
|
|
17
21
|
className
|
|
18
22
|
),
|
|
19
|
-
children: items.map(
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
children: items.map(
|
|
24
|
+
(item) => item.href ? /* @__PURE__ */ jsx(
|
|
25
|
+
Link,
|
|
26
|
+
{
|
|
27
|
+
href: item.href,
|
|
28
|
+
className: cn(CHIP_CLASS, item.href === value ? ACTIVE_CLASS : INACTIVE_CLASS),
|
|
29
|
+
children: item.label
|
|
30
|
+
},
|
|
31
|
+
item.key
|
|
32
|
+
) : /* @__PURE__ */ jsx(
|
|
22
33
|
"button",
|
|
23
34
|
{
|
|
24
35
|
type: "button",
|
|
25
36
|
onClick: () => onChange(item.key),
|
|
26
|
-
className: cn(
|
|
27
|
-
"shrink-0 rounded-full px-3.5 py-1.5 text-[13px] whitespace-nowrap transition-colors",
|
|
28
|
-
active ? "bg-primary text-primary-foreground font-medium" : "bg-muted text-muted-foreground hover:text-foreground"
|
|
29
|
-
),
|
|
37
|
+
className: cn(CHIP_CLASS, item.key === value ? ACTIVE_CLASS : INACTIVE_CLASS),
|
|
30
38
|
children: item.label
|
|
31
39
|
},
|
|
32
40
|
item.key
|
|
33
|
-
)
|
|
34
|
-
|
|
41
|
+
)
|
|
42
|
+
)
|
|
35
43
|
}
|
|
36
44
|
);
|
|
37
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-chip-filter.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioChipFilterOption {\n key: string;\n label: string;\n}\n\nexport interface PortfolioChipFilterProps {\n options: PortfolioChipFilterOption[];\n /** Selected
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-chip-filter.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface PortfolioChipFilterOption {\n key: string;\n label: string;\n /**\n * When set, this chip is a direct navigation link rather than an in-page\n * filter. It's marked active when `href` equals the current `value`\n * (pass the current pathname as `value` for a location-aware nav bar).\n */\n href?: string;\n}\n\nexport interface PortfolioChipFilterProps {\n options: PortfolioChipFilterOption[];\n /** Selected filter key, or the current pathname when used for navigation. */\n value: string;\n onChange: (key: string) => void;\n /** Suppress the auto-injected \"All\" chip — for pure navigation bars where every option already has an href. Default true. */\n showAll?: boolean;\n className?: string;\n}\n\nconst CHIP_CLASS =\n \"shrink-0 rounded-full px-3.5 py-1.5 text-[13px] whitespace-nowrap transition-colors\";\nconst INACTIVE_CLASS = \"bg-muted text-muted-foreground hover:text-foreground\";\nconst ACTIVE_CLASS = \"bg-primary text-primary-foreground font-medium\";\n\n/**\n * Horizontally-scrollable chip row — the portfolio section's sole\n * navigation mechanism (Instagram/YouTube-style chips), used both as an\n * in-page filter (chips with no `href`, toggled via `onChange`) and as\n * cross-page navigation (chips with `href`, highlighted active by matching\n * `value` against the current pathname).\n */\nexport function PortfolioChipFilter({\n options,\n value,\n onChange,\n showAll = true,\n className,\n}: PortfolioChipFilterProps) {\n const items = showAll ? [{ key: \"all\", label: \"All\" }, ...options] : options;\n\n return (\n <div\n className={cn(\n \"flex items-center gap-1.5 overflow-x-auto scrollbar-hide -mx-4 px-4 sm:-mx-6 sm:px-6 lg:-mx-8 lg:px-8\",\n className,\n )}\n >\n {items.map((item) =>\n item.href ? (\n <Link\n key={item.key}\n href={item.href}\n className={cn(CHIP_CLASS, item.href === value ? ACTIVE_CLASS : INACTIVE_CLASS)}\n >\n {item.label}\n </Link>\n ) : (\n <button\n key={item.key}\n type=\"button\"\n onClick={() => onChange(item.key)}\n className={cn(CHIP_CLASS, item.key === value ? ACTIVE_CLASS : INACTIVE_CLASS)}\n >\n {item.label}\n </button>\n ),\n )}\n </div>\n );\n}\n"],"mappings":";AAwDU;AAtDV,OAAO,UAAU;AACjB,SAAS,UAAU;AAuBnB,MAAM,aACJ;AACF,MAAM,iBAAiB;AACvB,MAAM,eAAe;AASd,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA,UAAU;AAAA,EACV;AACF,GAA6B;AAC3B,QAAM,QAAQ,UAAU,CAAC,EAAE,KAAK,OAAO,OAAO,MAAM,GAAG,GAAG,OAAO,IAAI;AAErE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEC,gBAAM;AAAA,QAAI,CAAC,SACV,KAAK,OACH;AAAA,UAAC;AAAA;AAAA,YAEC,MAAM,KAAK;AAAA,YACX,WAAW,GAAG,YAAY,KAAK,SAAS,QAAQ,eAAe,cAAc;AAAA,YAE5E,eAAK;AAAA;AAAA,UAJD,KAAK;AAAA,QAKZ,IAEA;AAAA,UAAC;AAAA;AAAA,YAEC,MAAK;AAAA,YACL,SAAS,MAAM,SAAS,KAAK,GAAG;AAAA,YAChC,WAAW,GAAG,YAAY,KAAK,QAAQ,QAAQ,eAAe,cAAc;AAAA,YAE3E,eAAK;AAAA;AAAA,UALD,KAAK;AAAA,QAMZ;AAAA,MAEJ;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -34,7 +34,6 @@ __export(portfolio_header_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(portfolio_header_exports);
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
36
|
var import_link = __toESM(require("next/link"), 1);
|
|
37
|
-
var import_lucide_react = require("lucide-react");
|
|
38
37
|
var import_cn = require("../utils/cn.js");
|
|
39
38
|
var import_address_display = require("./address-display.js");
|
|
40
39
|
function PortfolioHeader({
|
|
@@ -49,22 +48,20 @@ function PortfolioHeader({
|
|
|
49
48
|
" XP"
|
|
50
49
|
] })
|
|
51
50
|
] }) });
|
|
52
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
53
|
-
"div",
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
67
|
-
);
|
|
51
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("flex items-center justify-between gap-4", className), children: [
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: "Portfolio" }),
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
55
|
+
import_address_display.AddressDisplay,
|
|
56
|
+
{
|
|
57
|
+
address,
|
|
58
|
+
chars: 6,
|
|
59
|
+
className: "text-xl font-bold tracking-tight text-foreground"
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
] }),
|
|
63
|
+
score?.href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: score.href, className: "shrink-0 active:opacity-80", children: scoreChip }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "shrink-0", children: scoreChip })
|
|
64
|
+
] });
|
|
68
65
|
}
|
|
69
66
|
// Annotate the CommonJS export names for ESM import in node:
|
|
70
67
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-header.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-header.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { cn } from \"../utils/cn.js\";\nimport { AddressDisplay } from \"./address-display.js\";\n\nexport interface PortfolioHeaderScore {\n /** Journey level name (\"Starter\", \"Explorer\", …) — no numeric level shown. */\n levelName: string;\n totalXp: number;\n /** Where the score chip links (\"/rewards\"). */\n href?: string;\n}\n\nexport interface PortfolioHeaderProps {\n address: string;\n score?: PortfolioHeaderScore | null;\n className?: string;\n}\n\n/**\n * Portfolio identity header: the address as a real page title (no generic\n * gradient/avatar element — there's no profile data to lead with, and a\n * placeholder gradient mark isn't the answer), with the rewards journey\n * chip alongside it.\n */\nexport function PortfolioHeader({\n address,\n score,\n className,\n}: PortfolioHeaderProps) {\n const scoreChip = score && (\n <div className=\"btn-border-animated p-[1.5px] rounded-full\">\n <div className=\"rounded-full bg-card px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap\">\n <span className=\"text-sm font-semibold text-foreground\">\n {score.levelName}\n </span>\n <span className=\"text-xs text-muted-foreground tabular-nums\">\n {score.totalXp.toLocaleString()} XP\n </span>\n </div>\n </div>\n );\n\n return (\n <div className={cn(\"flex items-center justify-between gap-4\", className)}>\n <div className=\"min-w-0\">\n <p className=\"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground\">\n Portfolio\n </p>\n <AddressDisplay\n address={address}\n chars={6}\n className=\"text-xl font-bold tracking-tight text-foreground\"\n />\n </div>\n {score?.href ? (\n <Link href={score.href} className=\"shrink-0 active:opacity-80\">\n {scoreChip}\n </Link>\n ) : (\n <div className=\"shrink-0\">{scoreChip}</div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCQ;AAhCR,kBAAiB;AACjB,gBAAmB;AACnB,6BAA+B;AAsBxB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,QAAM,YAAY,SAChB,4CAAC,SAAI,WAAU,8CACb,uDAAC,SAAI,WAAU,kFACb;AAAA,gDAAC,UAAK,WAAU,yCACb,gBAAM,WACT;AAAA,IACA,6CAAC,UAAK,WAAU,8CACb;AAAA,YAAM,QAAQ,eAAe;AAAA,MAAE;AAAA,OAClC;AAAA,KACF,GACF;AAGF,SACE,6CAAC,SAAI,eAAW,cAAG,2CAA2C,SAAS,GACrE;AAAA,iDAAC,SAAI,WAAU,WACb;AAAA,kDAAC,OAAE,WAAU,4EAA2E,uBAExF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,OAAO;AAAA,UACP,WAAU;AAAA;AAAA,MACZ;AAAA,OACF;AAAA,IACC,OAAO,OACN,4CAAC,YAAAA,SAAA,EAAK,MAAM,MAAM,MAAM,WAAU,8BAC/B,qBACH,IAEA,4CAAC,SAAI,WAAU,YAAY,qBAAU;AAAA,KAEzC;AAEJ;","names":["Link"]}
|
|
@@ -13,10 +13,10 @@ interface PortfolioHeaderProps {
|
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* Portfolio identity header: the address as a real page title (no generic
|
|
17
|
+
* gradient/avatar element — there's no profile data to lead with, and a
|
|
18
|
+
* placeholder gradient mark isn't the answer), with the rewards journey
|
|
19
|
+
* chip alongside it.
|
|
20
20
|
*/
|
|
21
21
|
declare function PortfolioHeader({ address, score, className, }: PortfolioHeaderProps): react_jsx_runtime.JSX.Element;
|
|
22
22
|
|
|
@@ -13,10 +13,10 @@ interface PortfolioHeaderProps {
|
|
|
13
13
|
className?: string;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
16
|
+
* Portfolio identity header: the address as a real page title (no generic
|
|
17
|
+
* gradient/avatar element — there's no profile data to lead with, and a
|
|
18
|
+
* placeholder gradient mark isn't the answer), with the rewards journey
|
|
19
|
+
* chip alongside it.
|
|
20
20
|
*/
|
|
21
21
|
declare function PortfolioHeader({ address, score, className, }: PortfolioHeaderProps): react_jsx_runtime.JSX.Element;
|
|
22
22
|
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import Link from "next/link";
|
|
4
|
-
import { Briefcase } from "lucide-react";
|
|
5
4
|
import { cn } from "../utils/cn.js";
|
|
6
5
|
import { AddressDisplay } from "./address-display.js";
|
|
7
6
|
function PortfolioHeader({
|
|
@@ -16,22 +15,20 @@ function PortfolioHeader({
|
|
|
16
15
|
" XP"
|
|
17
16
|
] })
|
|
18
17
|
] }) });
|
|
19
|
-
return /* @__PURE__ */ jsxs(
|
|
20
|
-
"div",
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
);
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between gap-4", className), children: [
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
20
|
+
/* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold uppercase tracking-wider text-muted-foreground", children: "Portfolio" }),
|
|
21
|
+
/* @__PURE__ */ jsx(
|
|
22
|
+
AddressDisplay,
|
|
23
|
+
{
|
|
24
|
+
address,
|
|
25
|
+
chars: 6,
|
|
26
|
+
className: "text-xl font-bold tracking-tight text-foreground"
|
|
27
|
+
}
|
|
28
|
+
)
|
|
29
|
+
] }),
|
|
30
|
+
score?.href ? /* @__PURE__ */ jsx(Link, { href: score.href, className: "shrink-0 active:opacity-80", children: scoreChip }) : /* @__PURE__ */ jsx("div", { className: "shrink-0", children: scoreChip })
|
|
31
|
+
] });
|
|
35
32
|
}
|
|
36
33
|
export {
|
|
37
34
|
PortfolioHeader
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-header.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-header.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { cn } from \"../utils/cn.js\";\nimport { AddressDisplay } from \"./address-display.js\";\n\nexport interface PortfolioHeaderScore {\n /** Journey level name (\"Starter\", \"Explorer\", …) — no numeric level shown. */\n levelName: string;\n totalXp: number;\n /** Where the score chip links (\"/rewards\"). */\n href?: string;\n}\n\nexport interface PortfolioHeaderProps {\n address: string;\n score?: PortfolioHeaderScore | null;\n className?: string;\n}\n\n/**\n * Portfolio identity header: the address as a real page title (no generic\n * gradient/avatar element — there's no profile data to lead with, and a\n * placeholder gradient mark isn't the answer), with the rewards journey\n * chip alongside it.\n */\nexport function PortfolioHeader({\n address,\n score,\n className,\n}: PortfolioHeaderProps) {\n const scoreChip = score && (\n <div className=\"btn-border-animated p-[1.5px] rounded-full\">\n <div className=\"rounded-full bg-card px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap\">\n <span className=\"text-sm font-semibold text-foreground\">\n {score.levelName}\n </span>\n <span className=\"text-xs text-muted-foreground tabular-nums\">\n {score.totalXp.toLocaleString()} XP\n </span>\n </div>\n </div>\n );\n\n return (\n <div className={cn(\"flex items-center justify-between gap-4\", className)}>\n <div className=\"min-w-0\">\n <p className=\"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground\">\n Portfolio\n </p>\n <AddressDisplay\n address={address}\n chars={6}\n className=\"text-xl font-bold tracking-tight text-foreground\"\n />\n </div>\n {score?.href ? (\n <Link href={score.href} className=\"shrink-0 active:opacity-80\">\n {scoreChip}\n </Link>\n ) : (\n <div className=\"shrink-0\">{scoreChip}</div>\n )}\n </div>\n );\n}\n"],"mappings":";AAkCQ,cAGA,YAHA;AAhCR,OAAO,UAAU;AACjB,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAsBxB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,QAAM,YAAY,SAChB,oBAAC,SAAI,WAAU,8CACb,+BAAC,SAAI,WAAU,kFACb;AAAA,wBAAC,UAAK,WAAU,yCACb,gBAAM,WACT;AAAA,IACA,qBAAC,UAAK,WAAU,8CACb;AAAA,YAAM,QAAQ,eAAe;AAAA,MAAE;AAAA,OAClC;AAAA,KACF,GACF;AAGF,SACE,qBAAC,SAAI,WAAW,GAAG,2CAA2C,SAAS,GACrE;AAAA,yBAAC,SAAI,WAAU,WACb;AAAA,0BAAC,OAAE,WAAU,4EAA2E,uBAExF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,OAAO;AAAA,UACP,WAAU;AAAA;AAAA,MACZ;AAAA,OACF;AAAA,IACC,OAAO,OACN,oBAAC,QAAK,MAAM,MAAM,MAAM,WAAU,8BAC/B,qBACH,IAEA,oBAAC,SAAI,WAAU,YAAY,qBAAU;AAAA,KAEzC;AAEJ;","names":[]}
|
|
@@ -23,44 +23,28 @@ __export(portfolio_overview_exports, {
|
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(portfolio_overview_exports);
|
|
25
25
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
-
var import_react = require("react");
|
|
27
26
|
var import_cn = require("../utils/cn.js");
|
|
28
27
|
var import_portfolio_bento_tile = require("./portfolio-bento-tile.js");
|
|
29
|
-
var import_portfolio_chip_filter = require("./portfolio-chip-filter.js");
|
|
30
28
|
function PortfolioOverview({
|
|
31
29
|
tiles,
|
|
32
30
|
isEmpty,
|
|
33
31
|
emptyState,
|
|
34
32
|
className
|
|
35
33
|
}) {
|
|
36
|
-
const [selected, setSelected] = (0, import_react.useState)("all");
|
|
37
34
|
if (isEmpty) {
|
|
38
35
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className, children: emptyState });
|
|
39
36
|
}
|
|
40
|
-
const
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
import_portfolio_bento_tile.PortfolioBentoTile,
|
|
52
|
-
{
|
|
53
|
-
title: tile.title,
|
|
54
|
-
href: tile.href,
|
|
55
|
-
size: tile.size,
|
|
56
|
-
action: tile.action,
|
|
57
|
-
isEmpty: tile.isEmpty,
|
|
58
|
-
emptyState: tile.emptyState,
|
|
59
|
-
children: tile.content
|
|
60
|
-
},
|
|
61
|
-
tile.key
|
|
62
|
-
)) })
|
|
63
|
-
] });
|
|
37
|
+
const populatedTiles = tiles.filter((t) => !t.isEmpty);
|
|
38
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("columns-1 md:columns-2 xl:columns-3 gap-4", className), children: populatedTiles.map((tile) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
39
|
+
import_portfolio_bento_tile.PortfolioBentoTile,
|
|
40
|
+
{
|
|
41
|
+
title: tile.title,
|
|
42
|
+
href: tile.href,
|
|
43
|
+
size: tile.size,
|
|
44
|
+
children: tile.content
|
|
45
|
+
},
|
|
46
|
+
tile.key
|
|
47
|
+
)) });
|
|
64
48
|
}
|
|
65
49
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
50
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-overview.tsx"],"sourcesContent":["\"use client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-overview.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\nimport { PortfolioBentoTile, type PortfolioBentoTileProps } from \"./portfolio-bento-tile.js\";\n\nexport interface PortfolioBentoTileConfig {\n key: string;\n title: string;\n href: string;\n size?: PortfolioBentoTileProps[\"size\"];\n /** Tiles with nothing to show are omitted entirely, not rendered empty. */\n isEmpty?: boolean;\n content: React.ReactNode;\n}\n\nexport interface PortfolioOverviewProps {\n tiles: PortfolioBentoTileConfig[];\n /** First-run state across the whole portfolio (zero holdings, zero activity). */\n isEmpty?: boolean;\n emptyState?: React.ReactNode;\n className?: string;\n}\n\n/**\n * Portfolio landing page: a content-first masonry dashboard. Each tile is a\n * fast preview of one section, expanding into its full subpage via \"See\n * all\". Navigation across portfolio sections lives one level up, in the\n * shared portfolio chip bar rendered by the app's layout on every page —\n * this component is pure tile layout, nothing else.\n */\nexport function PortfolioOverview({\n tiles,\n isEmpty,\n emptyState,\n className,\n}: PortfolioOverviewProps) {\n if (isEmpty) {\n return <div className={className}>{emptyState}</div>;\n }\n\n const populatedTiles = tiles.filter((t) => !t.isEmpty);\n\n return (\n <div className={cn(\"columns-1 md:columns-2 xl:columns-3 gap-4\", className)}>\n {populatedTiles.map((tile) => (\n <PortfolioBentoTile\n key={tile.key}\n title={tile.title}\n href={tile.href}\n size={tile.size}\n >\n {tile.content}\n </PortfolioBentoTile>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqCW;AAnCX,gBAAmB;AACnB,kCAAiE;AA2B1D,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,MAAI,SAAS;AACX,WAAO,4CAAC,SAAI,WAAuB,sBAAW;AAAA,EAChD;AAEA,QAAM,iBAAiB,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO;AAErD,SACE,4CAAC,SAAI,eAAW,cAAG,6CAA6C,SAAS,GACtE,yBAAe,IAAI,CAAC,SACnB;AAAA,IAAC;AAAA;AAAA,MAEC,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MAEV,eAAK;AAAA;AAAA,IALD,KAAK;AAAA,EAMZ,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -2,15 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { PortfolioBentoTileProps } from './portfolio-bento-tile.cjs';
|
|
3
3
|
|
|
4
4
|
interface PortfolioBentoTileConfig {
|
|
5
|
-
/** Matches a PortfolioChipFilter option key. */
|
|
6
5
|
key: string;
|
|
7
6
|
title: string;
|
|
8
7
|
href: string;
|
|
9
8
|
size?: PortfolioBentoTileProps["size"];
|
|
10
|
-
/**
|
|
11
|
-
action?: React.ReactNode;
|
|
9
|
+
/** Tiles with nothing to show are omitted entirely, not rendered empty. */
|
|
12
10
|
isEmpty?: boolean;
|
|
13
|
-
emptyState?: React.ReactNode;
|
|
14
11
|
content: React.ReactNode;
|
|
15
12
|
}
|
|
16
13
|
interface PortfolioOverviewProps {
|
|
@@ -21,12 +18,11 @@ interface PortfolioOverviewProps {
|
|
|
21
18
|
className?: string;
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
|
-
* Portfolio landing page: a content-first
|
|
25
|
-
* fast preview of one section
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* component only handles layout, filtering, and empty states.
|
|
21
|
+
* Portfolio landing page: a content-first masonry dashboard. Each tile is a
|
|
22
|
+
* fast preview of one section, expanding into its full subpage via "See
|
|
23
|
+
* all". Navigation across portfolio sections lives one level up, in the
|
|
24
|
+
* shared portfolio chip bar rendered by the app's layout on every page —
|
|
25
|
+
* this component is pure tile layout, nothing else.
|
|
30
26
|
*/
|
|
31
27
|
declare function PortfolioOverview({ tiles, isEmpty, emptyState, className, }: PortfolioOverviewProps): react_jsx_runtime.JSX.Element;
|
|
32
28
|
|
|
@@ -2,15 +2,12 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { PortfolioBentoTileProps } from './portfolio-bento-tile.js';
|
|
3
3
|
|
|
4
4
|
interface PortfolioBentoTileConfig {
|
|
5
|
-
/** Matches a PortfolioChipFilter option key. */
|
|
6
5
|
key: string;
|
|
7
6
|
title: string;
|
|
8
7
|
href: string;
|
|
9
8
|
size?: PortfolioBentoTileProps["size"];
|
|
10
|
-
/**
|
|
11
|
-
action?: React.ReactNode;
|
|
9
|
+
/** Tiles with nothing to show are omitted entirely, not rendered empty. */
|
|
12
10
|
isEmpty?: boolean;
|
|
13
|
-
emptyState?: React.ReactNode;
|
|
14
11
|
content: React.ReactNode;
|
|
15
12
|
}
|
|
16
13
|
interface PortfolioOverviewProps {
|
|
@@ -21,12 +18,11 @@ interface PortfolioOverviewProps {
|
|
|
21
18
|
className?: string;
|
|
22
19
|
}
|
|
23
20
|
/**
|
|
24
|
-
* Portfolio landing page: a content-first
|
|
25
|
-
* fast preview of one section
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* component only handles layout, filtering, and empty states.
|
|
21
|
+
* Portfolio landing page: a content-first masonry dashboard. Each tile is a
|
|
22
|
+
* fast preview of one section, expanding into its full subpage via "See
|
|
23
|
+
* all". Navigation across portfolio sections lives one level up, in the
|
|
24
|
+
* shared portfolio chip bar rendered by the app's layout on every page —
|
|
25
|
+
* this component is pure tile layout, nothing else.
|
|
30
26
|
*/
|
|
31
27
|
declare function PortfolioOverview({ tiles, isEmpty, emptyState, className, }: PortfolioOverviewProps): react_jsx_runtime.JSX.Element;
|
|
32
28
|
|
|
@@ -1,43 +1,27 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx
|
|
3
|
-
import { useState } from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { cn } from "../utils/cn.js";
|
|
5
4
|
import { PortfolioBentoTile } from "./portfolio-bento-tile.js";
|
|
6
|
-
import { PortfolioChipFilter } from "./portfolio-chip-filter.js";
|
|
7
5
|
function PortfolioOverview({
|
|
8
6
|
tiles,
|
|
9
7
|
isEmpty,
|
|
10
8
|
emptyState,
|
|
11
9
|
className
|
|
12
10
|
}) {
|
|
13
|
-
const [selected, setSelected] = useState("all");
|
|
14
11
|
if (isEmpty) {
|
|
15
12
|
return /* @__PURE__ */ jsx("div", { className, children: emptyState });
|
|
16
13
|
}
|
|
17
|
-
const
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
PortfolioBentoTile,
|
|
29
|
-
{
|
|
30
|
-
title: tile.title,
|
|
31
|
-
href: tile.href,
|
|
32
|
-
size: tile.size,
|
|
33
|
-
action: tile.action,
|
|
34
|
-
isEmpty: tile.isEmpty,
|
|
35
|
-
emptyState: tile.emptyState,
|
|
36
|
-
children: tile.content
|
|
37
|
-
},
|
|
38
|
-
tile.key
|
|
39
|
-
)) })
|
|
40
|
-
] });
|
|
14
|
+
const populatedTiles = tiles.filter((t) => !t.isEmpty);
|
|
15
|
+
return /* @__PURE__ */ jsx("div", { className: cn("columns-1 md:columns-2 xl:columns-3 gap-4", className), children: populatedTiles.map((tile) => /* @__PURE__ */ jsx(
|
|
16
|
+
PortfolioBentoTile,
|
|
17
|
+
{
|
|
18
|
+
title: tile.title,
|
|
19
|
+
href: tile.href,
|
|
20
|
+
size: tile.size,
|
|
21
|
+
children: tile.content
|
|
22
|
+
},
|
|
23
|
+
tile.key
|
|
24
|
+
)) });
|
|
41
25
|
}
|
|
42
26
|
export {
|
|
43
27
|
PortfolioOverview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/portfolio-overview.tsx"],"sourcesContent":["\"use client\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../../src/components/portfolio-overview.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\nimport { PortfolioBentoTile, type PortfolioBentoTileProps } from \"./portfolio-bento-tile.js\";\n\nexport interface PortfolioBentoTileConfig {\n key: string;\n title: string;\n href: string;\n size?: PortfolioBentoTileProps[\"size\"];\n /** Tiles with nothing to show are omitted entirely, not rendered empty. */\n isEmpty?: boolean;\n content: React.ReactNode;\n}\n\nexport interface PortfolioOverviewProps {\n tiles: PortfolioBentoTileConfig[];\n /** First-run state across the whole portfolio (zero holdings, zero activity). */\n isEmpty?: boolean;\n emptyState?: React.ReactNode;\n className?: string;\n}\n\n/**\n * Portfolio landing page: a content-first masonry dashboard. Each tile is a\n * fast preview of one section, expanding into its full subpage via \"See\n * all\". Navigation across portfolio sections lives one level up, in the\n * shared portfolio chip bar rendered by the app's layout on every page —\n * this component is pure tile layout, nothing else.\n */\nexport function PortfolioOverview({\n tiles,\n isEmpty,\n emptyState,\n className,\n}: PortfolioOverviewProps) {\n if (isEmpty) {\n return <div className={className}>{emptyState}</div>;\n }\n\n const populatedTiles = tiles.filter((t) => !t.isEmpty);\n\n return (\n <div className={cn(\"columns-1 md:columns-2 xl:columns-3 gap-4\", className)}>\n {populatedTiles.map((tile) => (\n <PortfolioBentoTile\n key={tile.key}\n title={tile.title}\n href={tile.href}\n size={tile.size}\n >\n {tile.content}\n </PortfolioBentoTile>\n ))}\n </div>\n );\n}\n"],"mappings":";AAqCW;AAnCX,SAAS,UAAU;AACnB,SAAS,0BAAwD;AA2B1D,SAAS,kBAAkB;AAAA,EAChC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA2B;AACzB,MAAI,SAAS;AACX,WAAO,oBAAC,SAAI,WAAuB,sBAAW;AAAA,EAChD;AAEA,QAAM,iBAAiB,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO;AAErD,SACE,oBAAC,SAAI,WAAW,GAAG,6CAA6C,SAAS,GACtE,yBAAe,IAAI,CAAC,SACnB;AAAA,IAAC;AAAA;AAAA,MAEC,OAAO,KAAK;AAAA,MACZ,MAAM,KAAK;AAAA,MACX,MAAM,KAAK;AAAA,MAEV,eAAK;AAAA;AAAA,IALD,KAAK;AAAA,EAMZ,CACD,GACH;AAEJ;","names":[]}
|