@snksergio/design-system 0.1.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/README.md +260 -0
- package/dist-lib/chunks/app-shell-BNTvOETJ.mjs +2681 -0
- package/dist-lib/chunks/app-shell-BNTvOETJ.mjs.map +1 -0
- package/dist-lib/chunks/app-shell-CDy42aNI.mjs +2663 -0
- package/dist-lib/chunks/app-shell-CDy42aNI.mjs.map +1 -0
- package/dist-lib/chunks/app-shell-mocks-kWIVSzLs.mjs +208 -0
- package/dist-lib/chunks/app-shell-mocks-kWIVSzLs.mjs.map +1 -0
- package/dist-lib/chunks/app-shell-mocks-oO_IV3Gw.mjs +207 -0
- package/dist-lib/chunks/app-shell-mocks-oO_IV3Gw.mjs.map +1 -0
- package/dist-lib/chunks/badge-B_2Zt52o.mjs +797 -0
- package/dist-lib/chunks/badge-B_2Zt52o.mjs.map +1 -0
- package/dist-lib/chunks/badge-DKpXURa1.mjs +813 -0
- package/dist-lib/chunks/badge-DKpXURa1.mjs.map +1 -0
- package/dist-lib/chunks/chat-v2-mocks-BV9Wha_Z.mjs +192 -0
- package/dist-lib/chunks/chat-v2-mocks-BV9Wha_Z.mjs.map +1 -0
- package/dist-lib/chunks/chat-v2-mocks-DvZRkhmz.mjs +193 -0
- package/dist-lib/chunks/chat-v2-mocks-DvZRkhmz.mjs.map +1 -0
- package/dist-lib/chunks/chip-group-CsKBBHW2.mjs +796 -0
- package/dist-lib/chunks/chip-group-CsKBBHW2.mjs.map +1 -0
- package/dist-lib/chunks/chip-group-D3D0i72q.mjs +780 -0
- package/dist-lib/chunks/chip-group-D3D0i72q.mjs.map +1 -0
- package/dist-lib/chunks/clientes-showcase-mocks-BMfbNNJh.mjs +185 -0
- package/dist-lib/chunks/clientes-showcase-mocks-BMfbNNJh.mjs.map +1 -0
- package/dist-lib/chunks/clientes-showcase-mocks-Cq9u3nGZ.mjs +169 -0
- package/dist-lib/chunks/clientes-showcase-mocks-Cq9u3nGZ.mjs.map +1 -0
- package/dist-lib/chunks/input-374MpdBL.mjs +72 -0
- package/dist-lib/chunks/input-374MpdBL.mjs.map +1 -0
- package/dist-lib/chunks/input-DF4XAWmr.mjs +56 -0
- package/dist-lib/chunks/input-DF4XAWmr.mjs.map +1 -0
- package/dist-lib/chunks/page-header-Dw-3wqAG.mjs +75 -0
- package/dist-lib/chunks/page-header-Dw-3wqAG.mjs.map +1 -0
- package/dist-lib/chunks/page-header-mC1gGtOI.mjs +76 -0
- package/dist-lib/chunks/page-header-mC1gGtOI.mjs.map +1 -0
- package/dist-lib/chunks/panel-Ds15whqp.mjs +9717 -0
- package/dist-lib/chunks/panel-Ds15whqp.mjs.map +1 -0
- package/dist-lib/chunks/panel-bzNmFlEZ.mjs +9737 -0
- package/dist-lib/chunks/panel-bzNmFlEZ.mjs.map +1 -0
- package/dist-lib/chunks/useTheme-BUPLZBMs.mjs +66 -0
- package/dist-lib/chunks/useTheme-BUPLZBMs.mjs.map +1 -0
- package/dist-lib/chunks/useTheme-Dee4mo-A.mjs +65 -0
- package/dist-lib/chunks/useTheme-Dee4mo-A.mjs.map +1 -0
- package/dist-lib/index.cjs +1207 -0
- package/dist-lib/index.cjs.map +1 -0
- package/dist-lib/index.d.ts +2 -0
- package/dist-lib/index.mjs +1209 -0
- package/dist-lib/index.mjs.map +1 -0
- package/dist-lib/preview/chat.cjs +1120 -0
- package/dist-lib/preview/chat.cjs.map +1 -0
- package/dist-lib/preview/chat.d.ts +6 -0
- package/dist-lib/preview/chat.mjs +1120 -0
- package/dist-lib/preview/chat.mjs.map +1 -0
- package/dist-lib/preview/clientes.cjs +897 -0
- package/dist-lib/preview/clientes.cjs.map +1 -0
- package/dist-lib/preview/clientes.d.ts +6 -0
- package/dist-lib/preview/clientes.mjs +897 -0
- package/dist-lib/preview/clientes.mjs.map +1 -0
- package/dist-lib/preview/dashboard.cjs +733 -0
- package/dist-lib/preview/dashboard.cjs.map +1 -0
- package/dist-lib/preview/dashboard.d.ts +4 -0
- package/dist-lib/preview/dashboard.mjs +733 -0
- package/dist-lib/preview/dashboard.mjs.map +1 -0
- package/dist-lib/preview/mocks.cjs +15 -0
- package/dist-lib/preview/mocks.cjs.map +1 -0
- package/dist-lib/preview/mocks.d.ts +2 -0
- package/dist-lib/preview/mocks.mjs +15 -0
- package/dist-lib/preview/mocks.mjs.map +1 -0
- package/dist-lib/theme.css +668 -0
- package/dist-lib/tokens.cjs +915 -0
- package/dist-lib/tokens.cjs.map +1 -0
- package/dist-lib/tokens.d.ts +2 -0
- package/dist-lib/tokens.mjs +915 -0
- package/dist-lib/tokens.mjs.map +1 -0
- package/package.json +142 -0
|
@@ -0,0 +1,733 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const useTheme = require("../chunks/useTheme-Dee4mo-A.mjs");
|
|
6
|
+
const lucideReact = require("lucide-react");
|
|
7
|
+
const recharts = require("recharts");
|
|
8
|
+
const chipGroup = require("../chunks/chip-group-CsKBBHW2.mjs");
|
|
9
|
+
const appShell = require("../chunks/app-shell-BNTvOETJ.mjs");
|
|
10
|
+
const pageHeader = require("../chunks/page-header-Dw-3wqAG.mjs");
|
|
11
|
+
const appShellMocks = require("../chunks/app-shell-mocks-oO_IV3Gw.mjs");
|
|
12
|
+
const KPIS_PRIMARY = [
|
|
13
|
+
{
|
|
14
|
+
id: "in-conv",
|
|
15
|
+
title: "Em atendimento",
|
|
16
|
+
value: "12",
|
|
17
|
+
delta: { value: "+3", direction: "up", positive: true, label: "vs ontem" },
|
|
18
|
+
icon: lucideReact.Phone,
|
|
19
|
+
tone: "success"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "waiting",
|
|
23
|
+
title: "Em espera",
|
|
24
|
+
value: "4",
|
|
25
|
+
delta: { value: "+1", direction: "up", positive: false, label: "vs ontem" },
|
|
26
|
+
icon: lucideReact.Timer,
|
|
27
|
+
tone: "warning"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "finished",
|
|
31
|
+
title: "Resolvidos hoje",
|
|
32
|
+
value: "87",
|
|
33
|
+
delta: { value: "+12%", direction: "up", positive: true, label: "vs semana" },
|
|
34
|
+
icon: lucideReact.CheckCircle2,
|
|
35
|
+
tone: "info"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "new",
|
|
39
|
+
title: "Novos contatos",
|
|
40
|
+
value: "260",
|
|
41
|
+
delta: { value: "+24", direction: "up", positive: true, label: "vs ontem" },
|
|
42
|
+
icon: lucideReact.UserPlus,
|
|
43
|
+
tone: "brand"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: "talk",
|
|
47
|
+
title: "Tempo médio atend.",
|
|
48
|
+
value: "4m 32s",
|
|
49
|
+
delta: { value: "-12s", direction: "down", positive: true, label: "melhorou" },
|
|
50
|
+
icon: lucideReact.Clock,
|
|
51
|
+
tone: "neutral"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: "wait",
|
|
55
|
+
title: "Tempo médio espera",
|
|
56
|
+
value: "1m 18s",
|
|
57
|
+
delta: { value: "-8s", direction: "down", positive: true, label: "melhorou" },
|
|
58
|
+
icon: lucideReact.Timer,
|
|
59
|
+
tone: "neutral"
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
const KPIS_QUALITY = [
|
|
63
|
+
{
|
|
64
|
+
id: "frt",
|
|
65
|
+
title: "First Response Time",
|
|
66
|
+
value: "42s",
|
|
67
|
+
delta: { value: "-5s", direction: "down", positive: true, label: "melhorou" },
|
|
68
|
+
icon: lucideReact.TrendingUp,
|
|
69
|
+
tone: "info"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: "csat",
|
|
73
|
+
title: "CSAT",
|
|
74
|
+
value: "4.7",
|
|
75
|
+
delta: { value: "+0.2", direction: "up", positive: true, label: "vs semana" },
|
|
76
|
+
icon: lucideReact.Star,
|
|
77
|
+
tone: "warning"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
id: "nps",
|
|
81
|
+
title: "NPS",
|
|
82
|
+
value: "68",
|
|
83
|
+
delta: { value: "+5", direction: "up", positive: true, label: "vs mês" },
|
|
84
|
+
icon: lucideReact.Headphones,
|
|
85
|
+
tone: "success"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: "ai",
|
|
89
|
+
title: "Resolvido por IA",
|
|
90
|
+
value: "32%",
|
|
91
|
+
delta: { value: "+4%", direction: "up", positive: true, label: "vs semana" },
|
|
92
|
+
icon: lucideReact.Bot,
|
|
93
|
+
tone: "brand"
|
|
94
|
+
}
|
|
95
|
+
];
|
|
96
|
+
const VOLUME_BY_MONTH = [
|
|
97
|
+
{ m: "Jan", human: 2400, ai: 1200 },
|
|
98
|
+
{ m: "Feb", human: 4e3, ai: 2800 },
|
|
99
|
+
{ m: "Mar", human: 3500, ai: 2200 },
|
|
100
|
+
{ m: "Apr", human: 3800, ai: 2900 },
|
|
101
|
+
{ m: "May", human: 2700, ai: 2300 },
|
|
102
|
+
{ m: "Jun", human: 3200, ai: 2700 },
|
|
103
|
+
{ m: "Jul", human: 2600, ai: 2700 },
|
|
104
|
+
{ m: "Aug", human: 4500, ai: 3200 },
|
|
105
|
+
{ m: "Sep", human: 2800, ai: 2700 },
|
|
106
|
+
{ m: "Oct", human: 4200, ai: 2300 },
|
|
107
|
+
{ m: "Nov", human: 2600, ai: 2700 },
|
|
108
|
+
{ m: "Dec", human: 3e3, ai: 4e3 }
|
|
109
|
+
];
|
|
110
|
+
const REGIONS = [
|
|
111
|
+
{ name: "São Paulo", value: 1650, color: "var(--color-fg-brand)", delta: "+4.7%", positive: true },
|
|
112
|
+
{ name: "Rio de Janeiro", value: 350, color: "var(--color-fg-warning)", delta: "+2.1%", positive: true },
|
|
113
|
+
{ name: "Belo Horizonte", value: 498, color: "var(--color-fg-info)", delta: "-1.7%", positive: false }
|
|
114
|
+
];
|
|
115
|
+
const CHANNELS = [
|
|
116
|
+
{ id: "whatsapp", name: "WhatsApp", volume: "8.49k", color: "#25d366", icon: lucideReact.MessageSquare, status: "active" },
|
|
117
|
+
{ id: "instagram", name: "Instagram", volume: "6.98k", color: "#e1306c", icon: lucideReact.MessageSquare, status: "active" },
|
|
118
|
+
{ id: "telegram", name: "Telegram", volume: "3.21k", color: "#0088cc", icon: lucideReact.Send, status: "paused" },
|
|
119
|
+
{ id: "email", name: "Email", volume: "2.14k", color: "#8754ec", icon: lucideReact.Mail, status: "active" },
|
|
120
|
+
{ id: "webchat", name: "Web Chat", volume: "1.50k", color: "#0a3a2e", icon: lucideReact.MessageSquare, status: "off" }
|
|
121
|
+
];
|
|
122
|
+
const CHANNEL_STATUS_LABEL = {
|
|
123
|
+
active: "Ativo",
|
|
124
|
+
paused: "Pausado",
|
|
125
|
+
off: "Desligado"
|
|
126
|
+
};
|
|
127
|
+
const CHANNEL_STATUS_TONE = {
|
|
128
|
+
active: "success",
|
|
129
|
+
paused: "warning",
|
|
130
|
+
off: "neutral"
|
|
131
|
+
};
|
|
132
|
+
const OPEN_CONVS = [
|
|
133
|
+
{ id: "#A-2453", name: "Maria Hernandez", initials: "MH", hex: "#f59e0b", channel: "whatsapp", status: "attending", waitTime: "2m", agent: { initials: "AC", name: "Aline Castro", hex: "#f59e0b" } },
|
|
134
|
+
{ id: "#A-2455", name: "James Johnson", initials: "JJ", hex: "#0a3a2e", channel: "telegram", status: "waiting", waitTime: "8m" },
|
|
135
|
+
{ id: "#A-2458", name: "Camila Ribeiro", initials: "CR", hex: "#8754ec", channel: "instagram", status: "attending", waitTime: "1m", agent: { initials: "VC", name: "Você", hex: "#0a3a2e" } },
|
|
136
|
+
{ id: "#A-2461", name: "Roberto Souza", initials: "RS", hex: "#0088cc", channel: "whatsapp", status: "ai", waitTime: "3m" },
|
|
137
|
+
{ id: "#A-2466", name: "Ana Costa", initials: "AC", hex: "#1cb280", channel: "email", status: "waiting", waitTime: "14m" }
|
|
138
|
+
];
|
|
139
|
+
const STATUS_LABEL = {
|
|
140
|
+
attending: "Em atendimento",
|
|
141
|
+
waiting: "Em espera",
|
|
142
|
+
ai: "IA"
|
|
143
|
+
};
|
|
144
|
+
const STATUS_TONE = {
|
|
145
|
+
attending: "success",
|
|
146
|
+
waiting: "warning",
|
|
147
|
+
ai: "info"
|
|
148
|
+
};
|
|
149
|
+
const AGENTS = [
|
|
150
|
+
{ id: "aline", name: "Aline Castro", initials: "AC", hex: "#f59e0b", active: true, resolved: 24, avgTime: "3m 12s", csat: 4.9 },
|
|
151
|
+
{ id: "carlos", name: "Carlos Souza", initials: "CS", hex: "#8754ec", active: true, resolved: 19, avgTime: "4m 45s", csat: 4.7 },
|
|
152
|
+
{ id: "maria", name: "Maria Lima", initials: "ML", hex: "#ef4444", active: false, resolved: 17, avgTime: "5m 03s", csat: 4.5 },
|
|
153
|
+
{ id: "joao", name: "João Pereira", initials: "JP", hex: "#1cb280", active: true, resolved: 15, avgTime: "3m 58s", csat: 4.8 },
|
|
154
|
+
{ id: "you", name: "Você", initials: "VC", hex: "#0a3a2e", active: true, resolved: 12, avgTime: "4m 11s", csat: 4.6 }
|
|
155
|
+
];
|
|
156
|
+
const TRAFFIC_ROWS = [
|
|
157
|
+
{ source: "Direct", visits: "1.300", bounce: "30%", goal: 80, goalColor: "var(--color-fg-warning)" },
|
|
158
|
+
{ source: "Email Campaign", visits: "5.000", bounce: "45%", goal: 40, goalColor: "var(--color-fg-success)" },
|
|
159
|
+
{ source: "Organic", visits: "3.000", bounce: "10%", goal: 55, goalColor: "var(--color-fg-warning)" },
|
|
160
|
+
{ source: "Paid Search", visits: "2.450", bounce: "22%", goal: 68, goalColor: "var(--color-fg-success)" },
|
|
161
|
+
{ source: "Social", visits: "1.870", bounce: "55%", goal: 25, goalColor: "var(--color-fg-danger)" },
|
|
162
|
+
{ source: "Referral", visits: "940", bounce: "18%", goal: 72, goalColor: "var(--color-fg-success)" }
|
|
163
|
+
];
|
|
164
|
+
const TONE_CLASSES = {
|
|
165
|
+
brand: { bg: "bg-bg-brand-subtle", fg: "text-fg-brand" },
|
|
166
|
+
success: { bg: "bg-bg-success-muted", fg: "text-fg-success" },
|
|
167
|
+
warning: { bg: "bg-bg-warning-muted", fg: "text-fg-warning" },
|
|
168
|
+
info: { bg: "bg-bg-info-muted", fg: "text-fg-info" },
|
|
169
|
+
danger: { bg: "bg-bg-danger-muted", fg: "text-fg-danger" },
|
|
170
|
+
neutral: { bg: "bg-bg-muted", fg: "text-fg-muted" }
|
|
171
|
+
};
|
|
172
|
+
function KpiCard({ kpi }) {
|
|
173
|
+
const Icon = kpi.icon;
|
|
174
|
+
const cls = TONE_CLASSES[kpi.tone];
|
|
175
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "flex flex-col gap-gp-lg p-pad-3xl bg-bg-surface border border-border-subtle rounded-radius-xl shadow-sh-sm", children: [
|
|
176
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-start justify-between gap-gp-md", children: [
|
|
177
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "m-0 text-paragraph-sm font-semibold text-fg-default", children: kpi.title }),
|
|
178
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
179
|
+
"span",
|
|
180
|
+
{
|
|
181
|
+
className: chipGroup.cn(
|
|
182
|
+
"grid place-items-center size-form-lg rounded-radius-lg shrink-0",
|
|
183
|
+
cls.bg,
|
|
184
|
+
cls.fg
|
|
185
|
+
),
|
|
186
|
+
"aria-hidden": true,
|
|
187
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "size-icon-md", strokeWidth: 1.8 })
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
] }),
|
|
191
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-gp-xs", children: [
|
|
192
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-md flex-wrap", children: [
|
|
193
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[26px] font-bold text-fg-default leading-none [font-variant-numeric:tabular-nums]", children: kpi.value }),
|
|
194
|
+
kpi.delta && /* @__PURE__ */ jsxRuntime.jsx(
|
|
195
|
+
chipGroup.Chip,
|
|
196
|
+
{
|
|
197
|
+
color: kpi.delta.positive ? "success" : "danger",
|
|
198
|
+
variant: "soft",
|
|
199
|
+
size: "sm",
|
|
200
|
+
shape: "pill",
|
|
201
|
+
children: kpi.delta.value
|
|
202
|
+
}
|
|
203
|
+
)
|
|
204
|
+
] }),
|
|
205
|
+
kpi.delta && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-fg-subtle", children: kpi.delta.label })
|
|
206
|
+
] })
|
|
207
|
+
] });
|
|
208
|
+
}
|
|
209
|
+
function WelcomeBanner() {
|
|
210
|
+
return /* @__PURE__ */ jsxRuntime.jsx("article", { className: "relative overflow-hidden bg-bg-brand rounded-radius-xl p-pad-4xl flex items-center gap-gp-2xl flex-1 w-full", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-gp-md flex-1 min-w-0 z-[1]", children: [
|
|
211
|
+
/* @__PURE__ */ jsxRuntime.jsxs("h2", { className: "m-0 flex items-center gap-gp-md text-[22px] font-bold text-fg-on-brand", children: [
|
|
212
|
+
"Boa tarde, Sergio",
|
|
213
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sun, { className: "size-icon-md text-fg-warning", fill: "currentColor" })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { className: "m-0 text-paragraph-sm text-fg-on-brand opacity-80 max-w-[480px]", children: [
|
|
216
|
+
"Acompanhe a performance da sua equipe hoje.",
|
|
217
|
+
/* @__PURE__ */ jsxRuntime.jsx("br", {}),
|
|
218
|
+
"Snapshot rápido das principais métricas do atendimento."
|
|
219
|
+
] }),
|
|
220
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
221
|
+
chipGroup.Button,
|
|
222
|
+
{
|
|
223
|
+
color: "secondary",
|
|
224
|
+
variant: "filled",
|
|
225
|
+
size: "md",
|
|
226
|
+
iconRight: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ArrowRight, {}),
|
|
227
|
+
className: "bg-bg-surface text-fg-default hover:bg-bg-muted",
|
|
228
|
+
children: "Ver relatório completo"
|
|
229
|
+
}
|
|
230
|
+
) })
|
|
231
|
+
] }) });
|
|
232
|
+
}
|
|
233
|
+
function KeyInsightsCard() {
|
|
234
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("article", { className: "flex flex-col gap-gp-md p-pad-3xl bg-bg-surface border border-border-subtle rounded-radius-xl shadow-sh-sm h-full", children: [
|
|
235
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between gap-gp-md", children: [
|
|
236
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "m-0 text-[15px] font-bold text-fg-default", children: "Key Insights" }),
|
|
237
|
+
/* @__PURE__ */ jsxRuntime.jsx(chipGroup.Button, { color: "secondary", variant: "ghost", size: "icon-sm", "aria-label": "Mais opções", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, {}) })
|
|
238
|
+
] }),
|
|
239
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 text-[12px] text-fg-muted", children: "Receita acumulada (anual)" }),
|
|
240
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-md flex-wrap", children: [
|
|
241
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[26px] font-bold text-fg-default leading-none [font-variant-numeric:tabular-nums]", children: "R$ 395.7k" }),
|
|
242
|
+
/* @__PURE__ */ jsxRuntime.jsx(chipGroup.Chip, { color: "success", variant: "soft", size: "sm", shape: "pill", children: "+2.7%" })
|
|
243
|
+
] }),
|
|
244
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-auto flex flex-col gap-gp-md", children: [
|
|
245
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-[8px] gap-[2px] rounded-radius-full overflow-hidden", children: [
|
|
246
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-bg-brand", style: { flex: 4 }, "aria-hidden": true }),
|
|
247
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-bg-warning", style: { flex: 3 }, "aria-hidden": true }),
|
|
248
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "bg-bg-info", style: { flex: 4 }, "aria-hidden": true })
|
|
249
|
+
] }),
|
|
250
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-lg flex-wrap text-[11px] text-fg-muted", children: [
|
|
251
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[5px]", children: [
|
|
252
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-[8px] rounded-radius-full bg-bg-brand", "aria-hidden": true }),
|
|
253
|
+
"São Paulo"
|
|
254
|
+
] }),
|
|
255
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[5px]", children: [
|
|
256
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-[8px] rounded-radius-full bg-bg-warning", "aria-hidden": true }),
|
|
257
|
+
"Rio"
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[5px]", children: [
|
|
260
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-[8px] rounded-radius-full bg-bg-info", "aria-hidden": true }),
|
|
261
|
+
"MG"
|
|
262
|
+
] })
|
|
263
|
+
] })
|
|
264
|
+
] })
|
|
265
|
+
] });
|
|
266
|
+
}
|
|
267
|
+
function SectionCard({
|
|
268
|
+
title,
|
|
269
|
+
subtitle,
|
|
270
|
+
action,
|
|
271
|
+
children,
|
|
272
|
+
className
|
|
273
|
+
}) {
|
|
274
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
275
|
+
"section",
|
|
276
|
+
{
|
|
277
|
+
className: chipGroup.cn(
|
|
278
|
+
"flex flex-col gap-gp-2xl p-pad-3xl bg-bg-surface border border-border-subtle rounded-radius-xl shadow-sh-sm",
|
|
279
|
+
className
|
|
280
|
+
),
|
|
281
|
+
children: [
|
|
282
|
+
/* @__PURE__ */ jsxRuntime.jsxs("header", { className: "flex items-center justify-between gap-gp-md", children: [
|
|
283
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-[2px] min-w-0", children: [
|
|
284
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "m-0 text-[15px] font-bold text-fg-default", children: title }),
|
|
285
|
+
subtitle && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "m-0 text-[12px] text-fg-muted", children: subtitle })
|
|
286
|
+
] }),
|
|
287
|
+
action ?? /* @__PURE__ */ jsxRuntime.jsx(chipGroup.Button, { color: "secondary", variant: "ghost", size: "icon-sm", "aria-label": "Mais opções", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, {}) })
|
|
288
|
+
] }),
|
|
289
|
+
children
|
|
290
|
+
]
|
|
291
|
+
}
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
const CHART_TOOLTIP_STYLE = {
|
|
295
|
+
borderRadius: 10,
|
|
296
|
+
border: "1px solid var(--color-border-default)",
|
|
297
|
+
background: "var(--color-bg-surface-elevated)",
|
|
298
|
+
color: "var(--color-fg-default)",
|
|
299
|
+
fontSize: 12,
|
|
300
|
+
boxShadow: "rgba(0,0,0,0.18) 0 12px 24px -4px",
|
|
301
|
+
padding: "8px 12px"
|
|
302
|
+
};
|
|
303
|
+
const CHART_TOOLTIP_LABEL_STYLE = {
|
|
304
|
+
color: "var(--color-fg-muted)",
|
|
305
|
+
fontSize: 11,
|
|
306
|
+
marginBottom: 4
|
|
307
|
+
};
|
|
308
|
+
function VolumeStackedChart() {
|
|
309
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-gp-lg", children: [
|
|
310
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-md flex-wrap", children: [
|
|
311
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-baseline gap-gp-md flex-wrap", children: [
|
|
312
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[26px] font-bold text-fg-default leading-none [font-variant-numeric:tabular-nums]", children: "R$ 395.7k" }),
|
|
313
|
+
/* @__PURE__ */ jsxRuntime.jsx(chipGroup.Chip, { color: "success", variant: "soft", size: "sm", shape: "pill", children: "+18%" }),
|
|
314
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] text-fg-muted", children: "vs ano passado" })
|
|
315
|
+
] }),
|
|
316
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "ml-auto flex items-center gap-gp-md", children: [
|
|
317
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[4px] text-[11px] text-fg-muted", children: [
|
|
318
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-[8px] rounded-radius-full bg-bg-brand", "aria-hidden": true }),
|
|
319
|
+
" Humano"
|
|
320
|
+
] }),
|
|
321
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[4px] text-[11px] text-fg-muted", children: [
|
|
322
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-[8px] rounded-radius-full bg-bg-brand-subtle", "aria-hidden": true }),
|
|
323
|
+
" IA"
|
|
324
|
+
] }),
|
|
325
|
+
/* @__PURE__ */ jsxRuntime.jsx(chipGroup.Button, { color: "secondary", variant: "outline", size: "sm", iconRight: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {}), children: "2026" })
|
|
326
|
+
] })
|
|
327
|
+
] }),
|
|
328
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "100%", height: 280 }, children: /* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
329
|
+
recharts.BarChart,
|
|
330
|
+
{
|
|
331
|
+
data: VOLUME_BY_MONTH,
|
|
332
|
+
margin: { top: 8, right: 8, left: -16, bottom: 0 },
|
|
333
|
+
barCategoryGap: 18,
|
|
334
|
+
children: [
|
|
335
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
336
|
+
recharts.CartesianGrid,
|
|
337
|
+
{
|
|
338
|
+
stroke: "var(--color-border-subtle)",
|
|
339
|
+
strokeDasharray: "4 4",
|
|
340
|
+
vertical: false
|
|
341
|
+
}
|
|
342
|
+
),
|
|
343
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
344
|
+
recharts.XAxis,
|
|
345
|
+
{
|
|
346
|
+
dataKey: "m",
|
|
347
|
+
tickLine: false,
|
|
348
|
+
axisLine: false,
|
|
349
|
+
fontSize: 11,
|
|
350
|
+
stroke: "var(--color-fg-subtle)"
|
|
351
|
+
}
|
|
352
|
+
),
|
|
353
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
354
|
+
recharts.YAxis,
|
|
355
|
+
{
|
|
356
|
+
tickLine: false,
|
|
357
|
+
axisLine: false,
|
|
358
|
+
fontSize: 11,
|
|
359
|
+
stroke: "var(--color-fg-subtle)",
|
|
360
|
+
tickFormatter: (v) => v === 0 ? "0k" : `${v / 1e3}k`,
|
|
361
|
+
ticks: [0, 2e3, 4e3, 6e3, 8e3, 1e4],
|
|
362
|
+
domain: [0, 1e4]
|
|
363
|
+
}
|
|
364
|
+
),
|
|
365
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
366
|
+
recharts.Tooltip,
|
|
367
|
+
{
|
|
368
|
+
cursor: { fill: "var(--color-bg-muted)", opacity: 0.5 },
|
|
369
|
+
contentStyle: CHART_TOOLTIP_STYLE,
|
|
370
|
+
labelStyle: CHART_TOOLTIP_LABEL_STYLE,
|
|
371
|
+
formatter: (value, name) => {
|
|
372
|
+
const label = name === "human" ? "Humano" : "IA";
|
|
373
|
+
return [Number(value).toLocaleString("pt-BR"), label];
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
),
|
|
377
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.Bar, { dataKey: "human", stackId: "x", fill: "var(--color-bg-brand)", radius: [0, 0, 0, 0] }),
|
|
378
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.Bar, { dataKey: "ai", stackId: "x", fill: "var(--color-bg-brand-subtle)", radius: [6, 6, 0, 0] })
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
) }) })
|
|
382
|
+
] });
|
|
383
|
+
}
|
|
384
|
+
function CurrentVisitsCard() {
|
|
385
|
+
const total = REGIONS.reduce((s, r) => s + r.value, 0);
|
|
386
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(SectionCard, { title: "Origem dos atendimentos", subtitle: "Por região", className: "h-full", children: [
|
|
387
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex items-center justify-center", style: { height: 210 }, children: [
|
|
388
|
+
/* @__PURE__ */ jsxRuntime.jsx(recharts.ResponsiveContainer, { width: "100%", height: 210, children: /* @__PURE__ */ jsxRuntime.jsxs(recharts.PieChart, { margin: { top: 0, right: 0, bottom: 0, left: 0 }, children: [
|
|
389
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
+
recharts.Pie,
|
|
391
|
+
{
|
|
392
|
+
data: REGIONS,
|
|
393
|
+
dataKey: "value",
|
|
394
|
+
nameKey: "name",
|
|
395
|
+
cx: "50%",
|
|
396
|
+
cy: "50%",
|
|
397
|
+
innerRadius: 70,
|
|
398
|
+
outerRadius: 92,
|
|
399
|
+
paddingAngle: 3,
|
|
400
|
+
startAngle: 90,
|
|
401
|
+
endAngle: -270,
|
|
402
|
+
stroke: "none",
|
|
403
|
+
isAnimationActive: true,
|
|
404
|
+
children: REGIONS.map((r) => /* @__PURE__ */ jsxRuntime.jsx(recharts.Cell, { fill: r.color }, r.name))
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
408
|
+
recharts.Tooltip,
|
|
409
|
+
{
|
|
410
|
+
contentStyle: CHART_TOOLTIP_STYLE,
|
|
411
|
+
labelStyle: CHART_TOOLTIP_LABEL_STYLE,
|
|
412
|
+
formatter: (value) => Number(value).toLocaleString("pt-BR")
|
|
413
|
+
}
|
|
414
|
+
)
|
|
415
|
+
] }) }),
|
|
416
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center pointer-events-none", children: [
|
|
417
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-fg-muted", children: "Total" }),
|
|
418
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[24px] font-bold text-fg-default leading-none [font-variant-numeric:tabular-nums]", children: total.toLocaleString("pt-BR") })
|
|
419
|
+
] })
|
|
420
|
+
] }),
|
|
421
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-gp-md", children: REGIONS.map((r) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-md", children: [
|
|
422
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
423
|
+
"span",
|
|
424
|
+
{
|
|
425
|
+
className: "size-[10px] rounded-radius-full shrink-0",
|
|
426
|
+
style: { background: r.color },
|
|
427
|
+
"aria-hidden": true
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1 text-[12.5px] text-fg-default font-medium", children: r.name }),
|
|
431
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[12px] text-fg-default [font-variant-numeric:tabular-nums]", children: r.value.toLocaleString("pt-BR") }),
|
|
432
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
433
|
+
chipGroup.Chip,
|
|
434
|
+
{
|
|
435
|
+
color: r.positive ? "success" : "danger",
|
|
436
|
+
variant: "soft",
|
|
437
|
+
size: "sm",
|
|
438
|
+
shape: "pill",
|
|
439
|
+
children: r.delta
|
|
440
|
+
}
|
|
441
|
+
)
|
|
442
|
+
] }, r.name)) })
|
|
443
|
+
] });
|
|
444
|
+
}
|
|
445
|
+
function PersonAvatar({ initials, hex, size = "md" }) {
|
|
446
|
+
const cls = size === "sm" ? "size-[24px] text-[10px]" : "size-[32px] text-[12px]";
|
|
447
|
+
return /* @__PURE__ */ jsxRuntime.jsx(appShell.Avatar, { className: cls, style: { background: hex }, children: /* @__PURE__ */ jsxRuntime.jsx(appShell.AvatarFallback, { className: "bg-transparent text-white font-bold", children: initials }) });
|
|
448
|
+
}
|
|
449
|
+
function OpenConversationsList() {
|
|
450
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 p-0 list-none flex flex-col", children: OPEN_CONVS.map((c) => {
|
|
451
|
+
const ChIcon = CHANNELS.find((ch) => ch.id === c.channel)?.icon ?? lucideReact.MessageSquare;
|
|
452
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
453
|
+
"li",
|
|
454
|
+
{
|
|
455
|
+
className: "flex items-center gap-gp-md py-pad-lg border-b border-border-subtle last:border-b-0 cursor-pointer hover:[&>*]:opacity-90 transition-opacity",
|
|
456
|
+
children: [
|
|
457
|
+
/* @__PURE__ */ jsxRuntime.jsx(PersonAvatar, { initials: c.initials, hex: c.hex, size: "md" }),
|
|
458
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-[2px]", children: [
|
|
459
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-sm", children: [
|
|
460
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-semibold text-fg-default whitespace-nowrap overflow-hidden text-ellipsis", children: c.name }),
|
|
461
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] text-fg-subtle [font-variant-numeric:tabular-nums] shrink-0", children: c.id })
|
|
462
|
+
] }),
|
|
463
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-sm flex-wrap text-[11px] text-fg-muted", children: [
|
|
464
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[3px]", children: [
|
|
465
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChIcon, { size: 11, strokeWidth: 1.8, "aria-hidden": true }),
|
|
466
|
+
CHANNELS.find((ch) => ch.id === c.channel)?.name ?? c.channel
|
|
467
|
+
] }),
|
|
468
|
+
c.agent && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
469
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: "·" }),
|
|
470
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: c.agent.name })
|
|
471
|
+
] })
|
|
472
|
+
] })
|
|
473
|
+
] }),
|
|
474
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-end gap-[4px] shrink-0", children: [
|
|
475
|
+
/* @__PURE__ */ jsxRuntime.jsx(chipGroup.Chip, { color: STATUS_TONE[c.status], variant: "soft", size: "sm", shape: "pill", children: STATUS_LABEL[c.status] }),
|
|
476
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[3px] text-[11px] text-fg-muted [font-variant-numeric:tabular-nums]", children: [
|
|
477
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Clock, { size: 10, strokeWidth: 1.8, "aria-hidden": true }),
|
|
478
|
+
c.waitTime
|
|
479
|
+
] })
|
|
480
|
+
] })
|
|
481
|
+
]
|
|
482
|
+
},
|
|
483
|
+
c.id
|
|
484
|
+
);
|
|
485
|
+
}) });
|
|
486
|
+
}
|
|
487
|
+
function AgentPerformanceList() {
|
|
488
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 p-0 list-none flex flex-col", children: AGENTS.map((a, i) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
489
|
+
"li",
|
|
490
|
+
{
|
|
491
|
+
className: "flex items-center gap-gp-md py-pad-lg border-b border-border-subtle last:border-b-0",
|
|
492
|
+
children: [
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "grid place-items-center size-[20px] rounded-radius-full bg-bg-muted text-[11px] font-bold text-fg-muted shrink-0 [font-variant-numeric:tabular-nums]", children: i + 1 }),
|
|
494
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative shrink-0", children: [
|
|
495
|
+
/* @__PURE__ */ jsxRuntime.jsx(PersonAvatar, { initials: a.initials, hex: a.hex, size: "md" }),
|
|
496
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
497
|
+
"span",
|
|
498
|
+
{
|
|
499
|
+
className: chipGroup.cn(
|
|
500
|
+
"absolute -bottom-[1px] -right-[1px] size-[8px] rounded-radius-full border border-bg-surface",
|
|
501
|
+
a.active ? "bg-bg-success" : "bg-bg-muted"
|
|
502
|
+
),
|
|
503
|
+
"aria-label": a.active ? "online" : "offline"
|
|
504
|
+
}
|
|
505
|
+
)
|
|
506
|
+
] }),
|
|
507
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-[2px]", children: [
|
|
508
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-semibold text-fg-default whitespace-nowrap overflow-hidden text-ellipsis", children: a.name }),
|
|
509
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[11px] text-fg-muted", children: [
|
|
510
|
+
a.resolved,
|
|
511
|
+
" resolvidos · ",
|
|
512
|
+
a.avgTime,
|
|
513
|
+
" médio"
|
|
514
|
+
] })
|
|
515
|
+
] }),
|
|
516
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-[3px] shrink-0 text-[12px] font-semibold text-fg-default", children: [
|
|
517
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Star, { size: 11, strokeWidth: 2, className: "text-fg-warning fill-current", "aria-hidden": true }),
|
|
518
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "[font-variant-numeric:tabular-nums]", children: a.csat.toFixed(1) })
|
|
519
|
+
] })
|
|
520
|
+
]
|
|
521
|
+
},
|
|
522
|
+
a.id
|
|
523
|
+
)) });
|
|
524
|
+
}
|
|
525
|
+
function ChannelPerformanceList() {
|
|
526
|
+
return /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "m-0 p-0 list-none flex flex-col", children: CHANNELS.map((c) => {
|
|
527
|
+
const Icon = c.icon;
|
|
528
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
529
|
+
"li",
|
|
530
|
+
{
|
|
531
|
+
className: "flex items-center gap-gp-lg py-pad-lg border-b border-border-subtle last:border-b-0",
|
|
532
|
+
children: [
|
|
533
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
534
|
+
"span",
|
|
535
|
+
{
|
|
536
|
+
className: "grid place-items-center size-[36px] rounded-radius-full shrink-0 text-white",
|
|
537
|
+
style: { background: c.color },
|
|
538
|
+
"aria-hidden": true,
|
|
539
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, { size: 16, strokeWidth: 1.8 })
|
|
540
|
+
}
|
|
541
|
+
),
|
|
542
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex-1 min-w-0 flex flex-col gap-[2px]", children: [
|
|
543
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[13px] font-semibold text-fg-default", children: c.name }),
|
|
544
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[11px] text-fg-muted", children: [
|
|
545
|
+
c.volume,
|
|
546
|
+
" mensagens"
|
|
547
|
+
] })
|
|
548
|
+
] }),
|
|
549
|
+
/* @__PURE__ */ jsxRuntime.jsx(chipGroup.Chip, { color: CHANNEL_STATUS_TONE[c.status], variant: "soft", size: "sm", shape: "pill", children: CHANNEL_STATUS_LABEL[c.status] })
|
|
550
|
+
]
|
|
551
|
+
},
|
|
552
|
+
c.id
|
|
553
|
+
);
|
|
554
|
+
}) });
|
|
555
|
+
}
|
|
556
|
+
function TrafficDataTable() {
|
|
557
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
558
|
+
SectionCard,
|
|
559
|
+
{
|
|
560
|
+
title: "Origem do tráfego",
|
|
561
|
+
subtitle: "Fontes de aquisição",
|
|
562
|
+
className: "flex-1 h-full",
|
|
563
|
+
action: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative max-w-[200px]", children: [
|
|
564
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
565
|
+
lucideReact.Search,
|
|
566
|
+
{
|
|
567
|
+
size: 14,
|
|
568
|
+
strokeWidth: 1.8,
|
|
569
|
+
className: "absolute left-pad-lg top-1/2 -translate-y-1/2 text-fg-muted pointer-events-none"
|
|
570
|
+
}
|
|
571
|
+
),
|
|
572
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
573
|
+
"input",
|
|
574
|
+
{
|
|
575
|
+
type: "search",
|
|
576
|
+
placeholder: "Buscar...",
|
|
577
|
+
className: "h-form-md pl-[34px] pr-pad-md w-full rounded-radius-md bg-bg-muted border border-border-input text-paragraph-sm text-fg-default placeholder:text-fg-muted focus-visible:outline-none focus-visible:ring-4 focus-visible:ring-ring-brand focus-visible:border-border-brand"
|
|
578
|
+
}
|
|
579
|
+
)
|
|
580
|
+
] }),
|
|
581
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-x-auto -mx-pad-2xl px-pad-2xl", children: /* @__PURE__ */ jsxRuntime.jsxs("table", { className: "w-full text-paragraph-sm border-separate border-spacing-0", children: [
|
|
582
|
+
/* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "text-[11px] font-bold tracking-[0.04em] text-fg-subtle uppercase", children: [
|
|
583
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left pb-pad-md border-b border-border-subtle font-bold", children: "Fonte" }),
|
|
584
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right pb-pad-md border-b border-border-subtle font-bold", children: "Visitas" }),
|
|
585
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left pb-pad-md pl-pad-2xl border-b border-border-subtle font-bold", children: "Bounce" }),
|
|
586
|
+
/* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left pb-pad-md pl-pad-2xl border-b border-border-subtle font-bold", children: "Meta (%)" })
|
|
587
|
+
] }) }),
|
|
588
|
+
/* @__PURE__ */ jsxRuntime.jsx("tbody", { children: TRAFFIC_ROWS.map((r) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { className: "text-[12.5px]", children: [
|
|
589
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-pad-lg border-b border-border-subtle text-fg-default font-medium", children: r.source }),
|
|
590
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-pad-lg border-b border-border-subtle text-right text-fg-default [font-variant-numeric:tabular-nums]", children: r.visits }),
|
|
591
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-pad-sm pl-pad-2xl border-b border-border-subtle text-fg-muted [font-variant-numeric:tabular-nums]", children: r.bounce }),
|
|
592
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: "py-pad-sm pl-pad-2xl border-b border-border-subtle", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-gp-md", children: [
|
|
593
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 h-[6px] bg-bg-muted rounded-radius-full overflow-hidden min-w-[80px]", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
594
|
+
"div",
|
|
595
|
+
{
|
|
596
|
+
className: "h-full rounded-radius-full",
|
|
597
|
+
style: { width: `${r.goal}%`, background: r.goalColor }
|
|
598
|
+
}
|
|
599
|
+
) }),
|
|
600
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[11px] font-semibold text-fg-default [font-variant-numeric:tabular-nums] shrink-0 min-w-[32px] text-right", children: [
|
|
601
|
+
r.goal,
|
|
602
|
+
"%"
|
|
603
|
+
] })
|
|
604
|
+
] }) })
|
|
605
|
+
] }, r.source)) })
|
|
606
|
+
] }) })
|
|
607
|
+
}
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
function DashboardShowcase() {
|
|
611
|
+
const { theme, setTheme } = useTheme.useTheme();
|
|
612
|
+
const [period, setPeriod] = React.useState("Últimos 7 dias");
|
|
613
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
614
|
+
appShell.AppShell,
|
|
615
|
+
{
|
|
616
|
+
contexts: appShellMocks.APP_SHELL_CONTEXTS,
|
|
617
|
+
defaultActiveContextId: "inbox",
|
|
618
|
+
defaultActiveItemHref: "#dashboard",
|
|
619
|
+
breadcrumb: [{ label: "Dashboard" }],
|
|
620
|
+
commandGroups: appShellMocks.APP_SHELL_COMMANDS,
|
|
621
|
+
notifications: {
|
|
622
|
+
items: appShellMocks.APP_SHELL_NOTIFICATIONS,
|
|
623
|
+
onMarkAllRead: () => alert("Marcar todas como lidas"),
|
|
624
|
+
onMoreActions: () => alert("Mais ações"),
|
|
625
|
+
onViewAll: () => alert("Ver todas")
|
|
626
|
+
},
|
|
627
|
+
messages: {
|
|
628
|
+
items: appShellMocks.APP_SHELL_MESSAGES,
|
|
629
|
+
onNewMessage: () => alert("Nova mensagem"),
|
|
630
|
+
onExpand: () => alert("Expandir"),
|
|
631
|
+
onViewAll: () => alert("Ver todas")
|
|
632
|
+
},
|
|
633
|
+
theme,
|
|
634
|
+
onThemeChange: (id) => setTheme(id),
|
|
635
|
+
themeOptions: appShellMocks.APP_SHELL_THEME_OPTIONS,
|
|
636
|
+
children: [
|
|
637
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
638
|
+
pageHeader.PageHeader,
|
|
639
|
+
{
|
|
640
|
+
title: "Dashboard",
|
|
641
|
+
description: "Visão geral do atendimento em tempo real — KPIs, volume, canais e performance da equipe.",
|
|
642
|
+
badge: /* @__PURE__ */ jsxRuntime.jsx(chipGroup.Chip, { color: "primary", variant: "soft", size: "sm", shape: "pill", children: "Hoje" }),
|
|
643
|
+
actions: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
644
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
645
|
+
chipGroup.Button,
|
|
646
|
+
{
|
|
647
|
+
color: "secondary",
|
|
648
|
+
variant: "outline",
|
|
649
|
+
size: "icon-md",
|
|
650
|
+
"aria-label": "Mais ações",
|
|
651
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreVertical, {})
|
|
652
|
+
}
|
|
653
|
+
),
|
|
654
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
655
|
+
chipGroup.Button,
|
|
656
|
+
{
|
|
657
|
+
color: "secondary",
|
|
658
|
+
variant: "outline",
|
|
659
|
+
size: "md",
|
|
660
|
+
iconLeft: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, {}),
|
|
661
|
+
iconRight: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, {}),
|
|
662
|
+
onClick: () => {
|
|
663
|
+
const next = period === "Últimos 7 dias" ? "Últimos 30 dias" : "Últimos 7 dias";
|
|
664
|
+
setPeriod(next);
|
|
665
|
+
},
|
|
666
|
+
children: period
|
|
667
|
+
}
|
|
668
|
+
)
|
|
669
|
+
] })
|
|
670
|
+
}
|
|
671
|
+
),
|
|
672
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "grid grid-cols-1 lg:grid-cols-3 gap-gp-2xl items-stretch", children: [
|
|
673
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-2 flex", children: /* @__PURE__ */ jsxRuntime.jsx(WelcomeBanner, {}) }),
|
|
674
|
+
/* @__PURE__ */ jsxRuntime.jsx(KeyInsightsCard, {})
|
|
675
|
+
] }),
|
|
676
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
677
|
+
"section",
|
|
678
|
+
{
|
|
679
|
+
"aria-label": "KPIs principais",
|
|
680
|
+
className: "grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-gp-2xl",
|
|
681
|
+
children: KPIS_PRIMARY.map((kpi) => /* @__PURE__ */ jsxRuntime.jsx(KpiCard, { kpi }, kpi.id))
|
|
682
|
+
}
|
|
683
|
+
),
|
|
684
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "grid grid-cols-1 lg:grid-cols-3 gap-gp-2xl items-stretch", children: [
|
|
685
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
686
|
+
SectionCard,
|
|
687
|
+
{
|
|
688
|
+
title: "Volume de atendimentos",
|
|
689
|
+
subtitle: "Humano vs IA — ano corrente",
|
|
690
|
+
className: "lg:col-span-2 h-full",
|
|
691
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(VolumeStackedChart, {})
|
|
692
|
+
}
|
|
693
|
+
),
|
|
694
|
+
/* @__PURE__ */ jsxRuntime.jsx(CurrentVisitsCard, {})
|
|
695
|
+
] }),
|
|
696
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
697
|
+
"section",
|
|
698
|
+
{
|
|
699
|
+
"aria-label": "Qualidade do atendimento",
|
|
700
|
+
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-gp-2xl",
|
|
701
|
+
children: KPIS_QUALITY.map((kpi) => /* @__PURE__ */ jsxRuntime.jsx(KpiCard, { kpi }, kpi.id))
|
|
702
|
+
}
|
|
703
|
+
),
|
|
704
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "grid grid-cols-1 lg:grid-cols-2 gap-gp-2xl", children: [
|
|
705
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
706
|
+
SectionCard,
|
|
707
|
+
{
|
|
708
|
+
title: "Atendimentos em aberto",
|
|
709
|
+
subtitle: "5 ativos agora",
|
|
710
|
+
action: /* @__PURE__ */ jsxRuntime.jsx(chipGroup.Button, { color: "secondary", variant: "ghost", size: "sm", children: "Ver todos" }),
|
|
711
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(OpenConversationsList, {})
|
|
712
|
+
}
|
|
713
|
+
),
|
|
714
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
715
|
+
SectionCard,
|
|
716
|
+
{
|
|
717
|
+
title: "Performance da equipe",
|
|
718
|
+
subtitle: "Ranking de hoje",
|
|
719
|
+
action: /* @__PURE__ */ jsxRuntime.jsx(chipGroup.Button, { color: "secondary", variant: "ghost", size: "sm", children: "Ver equipe" }),
|
|
720
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AgentPerformanceList, {})
|
|
721
|
+
}
|
|
722
|
+
)
|
|
723
|
+
] }),
|
|
724
|
+
/* @__PURE__ */ jsxRuntime.jsxs("section", { className: "grid grid-cols-1 lg:grid-cols-3 gap-gp-2xl items-stretch", children: [
|
|
725
|
+
/* @__PURE__ */ jsxRuntime.jsx(SectionCard, { title: "Canais", subtitle: "Volume e status", className: "h-full", children: /* @__PURE__ */ jsxRuntime.jsx(ChannelPerformanceList, {}) }),
|
|
726
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "lg:col-span-2 flex", children: /* @__PURE__ */ jsxRuntime.jsx(TrafficDataTable, {}) })
|
|
727
|
+
] })
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
exports.default = DashboardShowcase;
|
|
733
|
+
//# sourceMappingURL=dashboard.cjs.map
|