All files / src/components/ui/icons registry.ts

100% Statements 419/419
100% Branches 84/84
25.74% Functions 43/167
100% Lines 419/419

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 4201x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1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 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 3x 3x 3x 1x 1x 1x 1x 175x 175x 175x  
import { SVGProps } from 'react';
 
/**
 * Icon Registry - Centralized icon name types and lazy-loaded imports
 *
 * This registry enables:
 * - TypeScript autocomplete for icon names
 * - Tree-shaking (only used icons are bundled)
 * - Code splitting (icons loaded on demand)
 * - Single source of truth for all icons
 */
 
// All available icon names
export type IconName =
  // Navigation & Actions
  | 'arrow'
  | 'arrow-left'
  | 'arrow-right'
  | 'close'
  | 'up-arrow'
  | 'reload'
  | 'arrows-left-right'
  | 'grip-vertical'
  | 'chevron-up'
  | 'send'
  | 'sort'
  | 'external-link'
  | 'refresh-cw'
  // User Interface
  | 'heart'
  | 'heart-filled'
  | 'cart'
  | 'search'
  | 'user'
  | 'users'
  | 'user-circle'
  | 'user-plus'
  | 'user-minus'
  | 'trash'
  | 'star'
  | 'check-circle'
  | 'check-circle-filled'
  | 'plus'
  | 'plus-circle'
  | 'minus'
  | 'dashboard'
  | 'package'
  | 'download'
  | 'home'
  | 'eye'
  | 'eye-off'
  | 'alert-triangle'
  | 'alert-circle'
  | 'info-circle'
  | 'check'
  | 'chevron-down'
  | 'x-circle'
  | 'sad-face'
  | 'expand'
  | 'tag'
  | 'chevron-left'
  | 'chevron-right'
  | 'empty-cart'
  | 'edit'
  | 'shopping-bag'
  | 'grid'
  | 'list'
  | 'clipboard-list'
  | 'clipboard-check'
  | 'clock'
  | 'clock-circle'
  | 'logout'
  | 'image'
  | 'loader'
  | 'spinner'
  | 'cube'
  | 'archive'
  | 'chat-bubble'
  | 'chat-dots'
  | 'message-circle'
  | 'support'
  | 'code'
  | 'code-brackets'
  | 'document'
  | 'star-outline'
  | 'sparkles'
  | 'bookmark'
  | 'file-download'
  | 'ticket'
  | 'warning'
  | 'exclamation-circle'
  | 'calendar'
  | 'terminal'
  | 'cpu'
  | 'book-open'
  | 'bolt'
  | 'package-box'
  | 'support-ticket'
  | 'thumb-up'
  | 'thumb-down'
  | 'paperclip'
  | 'question-circle'
  | 'refresh'
  | 'credit-card'
  | 'sad-face-circle'
  | 'lock-closed'
  | 'lock-outline'
  | 'shield-check'
  | 'shopping-cart'
  | 'folder'
  | 'columns'
  | 'settings'
  | 'award'
  | 'file-text'
  | 'gift'
  | 'copy'
  | 'x'
  | 'bell'
  // Admin & Workflow
  | 'filter'
  | 'play'
  | 'pause'
  | 'ban'
  | 'duplicate'
  | 'hourglass'
  | 'flag'
  | 'activity'
  // Analytics & Metrics
  | 'trending-up'
  | 'trending-down'
  | 'chart-bar'
  | 'chart-line'
  | 'chart-pie'
  // Data & Sync
  | 'sync'
  | 'upload-cloud'
  | 'download-cloud'
  | 'database'
  // Commerce
  | 'percent'
  | 'dollar-sign'
  | 'wallet'
  | 'receipt'
  | 'barcode'
  // Actions
  | 'link'
  | 'unlink'
  | 'share'
  | 'undo'
  | 'redo'
  // UI Enhancement
  | 'maximize'
  | 'minimize'
  | 'layers'
  | 'merge'
  | 'split'
  | 'wrench'
  // Status Variants
  | 'circle'
  | 'circle-dot'
  | 'check-double'
  | 'clock-filled'
  // Theme
  | 'sun'
  | 'moon'
  // Contact & Location
  | 'map-pin'
  | 'phone'
  | 'email'
  // Social Media
  | 'facebook'
  | 'instagram'
  | 'twitter'
  | 'linkedin'
  | 'github'
  | 'google'
  | 'pinterest'
  // Payment Methods
  | 'visa'
  | 'mastercard'
  | 'paypal'
  | 'apple-pay'
  | 'google-pay'
  | 'bank-transfer'
  // App Stores
  | 'app-store'
  | 'google-play'
  // Shipping Methods
  | 'dhl-icon'
  | 'truck'
  // Mobile
  | 'menu'
  | 'mic'
  | 'mic-off'
  // AI & Automation
  | 'bot';
 
export type IconComponent = React.FC<SVGProps<SVGSVGElement>>;
 
/**
 * Lazy-loaded icon registry
 *
 * Icons are imported dynamically to enable code splitting.
 * Only icons that are actually used will be included in the bundle.
 */
export const iconRegistry: Record<IconName, () => Promise<{ default: IconComponent }>> = {
  // Navigation & Actions
  'arrow': () => import('./ArrowIcon'),
  'arrow-left': () => import('./ArrowLeftIcon'),
  'arrow-right': () => import('./ArrowRightIcon'),
  'close': () => import('./CloseIcon'),
  'up-arrow': () => import('./UpArrowIcon'),
  'reload': () => import('./ReloadIcon'),
  'arrows-left-right': () => import('./ArrowsLeftRightIcon'),
  'grip-vertical': () => import('./GripVerticalIcon'),
  'chevron-up': () => import('./ChevronUpIcon'),
  'send': () => import('./SendIcon'),
  'sort': () => import('./SortIcon'),
  'external-link': () => import('./ExternalLinkIcon'),
  'refresh-cw': () => import('./RefreshCwIcon'),
 
  // User Interface
  'heart': () => import('./HeartIcon'),
  'heart-filled': () => import('./HeartFilledIcon'),
  'cart': () => import('./CartIcon'),
  'search': () => import('./SearchIcon'),
  'user': () => import('./UserIcon'),
  'users': () => import('./UsersIcon'),
  'user-circle': () => import('./UserCircleIcon'),
  'user-plus': () => import('./UserPlusIcon'),
  'user-minus': () => import('./UserMinusIcon'),
  'trash': () => import('./TrashIcon'),
  'star': () => import('./StarIcon'),
  'check-circle': () => import('./CheckCircleIcon'),
  'check-circle-filled': () => import('./CheckCircleFilledIcon'),
  'plus': () => import('./PlusIcon'),
  'plus-circle': () => import('./PlusCircleIcon'),
  'minus': () => import('./MinusIcon'),
  'dashboard': () => import('./DashboardIcon'),
  'package': () => import('./PackageIcon'),
  'download': () => import('./DownloadIcon'),
  'home': () => import('./HomeIcon'),
  'eye': () => import('./EyeIcon'),
  'eye-off': () => import('./EyeOffIcon'),
  'alert-triangle': () => import('./AlertTriangleIcon'),
  'alert-circle': () => import('./AlertCircleIcon'),
  'info-circle': () => import('./InfoCircleIcon'),
  'check': () => import('./CheckIcon'),
  'chevron-down': () => import('./ChevronDownIcon'),
  'x-circle': () => import('./XCircleIcon'),
  'sad-face': () => import('./SadFaceIcon'),
  'expand': () => import('./ExpandIcon'),
  'tag': () => import('./TagIcon'),
  'chevron-left': () => import('./ChevronLeftIcon'),
  'chevron-right': () => import('./ChevronRightIcon'),
  'empty-cart': () => import('./EmptyCartIcon'),
  'edit': () => import('./EditIcon'),
  'shopping-bag': () => import('./ShoppingBagIcon'),
  'grid': () => import('./GridIcon'),
  'list': () => import('./ListIcon'),
  'clipboard-list': () => import('./ClipboardListIcon'),
  'clipboard-check': () => import('./ClipboardCheckIcon'),
  'clock': () => import('./ClockIcon'),
  'clock-circle': () => import('./ClockCircleIcon'),
  'logout': () => import('./LogoutIcon'),
  'image': () => import('./ImageIcon'),
  'loader': () => import('./LoaderIcon'),
  'spinner': () => import('./SpinnerIcon'),
  'cube': () => import('./CubeIcon'),
  'archive': () => import('./ArchiveIcon'),
  'chat-bubble': () => import('./ChatBubbleIcon'),
  'chat-dots': () => import('./ChatDotsIcon'),
  'message-circle': () => import('./MessageCircleIcon'),
  'support': () => import('./SupportIcon'),
  'code': () => import('./CodeIcon'),
  'code-brackets': () => import('./CodeBracketsIcon'),
  'document': () => import('./DocumentIcon'),
  'star-outline': () => import('./StarOutlineIcon'),
  'sparkles': () => import('./SparklesIcon'),
  'bookmark': () => import('./BookmarkIcon'),
  'file-download': () => import('./FileDownloadIcon'),
  'ticket': () => import('./TicketIcon'),
  'warning': () => import('./WarningIcon'),
  'exclamation-circle': () => import('./ExclamationCircleIcon'),
  'calendar': () => import('./CalendarIcon'),
  'terminal': () => import('./TerminalIcon'),
  'cpu': () => import('./CpuIcon'),
  'book-open': () => import('./BookOpenIcon'),
  'bolt': () => import('./BoltIcon'),
  'package-box': () => import('./PackageBoxIcon'),
  'support-ticket': () => import('./SupportTicketIcon'),
  'thumb-up': () => import('./ThumbUpIcon'),
  'thumb-down': () => import('./ThumbDownIcon'),
  'paperclip': () => import('./PaperclipIcon'),
  'question-circle': () => import('./QuestionCircleIcon'),
  'refresh': () => import('./RefreshIcon'),
  'credit-card': () => import('./CreditCardIcon'),
  'sad-face-circle': () => import('./SadFaceCircleIcon'),
  'lock-closed': () => import('./LockClosedIcon'),
  'lock-outline': () => import('./LockOutlineIcon'),
  'shield-check': () => import('./ShieldCheckIcon'),
  'shopping-cart': () => import('./ShoppingCartIcon'),
  'folder': () => import('./FolderIcon'),
  'columns': () => import('./ColumnsIcon'),
  'settings': () => import('./SettingsIcon'),
  'award': () => import('./AwardIcon'),
  'file-text': () => import('./FileTextIcon'),
  'gift': () => import('./GiftIcon'),
  'copy': () => import('./CopyIcon'),
  'x': () => import('./XIcon'),
  'bell': () => import('./BellIcon'),
 
  // Admin & Workflow
  'filter': () => import('./FilterIcon'),
  'play': () => import('./PlayIcon'),
  'pause': () => import('./PauseIcon'),
  'ban': () => import('./BanIcon'),
  'duplicate': () => import('./DuplicateIcon'),
  'hourglass': () => import('./HourglassIcon'),
  'flag': () => import('./FlagIcon'),
  'activity': () => import('./ActivityIcon'),
 
  // Analytics & Metrics
  'trending-up': () => import('./TrendingUpIcon'),
  'trending-down': () => import('./TrendingDownIcon'),
  'chart-bar': () => import('./ChartBarIcon'),
  'chart-line': () => import('./ChartLineIcon'),
  'chart-pie': () => import('./ChartPieIcon'),
 
  // Data & Sync
  'sync': () => import('./SyncIcon'),
  'upload-cloud': () => import('./UploadCloudIcon'),
  'download-cloud': () => import('./DownloadCloudIcon'),
  'database': () => import('./DatabaseIcon'),
 
  // Commerce
  'percent': () => import('./PercentIcon'),
  'dollar-sign': () => import('./DollarSignIcon'),
  'wallet': () => import('./WalletIcon'),
  'receipt': () => import('./ReceiptIcon'),
  'barcode': () => import('./BarcodeIcon'),
 
  // Actions
  'link': () => import('./LinkIcon'),
  'unlink': () => import('./UnlinkIcon'),
  'share': () => import('./ShareIcon'),
  'undo': () => import('./UndoIcon'),
  'redo': () => import('./RedoIcon'),
 
  // UI Enhancement
  'maximize': () => import('./MaximizeIcon'),
  'minimize': () => import('./MinimizeIcon'),
  'layers': () => import('./LayersIcon'),
  'merge': () => import('./MergeIcon'),
  'split': () => import('./SplitIcon'),
  'wrench': () => import('./WrenchIcon'),
 
  // Status Variants
  'circle': () => import('./CircleIcon'),
  'circle-dot': () => import('./CircleDotIcon'),
  'check-double': () => import('./CheckDoubleIcon'),
  'clock-filled': () => import('./ClockFilledIcon'),
 
  // Theme
  'sun': () => import('./SunIcon'),
  'moon': () => import('./MoonIcon'),
 
  // Contact & Location
  'map-pin': () => import('./MapPinIcon'),
  'phone': () => import('./PhoneIcon'),
  'email': () => import('./EmailIcon'),
 
  // Social Media
  'facebook': () => import('./FacebookIcon'),
  'instagram': () => import('./InstagramIcon'),
  'twitter': () => import('./TwitterIcon'),
  'linkedin': () => import('./LinkedinIcon'),
  'github': () => import('./GithubIcon'),
  'google': () => import('./GoogleIcon'),
  'pinterest': () => import('./PinterestIcon'),
 
  // Payment Methods
  'visa': () => import('./VisaIcon'),
  'mastercard': () => import('./MasterCardIcon'),
  'paypal': () => import('./PaypalIcon'),
  'apple-pay': () => import('./ApplePayIcon'),
  'google-pay': () => import('./GooglePayIcon'),
  'bank-transfer': () => import('./BankTransferIcon'),
 
  // App Stores
  'app-store': () => import('./AppStoreIcon'),
  'google-play': () => import('./GooglePlayIcon'),
 
  // Shipping Methods
  'dhl-icon': () => import('./DhlIcon'),
  'truck': () => import('./TruckIcon'),
 
  // Mobile
  'menu': () => import('./MenuIcon'),
  'mic': () => import('./MicIcon'),
  'mic-off': () => import('./MicOffIcon'),
 
  // AI & Automation
  'bot': () => import('./BotIcon'),
};
 
/**
 * Get all available icon names
 */
export function getIconNames(): IconName[] {
  return Object.keys(iconRegistry) as IconName[];
}
 
/**
 * Check if an icon exists in the registry
 */
export function hasIcon(name: string): name is IconName {
  return name in iconRegistry;
}