@handled-ai/design-system 0.18.1 → 0.18.3
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/charts/index.d.ts +0 -1
- package/dist/charts/index.js +0 -1
- package/dist/charts/index.js.map +1 -1
- package/dist/charts/pipeline-overview.d.ts +1 -2
- package/dist/charts/pipeline-overview.js +1 -29
- package/dist/charts/pipeline-overview.js.map +1 -1
- package/dist/components/insights-filter-bar.d.ts +1 -2
- package/dist/components/insights-filter-bar.js +5 -13
- package/dist/components/insights-filter-bar.js.map +1 -1
- package/dist/components/metric-card.d.ts +1 -14
- package/dist/components/metric-card.js +0 -86
- package/dist/components/metric-card.js.map +1 -1
- package/dist/components/timeline-activity.d.ts +16 -1
- package/dist/components/timeline-activity.js +69 -1
- package/dist/components/timeline-activity.js.map +1 -1
- package/dist/index.d.ts +2 -8
- package/dist/index.js +0 -5
- package/dist/index.js.map +1 -1
- package/dist/prototype/prototype-inbox-view.d.ts +11 -1
- package/dist/prototype/prototype-inbox-view.js +101 -33
- package/dist/prototype/prototype-inbox-view.js.map +1 -1
- package/package.json +1 -1
- package/src/charts/index.ts +0 -1
- package/src/charts/pipeline-overview.tsx +1 -38
- package/src/components/__tests__/timeline-activity.test.tsx +137 -0
- package/src/components/insights-filter-bar.tsx +4 -13
- package/src/components/metric-card.tsx +0 -82
- package/src/components/timeline-activity.tsx +112 -1
- package/src/index.ts +0 -5
- package/src/prototype/__tests__/detail-view-attention.test.tsx +2 -2
- package/src/prototype/__tests__/detail-view-timeline-system-events.test.tsx +322 -0
- package/src/prototype/prototype-inbox-view.tsx +131 -30
- package/dist/charts/empty-chart-state.d.ts +0 -11
- package/dist/charts/empty-chart-state.js +0 -70
- package/dist/charts/empty-chart-state.js.map +0 -1
- package/dist/components/days-open-cell.d.ts +0 -16
- package/dist/components/days-open-cell.js +0 -73
- package/dist/components/days-open-cell.js.map +0 -1
- package/dist/components/detail-drawer.d.ts +0 -16
- package/dist/components/detail-drawer.js +0 -45
- package/dist/components/detail-drawer.js.map +0 -1
- package/dist/components/linked-entity-cell.d.ts +0 -14
- package/dist/components/linked-entity-cell.js +0 -96
- package/dist/components/linked-entity-cell.js.map +0 -1
- package/dist/components/pill.d.ts +0 -26
- package/dist/components/pill.js +0 -77
- package/dist/components/pill.js.map +0 -1
- package/dist/components/quick-segment.d.ts +0 -13
- package/dist/components/quick-segment.js +0 -96
- package/dist/components/quick-segment.js.map +0 -1
- package/src/charts/__tests__/insights-charts.test.tsx +0 -62
- package/src/charts/empty-chart-state.tsx +0 -44
- package/src/components/__tests__/insights-primitives.test.tsx +0 -117
- package/src/components/days-open-cell.tsx +0 -50
- package/src/components/detail-drawer.tsx +0 -60
- package/src/components/linked-entity-cell.tsx +0 -74
- package/src/components/pill.tsx +0 -67
- package/src/components/quick-segment.tsx +0 -68
|
@@ -5,6 +5,42 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
7
|
import { ChevronDown, ChevronUp, ExternalLink } from "lucide-react";
|
|
8
|
+
const TONE_CLASSES = {
|
|
9
|
+
red: {
|
|
10
|
+
dot: "bg-red-50 border-red-200 dark:bg-red-950/30 dark:border-red-900/40",
|
|
11
|
+
icon: "text-red-600 dark:text-red-300"
|
|
12
|
+
},
|
|
13
|
+
amber: {
|
|
14
|
+
dot: "bg-amber-50 border-amber-200 dark:bg-amber-950/30 dark:border-amber-900/40",
|
|
15
|
+
icon: "text-amber-600 dark:text-amber-300"
|
|
16
|
+
},
|
|
17
|
+
emerald: {
|
|
18
|
+
dot: "bg-emerald-50 border-emerald-200 dark:bg-emerald-950/30 dark:border-emerald-900/40",
|
|
19
|
+
icon: "text-emerald-600 dark:text-emerald-300"
|
|
20
|
+
},
|
|
21
|
+
violet: {
|
|
22
|
+
dot: "bg-violet-50 border-violet-200 dark:bg-violet-950/30 dark:border-violet-900/40",
|
|
23
|
+
icon: "text-violet-600 dark:text-violet-300"
|
|
24
|
+
},
|
|
25
|
+
blue: {
|
|
26
|
+
dot: "bg-blue-50 border-blue-200 dark:bg-blue-950/30 dark:border-blue-900/40",
|
|
27
|
+
icon: "text-blue-600 dark:text-blue-300"
|
|
28
|
+
},
|
|
29
|
+
slate: {
|
|
30
|
+
dot: "bg-slate-100 border-slate-200 dark:bg-slate-800/50 dark:border-slate-700",
|
|
31
|
+
icon: "text-slate-500 dark:text-slate-300"
|
|
32
|
+
},
|
|
33
|
+
salesforce: {
|
|
34
|
+
dot: "bg-white border-[#00A1E0]/25 dark:bg-background dark:border-[#00A1E0]/25",
|
|
35
|
+
icon: "text-[#00A1E0]"
|
|
36
|
+
},
|
|
37
|
+
gmail: {
|
|
38
|
+
dot: "bg-white border-red-200 dark:bg-background dark:border-red-900/40",
|
|
39
|
+
icon: "text-red-500 dark:text-red-300"
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const NEUTRAL_DOT_CLASSES = "border-border/60 bg-background";
|
|
43
|
+
const NEUTRAL_ICON_CLASSES = "text-muted-foreground";
|
|
8
44
|
function TimelineActivity({ events, className }) {
|
|
9
45
|
return /* @__PURE__ */ jsx("div", { className: cn("space-y-0", className), children: events.map((event, index) => /* @__PURE__ */ jsx(
|
|
10
46
|
TimelineItem,
|
|
@@ -15,20 +51,51 @@ function TimelineActivity({ events, className }) {
|
|
|
15
51
|
event.id
|
|
16
52
|
)) });
|
|
17
53
|
}
|
|
54
|
+
function ActorByline({ actor, time }) {
|
|
55
|
+
var _a, _b, _c;
|
|
56
|
+
if (actor.kind === "system") return null;
|
|
57
|
+
if (actor.kind === "integration") {
|
|
58
|
+
return /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-1.5 text-xs text-muted-foreground", "data-testid": "actor-byline", children: [
|
|
59
|
+
/* @__PURE__ */ jsx("span", { children: "Integration" }),
|
|
60
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
|
|
61
|
+
/* @__PURE__ */ jsx("span", { children: time })
|
|
62
|
+
] });
|
|
63
|
+
}
|
|
64
|
+
const verb = (_a = actor.verb) != null ? _a : "performed this action";
|
|
65
|
+
const displayInitials = (_b = actor.initials) != null ? _b : actor.name ? actor.name.charAt(0).toUpperCase() : "?";
|
|
66
|
+
return /* @__PURE__ */ jsxs("div", { className: "mt-1 flex items-center gap-1.5 text-xs text-muted-foreground", "data-testid": "actor-byline", children: [
|
|
67
|
+
actor.avatarUrl ? /* @__PURE__ */ jsx(
|
|
68
|
+
"img",
|
|
69
|
+
{
|
|
70
|
+
src: actor.avatarUrl,
|
|
71
|
+
alt: (_c = actor.name) != null ? _c : "User",
|
|
72
|
+
className: "h-4 w-4 rounded-full object-cover"
|
|
73
|
+
}
|
|
74
|
+
) : /* @__PURE__ */ jsx("span", { className: "flex h-4 w-4 items-center justify-center rounded-full bg-muted-foreground/10 text-[8px] font-semibold text-muted-foreground", children: displayInitials }),
|
|
75
|
+
/* @__PURE__ */ jsx("span", { className: "text-foreground font-medium", children: actor.name }),
|
|
76
|
+
/* @__PURE__ */ jsx("span", { children: verb }),
|
|
77
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground/40", children: "\xB7" }),
|
|
78
|
+
/* @__PURE__ */ jsx("span", { children: time })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
18
81
|
function TimelineItem({ event, isLast }) {
|
|
19
82
|
var _a, _b, _c, _d;
|
|
20
83
|
const [expanded, setExpanded] = React.useState((_a = event.defaultExpanded) != null ? _a : false);
|
|
21
84
|
const [showAllRecipients, setShowAllRecipients] = React.useState(false);
|
|
22
85
|
const hasContent = !!event.content;
|
|
23
86
|
const hasEmail = !!event.email;
|
|
87
|
+
const toneStyle = event.tone ? TONE_CLASSES[event.tone] : null;
|
|
88
|
+
const dotClasses = toneStyle ? toneStyle.dot : NEUTRAL_DOT_CLASSES;
|
|
89
|
+
const iconClasses = toneStyle ? toneStyle.icon : NEUTRAL_ICON_CLASSES;
|
|
24
90
|
return /* @__PURE__ */ jsxs("div", { className: "group relative flex gap-3.5", children: [
|
|
25
91
|
!isLast && /* @__PURE__ */ jsx("div", { className: "absolute left-[9px] top-5 bottom-[-6px] w-px bg-border/60" }),
|
|
26
|
-
/* @__PURE__ */ jsx("div", { className: "relative z-10 mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-background", children: /* @__PURE__ */ jsx("div", { className: "flex h-4.5 w-4.5 items-center justify-center rounded-full border
|
|
92
|
+
/* @__PURE__ */ jsx("div", { className: "relative z-10 mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-background", children: /* @__PURE__ */ jsx("div", { className: cn("flex h-4.5 w-4.5 items-center justify-center rounded-full border ring-4 ring-background", dotClasses, iconClasses), "data-testid": "timeline-dot", children: event.icon }) }),
|
|
27
93
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 pb-5 pt-0.5", children: [
|
|
28
94
|
/* @__PURE__ */ jsxs("div", { className: "flex min-w-0 flex-col gap-1 sm:flex-row sm:items-start sm:justify-between", children: [
|
|
29
95
|
/* @__PURE__ */ jsx("div", { className: "pr-4 text-[13px] leading-relaxed text-foreground", children: event.title }),
|
|
30
96
|
/* @__PURE__ */ jsx("span", { className: "mt-0.5 shrink-0 whitespace-nowrap text-[11px] text-muted-foreground/70", children: event.time })
|
|
31
97
|
] }),
|
|
98
|
+
event.actor && /* @__PURE__ */ jsx(ActorByline, { actor: event.actor, time: event.time }),
|
|
32
99
|
(hasContent || hasEmail) && /* @__PURE__ */ jsx("div", { className: "mt-2", children: event.isInteractive ? hasEmail ? /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-md border border-border/80 bg-muted/20", children: /* @__PURE__ */ jsx(
|
|
33
100
|
"div",
|
|
34
101
|
{
|
|
@@ -176,6 +243,7 @@ function TimelineItem({ event, isLast }) {
|
|
|
176
243
|
] });
|
|
177
244
|
}
|
|
178
245
|
export {
|
|
246
|
+
TONE_CLASSES,
|
|
179
247
|
TimelineActivity
|
|
180
248
|
};
|
|
181
249
|
//# sourceMappingURL=timeline-activity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/timeline-activity.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../lib/utils\"\nimport { ChevronDown, ChevronUp, ExternalLink } from \"lucide-react\"\n\nexport interface TimelineEvent {\n id: string\n icon: React.ReactNode\n title: React.ReactNode\n time: string\n preview?: React.ReactNode\n email?: {\n from: string\n fromEmail?: string\n to: string\n cc?: string\n bcc?: string\n date?: string\n subject?: string\n body: React.ReactNode\n }\n content?: React.ReactNode\n source?: {\n label: string\n url: string\n }\n defaultExpanded?: boolean\n isInteractive?: boolean\n onSourceClick?: () => void\n}\n\nexport interface TimelineActivityProps {\n events: TimelineEvent[]\n className?: string\n}\n\nexport function TimelineActivity({ events, className }: TimelineActivityProps) {\n return (\n <div className={cn(\"space-y-0\", className)}>\n {events.map((event, index) => (\n <TimelineItem\n key={event.id}\n event={event}\n isLast={index === events.length - 1}\n />\n ))}\n </div>\n )\n}\n\nfunction TimelineItem({ event, isLast }: { event: TimelineEvent; isLast: boolean }) {\n const [expanded, setExpanded] = React.useState(event.defaultExpanded ?? false)\n const [showAllRecipients, setShowAllRecipients] = React.useState(false)\n const hasContent = !!event.content\n const hasEmail = !!event.email\n\n return (\n <div className=\"group relative flex gap-3.5\">\n {!isLast && (\n <div className=\"absolute left-[9px] top-5 bottom-[-6px] w-px bg-border/60\" />\n )}\n\n <div className=\"relative z-10 mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-background\">\n <div className=\"flex h-4.5 w-4.5 items-center justify-center rounded-full border border-border/60 bg-background text-muted-foreground ring-4 ring-background\">\n {event.icon}\n </div>\n </div>\n\n <div className=\"flex-1 pb-5 pt-0.5\">\n <div className=\"flex min-w-0 flex-col gap-1 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"pr-4 text-[13px] leading-relaxed text-foreground\">\n {event.title}\n </div>\n <span className=\"mt-0.5 shrink-0 whitespace-nowrap text-[11px] text-muted-foreground/70\">\n {event.time}\n </span>\n </div>\n\n {(hasContent || hasEmail) && (\n <div className=\"mt-2\">\n {event.isInteractive ? (\n hasEmail ? (\n <div className=\"overflow-hidden rounded-md border border-border/80 bg-muted/20\">\n <div\n className={cn(\n \"px-3 py-2.5 text-sm\",\n !expanded && \"cursor-pointer hover:bg-muted/30 transition-colors\"\n )}\n onClick={() => !expanded && setExpanded(true)}\n >\n {expanded && event.email ? (\n <div className=\"space-y-3\">\n <div>\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex min-w-0 items-baseline gap-1.5\">\n <span className=\"font-semibold text-foreground text-[13px] whitespace-nowrap\">{event.email.from}</span>\n {event.email.fromEmail && (\n <span className=\"text-muted-foreground/60 text-xs truncate\">{event.email.fromEmail}</span>\n )}\n </div>\n {event.email.date && (\n <span className=\"shrink-0 text-xs text-muted-foreground/50 whitespace-nowrap\">{event.email.date}</span>\n )}\n </div>\n <div className=\"mt-0.5 flex items-center gap-1 text-xs text-muted-foreground\">\n <span className=\"truncate\">\n To {event.email.to}\n {!showAllRecipients && (event.email.cc || event.email.bcc) ? (\n <>, ...</>\n ) : null}\n {showAllRecipients && event.email.cc ? (\n <>, {event.email.cc}</>\n ) : null}\n {showAllRecipients && event.email.bcc ? (\n <> <span className=\"text-muted-foreground/40\">bcc</span> {event.email.bcc}</>\n ) : null}\n </span>\n {(event.email.cc || event.email.bcc) && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n setShowAllRecipients((prev) => !prev)\n }}\n className=\"shrink-0 text-muted-foreground/40 hover:text-muted-foreground transition-colors\"\n >\n <ChevronDown className={cn(\"h-3 w-3 transition-transform\", showAllRecipients && \"rotate-180\")} />\n </button>\n )}\n </div>\n </div>\n\n <div className=\"whitespace-pre-line text-sm leading-relaxed text-foreground/90\">\n {event.email.body}\n </div>\n\n <button\n onClick={(e) => {\n e.stopPropagation()\n setExpanded(false)\n }}\n className=\"mt-2 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Show less <ChevronUp className=\"h-3 w-3\" />\n </button>\n </div>\n ) : (\n <div className=\"flex items-center justify-between gap-2 text-muted-foreground\">\n <span className=\"line-clamp-1 pr-3 text-[13px]\">\n <span className=\"text-muted-foreground\">{event.email?.from}</span>\n <span className=\"mx-1.5 text-muted-foreground/40\">·</span>\n {event.email?.subject ? (\n <>\n <span className=\"text-muted-foreground\">{event.email.subject}</span>\n <span className=\"mx-1.5 text-muted-foreground/40\">·</span>\n </>\n ) : null}\n <span className=\"text-muted-foreground\">{event.preview}</span>\n </span>\n <button className=\"flex shrink-0 items-center gap-1 text-[11px] font-semibold uppercase tracking-wider transition-colors hover:text-foreground\">\n Expand <ChevronDown className=\"h-3 w-3\" />\n </button>\n </div>\n )}\n </div>\n </div>\n ) : (\n <div className=\"overflow-hidden rounded-md border border-border/80 bg-muted/20\">\n <div\n className={cn(\n \"px-3 py-2.5 text-sm\",\n !expanded && \"cursor-pointer hover:bg-muted/30 transition-colors\"\n )}\n onClick={() => !expanded && setExpanded(true)}\n >\n {expanded ? (\n <div className=\"space-y-2\">\n {event.content}\n <div className=\"mt-2 flex items-center gap-3\">\n {event.source ? (\n event.onSourceClick ? (\n <button\n type=\"button\"\n onClick={(e) => { e.stopPropagation(); event.onSourceClick?.(); }}\n className=\"mr-auto inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Open in {event.source.label}\n <ExternalLink className=\"h-3 w-3\" />\n </button>\n ) : (\n <a\n href={event.source.url}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n className=\"mr-auto inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Open in {event.source.label}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n )\n ) : null}\n <button\n onClick={(e) => { e.stopPropagation(); setExpanded(false); }}\n className=\"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Show less <ChevronUp className=\"h-3 w-3\" />\n </button>\n </div>\n </div>\n ) : (\n <div className=\"flex items-center justify-between gap-2 text-muted-foreground\">\n <span className=\"line-clamp-1 pr-3\">\n {event.preview ?? event.content}\n </span>\n <button className=\"flex shrink-0 items-center gap-1 text-[11px] font-semibold uppercase tracking-wider transition-colors hover:text-foreground\">\n Expand <ChevronDown className=\"h-3 w-3\" />\n </button>\n </div>\n )}\n </div>\n </div>\n )\n ) : (\n <div className=\"pr-2 text-sm leading-relaxed text-muted-foreground\">\n {event.content}\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";AAyCQ,SAoEwB,UApExB,KA6BA,YA7BA;AAvCR,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,aAAa,WAAW,oBAAoB;AAiC9C,SAAS,iBAAiB,EAAE,QAAQ,UAAU,GAA0B;AAC7E,SACE,oBAAC,SAAI,WAAW,GAAG,aAAa,SAAS,GACtC,iBAAO,IAAI,CAAC,OAAO,UAClB;AAAA,IAAC;AAAA;AAAA,MAEC;AAAA,MACA,QAAQ,UAAU,OAAO,SAAS;AAAA;AAAA,IAF7B,MAAM;AAAA,EAGb,CACD,GACH;AAEJ;AAEA,SAAS,aAAa,EAAE,OAAO,OAAO,GAA8C;AAnDpF;AAoDE,QAAM,CAAC,UAAU,WAAW,IAAI,MAAM,UAAS,WAAM,oBAAN,YAAyB,KAAK;AAC7E,QAAM,CAAC,mBAAmB,oBAAoB,IAAI,MAAM,SAAS,KAAK;AACtE,QAAM,aAAa,CAAC,CAAC,MAAM;AAC3B,QAAM,WAAW,CAAC,CAAC,MAAM;AAEzB,SACE,qBAAC,SAAI,WAAU,+BACZ;AAAA,KAAC,UACA,oBAAC,SAAI,WAAU,6DAA4D;AAAA,I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AC,SAAI,WAAU,sDACZ,gBAAM,SACT,GAEJ;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["_a"]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/timeline-activity.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { cn } from \"../lib/utils\"\nimport { ChevronDown, ChevronUp, ExternalLink } from \"lucide-react\"\n\nexport type TimelineEventTone =\n | \"red\"\n | \"amber\"\n | \"emerald\"\n | \"violet\"\n | \"blue\"\n | \"slate\"\n | \"salesforce\"\n | \"gmail\"\n\nexport interface TimelineEventActor {\n kind: \"user\" | \"integration\" | \"system\"\n name?: string\n initials?: string\n avatarUrl?: string\n verb?: string\n}\n\nexport interface TimelineEvent {\n id: string\n icon: React.ReactNode\n title: React.ReactNode\n time: string\n preview?: React.ReactNode\n email?: {\n from: string\n fromEmail?: string\n to: string\n cc?: string\n bcc?: string\n date?: string\n subject?: string\n body: React.ReactNode\n }\n content?: React.ReactNode\n source?: {\n label: string\n url: string\n }\n defaultExpanded?: boolean\n isInteractive?: boolean\n onSourceClick?: () => void\n tone?: TimelineEventTone\n actor?: TimelineEventActor\n isSystemNoise?: boolean\n}\n\n// ---------------------------------------------------------------------------\n// Tone class map — every class is a complete static string literal so\n// Tailwind's JIT scanner can detect them. NO interpolation.\n// ---------------------------------------------------------------------------\n\nexport const TONE_CLASSES: Record<\n TimelineEventTone,\n { dot: string; icon: string }\n> = {\n red: {\n dot: \"bg-red-50 border-red-200 dark:bg-red-950/30 dark:border-red-900/40\",\n icon: \"text-red-600 dark:text-red-300\",\n },\n amber: {\n dot: \"bg-amber-50 border-amber-200 dark:bg-amber-950/30 dark:border-amber-900/40\",\n icon: \"text-amber-600 dark:text-amber-300\",\n },\n emerald: {\n dot: \"bg-emerald-50 border-emerald-200 dark:bg-emerald-950/30 dark:border-emerald-900/40\",\n icon: \"text-emerald-600 dark:text-emerald-300\",\n },\n violet: {\n dot: \"bg-violet-50 border-violet-200 dark:bg-violet-950/30 dark:border-violet-900/40\",\n icon: \"text-violet-600 dark:text-violet-300\",\n },\n blue: {\n dot: \"bg-blue-50 border-blue-200 dark:bg-blue-950/30 dark:border-blue-900/40\",\n icon: \"text-blue-600 dark:text-blue-300\",\n },\n slate: {\n dot: \"bg-slate-100 border-slate-200 dark:bg-slate-800/50 dark:border-slate-700\",\n icon: \"text-slate-500 dark:text-slate-300\",\n },\n salesforce: {\n dot: \"bg-white border-[#00A1E0]/25 dark:bg-background dark:border-[#00A1E0]/25\",\n icon: \"text-[#00A1E0]\",\n },\n gmail: {\n dot: \"bg-white border-red-200 dark:bg-background dark:border-red-900/40\",\n icon: \"text-red-500 dark:text-red-300\",\n },\n}\n\nconst NEUTRAL_DOT_CLASSES = \"border-border/60 bg-background\"\nconst NEUTRAL_ICON_CLASSES = \"text-muted-foreground\"\n\nexport interface TimelineActivityProps {\n events: TimelineEvent[]\n className?: string\n}\n\nexport function TimelineActivity({ events, className }: TimelineActivityProps) {\n return (\n <div className={cn(\"space-y-0\", className)}>\n {events.map((event, index) => (\n <TimelineItem\n key={event.id}\n event={event}\n isLast={index === events.length - 1}\n />\n ))}\n </div>\n )\n}\n\nfunction ActorByline({ actor, time }: { actor: TimelineEventActor; time: string }) {\n if (actor.kind === \"system\") return null\n\n if (actor.kind === \"integration\") {\n return (\n <div className=\"mt-1 flex items-center gap-1.5 text-xs text-muted-foreground\" data-testid=\"actor-byline\">\n <span>Integration</span>\n <span className=\"text-muted-foreground/40\">·</span>\n <span>{time}</span>\n </div>\n )\n }\n\n // actor.kind === \"user\"\n const verb = actor.verb ?? \"performed this action\"\n const displayInitials = actor.initials ?? (actor.name ? actor.name.charAt(0).toUpperCase() : \"?\")\n\n return (\n <div className=\"mt-1 flex items-center gap-1.5 text-xs text-muted-foreground\" data-testid=\"actor-byline\">\n {actor.avatarUrl ? (\n <img\n src={actor.avatarUrl}\n alt={actor.name ?? \"User\"}\n className=\"h-4 w-4 rounded-full object-cover\"\n />\n ) : (\n <span className=\"flex h-4 w-4 items-center justify-center rounded-full bg-muted-foreground/10 text-[8px] font-semibold text-muted-foreground\">\n {displayInitials}\n </span>\n )}\n <span className=\"text-foreground font-medium\">{actor.name}</span>\n <span>{verb}</span>\n <span className=\"text-muted-foreground/40\">·</span>\n <span>{time}</span>\n </div>\n )\n}\n\nfunction TimelineItem({ event, isLast }: { event: TimelineEvent; isLast: boolean }) {\n const [expanded, setExpanded] = React.useState(event.defaultExpanded ?? false)\n const [showAllRecipients, setShowAllRecipients] = React.useState(false)\n const hasContent = !!event.content\n const hasEmail = !!event.email\n\n const toneStyle = event.tone ? TONE_CLASSES[event.tone] : null\n const dotClasses = toneStyle ? toneStyle.dot : NEUTRAL_DOT_CLASSES\n const iconClasses = toneStyle ? toneStyle.icon : NEUTRAL_ICON_CLASSES\n\n return (\n <div className=\"group relative flex gap-3.5\">\n {!isLast && (\n <div className=\"absolute left-[9px] top-5 bottom-[-6px] w-px bg-border/60\" />\n )}\n\n <div className=\"relative z-10 mt-1 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-background\">\n <div className={cn(\"flex h-4.5 w-4.5 items-center justify-center rounded-full border ring-4 ring-background\", dotClasses, iconClasses)} data-testid=\"timeline-dot\">\n {event.icon}\n </div>\n </div>\n\n <div className=\"flex-1 pb-5 pt-0.5\">\n <div className=\"flex min-w-0 flex-col gap-1 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"pr-4 text-[13px] leading-relaxed text-foreground\">\n {event.title}\n </div>\n <span className=\"mt-0.5 shrink-0 whitespace-nowrap text-[11px] text-muted-foreground/70\">\n {event.time}\n </span>\n </div>\n\n {event.actor && <ActorByline actor={event.actor} time={event.time} />}\n\n {(hasContent || hasEmail) && (\n <div className=\"mt-2\">\n {event.isInteractive ? (\n hasEmail ? (\n <div className=\"overflow-hidden rounded-md border border-border/80 bg-muted/20\">\n <div\n className={cn(\n \"px-3 py-2.5 text-sm\",\n !expanded && \"cursor-pointer hover:bg-muted/30 transition-colors\"\n )}\n onClick={() => !expanded && setExpanded(true)}\n >\n {expanded && event.email ? (\n <div className=\"space-y-3\">\n <div>\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex min-w-0 items-baseline gap-1.5\">\n <span className=\"font-semibold text-foreground text-[13px] whitespace-nowrap\">{event.email.from}</span>\n {event.email.fromEmail && (\n <span className=\"text-muted-foreground/60 text-xs truncate\">{event.email.fromEmail}</span>\n )}\n </div>\n {event.email.date && (\n <span className=\"shrink-0 text-xs text-muted-foreground/50 whitespace-nowrap\">{event.email.date}</span>\n )}\n </div>\n <div className=\"mt-0.5 flex items-center gap-1 text-xs text-muted-foreground\">\n <span className=\"truncate\">\n To {event.email.to}\n {!showAllRecipients && (event.email.cc || event.email.bcc) ? (\n <>, ...</>\n ) : null}\n {showAllRecipients && event.email.cc ? (\n <>, {event.email.cc}</>\n ) : null}\n {showAllRecipients && event.email.bcc ? (\n <> <span className=\"text-muted-foreground/40\">bcc</span> {event.email.bcc}</>\n ) : null}\n </span>\n {(event.email.cc || event.email.bcc) && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation()\n setShowAllRecipients((prev) => !prev)\n }}\n className=\"shrink-0 text-muted-foreground/40 hover:text-muted-foreground transition-colors\"\n >\n <ChevronDown className={cn(\"h-3 w-3 transition-transform\", showAllRecipients && \"rotate-180\")} />\n </button>\n )}\n </div>\n </div>\n\n <div className=\"whitespace-pre-line text-sm leading-relaxed text-foreground/90\">\n {event.email.body}\n </div>\n\n <button\n onClick={(e) => {\n e.stopPropagation()\n setExpanded(false)\n }}\n className=\"mt-2 flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Show less <ChevronUp className=\"h-3 w-3\" />\n </button>\n </div>\n ) : (\n <div className=\"flex items-center justify-between gap-2 text-muted-foreground\">\n <span className=\"line-clamp-1 pr-3 text-[13px]\">\n <span className=\"text-muted-foreground\">{event.email?.from}</span>\n <span className=\"mx-1.5 text-muted-foreground/40\">·</span>\n {event.email?.subject ? (\n <>\n <span className=\"text-muted-foreground\">{event.email.subject}</span>\n <span className=\"mx-1.5 text-muted-foreground/40\">·</span>\n </>\n ) : null}\n <span className=\"text-muted-foreground\">{event.preview}</span>\n </span>\n <button className=\"flex shrink-0 items-center gap-1 text-[11px] font-semibold uppercase tracking-wider transition-colors hover:text-foreground\">\n Expand <ChevronDown className=\"h-3 w-3\" />\n </button>\n </div>\n )}\n </div>\n </div>\n ) : (\n <div className=\"overflow-hidden rounded-md border border-border/80 bg-muted/20\">\n <div\n className={cn(\n \"px-3 py-2.5 text-sm\",\n !expanded && \"cursor-pointer hover:bg-muted/30 transition-colors\"\n )}\n onClick={() => !expanded && setExpanded(true)}\n >\n {expanded ? (\n <div className=\"space-y-2\">\n {event.content}\n <div className=\"mt-2 flex items-center gap-3\">\n {event.source ? (\n event.onSourceClick ? (\n <button\n type=\"button\"\n onClick={(e) => { e.stopPropagation(); event.onSourceClick?.(); }}\n className=\"mr-auto inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Open in {event.source.label}\n <ExternalLink className=\"h-3 w-3\" />\n </button>\n ) : (\n <a\n href={event.source.url}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n className=\"mr-auto inline-flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Open in {event.source.label}\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n )\n ) : null}\n <button\n onClick={(e) => { e.stopPropagation(); setExpanded(false); }}\n className=\"flex items-center gap-1.5 text-[11px] font-semibold uppercase tracking-wider text-muted-foreground transition-colors hover:text-foreground\"\n >\n Show less <ChevronUp className=\"h-3 w-3\" />\n </button>\n </div>\n </div>\n ) : (\n <div className=\"flex items-center justify-between gap-2 text-muted-foreground\">\n <span className=\"line-clamp-1 pr-3\">\n {event.preview ?? event.content}\n </span>\n <button className=\"flex shrink-0 items-center gap-1 text-[11px] font-semibold uppercase tracking-wider transition-colors hover:text-foreground\">\n Expand <ChevronDown className=\"h-3 w-3\" />\n </button>\n </div>\n )}\n </div>\n </div>\n )\n ) : (\n <div className=\"pr-2 text-sm leading-relaxed text-muted-foreground\">\n {event.content}\n </div>\n )}\n </div>\n )}\n </div>\n </div>\n )\n}\n"],"mappings":";AA4GQ,SAgHwB,UAhHxB,KAeF,YAfE;AA1GR,YAAY,WAAW;AACvB,SAAS,UAAU;AACnB,SAAS,aAAa,WAAW,oBAAoB;AAsD9C,MAAM,eAGT;AAAA,EACF,KAAK;AAAA,IACH,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,SAAS;AAAA,IACP,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,QAAQ;AAAA,IACN,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,YAAY;AAAA,IACV,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,OAAO;AAAA,IACL,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AACF;AAEA,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAOtB,SAAS,iBAAiB,EAAE,QAAQ,UAAU,GAA0B;AAC7E,SACE,oBAAC,SAAI,WAAW,GAAG,aAAa,SAAS,GACtC,iBAAO,IAAI,CAAC,OAAO,UAClB;AAAA,IAAC;AAAA;AAAA,MAEC;AAAA,MACA,QAAQ,UAAU,OAAO,SAAS;AAAA;AAAA,IAF7B,MAAM;AAAA,EAGb,CACD,GACH;AAEJ;AAEA,SAAS,YAAY,EAAE,OAAO,KAAK,GAAgD;AAtHnF;AAuHE,MAAI,MAAM,SAAS,SAAU,QAAO;AAEpC,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8H;AAAA;AAAA,cACvI,oBAAC,eAAY,WAAU,WAAU;AAAA,eAC1C;AAAA,aACF;AAAA;AAAA,MAEJ,GACF,IAGF,oBAAC,SAAI,WAAU,sDACZ,gBAAM,SACT,GAEJ;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["_a"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,6 @@ export { DataTableFilter, DataTableFilterCategory, DataTableFilterProps, FilterO
|
|
|
23
23
|
export { DataTableQuickViewValue, DataTableQuickViews } from './components/data-table-quick-views.js';
|
|
24
24
|
export { DataTableToolbar } from './components/data-table-toolbar.js';
|
|
25
25
|
export { Citation, DetailViewHeader, DetailViewSummary, DetailViewThread, SourceDef, SourceList, ThreadMessage } from './components/detail-view.js';
|
|
26
|
-
export { DetailDrawer, DetailDrawerProps } from './components/detail-drawer.js';
|
|
27
26
|
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from './components/dialog.js';
|
|
28
27
|
export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from './components/dropdown-menu.js';
|
|
29
28
|
export { EmptyState, EmptyStateProps } from './components/empty-state.js';
|
|
@@ -36,8 +35,6 @@ export { AssigneeFilter, InboxFilterCategory, InboxToolbar, InboxToolbarProps }
|
|
|
36
35
|
export { InlineBanner, InlineBannerProps } from './components/inline-banner.js';
|
|
37
36
|
export { Input } from './components/input.js';
|
|
38
37
|
export { FilterDefinition, InsightsFilterBar, InsightsFilterBarProps } from './components/insights-filter-bar.js';
|
|
39
|
-
export { DaysOpenCell, DaysOpenCellProps, getDaysOpenIntent } from './components/days-open-cell.js';
|
|
40
|
-
export { LinkedEntityCell, LinkedEntityCellProps } from './components/linked-entity-cell.js';
|
|
41
38
|
export { GroupedListGroup, GroupedListView, GroupedListViewProps, ItemList } from './components/item-list.js';
|
|
42
39
|
export { ItemListDisplay, ItemListDisplayState, ItemListGrouping, ItemListViewMode } from './components/item-list-display.js';
|
|
43
40
|
export { ItemListFilter, ItemListFilterCategory } from './components/item-list-filter.js';
|
|
@@ -45,13 +42,11 @@ export { ItemListQuickView, ItemListToolbar } from './components/item-list-toolb
|
|
|
45
42
|
export { KbdHint } from './components/kbd-hint.js';
|
|
46
43
|
export { Label } from './components/label.js';
|
|
47
44
|
export { Message, MessageAvatar, MessageAvatarProps, MessageContent, MessageContentProps, MessageProps } from './components/message.js';
|
|
48
|
-
export {
|
|
45
|
+
export { MetricCard, MetricCardProps, MetricDataPoint } from './components/metric-card.js';
|
|
49
46
|
export { PerformanceMetricsTable, PerformanceMetricsTableRow, PerformanceMetricsTableSortOption } from './components/performance-metrics-table.js';
|
|
50
|
-
export { Pill, PillProps, PillStatus, StatusPill, StatusPillProps, pillVariants } from './components/pill.js';
|
|
51
47
|
export { PreviewList, PreviewListItem, PreviewListItemProps } from './components/preview-list.js';
|
|
52
48
|
export { Progress } from './components/progress.js';
|
|
53
49
|
export { QuickActionChatArea, QuickActionSubmitPayload } from './components/quick-action-chat-area.js';
|
|
54
|
-
export { QuickSegment, QuickSegmentProps } from './components/quick-segment.js';
|
|
55
50
|
export { QuickActionModal, QuickActionPriority, QuickActionTaskDraft, QuickActionTemplate } from './components/quick-action-modal.js';
|
|
56
51
|
export { ActiveVariant, QuickActionSidebarNav, SidebarNavItem, SidebarNavSection, SidebarUserProfile, UserMenuItem } from './components/quick-action-sidebar-nav.js';
|
|
57
52
|
export { RecommendedAction, RecommendedActionsSection } from './components/recommended-actions-section.js';
|
|
@@ -81,7 +76,7 @@ export { Switch } from './components/switch.js';
|
|
|
81
76
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from './components/table.js';
|
|
82
77
|
export { Tabs, TabsContent, TabsList, TabsTrigger, tabsListVariants } from './components/tabs.js';
|
|
83
78
|
export { Textarea } from './components/textarea.js';
|
|
84
|
-
export { TimelineActivity, TimelineActivityProps, TimelineEvent } from './components/timeline-activity.js';
|
|
79
|
+
export { TONE_CLASSES, TimelineActivity, TimelineActivityProps, TimelineEvent, TimelineEventActor, TimelineEventTone } from './components/timeline-activity.js';
|
|
85
80
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './components/tooltip.js';
|
|
86
81
|
export { ActorByline, ActorBylineProps, UserPill, UserPillProps } from './components/user-display.js';
|
|
87
82
|
export { VariableAutocomplete, VariableAutocompleteProps, VariableDef, VariableGroup } from './components/variable-autocomplete.js';
|
|
@@ -97,7 +92,6 @@ export { VolumeAnalysisChart, VolumeAnalysisChartProps, VolumeDataKey } from './
|
|
|
97
92
|
export { MetricCardData, TopLineMetrics, TopLineMetricsProps } from './charts/top-line-metrics.js';
|
|
98
93
|
export { PipelineFilterBreakdown, PipelineOverview, PipelineOverviewProps, PipelineStage, PipelineStageMetrics, PipelineStageTiming } from './charts/pipeline-overview.js';
|
|
99
94
|
export { SankeyChart, SankeyData, SankeyDropOff, SankeyHoverCardData, SankeyLink, SankeyNode, SankeyStageMetrics } from './charts/sankey-chart.js';
|
|
100
|
-
export { EmptyChartState, EmptyChartStateProps } from './charts/empty-chart-state.js';
|
|
101
95
|
export { PrototypeShell, PrototypeShellProps } from './prototype/prototype-shell.js';
|
|
102
96
|
export { DetailView, DetailViewProps, PrototypeInboxView, PrototypeInboxViewProps } from './prototype/prototype-inbox-view.js';
|
|
103
97
|
export { PrototypeInsightsView, PrototypeInsightsViewProps } from './prototype/prototype-insights-view.js';
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,6 @@ export * from "./components/data-table-filter.js";
|
|
|
23
23
|
export * from "./components/data-table-quick-views.js";
|
|
24
24
|
export * from "./components/data-table-toolbar.js";
|
|
25
25
|
export * from "./components/detail-view.js";
|
|
26
|
-
export * from "./components/detail-drawer.js";
|
|
27
26
|
export * from "./components/dialog.js";
|
|
28
27
|
export * from "./components/dropdown-menu.js";
|
|
29
28
|
export * from "./components/empty-state.js";
|
|
@@ -36,8 +35,6 @@ export * from "./components/inbox-toolbar.js";
|
|
|
36
35
|
export * from "./components/inline-banner.js";
|
|
37
36
|
export * from "./components/input.js";
|
|
38
37
|
export * from "./components/insights-filter-bar.js";
|
|
39
|
-
export * from "./components/days-open-cell.js";
|
|
40
|
-
export * from "./components/linked-entity-cell.js";
|
|
41
38
|
export * from "./components/item-list.js";
|
|
42
39
|
export * from "./components/item-list-display.js";
|
|
43
40
|
export * from "./components/item-list-filter.js";
|
|
@@ -47,11 +44,9 @@ export * from "./components/label.js";
|
|
|
47
44
|
export * from "./components/message.js";
|
|
48
45
|
export * from "./components/metric-card.js";
|
|
49
46
|
export * from "./components/performance-metrics-table.js";
|
|
50
|
-
export * from "./components/pill.js";
|
|
51
47
|
export * from "./components/preview-list.js";
|
|
52
48
|
export * from "./components/progress.js";
|
|
53
49
|
export * from "./components/quick-action-chat-area.js";
|
|
54
|
-
export * from "./components/quick-segment.js";
|
|
55
50
|
import {
|
|
56
51
|
QuickActionModal
|
|
57
52
|
} from "./components/quick-action-modal.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\nexport { displayName, getInitials, shortName, type ProfileLike } from \"./lib/user-display\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @handled-ai/design-system\n * UI components and utilities (shadcn-style, New York)\n */\n\n// Utilities\nexport { cn } from \"./lib/utils\"\nexport { BRAND_ICONS, BRAND_GRAPHICS } from \"./lib/icons\"\nexport { displayName, getInitials, shortName, type ProfileLike } from \"./lib/user-display\"\n\n// Hooks\nexport { useIsMobile } from \"./hooks/use-mobile\"\n\n// Components (light — no recharts/nivo/three transitive deps)\nexport * from \"./components/activity-detail\"\nexport * from \"./components/activity-log\"\nexport * from \"./components/agent-popover\"\nexport * from \"./components/agent-widget\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/button\"\nexport * from \"./components/card\"\nexport { CollapsibleSection, type CollapsibleSectionProps } from \"./components/collapsible-section\"\nexport * from \"./components/compliance-badge\"\nexport * from \"./components/contact-chip\"\nexport * from \"./components/contact-list\"\nexport * from \"./components/contextual-quick-action-launcher\"\nexport * from \"./components/dashboard-cards\"\nexport * from \"./components/data-table\"\nexport * from \"./components/data-table-condition-filter\"\nexport * from \"./components/data-table-display\"\nexport * from \"./components/data-table-filter\"\nexport * from \"./components/data-table-quick-views\"\nexport * from \"./components/data-table-toolbar\"\nexport * from \"./components/detail-view\"\nexport * from \"./components/dialog\"\nexport * from \"./components/dropdown-menu\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/entity-panel\"\nexport { FeedbackFooter, FeedbackChipGroup, FeedbackInput, FeedbackActions } from \"./components/feedback-primitives\"\nexport type { FeedbackFooterProps, FeedbackChipTree, FeedbackChipGroupProps, FeedbackInputProps, FeedbackActionsProps, FeedbackSubmitData } from \"./components/feedback-primitives\"\nexport { SignalPriorityPopover } from \"./components/signal-priority-popover\"\nexport type { SignalPriorityPopoverProps, PriorityFactor } from \"./components/signal-priority-popover\"\nexport * from \"./components/filter-chip\"\nexport * from \"./components/inbox-row\"\nexport * from \"./components/inbox-toolbar\"\nexport * from \"./components/inline-banner\"\nexport * from \"./components/input\"\nexport * from \"./components/insights-filter-bar\"\nexport * from \"./components/item-list\"\nexport * from \"./components/item-list-display\"\nexport * from \"./components/item-list-filter\"\nexport * from \"./components/item-list-toolbar\"\nexport * from \"./components/kbd-hint\"\nexport * from \"./components/label\"\nexport * from \"./components/message\"\nexport * from \"./components/metric-card\"\nexport * from \"./components/performance-metrics-table\"\nexport * from \"./components/preview-list\"\nexport * from \"./components/progress\"\nexport * from \"./components/quick-action-chat-area\"\nexport {\n QuickActionModal,\n type QuickActionPriority,\n type QuickActionTaskDraft,\n type QuickActionTemplate,\n} from \"./components/quick-action-modal\"\nexport * from \"./components/quick-action-sidebar-nav\"\nexport * from \"./components/recommended-actions-section\"\nexport * from \"./components/report-card\"\nexport * from \"./components/rich-text-toolbar\"\nexport * from \"./components/score-analysis-modal\"\nexport * from \"./components/score-breakdown\"\nexport * from \"./components/score-feedback\"\nexport * from \"./components/score-why-chips\"\nexport * from \"./components/score-ring\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/sheet\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/signal-feedback-inline\"\nexport * from \"./components/simple-data-table\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/status-badge\"\nexport * from \"./components/step-timeline\"\nexport * from \"./components/sticky-action-bar\"\nexport * from \"./components/styled-bar-list\"\nexport { DraftFeedbackInline } from \"./components/draft-feedback-inline\"\nexport type { DraftFeedbackInlineProps } from \"./components/draft-feedback-inline\"\nexport { AccountContactsPopover, BrandIcon } from \"./components/account-contacts-popover\"\nexport type { AccountContactsPopoverProps } from \"./components/account-contacts-popover\"\nexport * from \"./components/suggested-actions\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline-activity\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/user-display\"\nexport * from \"./components/variable-autocomplete\"\nexport * from \"./components/view-mode-toggle\"\nexport * from \"./components/virtualized-data-table\"\nexport type { ColumnSizingState } from \"@tanstack/react-table\"\n\n// Charts (re-exported for backward compatibility with root imports)\nexport * from \"./charts/index\"\n\n// Prototype template system (re-exported for backward compatibility)\nexport * from \"./prototype/prototype-config\"\nexport * from \"./prototype/prototype-shell\"\nexport * from \"./prototype/prototype-inbox-view\"\nexport * from \"./prototype/prototype-insights-view\"\nexport * from \"./prototype/prototype-accounts-view\"\nexport * from \"./prototype/prototype-admin-view\"\nexport * from \"./prototype/prototype-work-queue-view\"\n"],"mappings":"AAMA,SAAS,UAAU;AACnB,SAAS,aAAa,sBAAsB;AAC5C,SAAS,aAAa,aAAa,iBAAmC;AAGtE,SAAS,mBAAmB;AAG5B,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,0BAAwD;AACjE,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,gBAAgB,mBAAmB,eAAe,uBAAuB;AAElF,SAAS,6BAA6B;AAEtC,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,OAIK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,2BAA2B;AAEpC,SAAS,wBAAwB,iBAAiB;AAElD,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAId,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
|
@@ -68,8 +68,18 @@ interface DetailViewProps {
|
|
|
68
68
|
onRequestApproval?: () => Promise<void>;
|
|
69
69
|
/** Number of important/attention-worthy events to highlight on the collapsed timeline header. */
|
|
70
70
|
attentionCount?: number;
|
|
71
|
+
/** Label for the system-events toggle button (e.g. "Score changes"). */
|
|
72
|
+
timelineSystemEventsToggleLabel?: string;
|
|
73
|
+
/** localStorage key for persisting the system-events toggle state. */
|
|
74
|
+
timelineSystemEventsStorageKey?: string;
|
|
75
|
+
/** Whether system-noise events are visible by default. @default false */
|
|
76
|
+
timelineSystemEventsDefaultVisible?: boolean;
|
|
77
|
+
/** Hint text shown below the timeline when system events are hidden. */
|
|
78
|
+
timelineSystemEventsHiddenHint?: string;
|
|
79
|
+
/** Hint text shown below the timeline when system events are visible. Uses {count} as placeholder. */
|
|
80
|
+
timelineSystemEventsVisibleHint?: string;
|
|
71
81
|
}
|
|
72
|
-
declare function DetailView({ item, sections, getSignalScore, buildSuggestedActions, buildSourceItems: _buildSourceItems, getTimelineEvents, accountContacts, emailSignature, iconMap, onOpenEntityPanel, onOpenRecentActivity, onSuggestedActionFeedback: _onSuggestedActionFeedback, onScoreFeedback: _onScoreFeedback, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderTitleExtra, renderTitleSubtext, renderMetadataExtra, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, }: DetailViewProps): React.JSX.Element;
|
|
82
|
+
declare function DetailView({ item, sections, getSignalScore, buildSuggestedActions, buildSourceItems: _buildSourceItems, getTimelineEvents, accountContacts, emailSignature, iconMap, onOpenEntityPanel, onOpenRecentActivity, onSuggestedActionFeedback: _onSuggestedActionFeedback, onScoreFeedback: _onScoreFeedback, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderTitleExtra, renderTitleSubtext, renderMetadataExtra, onOpenSignalBucket, approveButtonIconUrl, opportunityPreview, onRequestApproval, attentionCount, timelineSystemEventsToggleLabel, timelineSystemEventsStorageKey, timelineSystemEventsDefaultVisible, timelineSystemEventsHiddenHint, timelineSystemEventsVisibleHint, }: DetailViewProps): React.JSX.Element;
|
|
73
83
|
declare function PrototypeInboxView({ items, filterCategories, detailSections, accountContacts, buildAccountContacts, emailSignature, buildSuggestedActions: buildSuggestedActionsProp, buildSourceItems: buildSourceItemsProp, getSignalScore: getSignalScoreProp, getTimelineEvents, iconMap, hideToolbarActions, hideHoverActions, onSuggestedActionFeedback, onScoreFeedback, onOpenSignalBucket, headerActions, onOpenEntityPanel, onOpenRecentActivity, onItemSelect, defaultViewMode, buildEntityChips, quickFilterTabs, hideAccountsButton, accountDetailsLabel, onSignalApprove, getSignalApprovalState, signalLabels, hideApproveButton, signalBriefCopy, briefStyleVariant, renderDetailExtra, renderBeforeScore, renderAfterScore, lastActivityTime, renderTitleExtra, renderTitleSubtext, sortOptions, activeSortId, onSortChange, }: PrototypeInboxViewProps): React.JSX.Element;
|
|
74
84
|
|
|
75
85
|
export { DetailView, type DetailViewProps, PrototypeInboxView, type PrototypeInboxViewProps };
|
|
@@ -117,11 +117,40 @@ function DetailView({
|
|
|
117
117
|
approveButtonIconUrl,
|
|
118
118
|
opportunityPreview,
|
|
119
119
|
onRequestApproval,
|
|
120
|
-
attentionCount
|
|
120
|
+
attentionCount,
|
|
121
|
+
timelineSystemEventsToggleLabel,
|
|
122
|
+
timelineSystemEventsStorageKey,
|
|
123
|
+
timelineSystemEventsDefaultVisible = false,
|
|
124
|
+
timelineSystemEventsHiddenHint,
|
|
125
|
+
timelineSystemEventsVisibleHint
|
|
121
126
|
}) {
|
|
122
|
-
var _a, _b, _c
|
|
127
|
+
var _a, _b, _c;
|
|
123
128
|
const [showTimeline, setShowTimeline] = React.useState(false);
|
|
124
129
|
const [extraActions, setExtraActions] = React.useState([]);
|
|
130
|
+
const [showSystemEvents, setShowSystemEvents] = React.useState(timelineSystemEventsDefaultVisible);
|
|
131
|
+
const initialReadDoneRef = React.useRef(false);
|
|
132
|
+
React.useEffect(() => {
|
|
133
|
+
if (!timelineSystemEventsStorageKey) {
|
|
134
|
+
initialReadDoneRef.current = true;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
const stored = localStorage.getItem(timelineSystemEventsStorageKey);
|
|
139
|
+
if (stored !== null) {
|
|
140
|
+
setShowSystemEvents(stored === "true");
|
|
141
|
+
}
|
|
142
|
+
} catch (e) {
|
|
143
|
+
}
|
|
144
|
+
initialReadDoneRef.current = true;
|
|
145
|
+
}, [timelineSystemEventsStorageKey]);
|
|
146
|
+
React.useEffect(() => {
|
|
147
|
+
if (!timelineSystemEventsStorageKey) return;
|
|
148
|
+
if (!initialReadDoneRef.current) return;
|
|
149
|
+
try {
|
|
150
|
+
localStorage.setItem(timelineSystemEventsStorageKey, String(showSystemEvents));
|
|
151
|
+
} catch (e) {
|
|
152
|
+
}
|
|
153
|
+
}, [showSystemEvents, timelineSystemEventsStorageKey]);
|
|
125
154
|
React.useEffect(() => {
|
|
126
155
|
setShowTimeline(false);
|
|
127
156
|
setExtraActions([]);
|
|
@@ -249,37 +278,76 @@ function DetailView({
|
|
|
249
278
|
] });
|
|
250
279
|
})(),
|
|
251
280
|
renderAfterScore == null ? void 0 : renderAfterScore(item),
|
|
252
|
-
sections.timeline && timelineEvents.length > 0 &&
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
sections.timeline && timelineEvents.length > 0 && (() => {
|
|
282
|
+
const visibleEvents = timelineEvents.filter(
|
|
283
|
+
(e) => !e.isSystemNoise || showSystemEvents
|
|
284
|
+
);
|
|
285
|
+
const hiddenCount = timelineEvents.filter((e) => e.isSystemNoise).length;
|
|
286
|
+
const hasSystemNoise = hiddenCount > 0;
|
|
287
|
+
const showToggle = hasSystemNoise && !!(timelineSystemEventsToggleLabel || timelineSystemEventsStorageKey);
|
|
288
|
+
const firstVisibleTime = lastActivityTime != null ? lastActivityTime : visibleEvents.length > 0 ? visibleEvents[0].time : "";
|
|
289
|
+
const visibleCount = visibleEvents.length;
|
|
290
|
+
const eventCountLabel = `${visibleCount} ${visibleCount === 1 ? "event" : "events"}`;
|
|
291
|
+
return /* @__PURE__ */ jsxs("div", { className: "mb-8", children: [
|
|
292
|
+
/* @__PURE__ */ jsxs(
|
|
293
|
+
"div",
|
|
294
|
+
{
|
|
295
|
+
className: "group/timeline flex w-full items-center justify-between gap-2 py-2 rounded-md transition-colors hover:bg-muted/40 -mx-2 px-2",
|
|
296
|
+
"data-testid": "timeline-header",
|
|
297
|
+
children: [
|
|
298
|
+
/* @__PURE__ */ jsxs(
|
|
299
|
+
"button",
|
|
300
|
+
{
|
|
301
|
+
type: "button",
|
|
302
|
+
onClick: () => setShowTimeline((prev) => !prev),
|
|
303
|
+
className: "flex items-center gap-2 cursor-pointer bg-transparent border-0 p-0",
|
|
304
|
+
"data-testid": "timeline-collapse-btn",
|
|
305
|
+
children: [
|
|
306
|
+
/* @__PURE__ */ jsx("h3", { className: "text-xs font-bold text-muted-foreground uppercase tracking-wider group-hover/timeline:text-foreground transition-colors", children: "Activity timeline" }),
|
|
307
|
+
!showTimeline && attentionCount != null && attentionCount > 0 && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1 rounded-full bg-destructive/10 px-1.5 py-0.5 text-[10px] font-semibold text-destructive border border-destructive/20", children: [
|
|
308
|
+
attentionCount,
|
|
309
|
+
" new"
|
|
310
|
+
] }),
|
|
311
|
+
!showTimeline && firstVisibleTime && /* @__PURE__ */ jsxs("span", { className: "text-[11px] text-muted-foreground/60", "data-testid": "last-activity-hint", children: [
|
|
312
|
+
"\xB7 Last activity ",
|
|
313
|
+
firstVisibleTime
|
|
314
|
+
] }),
|
|
315
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
316
|
+
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium text-muted-foreground", "data-testid": "event-count", children: eventCountLabel }),
|
|
317
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: `h-3.5 w-3.5 text-muted-foreground transition-transform duration-200 ${showTimeline ? "rotate-180" : ""}` })
|
|
318
|
+
] })
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
),
|
|
322
|
+
showToggle && /* @__PURE__ */ jsxs(
|
|
323
|
+
"button",
|
|
324
|
+
{
|
|
325
|
+
type: "button",
|
|
326
|
+
onClick: () => setShowSystemEvents((prev) => !prev),
|
|
327
|
+
className: "flex shrink-0 items-center gap-1.5 rounded-full border border-border bg-background px-2.5 py-1 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground cursor-pointer",
|
|
328
|
+
"aria-pressed": showSystemEvents,
|
|
329
|
+
"data-testid": "system-events-toggle",
|
|
330
|
+
children: [
|
|
331
|
+
timelineSystemEventsToggleLabel != null ? timelineSystemEventsToggleLabel : "System events",
|
|
332
|
+
/* @__PURE__ */ jsx(
|
|
333
|
+
"span",
|
|
334
|
+
{
|
|
335
|
+
className: "inline-flex items-center justify-center rounded-full bg-muted px-1.5 text-[10px] font-semibold min-w-[18px] tabular-nums",
|
|
336
|
+
"data-testid": "hidden-count-badge",
|
|
337
|
+
children: hiddenCount
|
|
338
|
+
}
|
|
339
|
+
)
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
)
|
|
343
|
+
]
|
|
344
|
+
}
|
|
345
|
+
),
|
|
346
|
+
showTimeline && visibleEvents.length > 0 && /* @__PURE__ */ jsx("div", { className: "mt-3", children: /* @__PURE__ */ jsx(TimelineActivity, { events: visibleEvents }) }),
|
|
347
|
+
showTimeline && !showSystemEvents && timelineSystemEventsHiddenHint && hasSystemNoise && /* @__PURE__ */ jsx("p", { className: "mt-2 text-[11px] text-muted-foreground/60 border-t border-dashed border-border pt-2", "data-testid": "timeline-footer-hint", children: timelineSystemEventsHiddenHint }),
|
|
348
|
+
showTimeline && showSystemEvents && timelineSystemEventsVisibleHint && hasSystemNoise && /* @__PURE__ */ jsx("p", { className: "mt-2 text-[11px] text-muted-foreground/60 border-t border-dashed border-border pt-2", "data-testid": "timeline-footer-hint", children: timelineSystemEventsVisibleHint.replace("{count}", String(hiddenCount)) })
|
|
349
|
+
] });
|
|
350
|
+
})()
|
|
283
351
|
] }),
|
|
284
352
|
sections.suggestedActions && /* @__PURE__ */ jsx(SignalApproval.Gate, { children: /* @__PURE__ */ jsx(
|
|
285
353
|
SuggestedActions,
|