@burdenoff/microfe-support 2026.830.1 → 2026.830.2
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/index.js +2 -1
- package/dist/support/SupportAdminRoot.js +31 -34
- package/dist/support/SupportAdminRoot.js.map +1 -1
- package/dist/support/SupportUserRoot.js +19 -22
- package/dist/support/SupportUserRoot.js.map +1 -1
- package/dist/support/components/PageLayout.d.ts +1 -1
- package/dist/support/components/PageLayout.js +46 -44
- package/dist/support/components/PageLayout.js.map +1 -1
- package/dist/support/components/analytics/CategoryBreakdown.js +24 -23
- package/dist/support/components/analytics/CategoryBreakdown.js.map +1 -1
- package/dist/support/components/analytics/PriorityBreakdown.js +27 -26
- package/dist/support/components/analytics/PriorityBreakdown.js.map +1 -1
- package/dist/support/components/analytics/SLAReport.js +48 -54
- package/dist/support/components/analytics/SLAReport.js.map +1 -1
- package/dist/support/components/analytics/SatisfactionDistribution.js +56 -59
- package/dist/support/components/analytics/SatisfactionDistribution.js.map +1 -1
- package/dist/support/components/analytics/TopAgents.js +27 -26
- package/dist/support/components/analytics/TopAgents.js.map +1 -1
- package/dist/support/components/analytics/TrendChart.js +23 -21
- package/dist/support/components/analytics/TrendChart.js.map +1 -1
- package/dist/support/components/kb/ArticleForm.js +145 -132
- package/dist/support/components/kb/ArticleForm.js.map +1 -1
- package/dist/support/components/settings/CannedResponsesSettings.js +104 -103
- package/dist/support/components/settings/CannedResponsesSettings.js.map +1 -1
- package/dist/support/components/settings/SLAPoliciesSettings.js +120 -123
- package/dist/support/components/settings/SLAPoliciesSettings.js.map +1 -1
- package/dist/support/components/settings/TicketCategoriesSettings.js +175 -180
- package/dist/support/components/settings/TicketCategoriesSettings.js.map +1 -1
- package/dist/support/components/tickets/AttachmentList.js +21 -20
- package/dist/support/components/tickets/AttachmentList.js.map +1 -1
- package/dist/support/components/tickets/MessageComposer.js +35 -35
- package/dist/support/components/tickets/MessageThread.js +55 -54
- package/dist/support/components/tickets/MessageThread.js.map +1 -1
- package/dist/support/components/tickets/TicketDetailHeader.js +62 -57
- package/dist/support/components/tickets/TicketDetailHeader.js.map +1 -1
- package/dist/support/components/tickets/TicketHeader.js +47 -47
- package/dist/support/components/tickets/TicketSidebar.js +122 -121
- package/dist/support/components/tickets/TicketSidebar.js.map +1 -1
- package/dist/support/hooks/index.d.ts +1 -0
- package/dist/support/hooks/index.js +1 -0
- package/dist/support/hooks/useTr.d.ts +16 -0
- package/dist/support/hooks/useTr.js +12 -0
- package/dist/support/hooks/useTr.js.map +1 -0
- package/dist/support/index.d.ts +1 -0
- package/dist/support/index.js +2 -1
- package/dist/support/pages/AnalyticsPage.js +151 -145
- package/dist/support/pages/AnalyticsPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailAdminPage.js +134 -147
- package/dist/support/pages/ArticleDetailAdminPage.js.map +1 -1
- package/dist/support/pages/ArticleDetailUserPage.js +70 -79
- package/dist/support/pages/ArticleDetailUserPage.js.map +1 -1
- package/dist/support/pages/ContactInquiriesPage.js +140 -139
- package/dist/support/pages/ContactInquiriesPage.js.map +1 -1
- package/dist/support/pages/ContactInquiryDetailPage.js +259 -232
- package/dist/support/pages/ContactInquiryDetailPage.js.map +1 -1
- package/dist/support/pages/CreateArticlePage.js +57 -56
- package/dist/support/pages/CreateArticlePage.js.map +1 -1
- package/dist/support/pages/CreateTicketPage.js +151 -146
- package/dist/support/pages/CreateTicketPage.js.map +1 -1
- package/dist/support/pages/EditArticlePage.js +80 -79
- package/dist/support/pages/EditArticlePage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseAdminPage.js +92 -99
- package/dist/support/pages/KnowledgeBaseAdminPage.js.map +1 -1
- package/dist/support/pages/KnowledgeBaseUserPage.js +85 -92
- package/dist/support/pages/KnowledgeBaseUserPage.js.map +1 -1
- package/dist/support/pages/SettingsPage.js +88 -87
- package/dist/support/pages/SettingsPage.js.map +1 -1
- package/dist/support/pages/TicketDetailAdminPage.js +91 -90
- package/dist/support/pages/TicketDetailAdminPage.js.map +1 -1
- package/dist/support/pages/TicketDetailUserPage.js +120 -118
- package/dist/support/pages/TicketDetailUserPage.js.map +1 -1
- package/dist/support/pages/TicketListPage.js +139 -139
- package/dist/support/translations/en.d.ts +814 -0
- package/dist/support/translations/en.js +779 -0
- package/dist/support/translations/en.js.map +1 -0
- package/dist/support/translations/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,5 +8,6 @@ import { useTicketOperations as g } from "./support/hooks/useTicketOperations.js
|
|
|
8
8
|
import { useChatOperations as _ } from "./support/hooks/useChatOperations.js";
|
|
9
9
|
import { useKnowledgeBaseOperations as v } from "./support/hooks/useKnowledgeBaseOperations.js";
|
|
10
10
|
import { useAnalyticsOperations as y } from "./support/hooks/useAnalyticsOperations.js";
|
|
11
|
+
import { enTranslations as b } from "./support/translations/en.js";
|
|
11
12
|
import "./support/index.js";
|
|
12
|
-
export { h as SUPPORT_RYBBIT_EVENT_ALLOWLIST, m as SupportAdminRoot, p as SupportUserRoot, t as calculateSLAStatus, n as formatDuration, r as formatFileSize, i as formatTicketStatus, a as formatTimeAgo, o as getInitials, s as getPriorityColor, c as getPriorityIcon, l as isValidEmail, u as stringToColor, d as truncateText, y as useAnalyticsOperations, _ as useChatOperations, v as useKnowledgeBaseOperations, e as useSupport, f as useSupportStore, g as useTicketOperations };
|
|
13
|
+
export { h as SUPPORT_RYBBIT_EVENT_ALLOWLIST, m as SupportAdminRoot, p as SupportUserRoot, t as calculateSLAStatus, b as enTranslations, n as formatDuration, r as formatFileSize, i as formatTicketStatus, a as formatTimeAgo, o as getInitials, s as getPriorityColor, c as getPriorityIcon, l as isValidEmail, u as stringToColor, d as truncateText, y as useAnalyticsOperations, _ as useChatOperations, v as useKnowledgeBaseOperations, e as useSupport, f as useSupportStore, g as useTicketOperations };
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useTr as e } from "./hooks/useTr.js";
|
|
2
|
+
import { SupportProvider as t } from "./providers/SupportProvider.js";
|
|
3
|
+
import { joinPath as n } from "./utils/index.js";
|
|
4
|
+
import { useSupportStore as r } from "./store/supportStore.js";
|
|
5
|
+
import { useRegisterFooter as i } from "./hooks/useRegisterFooter.js";
|
|
6
|
+
import { SupportAdminRoutes as a } from "./SupportAdminRoutes.js";
|
|
7
|
+
import { useEffect as o } from "react";
|
|
8
|
+
import { ErrorBoundary as s } from "@burdenoff/fe-libs/shared/components";
|
|
9
9
|
import { BarChart3 as c, BookOpen as l, Briefcase as u, FileText as d, Mail as f, Settings as p, Ticket as m, Users as h } from "lucide-react";
|
|
10
10
|
import { jsx as g } from "react/jsx-runtime";
|
|
11
11
|
//#region src/support/SupportAdminRoot.tsx
|
|
12
12
|
var _ = (_) => {
|
|
13
|
-
let { registerNavItems: v, registerFooterItems: y, basePath: b = "/", currentUser: x, workspaceId: S, organizationId: C, productId: w } = _, T =
|
|
14
|
-
|
|
15
|
-
return n === e ? t : n;
|
|
16
|
-
};
|
|
17
|
-
return a(() => {
|
|
13
|
+
let { registerNavItems: v, registerFooterItems: y, basePath: b = "/", currentUser: x, workspaceId: S, organizationId: C, productId: w } = _, T = r((e) => e.resetForContextChange), E = e();
|
|
14
|
+
return o(() => {
|
|
18
15
|
T();
|
|
19
16
|
}, [
|
|
20
17
|
T,
|
|
@@ -22,69 +19,69 @@ var _ = (_) => {
|
|
|
22
19
|
S,
|
|
23
20
|
C,
|
|
24
21
|
w
|
|
25
|
-
]),
|
|
22
|
+
]), o(() => {
|
|
26
23
|
if (!v) return;
|
|
27
24
|
let e = [
|
|
28
25
|
{
|
|
29
26
|
id: "support-tickets",
|
|
30
|
-
label:
|
|
31
|
-
path:
|
|
27
|
+
label: E("support.nav.tickets", "Tickets"),
|
|
28
|
+
path: n(b, "tickets"),
|
|
32
29
|
icon: /* @__PURE__ */ g(m, { size: 20 }),
|
|
33
30
|
order: 10,
|
|
34
31
|
group: "support"
|
|
35
32
|
},
|
|
36
33
|
{
|
|
37
34
|
id: "support-inquiries",
|
|
38
|
-
label:
|
|
39
|
-
path:
|
|
35
|
+
label: E("support.nav.contactInquiries", "Contact Inquiries"),
|
|
36
|
+
path: n(b, "inquiries"),
|
|
40
37
|
icon: /* @__PURE__ */ g(f, { size: 20 }),
|
|
41
38
|
order: 15,
|
|
42
39
|
group: "support"
|
|
43
40
|
},
|
|
44
41
|
{
|
|
45
42
|
id: "support-applications",
|
|
46
|
-
label:
|
|
47
|
-
path:
|
|
43
|
+
label: E("support.nav.jobApplications", "Job Applications"),
|
|
44
|
+
path: n(b, "applications"),
|
|
48
45
|
icon: /* @__PURE__ */ g(u, { size: 20 }),
|
|
49
46
|
order: 16,
|
|
50
47
|
group: "career"
|
|
51
48
|
},
|
|
52
49
|
{
|
|
53
50
|
id: "support-job-postings",
|
|
54
|
-
label:
|
|
55
|
-
path:
|
|
51
|
+
label: E("support.nav.jobPostings", "Job Postings"),
|
|
52
|
+
path: n(b, "applications/postings"),
|
|
56
53
|
icon: /* @__PURE__ */ g(d, { size: 20 }),
|
|
57
54
|
order: 16.5,
|
|
58
55
|
group: "career"
|
|
59
56
|
},
|
|
60
57
|
{
|
|
61
58
|
id: "support-interviewers",
|
|
62
|
-
label:
|
|
63
|
-
path:
|
|
59
|
+
label: E("support.nav.interviewers", "Interviewers"),
|
|
60
|
+
path: n(b, "applications/interviewers"),
|
|
64
61
|
icon: /* @__PURE__ */ g(h, { size: 20 }),
|
|
65
62
|
order: 16.7,
|
|
66
63
|
group: "career"
|
|
67
64
|
},
|
|
68
65
|
{
|
|
69
66
|
id: "support-kb",
|
|
70
|
-
label:
|
|
71
|
-
path:
|
|
67
|
+
label: E("support.nav.knowledgeBase", "Knowledge Base"),
|
|
68
|
+
path: n(b, "kb"),
|
|
72
69
|
icon: /* @__PURE__ */ g(l, { size: 20 }),
|
|
73
70
|
order: 20,
|
|
74
71
|
group: "support"
|
|
75
72
|
},
|
|
76
73
|
{
|
|
77
74
|
id: "support-analytics",
|
|
78
|
-
label:
|
|
79
|
-
path:
|
|
75
|
+
label: E("support.nav.analytics", "Analytics"),
|
|
76
|
+
path: n(b, "analytics"),
|
|
80
77
|
icon: /* @__PURE__ */ g(c, { size: 20 }),
|
|
81
78
|
order: 40,
|
|
82
79
|
group: "support"
|
|
83
80
|
},
|
|
84
81
|
{
|
|
85
82
|
id: "support-settings",
|
|
86
|
-
label:
|
|
87
|
-
path:
|
|
83
|
+
label: E("support.nav.settings", "Settings"),
|
|
84
|
+
path: n(b, "settings"),
|
|
88
85
|
icon: /* @__PURE__ */ g(p, { size: 20 }),
|
|
89
86
|
order: 50,
|
|
90
87
|
group: "support"
|
|
@@ -95,14 +92,14 @@ var _ = (_) => {
|
|
|
95
92
|
v,
|
|
96
93
|
b,
|
|
97
94
|
E
|
|
98
|
-
]),
|
|
95
|
+
]), i(y), /* @__PURE__ */ g(s, {
|
|
99
96
|
fallback: /* @__PURE__ */ g("div", {
|
|
100
97
|
className: "p-6 text-center text-text-secondary",
|
|
101
|
-
children: "Something went wrong loading this module. Please refresh the page."
|
|
98
|
+
children: E("support.root.errorFallback", "Something went wrong loading this module. Please refresh the page.")
|
|
102
99
|
}),
|
|
103
|
-
children: /* @__PURE__ */ g(
|
|
100
|
+
children: /* @__PURE__ */ g(t, {
|
|
104
101
|
..._,
|
|
105
|
-
children: /* @__PURE__ */ g(
|
|
102
|
+
children: /* @__PURE__ */ g(a, {})
|
|
106
103
|
})
|
|
107
104
|
});
|
|
108
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportAdminRoot.js","names":[],"sources":["../../src/support/SupportAdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport {
|
|
1
|
+
{"version":3,"file":"SupportAdminRoot.js","names":[],"sources":["../../src/support/SupportAdminRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { useTr } from './hooks/useTr';\nimport {\n Ticket,\n BookOpen,\n BarChart3,\n Settings,\n Mail,\n Briefcase,\n FileText,\n Users,\n} from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportAdminRoutes } from './SupportAdminRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\nimport { useSupportStore } from './store/supportStore';\n\n/**\n * Admin-facing root component for the Support microfrontend.\n *\n * Renders admin support management routes (tickets with full controls,\n * contact inquiries, KB authoring, analytics, settings).\n *\n * Use this in admin-app where platform administrators manage support operations.\n *\n * Navigation registration is optional — admin-app uses shell-owned nav\n * (NavRegistration.tsx with contentMfeProps), so registerNavItems won't be provided.\n * Other shells that pass registerNavItems will get admin nav items registered.\n *\n * For user-facing support features, use SupportUserRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportAdminRoot: FC<SupportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n currentUser,\n workspaceId,\n organizationId,\n productId,\n } = props;\n const resetForContextChange = useSupportStore((state) => state.resetForContextChange);\n const tr = useTr();\n\n useEffect(() => {\n resetForContextChange();\n }, [resetForContextChange, currentUser?.id, workspaceId, organizationId, productId]);\n\n // Register admin navigation items only if the shell provides registerNavItems.\n // admin-app uses contentMfeProps (no registerNavItems) so the shell's\n // NavRegistration.tsx owns the nav — this avoids duplicate entries.\n // `tr` is in the deps so labels re-register when locale flips.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'support-tickets',\n label: tr('support.nav.tickets', 'Tickets'),\n path: joinPath(basePath, 'tickets'),\n icon: <Ticket size={20} />,\n order: 10,\n group: 'support',\n },\n {\n id: 'support-inquiries',\n label: tr('support.nav.contactInquiries', 'Contact Inquiries'),\n path: joinPath(basePath, 'inquiries'),\n icon: <Mail size={20} />,\n order: 15,\n group: 'support',\n },\n {\n id: 'support-applications',\n label: tr('support.nav.jobApplications', 'Job Applications'),\n path: joinPath(basePath, 'applications'),\n icon: <Briefcase size={20} />,\n order: 16,\n group: 'career',\n },\n {\n id: 'support-job-postings',\n label: tr('support.nav.jobPostings', 'Job Postings'),\n path: joinPath(basePath, 'applications/postings'),\n icon: <FileText size={20} />,\n order: 16.5,\n group: 'career',\n },\n {\n id: 'support-interviewers',\n label: tr('support.nav.interviewers', 'Interviewers'),\n path: joinPath(basePath, 'applications/interviewers'),\n icon: <Users size={20} />,\n order: 16.7,\n group: 'career',\n },\n {\n id: 'support-kb',\n label: tr('support.nav.knowledgeBase', 'Knowledge Base'),\n path: joinPath(basePath, 'kb'),\n icon: <BookOpen size={20} />,\n order: 20,\n group: 'support',\n },\n {\n id: 'support-analytics',\n label: tr('support.nav.analytics', 'Analytics'),\n path: joinPath(basePath, 'analytics'),\n icon: <BarChart3 size={20} />,\n order: 40,\n group: 'support',\n },\n {\n id: 'support-settings',\n label: tr('support.nav.settings', 'Settings'),\n path: joinPath(basePath, 'settings'),\n icon: <Settings size={20} />,\n order: 50,\n group: 'support',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, tr]);\n\n useRegisterFooter(registerFooterItems);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'support.root.errorFallback',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <SupportProvider {...props}>\n <SupportAdminRoutes />\n </SupportProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;;AAsCA,IAAa,KAA0C,MAAU;CAC/D,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,gBACA,gBACA,mBACA,iBACE,GACE,IAAwB,GAAiB,MAAU,EAAM,qBAAqB,GAC9E,IAAK,EAAM;CAsFjB,OApFA,QAAgB;EACd,EAAsB;CACxB,GAAG;EAAC;EAAuB,GAAa;EAAI;EAAa;EAAgB;CAAS,CAAC,GAMnF,QAAgB;EACd,IAAI,CAAC,GAAkB;EAEvB,IAAM,IAAsB;GAC1B;IACE,IAAI;IACJ,OAAO,EAAG,uBAAuB,SAAS;IAC1C,MAAM,EAAS,GAAU,SAAS;IAClC,MAAM,kBAAC,GAAD,EAAQ,MAAM,GAAK,CAAA;IACzB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,gCAAgC,mBAAmB;IAC7D,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAM,MAAM,GAAK,CAAA;IACvB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,+BAA+B,kBAAkB;IAC3D,MAAM,EAAS,GAAU,cAAc;IACvC,MAAM,kBAAC,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,2BAA2B,cAAc;IACnD,MAAM,EAAS,GAAU,uBAAuB;IAChD,MAAM,kBAAC,GAAD,EAAU,MAAM,GAAK,CAAA;IAC3B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,4BAA4B,cAAc;IACpD,MAAM,EAAS,GAAU,2BAA2B;IACpD,MAAM,kBAAC,GAAD,EAAO,MAAM,GAAK,CAAA;IACxB,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,6BAA6B,gBAAgB;IACvD,MAAM,EAAS,GAAU,IAAI;IAC7B,MAAM,kBAAC,GAAD,EAAU,MAAM,GAAK,CAAA;IAC3B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,yBAAyB,WAAW;IAC9C,MAAM,EAAS,GAAU,WAAW;IACpC,MAAM,kBAAC,GAAD,EAAW,MAAM,GAAK,CAAA;IAC5B,OAAO;IACP,OAAO;GACT;GACA;IACE,IAAI;IACJ,OAAO,EAAG,wBAAwB,UAAU;IAC5C,MAAM,EAAS,GAAU,UAAU;IACnC,MAAM,kBAAC,GAAD,EAAU,MAAM,GAAK,CAAA;IAC3B,OAAO;IACP,OAAO;GACT;EACF;EAGA,OADgB,EAAiB,CAC1B;CACT,GAAG;EAAC;EAAkB;EAAU;CAAE,CAAC,GAEnC,EAAkB,CAAmB,GAGnC,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,EACC,8BACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAAC,GAAD;GAAiB,GAAI;GACnB,UAAA,kBAAC,GAAD,CAAqB,CAAA;EACN,CAAA;CACJ,CAAA;AAEnB"}
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useTr as e } from "./hooks/useTr.js";
|
|
2
|
+
import { SupportProvider as t } from "./providers/SupportProvider.js";
|
|
3
|
+
import { joinPath as n } from "./utils/index.js";
|
|
4
|
+
import { useSupportStore as r } from "./store/supportStore.js";
|
|
5
|
+
import { SupportUserRoutes as i } from "./SupportUserRoutes.js";
|
|
6
|
+
import { useRegisterFooter as a } from "./hooks/useRegisterFooter.js";
|
|
7
|
+
import { useEffect as o } from "react";
|
|
8
|
+
import { ErrorBoundary as s } from "@burdenoff/fe-libs/shared/components";
|
|
9
9
|
import { BookOpen as c, Ticket as l } from "lucide-react";
|
|
10
10
|
import { jsx as u } from "react/jsx-runtime";
|
|
11
11
|
//#region src/support/SupportUserRoot.tsx
|
|
12
12
|
var d = (d) => {
|
|
13
|
-
let { registerNavItems: f, registerFooterItems: p, basePath: m = "/", currentUser: h, workspaceId: g, organizationId: _, productId: v } = d, y =
|
|
14
|
-
|
|
15
|
-
return n === e ? t : n;
|
|
16
|
-
};
|
|
17
|
-
return a(() => {
|
|
13
|
+
let { registerNavItems: f, registerFooterItems: p, basePath: m = "/", currentUser: h, workspaceId: g, organizationId: _, productId: v } = d, y = r((e) => e.resetForContextChange), b = e();
|
|
14
|
+
return o(() => {
|
|
18
15
|
y();
|
|
19
16
|
}, [
|
|
20
17
|
y,
|
|
@@ -22,19 +19,19 @@ var d = (d) => {
|
|
|
22
19
|
g,
|
|
23
20
|
_,
|
|
24
21
|
v
|
|
25
|
-
]),
|
|
22
|
+
]), o(() => {
|
|
26
23
|
if (!f) return;
|
|
27
24
|
let e = [{
|
|
28
25
|
id: "support-tickets",
|
|
29
|
-
label:
|
|
30
|
-
path:
|
|
26
|
+
label: b("support.nav.tickets", "Tickets"),
|
|
27
|
+
path: n(m, "tickets"),
|
|
31
28
|
icon: /* @__PURE__ */ u(l, { size: 20 }),
|
|
32
29
|
order: 10,
|
|
33
30
|
group: "support"
|
|
34
31
|
}, {
|
|
35
32
|
id: "support-kb",
|
|
36
|
-
label:
|
|
37
|
-
path:
|
|
33
|
+
label: b("support.nav.knowledgeBase", "Knowledge Base"),
|
|
34
|
+
path: n(m, "kb"),
|
|
38
35
|
icon: /* @__PURE__ */ u(c, { size: 20 }),
|
|
39
36
|
order: 20,
|
|
40
37
|
group: "support"
|
|
@@ -44,14 +41,14 @@ var d = (d) => {
|
|
|
44
41
|
f,
|
|
45
42
|
m,
|
|
46
43
|
b
|
|
47
|
-
]),
|
|
44
|
+
]), a(p), /* @__PURE__ */ u(s, {
|
|
48
45
|
fallback: /* @__PURE__ */ u("div", {
|
|
49
46
|
className: "p-6 text-center text-text-secondary",
|
|
50
|
-
children: "Something went wrong loading this module. Please refresh the page."
|
|
47
|
+
children: b("support.root.errorFallback", "Something went wrong loading this module. Please refresh the page.")
|
|
51
48
|
}),
|
|
52
|
-
children: /* @__PURE__ */ u(
|
|
49
|
+
children: /* @__PURE__ */ u(t, {
|
|
53
50
|
...d,
|
|
54
|
-
children: /* @__PURE__ */ u(
|
|
51
|
+
children: /* @__PURE__ */ u(i, {})
|
|
55
52
|
})
|
|
56
53
|
});
|
|
57
54
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportUserRoot.js","names":[],"sources":["../../src/support/SupportUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport {
|
|
1
|
+
{"version":3,"file":"SupportUserRoot.js","names":[],"sources":["../../src/support/SupportUserRoot.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useEffect } from 'react';\nimport { ErrorBoundary } from '@burdenoff/fe-libs/shared/components';\nimport { useTr } from './hooks/useTr';\nimport { Ticket, BookOpen } from 'lucide-react';\nimport { SupportProvider } from './providers/SupportProvider';\nimport type { NavItem, SupportRootProps } from './types';\nimport { SupportUserRoutes } from './SupportUserRoutes';\nimport { joinPath } from './utils';\nimport { useRegisterFooter } from './hooks/useRegisterFooter';\nimport { useSupportStore } from './store/supportStore';\n\n/**\n * User-facing root component for the Support microfrontend.\n *\n * Renders only user-relevant routes (tickets and KB browsing)\n * and registers user-only navigation items with the shell.\n *\n * Use this in product app shells (vibecontrols-app, bigconsole, etc.)\n * where end users interact with the support module.\n *\n * For admin-facing support features, use SupportAdminRoot instead.\n *\n * Note: This is a UI-layer route split, not a security boundary.\n * Access control is enforced at the API/server level.\n */\nexport const SupportUserRoot: FC<SupportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = '/',\n currentUser,\n workspaceId,\n organizationId,\n productId,\n } = props;\n const resetForContextChange = useSupportStore((state) => state.resetForContextChange);\n const tr = useTr();\n\n useEffect(() => {\n resetForContextChange();\n }, [resetForContextChange, currentUser?.id, workspaceId, organizationId, productId]);\n\n // Register user-only navigation items.\n // `tr` is in the deps so labels re-register when locale changes — without\n // this, switching locale after mount leaves the old-language labels in the\n // shell's nav state.\n useEffect(() => {\n if (!registerNavItems) return;\n\n const navItems: NavItem[] = [\n {\n id: 'support-tickets',\n label: tr('support.nav.tickets', 'Tickets'),\n path: joinPath(basePath, 'tickets'),\n icon: <Ticket size={20} />,\n order: 10,\n group: 'support',\n },\n {\n id: 'support-kb',\n label: tr('support.nav.knowledgeBase', 'Knowledge Base'),\n path: joinPath(basePath, 'kb'),\n icon: <BookOpen size={20} />,\n order: 20,\n group: 'support',\n },\n ];\n\n const cleanup = registerNavItems(navItems);\n return cleanup;\n }, [registerNavItems, basePath, tr]);\n\n useRegisterFooter(registerFooterItems);\n\n return (\n <ErrorBoundary\n fallback={\n <div className=\"p-6 text-center text-text-secondary\">\n {tr(\n 'support.root.errorFallback',\n 'Something went wrong loading this module. Please refresh the page.'\n )}\n </div>\n }\n >\n <SupportProvider {...props}>\n <SupportUserRoutes />\n </SupportProvider>\n </ErrorBoundary>\n );\n};\n"],"mappings":";;;;;;;;;;;AA0BA,IAAa,KAAyC,MAAU;CAC9D,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,gBACA,gBACA,mBACA,iBACE,GACE,IAAwB,GAAiB,MAAU,EAAM,qBAAqB,GAC9E,IAAK,EAAM;CAsCjB,OApCA,QAAgB;EACd,EAAsB;CACxB,GAAG;EAAC;EAAuB,GAAa;EAAI;EAAa;EAAgB;CAAS,CAAC,GAMnF,QAAgB;EACd,IAAI,CAAC,GAAkB;EAEvB,IAAM,IAAsB,CAC1B;GACE,IAAI;GACJ,OAAO,EAAG,uBAAuB,SAAS;GAC1C,MAAM,EAAS,GAAU,SAAS;GAClC,MAAM,kBAAC,GAAD,EAAQ,MAAM,GAAK,CAAA;GACzB,OAAO;GACP,OAAO;EACT,GACA;GACE,IAAI;GACJ,OAAO,EAAG,6BAA6B,gBAAgB;GACvD,MAAM,EAAS,GAAU,IAAI;GAC7B,MAAM,kBAAC,GAAD,EAAU,MAAM,GAAK,CAAA;GAC3B,OAAO;GACP,OAAO;EACT,CACF;EAGA,OADgB,EAAiB,CAC1B;CACT,GAAG;EAAC;EAAkB;EAAU;CAAE,CAAC,GAEnC,EAAkB,CAAmB,GAGnC,kBAAC,GAAD;EACE,UACE,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,EACC,8BACA,oEACF;EACG,CAAA;EAGP,UAAA,kBAAC,GAAD;GAAiB,GAAI;GACnB,UAAA,kBAAC,GAAD,CAAoB,CAAA;EACL,CAAA;CACJ,CAAA;AAEnB"}
|
|
@@ -64,7 +64,7 @@ export declare function EmptyState({ icon, illustration, illustrationAlt, title,
|
|
|
64
64
|
/**
|
|
65
65
|
* LoadingState - A consistent loading state component
|
|
66
66
|
*/
|
|
67
|
-
export declare function LoadingState({ message, className
|
|
67
|
+
export declare function LoadingState({ message, className }: {
|
|
68
68
|
message?: string;
|
|
69
69
|
className?: string;
|
|
70
70
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useTr as e } from "../hooks/useTr.js";
|
|
2
|
+
import { cn as t } from "../utils/cn.js";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { AuroraBackground as a, GradientText as o, IllustratedEmptyState as s } from "@burdenoff/fe-libs/ui";
|
|
4
5
|
//#region src/support/components/PageLayout.tsx
|
|
5
|
-
var
|
|
6
|
+
var c = {
|
|
6
7
|
sm: "max-w-screen-sm",
|
|
7
8
|
md: "max-w-screen-md",
|
|
8
9
|
lg: "max-w-screen-lg",
|
|
@@ -11,70 +12,70 @@ var s = {
|
|
|
11
12
|
"3xl": "max-w-[1600px]",
|
|
12
13
|
full: "max-w-full"
|
|
13
14
|
};
|
|
14
|
-
function
|
|
15
|
-
let y = v &&
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
className:
|
|
18
|
-
children: /* @__PURE__ */
|
|
19
|
-
className:
|
|
20
|
-
children: [m && (
|
|
21
|
-
className:
|
|
15
|
+
function l({ children: e, title: s, subtitle: l, icon: u, headerActions: d, headerContent: f, maxWidth: p = "xl", showHeader: m = !0, className: h, contentClassName: g, aurora: _ = !1, titleAccent: v }) {
|
|
16
|
+
let y = v && s && s.endsWith(v) ? s.slice(0, s.length - v.length) : null;
|
|
17
|
+
return /* @__PURE__ */ r("div", {
|
|
18
|
+
className: t("min-size-full", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-200", h),
|
|
19
|
+
children: /* @__PURE__ */ i("div", {
|
|
20
|
+
className: t("mx-auto w-full", c[p], g),
|
|
21
|
+
children: [m && (s || d) && /* @__PURE__ */ i("header", {
|
|
22
|
+
className: t("mb-6 sm:mb-8", _ && "relative overflow-hidden rounded-2xl border border-border-seam bg-bg-surface/40 p-4 sm:p-6 backdrop-blur-[var(--blur-glass)]"),
|
|
22
23
|
children: [
|
|
23
|
-
_ && /* @__PURE__ */
|
|
24
|
-
/* @__PURE__ */
|
|
24
|
+
_ && /* @__PURE__ */ r(a, { intensity: "subtle" }),
|
|
25
|
+
/* @__PURE__ */ i("div", {
|
|
25
26
|
className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
|
|
26
|
-
children: [/* @__PURE__ */
|
|
27
|
+
children: [/* @__PURE__ */ i("div", {
|
|
27
28
|
className: "space-y-1",
|
|
28
|
-
children: [(
|
|
29
|
+
children: [(s || u) && /* @__PURE__ */ i("div", {
|
|
29
30
|
className: "flex items-center gap-3",
|
|
30
|
-
children: [u && /* @__PURE__ */
|
|
31
|
+
children: [u && /* @__PURE__ */ r("div", {
|
|
31
32
|
className: "flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary",
|
|
32
33
|
children: u
|
|
33
|
-
}),
|
|
34
|
+
}), s && /* @__PURE__ */ r("h1", {
|
|
34
35
|
className: "text-2xl sm:text-3xl font-bold tracking-tight text-text-primary",
|
|
35
|
-
children: y === null ?
|
|
36
|
+
children: y === null ? s : /* @__PURE__ */ i(n, { children: [y, /* @__PURE__ */ r(o, { children: v })] })
|
|
36
37
|
})]
|
|
37
|
-
}), l && /* @__PURE__ */
|
|
38
|
+
}), l && /* @__PURE__ */ r("p", {
|
|
38
39
|
className: "text-sm sm:text-base text-text-secondary max-w-2xl",
|
|
39
40
|
children: l
|
|
40
41
|
})]
|
|
41
|
-
}), d && /* @__PURE__ */
|
|
42
|
+
}), d && /* @__PURE__ */ r("div", {
|
|
42
43
|
className: "flex items-center gap-2 flex-shrink-0",
|
|
43
44
|
children: d
|
|
44
45
|
})]
|
|
45
46
|
}),
|
|
46
|
-
f && /* @__PURE__ */
|
|
47
|
+
f && /* @__PURE__ */ r("div", {
|
|
47
48
|
className: "mt-4",
|
|
48
49
|
children: f
|
|
49
50
|
})
|
|
50
51
|
]
|
|
51
|
-
}), /* @__PURE__ */
|
|
52
|
+
}), /* @__PURE__ */ r("div", {
|
|
52
53
|
className: "space-y-6",
|
|
53
|
-
children:
|
|
54
|
+
children: e
|
|
54
55
|
})]
|
|
55
56
|
})
|
|
56
57
|
});
|
|
57
58
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
60
|
-
illustration:
|
|
59
|
+
function u({ icon: e, illustration: n, illustrationAlt: a, title: o, description: c, action: l, className: u }) {
|
|
60
|
+
return n ? /* @__PURE__ */ r(s, {
|
|
61
|
+
illustration: n,
|
|
61
62
|
alt: a,
|
|
62
|
-
title:
|
|
63
|
+
title: o,
|
|
63
64
|
description: c,
|
|
64
65
|
action: l,
|
|
65
|
-
className:
|
|
66
|
-
}) : /* @__PURE__ */
|
|
67
|
-
className:
|
|
66
|
+
className: t("animate-in fade-in-0 zoom-in-95 duration-200", u)
|
|
67
|
+
}) : /* @__PURE__ */ i("div", {
|
|
68
|
+
className: t("flex flex-col items-center justify-center", "py-12 sm:py-16 px-4", "text-center", "animate-in fade-in-0 zoom-in-95 duration-200", u),
|
|
68
69
|
children: [
|
|
69
|
-
|
|
70
|
+
e && /* @__PURE__ */ r("div", {
|
|
70
71
|
className: "mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary",
|
|
71
|
-
children:
|
|
72
|
+
children: e
|
|
72
73
|
}),
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ r("h3", {
|
|
74
75
|
className: "text-lg font-semibold text-text-primary mb-1",
|
|
75
|
-
children:
|
|
76
|
+
children: o
|
|
76
77
|
}),
|
|
77
|
-
c && /* @__PURE__ */
|
|
78
|
+
c && /* @__PURE__ */ r("p", {
|
|
78
79
|
className: "text-sm text-text-secondary max-w-sm mb-4",
|
|
79
80
|
children: c
|
|
80
81
|
}),
|
|
@@ -82,19 +83,20 @@ function l({ icon: t, illustration: i, illustrationAlt: a, title: s, description
|
|
|
82
83
|
]
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
86
|
+
function d({ message: n, className: a }) {
|
|
87
|
+
let o = e();
|
|
88
|
+
return /* @__PURE__ */ i("div", {
|
|
89
|
+
className: t("flex flex-col items-center justify-center py-20", a),
|
|
90
|
+
children: [/* @__PURE__ */ i("div", {
|
|
89
91
|
className: "relative",
|
|
90
|
-
children: [/* @__PURE__ */
|
|
91
|
-
}), /* @__PURE__ */
|
|
92
|
+
children: [/* @__PURE__ */ r("div", { className: "absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse" }), /* @__PURE__ */ r("div", { className: "relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin" })]
|
|
93
|
+
}), /* @__PURE__ */ r("span", {
|
|
92
94
|
className: "mt-6 text-sm font-medium text-text-secondary",
|
|
93
|
-
children:
|
|
95
|
+
children: n ?? o("support.loading.default", "Loading...")
|
|
94
96
|
})]
|
|
95
97
|
});
|
|
96
98
|
}
|
|
97
99
|
//#endregion
|
|
98
|
-
export {
|
|
100
|
+
export { u as EmptyState, d as LoadingState, l as PageLayout };
|
|
99
101
|
|
|
100
102
|
//# sourceMappingURL=PageLayout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/support/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { AuroraBackground, GradientText, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n /**\n * Boff UI 2.0 living-glass hero backdrop. When true, the header zone is wrapped\n * in a `relative overflow-hidden` container with a subtle drifting AuroraBackground\n * behind it (sits at -z-10, never moves content, reduced-motion safe). Reserve for\n * the MFE's primary landing page — ONE aurora per MFE.\n */\n aurora?: boolean;\n /**\n * When provided, the title is split so this trailing noun is rendered with a\n * brand GradientText fill (one hero heading accent per page). The remaining\n * leading text stays in the plain title colour.\n */\n titleAccent?: string;\n}\n\nconst maxWidthClasses = {\n sm: 'max-w-screen-sm', // 640px\n md: 'max-w-screen-md', // 768px\n lg: 'max-w-screen-lg', // 1024px\n xl: 'max-w-screen-xl', // 1280px\n '2xl': 'max-w-screen-2xl', // 1536px\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design for Support module\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n aurora = false,\n titleAccent,\n}: PageLayoutProps) {\n // Split the title so the trailing accent noun can be gradient-filled while the\n // leading portion stays plain. Falls back to the full title when no accent or\n // when the accent isn't a trailing substring of the title.\n const accentLead =\n titleAccent && title && title.endsWith(titleAccent)\n ? title.slice(0, title.length - titleAccent.length)\n : null;\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n 'min-size-full',\n // Responsive horizontal padding\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n // Responsive vertical padding\n 'py-6 sm:py-8 lg:py-10',\n // Entrance animation\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-200',\n className\n )}\n >\n {/* Max-width constrained content container */}\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header\n className={cn(\n 'mb-6 sm:mb-8',\n // Living-glass hero backdrop: contain the aurora and give it room to breathe.\n aurora &&\n 'relative overflow-hidden rounded-2xl border border-border-seam bg-bg-surface/40 p-4 sm:p-6 backdrop-blur-[var(--blur-glass)]'\n )}\n >\n {aurora && <AuroraBackground intensity=\"subtle\" />}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-text-primary\">\n {accentLead !== null ? (\n <>\n {accentLead}\n <GradientText>{titleAccent}</GradientText>\n </>\n ) : (\n title\n )}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-text-secondary max-w-2xl\">{subtitle}</p>\n )}\n </div>\n\n {/* Header Actions */}\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n\n {/* Additional Header Content */}\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * EmptyState - A consistent empty state component\n */\nexport function EmptyState({\n icon,\n illustration,\n illustrationAlt,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n /**\n * Boff UI 2.0 on-brand illustration name (served by the host shell at\n * /illustrations/<name>.webp). When provided, the empty state renders the\n * richer IllustratedEmptyState instead of the plain icon variant. Reserve for\n * genuine zero/no-results states — keep gate/permission states on the icon.\n */\n illustration?: string;\n illustrationAlt?: string;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n if (illustration) {\n return (\n <IllustratedEmptyState\n illustration={illustration}\n alt={illustrationAlt}\n title={title}\n description={description}\n action={action}\n className={cn('animate-in fade-in-0 zoom-in-95 duration-200', className)}\n />\n );\n }\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center',\n 'py-12 sm:py-16 px-4',\n 'text-center',\n 'animate-in fade-in-0 zoom-in-95 duration-200',\n className\n )}\n >\n {icon && (\n <div className=\"mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary\">{icon}</div>\n )}\n <h3 className=\"text-lg font-semibold text-text-primary mb-1\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary max-w-sm mb-4\">{description}</p>}\n {action}\n </div>\n );\n}\n\n/**\n * LoadingState - A consistent loading state component\n */\nexport function LoadingState({\n message = 'Loading...',\n className,\n}: {\n message?: string;\n className?: string;\n}) {\n return (\n <div className={cn('flex flex-col items-center justify-center py-20', className)}>\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse\" />\n <div className=\"relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">{message}</span>\n </div>\n );\n}\n"],"mappings":";;;;AAuCA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;AACR;AAWA,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,qBACA,YAAS,IACT,kBACkB;CAIlB,IAAM,IACJ,KAAe,KAAS,EAAM,SAAS,CAAW,IAC9C,EAAM,MAAM,GAAG,EAAM,SAAS,EAAY,MAAM,IAChD;CACN,OACE,kBAAC,OAAD;EACE,WAAW,EAET,iBAEA,iCAEA,yBAEA,4DACA,CACF;EAGA,UAAA,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,CAAgB;GAAhF,UAAA,CAEG,MAAe,KAAS,MACvB,kBAAC,UAAD;IACE,WAAW,EACT,gBAEA,KACE,8HACJ;IANF,UAAA;KAQG,KAAU,kBAAC,GAAD,EAAkB,WAAU,SAAU,CAAA;KACjD,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CAEE,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,EACI,KAAS,MACT,kBAAC,OAAD;QAAK,WAAU;QAAf,UAAA,CACG,KACC,kBAAC,OAAD;SAAK,WAAU;SACZ,UAAA;QACE,CAAA,GAEN,KACC,kBAAC,MAAD;SAAI,WAAU;SACX,UAAA,MAAe,OAMd,IALA,kBAAA,GAAA,EAAA,UAAA,CACG,GACD,kBAAC,GAAD,EAAA,UAAe,EAA0B,CAAA,CACzC,EAAA,CAAA;QAIF,CAAA,CAEH;OAEN,CAAA,GAAA,KACC,kBAAC,KAAD;QAAG,WAAU;QAAsD,UAAA;OAAY,CAAA,CAE9E;MAGJ,CAAA,GAAA,KACC,kBAAC,OAAD;OAAK,WAAU;OAAyC,UAAA;MAAmB,CAAA,CAE1E;;KAGJ,KAAiB,kBAAC,OAAD;MAAK,WAAU;MAAQ,UAAA;KAAmB,CAAA;IACtD;GAMV,CAAA,GAAA,kBAAC,OAAD;IAAK,WAAU;IAAa;GAAc,CAAA,CACvC;;CACF,CAAA;AAET;AAKA,SAAgB,EAAW,EACzB,SACA,iBACA,oBACA,UACA,gBACA,WACA,gBAeC;CAaD,OAZI,IAEA,kBAAC,GAAD;EACgB;EACd,KAAK;EACE;EACM;EACL;EACR,WAAW,EAAG,gDAAgD,CAAS;CACxE,CAAA,IAIH,kBAAC,OAAD;EACE,WAAW,EACT,6CACA,uBACA,eACA,gDACA,CACF;EAPF,UAAA;GASG,KACC,kBAAC,OAAD;IAAK,WAAU;IAA4D,UAAA;GAAU,CAAA;GAEvF,kBAAC,MAAD;IAAI,WAAU;IAAgD,UAAA;GAAU,CAAA;GACvE,KAAe,kBAAC,KAAD;IAAG,WAAU;IAA6C,UAAA;GAAe,CAAA;GACxF;EACE;;AAET;AAKA,SAAgB,EAAa,EAC3B,aAAU,cACV,gBAIC;CACD,OACE,kBAAC,OAAD;EAAK,WAAW,EAAG,mDAAmD,CAAS;EAA/E,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,OAAD,EAAK,WAAU,8EAA+E,CAAA,GAC9F,kBAAC,OAAD,EAAK,WAAU,yFAA0F,CAAA,CACtG;EACL,CAAA,GAAA,kBAAC,QAAD;GAAM,WAAU;GAAgD,UAAA;EAAc,CAAA,CAC3E;;AAET"}
|
|
1
|
+
{"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/support/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { AuroraBackground, GradientText, IllustratedEmptyState } from '@burdenoff/fe-libs/ui';\nimport { cn } from '../utils/cn';\nimport { useTr } from '../hooks/useTr';\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n /**\n * Boff UI 2.0 living-glass hero backdrop. When true, the header zone is wrapped\n * in a `relative overflow-hidden` container with a subtle drifting AuroraBackground\n * behind it (sits at -z-10, never moves content, reduced-motion safe). Reserve for\n * the MFE's primary landing page — ONE aurora per MFE.\n */\n aurora?: boolean;\n /**\n * When provided, the title is split so this trailing noun is rendered with a\n * brand GradientText fill (one hero heading accent per page). The remaining\n * leading text stays in the plain title colour.\n */\n titleAccent?: string;\n}\n\nconst maxWidthClasses = {\n sm: 'max-w-screen-sm', // 640px\n md: 'max-w-screen-md', // 768px\n lg: 'max-w-screen-lg', // 1024px\n xl: 'max-w-screen-xl', // 1280px\n '2xl': 'max-w-screen-2xl', // 1536px\n '3xl': 'max-w-[1600px]',\n full: 'max-w-full',\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design for Support module\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = 'xl',\n showHeader = true,\n className,\n contentClassName,\n aurora = false,\n titleAccent,\n}: PageLayoutProps) {\n // Split the title so the trailing accent noun can be gradient-filled while the\n // leading portion stays plain. Falls back to the full title when no accent or\n // when the accent isn't a trailing substring of the title.\n const accentLead =\n titleAccent && title && title.endsWith(titleAccent)\n ? title.slice(0, title.length - titleAccent.length)\n : null;\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n 'min-size-full',\n // Responsive horizontal padding\n 'px-4 sm:px-6 lg:px-8 xl:px-12',\n // Responsive vertical padding\n 'py-6 sm:py-8 lg:py-10',\n // Entrance animation\n 'animate-in fade-in-0 slide-in-from-bottom-4 duration-200',\n className\n )}\n >\n {/* Max-width constrained content container */}\n <div className={cn('mx-auto w-full', maxWidthClasses[maxWidth], contentClassName)}>\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header\n className={cn(\n 'mb-6 sm:mb-8',\n // Living-glass hero backdrop: contain the aurora and give it room to breathe.\n aurora &&\n 'relative overflow-hidden rounded-2xl border border-border-seam bg-bg-surface/40 p-4 sm:p-6 backdrop-blur-[var(--blur-glass)]'\n )}\n >\n {aurora && <AuroraBackground intensity=\"subtle\" />}\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-action-primary-bg/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-text-primary\">\n {accentLead !== null ? (\n <>\n {accentLead}\n <GradientText>{titleAccent}</GradientText>\n </>\n ) : (\n title\n )}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-text-secondary max-w-2xl\">{subtitle}</p>\n )}\n </div>\n\n {/* Header Actions */}\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">{headerActions}</div>\n )}\n </div>\n\n {/* Additional Header Content */}\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * EmptyState - A consistent empty state component\n */\nexport function EmptyState({\n icon,\n illustration,\n illustrationAlt,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n /**\n * Boff UI 2.0 on-brand illustration name (served by the host shell at\n * /illustrations/<name>.webp). When provided, the empty state renders the\n * richer IllustratedEmptyState instead of the plain icon variant. Reserve for\n * genuine zero/no-results states — keep gate/permission states on the icon.\n */\n illustration?: string;\n illustrationAlt?: string;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n if (illustration) {\n return (\n <IllustratedEmptyState\n illustration={illustration}\n alt={illustrationAlt}\n title={title}\n description={description}\n action={action}\n className={cn('animate-in fade-in-0 zoom-in-95 duration-200', className)}\n />\n );\n }\n return (\n <div\n className={cn(\n 'flex flex-col items-center justify-center',\n 'py-12 sm:py-16 px-4',\n 'text-center',\n 'animate-in fade-in-0 zoom-in-95 duration-200',\n className\n )}\n >\n {icon && (\n <div className=\"mb-4 p-4 rounded-2xl bg-bg-sunken/50 text-text-secondary\">{icon}</div>\n )}\n <h3 className=\"text-lg font-semibold text-text-primary mb-1\">{title}</h3>\n {description && <p className=\"text-sm text-text-secondary max-w-sm mb-4\">{description}</p>}\n {action}\n </div>\n );\n}\n\n/**\n * LoadingState - A consistent loading state component\n */\nexport function LoadingState({ message, className }: { message?: string; className?: string }) {\n const tr = useTr();\n return (\n <div className={cn('flex flex-col items-center justify-center py-20', className)}>\n <div className=\"relative\">\n <div className=\"absolute inset-0 bg-action-primary-bg/20 rounded-full blur-xl animate-pulse\" />\n <div className=\"relative size-12 border-4 border-primary/30 border-t-primary rounded-full animate-spin\" />\n </div>\n <span className=\"mt-6 text-sm font-medium text-text-secondary\">\n {message ?? tr('support.loading.default', 'Loading...')}\n </span>\n </div>\n );\n}\n"],"mappings":";;;;;AAwCA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;AACR;AAWA,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,qBACA,YAAS,IACT,kBACkB;CAIlB,IAAM,IACJ,KAAe,KAAS,EAAM,SAAS,CAAW,IAC9C,EAAM,MAAM,GAAG,EAAM,SAAS,EAAY,MAAM,IAChD;CACN,OACE,kBAAC,OAAD;EACE,WAAW,EAET,iBAEA,iCAEA,yBAEA,4DACA,CACF;EAGA,UAAA,kBAAC,OAAD;GAAK,WAAW,EAAG,kBAAkB,EAAgB,IAAW,CAAgB;GAAhF,UAAA,CAEG,MAAe,KAAS,MACvB,kBAAC,UAAD;IACE,WAAW,EACT,gBAEA,KACE,8HACJ;IANF,UAAA;KAQG,KAAU,kBAAC,GAAD,EAAkB,WAAU,SAAU,CAAA;KACjD,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CAEE,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,EACI,KAAS,MACT,kBAAC,OAAD;QAAK,WAAU;QAAf,UAAA,CACG,KACC,kBAAC,OAAD;SAAK,WAAU;SACZ,UAAA;QACE,CAAA,GAEN,KACC,kBAAC,MAAD;SAAI,WAAU;SACX,UAAA,MAAe,OAMd,IALA,kBAAA,GAAA,EAAA,UAAA,CACG,GACD,kBAAC,GAAD,EAAA,UAAe,EAA0B,CAAA,CACzC,EAAA,CAAA;QAIF,CAAA,CAEH;OAEN,CAAA,GAAA,KACC,kBAAC,KAAD;QAAG,WAAU;QAAsD,UAAA;OAAY,CAAA,CAE9E;MAGJ,CAAA,GAAA,KACC,kBAAC,OAAD;OAAK,WAAU;OAAyC,UAAA;MAAmB,CAAA,CAE1E;;KAGJ,KAAiB,kBAAC,OAAD;MAAK,WAAU;MAAQ,UAAA;KAAmB,CAAA;IACtD;GAMV,CAAA,GAAA,kBAAC,OAAD;IAAK,WAAU;IAAa;GAAc,CAAA,CACvC;;CACF,CAAA;AAET;AAKA,SAAgB,EAAW,EACzB,SACA,iBACA,oBACA,UACA,gBACA,WACA,gBAeC;CAaD,OAZI,IAEA,kBAAC,GAAD;EACgB;EACd,KAAK;EACE;EACM;EACL;EACR,WAAW,EAAG,gDAAgD,CAAS;CACxE,CAAA,IAIH,kBAAC,OAAD;EACE,WAAW,EACT,6CACA,uBACA,eACA,gDACA,CACF;EAPF,UAAA;GASG,KACC,kBAAC,OAAD;IAAK,WAAU;IAA4D,UAAA;GAAU,CAAA;GAEvF,kBAAC,MAAD;IAAI,WAAU;IAAgD,UAAA;GAAU,CAAA;GACvE,KAAe,kBAAC,KAAD;IAAG,WAAU;IAA6C,UAAA;GAAe,CAAA;GACxF;EACE;;AAET;AAKA,SAAgB,EAAa,EAAE,YAAS,gBAAuD;CAC7F,IAAM,IAAK,EAAM;CACjB,OACE,kBAAC,OAAD;EAAK,WAAW,EAAG,mDAAmD,CAAS;EAA/E,UAAA,CACE,kBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,kBAAC,OAAD,EAAK,WAAU,8EAA+E,CAAA,GAC9F,kBAAC,OAAD,EAAK,WAAU,yFAA0F,CAAA,CACtG;EACL,CAAA,GAAA,kBAAC,QAAD;GAAM,WAAU;GACb,UAAA,KAAW,EAAG,2BAA2B,YAAY;EAClD,CAAA,CACH;;AAET"}
|
|
@@ -1,40 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { useTr as e } from "../../hooks/useTr.js";
|
|
2
|
+
import { GlassCard as t } from "../ui.js";
|
|
3
|
+
import { analyticsSeriesClasses as n } from "../../utils/uiTokens.js";
|
|
4
|
+
import { FolderOpen as r } from "lucide-react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
6
|
//#region src/support/components/analytics/CategoryBreakdown.tsx
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
function o({ data: o }) {
|
|
8
|
+
let s = e(), c = o.reduce((e, t) => e + t.count, 0), l = o.slice(0, 8);
|
|
9
|
+
return /* @__PURE__ */ a(t, {
|
|
9
10
|
treatment: "insight",
|
|
10
11
|
className: "p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2",
|
|
11
|
-
children: [/* @__PURE__ */
|
|
12
|
+
children: [/* @__PURE__ */ a("h2", {
|
|
12
13
|
className: "text-xl font-semibold mb-4 flex items-center gap-2 text-primary",
|
|
13
|
-
children: [/* @__PURE__ */ r
|
|
14
|
-
}), /* @__PURE__ */
|
|
14
|
+
children: [/* @__PURE__ */ i(r, { size: 20 }), s("support.analytics.categoryBreakdown.title", "Top Categories")]
|
|
15
|
+
}), /* @__PURE__ */ i("div", {
|
|
15
16
|
className: "space-y-3",
|
|
16
|
-
children:
|
|
17
|
-
let
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
children: l.map((e, t) => {
|
|
18
|
+
let r = c > 0 ? e.count / c * 100 : 0, o = n[t % n.length];
|
|
19
|
+
return /* @__PURE__ */ a("div", {
|
|
19
20
|
className: "flex items-center justify-between transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded",
|
|
20
|
-
children: [/* @__PURE__ */
|
|
21
|
+
children: [/* @__PURE__ */ a("div", {
|
|
21
22
|
className: "flex items-center gap-2 flex-1",
|
|
22
|
-
children: [/* @__PURE__ */
|
|
23
|
+
children: [/* @__PURE__ */ i("div", { className: `w-3 h-3 rounded-full flex-shrink-0 ${o}` }), /* @__PURE__ */ i("span", {
|
|
23
24
|
className: "text-sm truncate text-primary",
|
|
24
25
|
children: e.category
|
|
25
26
|
})]
|
|
26
|
-
}), /* @__PURE__ */
|
|
27
|
+
}), /* @__PURE__ */ a("div", {
|
|
27
28
|
className: "flex items-center gap-3 ml-4",
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
+
children: [/* @__PURE__ */ i("div", {
|
|
29
30
|
className: "w-20",
|
|
30
|
-
children: /* @__PURE__ */
|
|
31
|
+
children: /* @__PURE__ */ i("div", {
|
|
31
32
|
className: "h-2 rounded-full bg-bg-sunken",
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
className: `h-full rounded-full transition-all duration-300 ${
|
|
34
|
-
style: { width: `${
|
|
33
|
+
children: /* @__PURE__ */ i("div", {
|
|
34
|
+
className: `h-full rounded-full transition-all duration-300 ${o}`,
|
|
35
|
+
style: { width: `${r}%` }
|
|
35
36
|
})
|
|
36
37
|
})
|
|
37
|
-
}), /* @__PURE__ */
|
|
38
|
+
}), /* @__PURE__ */ i("span", {
|
|
38
39
|
className: "text-sm font-semibold w-12 text-right text-primary tabular-nums",
|
|
39
40
|
children: e.count
|
|
40
41
|
})]
|
|
@@ -45,6 +46,6 @@ function a({ data: a }) {
|
|
|
45
46
|
});
|
|
46
47
|
}
|
|
47
48
|
//#endregion
|
|
48
|
-
export {
|
|
49
|
+
export { o as CategoryBreakdown };
|
|
49
50
|
|
|
50
51
|
//# sourceMappingURL=CategoryBreakdown.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/CategoryBreakdown.tsx"],"sourcesContent":["import { FolderOpen } from 'lucide-react';\nimport { analyticsSeriesClasses } from '../../utils/uiTokens';\nimport { GlassCard } from '../ui';\n\ninterface CategoryCount {\n category: string;\n count: number;\n}\n\ninterface CategoryBreakdownProps {\n data: CategoryCount[];\n}\n\nexport function CategoryBreakdown({ data }: CategoryBreakdownProps) {\n const total = data.reduce((sum, item) => sum + item.count, 0);\n const topCategories = data.slice(0, 8);\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <FolderOpen size={20} />\n Top Categories\n </h2>\n\n <div className=\"space-y-3\">\n {topCategories.map((item, index) => {\n const percentage = total > 0 ? (item.count / total) * 100 : 0;\n const colorClass = analyticsSeriesClasses[index % analyticsSeriesClasses.length];\n\n return (\n <div\n key={item.category}\n className=\"flex items-center justify-between transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded\"\n >\n <div className=\"flex items-center gap-2 flex-1\">\n <div className={`w-3 h-3 rounded-full flex-shrink-0 ${colorClass}`} />\n <span className=\"text-sm truncate text-primary\">{item.category}</span>\n </div>\n <div className=\"flex items-center gap-3 ml-4\">\n <div className=\"w-20\">\n <div className=\"h-2 rounded-full bg-bg-sunken\">\n <div\n className={`h-full rounded-full transition-all duration-300 ${colorClass}`}\n style={{\n width: `${percentage}%`,\n }}\n />\n </div>\n </div>\n <span className=\"text-sm font-semibold w-12 text-right text-primary tabular-nums\">\n {item.count}\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CategoryBreakdown.js","names":[],"sources":["../../../../src/support/components/analytics/CategoryBreakdown.tsx"],"sourcesContent":["import { FolderOpen } from 'lucide-react';\nimport { analyticsSeriesClasses } from '../../utils/uiTokens';\nimport { GlassCard } from '../ui';\nimport { useTr } from '../../hooks/useTr';\n\ninterface CategoryCount {\n category: string;\n count: number;\n}\n\ninterface CategoryBreakdownProps {\n data: CategoryCount[];\n}\n\nexport function CategoryBreakdown({ data }: CategoryBreakdownProps) {\n const tr = useTr();\n const total = data.reduce((sum, item) => sum + item.count, 0);\n const topCategories = data.slice(0, 8);\n\n return (\n <GlassCard\n treatment=\"insight\"\n className=\"p-6 border-border-seam animate-in fade-in-0 slide-in-from-bottom-2\"\n >\n <h2 className=\"text-xl font-semibold mb-4 flex items-center gap-2 text-primary\">\n <FolderOpen size={20} />\n {tr('support.analytics.categoryBreakdown.title', 'Top Categories')}\n </h2>\n\n <div className=\"space-y-3\">\n {topCategories.map((item, index) => {\n const percentage = total > 0 ? (item.count / total) * 100 : 0;\n const colorClass = analyticsSeriesClasses[index % analyticsSeriesClasses.length];\n\n return (\n <div\n key={item.category}\n className=\"flex items-center justify-between transition-colors duration-200 hover:bg-bg-sunken/50 p-1 rounded\"\n >\n <div className=\"flex items-center gap-2 flex-1\">\n <div className={`w-3 h-3 rounded-full flex-shrink-0 ${colorClass}`} />\n <span className=\"text-sm truncate text-primary\">{item.category}</span>\n </div>\n <div className=\"flex items-center gap-3 ml-4\">\n <div className=\"w-20\">\n <div className=\"h-2 rounded-full bg-bg-sunken\">\n <div\n className={`h-full rounded-full transition-all duration-300 ${colorClass}`}\n style={{\n width: `${percentage}%`,\n }}\n />\n </div>\n </div>\n <span className=\"text-sm font-semibold w-12 text-right text-primary tabular-nums\">\n {item.count}\n </span>\n </div>\n </div>\n );\n })}\n </div>\n </GlassCard>\n );\n}\n"],"mappings":";;;;;;AAcA,SAAgB,EAAkB,EAAE,WAAgC;CAClE,IAAM,IAAK,EAAM,GACX,IAAQ,EAAK,QAAQ,GAAK,MAAS,IAAM,EAAK,OAAO,CAAC,GACtD,IAAgB,EAAK,MAAM,GAAG,CAAC;CAErC,OACE,kBAAC,GAAD;EACE,WAAU;EACV,WAAU;EAFZ,UAAA,CAIE,kBAAC,MAAD;GAAI,WAAU;GAAd,UAAA,CACE,kBAAC,GAAD,EAAY,MAAM,GAAK,CAAA,GACtB,EAAG,6CAA6C,gBAAgB,CAC/D;EAEJ,CAAA,GAAA,kBAAC,OAAD;GAAK,WAAU;GACZ,UAAA,EAAc,KAAK,GAAM,MAAU;IAClC,IAAM,IAAa,IAAQ,IAAK,EAAK,QAAQ,IAAS,MAAM,GACtD,IAAa,EAAuB,IAAQ,EAAuB;IAEzE,OACE,kBAAC,OAAD;KAEE,WAAU;KAFZ,UAAA,CAIE,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,OAAD,EAAK,WAAW,sCAAsC,IAAe,CAAA,GACrE,kBAAC,QAAD;OAAM,WAAU;OAAiC,UAAA,EAAK;MAAe,CAAA,CAClE;KACL,CAAA,GAAA,kBAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,kBAAC,OAAD;OAAK,WAAU;OACb,UAAA,kBAAC,OAAD;QAAK,WAAU;QACb,UAAA,kBAAC,OAAD;SACE,WAAW,mDAAmD;SAC9D,OAAO,EACL,OAAO,GAAG,EAAW,GACvB;QACD,CAAA;OACE,CAAA;MACF,CAAA,GACL,kBAAC,QAAD;OAAM,WAAU;OACb,UAAA,EAAK;MACF,CAAA,CACH;KACF,CAAA,CAAA;IAtBE,GAAA,EAAK,QAsBP;GAET,CAAC;EACE,CAAA,CACI;;AAEf"}
|