@cellarnode/ui 0.5.5 → 0.7.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/chat/chat-toggle-button.d.ts.map +1 -1
- package/dist/chat/chat-toggle-button.js +6 -4
- package/dist/chat/chat-toggle-button.js.map +1 -1
- package/dist/components/dashboard-stats-grid.d.ts.map +1 -1
- package/dist/components/dashboard-stats-grid.js +2 -1
- package/dist/components/dashboard-stats-grid.js.map +1 -1
- package/dist/components/kanban-dnd-board.js.map +1 -1
- package/dist/globe/electron-arc.d.ts.map +1 -1
- package/dist/globe/electron-arc.js +17 -14
- package/dist/globe/electron-arc.js.map +1 -1
- package/dist/globe/globe-canvas.d.ts.map +1 -1
- package/dist/globe/globe-canvas.js +3 -3
- package/dist/globe/globe-canvas.js.map +1 -1
- package/dist/globe/globe-halo.js +2 -2
- package/dist/globe/globe-scene.d.ts.map +1 -1
- package/dist/globe/globe-scene.js +30 -23
- package/dist/globe/globe-scene.js.map +1 -1
- package/dist/globe/globe-theme.d.ts +9 -0
- package/dist/globe/globe-theme.d.ts.map +1 -1
- package/dist/globe/globe-theme.js +54 -9
- package/dist/globe/globe-theme.js.map +1 -1
- package/dist/globe/globe-types.d.ts +2 -2
- package/dist/globe/globe-types.d.ts.map +1 -1
- package/dist/globe/globe-view.d.ts.map +1 -1
- package/dist/globe/globe-view.js +51 -3
- package/dist/globe/globe-view.js.map +1 -1
- package/dist/globe/globe-view.stories.d.ts +1 -0
- package/dist/globe/globe-view.stories.d.ts.map +1 -1
- package/dist/globe/globe-view.stories.js +12 -0
- package/dist/globe/globe-view.stories.js.map +1 -1
- package/dist/notifications/notification-item.d.ts.map +1 -1
- package/dist/notifications/notification-list.js +1 -1
- package/dist/notifications/notification-list.js.map +1 -1
- package/dist/notifications/notification-provider.d.ts.map +1 -1
- package/dist/notifications/notification-provider.js +3 -3
- package/dist/notifications/notification-provider.js.map +1 -1
- package/dist/notifications/use-push-permission.d.ts.map +1 -1
- package/dist/notifications/use-push-permission.js +2 -4
- package/dist/notifications/use-push-permission.js.map +1 -1
- package/dist/notifications/utils.d.ts.map +1 -1
- package/dist/notifications/utils.js.map +1 -1
- package/dist/offer/offer-detail-header.d.ts.map +1 -1
- package/dist/offer/offer-detail-header.js +2 -3
- package/dist/offer/offer-detail-header.js.map +1 -1
- package/dist/profile/about-section.d.ts +8 -0
- package/dist/profile/about-section.d.ts.map +1 -0
- package/dist/profile/about-section.js +11 -0
- package/dist/profile/about-section.js.map +1 -0
- package/dist/profile/about-section.stories.d.ts +16 -0
- package/dist/profile/about-section.stories.d.ts.map +1 -0
- package/dist/profile/about-section.stories.js +22 -0
- package/dist/profile/about-section.stories.js.map +1 -0
- package/dist/profile/beverage-expertise.d.ts +9 -0
- package/dist/profile/beverage-expertise.d.ts.map +1 -0
- package/dist/profile/beverage-expertise.js +11 -0
- package/dist/profile/beverage-expertise.js.map +1 -0
- package/dist/profile/beverage-expertise.stories.d.ts +15 -0
- package/dist/profile/beverage-expertise.stories.d.ts.map +1 -0
- package/dist/profile/beverage-expertise.stories.js +18 -0
- package/dist/profile/beverage-expertise.stories.js.map +1 -0
- package/dist/profile/business-details.d.ts +14 -0
- package/dist/profile/business-details.d.ts.map +1 -0
- package/dist/profile/business-details.js +8 -0
- package/dist/profile/business-details.js.map +1 -0
- package/dist/profile/business-details.stories.d.ts +14 -0
- package/dist/profile/business-details.stories.d.ts.map +1 -0
- package/dist/profile/business-details.stories.js +18 -0
- package/dist/profile/business-details.stories.js.map +1 -0
- package/dist/profile/certifications-card.d.ts +12 -0
- package/dist/profile/certifications-card.d.ts.map +1 -0
- package/dist/profile/certifications-card.js +6 -0
- package/dist/profile/certifications-card.js.map +1 -0
- package/dist/profile/certifications-card.stories.d.ts +15 -0
- package/dist/profile/certifications-card.stories.d.ts.map +1 -0
- package/dist/profile/certifications-card.stories.js +19 -0
- package/dist/profile/certifications-card.stories.js.map +1 -0
- package/dist/profile/index.d.ts +10 -0
- package/dist/profile/index.d.ts.map +1 -1
- package/dist/profile/index.js +10 -0
- package/dist/profile/index.js.map +1 -1
- package/dist/profile/market-reach.d.ts +7 -0
- package/dist/profile/market-reach.d.ts.map +1 -0
- package/dist/profile/market-reach.js +25 -0
- package/dist/profile/market-reach.js.map +1 -0
- package/dist/profile/market-reach.stories.d.ts +16 -0
- package/dist/profile/market-reach.stories.d.ts.map +1 -0
- package/dist/profile/market-reach.stories.js +18 -0
- package/dist/profile/market-reach.stories.js.map +1 -0
- package/dist/profile/org-profile-page.stories.d.ts +13 -0
- package/dist/profile/org-profile-page.stories.d.ts.map +1 -0
- package/dist/profile/org-profile-page.stories.js +52 -0
- package/dist/profile/org-profile-page.stories.js.map +1 -0
- package/dist/profile/portfolio-showcase.d.ts +27 -0
- package/dist/profile/portfolio-showcase.d.ts.map +1 -0
- package/dist/profile/portfolio-showcase.js +17 -0
- package/dist/profile/portfolio-showcase.js.map +1 -0
- package/dist/profile/portfolio-showcase.stories.d.ts +16 -0
- package/dist/profile/portfolio-showcase.stories.d.ts.map +1 -0
- package/dist/profile/portfolio-showcase.stories.js +24 -0
- package/dist/profile/portfolio-showcase.stories.js.map +1 -0
- package/dist/profile/profile-bento-grid.d.ts +12 -0
- package/dist/profile/profile-bento-grid.d.ts.map +1 -0
- package/dist/profile/profile-bento-grid.js +9 -0
- package/dist/profile/profile-bento-grid.js.map +1 -0
- package/dist/profile/profile-cta.d.ts +12 -0
- package/dist/profile/profile-cta.d.ts.map +1 -0
- package/dist/profile/profile-cta.js +24 -0
- package/dist/profile/profile-cta.js.map +1 -0
- package/dist/profile/profile-cta.stories.d.ts +17 -0
- package/dist/profile/profile-cta.stories.d.ts.map +1 -0
- package/dist/profile/profile-cta.stories.js +21 -0
- package/dist/profile/profile-cta.stories.js.map +1 -0
- package/dist/profile/profile-hero.d.ts +16 -0
- package/dist/profile/profile-hero.d.ts.map +1 -0
- package/dist/profile/profile-hero.js +19 -0
- package/dist/profile/profile-hero.js.map +1 -0
- package/dist/profile/profile-hero.stories.d.ts +16 -0
- package/dist/profile/profile-hero.stories.d.ts.map +1 -0
- package/dist/profile/profile-hero.stories.js +33 -0
- package/dist/profile/profile-hero.stories.js.map +1 -0
- package/dist/profile/stats-ribbon.d.ts +11 -0
- package/dist/profile/stats-ribbon.d.ts.map +1 -0
- package/dist/profile/stats-ribbon.js +16 -0
- package/dist/profile/stats-ribbon.js.map +1 -0
- package/dist/profile/stats-ribbon.stories.d.ts +15 -0
- package/dist/profile/stats-ribbon.stories.d.ts.map +1 -0
- package/dist/profile/stats-ribbon.stories.js +28 -0
- package/dist/profile/stats-ribbon.stories.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
const variantStyles = {
|
|
4
|
+
primary: {
|
|
5
|
+
bg: "bg-linear-to-r from-primary to-primary/80",
|
|
6
|
+
text: "text-white",
|
|
7
|
+
button: "bg-white text-primary hover:bg-white/90",
|
|
8
|
+
},
|
|
9
|
+
success: {
|
|
10
|
+
bg: "bg-linear-to-r from-emerald-700 to-emerald-600",
|
|
11
|
+
text: "text-white",
|
|
12
|
+
button: "bg-white text-emerald-700 hover:bg-white/90",
|
|
13
|
+
},
|
|
14
|
+
muted: {
|
|
15
|
+
bg: "bg-muted/50 border border-border/60",
|
|
16
|
+
text: "text-foreground",
|
|
17
|
+
button: "bg-muted text-muted-foreground cursor-not-allowed",
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
export function ProfileCTA({ heading, description, buttonLabel, onAction, disabled, variant = "primary", className }) {
|
|
21
|
+
const styles = variantStyles[variant];
|
|
22
|
+
return (_jsxs("div", { className: cn("flex flex-col items-start justify-between gap-3 rounded-xl px-5 py-4 sm:flex-row sm:items-center", styles.bg, className), children: [_jsxs("div", { children: [_jsx("div", { className: cn("text-sm font-bold", styles.text), children: heading }), description && _jsx("div", { className: cn("mt-0.5 text-xs opacity-70", styles.text), children: description })] }), _jsx("button", { type: "button", onClick: onAction, disabled: disabled || variant === "muted", className: cn("shrink-0 rounded-lg px-5 py-2 text-xs font-bold transition-opacity", styles.button, (disabled || variant === "muted") && "opacity-60"), children: buttonLabel })] }));
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=profile-cta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-cta.js","sourceRoot":"","sources":["../../src/profile/profile-cta.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAYlC,MAAM,aAAa,GAAkG;IACnH,OAAO,EAAE;QACP,EAAE,EAAE,2CAA2C;QAC/C,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,yCAAyC;KAClD;IACD,OAAO,EAAE;QACP,EAAE,EAAE,gDAAgD;QACpD,IAAI,EAAE,YAAY;QAClB,MAAM,EAAE,6CAA6C;KACtD;IACD,KAAK,EAAE;QACL,EAAE,EAAE,qCAAqC;QACzC,IAAI,EAAE,iBAAiB;QACvB,MAAM,EAAE,mDAAmD;KAC5D;CACF,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,GAAG,SAAS,EAAE,SAAS,EAAmB;IACnI,MAAM,MAAM,GAAG,aAAa,CAAC,OAAO,CAAC,CAAC;IAEtC,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,kGAAkG,EAAE,MAAM,CAAC,EAAE,EAAE,SAAS,CAAC,aAC1I,0BACE,cAAK,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,MAAM,CAAC,IAAI,CAAC,YAAG,OAAO,GAAO,EACpE,WAAW,IAAI,cAAK,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,MAAM,CAAC,IAAI,CAAC,YAAG,WAAW,GAAO,IAC7F,EACN,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,QAAQ,EAAE,QAAQ,IAAI,OAAO,KAAK,OAAO,EACzC,SAAS,EAAE,EAAE,CAAC,oEAAoE,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,QAAQ,IAAI,OAAO,KAAK,OAAO,CAAC,IAAI,YAAY,CAAC,YAEpJ,WAAW,GACL,IACL,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ProfileCTA } from "./profile-cta";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ProfileCTA;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const RequestPartnership: Story;
|
|
14
|
+
export declare const ActivePartner: Story;
|
|
15
|
+
export declare const Pending: Story;
|
|
16
|
+
export declare const SendOffer: Story;
|
|
17
|
+
//# sourceMappingURL=profile-cta.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-cta.stories.d.ts","sourceRoot":"","sources":["../../src/profile/profile-cta.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,QAAA,MAAM,IAAI;;;;;;;CAKyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,kBAAkB,EAAE,KAEhC,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ProfileCTA } from "./profile-cta";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Profile/ProfileCTA",
|
|
4
|
+
component: ProfileCTA,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: { layout: "padded" },
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const RequestPartnership = {
|
|
10
|
+
args: { heading: "Interested in partnering?", description: "Send a request to start the conversation", buttonLabel: "Request Partnership", onAction: () => alert("Request") },
|
|
11
|
+
};
|
|
12
|
+
export const ActivePartner = {
|
|
13
|
+
args: { heading: "Active partnership", description: "You are already partnered with this importer", buttonLabel: "Active Partner", onAction: () => { }, variant: "success" },
|
|
14
|
+
};
|
|
15
|
+
export const Pending = {
|
|
16
|
+
args: { heading: "Partnership requested", description: "Waiting for response", buttonLabel: "Request Pending", onAction: () => { }, variant: "muted" },
|
|
17
|
+
};
|
|
18
|
+
export const SendOffer = {
|
|
19
|
+
args: { heading: "Interested in their products?", description: "Send an offer to start a conversation", buttonLabel: "Send Offer", onAction: () => alert("Send") },
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=profile-cta.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-cta.stories.js","sourceRoot":"","sources":["../../src/profile/profile-cta.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACC,CAAC;AAEpC,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,kBAAkB,GAAU;IACvC,IAAI,EAAE,EAAE,OAAO,EAAE,2BAA2B,EAAE,WAAW,EAAE,0CAA0C,EAAE,WAAW,EAAE,qBAAqB,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;CAC9K,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE,EAAE,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,8CAA8C,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE;CAC5K,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,IAAI,EAAE,EAAE,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,sBAAsB,EAAE,WAAW,EAAE,iBAAiB,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE;CACtJ,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAU;IAC9B,IAAI,EAAE,EAAE,OAAO,EAAE,+BAA+B,EAAE,WAAW,EAAE,uCAAuC,EAAE,WAAW,EAAE,YAAY,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;CACnK,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface ProfileHeroBadge {
|
|
2
|
+
label: string;
|
|
3
|
+
variant: "recommended" | "partner" | "default";
|
|
4
|
+
}
|
|
5
|
+
interface ProfileHeroProps {
|
|
6
|
+
bannerUrl?: string;
|
|
7
|
+
avatarUrl?: string;
|
|
8
|
+
name: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
verified?: boolean;
|
|
11
|
+
badges?: ProfileHeroBadge[];
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ProfileHero({ bannerUrl, avatarUrl, name, subtitle, verified, badges, className, }: ProfileHeroProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=profile-hero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-hero.d.ts","sourceRoot":"","sources":["../../src/profile/profile-hero.tsx"],"names":[],"mappings":"AAGA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,aAAa,GAAG,SAAS,GAAG,SAAS,CAAC;CAChD;AAED,UAAU,gBAAgB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiBD,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE,gBAAgB,2CAoElB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
const badgeStyles = {
|
|
4
|
+
recommended: "bg-amber-500/20 text-amber-100 border-amber-400/30",
|
|
5
|
+
partner: "bg-emerald-500/20 text-emerald-100 border-emerald-400/30",
|
|
6
|
+
default: "bg-white/15 text-white border-white/20",
|
|
7
|
+
};
|
|
8
|
+
function getInitials(name) {
|
|
9
|
+
return name
|
|
10
|
+
.split(/\s+/)
|
|
11
|
+
.slice(0, 2)
|
|
12
|
+
.map((w) => w[0])
|
|
13
|
+
.join("")
|
|
14
|
+
.toUpperCase();
|
|
15
|
+
}
|
|
16
|
+
export function ProfileHero({ bannerUrl, avatarUrl, name, subtitle, verified, badges, className, }) {
|
|
17
|
+
return (_jsxs("div", { className: cn("relative", className), children: [_jsxs("div", { className: "relative h-[120px] overflow-hidden rounded-t-2xl sm:h-[160px] md:h-[200px]", children: [bannerUrl ? (_jsx("img", { src: bannerUrl, alt: "", className: "size-full object-cover" })) : (_jsx("div", { className: "size-full bg-linear-to-br from-primary/80 via-primary to-primary/60" })), badges && badges.length > 0 && (_jsx("div", { className: "absolute right-3 top-3 flex gap-2", children: badges.map((badge) => (_jsx("span", { className: cn("rounded-full border px-2.5 py-0.5 text-[11px] font-semibold backdrop-blur-xs", badgeStyles[badge.variant]), children: badge.label }, badge.label))) }))] }), _jsx("div", { className: "relative px-5 pb-2 sm:px-6", children: _jsxs("div", { className: "-mt-7 flex items-end gap-3.5 sm:-mt-9", children: [_jsx("div", { className: "size-14 shrink-0 overflow-hidden rounded-xl border-[3px] border-background bg-background shadow-xs sm:size-[72px]", children: avatarUrl ? (_jsx("img", { src: avatarUrl, alt: name, className: "size-full object-cover" })) : (_jsx("div", { className: "flex size-full items-center justify-center bg-muted text-base font-bold text-muted-foreground sm:text-lg", children: getInitials(name) })) }), _jsxs("div", { className: "min-w-0 pb-1", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("h1", { className: "truncate text-lg font-bold text-foreground sm:text-xl", children: name }), verified && (_jsx("svg", { className: "size-4 shrink-0 text-blue-500 sm:size-5", viewBox: "0 0 20 20", fill: "currentColor", children: _jsx("path", { fillRule: "evenodd", d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z", clipRule: "evenodd" }) }))] }), subtitle && (_jsx("p", { className: "truncate text-xs text-muted-foreground sm:text-sm/6", children: subtitle }))] })] }) })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=profile-hero.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-hero.js","sourceRoot":"","sources":["../../src/profile/profile-hero.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAiBlC,MAAM,WAAW,GAAgD;IAC/D,WAAW,EAAE,oDAAoD;IACjE,OAAO,EAAE,0DAA0D;IACnE,OAAO,EAAE,wCAAwC;CAClD,CAAC;AAEF,SAAS,WAAW,CAAC,IAAY;IAC/B,OAAO,IAAI;SACR,KAAK,CAAC,KAAK,CAAC;SACZ,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SAChB,IAAI,CAAC,EAAE,CAAC;SACR,WAAW,EAAE,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,EAC1B,SAAS,EACT,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,SAAS,GACQ;IACjB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC,aAEvC,eAAK,SAAS,EAAC,4EAA4E,aACxF,SAAS,CAAC,CAAC,CAAC,CACX,cAAK,GAAG,EAAE,SAAS,EAAE,GAAG,EAAC,EAAE,EAAC,SAAS,EAAC,wBAAwB,GAAG,CAClE,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,qEAAqE,GAAG,CACxF,EACA,MAAM,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CAC9B,cAAK,SAAS,EAAC,mCAAmC,YAC/C,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,eAEE,SAAS,EAAE,EAAE,CACX,8EAA8E,EAC9E,WAAW,CAAC,KAAK,CAAC,OAAO,CAAC,CAC3B,YAEA,KAAK,CAAC,KAAK,IANP,KAAK,CAAC,KAAK,CAOX,CACR,CAAC,GACE,CACP,IACG,EAGN,cAAK,SAAS,EAAC,4BAA4B,YACzC,eAAK,SAAS,EAAC,uCAAuC,aACpD,cAAK,SAAS,EAAC,mHAAmH,YAC/H,SAAS,CAAC,CAAC,CAAC,CACX,cAAK,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAC,wBAAwB,GAAG,CACtE,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,0GAA0G,YACtH,WAAW,CAAC,IAAI,CAAC,GACd,CACP,GACG,EACN,eAAK,SAAS,EAAC,cAAc,aAC3B,eAAK,SAAS,EAAC,2BAA2B,aACxC,aAAI,SAAS,EAAC,uDAAuD,YAClE,IAAI,GACF,EACJ,QAAQ,IAAI,CACX,cACE,SAAS,EAAC,yCAAyC,EACnD,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,YAEnB,eACE,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,wJAAwJ,EAC1J,QAAQ,EAAC,SAAS,GAClB,GACE,CACP,IACG,EACL,QAAQ,IAAI,CACX,YAAG,SAAS,EAAC,qDAAqD,YAC/D,QAAQ,GACP,CACL,IACG,IACF,GACF,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { ProfileHero } from "./profile-hero";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof ProfileHero;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const WithBanner: Story;
|
|
14
|
+
export declare const NoBanner: Story;
|
|
15
|
+
export declare const NoAvatar: Story;
|
|
16
|
+
//# sourceMappingURL=profile-hero.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-hero.stories.d.ts","sourceRoot":"","sources":["../../src/profile/profile-hero.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,QAAA,MAAM,IAAI;;;;;;;CAK0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAOtB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ProfileHero } from "./profile-hero";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Profile/ProfileHero",
|
|
4
|
+
component: ProfileHero,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: { layout: "padded" },
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const WithBanner = {
|
|
10
|
+
args: {
|
|
11
|
+
bannerUrl: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=1200&h=400&fit=crop",
|
|
12
|
+
name: "Tuscany Imports SRL",
|
|
13
|
+
subtitle: "Florence, Tuscany · Italy",
|
|
14
|
+
verified: true,
|
|
15
|
+
badges: [{ label: "Recommended", variant: "recommended" }],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
export const NoBanner = {
|
|
19
|
+
args: {
|
|
20
|
+
name: "Nordic Spirits Import",
|
|
21
|
+
subtitle: "Stockholm · Sweden",
|
|
22
|
+
verified: true,
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
export const NoAvatar = {
|
|
26
|
+
args: {
|
|
27
|
+
name: "Atlantic Wine Traders",
|
|
28
|
+
subtitle: "Bordeaux · France",
|
|
29
|
+
verified: false,
|
|
30
|
+
badges: [{ label: "Active Partner", variant: "partner" }],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=profile-hero.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profile-hero.stories.js","sourceRoot":"","sources":["../../src/profile/profile-hero.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACE,CAAC;AAErC,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,UAAU,GAAU;IAC/B,IAAI,EAAE;QACJ,SAAS,EAAE,oFAAoF;QAC/F,IAAI,EAAE,qBAAqB;QAC3B,QAAQ,EAAE,2BAA2B;QACrC,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;KAC3D;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,uBAAuB;QAC7B,QAAQ,EAAE,oBAAoB;QAC9B,QAAQ,EAAE,IAAI;KACf;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,uBAAuB;QAC7B,QAAQ,EAAE,mBAAmB;QAC7B,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,gBAAgB,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;KAC1D;CACF,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Stat {
|
|
2
|
+
value: string | number;
|
|
3
|
+
label: string;
|
|
4
|
+
}
|
|
5
|
+
interface StatsRibbonProps {
|
|
6
|
+
stats: Stat[];
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function StatsRibbon({ stats, className }: StatsRibbonProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=stats-ribbon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats-ribbon.d.ts","sourceRoot":"","sources":["../../src/profile/stats-ribbon.tsx"],"names":[],"mappings":"AAGA,UAAU,IAAI;IACZ,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,gBAAgB;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAWD,wBAAgB,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,gBAAgB,kDA8BjE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/utils";
|
|
3
|
+
// IMPORTANT: Tailwind does not support dynamic class generation like grid-cols-${n}
|
|
4
|
+
// Use a static map instead
|
|
5
|
+
const gridColsMap = {
|
|
6
|
+
2: "grid-cols-2",
|
|
7
|
+
3: "grid-cols-2 sm:grid-cols-3",
|
|
8
|
+
4: "grid-cols-2 sm:grid-cols-4",
|
|
9
|
+
5: "grid-cols-2 sm:grid-cols-3 md:grid-cols-5",
|
|
10
|
+
};
|
|
11
|
+
export function StatsRibbon({ stats, className }) {
|
|
12
|
+
if (stats.length === 0)
|
|
13
|
+
return null;
|
|
14
|
+
return (_jsx("div", { className: cn("grid overflow-hidden rounded-xl border border-border/60 bg-card", gridColsMap[stats.length] ?? "grid-cols-2 sm:grid-cols-4", className), children: stats.map((stat, i) => (_jsxs("div", { className: cn("px-3 py-3 text-center sm:py-4", i < stats.length - 1 && "border-r border-border/60 max-sm:[&:nth-child(2n)]:border-r-0", i < stats.length - 2 && "max-sm:border-b max-sm:border-border/60"), children: [_jsx("div", { className: "text-lg font-extrabold text-foreground sm:text-xl", children: stat.value }), _jsx("div", { className: "mt-0.5 text-[10px] font-semibold uppercase tracking-wider text-muted-foreground", children: stat.label })] }, stat.label))) }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=stats-ribbon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats-ribbon.js","sourceRoot":"","sources":["../../src/profile/stats-ribbon.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAYlC,oFAAoF;AACpF,2BAA2B;AAC3B,MAAM,WAAW,GAA2B;IAC1C,CAAC,EAAE,aAAa;IAChB,CAAC,EAAE,4BAA4B;IAC/B,CAAC,EAAE,4BAA4B;IAC/B,CAAC,EAAE,2CAA2C;CAC/C,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,EAAE,KAAK,EAAE,SAAS,EAAoB;IAChE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAEpC,OAAO,CACL,cACE,SAAS,EAAE,EAAE,CACX,iEAAiE,EACjE,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,4BAA4B,EACzD,SAAS,CACV,YAEA,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,eAEE,SAAS,EAAE,EAAE,CACX,+BAA+B,EAC/B,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,+DAA+D,EACvF,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,yCAAyC,CAClE,aAED,cAAK,SAAS,EAAC,mDAAmD,YAC/D,IAAI,CAAC,KAAK,GACP,EACN,cAAK,SAAS,EAAC,iFAAiF,YAC7F,IAAI,CAAC,KAAK,GACP,KAZD,IAAI,CAAC,KAAK,CAaX,CACP,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import { StatsRibbon } from "./stats-ribbon";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof StatsRibbon;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const ImporterStats: Story;
|
|
14
|
+
export declare const ProducerStats: Story;
|
|
15
|
+
//# sourceMappingURL=stats-ribbon.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats-ribbon.stories.d.ts","sourceRoot":"","sources":["../../src/profile/stats-ribbon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,QAAA,MAAM,IAAI;;;;;;;CAK0B,CAAC;AAErC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { StatsRibbon } from "./stats-ribbon";
|
|
2
|
+
const meta = {
|
|
3
|
+
title: "Profile/StatsRibbon",
|
|
4
|
+
component: StatsRibbon,
|
|
5
|
+
tags: ["autodocs"],
|
|
6
|
+
parameters: { layout: "padded" },
|
|
7
|
+
};
|
|
8
|
+
export default meta;
|
|
9
|
+
export const ImporterStats = {
|
|
10
|
+
args: {
|
|
11
|
+
stats: [
|
|
12
|
+
{ value: 4, label: "Categories" },
|
|
13
|
+
{ value: 6, label: "Markets" },
|
|
14
|
+
{ value: 3, label: "Certificates" },
|
|
15
|
+
{ value: "2019", label: "Since" },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
export const ProducerStats = {
|
|
20
|
+
args: {
|
|
21
|
+
stats: [
|
|
22
|
+
{ value: 12, label: "Products" },
|
|
23
|
+
{ value: 3, label: "Awards" },
|
|
24
|
+
{ value: "2019", label: "Since" },
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=stats-ribbon.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats-ribbon.stories.js","sourceRoot":"","sources":["../../src/profile/stats-ribbon.stories.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,MAAM,IAAI,GAAG;IACX,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,UAAU,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;CACE,CAAC;AAErC,eAAe,IAAI,CAAC;AAGpB,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE;YACjC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE;YAC9B,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,cAAc,EAAE;YACnC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;SAClC;KACF;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAU;IAClC,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE;YAChC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE;YAC7B,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE;SAClC;KACF;CACF,CAAC"}
|