hermes-agent/apps/desktop/src/lib/icons.ts
Brooklyn Nicholson f9a8ecc0ce polish(desktop/billing): auto-poll, no-card notice, grouped card layout
Post-merge review polish of #68722 + #68761:
- Usage: drop the manual refresh + 'Updated Xm ago'; billing queries now
  refetchInterval-poll while the page is mounted, like every other data view.
- No card: lead the page with a warn notice naming the blocker + 'Add card ↗',
  so the silently-disabled buy/auto-refill controls have an obvious cause.
- Layout: unify on a shared SettingsCard/SettingsSection primitive; collapse the
  three floating one-row sections (Payment / One-time top-up / Automatic refill)
  into a single divide-y 'Payment & credits' card.
- Dev fixture switcher: relabel as a wrench + 'preview' dashed control so it
  reads as the DEV-only tool it is (compiled out of production).

Removed formatUsageUpdatedAgo/oldestUpdatedAt/UsageRefreshRow + their tests;
added no-card-notice and no-manual-refresh tests. vitest 107 green, tsc + eslint clean.
2026-07-22 16:48:04 -05:00

261 lines
5.3 KiB
TypeScript

import {
IconActivity as Activity,
IconAlertCircle as AlertCircle,
IconAlertTriangle as AlertTriangle,
IconAppWindow as AppWindow,
IconArchive as Archive,
IconArchiveOff as ArchiveOff,
IconArrowUp as ArrowUp,
IconArrowUpRight as ArrowUpRight,
IconAt as AtSign,
IconWaveSine as AudioLines,
IconChartBar as BarChart3,
IconBell as Bell,
IconBookmark as Bookmark,
IconBookmarkFilled as BookmarkFilled,
IconBox as Box,
IconBrain as Brain,
IconBug as Bug,
IconCheck as Check,
IconCircleCheck as CheckCircle2,
IconCheck as CheckIcon,
IconChevronDown as ChevronDown,
IconChevronDown as ChevronDownIcon,
IconChevronLeft as ChevronLeft,
IconChevronLeft as ChevronLeftIcon,
IconChevronRight as ChevronRight,
IconChevronRight as ChevronRightIcon,
IconCircle as CircleIcon,
IconCircleLetterA as CircleLetterA,
IconClipboard as Clipboard,
IconClock as Clock,
IconCloud as Cloud,
IconCommand as Command,
IconCopy as Copy,
IconCopy as CopyIcon,
IconCpu as Cpu,
IconCreditCard as CreditCard,
IconDownload as Download,
IconEgg as Egg,
IconExternalLink as ExternalLink,
IconEye as Eye,
IconEyeOff as EyeOff,
IconPhoto as FileImage,
IconFileText as FileText,
IconFolderOpen as FolderOpen,
IconGitBranch as GitBranch,
IconGitBranch as GitBranchIcon,
IconGitFork as GitFork,
IconGitFork as GitForkIcon,
IconGlobe as Globe,
IconHash as Hash,
IconHelpCircle as HelpCircle,
IconPhoto as ImageIcon,
IconInfoCircle as Info,
IconKeyboard as Keyboard,
IconKey as KeyRound,
IconLayersIntersect2 as Layers3,
IconLayoutDashboard as LayoutDashboard,
IconLink as Link,
IconLink as Link2,
IconLink as LinkIcon,
IconLoader2 as Loader2,
IconLoader2 as Loader2Icon,
IconLock as Lock,
IconLogin as LogIn,
IconMail as Mail,
IconMaximize as Maximize,
IconMessageCircle as MessageCircle,
IconMessageQuestion as MessageQuestion,
IconMessage2 as MessageSquareText,
IconMicrophone as Mic,
IconMicrophoneOff as MicOff,
IconDeviceDesktop as Monitor,
IconDeviceDesktopAnalytics as MonitorPlay,
IconMoon as Moon,
IconDots as MoreHorizontal,
IconDots as MoreHorizontalIcon,
IconDotsVertical as MoreVertical,
IconNotebook as NotebookTabs,
IconPackage as Package,
IconPalette as Palette,
IconLayoutBottombar as PanelBottom,
IconLayoutSidebar as PanelLeftIcon,
IconPlayerPause as Pause,
IconPaw as PawPrint,
IconPencil as Pencil,
IconPencil as PencilIcon,
IconPencil as PencilLine,
IconPin as Pin,
IconPlayerPlay as Play,
IconPlus as Plus,
IconRefresh as RefreshCw,
IconRefresh as RefreshCwIcon,
IconDeviceFloppy as Save,
IconSearch as Search,
IconSearch as SearchIcon,
IconSend as Send,
IconSettings as Settings,
IconSettings2 as Settings2,
IconAdjustmentsHorizontal as SlidersHorizontal,
IconSquare as Square,
IconChartDots3 as Starmap,
IconSteeringWheel as SteeringWheel,
IconPlayerStopFilled as StopFilled,
IconSun as Sun,
IconTerminal2 as Terminal,
IconTrash as Trash2,
IconUpload as Upload,
IconUsers as Users,
IconVolume2 as Volume2,
IconVolume2 as Volume2Icon,
IconVolumeOff as VolumeX,
IconVolumeOff as VolumeXIcon,
IconTool as Wrench,
IconX as X,
IconX as XIcon,
IconBolt as Zap,
IconBoltFilled as ZapFilled,
IconZoomIn as ZoomIn,
IconZoomOut as ZoomOut
} from '@tabler/icons-react'
export {
Activity,
AlertCircle,
AlertTriangle,
AppWindow,
Archive,
ArchiveOff,
ArrowUp,
ArrowUpRight,
AtSign,
AudioLines,
BarChart3,
Bell,
Bookmark,
BookmarkFilled,
Box,
Brain,
Bug,
Check,
CheckCircle2,
CheckIcon,
ChevronDown,
ChevronDownIcon,
ChevronLeft,
ChevronLeftIcon,
ChevronRight,
ChevronRightIcon,
CircleIcon,
CircleLetterA,
Clipboard,
Clock,
Cloud,
Command,
Copy,
CopyIcon,
Cpu,
CreditCard,
Download,
Egg,
ExternalLink,
Eye,
EyeOff,
FileImage,
FileText,
FolderOpen,
GitBranch,
GitBranchIcon,
GitFork,
GitForkIcon,
Globe,
Hash,
HelpCircle,
ImageIcon,
Info,
Keyboard,
KeyRound,
Layers3,
LayoutDashboard,
Link,
Link2,
LinkIcon,
Loader2,
Loader2Icon,
Lock,
LogIn,
Mail,
Maximize,
MessageCircle,
MessageQuestion,
MessageSquareText,
Mic,
MicOff,
Monitor,
MonitorPlay,
Moon,
MoreHorizontal,
MoreHorizontalIcon,
MoreVertical,
NotebookTabs,
Package,
Palette,
PanelBottom,
PanelLeftIcon,
Pause,
PawPrint,
Pencil,
PencilIcon,
PencilLine,
Pin,
Play,
Plus,
RefreshCw,
RefreshCwIcon,
Save,
Search,
SearchIcon,
Send,
Settings,
Settings2,
SlidersHorizontal,
Square,
Starmap,
SteeringWheel,
StopFilled,
Sun,
Terminal,
Trash2,
Upload,
Users,
Volume2,
Volume2Icon,
VolumeX,
VolumeXIcon,
Wrench,
X,
XIcon,
Zap,
ZapFilled,
ZoomIn,
ZoomOut
}
export type { Icon as IconComponent } from '@tabler/icons-react'
/**
* Named icon-size scale — the single source of truth for SVG icon dimensions,
* replacing ad-hoc `h-N w-N` / `size={N}`. Use `<Icon className={iconSize.sm} />`
* (Tailwind `size-*` sets w+h and beats the icon's default 24px); compose with
* `cn()` for colour/animation classes.
*/
export const iconSize = {
xs: 'size-3', // 12px
sm: 'size-3.5', // 14px
md: 'size-4', // 16px
lg: 'size-5', // 20px
xl: 'size-6' // 24px
} as const
export type IconSize = keyof typeof iconSize