@medialane/ui 0.376.0 → 0.378.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/action-button.cjs +5 -3
- package/dist/components/action-button.cjs.map +1 -1
- package/dist/components/action-button.d.cts +3 -1
- package/dist/components/action-button.d.ts +3 -1
- package/dist/components/action-button.js +5 -3
- package/dist/components/action-button.js.map +1 -1
- package/dist/components/asset-marketplace-panel.cjs +1 -1
- package/dist/components/asset-marketplace-panel.cjs.map +1 -1
- package/dist/components/asset-marketplace-panel.js +1 -1
- package/dist/components/asset-marketplace-panel.js.map +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.cjs.map +1 -1
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/badge.js.map +1 -1
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/button.js.map +1 -1
- package/dist/components/discover-feed-section.cjs +2 -52
- package/dist/components/discover-feed-section.cjs.map +1 -1
- package/dist/components/discover-feed-section.d.cts +2 -15
- package/dist/components/discover-feed-section.d.ts +2 -15
- package/dist/components/discover-feed-section.js +2 -51
- package/dist/components/discover-feed-section.js.map +1 -1
- package/dist/components/ip-type-badge.cjs +2 -3
- package/dist/components/ip-type-badge.cjs.map +1 -1
- package/dist/components/ip-type-badge.js +2 -3
- package/dist/components/ip-type-badge.js.map +1 -1
- package/dist/components/panel.cjs +2 -2
- package/dist/components/panel.cjs.map +1 -1
- package/dist/components/panel.js +2 -2
- package/dist/components/panel.js.map +1 -1
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.cjs.map +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/sheet.js.map +1 -1
- package/dist/i18n/catalog/pt.cjs +0 -4
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +0 -4
- package/dist/i18n/catalog/pt.js.map +1 -1
- package/dist/index.cjs +0 -33
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -10
- package/dist/index.d.ts +1 -10
- package/dist/index.js +1 -22
- package/dist/index.js.map +1 -1
- package/dist/medialane.css +15 -112
- package/dist/preset/tailwind.cjs +0 -10
- package/dist/preset/tailwind.cjs.map +1 -1
- package/dist/preset/tailwind.js +0 -10
- package/dist/preset/tailwind.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/activity-feed-shell.cjs +0 -93
- package/dist/components/activity-feed-shell.cjs.map +0 -1
- package/dist/components/activity-feed-shell.d.cts +0 -13
- package/dist/components/activity-feed-shell.d.ts +0 -13
- package/dist/components/activity-feed-shell.js +0 -59
- package/dist/components/activity-feed-shell.js.map +0 -1
- package/dist/components/cta-card-grid.cjs +0 -69
- package/dist/components/cta-card-grid.cjs.map +0 -1
- package/dist/components/cta-card-grid.d.cts +0 -21
- package/dist/components/cta-card-grid.d.ts +0 -21
- package/dist/components/cta-card-grid.js +0 -35
- package/dist/components/cta-card-grid.js.map +0 -1
- package/dist/components/featured-carousel.cjs +0 -171
- package/dist/components/featured-carousel.cjs.map +0 -1
- package/dist/components/featured-carousel.d.cts +0 -13
- package/dist/components/featured-carousel.d.ts +0 -13
- package/dist/components/featured-carousel.js +0 -146
- package/dist/components/featured-carousel.js.map +0 -1
- package/dist/components/launchpad-cta-banner.cjs +0 -85
- package/dist/components/launchpad-cta-banner.cjs.map +0 -1
- package/dist/components/launchpad-cta-banner.d.cts +0 -15
- package/dist/components/launchpad-cta-banner.d.ts +0 -15
- package/dist/components/launchpad-cta-banner.js +0 -51
- package/dist/components/launchpad-cta-banner.js.map +0 -1
- package/dist/components/portfolio-section.cjs +0 -90
- package/dist/components/portfolio-section.cjs.map +0 -1
- package/dist/components/portfolio-section.d.cts +0 -14
- package/dist/components/portfolio-section.d.ts +0 -14
- package/dist/components/portfolio-section.js +0 -56
- package/dist/components/portfolio-section.js.map +0 -1
- package/dist/components/rewards/journey-path.cjs +0 -77
- package/dist/components/rewards/journey-path.cjs.map +0 -1
- package/dist/components/rewards/journey-path.d.cts +0 -17
- package/dist/components/rewards/journey-path.d.ts +0 -17
- package/dist/components/rewards/journey-path.js +0 -53
- package/dist/components/rewards/journey-path.js.map +0 -1
- package/dist/components/rewards/score-summary-card.cjs +0 -73
- package/dist/components/rewards/score-summary-card.cjs.map +0 -1
- package/dist/components/rewards/score-summary-card.d.cts +0 -21
- package/dist/components/rewards/score-summary-card.d.ts +0 -21
- package/dist/components/rewards/score-summary-card.js +0 -49
- package/dist/components/rewards/score-summary-card.js.map +0 -1
- package/dist/components/step-nav.cjs +0 -82
- package/dist/components/step-nav.cjs.map +0 -1
- package/dist/components/step-nav.d.cts +0 -17
- package/dist/components/step-nav.d.ts +0 -17
- package/dist/components/step-nav.js +0 -58
- package/dist/components/step-nav.js.map +0 -1
- package/dist/components/token-glyph.cjs +0 -92
- package/dist/components/token-glyph.cjs.map +0 -1
- package/dist/components/token-glyph.d.cts +0 -19
- package/dist/components/token-glyph.d.ts +0 -19
- package/dist/components/token-glyph.js +0 -67
- package/dist/components/token-glyph.js.map +0 -1
|
@@ -1,77 +0,0 @@
|
|
|
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 journey_path_exports = {};
|
|
20
|
-
__export(journey_path_exports, {
|
|
21
|
-
JourneyPath: () => JourneyPath
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(journey_path_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_cn = require("../../utils/cn.js");
|
|
26
|
-
function stateFor(step, index, steps, breakdown) {
|
|
27
|
-
if ((breakdown[step.actionType] ?? 0) > 0) return "done";
|
|
28
|
-
const firstNotDone = steps.findIndex((s) => (breakdown[s.actionType] ?? 0) <= 0);
|
|
29
|
-
return index === firstNotDone ? "current" : "upcoming";
|
|
30
|
-
}
|
|
31
|
-
function JourneyPath({ steps, breakdown = {}, className }) {
|
|
32
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: (0, import_cn.cn)("flex flex-col gap-1", className), children: steps.map((step, i) => {
|
|
33
|
-
const state = stateFor(step, i, steps, breakdown);
|
|
34
|
-
const Icon = step.icon;
|
|
35
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "relative flex items-center gap-3", children: [
|
|
36
|
-
i < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
37
|
-
"span",
|
|
38
|
-
{
|
|
39
|
-
"aria-hidden": true,
|
|
40
|
-
className: (0, import_cn.cn)(
|
|
41
|
-
"absolute left-[21px] top-11 h-[calc(100%-8px)] w-px",
|
|
42
|
-
state === "done" ? "bg-brand-rose/50" : "bg-border"
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
),
|
|
46
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
47
|
-
"a",
|
|
48
|
-
{
|
|
49
|
-
href: step.href,
|
|
50
|
-
className: (0, import_cn.cn)(
|
|
51
|
-
"flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
52
|
-
state === "done" && "border-brand-rose/40 bg-brand-rose/15 text-brand-rose",
|
|
53
|
-
state === "current" && "border-brand-orange/60 bg-brand-orange/10 text-brand-orange",
|
|
54
|
-
state === "upcoming" && "border-border text-muted-foreground/50"
|
|
55
|
-
),
|
|
56
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-3.5 w-3.5" })
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
-
"a",
|
|
61
|
-
{
|
|
62
|
-
href: step.href,
|
|
63
|
-
className: (0, import_cn.cn)(
|
|
64
|
-
"flex-1 rounded-lg py-1.5 text-sm font-semibold transition-colors hover:text-foreground",
|
|
65
|
-
state === "upcoming" ? "text-muted-foreground/60" : "text-foreground"
|
|
66
|
-
),
|
|
67
|
-
children: step.label
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
] }, step.actionType);
|
|
71
|
-
}) });
|
|
72
|
-
}
|
|
73
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
74
|
-
0 && (module.exports = {
|
|
75
|
-
JourneyPath
|
|
76
|
-
});
|
|
77
|
-
//# sourceMappingURL=journey-path.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/journey-path.tsx"],"sourcesContent":["import type { ElementType } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport interface JourneyStep {\n\n actionType: string;\n label: string;\n href: string;\n icon: ElementType;\n}\n\nexport interface JourneyPathProps {\n steps: JourneyStep[];\n\n breakdown?: Record<string, number>;\n className?: string;\n}\n\ntype StepState = \"done\" | \"current\" | \"upcoming\";\n\nfunction stateFor(step: JourneyStep, index: number, steps: JourneyStep[], breakdown: Record<string, number>): StepState {\n if ((breakdown[step.actionType] ?? 0) > 0) return \"done\";\n const firstNotDone = steps.findIndex((s) => (breakdown[s.actionType] ?? 0) <= 0);\n return index === firstNotDone ? \"current\" : \"upcoming\";\n}\n\nexport function JourneyPath({ steps, breakdown = {}, className }: JourneyPathProps) {\n return (\n <ol className={cn(\"flex flex-col gap-1\", className)}>\n {steps.map((step, i) => {\n const state = stateFor(step, i, steps, breakdown);\n const Icon = step.icon;\n return (\n <li key={step.actionType} className=\"relative flex items-center gap-3\">\n {i < steps.length - 1 && (\n <span\n aria-hidden\n className={cn(\n \"absolute left-[21px] top-11 h-[calc(100%-8px)] w-px\",\n state === \"done\" ? \"bg-brand-rose/50\" : \"bg-border\"\n )}\n />\n )}\n <a\n href={step.href}\n className={cn(\n \"flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-full border transition-colors\",\n state === \"done\" && \"border-brand-rose/40 bg-brand-rose/15 text-brand-rose\",\n state === \"current\" && \"border-brand-orange/60 bg-brand-orange/10 text-brand-orange\",\n state === \"upcoming\" && \"border-border text-muted-foreground/50\"\n )}\n >\n <Icon className=\"h-3.5 w-3.5\" />\n </a>\n <a\n href={step.href}\n className={cn(\n \"flex-1 rounded-lg py-1.5 text-sm font-semibold transition-colors hover:text-foreground\",\n state === \"upcoming\" ? \"text-muted-foreground/60\" : \"text-foreground\"\n )}\n >\n {step.label}\n </a>\n </li>\n );\n })}\n </ol>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiCU;AAhCV,gBAAmB;AAmBnB,SAAS,SAAS,MAAmB,OAAe,OAAsB,WAA8C;AACtH,OAAK,UAAU,KAAK,UAAU,KAAK,KAAK,EAAG,QAAO;AAClD,QAAM,eAAe,MAAM,UAAU,CAAC,OAAO,UAAU,EAAE,UAAU,KAAK,MAAM,CAAC;AAC/E,SAAO,UAAU,eAAe,YAAY;AAC9C;AAEO,SAAS,YAAY,EAAE,OAAO,YAAY,CAAC,GAAG,UAAU,GAAqB;AAClF,SACE,4CAAC,QAAG,eAAW,cAAG,uBAAuB,SAAS,GAC/C,gBAAM,IAAI,CAAC,MAAM,MAAM;AACtB,UAAM,QAAQ,SAAS,MAAM,GAAG,OAAO,SAAS;AAChD,UAAM,OAAO,KAAK;AAClB,WACE,6CAAC,QAAyB,WAAU,oCACjC;AAAA,UAAI,MAAM,SAAS,KAClB;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,UACX,eAAW;AAAA,YACT;AAAA,YACA,UAAU,SAAS,qBAAqB;AAAA,UAC1C;AAAA;AAAA,MACF;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,KAAK;AAAA,UACX,eAAW;AAAA,YACT;AAAA,YACA,UAAU,UAAU;AAAA,YACpB,UAAU,aAAa;AAAA,YACvB,UAAU,cAAc;AAAA,UAC1B;AAAA,UAEA,sDAAC,QAAK,WAAU,eAAc;AAAA;AAAA,MAChC;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,KAAK;AAAA,UACX,eAAW;AAAA,YACT;AAAA,YACA,UAAU,aAAa,6BAA6B;AAAA,UACtD;AAAA,UAEC,eAAK;AAAA;AAAA,MACR;AAAA,SA7BO,KAAK,UA8Bd;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
|
-
|
|
4
|
-
interface JourneyStep {
|
|
5
|
-
actionType: string;
|
|
6
|
-
label: string;
|
|
7
|
-
href: string;
|
|
8
|
-
icon: ElementType;
|
|
9
|
-
}
|
|
10
|
-
interface JourneyPathProps {
|
|
11
|
-
steps: JourneyStep[];
|
|
12
|
-
breakdown?: Record<string, number>;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function JourneyPath({ steps, breakdown, className }: JourneyPathProps): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { JourneyPath, type JourneyPathProps, type JourneyStep };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ElementType } from 'react';
|
|
3
|
-
|
|
4
|
-
interface JourneyStep {
|
|
5
|
-
actionType: string;
|
|
6
|
-
label: string;
|
|
7
|
-
href: string;
|
|
8
|
-
icon: ElementType;
|
|
9
|
-
}
|
|
10
|
-
interface JourneyPathProps {
|
|
11
|
-
steps: JourneyStep[];
|
|
12
|
-
breakdown?: Record<string, number>;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function JourneyPath({ steps, breakdown, className }: JourneyPathProps): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { JourneyPath, type JourneyPathProps, type JourneyStep };
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../utils/cn.js";
|
|
3
|
-
function stateFor(step, index, steps, breakdown) {
|
|
4
|
-
if ((breakdown[step.actionType] ?? 0) > 0) return "done";
|
|
5
|
-
const firstNotDone = steps.findIndex((s) => (breakdown[s.actionType] ?? 0) <= 0);
|
|
6
|
-
return index === firstNotDone ? "current" : "upcoming";
|
|
7
|
-
}
|
|
8
|
-
function JourneyPath({ steps, breakdown = {}, className }) {
|
|
9
|
-
return /* @__PURE__ */ jsx("ol", { className: cn("flex flex-col gap-1", className), children: steps.map((step, i) => {
|
|
10
|
-
const state = stateFor(step, i, steps, breakdown);
|
|
11
|
-
const Icon = step.icon;
|
|
12
|
-
return /* @__PURE__ */ jsxs("li", { className: "relative flex items-center gap-3", children: [
|
|
13
|
-
i < steps.length - 1 && /* @__PURE__ */ jsx(
|
|
14
|
-
"span",
|
|
15
|
-
{
|
|
16
|
-
"aria-hidden": true,
|
|
17
|
-
className: cn(
|
|
18
|
-
"absolute left-[21px] top-11 h-[calc(100%-8px)] w-px",
|
|
19
|
-
state === "done" ? "bg-brand-rose/50" : "bg-border"
|
|
20
|
-
)
|
|
21
|
-
}
|
|
22
|
-
),
|
|
23
|
-
/* @__PURE__ */ jsx(
|
|
24
|
-
"a",
|
|
25
|
-
{
|
|
26
|
-
href: step.href,
|
|
27
|
-
className: cn(
|
|
28
|
-
"flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-full border transition-colors",
|
|
29
|
-
state === "done" && "border-brand-rose/40 bg-brand-rose/15 text-brand-rose",
|
|
30
|
-
state === "current" && "border-brand-orange/60 bg-brand-orange/10 text-brand-orange",
|
|
31
|
-
state === "upcoming" && "border-border text-muted-foreground/50"
|
|
32
|
-
),
|
|
33
|
-
children: /* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5" })
|
|
34
|
-
}
|
|
35
|
-
),
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
"a",
|
|
38
|
-
{
|
|
39
|
-
href: step.href,
|
|
40
|
-
className: cn(
|
|
41
|
-
"flex-1 rounded-lg py-1.5 text-sm font-semibold transition-colors hover:text-foreground",
|
|
42
|
-
state === "upcoming" ? "text-muted-foreground/60" : "text-foreground"
|
|
43
|
-
),
|
|
44
|
-
children: step.label
|
|
45
|
-
}
|
|
46
|
-
)
|
|
47
|
-
] }, step.actionType);
|
|
48
|
-
}) });
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
JourneyPath
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=journey-path.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/journey-path.tsx"],"sourcesContent":["import type { ElementType } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\n\nexport interface JourneyStep {\n\n actionType: string;\n label: string;\n href: string;\n icon: ElementType;\n}\n\nexport interface JourneyPathProps {\n steps: JourneyStep[];\n\n breakdown?: Record<string, number>;\n className?: string;\n}\n\ntype StepState = \"done\" | \"current\" | \"upcoming\";\n\nfunction stateFor(step: JourneyStep, index: number, steps: JourneyStep[], breakdown: Record<string, number>): StepState {\n if ((breakdown[step.actionType] ?? 0) > 0) return \"done\";\n const firstNotDone = steps.findIndex((s) => (breakdown[s.actionType] ?? 0) <= 0);\n return index === firstNotDone ? \"current\" : \"upcoming\";\n}\n\nexport function JourneyPath({ steps, breakdown = {}, className }: JourneyPathProps) {\n return (\n <ol className={cn(\"flex flex-col gap-1\", className)}>\n {steps.map((step, i) => {\n const state = stateFor(step, i, steps, breakdown);\n const Icon = step.icon;\n return (\n <li key={step.actionType} className=\"relative flex items-center gap-3\">\n {i < steps.length - 1 && (\n <span\n aria-hidden\n className={cn(\n \"absolute left-[21px] top-11 h-[calc(100%-8px)] w-px\",\n state === \"done\" ? \"bg-brand-rose/50\" : \"bg-border\"\n )}\n />\n )}\n <a\n href={step.href}\n className={cn(\n \"flex min-h-11 min-w-11 shrink-0 items-center justify-center rounded-full border transition-colors\",\n state === \"done\" && \"border-brand-rose/40 bg-brand-rose/15 text-brand-rose\",\n state === \"current\" && \"border-brand-orange/60 bg-brand-orange/10 text-brand-orange\",\n state === \"upcoming\" && \"border-border text-muted-foreground/50\"\n )}\n >\n <Icon className=\"h-3.5 w-3.5\" />\n </a>\n <a\n href={step.href}\n className={cn(\n \"flex-1 rounded-lg py-1.5 text-sm font-semibold transition-colors hover:text-foreground\",\n state === \"upcoming\" ? \"text-muted-foreground/60\" : \"text-foreground\"\n )}\n >\n {step.label}\n </a>\n </li>\n );\n })}\n </ol>\n );\n}\n"],"mappings":"AAiCU,SAEI,KAFJ;AAhCV,SAAS,UAAU;AAmBnB,SAAS,SAAS,MAAmB,OAAe,OAAsB,WAA8C;AACtH,OAAK,UAAU,KAAK,UAAU,KAAK,KAAK,EAAG,QAAO;AAClD,QAAM,eAAe,MAAM,UAAU,CAAC,OAAO,UAAU,EAAE,UAAU,KAAK,MAAM,CAAC;AAC/E,SAAO,UAAU,eAAe,YAAY;AAC9C;AAEO,SAAS,YAAY,EAAE,OAAO,YAAY,CAAC,GAAG,UAAU,GAAqB;AAClF,SACE,oBAAC,QAAG,WAAW,GAAG,uBAAuB,SAAS,GAC/C,gBAAM,IAAI,CAAC,MAAM,MAAM;AACtB,UAAM,QAAQ,SAAS,MAAM,GAAG,OAAO,SAAS;AAChD,UAAM,OAAO,KAAK;AAClB,WACE,qBAAC,QAAyB,WAAU,oCACjC;AAAA,UAAI,MAAM,SAAS,KAClB;AAAA,QAAC;AAAA;AAAA,UACC,eAAW;AAAA,UACX,WAAW;AAAA,YACT;AAAA,YACA,UAAU,SAAS,qBAAqB;AAAA,UAC1C;AAAA;AAAA,MACF;AAAA,MAEF;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,KAAK;AAAA,UACX,WAAW;AAAA,YACT;AAAA,YACA,UAAU,UAAU;AAAA,YACpB,UAAU,aAAa;AAAA,YACvB,UAAU,cAAc;AAAA,UAC1B;AAAA,UAEA,8BAAC,QAAK,WAAU,eAAc;AAAA;AAAA,MAChC;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,MAAM,KAAK;AAAA,UACX,WAAW;AAAA,YACT;AAAA,YACA,UAAU,aAAa,6BAA6B;AAAA,UACtD;AAAA,UAEC,eAAK;AAAA;AAAA,MACR;AAAA,SA7BO,KAAK,UA8Bd;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
var score_summary_card_exports = {};
|
|
21
|
-
__export(score_summary_card_exports, {
|
|
22
|
-
ScoreSummaryCard: () => ScoreSummaryCard
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(score_summary_card_exports);
|
|
25
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
-
var import_cn = require("../../utils/cn.js");
|
|
27
|
-
var import_badge_shelf = require("./badge-shelf.js");
|
|
28
|
-
var import_provider = require("../../i18n/provider.js");
|
|
29
|
-
var import_use_format = require("../../i18n/use-format.js");
|
|
30
|
-
function ScoreSummaryCard({
|
|
31
|
-
level,
|
|
32
|
-
levelName,
|
|
33
|
-
badgeColor,
|
|
34
|
-
totalXp,
|
|
35
|
-
nextLevel,
|
|
36
|
-
topBadges,
|
|
37
|
-
href,
|
|
38
|
-
className
|
|
39
|
-
}) {
|
|
40
|
-
const intl = (0, import_use_format.useFormat)();
|
|
41
|
-
const t = (0, import_provider.useT)();
|
|
42
|
-
const body = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("rounded-xl border border-border bg-card p-4 sm:p-5 space-y-4", className), children: [
|
|
43
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-4", children: [
|
|
44
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
45
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
className: "h-12 w-12 rounded-xl shrink-0 flex items-center justify-center text-xl font-black text-white",
|
|
49
|
-
style: { backgroundColor: badgeColor },
|
|
50
|
-
children: level
|
|
51
|
-
}
|
|
52
|
-
),
|
|
53
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
|
|
54
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-bold leading-tight text-foreground truncate", children: levelName }),
|
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("Level {level}", { level }) })
|
|
56
|
-
] })
|
|
57
|
-
] }),
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-right shrink-0", children: [
|
|
59
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xl font-black text-foreground tabular-nums", children: intl.number(totalXp) }),
|
|
60
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs uppercase tracking-widest text-muted-foreground", children: t("XP") })
|
|
61
|
-
] })
|
|
62
|
-
] }),
|
|
63
|
-
nextLevel && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground border-t border-border/50 pt-3", children: t.rich("{value} XP to Level {level} \xB7 {name}", { value: intl.number(nextLevel.xpRequired - totalXp), level: nextLevel.level, name: nextLevel.name }) }),
|
|
64
|
-
topBadges && topBadges.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_badge_shelf.BadgeShelf, { badges: topBadges, className: !nextLevel ? "border-t border-border/50 pt-3" : void 0 })
|
|
65
|
-
] });
|
|
66
|
-
if (!href) return body;
|
|
67
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href, className: "block active:opacity-80", children: body });
|
|
68
|
-
}
|
|
69
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
-
0 && (module.exports = {
|
|
71
|
-
ScoreSummaryCard
|
|
72
|
-
});
|
|
73
|
-
//# sourceMappingURL=score-summary-card.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/score-summary-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../../utils/cn.js\";\nimport { BadgeShelf, type BadgeShelfBadge } from \"./badge-shelf.js\";\nimport { useT } from \"../../i18n/provider.js\";\nimport { useFormat } from \"../../i18n/use-format.js\";\n\nexport interface ScoreSummaryCardProps {\n level: number;\n levelName: string;\n badgeColor: string;\n totalXp: number;\n\n levelXp: number;\n nextLevel: { level: number; name: string; xpRequired: number } | null;\n\n topBadges?: BadgeShelfBadge[];\n\n href?: string;\n className?: string;\n}\n\nexport function ScoreSummaryCard({\n level,\n levelName,\n badgeColor,\n totalXp,\n nextLevel,\n topBadges,\n href,\n className,\n}: ScoreSummaryCardProps) {\n const intl = useFormat();\n const t = useT();\n const body = (\n <div className={cn(\"rounded-xl border border-border bg-card p-4 sm:p-5 space-y-4\", className)}>\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div\n className=\"h-12 w-12 rounded-xl shrink-0 flex items-center justify-center text-xl font-black text-white\"\n style={{ backgroundColor: badgeColor }}\n >\n {level}\n </div>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold leading-tight text-foreground truncate\">{levelName}</p>\n <p className=\"text-xs text-muted-foreground\">{t(\"Level {level}\", { level })}</p>\n </div>\n </div>\n <div className=\"text-right shrink-0\">\n <p className=\"text-2xl font-black text-foreground tabular-nums\">{intl.number(totalXp)}</p>\n <p className=\"text-xs uppercase tracking-widest text-muted-foreground\">{t(\"XP\")}</p>\n </div>\n </div>\n {nextLevel && (\n <p className=\"text-xs text-muted-foreground border-t border-border/50 pt-3\">\n {t.rich(\"{value} XP to Level {level} · {name}\", { value: intl.number((nextLevel.xpRequired - totalXp)), level: nextLevel.level, name: nextLevel.name })}\n </p>\n )}\n {topBadges && topBadges.length > 0 && (\n <BadgeShelf badges={topBadges} className={!nextLevel ? \"border-t border-border/50 pt-3\" : undefined} />\n )}\n </div>\n );\n\n if (!href) return body;\n return (\n <a href={href} className=\"block active:opacity-80\">\n {body}\n </a>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsCU;AApCV,gBAAmB;AACnB,yBAAiD;AACjD,sBAAqB;AACrB,wBAA0B;AAiBnB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,QAAM,WAAO,6BAAU;AACvB,QAAM,QAAI,sBAAK;AACf,QAAM,OACJ,6CAAC,SAAI,eAAW,cAAG,gEAAgE,SAAS,GAC1F;AAAA,iDAAC,SAAI,WAAU,2CACb;AAAA,mDAAC,SAAI,WAAU,mCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,iBAAiB,WAAW;AAAA,YAEpC;AAAA;AAAA,QACH;AAAA,QACA,6CAAC,SAAI,WAAU,WACb;AAAA,sDAAC,OAAE,WAAU,4DAA4D,qBAAU;AAAA,UACnF,4CAAC,OAAE,WAAU,iCAAiC,YAAE,iBAAiB,EAAE,MAAM,CAAC,GAAE;AAAA,WAC9E;AAAA,SACF;AAAA,MACA,6CAAC,SAAI,WAAU,uBACb;AAAA,oDAAC,OAAE,WAAU,oDAAoD,eAAK,OAAO,OAAO,GAAE;AAAA,QACtF,4CAAC,OAAE,WAAU,2DAA2D,YAAE,IAAI,GAAE;AAAA,SAClF;AAAA,OACF;AAAA,IACC,aACC,4CAAC,OAAE,WAAU,gEACV,YAAE,KAAK,2CAAwC,EAAE,OAAO,KAAK,OAAQ,UAAU,aAAa,OAAQ,GAAG,OAAO,UAAU,OAAO,MAAM,UAAU,KAAK,CAAC,GACxJ;AAAA,IAED,aAAa,UAAU,SAAS,KAC/B,4CAAC,iCAAW,QAAQ,WAAW,WAAW,CAAC,YAAY,mCAAmC,QAAW;AAAA,KAEzG;AAGF,MAAI,CAAC,KAAM,QAAO;AAClB,SACE,4CAAC,OAAE,MAAY,WAAU,2BACtB,gBACH;AAEJ;","names":[]}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { BadgeShelfBadge } from './badge-shelf.cjs';
|
|
3
|
-
|
|
4
|
-
interface ScoreSummaryCardProps {
|
|
5
|
-
level: number;
|
|
6
|
-
levelName: string;
|
|
7
|
-
badgeColor: string;
|
|
8
|
-
totalXp: number;
|
|
9
|
-
levelXp: number;
|
|
10
|
-
nextLevel: {
|
|
11
|
-
level: number;
|
|
12
|
-
name: string;
|
|
13
|
-
xpRequired: number;
|
|
14
|
-
} | null;
|
|
15
|
-
topBadges?: BadgeShelfBadge[];
|
|
16
|
-
href?: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
19
|
-
declare function ScoreSummaryCard({ level, levelName, badgeColor, totalXp, nextLevel, topBadges, href, className, }: ScoreSummaryCardProps): react_jsx_runtime.JSX.Element;
|
|
20
|
-
|
|
21
|
-
export { ScoreSummaryCard, type ScoreSummaryCardProps };
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { BadgeShelfBadge } from './badge-shelf.js';
|
|
3
|
-
|
|
4
|
-
interface ScoreSummaryCardProps {
|
|
5
|
-
level: number;
|
|
6
|
-
levelName: string;
|
|
7
|
-
badgeColor: string;
|
|
8
|
-
totalXp: number;
|
|
9
|
-
levelXp: number;
|
|
10
|
-
nextLevel: {
|
|
11
|
-
level: number;
|
|
12
|
-
name: string;
|
|
13
|
-
xpRequired: number;
|
|
14
|
-
} | null;
|
|
15
|
-
topBadges?: BadgeShelfBadge[];
|
|
16
|
-
href?: string;
|
|
17
|
-
className?: string;
|
|
18
|
-
}
|
|
19
|
-
declare function ScoreSummaryCard({ level, levelName, badgeColor, totalXp, nextLevel, topBadges, href, className, }: ScoreSummaryCardProps): react_jsx_runtime.JSX.Element;
|
|
20
|
-
|
|
21
|
-
export { ScoreSummaryCard, type ScoreSummaryCardProps };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { cn } from "../../utils/cn.js";
|
|
4
|
-
import { BadgeShelf } from "./badge-shelf.js";
|
|
5
|
-
import { useT } from "../../i18n/provider.js";
|
|
6
|
-
import { useFormat } from "../../i18n/use-format.js";
|
|
7
|
-
function ScoreSummaryCard({
|
|
8
|
-
level,
|
|
9
|
-
levelName,
|
|
10
|
-
badgeColor,
|
|
11
|
-
totalXp,
|
|
12
|
-
nextLevel,
|
|
13
|
-
topBadges,
|
|
14
|
-
href,
|
|
15
|
-
className
|
|
16
|
-
}) {
|
|
17
|
-
const intl = useFormat();
|
|
18
|
-
const t = useT();
|
|
19
|
-
const body = /* @__PURE__ */ jsxs("div", { className: cn("rounded-xl border border-border bg-card p-4 sm:p-5 space-y-4", className), children: [
|
|
20
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
21
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
23
|
-
"div",
|
|
24
|
-
{
|
|
25
|
-
className: "h-12 w-12 rounded-xl shrink-0 flex items-center justify-center text-xl font-black text-white",
|
|
26
|
-
style: { backgroundColor: badgeColor },
|
|
27
|
-
children: level
|
|
28
|
-
}
|
|
29
|
-
),
|
|
30
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
31
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm font-bold leading-tight text-foreground truncate", children: levelName }),
|
|
32
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Level {level}", { level }) })
|
|
33
|
-
] })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ jsxs("div", { className: "text-right shrink-0", children: [
|
|
36
|
-
/* @__PURE__ */ jsx("p", { className: "text-2xl font-black text-foreground tabular-nums", children: intl.number(totalXp) }),
|
|
37
|
-
/* @__PURE__ */ jsx("p", { className: "text-xs uppercase tracking-widest text-muted-foreground", children: t("XP") })
|
|
38
|
-
] })
|
|
39
|
-
] }),
|
|
40
|
-
nextLevel && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground border-t border-border/50 pt-3", children: t.rich("{value} XP to Level {level} \xB7 {name}", { value: intl.number(nextLevel.xpRequired - totalXp), level: nextLevel.level, name: nextLevel.name }) }),
|
|
41
|
-
topBadges && topBadges.length > 0 && /* @__PURE__ */ jsx(BadgeShelf, { badges: topBadges, className: !nextLevel ? "border-t border-border/50 pt-3" : void 0 })
|
|
42
|
-
] });
|
|
43
|
-
if (!href) return body;
|
|
44
|
-
return /* @__PURE__ */ jsx("a", { href, className: "block active:opacity-80", children: body });
|
|
45
|
-
}
|
|
46
|
-
export {
|
|
47
|
-
ScoreSummaryCard
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=score-summary-card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/score-summary-card.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../../utils/cn.js\";\nimport { BadgeShelf, type BadgeShelfBadge } from \"./badge-shelf.js\";\nimport { useT } from \"../../i18n/provider.js\";\nimport { useFormat } from \"../../i18n/use-format.js\";\n\nexport interface ScoreSummaryCardProps {\n level: number;\n levelName: string;\n badgeColor: string;\n totalXp: number;\n\n levelXp: number;\n nextLevel: { level: number; name: string; xpRequired: number } | null;\n\n topBadges?: BadgeShelfBadge[];\n\n href?: string;\n className?: string;\n}\n\nexport function ScoreSummaryCard({\n level,\n levelName,\n badgeColor,\n totalXp,\n nextLevel,\n topBadges,\n href,\n className,\n}: ScoreSummaryCardProps) {\n const intl = useFormat();\n const t = useT();\n const body = (\n <div className={cn(\"rounded-xl border border-border bg-card p-4 sm:p-5 space-y-4\", className)}>\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex items-center gap-3 min-w-0\">\n <div\n className=\"h-12 w-12 rounded-xl shrink-0 flex items-center justify-center text-xl font-black text-white\"\n style={{ backgroundColor: badgeColor }}\n >\n {level}\n </div>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold leading-tight text-foreground truncate\">{levelName}</p>\n <p className=\"text-xs text-muted-foreground\">{t(\"Level {level}\", { level })}</p>\n </div>\n </div>\n <div className=\"text-right shrink-0\">\n <p className=\"text-2xl font-black text-foreground tabular-nums\">{intl.number(totalXp)}</p>\n <p className=\"text-xs uppercase tracking-widest text-muted-foreground\">{t(\"XP\")}</p>\n </div>\n </div>\n {nextLevel && (\n <p className=\"text-xs text-muted-foreground border-t border-border/50 pt-3\">\n {t.rich(\"{value} XP to Level {level} · {name}\", { value: intl.number((nextLevel.xpRequired - totalXp)), level: nextLevel.level, name: nextLevel.name })}\n </p>\n )}\n {topBadges && topBadges.length > 0 && (\n <BadgeShelf badges={topBadges} className={!nextLevel ? \"border-t border-border/50 pt-3\" : undefined} />\n )}\n </div>\n );\n\n if (!href) return body;\n return (\n <a href={href} className=\"block active:opacity-80\">\n {body}\n </a>\n );\n}\n"],"mappings":";AAsCU,cAMA,YANA;AApCV,SAAS,UAAU;AACnB,SAAS,kBAAwC;AACjD,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAiBnB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA0B;AACxB,QAAM,OAAO,UAAU;AACvB,QAAM,IAAI,KAAK;AACf,QAAM,OACJ,qBAAC,SAAI,WAAW,GAAG,gEAAgE,SAAS,GAC1F;AAAA,yBAAC,SAAI,WAAU,2CACb;AAAA,2BAAC,SAAI,WAAU,mCACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,iBAAiB,WAAW;AAAA,YAEpC;AAAA;AAAA,QACH;AAAA,QACA,qBAAC,SAAI,WAAU,WACb;AAAA,8BAAC,OAAE,WAAU,4DAA4D,qBAAU;AAAA,UACnF,oBAAC,OAAE,WAAU,iCAAiC,YAAE,iBAAiB,EAAE,MAAM,CAAC,GAAE;AAAA,WAC9E;AAAA,SACF;AAAA,MACA,qBAAC,SAAI,WAAU,uBACb;AAAA,4BAAC,OAAE,WAAU,oDAAoD,eAAK,OAAO,OAAO,GAAE;AAAA,QACtF,oBAAC,OAAE,WAAU,2DAA2D,YAAE,IAAI,GAAE;AAAA,SAClF;AAAA,OACF;AAAA,IACC,aACC,oBAAC,OAAE,WAAU,gEACV,YAAE,KAAK,2CAAwC,EAAE,OAAO,KAAK,OAAQ,UAAU,aAAa,OAAQ,GAAG,OAAO,UAAU,OAAO,MAAM,UAAU,KAAK,CAAC,GACxJ;AAAA,IAED,aAAa,UAAU,SAAS,KAC/B,oBAAC,cAAW,QAAQ,WAAW,WAAW,CAAC,YAAY,mCAAmC,QAAW;AAAA,KAEzG;AAGF,MAAI,CAAC,KAAM,QAAO;AAClB,SACE,oBAAC,OAAE,MAAY,WAAU,2BACtB,gBACH;AAEJ;","names":[]}
|
|
@@ -1,82 +0,0 @@
|
|
|
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 step_nav_exports = {};
|
|
20
|
-
__export(step_nav_exports, {
|
|
21
|
-
StepNav: () => StepNav
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(step_nav_exports);
|
|
24
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var import_lucide_react = require("lucide-react");
|
|
27
|
-
var import_cn = require("../utils/cn.js");
|
|
28
|
-
function StepNav({
|
|
29
|
-
steps,
|
|
30
|
-
current,
|
|
31
|
-
onStep,
|
|
32
|
-
accentText = "text-primary",
|
|
33
|
-
accentBg = "bg-primary",
|
|
34
|
-
className
|
|
35
|
-
}) {
|
|
36
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("flex items-center", className), children: steps.map((s, idx) => {
|
|
37
|
-
const n = idx + 1;
|
|
38
|
-
const done = n < current;
|
|
39
|
-
const active = n === current;
|
|
40
|
-
const reachable = s.reachable ?? n <= current;
|
|
41
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react.Fragment, { children: [
|
|
42
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
43
|
-
"button",
|
|
44
|
-
{
|
|
45
|
-
type: "button",
|
|
46
|
-
disabled: !reachable,
|
|
47
|
-
onClick: () => reachable && onStep?.(n),
|
|
48
|
-
"aria-current": active ? "step" : void 0,
|
|
49
|
-
className: (0, import_cn.cn)("flex items-center gap-2 shrink-0", reachable ? "cursor-pointer" : "cursor-default"),
|
|
50
|
-
children: [
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
52
|
-
"span",
|
|
53
|
-
{
|
|
54
|
-
className: (0, import_cn.cn)(
|
|
55
|
-
"flex h-7 w-7 items-center justify-center rounded-full text-xs font-bold transition-colors",
|
|
56
|
-
active ? (0, import_cn.cn)(accentBg, "text-white") : done ? (0, import_cn.cn)("border-2 border-current bg-transparent", accentText) : "bg-muted/40 text-muted-foreground"
|
|
57
|
-
),
|
|
58
|
-
children: done ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-3.5 w-3.5" }) : n
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
-
"span",
|
|
63
|
-
{
|
|
64
|
-
className: (0, import_cn.cn)(
|
|
65
|
-
"hidden sm:inline text-xs sm:text-sm font-semibold transition-colors",
|
|
66
|
-
active ? "text-foreground" : done ? accentText : "text-muted-foreground"
|
|
67
|
-
),
|
|
68
|
-
children: s.label
|
|
69
|
-
}
|
|
70
|
-
)
|
|
71
|
-
]
|
|
72
|
-
}
|
|
73
|
-
),
|
|
74
|
-
idx < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_cn.cn)("mx-2 sm:mx-3 h-px flex-1 min-w-3 transition-colors", done ? accentBg : "bg-border") })
|
|
75
|
-
] }, s.label);
|
|
76
|
-
}) });
|
|
77
|
-
}
|
|
78
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
79
|
-
0 && (module.exports = {
|
|
80
|
-
StepNav
|
|
81
|
-
});
|
|
82
|
-
//# sourceMappingURL=step-nav.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/step-nav.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport { Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface StepNavStep {\n label: string;\n\n reachable?: boolean;\n}\n\nexport interface StepNavProps {\n\n steps: StepNavStep[];\n\n current: number;\n\n onStep?: (step: number) => void;\n\n accentText?: string;\n\n accentBg?: string;\n className?: string;\n}\n\nexport function StepNav({\n steps,\n current,\n onStep,\n accentText = \"text-primary\",\n accentBg = \"bg-primary\",\n className,\n}: StepNavProps) {\n return (\n <div className={cn(\"flex items-center\", className)}>\n {steps.map((s, idx) => {\n const n = idx + 1;\n const done = n < current;\n const active = n === current;\n const reachable = s.reachable ?? n <= current;\n return (\n <Fragment key={s.label}>\n <button\n type=\"button\"\n disabled={!reachable}\n onClick={() => reachable && onStep?.(n)}\n aria-current={active ? \"step\" : undefined}\n className={cn(\"flex items-center gap-2 shrink-0\", reachable ? \"cursor-pointer\" : \"cursor-default\")}\n >\n <span\n className={cn(\n \"flex h-7 w-7 items-center justify-center rounded-full text-xs font-bold transition-colors\",\n active\n ? cn(accentBg, \"text-white\")\n : done\n ? cn(\"border-2 border-current bg-transparent\", accentText)\n : \"bg-muted/40 text-muted-foreground\",\n )}\n >\n {done ? <Check className=\"h-3.5 w-3.5\" /> : n}\n </span>\n <span\n className={cn(\n \"hidden sm:inline text-xs sm:text-sm font-semibold transition-colors\",\n active ? \"text-foreground\" : done ? accentText : \"text-muted-foreground\",\n )}\n >\n {s.label}\n </span>\n </button>\n {idx < steps.length - 1 && (\n <span className={cn(\"mx-2 sm:mx-3 h-px flex-1 min-w-3 transition-colors\", done ? accentBg : \"bg-border\")} />\n )}\n </Fragment>\n );\n })}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyCY;AAzCZ,mBAAyB;AACzB,0BAAsB;AACtB,gBAAmB;AAsBZ,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AACF,GAAiB;AACf,SACE,4CAAC,SAAI,eAAW,cAAG,qBAAqB,SAAS,GAC9C,gBAAM,IAAI,CAAC,GAAG,QAAQ;AACrB,UAAM,IAAI,MAAM;AAChB,UAAM,OAAO,IAAI;AACjB,UAAM,SAAS,MAAM;AACrB,UAAM,YAAY,EAAE,aAAa,KAAK;AACtC,WACE,6CAAC,yBACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,aAAa,SAAS,CAAC;AAAA,UACtC,gBAAc,SAAS,SAAS;AAAA,UAChC,eAAW,cAAG,oCAAoC,YAAY,mBAAmB,gBAAgB;AAAA,UAEjG;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAW;AAAA,kBACT;AAAA,kBACA,aACI,cAAG,UAAU,YAAY,IACzB,WACE,cAAG,0CAA0C,UAAU,IACvD;AAAA,gBACR;AAAA,gBAEC,iBAAO,4CAAC,6BAAM,WAAU,eAAc,IAAK;AAAA;AAAA,YAC9C;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAW;AAAA,kBACT;AAAA,kBACA,SAAS,oBAAoB,OAAO,aAAa;AAAA,gBACnD;AAAA,gBAEC,YAAE;AAAA;AAAA,YACL;AAAA;AAAA;AAAA,MACF;AAAA,MACC,MAAM,MAAM,SAAS,KACpB,4CAAC,UAAK,eAAW,cAAG,sDAAsD,OAAO,WAAW,WAAW,GAAG;AAAA,SA9B/F,EAAE,KAgCjB;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface StepNavStep {
|
|
4
|
-
label: string;
|
|
5
|
-
reachable?: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface StepNavProps {
|
|
8
|
-
steps: StepNavStep[];
|
|
9
|
-
current: number;
|
|
10
|
-
onStep?: (step: number) => void;
|
|
11
|
-
accentText?: string;
|
|
12
|
-
accentBg?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function StepNav({ steps, current, onStep, accentText, accentBg, className, }: StepNavProps): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { StepNav, type StepNavProps, type StepNavStep };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface StepNavStep {
|
|
4
|
-
label: string;
|
|
5
|
-
reachable?: boolean;
|
|
6
|
-
}
|
|
7
|
-
interface StepNavProps {
|
|
8
|
-
steps: StepNavStep[];
|
|
9
|
-
current: number;
|
|
10
|
-
onStep?: (step: number) => void;
|
|
11
|
-
accentText?: string;
|
|
12
|
-
accentBg?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
declare function StepNav({ steps, current, onStep, accentText, accentBg, className, }: StepNavProps): react_jsx_runtime.JSX.Element;
|
|
16
|
-
|
|
17
|
-
export { StepNav, type StepNavProps, type StepNavStep };
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Fragment } from "react";
|
|
3
|
-
import { Check } from "lucide-react";
|
|
4
|
-
import { cn } from "../utils/cn.js";
|
|
5
|
-
function StepNav({
|
|
6
|
-
steps,
|
|
7
|
-
current,
|
|
8
|
-
onStep,
|
|
9
|
-
accentText = "text-primary",
|
|
10
|
-
accentBg = "bg-primary",
|
|
11
|
-
className
|
|
12
|
-
}) {
|
|
13
|
-
return /* @__PURE__ */ jsx("div", { className: cn("flex items-center", className), children: steps.map((s, idx) => {
|
|
14
|
-
const n = idx + 1;
|
|
15
|
-
const done = n < current;
|
|
16
|
-
const active = n === current;
|
|
17
|
-
const reachable = s.reachable ?? n <= current;
|
|
18
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
|
-
/* @__PURE__ */ jsxs(
|
|
20
|
-
"button",
|
|
21
|
-
{
|
|
22
|
-
type: "button",
|
|
23
|
-
disabled: !reachable,
|
|
24
|
-
onClick: () => reachable && onStep?.(n),
|
|
25
|
-
"aria-current": active ? "step" : void 0,
|
|
26
|
-
className: cn("flex items-center gap-2 shrink-0", reachable ? "cursor-pointer" : "cursor-default"),
|
|
27
|
-
children: [
|
|
28
|
-
/* @__PURE__ */ jsx(
|
|
29
|
-
"span",
|
|
30
|
-
{
|
|
31
|
-
className: cn(
|
|
32
|
-
"flex h-7 w-7 items-center justify-center rounded-full text-xs font-bold transition-colors",
|
|
33
|
-
active ? cn(accentBg, "text-white") : done ? cn("border-2 border-current bg-transparent", accentText) : "bg-muted/40 text-muted-foreground"
|
|
34
|
-
),
|
|
35
|
-
children: done ? /* @__PURE__ */ jsx(Check, { className: "h-3.5 w-3.5" }) : n
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ jsx(
|
|
39
|
-
"span",
|
|
40
|
-
{
|
|
41
|
-
className: cn(
|
|
42
|
-
"hidden sm:inline text-xs sm:text-sm font-semibold transition-colors",
|
|
43
|
-
active ? "text-foreground" : done ? accentText : "text-muted-foreground"
|
|
44
|
-
),
|
|
45
|
-
children: s.label
|
|
46
|
-
}
|
|
47
|
-
)
|
|
48
|
-
]
|
|
49
|
-
}
|
|
50
|
-
),
|
|
51
|
-
idx < steps.length - 1 && /* @__PURE__ */ jsx("span", { className: cn("mx-2 sm:mx-3 h-px flex-1 min-w-3 transition-colors", done ? accentBg : "bg-border") })
|
|
52
|
-
] }, s.label);
|
|
53
|
-
}) });
|
|
54
|
-
}
|
|
55
|
-
export {
|
|
56
|
-
StepNav
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=step-nav.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/step-nav.tsx"],"sourcesContent":["import { Fragment } from \"react\";\nimport { Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface StepNavStep {\n label: string;\n\n reachable?: boolean;\n}\n\nexport interface StepNavProps {\n\n steps: StepNavStep[];\n\n current: number;\n\n onStep?: (step: number) => void;\n\n accentText?: string;\n\n accentBg?: string;\n className?: string;\n}\n\nexport function StepNav({\n steps,\n current,\n onStep,\n accentText = \"text-primary\",\n accentBg = \"bg-primary\",\n className,\n}: StepNavProps) {\n return (\n <div className={cn(\"flex items-center\", className)}>\n {steps.map((s, idx) => {\n const n = idx + 1;\n const done = n < current;\n const active = n === current;\n const reachable = s.reachable ?? n <= current;\n return (\n <Fragment key={s.label}>\n <button\n type=\"button\"\n disabled={!reachable}\n onClick={() => reachable && onStep?.(n)}\n aria-current={active ? \"step\" : undefined}\n className={cn(\"flex items-center gap-2 shrink-0\", reachable ? \"cursor-pointer\" : \"cursor-default\")}\n >\n <span\n className={cn(\n \"flex h-7 w-7 items-center justify-center rounded-full text-xs font-bold transition-colors\",\n active\n ? cn(accentBg, \"text-white\")\n : done\n ? cn(\"border-2 border-current bg-transparent\", accentText)\n : \"bg-muted/40 text-muted-foreground\",\n )}\n >\n {done ? <Check className=\"h-3.5 w-3.5\" /> : n}\n </span>\n <span\n className={cn(\n \"hidden sm:inline text-xs sm:text-sm font-semibold transition-colors\",\n active ? \"text-foreground\" : done ? accentText : \"text-muted-foreground\",\n )}\n >\n {s.label}\n </span>\n </button>\n {idx < steps.length - 1 && (\n <span className={cn(\"mx-2 sm:mx-3 h-px flex-1 min-w-3 transition-colors\", done ? accentBg : \"bg-border\")} />\n )}\n </Fragment>\n );\n })}\n </div>\n );\n}\n"],"mappings":"AAyCY,SAiBY,KAjBZ;AAzCZ,SAAS,gBAAgB;AACzB,SAAS,aAAa;AACtB,SAAS,UAAU;AAsBZ,SAAS,QAAQ;AAAA,EACtB;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,WAAW;AAAA,EACX;AACF,GAAiB;AACf,SACE,oBAAC,SAAI,WAAW,GAAG,qBAAqB,SAAS,GAC9C,gBAAM,IAAI,CAAC,GAAG,QAAQ;AACrB,UAAM,IAAI,MAAM;AAChB,UAAM,OAAO,IAAI;AACjB,UAAM,SAAS,MAAM;AACrB,UAAM,YAAY,EAAE,aAAa,KAAK;AACtC,WACE,qBAAC,YACC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,UAAU,CAAC;AAAA,UACX,SAAS,MAAM,aAAa,SAAS,CAAC;AAAA,UACtC,gBAAc,SAAS,SAAS;AAAA,UAChC,WAAW,GAAG,oCAAoC,YAAY,mBAAmB,gBAAgB;AAAA,UAEjG;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA,SACI,GAAG,UAAU,YAAY,IACzB,OACE,GAAG,0CAA0C,UAAU,IACvD;AAAA,gBACR;AAAA,gBAEC,iBAAO,oBAAC,SAAM,WAAU,eAAc,IAAK;AAAA;AAAA,YAC9C;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA,SAAS,oBAAoB,OAAO,aAAa;AAAA,gBACnD;AAAA,gBAEC,YAAE;AAAA;AAAA,YACL;AAAA;AAAA;AAAA,MACF;AAAA,MACC,MAAM,MAAM,SAAS,KACpB,oBAAC,UAAK,WAAW,GAAG,sDAAsD,OAAO,WAAW,WAAW,GAAG;AAAA,SA9B/F,EAAE,KAgCjB;AAAA,EAEJ,CAAC,GACH;AAEJ;","names":[]}
|