@mdxui/tremor 6.0.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 +255 -0
- package/dist/dashboard/components/index.d.ts +355 -0
- package/dist/dashboard/components/index.js +549 -0
- package/dist/dashboard/components/index.js.map +1 -0
- package/dist/dashboard/index.d.ts +275 -0
- package/dist/dashboard/index.js +1062 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/database/index.d.ts +334 -0
- package/dist/database/index.js +474 -0
- package/dist/database/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1089 -0
- package/dist/index.js.map +1 -0
- package/dist/insights/components/index.d.ts +362 -0
- package/dist/insights/components/index.js +1397 -0
- package/dist/insights/components/index.js.map +1 -0
- package/dist/insights/index.d.ts +360 -0
- package/dist/insights/index.js +1815 -0
- package/dist/insights/index.js.map +1 -0
- package/dist/overview/components/index.d.ts +86 -0
- package/dist/overview/components/index.js +775 -0
- package/dist/overview/components/index.js.map +1 -0
- package/dist/overview/index.d.ts +301 -0
- package/dist/overview/index.js +1077 -0
- package/dist/overview/index.js.map +1 -0
- package/dist/shared/index.d.ts +296 -0
- package/dist/shared/index.js +395 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/solar/components/index.d.ts +341 -0
- package/dist/solar/components/index.js +831 -0
- package/dist/solar/components/index.js.map +1 -0
- package/dist/solar/index.d.ts +301 -0
- package/dist/solar/index.js +1130 -0
- package/dist/solar/index.js.map +1 -0
- package/package.json +135 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/overview/components/sections/AgentsSection.tsx","../../../src/overview/components/sections/RetentionSection.tsx","../../../src/overview/components/sections/SupportSection.tsx","../../../src/overview/components/sections/WorkflowSection.tsx"],"sourcesContent":["'use client'\n\nimport type { AgentsDashboardProps } from 'mdxui'\nimport * as React from 'react'\nimport { twMerge } from 'tailwind-merge'\n\n/**\n * Agent data type for the agents table\n */\nexport interface Agent {\n agent_id: string\n full_name: string\n account: string\n start_date: string\n end_date: string | null\n number: string\n email: string\n registered: boolean\n minutes_called: number\n minutes_booked: number\n ticket_generation: boolean\n}\n\n/**\n * Extended props for AgentsSection component (Tremor overview variant)\n */\nexport interface AgentsSectionTremorProps {\n /** Agent data array (Tremor variant) */\n agents?: Agent[]\n /** Section title */\n title?: string\n /** Section description */\n description?: string\n /** Custom class name */\n className?: string\n}\n\n/**\n * Progress Circle component for capacity visualization\n */\nfunction ProgressCircle({\n value,\n radius = 14,\n strokeWidth = 3,\n variant = 'default',\n children,\n}: {\n value: number\n radius?: number\n strokeWidth?: number\n variant?: 'default' | 'warning' | 'error' | 'success'\n children?: React.ReactNode\n}) {\n const normalizedRadius = radius - strokeWidth / 2\n const circumference = 2 * Math.PI * normalizedRadius\n const strokeDashoffset = circumference - (value / 100) * circumference\n\n const variantColors = {\n default: 'stroke-blue-500',\n warning: 'stroke-amber-500',\n error: 'stroke-red-500',\n success: 'stroke-emerald-500',\n }\n\n return (\n <div className='relative inline-flex items-center justify-center'>\n <svg height={radius * 2} width={radius * 2} className='rotate-[-90deg]' aria-hidden='true'>\n <circle\n className='stroke-gray-200 dark:stroke-gray-800'\n fill='transparent'\n strokeWidth={strokeWidth}\n r={normalizedRadius}\n cx={radius}\n cy={radius}\n />\n <circle\n className={variantColors[variant]}\n fill='transparent'\n strokeWidth={strokeWidth}\n strokeDasharray={circumference}\n strokeDashoffset={strokeDashoffset}\n strokeLinecap='round'\n r={normalizedRadius}\n cx={radius}\n cy={radius}\n />\n </svg>\n {children && <div className='absolute inset-0 flex items-center justify-center'>{children}</div>}\n </div>\n )\n}\n\n/**\n * Badge component for status display\n */\nfunction Badge({\n children,\n variant = 'default',\n className = '',\n}: {\n children: React.ReactNode\n variant?: 'default' | 'success' | 'warning' | 'error'\n className?: string\n}) {\n const variantClasses = {\n default: 'bg-gray-100 text-gray-700 dark:bg-gray-800 dark:text-gray-300',\n success: 'bg-emerald-50 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400',\n warning: 'bg-amber-50 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400',\n error: 'bg-red-50 text-red-700 dark:bg-red-900/30 dark:text-red-400',\n }\n\n return (\n <span className={twMerge('inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium', variantClasses[variant], className)}>\n {children}\n </span>\n )\n}\n\n/**\n * Shield check icon for registered status\n */\nfunction ShieldCheckIcon({ className }: { className?: string }) {\n return (\n <svg className={className} fill='currentColor' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg' aria-hidden='true'>\n <path d='M12 2L4 5v6.09c0 5.05 3.41 9.76 8 10.91 4.59-1.15 8-5.86 8-10.91V5l-8-3zm-1.06 13.54L7.4 12l1.41-1.41 2.12 2.12 4.24-4.24 1.41 1.41-5.64 5.66z' />\n </svg>\n )\n}\n\n/**\n * Ticket generation toggle button\n */\nfunction TicketGenerationButton({ initialState }: { initialState: boolean }) {\n const [enabled, setEnabled] = React.useState(initialState)\n\n return (\n <button\n type='button'\n role='switch'\n aria-checked={enabled}\n className={twMerge(\n 'relative inline-flex h-5 w-9 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2',\n enabled ? 'bg-blue-600' : 'bg-gray-200 dark:bg-gray-700',\n )}\n onClick={() => setEnabled(!enabled)}>\n <span\n className={twMerge(\n 'pointer-events-none inline-block h-4 w-4 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out',\n enabled ? 'translate-x-4' : 'translate-x-0',\n )}\n />\n </button>\n )\n}\n\n/**\n * Divider component\n */\nfunction Divider() {\n return <div className='my-6 h-px w-full bg-gray-200 dark:bg-gray-800' />\n}\n\n/**\n * Data table filter bar\n */\nfunction FilterBar({\n globalFilter,\n setGlobalFilter,\n registeredOnly,\n setRegisteredOnly,\n}: {\n globalFilter: string\n setGlobalFilter: (value: string) => void\n registeredOnly: boolean\n setRegisteredOnly: (value: boolean) => void\n}) {\n return (\n <div className='flex flex-wrap items-center justify-between gap-4'>\n <div className='flex items-center gap-4'>\n <div className='relative'>\n <svg\n className='absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-gray-400'\n fill='none'\n stroke='currentColor'\n viewBox='0 0 24 24'\n aria-hidden='true'>\n <path strokeLinecap='round' strokeLinejoin='round' strokeWidth={2} d='M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z' />\n </svg>\n <input\n type='text'\n placeholder='Search agents...'\n value={globalFilter}\n onChange={(e) => setGlobalFilter(e.target.value)}\n className='w-64 rounded-md border border-gray-300 bg-white py-2 pl-10 pr-4 text-sm placeholder-gray-400 focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100'\n />\n </div>\n <label className='flex items-center gap-2 text-sm text-gray-600 dark:text-gray-400'>\n <input\n type='checkbox'\n checked={registeredOnly}\n onChange={(e) => setRegisteredOnly(e.target.checked)}\n className='h-4 w-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500'\n />\n Registered only\n </label>\n </div>\n </div>\n )\n}\n\n/**\n * Pagination component\n */\nfunction Pagination({\n pageIndex,\n pageSize,\n totalRows,\n onPageChange,\n}: {\n pageIndex: number\n pageSize: number\n totalRows: number\n onPageChange: (page: number) => void\n}) {\n const totalPages = Math.ceil(totalRows / pageSize)\n const startRow = pageIndex * pageSize + 1\n const endRow = Math.min((pageIndex + 1) * pageSize, totalRows)\n\n return (\n <div className='flex items-center justify-between text-sm text-gray-600 dark:text-gray-400'>\n <span>\n Showing {startRow} to {endRow} of {totalRows} agents\n </span>\n <div className='flex items-center gap-2'>\n <button\n type='button'\n onClick={() => onPageChange(pageIndex - 1)}\n disabled={pageIndex === 0}\n className='rounded-md border border-gray-300 px-3 py-1 disabled:opacity-50 dark:border-gray-700'>\n Previous\n </button>\n <span>\n Page {pageIndex + 1} of {totalPages}\n </span>\n <button\n type='button'\n onClick={() => onPageChange(pageIndex + 1)}\n disabled={pageIndex >= totalPages - 1}\n className='rounded-md border border-gray-300 px-3 py-1 disabled:opacity-50 dark:border-gray-700'>\n Next\n </button>\n </div>\n </div>\n )\n}\n\n/**\n * Format phone number for display\n */\nfunction formatPhoneNumber(number: string): string {\n return number.replace(/(\\+41)(\\d{2})(\\d{3})(\\d{2})(\\d{2})/, '$1 $2 $3 $4 $5')\n}\n\n/**\n * Format date for display\n */\nfunction formatDate(dateString: string): string {\n return new Date(dateString).toLocaleDateString('en-GB', {\n day: '2-digit',\n month: '2-digit',\n year: 'numeric',\n })\n}\n\n/**\n * Get capacity variant based on percentage\n */\nfunction getCapacityVariant(value: number): 'default' | 'warning' | 'error' {\n const fixedValue = parseFloat(value.toFixed(0))\n if (fixedValue >= 85) return 'error'\n if (fixedValue > 60) return 'warning'\n return 'default'\n}\n\n/**\n * Simple metrics card for mdxui interface\n */\nfunction MetricCard({ label, value }: { label: string; value: string | number }) {\n return (\n <div className='rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800'>\n <p className='text-sm text-gray-500 dark:text-gray-400'>{label}</p>\n <p className='mt-1 text-2xl font-semibold text-gray-900 dark:text-white'>{value}</p>\n </div>\n )\n}\n\n/**\n * Combined props type for AgentsSection supporting both interfaces\n */\nexport type AgentsSectionProps = AgentsSectionTremorProps | Partial<AgentsDashboardProps>\n\n/**\n * AgentsSection - Agents data table dashboard section\n *\n * Supports both mdxui AgentsDashboardProps interface and Tremor's data table variant.\n *\n * @example mdxui interface\n * ```tsx\n * <AgentsSection\n * totalAgents={10}\n * activeAgents={5}\n * runsToday={100}\n * successRate={95}\n * />\n * ```\n *\n * @example Tremor data table variant\n * ```tsx\n * <AgentsSection\n * agents={agentData}\n * title=\"Agents\"\n * />\n * ```\n */\nexport function AgentsSection(props: AgentsSectionProps) {\n // Determine which variant to render based on props\n const isTremorVariant = 'agents' in props || (!('totalAgents' in props) && !('activeAgents' in props))\n\n if (isTremorVariant) {\n return <AgentsSectionTremor {...(props as AgentsSectionTremorProps)} />\n }\n\n // For mdxui variant, provide default for loading\n const mdxuiProps = props as Partial<AgentsDashboardProps>\n return (\n <AgentsSectionMdxui\n totalAgents={mdxuiProps.totalAgents ?? 0}\n activeAgents={mdxuiProps.activeAgents ?? 0}\n runsToday={mdxuiProps.runsToday ?? 0}\n successRate={mdxuiProps.successRate ?? 0}\n loading={mdxuiProps.loading ?? false}\n topAgents={mdxuiProps.topAgents}\n performanceData={mdxuiProps.performanceData}\n className={mdxuiProps.className}\n />\n )\n}\n\n/**\n * Tremor variant - data table with agents\n */\nfunction AgentsSectionTremor({\n agents = [],\n title = 'Agents',\n description = 'Monitor agent performance and manage ticket generation',\n className = '',\n}: AgentsSectionTremorProps) {\n const [globalFilter, setGlobalFilter] = React.useState('')\n const [registeredOnly, setRegisteredOnly] = React.useState(false)\n const [pageIndex, setPageIndex] = React.useState(0)\n const pageSize = 16\n\n // Filter agents based on search and registered status\n const filteredAgents = React.useMemo(() => {\n let result = agents\n\n if (globalFilter) {\n const lowerFilter = globalFilter.toLowerCase()\n result = result.filter(\n (agent) =>\n agent.full_name.toLowerCase().includes(lowerFilter) ||\n agent.agent_id.toLowerCase().includes(lowerFilter) ||\n agent.email.toLowerCase().includes(lowerFilter) ||\n agent.account.toLowerCase().includes(lowerFilter),\n )\n }\n\n if (registeredOnly) {\n result = result.filter((agent) => agent.registered)\n }\n\n return result\n }, [agents, globalFilter, registeredOnly])\n\n // Paginate filtered agents\n const paginatedAgents = React.useMemo(() => {\n const start = pageIndex * pageSize\n return filteredAgents.slice(start, start + pageSize)\n }, [filteredAgents, pageIndex])\n\n // Reset page when filter changes\n React.useEffect(() => {\n setPageIndex(0)\n }, [])\n\n return (\n <main className={twMerge('', className)} data-testid='agents-section'>\n <div className='flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between'>\n <div>\n <h1 className='text-2xl font-semibold text-gray-900 dark:text-gray-50'>{title}</h1>\n <p className='text-gray-500 sm:text-sm/6 dark:text-gray-500'>{description}</p>\n </div>\n </div>\n <Divider />\n <section className='mt-8'>\n <div className='space-y-6'>\n <FilterBar\n globalFilter={globalFilter}\n setGlobalFilter={setGlobalFilter}\n registeredOnly={registeredOnly}\n setRegisteredOnly={setRegisteredOnly}\n />\n <div className='relative overflow-hidden overflow-x-auto'>\n <table className='w-full text-left'>\n <thead>\n <tr className='border-b border-gray-200 dark:border-gray-800'>\n <th className='whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs'>Agent</th>\n <th className='whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs'>\n Contact Information\n </th>\n <th className='whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs'>Contract Dates</th>\n <th className='whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs'>Account</th>\n <th className='whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs'>Capacity (mins)</th>\n <th className='whitespace-nowrap py-1 text-sm font-medium text-gray-900 dark:text-gray-50 sm:text-xs'>\n Ticket Generation\n </th>\n </tr>\n </thead>\n <tbody>\n {paginatedAgents.length > 0 ?\n paginatedAgents.map((agent) => {\n const capacity = agent.minutes_booked > 0 ? (agent.minutes_called / agent.minutes_booked) * 100 : 0\n\n return (\n <tr\n key={agent.agent_id}\n className='group select-none border-b border-gray-100 hover:bg-[#FBFBFC] dark:border-gray-800 hover:dark:bg-gray-900'>\n <td className='relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400'>\n <div className='flex flex-col gap-1'>\n <span className='font-medium text-gray-900 dark:text-gray-50'>{agent.full_name}</span>\n <div className='flex items-center gap-1 text-xs'>\n <span className='text-gray-500 dark:text-gray-500'>AgID </span>\n <span className='font-mono font-medium uppercase tabular-nums text-gray-900 dark:text-gray-50'>\n {agent.agent_id}\n </span>\n <ShieldCheckIcon\n className={twMerge(\n 'size-3 shrink-0',\n agent.registered ? 'text-emerald-600 dark:text-emerald-400' : 'text-gray-400 dark:text-gray-600',\n )}\n />\n </div>\n </div>\n </td>\n <td className='relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400'>\n <div className='flex flex-col gap-1'>\n <span className='text-gray-900 dark:text-gray-50'>{formatPhoneNumber(agent.number)}</span>\n <span className='text-xs text-gray-500 dark:text-gray-500'>{agent.email}</span>\n </div>\n </td>\n <td className='relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400'>\n <div className='flex flex-col gap-1'>\n <span className='tabular-nums text-gray-900 dark:text-gray-50'>\n {agent.end_date ?\n <>End: {formatDate(agent.end_date)}</>\n : <Badge className='px-1.5 py-0.5' variant='success'>\n Active\n </Badge>\n }\n </span>\n <span className='text-xs tabular-nums text-gray-500 dark:text-gray-500'>\n Start: {formatDate(agent.start_date)}\n </span>\n </div>\n </td>\n <td className='relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400'>\n <div className='flex flex-col gap-1'>\n <span className='text-gray-900 dark:text-gray-50'>{agent.account}</span>\n <span className='text-xs text-gray-500 dark:text-gray-500'>Main division</span>\n </div>\n </td>\n <td className='relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400'>\n <div className='flex gap-2'>\n <div className='flex items-center gap-x-2.5'>\n <ProgressCircle value={capacity} radius={14} strokeWidth={3} variant={getCapacityVariant(capacity)}>\n <span className='text-[11px] font-semibold text-gray-900 dark:text-gray-50'>{capacity.toFixed(0)}</span>\n </ProgressCircle>\n </div>\n <div className='flex flex-col gap-0'>\n <span className='text-gray-900 dark:text-gray-50'>\n <span className='text-gray-500 dark:text-gray-500'>Called </span>\n <span className='font-medium'>{new Intl.NumberFormat().format(agent.minutes_called)}</span>\n </span>\n <span className='text-xs text-gray-500 dark:text-gray-500'>\n Booked {new Intl.NumberFormat().format(agent.minutes_booked)}\n </span>\n </div>\n </div>\n </td>\n <td className='relative whitespace-nowrap py-2.5 text-gray-600 dark:text-gray-400'>\n <TicketGenerationButton initialState={agent.ticket_generation} />\n </td>\n </tr>\n )\n })\n : <tr>\n <td colSpan={6} className='h-24 text-center text-gray-500 dark:text-gray-400'>\n No results.\n </td>\n </tr>\n }\n </tbody>\n </table>\n </div>\n <Pagination pageIndex={pageIndex} pageSize={pageSize} totalRows={filteredAgents.length} onPageChange={setPageIndex} />\n </div>\n </section>\n </main>\n )\n}\n\n/**\n * mdxui interface variant - simple metrics display\n */\nfunction AgentsSectionMdxui({\n totalAgents,\n activeAgents,\n runsToday,\n successRate,\n topAgents,\n loading = false,\n className,\n}: AgentsDashboardProps) {\n if (loading) {\n return (\n <div data-testid='agents-section-loading' className={twMerge('animate-pulse space-y-4', className)}>\n <div className='h-8 w-48 rounded bg-gray-200 dark:bg-gray-700' />\n <div className='grid grid-cols-2 gap-4 md:grid-cols-4'>\n {[...Array(4)].map((_, i) => (\n <div key={i.toString()} className='h-24 rounded-lg bg-gray-200 dark:bg-gray-700' />\n ))}\n </div>\n </div>\n )\n }\n\n return (\n <section className={twMerge('space-y-6', className)}>\n <h2 className='text-lg font-semibold text-gray-900 dark:text-white'>Agents Overview</h2>\n\n <div className='grid grid-cols-2 gap-4 md:grid-cols-4'>\n <MetricCard label='Total Agents' value={totalAgents} />\n <MetricCard label='Active Agents' value={activeAgents} />\n <MetricCard label='Runs Today' value={runsToday} />\n <MetricCard label='Success Rate' value={`${successRate}%`} />\n </div>\n\n {topAgents && topAgents.length > 0 && (\n <div className='mt-6'>\n <h3 className='mb-4 text-sm font-medium text-gray-700 dark:text-gray-300'>Top Performing Agents</h3>\n <div className='space-y-3'>\n {topAgents.map((agent) => (\n <div key={agent.id} className='flex items-center justify-between rounded-lg border border-gray-200 p-3 dark:border-gray-700'>\n <div className='flex items-center gap-3'>\n <div className='flex h-8 w-8 items-center justify-center rounded-full bg-blue-100 text-blue-600 dark:bg-blue-900 dark:text-blue-300'>\n {agent.name.charAt(0)}\n </div>\n <span className='font-medium text-gray-900 dark:text-white'>{agent.name}</span>\n </div>\n <div className='flex items-center gap-4 text-sm text-gray-500 dark:text-gray-400'>\n <span>{agent.runs} runs</span>\n <span className='text-green-600 dark:text-green-400'>{agent.successRate}%</span>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n </section>\n )\n}\n\n// Type re-exported from interface definition above\n","import type { RetentionDashboardProps } from \"mdxui\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * RetentionSection - User retention analytics section\n *\n * Displays cohort retention data with current retention rate and trend indicator.\n * Shows a cohort table with retention percentages by period.\n */\nexport function RetentionSection({\n\tcohorts,\n\tperiods,\n\tcurrentRetention,\n\ttrend,\n\tloading = false,\n\tclassName,\n}: RetentionDashboardProps) {\n\tif (loading) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tdata-testid=\"retention-section-loading\"\n\t\t\t\tclassName={twMerge(\"animate-pulse space-y-4\", className)}\n\t\t\t>\n\t\t\t\t<div className=\"h-8 w-48 rounded bg-gray-200 dark:bg-gray-700\" />\n\t\t\t\t<div className=\"h-32 rounded-lg bg-gray-200 dark:bg-gray-700\" />\n\t\t\t\t<div className=\"h-64 rounded-lg bg-gray-200 dark:bg-gray-700\" />\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<section className={twMerge(\"space-y-6\", className)}>\n\t\t\t<h2 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n\t\t\t\tRetention Analytics\n\t\t\t</h2>\n\n\t\t\t{/* Current Retention */}\n\t\t\t<div className=\"flex items-center gap-4 rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800\">\n\t\t\t\t<div>\n\t\t\t\t\t<p className=\"text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\tCurrent Retention\n\t\t\t\t\t</p>\n\t\t\t\t\t<p className=\"mt-1 text-3xl font-semibold text-gray-900 dark:text-white\">\n\t\t\t\t\t\t{currentRetention}%\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<TrendIndicator trend={trend} />\n\t\t\t</div>\n\n\t\t\t{/* Cohort Table */}\n\t\t\t<div className=\"overflow-x-auto rounded-lg border border-gray-200 dark:border-gray-700\">\n\t\t\t\t<table className=\"min-w-full divide-y divide-gray-200 dark:divide-gray-700\">\n\t\t\t\t\t<thead className=\"bg-gray-50 dark:bg-gray-800\">\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th className=\"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\tCohort\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t<th className=\"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\tSize\n\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t{periods.map((period) => (\n\t\t\t\t\t\t\t\t<th\n\t\t\t\t\t\t\t\t\tkey={period}\n\t\t\t\t\t\t\t\t\tclassName=\"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500 dark:text-gray-400\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{period}\n\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody className=\"divide-y divide-gray-200 bg-white dark:divide-gray-700 dark:bg-gray-900\">\n\t\t\t\t\t\t{cohorts.map((cohort) => (\n\t\t\t\t\t\t\t<tr key={cohort.cohort}>\n\t\t\t\t\t\t\t\t<td className=\"whitespace-nowrap px-4 py-3 text-sm font-medium text-gray-900 dark:text-white\">\n\t\t\t\t\t\t\t\t\t{cohort.cohort}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td className=\"whitespace-nowrap px-4 py-3 text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\t\t{cohort.size}\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t{cohort.retention.map((rate, idx) => (\n\t\t\t\t\t\t\t\t\t<td\n\t\t\t\t\t\t\t\t\t\tkey={idx.toString()}\n\t\t\t\t\t\t\t\t\t\tclassName=\"whitespace-nowrap px-4 py-3 text-sm\"\n\t\t\t\t\t\t\t\t\t\tstyle={{\n\t\t\t\t\t\t\t\t\t\t\tbackgroundColor: getRetentionColor(rate),\n\t\t\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span className=\"font-medium text-gray-900 dark:text-white\">\n\t\t\t\t\t\t\t\t\t\t\t{rate}%\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</section>\n\t);\n}\n\nfunction TrendIndicator({ trend }: { trend: \"up\" | \"down\" | \"flat\" }) {\n\tconst colors = {\n\t\tup: \"text-green-600 dark:text-green-400\",\n\t\tdown: \"text-red-600 dark:text-red-400\",\n\t\tflat: \"text-gray-500 dark:text-gray-400\",\n\t};\n\n\tconst arrows = {\n\t\tup: (\n\t\t\t<svg\n\t\t\t\tclassName=\"h-5 w-5\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\td=\"M5 10l7-7m0 0l7 7m-7-7v18\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t),\n\t\tdown: (\n\t\t\t<svg\n\t\t\t\tclassName=\"h-5 w-5\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\td=\"M19 14l-7 7m0 0l-7-7m7 7V3\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t),\n\t\tflat: (\n\t\t\t<svg\n\t\t\t\tclassName=\"h-5 w-5\"\n\t\t\t\tfill=\"none\"\n\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\tstroke=\"currentColor\"\n\t\t\t\taria-hidden=\"true\"\n\t\t\t>\n\t\t\t\t<path\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth={2}\n\t\t\t\t\td=\"M5 12h14\"\n\t\t\t\t/>\n\t\t\t</svg>\n\t\t),\n\t};\n\n\treturn (\n\t\t<div\n\t\t\tdata-trend={trend}\n\t\t\tclassName={twMerge(\"flex items-center gap-1\", colors[trend])}\n\t\t>\n\t\t\t{arrows[trend]}\n\t\t\t<span className=\"text-sm font-medium capitalize\">{trend}</span>\n\t\t</div>\n\t);\n}\n\nfunction getRetentionColor(rate: number): string {\n\tif (rate >= 80) return \"rgba(34, 197, 94, 0.2)\"; // green\n\tif (rate >= 60) return \"rgba(234, 179, 8, 0.2)\"; // yellow\n\tif (rate >= 40) return \"rgba(249, 115, 22, 0.2)\"; // orange\n\treturn \"rgba(239, 68, 68, 0.2)\"; // red\n}\n","import type { SupportDashboardProps } from \"mdxui\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * SupportSection - Support metrics overview section\n *\n * Displays support metrics including open tickets, response time,\n * resolution rate, and CSAT score. Optionally shows ticket breakdowns.\n */\nexport function SupportSection({\n\topenTickets,\n\tavgResponseTime,\n\tresolutionRate,\n\tcsat,\n\tticketsByStatus,\n\tticketsByPriority,\n\tvolumeTrend: _volumeTrend,\n\tloading = false,\n\tclassName,\n}: SupportDashboardProps) {\n\tif (loading) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tdata-testid=\"support-section-loading\"\n\t\t\t\tclassName={twMerge(\"animate-pulse space-y-4\", className)}\n\t\t\t>\n\t\t\t\t<div className=\"h-8 w-48 rounded bg-gray-200 dark:bg-gray-700\" />\n\t\t\t\t<div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n\t\t\t\t\t{[...Array(4)].map((_, i) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={i.toString()}\n\t\t\t\t\t\t\tclassName=\"h-24 rounded-lg bg-gray-200 dark:bg-gray-700\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<section className={twMerge(\"space-y-6\", className)}>\n\t\t\t<h2 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n\t\t\t\tSupport Overview\n\t\t\t</h2>\n\n\t\t\t{/* Metrics Grid */}\n\t\t\t<div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n\t\t\t\t<MetricCard label=\"Open Tickets\" value={openTickets} />\n\t\t\t\t<MetricCard label=\"Avg Response\" value={`${avgResponseTime}m`} />\n\t\t\t\t<MetricCard label=\"Resolution Rate\" value={`${resolutionRate}%`} />\n\t\t\t\t<MetricCard label=\"CSAT\" value={csat} />\n\t\t\t</div>\n\n\t\t\t{/* Tickets By Status */}\n\t\t\t{ticketsByStatus && ticketsByStatus.length > 0 && (\n\t\t\t\t<div className=\"mt-6\">\n\t\t\t\t\t<h3 className=\"mb-4 text-sm font-medium text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\tTickets by Status\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div className=\"flex flex-wrap gap-3\">\n\t\t\t\t\t\t{ticketsByStatus.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item.status}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 rounded-full border border-gray-200 px-3 py-1 dark:border-gray-700\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<StatusDot status={item.status} />\n\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-gray-900 dark:text-white\">\n\t\t\t\t\t\t\t\t\t{item.status}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\t\t{item.count}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Tickets By Priority */}\n\t\t\t{ticketsByPriority && ticketsByPriority.length > 0 && (\n\t\t\t\t<div className=\"mt-6\">\n\t\t\t\t\t<h3 className=\"mb-4 text-sm font-medium text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\tTickets by Priority\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div className=\"space-y-2\">\n\t\t\t\t\t\t{ticketsByPriority.map((item) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={item.priority}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between rounded-lg border border-gray-200 p-3 dark:border-gray-700\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span className=\"text-sm font-medium text-gray-900 dark:text-white\">\n\t\t\t\t\t\t\t\t\t{item.priority}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span className=\"text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\t\t{item.count} tickets\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</section>\n\t);\n}\n\nfunction MetricCard({\n\tlabel,\n\tvalue,\n}: {\n\tlabel: string;\n\tvalue: string | number;\n}) {\n\treturn (\n\t\t<div className=\"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800\">\n\t\t\t<p className=\"text-sm text-gray-500 dark:text-gray-400\">{label}</p>\n\t\t\t<p className=\"mt-1 text-2xl font-semibold text-gray-900 dark:text-white\">\n\t\t\t\t{value}\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n\nfunction StatusDot({ status }: { status: string }) {\n\tconst colors: Record<string, string> = {\n\t\tOpen: \"bg-blue-500\",\n\t\tPending: \"bg-yellow-500\",\n\t\tResolved: \"bg-green-500\",\n\t\tClosed: \"bg-gray-500\",\n\t};\n\n\treturn (\n\t\t<span\n\t\t\tclassName={twMerge(\n\t\t\t\t\"h-2 w-2 rounded-full\",\n\t\t\t\tcolors[status] || \"bg-gray-400\",\n\t\t\t)}\n\t\t/>\n\t);\n}\n","import type { WorkflowDashboardProps } from \"mdxui\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * WorkflowSection - Workflow automation metrics section\n *\n * Displays workflow metrics including total/active workflows, runs today,\n * success rate, and time saved. Optionally shows workflow breakdowns.\n */\nexport function WorkflowSection({\n\ttotalWorkflows,\n\tactiveWorkflows,\n\trunsToday,\n\tsuccessRate,\n\ttimeSaved,\n\trunsByWorkflow,\n\trunHistory: _runHistory,\n\tloading = false,\n\tclassName,\n}: WorkflowDashboardProps) {\n\tif (loading) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tdata-testid=\"workflow-section-loading\"\n\t\t\t\tclassName={twMerge(\"animate-pulse space-y-4\", className)}\n\t\t\t>\n\t\t\t\t<div className=\"h-8 w-48 rounded bg-gray-200 dark:bg-gray-700\" />\n\t\t\t\t<div className=\"grid grid-cols-2 gap-4 md:grid-cols-4\">\n\t\t\t\t\t{[...Array(4)].map((_, i) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tkey={i.toString()}\n\t\t\t\t\t\t\tclassName=\"h-24 rounded-lg bg-gray-200 dark:bg-gray-700\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t);\n\t}\n\n\tconst metrics = [\n\t\t{ label: \"Total Workflows\", value: totalWorkflows },\n\t\t{ label: \"Active Workflows\", value: activeWorkflows },\n\t\t{ label: \"Runs Today\", value: runsToday },\n\t\t{ label: \"Success Rate\", value: `${successRate}%` },\n\t];\n\n\tif (timeSaved !== undefined) {\n\t\tmetrics.push({ label: \"Time Saved\", value: `${timeSaved}h` });\n\t}\n\n\treturn (\n\t\t<section className={twMerge(\"space-y-6\", className)}>\n\t\t\t<h2 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n\t\t\t\tWorkflow Automation\n\t\t\t</h2>\n\n\t\t\t{/* Metrics Grid */}\n\t\t\t<div className=\"grid grid-cols-2 gap-4 md:grid-cols-4 lg:grid-cols-5\">\n\t\t\t\t{metrics.map((metric) => (\n\t\t\t\t\t<MetricCard\n\t\t\t\t\t\tkey={metric.label}\n\t\t\t\t\t\tlabel={metric.label}\n\t\t\t\t\t\tvalue={metric.value}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t</div>\n\n\t\t\t{/* Runs By Workflow */}\n\t\t\t{runsByWorkflow && runsByWorkflow.length > 0 && (\n\t\t\t\t<div className=\"mt-6\">\n\t\t\t\t\t<h3 className=\"mb-4 text-sm font-medium text-gray-700 dark:text-gray-300\">\n\t\t\t\t\t\tWorkflows Overview\n\t\t\t\t\t</h3>\n\t\t\t\t\t<div className=\"space-y-3\">\n\t\t\t\t\t\t{runsByWorkflow.map((workflow) => (\n\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\tkey={workflow.id}\n\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-between rounded-lg border border-gray-200 p-3 dark:border-gray-700\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t\t<div className=\"flex h-8 w-8 items-center justify-center rounded-lg bg-purple-100 text-purple-600 dark:bg-purple-900 dark:text-purple-300\">\n\t\t\t\t\t\t\t\t\t\t<WorkflowIcon />\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<span className=\"font-medium text-gray-900 dark:text-white\">\n\t\t\t\t\t\t\t\t\t\t{workflow.name}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div className=\"flex items-center gap-4 text-sm text-gray-500 dark:text-gray-400\">\n\t\t\t\t\t\t\t\t\t<span>{workflow.runs} runs</span>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclassName={\n\t\t\t\t\t\t\t\t\t\t\tworkflow.successRate >= 90\n\t\t\t\t\t\t\t\t\t\t\t\t? \"text-green-600 dark:text-green-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t: workflow.successRate >= 70\n\t\t\t\t\t\t\t\t\t\t\t\t\t? \"text-yellow-600 dark:text-yellow-400\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t: \"text-red-600 dark:text-red-400\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{workflow.successRate}%\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</section>\n\t);\n}\n\nfunction MetricCard({\n\tlabel,\n\tvalue,\n}: {\n\tlabel: string;\n\tvalue: string | number;\n}) {\n\treturn (\n\t\t<div className=\"rounded-lg border border-gray-200 bg-white p-4 dark:border-gray-700 dark:bg-gray-800\">\n\t\t\t<p className=\"text-sm text-gray-500 dark:text-gray-400\">{label}</p>\n\t\t\t<p className=\"mt-1 text-2xl font-semibold text-gray-900 dark:text-white\">\n\t\t\t\t{value}\n\t\t\t</p>\n\t\t</div>\n\t);\n}\n\nfunction WorkflowIcon() {\n\treturn (\n\t\t<svg\n\t\t\tclassName=\"h-4 w-4\"\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\tstroke=\"currentColor\"\n\t\t\taria-hidden=\"true\"\n\t\t>\n\t\t\t<path\n\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\tstrokeWidth={2}\n\t\t\t\td=\"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n"],"mappings":";AAGA,YAAY,WAAW;AACvB,SAAS,eAAe;AA8DlB,SA8Y0B,UA7YxB,KADF;AA1BN,SAAS,eAAe;AAAA,EACtB;AAAA,EACA,SAAS;AAAA,EACT,cAAc;AAAA,EACd,UAAU;AAAA,EACV;AACF,GAMG;AACD,QAAM,mBAAmB,SAAS,cAAc;AAChD,QAAM,gBAAgB,IAAI,KAAK,KAAK;AACpC,QAAM,mBAAmB,gBAAiB,QAAQ,MAAO;AAEzD,QAAM,gBAAgB;AAAA,IACpB,SAAS;AAAA,IACT,SAAS;AAAA,IACT,OAAO;AAAA,IACP,SAAS;AAAA,EACX;AAEA,SACE,qBAAC,SAAI,WAAU,oDACb;AAAA,yBAAC,SAAI,QAAQ,SAAS,GAAG,OAAO,SAAS,GAAG,WAAU,mBAAkB,eAAY,QAClF;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,MAAK;AAAA,UACL;AAAA,UACA,GAAG;AAAA,UACH,IAAI;AAAA,UACJ,IAAI;AAAA;AAAA,MACN;AAAA,MACA;AAAA,QAA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AAa;AAAA,UACb,GAAE;AAAA;AAAA,MACH;AAAA;AAAA,EACD;AAEF;","names":["twMerge","jsx","jsxs","twMerge","jsx","jsxs","MetricCard","twMerge","jsx","jsxs","MetricCard"]}
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import { AgentsSection, RetentionSection, SupportSection, WorkflowSection } from './components/index.js';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
import 'mdxui';
|
|
5
|
+
|
|
6
|
+
interface OverviewAppProps {
|
|
7
|
+
/** App display name */
|
|
8
|
+
name?: string;
|
|
9
|
+
/** Child content */
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* OverviewApp - Root wrapper component for the Overview template
|
|
14
|
+
*
|
|
15
|
+
* Provides the root application wrapper with providers and theme setup.
|
|
16
|
+
* In the Overview template, this wraps the entire application.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <OverviewApp name="Support Dashboard">
|
|
21
|
+
* <OverviewShell>
|
|
22
|
+
* <Dashboard />
|
|
23
|
+
* </OverviewShell>
|
|
24
|
+
* </OverviewApp>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function OverviewApp({ name, children }: OverviewAppProps): react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
interface Breadcrumb {
|
|
30
|
+
label: string;
|
|
31
|
+
href?: string;
|
|
32
|
+
}
|
|
33
|
+
interface OverviewHeaderProps {
|
|
34
|
+
/** Current user */
|
|
35
|
+
user?: {
|
|
36
|
+
name: string;
|
|
37
|
+
email: string;
|
|
38
|
+
avatar?: string;
|
|
39
|
+
};
|
|
40
|
+
/** Show search */
|
|
41
|
+
showSearch?: boolean;
|
|
42
|
+
/** Show notifications */
|
|
43
|
+
showNotifications?: boolean;
|
|
44
|
+
/** Breadcrumbs */
|
|
45
|
+
breadcrumbs?: Breadcrumb[];
|
|
46
|
+
/** Logo component */
|
|
47
|
+
logo?: ReactNode;
|
|
48
|
+
/** Notifications component */
|
|
49
|
+
notifications?: ReactNode;
|
|
50
|
+
/** User profile component */
|
|
51
|
+
userProfile?: ReactNode;
|
|
52
|
+
/** Additional className */
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* OverviewHeader - Top header bar for the Overview template
|
|
57
|
+
*
|
|
58
|
+
* Provides a header bar with logo, user profile, and notifications.
|
|
59
|
+
* This is typically used inside OverviewShell but can be used standalone.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <OverviewHeader
|
|
64
|
+
* user={{ name: 'John Doe', email: 'john@example.com.ai' }}
|
|
65
|
+
* showSearch={true}
|
|
66
|
+
* showNotifications={true}
|
|
67
|
+
* />
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
declare function OverviewHeader({ user, showSearch, showNotifications, breadcrumbs, logo, notifications, userProfile, className, }: OverviewHeaderProps): react_jsx_runtime.JSX.Element;
|
|
71
|
+
|
|
72
|
+
interface OverviewDashboardProps {
|
|
73
|
+
/** Dashboard title */
|
|
74
|
+
title: string;
|
|
75
|
+
/** Optional description text */
|
|
76
|
+
description?: string;
|
|
77
|
+
/** Action buttons or controls to render on the right */
|
|
78
|
+
actions?: ReactNode;
|
|
79
|
+
/** Main content area */
|
|
80
|
+
children: ReactNode;
|
|
81
|
+
/** Additional className for the container */
|
|
82
|
+
className?: string;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* OverviewDashboard - Dashboard page layout for the Overview template
|
|
86
|
+
*
|
|
87
|
+
* Provides a consistent layout structure for dashboard pages:
|
|
88
|
+
* - Title and description header
|
|
89
|
+
* - Optional action buttons area
|
|
90
|
+
* - Divider
|
|
91
|
+
* - Main content area
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```tsx
|
|
95
|
+
* <OverviewDashboard
|
|
96
|
+
* title="Support Dashboard"
|
|
97
|
+
* description="Real-time monitoring of support metrics"
|
|
98
|
+
* actions={<Button>Create Ticket</Button>}
|
|
99
|
+
* >
|
|
100
|
+
* <MetricsGrid />
|
|
101
|
+
* <TicketsTable />
|
|
102
|
+
* </OverviewDashboard>
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
declare function OverviewDashboard({ title, description, actions, children, className, }: OverviewDashboardProps): react_jsx_runtime.JSX.Element;
|
|
106
|
+
|
|
107
|
+
interface OverviewNavItem {
|
|
108
|
+
label: string;
|
|
109
|
+
href: string;
|
|
110
|
+
active?: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface OverviewShellProps {
|
|
113
|
+
/** Navigation items for the tab bar */
|
|
114
|
+
nav?: OverviewNavItem[];
|
|
115
|
+
/** Logo component or element */
|
|
116
|
+
logo?: ReactNode;
|
|
117
|
+
/** User profile component */
|
|
118
|
+
userProfile?: ReactNode;
|
|
119
|
+
/** Notifications component */
|
|
120
|
+
notifications?: ReactNode;
|
|
121
|
+
/** Main content area */
|
|
122
|
+
children: ReactNode;
|
|
123
|
+
/** Additional className for the main content area */
|
|
124
|
+
className?: string;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* OverviewShell - Top navigation shell for the Overview template
|
|
128
|
+
*
|
|
129
|
+
* A layout component that provides a top-nav dashboard shell structure:
|
|
130
|
+
* - Sticky header with logo, notifications, and user profile
|
|
131
|
+
* - Tab navigation below header
|
|
132
|
+
* - Main content area
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```tsx
|
|
136
|
+
* <OverviewShell
|
|
137
|
+
* nav={[
|
|
138
|
+
* { label: 'Support', href: '/support', active: true },
|
|
139
|
+
* { label: 'Retention', href: '/retention' },
|
|
140
|
+
* ]}
|
|
141
|
+
* >
|
|
142
|
+
* <SupportDashboard />
|
|
143
|
+
* </OverviewShell>
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
declare function OverviewShell({ nav, logo, userProfile, notifications, children, className }: OverviewShellProps): react_jsx_runtime.JSX.Element;
|
|
147
|
+
|
|
148
|
+
type SettingsSection = "profile" | "security" | "notifications" | "billing" | "team" | "api" | "integrations";
|
|
149
|
+
interface OverviewSettingsProps {
|
|
150
|
+
/** Settings sections to show */
|
|
151
|
+
sections?: SettingsSection[];
|
|
152
|
+
/** Currently active section */
|
|
153
|
+
activeSection?: SettingsSection;
|
|
154
|
+
/** Child content */
|
|
155
|
+
children?: ReactNode;
|
|
156
|
+
/** Additional className */
|
|
157
|
+
className?: string;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* OverviewSettings - Settings page layout for the Overview template
|
|
161
|
+
*
|
|
162
|
+
* Provides a settings page structure with sidebar navigation
|
|
163
|
+
* and main content area for settings forms.
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```tsx
|
|
167
|
+
* <OverviewSettings
|
|
168
|
+
* sections={['profile', 'security', 'notifications']}
|
|
169
|
+
* activeSection="profile"
|
|
170
|
+
* >
|
|
171
|
+
* <ProfileSettingsForm />
|
|
172
|
+
* </OverviewSettings>
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
declare function OverviewSettings({ sections, activeSection, children, className, }: OverviewSettingsProps): react_jsx_runtime.JSX.Element;
|
|
176
|
+
|
|
177
|
+
interface SidebarNavItem {
|
|
178
|
+
label: string;
|
|
179
|
+
href: string;
|
|
180
|
+
icon?: ReactNode;
|
|
181
|
+
}
|
|
182
|
+
interface OverviewSidebarProps {
|
|
183
|
+
/** Navigation items */
|
|
184
|
+
nav?: SidebarNavItem[];
|
|
185
|
+
/** User info for bottom of sidebar */
|
|
186
|
+
user?: {
|
|
187
|
+
name: string;
|
|
188
|
+
email: string;
|
|
189
|
+
avatar?: string;
|
|
190
|
+
};
|
|
191
|
+
/** Branding */
|
|
192
|
+
logo?: ReactNode;
|
|
193
|
+
/** Collapsed state */
|
|
194
|
+
collapsed?: boolean;
|
|
195
|
+
/** Additional className */
|
|
196
|
+
className?: string;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* OverviewSidebar - Navigation sidebar for the Overview template
|
|
200
|
+
*
|
|
201
|
+
* In the Overview template, this component provides a minimal sidebar
|
|
202
|
+
* that can be used alongside the top navigation. The primary navigation
|
|
203
|
+
* is in the tab bar (OverviewShell), but this can provide secondary nav.
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```tsx
|
|
207
|
+
* <OverviewSidebar
|
|
208
|
+
* nav={[
|
|
209
|
+
* { label: 'Dashboard', href: '/dashboard' },
|
|
210
|
+
* { label: 'Settings', href: '/settings' },
|
|
211
|
+
* ]}
|
|
212
|
+
* user={{ name: 'John Doe', email: 'john@example.com.ai' }}
|
|
213
|
+
* />
|
|
214
|
+
* ```
|
|
215
|
+
*/
|
|
216
|
+
declare function OverviewSidebar({ nav, user, logo, collapsed, className, }: OverviewSidebarProps): react_jsx_runtime.JSX.Element;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Overview Template - Multi-Section Dashboard
|
|
220
|
+
*
|
|
221
|
+
* Implements AppComponents interface for multi-section dashboards
|
|
222
|
+
* with agents, retention, support, and workflow views.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```tsx
|
|
226
|
+
* import { AppComponents, OverviewShell, OverviewDashboard } from '@mdxui/tremor/overview'
|
|
227
|
+
*
|
|
228
|
+
* // Use AppComponents interface
|
|
229
|
+
* const { App, Shell, Dashboard, Sidebar, Header, Settings } = AppComponents
|
|
230
|
+
*
|
|
231
|
+
* // Or use layout components directly
|
|
232
|
+
* <OverviewShell nav={[{ label: 'Support', href: '/support' }]}>
|
|
233
|
+
* <OverviewDashboard title="Support Dashboard">
|
|
234
|
+
* <SupportMetrics />
|
|
235
|
+
* </OverviewDashboard>
|
|
236
|
+
* </OverviewShell>
|
|
237
|
+
* ```
|
|
238
|
+
*
|
|
239
|
+
* @example Section components
|
|
240
|
+
* ```tsx
|
|
241
|
+
* import { AgentsSection, RetentionSection, SupportSection, WorkflowSection } from '@mdxui/tremor/overview'
|
|
242
|
+
*
|
|
243
|
+
* // Use section components with data
|
|
244
|
+
* <AgentsSection agents={agentData} />
|
|
245
|
+
* <RetentionSection cohorts={cohortData} />
|
|
246
|
+
* <SupportSection tickets={ticketData} />
|
|
247
|
+
* <WorkflowSection stats={workflowStats} />
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* AppComponents implementation for the Overview template.
|
|
253
|
+
*
|
|
254
|
+
* This object provides all required components for the mdxui AppComponents interface.
|
|
255
|
+
* Use this when you need a complete set of components for an Overview-style dashboard.
|
|
256
|
+
*
|
|
257
|
+
* The Overview template provides:
|
|
258
|
+
* - Top navigation shell with tab bar
|
|
259
|
+
* - Multi-section dashboard views (Support, Retention, Workflow, Agents)
|
|
260
|
+
* - Data tables and charts for analytics
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```tsx
|
|
264
|
+
* import { AppComponents } from '@mdxui/tremor/overview'
|
|
265
|
+
*
|
|
266
|
+
* // Use with mdxui
|
|
267
|
+
* <MDXProvider components={AppComponents}>
|
|
268
|
+
* <App>
|
|
269
|
+
* <Shell>
|
|
270
|
+
* <Dashboard title="Support">
|
|
271
|
+
* {content}
|
|
272
|
+
* </Dashboard>
|
|
273
|
+
* </Shell>
|
|
274
|
+
* </App>
|
|
275
|
+
* </MDXProvider>
|
|
276
|
+
* ```
|
|
277
|
+
*/
|
|
278
|
+
declare const AppComponents: {
|
|
279
|
+
/** Root application wrapper */
|
|
280
|
+
readonly App: typeof OverviewApp;
|
|
281
|
+
/** Top navigation shell layout */
|
|
282
|
+
readonly Shell: typeof OverviewShell;
|
|
283
|
+
/** Navigation sidebar (secondary) */
|
|
284
|
+
readonly Sidebar: typeof OverviewSidebar;
|
|
285
|
+
/** Header bar component */
|
|
286
|
+
readonly Header: typeof OverviewHeader;
|
|
287
|
+
/** Dashboard page layout */
|
|
288
|
+
readonly Dashboard: typeof OverviewDashboard;
|
|
289
|
+
/** Settings page layout */
|
|
290
|
+
readonly Settings: typeof OverviewSettings;
|
|
291
|
+
/** Agents dashboard section */
|
|
292
|
+
readonly AgentsSection: typeof AgentsSection;
|
|
293
|
+
/** Retention analytics section */
|
|
294
|
+
readonly RetentionSection: typeof RetentionSection;
|
|
295
|
+
/** Support metrics section */
|
|
296
|
+
readonly SupportSection: typeof SupportSection;
|
|
297
|
+
/** Workflow automation section */
|
|
298
|
+
readonly WorkflowSection: typeof WorkflowSection;
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
export { AgentsSection, AppComponents, type Breadcrumb, OverviewApp, type OverviewAppProps, OverviewDashboard, type OverviewDashboardProps, OverviewHeader, type OverviewHeaderProps, type OverviewNavItem, OverviewSettings, type OverviewSettingsProps, OverviewShell, type OverviewShellProps, OverviewSidebar, type OverviewSidebarProps, RetentionSection, type SettingsSection, type SidebarNavItem, SupportSection, WorkflowSection };
|