@medialane/ui 0.100.1 → 0.101.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/coin-launch-preview.cjs +1 -1
- package/dist/components/coin-launch-preview.cjs.map +1 -1
- package/dist/components/coin-launch-preview.js +1 -1
- package/dist/components/coin-launch-preview.js.map +1 -1
- package/dist/components/launchpad-services.cjs +4 -4
- package/dist/components/launchpad-services.cjs.map +1 -1
- package/dist/components/launchpad-services.js +4 -4
- package/dist/components/launchpad-services.js.map +1 -1
- package/dist/components/launchpad-strip.cjs +4 -4
- package/dist/components/launchpad-strip.cjs.map +1 -1
- package/dist/components/launchpad-strip.js +4 -4
- package/dist/components/launchpad-strip.js.map +1 -1
- package/dist/components/portfolio-bento-tile.cjs +2 -2
- package/dist/components/portfolio-bento-tile.cjs.map +1 -1
- package/dist/components/portfolio-bento-tile.js +2 -2
- package/dist/components/portfolio-bento-tile.js.map +1 -1
- package/dist/components/portfolio-chip-filter.cjs +1 -1
- package/dist/components/portfolio-chip-filter.cjs.map +1 -1
- package/dist/components/portfolio-chip-filter.js +1 -1
- package/dist/components/portfolio-chip-filter.js.map +1 -1
- package/dist/components/portfolio-header.cjs +5 -5
- package/dist/components/portfolio-header.cjs.map +1 -1
- package/dist/components/portfolio-header.js +5 -5
- package/dist/components/portfolio-header.js.map +1 -1
- package/dist/components/rewards/badge-catalog.cjs +49 -0
- package/dist/components/rewards/badge-catalog.cjs.map +1 -0
- package/dist/components/rewards/badge-catalog.d.cts +22 -0
- package/dist/components/rewards/badge-catalog.d.ts +22 -0
- package/dist/components/rewards/badge-catalog.js +25 -0
- package/dist/components/rewards/badge-catalog.js.map +1 -0
- package/dist/components/rewards/level-badge.cjs +7 -16
- package/dist/components/rewards/level-badge.cjs.map +1 -1
- package/dist/components/rewards/level-badge.d.cts +10 -4
- package/dist/components/rewards/level-badge.d.ts +10 -4
- package/dist/components/rewards/level-badge.js +8 -17
- package/dist/components/rewards/level-badge.js.map +1 -1
- package/dist/components/rewards/level-journey-list.cjs +52 -0
- package/dist/components/rewards/level-journey-list.cjs.map +1 -0
- package/dist/components/rewards/level-journey-list.d.cts +22 -0
- package/dist/components/rewards/level-journey-list.d.ts +22 -0
- package/dist/components/rewards/level-journey-list.js +28 -0
- package/dist/components/rewards/level-journey-list.js.map +1 -0
- package/dist/components/token-glyph.cjs.map +1 -1
- package/dist/components/token-glyph.d.cts +1 -1
- package/dist/components/token-glyph.d.ts +1 -1
- package/dist/components/token-glyph.js.map +1 -1
- package/dist/data/brand.cjs +4 -4
- package/dist/data/brand.cjs.map +1 -1
- package/dist/data/brand.d.cts +4 -4
- package/dist/data/brand.d.ts +4 -4
- package/dist/data/brand.js +4 -4
- package/dist/data/brand.js.map +1 -1
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/preset/tailwind.cjs +1 -1
- package/dist/preset/tailwind.cjs.map +1 -1
- package/dist/preset/tailwind.js +1 -1
- package/dist/preset/tailwind.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/portfolio-nav.cjs +0 -128
- package/dist/components/portfolio-nav.cjs.map +0 -1
- package/dist/components/portfolio-nav.d.cts +0 -36
- package/dist/components/portfolio-nav.d.ts +0 -36
- package/dist/components/portfolio-nav.js +0 -94
- package/dist/components/portfolio-nav.js.map +0 -1
- package/dist/components/rewards/level-ladder.cjs +0 -54
- package/dist/components/rewards/level-ladder.cjs.map +0 -1
- package/dist/components/rewards/level-ladder.d.cts +0 -17
- package/dist/components/rewards/level-ladder.d.ts +0 -17
- package/dist/components/rewards/level-ladder.js +0 -30
- package/dist/components/rewards/level-ladder.js.map +0 -1
|
@@ -37,7 +37,7 @@ var import_link = __toESM(require("next/link"), 1);
|
|
|
37
37
|
var import_cn = require("../utils/cn.js");
|
|
38
38
|
const CHIP_CLASS = "shrink-0 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap transition-colors border";
|
|
39
39
|
const INACTIVE_CLASS = "bg-muted border-border/60 text-muted-foreground hover:text-foreground hover:border-border";
|
|
40
|
-
const ACTIVE_CLASS = "bg-
|
|
40
|
+
const ACTIVE_CLASS = "bg-gradient-to-r from-brand-purple to-brand-orange border-transparent text-white font-bold";
|
|
41
41
|
function PortfolioChipFilter({
|
|
42
42
|
options,
|
|
43
43
|
value,
|
|
@@ -1 +1 @@
|
|
|
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-sm whitespace-nowrap transition-colors border\";\nconst INACTIVE_CLASS = \"bg-muted border-border/60 text-muted-foreground hover:text-foreground hover:border-border\";\nconst ACTIVE_CLASS = \"bg-
|
|
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-sm whitespace-nowrap transition-colors border\";\nconst INACTIVE_CLASS = \"bg-muted border-border/60 text-muted-foreground hover:text-foreground hover:border-border\";\nconst ACTIVE_CLASS = \"bg-gradient-to-r from-brand-purple to-brand-orange border-transparent text-white font-bold\";\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"]}
|
|
@@ -4,7 +4,7 @@ import Link from "next/link";
|
|
|
4
4
|
import { cn } from "../utils/cn.js";
|
|
5
5
|
const CHIP_CLASS = "shrink-0 rounded-full px-3.5 py-1.5 text-sm whitespace-nowrap transition-colors border";
|
|
6
6
|
const INACTIVE_CLASS = "bg-muted border-border/60 text-muted-foreground hover:text-foreground hover:border-border";
|
|
7
|
-
const ACTIVE_CLASS = "bg-
|
|
7
|
+
const ACTIVE_CLASS = "bg-gradient-to-r from-brand-purple to-brand-orange border-transparent text-white font-bold";
|
|
8
8
|
function PortfolioChipFilter({
|
|
9
9
|
options,
|
|
10
10
|
value,
|
|
@@ -1 +1 @@
|
|
|
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-sm whitespace-nowrap transition-colors border\";\nconst INACTIVE_CLASS = \"bg-muted border-border/60 text-muted-foreground hover:text-foreground hover:border-border\";\nconst ACTIVE_CLASS = \"bg-
|
|
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-sm whitespace-nowrap transition-colors border\";\nconst INACTIVE_CLASS = \"bg-muted border-border/60 text-muted-foreground hover:text-foreground hover:border-border\";\nconst ACTIVE_CLASS = \"bg-gradient-to-r from-brand-purple to-brand-orange border-transparent text-white font-bold\";\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":[]}
|
|
@@ -41,13 +41,13 @@ function PortfolioHeader({
|
|
|
41
41
|
score,
|
|
42
42
|
className
|
|
43
43
|
}) {
|
|
44
|
-
const scoreChip = score && /* @__PURE__ */ (0, import_jsx_runtime.
|
|
45
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-
|
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs text-
|
|
44
|
+
const scoreChip = score && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-full bg-gradient-to-r from-brand-purple to-brand-orange px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap text-white", children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-bold", children: score.levelName }),
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-xs font-medium text-white/80 tabular-nums", children: [
|
|
47
47
|
score.totalXp.toLocaleString(),
|
|
48
48
|
" XP"
|
|
49
49
|
] })
|
|
50
|
-
] })
|
|
50
|
+
] });
|
|
51
51
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("flex items-center justify-between gap-4", className), children: [
|
|
52
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
53
53
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-muted-foreground", children: "Portfolio" }),
|
|
@@ -56,7 +56,7 @@ function PortfolioHeader({
|
|
|
56
56
|
{
|
|
57
57
|
address,
|
|
58
58
|
chars: 6,
|
|
59
|
-
className: "text-
|
|
59
|
+
className: "text-2xl sm:text-3xl font-black tracking-tight text-foreground"
|
|
60
60
|
}
|
|
61
61
|
)
|
|
62
62
|
] }),
|
|
@@ -1 +1 @@
|
|
|
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=\"
|
|
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=\"rounded-full bg-gradient-to-r from-brand-purple to-brand-orange px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap text-white\">\n <span className=\"text-sm font-bold\">\n {score.levelName}\n </span>\n <span className=\"text-xs font-medium text-white/80 tabular-nums\">\n {score.totalXp.toLocaleString()} XP\n </span>\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-xs font-medium text-muted-foreground\">\n Portfolio\n </p>\n <AddressDisplay\n address={address}\n chars={6}\n className=\"text-2xl sm:text-3xl font-black 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;AAiCM;AA/BN,kBAAiB;AACjB,gBAAmB;AACnB,6BAA+B;AAsBxB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,QAAM,YAAY,SAChB,6CAAC,SAAI,WAAU,wIACb;AAAA,gDAAC,UAAK,WAAU,qBACb,gBAAM,WACT;AAAA,IACA,6CAAC,UAAK,WAAU,kDACb;AAAA,YAAM,QAAQ,eAAe;AAAA,MAAE;AAAA,OAClC;AAAA,KACF;AAGF,SACE,6CAAC,SAAI,eAAW,cAAG,2CAA2C,SAAS,GACrE;AAAA,iDAAC,SAAI,WAAU,WACb;AAAA,kDAAC,OAAE,WAAU,6CAA4C,uBAEzD;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"]}
|
|
@@ -8,13 +8,13 @@ function PortfolioHeader({
|
|
|
8
8
|
score,
|
|
9
9
|
className
|
|
10
10
|
}) {
|
|
11
|
-
const scoreChip = score && /* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-
|
|
13
|
-
/* @__PURE__ */ jsxs("span", { className: "text-xs text-
|
|
11
|
+
const scoreChip = score && /* @__PURE__ */ jsxs("div", { className: "rounded-full bg-gradient-to-r from-brand-purple to-brand-orange px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap text-white", children: [
|
|
12
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-bold", children: score.levelName }),
|
|
13
|
+
/* @__PURE__ */ jsxs("span", { className: "text-xs font-medium text-white/80 tabular-nums", children: [
|
|
14
14
|
score.totalXp.toLocaleString(),
|
|
15
15
|
" XP"
|
|
16
16
|
] })
|
|
17
|
-
] })
|
|
17
|
+
] });
|
|
18
18
|
return /* @__PURE__ */ jsxs("div", { className: cn("flex items-center justify-between gap-4", className), children: [
|
|
19
19
|
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
20
20
|
/* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-muted-foreground", children: "Portfolio" }),
|
|
@@ -23,7 +23,7 @@ function PortfolioHeader({
|
|
|
23
23
|
{
|
|
24
24
|
address,
|
|
25
25
|
chars: 6,
|
|
26
|
-
className: "text-
|
|
26
|
+
className: "text-2xl sm:text-3xl font-black tracking-tight text-foreground"
|
|
27
27
|
}
|
|
28
28
|
)
|
|
29
29
|
] }),
|
|
@@ -1 +1 @@
|
|
|
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=\"
|
|
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=\"rounded-full bg-gradient-to-r from-brand-purple to-brand-orange px-3.5 py-1.5 flex items-baseline gap-2 whitespace-nowrap text-white\">\n <span className=\"text-sm font-bold\">\n {score.levelName}\n </span>\n <span className=\"text-xs font-medium text-white/80 tabular-nums\">\n {score.totalXp.toLocaleString()} XP\n </span>\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-xs font-medium text-muted-foreground\">\n Portfolio\n </p>\n <AddressDisplay\n address={address}\n chars={6}\n className=\"text-2xl sm:text-3xl font-black 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":";AAiCM,cAGA,YAHA;AA/BN,OAAO,UAAU;AACjB,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAsBxB,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAAyB;AACvB,QAAM,YAAY,SAChB,qBAAC,SAAI,WAAU,wIACb;AAAA,wBAAC,UAAK,WAAU,qBACb,gBAAM,WACT;AAAA,IACA,qBAAC,UAAK,WAAU,kDACb;AAAA,YAAM,QAAQ,eAAe;AAAA,MAAE;AAAA,OAClC;AAAA,KACF;AAGF,SACE,qBAAC,SAAI,WAAW,GAAG,2CAA2C,SAAS,GACrE;AAAA,yBAAC,SAAI,WAAU,WACb;AAAA,0BAAC,OAAE,WAAU,6CAA4C,uBAEzD;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":[]}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var badge_catalog_exports = {};
|
|
20
|
+
__export(badge_catalog_exports, {
|
|
21
|
+
BadgeCatalog: () => BadgeCatalog
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(badge_catalog_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_cn = require("../../utils/cn.js");
|
|
26
|
+
var import_badge_shelf = require("./badge-shelf.js");
|
|
27
|
+
const CATEGORY_LABELS = {
|
|
28
|
+
creator: "Creator",
|
|
29
|
+
collector: "Collector",
|
|
30
|
+
community: "Community"
|
|
31
|
+
};
|
|
32
|
+
function BadgeCatalog({ badges, className }) {
|
|
33
|
+
const categories = [...new Set(badges.map((b) => b.category))];
|
|
34
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("space-y-8", className), children: categories.map((cat) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-black uppercase tracking-wide text-foreground/50", children: CATEGORY_LABELS[cat] ?? cat }),
|
|
36
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: badges.filter((b) => b.category === cat).map((badge) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3 rounded-2xl bg-foreground/[0.04] p-4", children: [
|
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "flex h-10 w-10 items-center justify-center rounded-xl shrink-0 bg-gradient-to-br from-brand-orange to-brand-maeve", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge_shelf.BadgeIcon, { name: badge.icon, color: "#ffffff", className: "h-5 w-5" }) }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-bold", children: badge.name }),
|
|
40
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-foreground/60 truncate", children: badge.description })
|
|
41
|
+
] })
|
|
42
|
+
] }, badge.key)) })
|
|
43
|
+
] }, cat)) });
|
|
44
|
+
}
|
|
45
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
46
|
+
0 && (module.exports = {
|
|
47
|
+
BadgeCatalog
|
|
48
|
+
});
|
|
49
|
+
//# sourceMappingURL=badge-catalog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/badge-catalog.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\nimport { BadgeIcon } from \"./badge-shelf.js\";\n\nexport interface BadgeCatalogBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface BadgeCatalogProps {\n badges: BadgeCatalogBadge[];\n className?: string;\n}\n\nconst CATEGORY_LABELS: Record<string, string> = {\n creator: \"Creator\",\n collector: \"Collector\",\n community: \"Community\",\n};\n\n/** Full badge catalog, grouped by category — \"what's achievable,\" not\n * \"what you've done\" (no earned/locked state; that's BadgeShelf's job on\n * /rewards, which stays exactly as-is for the viewer's own progress).\n * Groups render in whatever categories are actually present in the data,\n * not a hardcoded list — new categories show up automatically. */\nexport function BadgeCatalog({ badges, className }: BadgeCatalogProps) {\n const categories = [...new Set(badges.map((b) => b.category))];\n\n return (\n <div className={cn(\"space-y-8\", className)}>\n {categories.map((cat) => (\n <div key={cat} className=\"space-y-3\">\n <p className=\"text-sm font-black uppercase tracking-wide text-foreground/50\">\n {CATEGORY_LABELS[cat] ?? cat}\n </p>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-3\">\n {badges\n .filter((b) => b.category === cat)\n .map((badge) => (\n <div key={badge.key} className=\"flex items-center gap-3 rounded-2xl bg-foreground/[0.04] p-4\">\n <span className=\"flex h-10 w-10 items-center justify-center rounded-xl shrink-0 bg-gradient-to-br from-brand-orange to-brand-maeve\">\n <BadgeIcon name={badge.icon} color=\"#ffffff\" className=\"h-5 w-5\" />\n </span>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">{badge.name}</p>\n <p className=\"text-xs text-foreground/60 truncate\">{badge.description}</p>\n </div>\n </div>\n ))}\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAmCU;AAnCV,gBAAmB;AACnB,yBAA0B;AAgB1B,MAAM,kBAA0C;AAAA,EAC9C,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AACb;AAOO,SAAS,aAAa,EAAE,QAAQ,UAAU,GAAsB;AACrE,QAAM,aAAa,CAAC,GAAG,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE7D,SACE,4CAAC,SAAI,eAAW,cAAG,aAAa,SAAS,GACtC,qBAAW,IAAI,CAAC,QACf,6CAAC,SAAc,WAAU,aACvB;AAAA,gDAAC,OAAE,WAAU,iEACV,0BAAgB,GAAG,KAAK,KAC3B;AAAA,IACA,4CAAC,SAAI,WAAU,yCACZ,iBACE,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,EAChC,IAAI,CAAC,UACJ,6CAAC,SAAoB,WAAU,gEAC7B;AAAA,kDAAC,UAAK,WAAU,qHACd,sDAAC,gCAAU,MAAM,MAAM,MAAM,OAAM,WAAU,WAAU,WAAU,GACnE;AAAA,MACA,6CAAC,SAAI,WAAU,WACb;AAAA,oDAAC,OAAE,WAAU,qBAAqB,gBAAM,MAAK;AAAA,QAC7C,4CAAC,OAAE,WAAU,uCAAuC,gBAAM,aAAY;AAAA,SACxE;AAAA,SAPQ,MAAM,GAQhB,CACD,GACL;AAAA,OAlBQ,GAmBV,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface BadgeCatalogBadge {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
color: string;
|
|
9
|
+
category: string;
|
|
10
|
+
}
|
|
11
|
+
interface BadgeCatalogProps {
|
|
12
|
+
badges: BadgeCatalogBadge[];
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Full badge catalog, grouped by category — "what's achievable," not
|
|
16
|
+
* "what you've done" (no earned/locked state; that's BadgeShelf's job on
|
|
17
|
+
* /rewards, which stays exactly as-is for the viewer's own progress).
|
|
18
|
+
* Groups render in whatever categories are actually present in the data,
|
|
19
|
+
* not a hardcoded list — new categories show up automatically. */
|
|
20
|
+
declare function BadgeCatalog({ badges, className }: BadgeCatalogProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { BadgeCatalog, type BadgeCatalogBadge, type BadgeCatalogProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface BadgeCatalogBadge {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
color: string;
|
|
9
|
+
category: string;
|
|
10
|
+
}
|
|
11
|
+
interface BadgeCatalogProps {
|
|
12
|
+
badges: BadgeCatalogBadge[];
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Full badge catalog, grouped by category — "what's achievable," not
|
|
16
|
+
* "what you've done" (no earned/locked state; that's BadgeShelf's job on
|
|
17
|
+
* /rewards, which stays exactly as-is for the viewer's own progress).
|
|
18
|
+
* Groups render in whatever categories are actually present in the data,
|
|
19
|
+
* not a hardcoded list — new categories show up automatically. */
|
|
20
|
+
declare function BadgeCatalog({ badges, className }: BadgeCatalogProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { BadgeCatalog, type BadgeCatalogBadge, type BadgeCatalogProps };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
import { BadgeIcon } from "./badge-shelf.js";
|
|
4
|
+
const CATEGORY_LABELS = {
|
|
5
|
+
creator: "Creator",
|
|
6
|
+
collector: "Collector",
|
|
7
|
+
community: "Community"
|
|
8
|
+
};
|
|
9
|
+
function BadgeCatalog({ badges, className }) {
|
|
10
|
+
const categories = [...new Set(badges.map((b) => b.category))];
|
|
11
|
+
return /* @__PURE__ */ jsx("div", { className: cn("space-y-8", className), children: categories.map((cat) => /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
12
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-black uppercase tracking-wide text-foreground/50", children: CATEGORY_LABELS[cat] ?? cat }),
|
|
13
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: badges.filter((b) => b.category === cat).map((badge) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 rounded-2xl bg-foreground/[0.04] p-4", children: [
|
|
14
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-10 w-10 items-center justify-center rounded-xl shrink-0 bg-gradient-to-br from-brand-orange to-brand-maeve", children: /* @__PURE__ */ jsx(BadgeIcon, { name: badge.icon, color: "#ffffff", className: "h-5 w-5" }) }),
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-bold", children: badge.name }),
|
|
17
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-foreground/60 truncate", children: badge.description })
|
|
18
|
+
] })
|
|
19
|
+
] }, badge.key)) })
|
|
20
|
+
] }, cat)) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
BadgeCatalog
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=badge-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/badge-catalog.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\nimport { BadgeIcon } from \"./badge-shelf.js\";\n\nexport interface BadgeCatalogBadge {\n key: string;\n name: string;\n description: string;\n icon: string;\n color: string;\n category: string;\n}\n\nexport interface BadgeCatalogProps {\n badges: BadgeCatalogBadge[];\n className?: string;\n}\n\nconst CATEGORY_LABELS: Record<string, string> = {\n creator: \"Creator\",\n collector: \"Collector\",\n community: \"Community\",\n};\n\n/** Full badge catalog, grouped by category — \"what's achievable,\" not\n * \"what you've done\" (no earned/locked state; that's BadgeShelf's job on\n * /rewards, which stays exactly as-is for the viewer's own progress).\n * Groups render in whatever categories are actually present in the data,\n * not a hardcoded list — new categories show up automatically. */\nexport function BadgeCatalog({ badges, className }: BadgeCatalogProps) {\n const categories = [...new Set(badges.map((b) => b.category))];\n\n return (\n <div className={cn(\"space-y-8\", className)}>\n {categories.map((cat) => (\n <div key={cat} className=\"space-y-3\">\n <p className=\"text-sm font-black uppercase tracking-wide text-foreground/50\">\n {CATEGORY_LABELS[cat] ?? cat}\n </p>\n <div className=\"grid grid-cols-1 sm:grid-cols-2 gap-3\">\n {badges\n .filter((b) => b.category === cat)\n .map((badge) => (\n <div key={badge.key} className=\"flex items-center gap-3 rounded-2xl bg-foreground/[0.04] p-4\">\n <span className=\"flex h-10 w-10 items-center justify-center rounded-xl shrink-0 bg-gradient-to-br from-brand-orange to-brand-maeve\">\n <BadgeIcon name={badge.icon} color=\"#ffffff\" className=\"h-5 w-5\" />\n </span>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">{badge.name}</p>\n <p className=\"text-xs text-foreground/60 truncate\">{badge.description}</p>\n </div>\n </div>\n ))}\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":"AAmCU,cAWQ,YAXR;AAnCV,SAAS,UAAU;AACnB,SAAS,iBAAiB;AAgB1B,MAAM,kBAA0C;AAAA,EAC9C,SAAS;AAAA,EACT,WAAW;AAAA,EACX,WAAW;AACb;AAOO,SAAS,aAAa,EAAE,QAAQ,UAAU,GAAsB;AACrE,QAAM,aAAa,CAAC,GAAG,IAAI,IAAI,OAAO,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE7D,SACE,oBAAC,SAAI,WAAW,GAAG,aAAa,SAAS,GACtC,qBAAW,IAAI,CAAC,QACf,qBAAC,SAAc,WAAU,aACvB;AAAA,wBAAC,OAAE,WAAU,iEACV,0BAAgB,GAAG,KAAK,KAC3B;AAAA,IACA,oBAAC,SAAI,WAAU,yCACZ,iBACE,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,EAChC,IAAI,CAAC,UACJ,qBAAC,SAAoB,WAAU,gEAC7B;AAAA,0BAAC,UAAK,WAAU,qHACd,8BAAC,aAAU,MAAM,MAAM,MAAM,OAAM,WAAU,WAAU,WAAU,GACnE;AAAA,MACA,qBAAC,SAAI,WAAU,WACb;AAAA,4BAAC,OAAE,WAAU,qBAAqB,gBAAM,MAAK;AAAA,QAC7C,oBAAC,OAAE,WAAU,uCAAuC,gBAAM,aAAY;AAAA,SACxE;AAAA,SAPQ,MAAM,GAQhB,CACD,GACL;AAAA,OAlBQ,GAmBV,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -23,31 +23,22 @@ __export(level_badge_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(level_badge_exports);
|
|
24
24
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
25
|
var import_cn = require("../../utils/cn.js");
|
|
26
|
-
function LevelBadge({ level, name,
|
|
26
|
+
function LevelBadge({ level, name, size = "md", className }) {
|
|
27
27
|
const sizeClasses = {
|
|
28
|
-
sm: "h-5 px-
|
|
29
|
-
md: "h-6 px-
|
|
30
|
-
lg: "h-8 px-
|
|
28
|
+
sm: "h-5 px-2.5 text-2xs",
|
|
29
|
+
md: "h-6 px-3 text-xs",
|
|
30
|
+
lg: "h-8 px-4 text-sm"
|
|
31
31
|
};
|
|
32
|
-
|
|
33
|
-
sm: "h-1.5 w-1.5",
|
|
34
|
-
md: "h-2 w-2",
|
|
35
|
-
lg: "h-2.5 w-2.5"
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
38
33
|
"span",
|
|
39
34
|
{
|
|
40
35
|
title: `Level ${level}`,
|
|
41
36
|
className: (0, import_cn.cn)(
|
|
42
|
-
"inline-flex items-center rounded-full
|
|
37
|
+
"inline-flex items-center rounded-full font-bold tracking-tight whitespace-nowrap text-white bg-gradient-to-r from-brand-orange to-brand-maeve",
|
|
43
38
|
sizeClasses[size],
|
|
44
39
|
className
|
|
45
40
|
),
|
|
46
|
-
|
|
47
|
-
children: [
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_cn.cn)("rounded-full shrink-0", dotSizes[size]), style: { backgroundColor: badgeColor } }),
|
|
49
|
-
name
|
|
50
|
-
]
|
|
41
|
+
children: name
|
|
51
42
|
}
|
|
52
43
|
);
|
|
53
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/level-badge.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelBadgeProps {\n level: number;\n name: string;\n badgeColor: string;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n}\n\n/**
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/level-badge.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelBadgeProps {\n level: number;\n name: string;\n /** Kept for interface consistency with other rewards components that do\n * use per-level color (XpProgress, LevelUpCelebration, JourneyPath) —\n * this component intentionally ignores it in favor of one signature\n * brand gradient across every level, not 20+ flat per-level colors. */\n badgeColor: string;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n}\n\n/** Level chip — shows the level's title only (\"Voyager\"), not the raw\n * number (\"Lv.6 Voyager\" read as UI noise). The level is still available\n * on hover via the native title tooltip. One signature orange->maeve\n * gradient fill, white text — vivid and consistent regardless of level,\n * rather than a washed-out per-level tint. Pure presentation — the\n * consuming app supplies level data from the rewards API. */\nexport function LevelBadge({ level, name, size = \"md\", className }: LevelBadgeProps) {\n const sizeClasses = {\n sm: \"h-5 px-2.5 text-2xs\",\n md: \"h-6 px-3 text-xs\",\n lg: \"h-8 px-4 text-sm\",\n };\n\n return (\n <span\n title={`Level ${level}`}\n className={cn(\n \"inline-flex items-center rounded-full font-bold tracking-tight whitespace-nowrap text-white bg-gradient-to-r from-brand-orange to-brand-maeve\",\n sizeClasses[size],\n className\n )}\n >\n {name}\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BI;AA5BJ,gBAAmB;AAoBZ,SAAS,WAAW,EAAE,OAAO,MAAM,OAAO,MAAM,UAAU,GAAoB;AACnF,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,SAAS,KAAK;AAAA,MACrB,eAAW;AAAA,QACT;AAAA,QACA,YAAY,IAAI;AAAA,QAChB;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -3,14 +3,20 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface LevelBadgeProps {
|
|
4
4
|
level: number;
|
|
5
5
|
name: string;
|
|
6
|
+
/** Kept for interface consistency with other rewards components that do
|
|
7
|
+
* use per-level color (XpProgress, LevelUpCelebration, JourneyPath) —
|
|
8
|
+
* this component intentionally ignores it in favor of one signature
|
|
9
|
+
* brand gradient across every level, not 20+ flat per-level colors. */
|
|
6
10
|
badgeColor: string;
|
|
7
11
|
size?: "sm" | "md" | "lg";
|
|
8
12
|
className?: string;
|
|
9
13
|
}
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
14
|
+
/** Level chip — shows the level's title only ("Voyager"), not the raw
|
|
15
|
+
* number ("Lv.6 Voyager" read as UI noise). The level is still available
|
|
16
|
+
* on hover via the native title tooltip. One signature orange->maeve
|
|
17
|
+
* gradient fill, white text — vivid and consistent regardless of level,
|
|
18
|
+
* rather than a washed-out per-level tint. Pure presentation — the
|
|
13
19
|
* consuming app supplies level data from the rewards API. */
|
|
14
|
-
declare function LevelBadge({ level, name,
|
|
20
|
+
declare function LevelBadge({ level, name, size, className }: LevelBadgeProps): react_jsx_runtime.JSX.Element;
|
|
15
21
|
|
|
16
22
|
export { LevelBadge, type LevelBadgeProps };
|
|
@@ -3,14 +3,20 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
3
3
|
interface LevelBadgeProps {
|
|
4
4
|
level: number;
|
|
5
5
|
name: string;
|
|
6
|
+
/** Kept for interface consistency with other rewards components that do
|
|
7
|
+
* use per-level color (XpProgress, LevelUpCelebration, JourneyPath) —
|
|
8
|
+
* this component intentionally ignores it in favor of one signature
|
|
9
|
+
* brand gradient across every level, not 20+ flat per-level colors. */
|
|
6
10
|
badgeColor: string;
|
|
7
11
|
size?: "sm" | "md" | "lg";
|
|
8
12
|
className?: string;
|
|
9
13
|
}
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
14
|
+
/** Level chip — shows the level's title only ("Voyager"), not the raw
|
|
15
|
+
* number ("Lv.6 Voyager" read as UI noise). The level is still available
|
|
16
|
+
* on hover via the native title tooltip. One signature orange->maeve
|
|
17
|
+
* gradient fill, white text — vivid and consistent regardless of level,
|
|
18
|
+
* rather than a washed-out per-level tint. Pure presentation — the
|
|
13
19
|
* consuming app supplies level data from the rewards API. */
|
|
14
|
-
declare function LevelBadge({ level, name,
|
|
20
|
+
declare function LevelBadge({ level, name, size, className }: LevelBadgeProps): react_jsx_runtime.JSX.Element;
|
|
15
21
|
|
|
16
22
|
export { LevelBadge, type LevelBadgeProps };
|
|
@@ -1,30 +1,21 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
-
function LevelBadge({ level, name,
|
|
3
|
+
function LevelBadge({ level, name, size = "md", className }) {
|
|
4
4
|
const sizeClasses = {
|
|
5
|
-
sm: "h-5 px-
|
|
6
|
-
md: "h-6 px-
|
|
7
|
-
lg: "h-8 px-
|
|
5
|
+
sm: "h-5 px-2.5 text-2xs",
|
|
6
|
+
md: "h-6 px-3 text-xs",
|
|
7
|
+
lg: "h-8 px-4 text-sm"
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
sm: "h-1.5 w-1.5",
|
|
11
|
-
md: "h-2 w-2",
|
|
12
|
-
lg: "h-2.5 w-2.5"
|
|
13
|
-
};
|
|
14
|
-
return /* @__PURE__ */ jsxs(
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
15
10
|
"span",
|
|
16
11
|
{
|
|
17
12
|
title: `Level ${level}`,
|
|
18
13
|
className: cn(
|
|
19
|
-
"inline-flex items-center rounded-full
|
|
14
|
+
"inline-flex items-center rounded-full font-bold tracking-tight whitespace-nowrap text-white bg-gradient-to-r from-brand-orange to-brand-maeve",
|
|
20
15
|
sizeClasses[size],
|
|
21
16
|
className
|
|
22
17
|
),
|
|
23
|
-
|
|
24
|
-
children: [
|
|
25
|
-
/* @__PURE__ */ jsx("span", { className: cn("rounded-full shrink-0", dotSizes[size]), style: { backgroundColor: badgeColor } }),
|
|
26
|
-
name
|
|
27
|
-
]
|
|
18
|
+
children: name
|
|
28
19
|
}
|
|
29
20
|
);
|
|
30
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/level-badge.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelBadgeProps {\n level: number;\n name: string;\n badgeColor: string;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n}\n\n/**
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/level-badge.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelBadgeProps {\n level: number;\n name: string;\n /** Kept for interface consistency with other rewards components that do\n * use per-level color (XpProgress, LevelUpCelebration, JourneyPath) —\n * this component intentionally ignores it in favor of one signature\n * brand gradient across every level, not 20+ flat per-level colors. */\n badgeColor: string;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n}\n\n/** Level chip — shows the level's title only (\"Voyager\"), not the raw\n * number (\"Lv.6 Voyager\" read as UI noise). The level is still available\n * on hover via the native title tooltip. One signature orange->maeve\n * gradient fill, white text — vivid and consistent regardless of level,\n * rather than a washed-out per-level tint. Pure presentation — the\n * consuming app supplies level data from the rewards API. */\nexport function LevelBadge({ level, name, size = \"md\", className }: LevelBadgeProps) {\n const sizeClasses = {\n sm: \"h-5 px-2.5 text-2xs\",\n md: \"h-6 px-3 text-xs\",\n lg: \"h-8 px-4 text-sm\",\n };\n\n return (\n <span\n title={`Level ${level}`}\n className={cn(\n \"inline-flex items-center rounded-full font-bold tracking-tight whitespace-nowrap text-white bg-gradient-to-r from-brand-orange to-brand-maeve\",\n sizeClasses[size],\n className\n )}\n >\n {name}\n </span>\n );\n}\n"],"mappings":"AA4BI;AA5BJ,SAAS,UAAU;AAoBZ,SAAS,WAAW,EAAE,OAAO,MAAM,OAAO,MAAM,UAAU,GAAoB;AACnF,QAAM,cAAc;AAAA,IAClB,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,SAAS,KAAK;AAAA,MACrB,WAAW;AAAA,QACT;AAAA,QACA,YAAY,IAAI;AAAA,QAChB;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var level_journey_list_exports = {};
|
|
20
|
+
__export(level_journey_list_exports, {
|
|
21
|
+
LevelJourneyList: () => LevelJourneyList
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(level_journey_list_exports);
|
|
24
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
+
var import_cn = require("../../utils/cn.js");
|
|
26
|
+
function LevelJourneyList({ levels, className }) {
|
|
27
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: (0, import_cn.cn)("divide-y divide-foreground/[0.06]", className), children: levels.map((l, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "flex items-start gap-4 py-4", children: [
|
|
28
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-1.5 w-8 shrink-0 pt-0.5", children: [
|
|
29
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs font-bold text-foreground/30 tabular-nums", children: l.level }),
|
|
30
|
+
(i + 1) % 10 === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
31
|
+
"span",
|
|
32
|
+
{
|
|
33
|
+
"aria-hidden": true,
|
|
34
|
+
className: "h-1.5 w-1.5 rounded-full bg-gradient-to-r from-brand-orange to-brand-maeve"
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }),
|
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
39
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-base font-bold", children: l.name }),
|
|
40
|
+
l.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-foreground/60 mt-0.5 leading-relaxed", children: l.description })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-sm font-black tabular-nums text-foreground/70 shrink-0", children: [
|
|
43
|
+
l.xpRequired.toLocaleString(),
|
|
44
|
+
" XP"
|
|
45
|
+
] })
|
|
46
|
+
] }, l.level)) });
|
|
47
|
+
}
|
|
48
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
49
|
+
0 && (module.exports = {
|
|
50
|
+
LevelJourneyList
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=level-journey-list.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/level-journey-list.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelJourneyListLevel {\n level: number;\n name: string;\n xpRequired: number;\n description: string | null;\n}\n\nexport interface LevelJourneyListProps {\n levels: LevelJourneyListLevel[];\n className?: string;\n}\n\n/** The full level ladder as a vertical showcase list — not the old\n * horizontal chip rail, which doesn't scale past a handful of items and\n * was built for a dashboard strip, not a 50-row standalone page. No\n * current-level state: this is the system-wide view, not \"where am I.\"\n * Every 10th level gets a small gradient marker as a milestone cue;\n * colors are otherwise uniform (one signature identity, not 50 flat\n * per-level colors) — badgeColor is deliberately not consumed here. */\nexport function LevelJourneyList({ levels, className }: LevelJourneyListProps) {\n return (\n <ol className={cn(\"divide-y divide-foreground/[0.06]\", className)}>\n {levels.map((l, i) => (\n <li key={l.level} className=\"flex items-start gap-4 py-4\">\n <span className=\"flex items-center gap-1.5 w-8 shrink-0 pt-0.5\">\n <span className=\"text-xs font-bold text-foreground/30 tabular-nums\">{l.level}</span>\n {(i + 1) % 10 === 0 && (\n <span\n aria-hidden\n className=\"h-1.5 w-1.5 rounded-full bg-gradient-to-r from-brand-orange to-brand-maeve\"\n />\n )}\n </span>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-base font-bold\">{l.name}</p>\n {l.description && (\n <p className=\"text-sm text-foreground/60 mt-0.5 leading-relaxed\">{l.description}</p>\n )}\n </div>\n <span className=\"text-sm font-black tabular-nums text-foreground/70 shrink-0\">\n {l.xpRequired.toLocaleString()} XP\n </span>\n </li>\n ))}\n </ol>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BU;AA1BV,gBAAmB;AAqBZ,SAAS,iBAAiB,EAAE,QAAQ,UAAU,GAA0B;AAC7E,SACE,4CAAC,QAAG,eAAW,cAAG,qCAAqC,SAAS,GAC7D,iBAAO,IAAI,CAAC,GAAG,MACd,6CAAC,QAAiB,WAAU,+BAC1B;AAAA,iDAAC,UAAK,WAAU,iDACd;AAAA,kDAAC,UAAK,WAAU,qDAAqD,YAAE,OAAM;AAAA,OAC3E,IAAI,KAAK,OAAO,KAChB;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,UACX,WAAU;AAAA;AAAA,MACZ;AAAA,OAEJ;AAAA,IACA,6CAAC,SAAI,WAAU,kBACb;AAAA,kDAAC,OAAE,WAAU,uBAAuB,YAAE,MAAK;AAAA,MAC1C,EAAE,eACD,4CAAC,OAAE,WAAU,qDAAqD,YAAE,aAAY;AAAA,OAEpF;AAAA,IACA,6CAAC,UAAK,WAAU,+DACb;AAAA,QAAE,WAAW,eAAe;AAAA,MAAE;AAAA,OACjC;AAAA,OAlBO,EAAE,KAmBX,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface LevelJourneyListLevel {
|
|
4
|
+
level: number;
|
|
5
|
+
name: string;
|
|
6
|
+
xpRequired: number;
|
|
7
|
+
description: string | null;
|
|
8
|
+
}
|
|
9
|
+
interface LevelJourneyListProps {
|
|
10
|
+
levels: LevelJourneyListLevel[];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/** The full level ladder as a vertical showcase list — not the old
|
|
14
|
+
* horizontal chip rail, which doesn't scale past a handful of items and
|
|
15
|
+
* was built for a dashboard strip, not a 50-row standalone page. No
|
|
16
|
+
* current-level state: this is the system-wide view, not "where am I."
|
|
17
|
+
* Every 10th level gets a small gradient marker as a milestone cue;
|
|
18
|
+
* colors are otherwise uniform (one signature identity, not 50 flat
|
|
19
|
+
* per-level colors) — badgeColor is deliberately not consumed here. */
|
|
20
|
+
declare function LevelJourneyList({ levels, className }: LevelJourneyListProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { LevelJourneyList, type LevelJourneyListLevel, type LevelJourneyListProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface LevelJourneyListLevel {
|
|
4
|
+
level: number;
|
|
5
|
+
name: string;
|
|
6
|
+
xpRequired: number;
|
|
7
|
+
description: string | null;
|
|
8
|
+
}
|
|
9
|
+
interface LevelJourneyListProps {
|
|
10
|
+
levels: LevelJourneyListLevel[];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/** The full level ladder as a vertical showcase list — not the old
|
|
14
|
+
* horizontal chip rail, which doesn't scale past a handful of items and
|
|
15
|
+
* was built for a dashboard strip, not a 50-row standalone page. No
|
|
16
|
+
* current-level state: this is the system-wide view, not "where am I."
|
|
17
|
+
* Every 10th level gets a small gradient marker as a milestone cue;
|
|
18
|
+
* colors are otherwise uniform (one signature identity, not 50 flat
|
|
19
|
+
* per-level colors) — badgeColor is deliberately not consumed here. */
|
|
20
|
+
declare function LevelJourneyList({ levels, className }: LevelJourneyListProps): react_jsx_runtime.JSX.Element;
|
|
21
|
+
|
|
22
|
+
export { LevelJourneyList, type LevelJourneyListLevel, type LevelJourneyListProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../utils/cn.js";
|
|
3
|
+
function LevelJourneyList({ levels, className }) {
|
|
4
|
+
return /* @__PURE__ */ jsx("ol", { className: cn("divide-y divide-foreground/[0.06]", className), children: levels.map((l, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-4 py-4", children: [
|
|
5
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5 w-8 shrink-0 pt-0.5", children: [
|
|
6
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-bold text-foreground/30 tabular-nums", children: l.level }),
|
|
7
|
+
(i + 1) % 10 === 0 && /* @__PURE__ */ jsx(
|
|
8
|
+
"span",
|
|
9
|
+
{
|
|
10
|
+
"aria-hidden": true,
|
|
11
|
+
className: "h-1.5 w-1.5 rounded-full bg-gradient-to-r from-brand-orange to-brand-maeve"
|
|
12
|
+
}
|
|
13
|
+
)
|
|
14
|
+
] }),
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("p", { className: "text-base font-bold", children: l.name }),
|
|
17
|
+
l.description && /* @__PURE__ */ jsx("p", { className: "text-sm text-foreground/60 mt-0.5 leading-relaxed", children: l.description })
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("span", { className: "text-sm font-black tabular-nums text-foreground/70 shrink-0", children: [
|
|
20
|
+
l.xpRequired.toLocaleString(),
|
|
21
|
+
" XP"
|
|
22
|
+
] })
|
|
23
|
+
] }, l.level)) });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
LevelJourneyList
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=level-journey-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/level-journey-list.tsx"],"sourcesContent":["import { cn } from \"../../utils/cn.js\";\n\nexport interface LevelJourneyListLevel {\n level: number;\n name: string;\n xpRequired: number;\n description: string | null;\n}\n\nexport interface LevelJourneyListProps {\n levels: LevelJourneyListLevel[];\n className?: string;\n}\n\n/** The full level ladder as a vertical showcase list — not the old\n * horizontal chip rail, which doesn't scale past a handful of items and\n * was built for a dashboard strip, not a 50-row standalone page. No\n * current-level state: this is the system-wide view, not \"where am I.\"\n * Every 10th level gets a small gradient marker as a milestone cue;\n * colors are otherwise uniform (one signature identity, not 50 flat\n * per-level colors) — badgeColor is deliberately not consumed here. */\nexport function LevelJourneyList({ levels, className }: LevelJourneyListProps) {\n return (\n <ol className={cn(\"divide-y divide-foreground/[0.06]\", className)}>\n {levels.map((l, i) => (\n <li key={l.level} className=\"flex items-start gap-4 py-4\">\n <span className=\"flex items-center gap-1.5 w-8 shrink-0 pt-0.5\">\n <span className=\"text-xs font-bold text-foreground/30 tabular-nums\">{l.level}</span>\n {(i + 1) % 10 === 0 && (\n <span\n aria-hidden\n className=\"h-1.5 w-1.5 rounded-full bg-gradient-to-r from-brand-orange to-brand-maeve\"\n />\n )}\n </span>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-base font-bold\">{l.name}</p>\n {l.description && (\n <p className=\"text-sm text-foreground/60 mt-0.5 leading-relaxed\">{l.description}</p>\n )}\n </div>\n <span className=\"text-sm font-black tabular-nums text-foreground/70 shrink-0\">\n {l.xpRequired.toLocaleString()} XP\n </span>\n </li>\n ))}\n </ol>\n );\n}\n"],"mappings":"AA0BU,SACE,KADF;AA1BV,SAAS,UAAU;AAqBZ,SAAS,iBAAiB,EAAE,QAAQ,UAAU,GAA0B;AAC7E,SACE,oBAAC,QAAG,WAAW,GAAG,qCAAqC,SAAS,GAC7D,iBAAO,IAAI,CAAC,GAAG,MACd,qBAAC,QAAiB,WAAU,+BAC1B;AAAA,yBAAC,UAAK,WAAU,iDACd;AAAA,0BAAC,UAAK,WAAU,qDAAqD,YAAE,OAAM;AAAA,OAC3E,IAAI,KAAK,OAAO,KAChB;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,UACX,WAAU;AAAA;AAAA,MACZ;AAAA,OAEJ;AAAA,IACA,qBAAC,SAAI,WAAU,kBACb;AAAA,0BAAC,OAAE,WAAU,uBAAuB,YAAE,MAAK;AAAA,MAC1C,EAAE,eACD,oBAAC,OAAE,WAAU,qDAAqD,YAAE,aAAY;AAAA,OAEpF;AAAA,IACA,qBAAC,UAAK,WAAU,+DACb;AAAA,QAAE,WAAW,eAAe;AAAA,MAAE;AAAA,OACjC;AAAA,OAlBO,EAAE,KAmBX,CACD,GACH;AAEJ;","names":[]}
|