// Copyright (c) Meta Platforms, Inc. and affiliates. /** * @file defaultIcons.tsx * @input Uses React JSX for inline SVGs * @output Exports defaultIcons registry with lightweight SVG fallbacks * @position Fallback icons used when no theme provides an icon registry * * These are intentionally minimal inline SVGs (~1.4KB total) that provide * basic visual completeness without any external icon library dependency. * Themes should override these with higher-quality icons from a proper * icon library (heroicons, lucide, Material Symbols, etc.). * * All icons: * - Use a 24x24 viewBox * - Use currentColor for stroke/fill (inherits from parent) * - Are aria-hidden (decorative by default) * - Use stroke-based rendering with 1.5px stroke width (matching heroicons outline style) * - Status icons (checkCircle, xCircle, warning, info) use solid fills for better color visibility * * SYNC: When modified, update these files to stay in sync: * - /packages/core/src/Icon/globalIconRegistry.tsx (IconName type if names change) * - /packages/core/src/Icon/Icon.doc.mjs (fallback icon documentation) */ import type { ReactNode } from 'react'; import type { IconRegistry, NamespacedIconName } from "./globalIconRegistry.js"; const svgProps = { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: 1.5, strokeLinecap: 'round' as const, strokeLinejoin: 'round' as const, width: '1em', height: '1em', 'aria-hidden': true as const }; /** * Props for solid/filled SVG icons. * Status icons (checkCircle, xCircle, warning, info) use solid fills for better * color visibility at small sizes, matching the heroicons solid style * used by themes. */ const solidSvgProps = { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 24 24', fill: 'currentColor', width: '1em', height: '1em', 'aria-hidden': true as const }; export const defaultIcons: IconRegistry & Partial> = { /** ✕ — two diagonal lines */ close: , /** ▾ — downward chevron */ chevronDown: , /** ⌄ — compact NumberInput stepper chevron */ 'numberInput:stepperDown': , /** ‹ — left chevron */ chevronLeft: , /** › — right chevron */ chevronRight: , /** « — double left chevron (first / jump to start) */ chevronsLeft: , /** » — double right chevron (last / jump to end) */ chevronsRight: , /** ✓ — checkmark */ check: , /** ✓ in circle — success state (solid fill for status visibility) */ success: , /** ✕ in circle — error state (solid fill for status visibility) */ error: , /** △ with ! — warning (solid fill for status visibility) */ warning: , /** ⓘ — information (solid fill for status visibility) */ info: , /** 📅 — calendar */ calendar: , /** 🕐 — clock */ clock: , /** ↗ — external link arrow */ externalLink: , /** ☰ — hamburger menu (three horizontal lines) */ menu: , /** ⋯ — three horizontal dots (more/overflow) */ moreHorizontal: , /** 🔍 — magnifying glass (search) */ search: , /** ↑ — arrow up (sort ascending) */ arrowUp: , /** ↓ — arrow down (sort descending) */ arrowDown: , /** ↕ — arrows up-down (unsorted / sortable indicator) */ arrowsUpDown: , /** 🔽 — funnel (filter indicator) */ funnel: , /** 👁‍🗨 — eye with slash (hidden column) */ eyeSlash: , /** ☐☐ — view columns (column settings) */ viewColumns: , /** clipboard — copy to clipboard */ copy: , /** ✓✓ — double checkmark (delivered/read) */ checkDouble: , wrench: , /** ■ — stop (rounded square, solid fill for media control) */ stop: , /** 🎤 — microphone (voice input / dictation) */ microphone: };