rn-iconify 1.0.0 → 2.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 +47 -235
- package/babel.js +14 -0
- package/lib/commonjs/IconRenderer.js +91 -4
- package/lib/commonjs/IconRenderer.js.map +1 -1
- package/lib/commonjs/accessibility/AccessibilityProvider.js +189 -0
- package/lib/commonjs/accessibility/AccessibilityProvider.js.map +1 -0
- package/lib/commonjs/accessibility/index.js +87 -0
- package/lib/commonjs/accessibility/index.js.map +1 -0
- package/lib/commonjs/accessibility/types.js +6 -0
- package/lib/commonjs/accessibility/types.js.map +1 -0
- package/lib/commonjs/accessibility/useAccessibleIcon.js +119 -0
- package/lib/commonjs/accessibility/useAccessibleIcon.js.map +1 -0
- package/lib/commonjs/accessibility/utils.js +231 -0
- package/lib/commonjs/accessibility/utils.js.map +1 -0
- package/lib/commonjs/alias/Icon.js +113 -0
- package/lib/commonjs/alias/Icon.js.map +1 -0
- package/lib/commonjs/alias/IconAliasContext.js +177 -0
- package/lib/commonjs/alias/IconAliasContext.js.map +1 -0
- package/lib/commonjs/alias/createIconAliases.js +222 -0
- package/lib/commonjs/alias/createIconAliases.js.map +1 -0
- package/lib/commonjs/alias/index.js +57 -0
- package/lib/commonjs/alias/index.js.map +1 -0
- package/lib/commonjs/alias/types.js +6 -0
- package/lib/commonjs/alias/types.js.map +1 -0
- package/lib/commonjs/animated/AnimatedIcon.js +116 -0
- package/lib/commonjs/animated/AnimatedIcon.js.map +1 -0
- package/lib/commonjs/animated/index.js +76 -0
- package/lib/commonjs/animated/index.js.map +1 -0
- package/lib/commonjs/animated/presets.js +220 -0
- package/lib/commonjs/animated/presets.js.map +1 -0
- package/lib/commonjs/animated/types.js +71 -0
- package/lib/commonjs/animated/types.js.map +1 -0
- package/lib/commonjs/animated/useIconAnimation.js +313 -0
- package/lib/commonjs/animated/useIconAnimation.js.map +1 -0
- package/lib/commonjs/babel/ast-utils.js +214 -0
- package/lib/commonjs/babel/ast-utils.js.map +1 -0
- package/lib/commonjs/babel/cache-writer.js +281 -0
- package/lib/commonjs/babel/cache-writer.js.map +1 -0
- package/lib/commonjs/babel/collector.js +219 -0
- package/lib/commonjs/babel/collector.js.map +1 -0
- package/lib/commonjs/babel/index.js +104 -0
- package/lib/commonjs/babel/index.js.map +1 -0
- package/lib/commonjs/babel/plugin.js +226 -0
- package/lib/commonjs/babel/plugin.js.map +1 -0
- package/lib/commonjs/babel/types.js +485 -0
- package/lib/commonjs/babel/types.js.map +1 -0
- package/lib/commonjs/bundle/index.js +213 -0
- package/lib/commonjs/bundle/index.js.map +1 -0
- package/lib/commonjs/cache/CacheManager.js +105 -6
- package/lib/commonjs/cache/CacheManager.js.map +1 -1
- package/lib/commonjs/cli/commands/analyze.js +171 -0
- package/lib/commonjs/cli/commands/analyze.js.map +1 -0
- package/lib/commonjs/cli/commands/bundle.js +214 -0
- package/lib/commonjs/cli/commands/bundle.js.map +1 -0
- package/lib/commonjs/cli/index.js +142 -0
- package/lib/commonjs/cli/index.js.map +1 -0
- package/lib/commonjs/cli/parser.js +260 -0
- package/lib/commonjs/cli/parser.js.map +1 -0
- package/lib/commonjs/cli/types.js +42 -0
- package/lib/commonjs/cli/types.js.map +1 -0
- package/lib/commonjs/config/ConfigManager.js +182 -0
- package/lib/commonjs/config/ConfigManager.js.map +1 -0
- package/lib/commonjs/config/index.js +44 -0
- package/lib/commonjs/config/index.js.map +1 -0
- package/lib/commonjs/config/types.js +55 -0
- package/lib/commonjs/config/types.js.map +1 -0
- package/lib/commonjs/createIconSet.js +49 -11
- package/lib/commonjs/createIconSet.js.map +1 -1
- package/lib/commonjs/explorer/IconExplorer.js +827 -0
- package/lib/commonjs/explorer/IconExplorer.js.map +1 -0
- package/lib/commonjs/explorer/iconSets.js +303 -0
- package/lib/commonjs/explorer/iconSets.js.map +1 -0
- package/lib/commonjs/explorer/index.js +93 -0
- package/lib/commonjs/explorer/index.js.map +1 -0
- package/lib/commonjs/explorer/types.js +6 -0
- package/lib/commonjs/explorer/types.js.map +1 -0
- package/lib/commonjs/explorer/useExplorer.js +359 -0
- package/lib/commonjs/explorer/useExplorer.js.map +1 -0
- package/lib/commonjs/index.js +618 -12
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/navigation/createDrawerIcon.js +129 -0
- package/lib/commonjs/navigation/createDrawerIcon.js.map +1 -0
- package/lib/commonjs/navigation/createHeaderIcon.js +185 -0
- package/lib/commonjs/navigation/createHeaderIcon.js.map +1 -0
- package/lib/commonjs/navigation/createTabBarIcon.js +178 -0
- package/lib/commonjs/navigation/createTabBarIcon.js.map +1 -0
- package/lib/commonjs/navigation/index.js +83 -0
- package/lib/commonjs/navigation/index.js.map +1 -0
- package/lib/commonjs/navigation/types.js +94 -0
- package/lib/commonjs/navigation/types.js.map +1 -0
- package/lib/commonjs/navigation/useNavigationIcon.js +128 -0
- package/lib/commonjs/navigation/useNavigationIcon.js.map +1 -0
- package/lib/commonjs/network/IconifyAPI.js +154 -14
- package/lib/commonjs/network/IconifyAPI.js.map +1 -1
- package/lib/commonjs/network/index.js +18 -0
- package/lib/commonjs/network/index.js.map +1 -1
- package/lib/commonjs/performance/PerformanceMonitor.js +327 -0
- package/lib/commonjs/performance/PerformanceMonitor.js.map +1 -0
- package/lib/commonjs/performance/index.js +43 -0
- package/lib/commonjs/performance/index.js.map +1 -0
- package/lib/commonjs/performance/types.js +2 -0
- package/lib/commonjs/performance/types.js.map +1 -0
- package/lib/commonjs/placeholder/PlaceholderFactory.js +111 -0
- package/lib/commonjs/placeholder/PlaceholderFactory.js.map +1 -0
- package/lib/commonjs/placeholder/Pulse.js +77 -0
- package/lib/commonjs/placeholder/Pulse.js.map +1 -0
- package/lib/commonjs/placeholder/Shimmer.js +95 -0
- package/lib/commonjs/placeholder/Shimmer.js.map +1 -0
- package/lib/commonjs/placeholder/Skeleton.js +52 -0
- package/lib/commonjs/placeholder/Skeleton.js.map +1 -0
- package/lib/commonjs/placeholder/index.js +41 -0
- package/lib/commonjs/placeholder/index.js.map +1 -0
- package/lib/commonjs/placeholder/types.js +40 -0
- package/lib/commonjs/placeholder/types.js.map +1 -0
- package/lib/commonjs/theme/IconThemeProvider.js +96 -0
- package/lib/commonjs/theme/IconThemeProvider.js.map +1 -0
- package/lib/commonjs/theme/context.js +53 -0
- package/lib/commonjs/theme/context.js.map +1 -0
- package/lib/commonjs/theme/index.js +52 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/theme/types.js +39 -0
- package/lib/commonjs/theme/types.js.map +1 -0
- package/lib/commonjs/theme/useIconTheme.js +121 -0
- package/lib/commonjs/theme/useIconTheme.js.map +1 -0
- package/lib/module/IconRenderer.js +92 -5
- package/lib/module/IconRenderer.js.map +1 -1
- package/lib/module/accessibility/AccessibilityProvider.js +179 -0
- package/lib/module/accessibility/AccessibilityProvider.js.map +1 -0
- package/lib/module/accessibility/index.js +42 -0
- package/lib/module/accessibility/index.js.map +1 -0
- package/lib/module/accessibility/types.js +2 -0
- package/lib/module/accessibility/types.js.map +1 -0
- package/lib/module/accessibility/useAccessibleIcon.js +112 -0
- package/lib/module/accessibility/useAccessibleIcon.js.map +1 -0
- package/lib/module/accessibility/utils.js +221 -0
- package/lib/module/accessibility/utils.js.map +1 -0
- package/lib/module/alias/Icon.js +105 -0
- package/lib/module/alias/Icon.js.map +1 -0
- package/lib/module/alias/IconAliasContext.js +166 -0
- package/lib/module/alias/IconAliasContext.js.map +1 -0
- package/lib/module/alias/createIconAliases.js +213 -0
- package/lib/module/alias/createIconAliases.js.map +1 -0
- package/lib/module/alias/index.js +45 -0
- package/lib/module/alias/index.js.map +1 -0
- package/lib/module/alias/types.js +2 -0
- package/lib/module/alias/types.js.map +1 -0
- package/lib/module/animated/AnimatedIcon.js +109 -0
- package/lib/module/animated/AnimatedIcon.js.map +1 -0
- package/lib/module/animated/index.js +80 -0
- package/lib/module/animated/index.js.map +1 -0
- package/lib/module/animated/presets.js +209 -0
- package/lib/module/animated/presets.js.map +1 -0
- package/lib/module/animated/types.js +65 -0
- package/lib/module/animated/types.js.map +1 -0
- package/lib/module/animated/useIconAnimation.js +306 -0
- package/lib/module/animated/useIconAnimation.js.map +1 -0
- package/lib/module/babel/ast-utils.js +201 -0
- package/lib/module/babel/ast-utils.js.map +1 -0
- package/lib/module/babel/cache-writer.js +269 -0
- package/lib/module/babel/cache-writer.js.map +1 -0
- package/lib/module/babel/collector.js +214 -0
- package/lib/module/babel/collector.js.map +1 -0
- package/lib/module/babel/index.js +51 -0
- package/lib/module/babel/index.js.map +1 -0
- package/lib/module/babel/plugin.js +220 -0
- package/lib/module/babel/plugin.js.map +1 -0
- package/lib/module/babel/types.js +476 -0
- package/lib/module/babel/types.js.map +1 -0
- package/lib/module/bundle/index.js +205 -0
- package/lib/module/bundle/index.js.map +1 -0
- package/lib/module/cache/CacheManager.js +106 -6
- package/lib/module/cache/CacheManager.js.map +1 -1
- package/lib/module/cli/commands/analyze.js +166 -0
- package/lib/module/cli/commands/analyze.js.map +1 -0
- package/lib/module/cli/commands/bundle.js +208 -0
- package/lib/module/cli/commands/bundle.js.map +1 -0
- package/lib/module/cli/index.js +140 -0
- package/lib/module/cli/index.js.map +1 -0
- package/lib/module/cli/parser.js +251 -0
- package/lib/module/cli/parser.js.map +1 -0
- package/lib/module/cli/types.js +36 -0
- package/lib/module/cli/types.js.map +1 -0
- package/lib/module/components/index.js +27 -1
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/config/ConfigManager.js +173 -0
- package/lib/module/config/ConfigManager.js.map +1 -0
- package/lib/module/config/index.js +28 -0
- package/lib/module/config/index.js.map +1 -0
- package/lib/module/config/types.js +49 -0
- package/lib/module/config/types.js.map +1 -0
- package/lib/module/createIconSet.js +49 -11
- package/lib/module/createIconSet.js.map +1 -1
- package/lib/module/explorer/IconExplorer.js +817 -0
- package/lib/module/explorer/IconExplorer.js.map +1 -0
- package/lib/module/explorer/iconSets.js +291 -0
- package/lib/module/explorer/iconSets.js.map +1 -0
- package/lib/module/explorer/index.js +42 -0
- package/lib/module/explorer/index.js.map +1 -0
- package/lib/module/explorer/types.js +2 -0
- package/lib/module/explorer/types.js.map +1 -0
- package/lib/module/explorer/useExplorer.js +353 -0
- package/lib/module/explorer/useExplorer.js.map +1 -0
- package/lib/module/index.js +26 -11
- package/lib/module/index.js.map +1 -1
- package/lib/module/navigation/createDrawerIcon.js +121 -0
- package/lib/module/navigation/createDrawerIcon.js.map +1 -0
- package/lib/module/navigation/createHeaderIcon.js +175 -0
- package/lib/module/navigation/createHeaderIcon.js.map +1 -0
- package/lib/module/navigation/createTabBarIcon.js +168 -0
- package/lib/module/navigation/createTabBarIcon.js.map +1 -0
- package/lib/module/navigation/index.js +59 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/types.js +88 -0
- package/lib/module/navigation/types.js.map +1 -0
- package/lib/module/navigation/useNavigationIcon.js +121 -0
- package/lib/module/navigation/useNavigationIcon.js.map +1 -0
- package/lib/module/network/IconifyAPI.js +152 -14
- package/lib/module/network/IconifyAPI.js.map +1 -1
- package/lib/module/network/index.js +1 -1
- package/lib/module/network/index.js.map +1 -1
- package/lib/module/performance/PerformanceMonitor.js +317 -0
- package/lib/module/performance/PerformanceMonitor.js.map +1 -0
- package/lib/module/performance/index.js +26 -0
- package/lib/module/performance/index.js.map +1 -0
- package/lib/module/performance/types.js +2 -0
- package/lib/module/performance/types.js.map +1 -0
- package/lib/module/placeholder/PlaceholderFactory.js +105 -0
- package/lib/module/placeholder/PlaceholderFactory.js.map +1 -0
- package/lib/module/placeholder/Pulse.js +70 -0
- package/lib/module/placeholder/Pulse.js.map +1 -0
- package/lib/module/placeholder/Shimmer.js +88 -0
- package/lib/module/placeholder/Shimmer.js.map +1 -0
- package/lib/module/placeholder/Skeleton.js +45 -0
- package/lib/module/placeholder/Skeleton.js.map +1 -0
- package/lib/module/placeholder/index.js +15 -0
- package/lib/module/placeholder/index.js.map +1 -0
- package/lib/module/placeholder/types.js +34 -0
- package/lib/module/placeholder/types.js.map +1 -0
- package/lib/module/theme/IconThemeProvider.js +89 -0
- package/lib/module/theme/IconThemeProvider.js.map +1 -0
- package/lib/module/theme/context.js +47 -0
- package/lib/module/theme/context.js.map +1 -0
- package/lib/module/theme/index.js +19 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/theme/types.js +33 -0
- package/lib/module/theme/types.js.map +1 -0
- package/lib/module/theme/useIconTheme.js +114 -0
- package/lib/module/theme/useIconTheme.js.map +1 -0
- package/lib/typescript/IconRenderer.d.ts +1 -1
- package/lib/typescript/IconRenderer.d.ts.map +1 -1
- package/lib/typescript/accessibility/AccessibilityProvider.d.ts +57 -0
- package/lib/typescript/accessibility/AccessibilityProvider.d.ts.map +1 -0
- package/lib/typescript/accessibility/index.d.ts +37 -0
- package/lib/typescript/accessibility/index.d.ts.map +1 -0
- package/lib/typescript/accessibility/types.d.ts +130 -0
- package/lib/typescript/accessibility/types.d.ts.map +1 -0
- package/lib/typescript/accessibility/useAccessibleIcon.d.ts +111 -0
- package/lib/typescript/accessibility/useAccessibleIcon.d.ts.map +1 -0
- package/lib/typescript/accessibility/utils.d.ts +29 -0
- package/lib/typescript/accessibility/utils.d.ts.map +1 -0
- package/lib/typescript/alias/Icon.d.ts +38 -0
- package/lib/typescript/alias/Icon.d.ts.map +1 -0
- package/lib/typescript/alias/IconAliasContext.d.ts +52 -0
- package/lib/typescript/alias/IconAliasContext.d.ts.map +1 -0
- package/lib/typescript/alias/createIconAliases.d.ts +77 -0
- package/lib/typescript/alias/createIconAliases.d.ts.map +1 -0
- package/lib/typescript/alias/index.d.ts +36 -0
- package/lib/typescript/alias/index.d.ts.map +1 -0
- package/lib/typescript/alias/types.d.ts +115 -0
- package/lib/typescript/alias/types.d.ts.map +1 -0
- package/lib/typescript/animated/AnimatedIcon.d.ts +45 -0
- package/lib/typescript/animated/AnimatedIcon.d.ts.map +1 -0
- package/lib/typescript/animated/index.d.ts +70 -0
- package/lib/typescript/animated/index.d.ts.map +1 -0
- package/lib/typescript/animated/presets.d.ts +35 -0
- package/lib/typescript/animated/presets.d.ts.map +1 -0
- package/lib/typescript/animated/types.d.ts +196 -0
- package/lib/typescript/animated/types.d.ts.map +1 -0
- package/lib/typescript/animated/useIconAnimation.d.ts +64 -0
- package/lib/typescript/animated/useIconAnimation.d.ts.map +1 -0
- package/lib/typescript/babel/ast-utils.d.ts +52 -0
- package/lib/typescript/babel/ast-utils.d.ts.map +1 -0
- package/lib/typescript/babel/cache-writer.d.ts +56 -0
- package/lib/typescript/babel/cache-writer.d.ts.map +1 -0
- package/lib/typescript/babel/collector.d.ts +107 -0
- package/lib/typescript/babel/collector.d.ts.map +1 -0
- package/lib/typescript/babel/index.d.ts +47 -0
- package/lib/typescript/babel/index.d.ts.map +1 -0
- package/lib/typescript/babel/plugin.d.ts +17 -0
- package/lib/typescript/babel/plugin.d.ts.map +1 -0
- package/lib/typescript/babel/types.d.ts +129 -0
- package/lib/typescript/babel/types.d.ts.map +1 -0
- package/lib/typescript/bundle/index.d.ts +161 -0
- package/lib/typescript/bundle/index.d.ts.map +1 -0
- package/lib/typescript/cache/CacheManager.d.ts +52 -4
- package/lib/typescript/cache/CacheManager.d.ts.map +1 -1
- package/lib/typescript/cli/commands/analyze.d.ts +10 -0
- package/lib/typescript/cli/commands/analyze.d.ts.map +1 -0
- package/lib/typescript/cli/commands/bundle.d.ts +10 -0
- package/lib/typescript/cli/commands/bundle.d.ts.map +1 -0
- package/lib/typescript/cli/index.d.ts +7 -0
- package/lib/typescript/cli/index.d.ts.map +1 -0
- package/lib/typescript/cli/parser.d.ts +18 -0
- package/lib/typescript/cli/parser.d.ts.map +1 -0
- package/lib/typescript/cli/types.d.ts +157 -0
- package/lib/typescript/cli/types.d.ts.map +1 -0
- package/lib/typescript/components/Academicons.d.ts +1 -1
- package/lib/typescript/components/AkarIcons.d.ts +1 -1
- package/lib/typescript/components/AntDesign.d.ts +1 -1
- package/lib/typescript/components/Arcticons.d.ts +1 -1
- package/lib/typescript/components/Basil.d.ts +1 -1
- package/lib/typescript/components/Bi.d.ts +1 -1
- package/lib/typescript/components/BitcoinIcons.d.ts +1 -1
- package/lib/typescript/components/Bpmn.d.ts +1 -1
- package/lib/typescript/components/Brandico.d.ts +1 -1
- package/lib/typescript/components/Bx.d.ts +1 -1
- package/lib/typescript/components/Bxl.d.ts +1 -1
- package/lib/typescript/components/Bxs.d.ts +1 -1
- package/lib/typescript/components/Bytesize.d.ts +1 -1
- package/lib/typescript/components/Carbon.d.ts +1 -1
- package/lib/typescript/components/Catppuccin.d.ts +1 -1
- package/lib/typescript/components/Cbi.d.ts +1 -1
- package/lib/typescript/components/Charm.d.ts +1 -1
- package/lib/typescript/components/Ci.d.ts +1 -1
- package/lib/typescript/components/Cib.d.ts +1 -1
- package/lib/typescript/components/Cif.d.ts +1 -1
- package/lib/typescript/components/Cil.d.ts +1 -1
- package/lib/typescript/components/CircleFlags.d.ts +1 -1
- package/lib/typescript/components/Circum.d.ts +1 -1
- package/lib/typescript/components/Clarity.d.ts +1 -1
- package/lib/typescript/components/Codex.d.ts +1 -1
- package/lib/typescript/components/Codicon.d.ts +1 -1
- package/lib/typescript/components/Covid.d.ts +1 -1
- package/lib/typescript/components/Cryptocurrency.d.ts +1 -1
- package/lib/typescript/components/CryptocurrencyColor.d.ts +1 -1
- package/lib/typescript/components/Cuida.d.ts +1 -1
- package/lib/typescript/components/Dashicons.d.ts +1 -1
- package/lib/typescript/components/Devicon.d.ts +1 -1
- package/lib/typescript/components/DeviconPlain.d.ts +1 -1
- package/lib/typescript/components/DinkieIcons.d.ts +1 -1
- package/lib/typescript/components/DuoIcons.d.ts +1 -1
- package/lib/typescript/components/Ei.d.ts +1 -1
- package/lib/typescript/components/El.d.ts +1 -1
- package/lib/typescript/components/EmojioneMonotone.d.ts +1 -1
- package/lib/typescript/components/Entypo.d.ts +1 -1
- package/lib/typescript/components/EntypoSocial.d.ts +1 -1
- package/lib/typescript/components/EosIcons.d.ts +1 -1
- package/lib/typescript/components/Ep.d.ts +1 -1
- package/lib/typescript/components/Et.d.ts +1 -1
- package/lib/typescript/components/Eva.d.ts +1 -1
- package/lib/typescript/components/F7.d.ts +1 -1
- package/lib/typescript/components/Fa.d.ts +1 -1
- package/lib/typescript/components/Fa6Brands.d.ts +1 -1
- package/lib/typescript/components/Fa6Regular.d.ts +1 -1
- package/lib/typescript/components/Fa6Solid.d.ts +1 -1
- package/lib/typescript/components/Fa7Brands.d.ts +1 -1
- package/lib/typescript/components/Fa7Regular.d.ts +1 -1
- package/lib/typescript/components/Fa7Solid.d.ts +1 -1
- package/lib/typescript/components/FaBrands.d.ts +1 -1
- package/lib/typescript/components/FaRegular.d.ts +1 -1
- package/lib/typescript/components/FaSolid.d.ts +1 -1
- package/lib/typescript/components/Fad.d.ts +1 -1
- package/lib/typescript/components/Famicons.d.ts +1 -1
- package/lib/typescript/components/Fe.d.ts +1 -1
- package/lib/typescript/components/Feather.d.ts +1 -1
- package/lib/typescript/components/FileIcons.d.ts +1 -1
- package/lib/typescript/components/Flag.d.ts +1 -1
- package/lib/typescript/components/Flagpack.d.ts +1 -1
- package/lib/typescript/components/FlatUi.d.ts +1 -1
- package/lib/typescript/components/Flowbite.d.ts +1 -1
- package/lib/typescript/components/Fluent.d.ts +1 -1
- package/lib/typescript/components/FluentColor.d.ts +1 -1
- package/lib/typescript/components/FluentEmoji.d.ts +1 -1
- package/lib/typescript/components/FluentEmojiFlat.d.ts +1 -1
- package/lib/typescript/components/FluentEmojiHighContrast.d.ts +1 -1
- package/lib/typescript/components/FluentMdl2.d.ts +1 -1
- package/lib/typescript/components/Fontelico.d.ts +1 -1
- package/lib/typescript/components/Fontisto.d.ts +1 -1
- package/lib/typescript/components/Formkit.d.ts +1 -1
- package/lib/typescript/components/Foundation.d.ts +1 -1
- package/lib/typescript/components/Gala.d.ts +1 -1
- package/lib/typescript/components/GameIcons.d.ts +1 -1
- package/lib/typescript/components/Garden.d.ts +1 -1
- package/lib/typescript/components/Geo.d.ts +1 -1
- package/lib/typescript/components/Gg.d.ts +1 -1
- package/lib/typescript/components/Gis.d.ts +1 -1
- package/lib/typescript/components/GravityUi.d.ts +1 -1
- package/lib/typescript/components/Gridicons.d.ts +1 -1
- package/lib/typescript/components/GrommetIcons.d.ts +1 -1
- package/lib/typescript/components/Guidance.d.ts +1 -1
- package/lib/typescript/components/Healthicons.d.ts +1 -1
- package/lib/typescript/components/Heroicons.d.ts +1 -1
- package/lib/typescript/components/HeroiconsOutline.d.ts +1 -1
- package/lib/typescript/components/HeroiconsSolid.d.ts +1 -1
- package/lib/typescript/components/Hugeicons.d.ts +1 -1
- package/lib/typescript/components/Humbleicons.d.ts +1 -1
- package/lib/typescript/components/Ic.d.ts +1 -1
- package/lib/typescript/components/IcomoonFree.d.ts +1 -1
- package/lib/typescript/components/IconPark.d.ts +1 -1
- package/lib/typescript/components/IconParkOutline.d.ts +1 -1
- package/lib/typescript/components/IconParkSolid.d.ts +1 -1
- package/lib/typescript/components/IconParkTwotone.d.ts +1 -1
- package/lib/typescript/components/Iconamoon.d.ts +1 -1
- package/lib/typescript/components/Iconoir.d.ts +1 -1
- package/lib/typescript/components/Icons8.d.ts +1 -1
- package/lib/typescript/components/Il.d.ts +1 -1
- package/lib/typescript/components/Ion.d.ts +1 -1
- package/lib/typescript/components/Iwwa.d.ts +1 -1
- package/lib/typescript/components/Ix.d.ts +1 -1
- package/lib/typescript/components/Jam.d.ts +1 -1
- package/lib/typescript/components/La.d.ts +1 -1
- package/lib/typescript/components/LetsIcons.d.ts +1 -1
- package/lib/typescript/components/LineMd.d.ts +1 -1
- package/lib/typescript/components/Lineicons.d.ts +1 -1
- package/lib/typescript/components/Logos.d.ts +1 -1
- package/lib/typescript/components/Ls.d.ts +1 -1
- package/lib/typescript/components/Lsicon.d.ts +1 -1
- package/lib/typescript/components/Lucide.d.ts +1 -1
- package/lib/typescript/components/LucideLab.d.ts +1 -1
- package/lib/typescript/components/Mage.d.ts +1 -1
- package/lib/typescript/components/Majesticons.d.ts +1 -1
- package/lib/typescript/components/Maki.d.ts +1 -1
- package/lib/typescript/components/Map.d.ts +1 -1
- package/lib/typescript/components/Marketeq.d.ts +1 -1
- package/lib/typescript/components/MaterialIconTheme.d.ts +1 -1
- package/lib/typescript/components/MaterialSymbols.d.ts +1 -1
- package/lib/typescript/components/MaterialSymbolsLight.d.ts +1 -1
- package/lib/typescript/components/Mdi.d.ts +1 -1
- package/lib/typescript/components/MdiLight.d.ts +1 -1
- package/lib/typescript/components/MedicalIcon.d.ts +1 -1
- package/lib/typescript/components/Memory.d.ts +1 -1
- package/lib/typescript/components/Meteocons.d.ts +1 -1
- package/lib/typescript/components/MeteorIcons.d.ts +1 -1
- package/lib/typescript/components/Mi.d.ts +1 -1
- package/lib/typescript/components/Mingcute.d.ts +1 -1
- package/lib/typescript/components/MonoIcons.d.ts +1 -1
- package/lib/typescript/components/Mynaui.d.ts +1 -1
- package/lib/typescript/components/Nimbus.d.ts +1 -1
- package/lib/typescript/components/Nonicons.d.ts +1 -1
- package/lib/typescript/components/Nrk.d.ts +1 -1
- package/lib/typescript/components/Octicon.d.ts +1 -1
- package/lib/typescript/components/Oi.d.ts +1 -1
- package/lib/typescript/components/Ooui.d.ts +1 -1
- package/lib/typescript/components/Oui.d.ts +1 -1
- package/lib/typescript/components/Pajamas.d.ts +1 -1
- package/lib/typescript/components/Pepicons.d.ts +1 -1
- package/lib/typescript/components/PepiconsPencil.d.ts +1 -1
- package/lib/typescript/components/PepiconsPop.d.ts +1 -1
- package/lib/typescript/components/PepiconsPrint.d.ts +1 -1
- package/lib/typescript/components/Ph.d.ts +1 -1
- package/lib/typescript/components/Picon.d.ts +1 -1
- package/lib/typescript/components/Pixel.d.ts +1 -1
- package/lib/typescript/components/Pixelarticons.d.ts +1 -1
- package/lib/typescript/components/Prime.d.ts +1 -1
- package/lib/typescript/components/Proicons.d.ts +1 -1
- package/lib/typescript/components/Ps.d.ts +1 -1
- package/lib/typescript/components/QlementineIcons.d.ts +1 -1
- package/lib/typescript/components/Quill.d.ts +1 -1
- package/lib/typescript/components/RadixIcons.d.ts +1 -1
- package/lib/typescript/components/Raphael.d.ts +1 -1
- package/lib/typescript/components/Ri.d.ts +1 -1
- package/lib/typescript/components/RivetIcons.d.ts +1 -1
- package/lib/typescript/components/Roentgen.d.ts +1 -1
- package/lib/typescript/components/Si.d.ts +1 -1
- package/lib/typescript/components/SiGlyph.d.ts +1 -1
- package/lib/typescript/components/Sidekickicons.d.ts +1 -1
- package/lib/typescript/components/SimpleIcons.d.ts +1 -1
- package/lib/typescript/components/SimpleLineIcons.d.ts +1 -1
- package/lib/typescript/components/SkillIcons.d.ts +1 -1
- package/lib/typescript/components/Solar.d.ts +1 -1
- package/lib/typescript/components/Stash.d.ts +1 -1
- package/lib/typescript/components/Streamline.d.ts +1 -1
- package/lib/typescript/components/StreamlineBlock.d.ts +1 -1
- package/lib/typescript/components/StreamlineColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineCyber.d.ts +1 -1
- package/lib/typescript/components/StreamlineCyberColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineEmojis.d.ts +1 -1
- package/lib/typescript/components/StreamlineFlex.d.ts +1 -1
- package/lib/typescript/components/StreamlineFlexColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineFreehand.d.ts +1 -1
- package/lib/typescript/components/StreamlineFreehandColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineKameleonColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineLogos.d.ts +1 -1
- package/lib/typescript/components/StreamlinePixel.d.ts +1 -1
- package/lib/typescript/components/StreamlinePlump.d.ts +1 -1
- package/lib/typescript/components/StreamlinePlumpColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineSharp.d.ts +1 -1
- package/lib/typescript/components/StreamlineSharpColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineStickiesColor.d.ts +1 -1
- package/lib/typescript/components/StreamlineUltimate.d.ts +1 -1
- package/lib/typescript/components/StreamlineUltimateColor.d.ts +1 -1
- package/lib/typescript/components/Subway.d.ts +1 -1
- package/lib/typescript/components/SvgSpinners.d.ts +1 -1
- package/lib/typescript/components/SystemUicons.d.ts +1 -1
- package/lib/typescript/components/Tabler.d.ts +1 -1
- package/lib/typescript/components/Tdesign.d.ts +1 -1
- package/lib/typescript/components/Teenyicons.d.ts +1 -1
- package/lib/typescript/components/Temaki.d.ts +1 -1
- package/lib/typescript/components/Token.d.ts +1 -1
- package/lib/typescript/components/TokenBranded.d.ts +1 -1
- package/lib/typescript/components/Topcoat.d.ts +1 -1
- package/lib/typescript/components/Typcn.d.ts +1 -1
- package/lib/typescript/components/Uil.d.ts +1 -1
- package/lib/typescript/components/Uim.d.ts +1 -1
- package/lib/typescript/components/Uis.d.ts +1 -1
- package/lib/typescript/components/Uit.d.ts +1 -1
- package/lib/typescript/components/Uiw.d.ts +1 -1
- package/lib/typescript/components/Unjs.d.ts +1 -1
- package/lib/typescript/components/Vaadin.d.ts +1 -1
- package/lib/typescript/components/Vs.d.ts +1 -1
- package/lib/typescript/components/VscodeIcons.d.ts +1 -1
- package/lib/typescript/components/Websymbol.d.ts +1 -1
- package/lib/typescript/components/Weui.d.ts +1 -1
- package/lib/typescript/components/Whh.d.ts +1 -1
- package/lib/typescript/components/Wi.d.ts +1 -1
- package/lib/typescript/components/Wpf.d.ts +1 -1
- package/lib/typescript/components/Zmdi.d.ts +1 -1
- package/lib/typescript/components/Zondicons.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +38 -1
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/config/ConfigManager.d.ts +102 -0
- package/lib/typescript/config/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/config/index.d.ts +22 -0
- package/lib/typescript/config/index.d.ts.map +1 -0
- package/lib/typescript/config/types.d.ts +112 -0
- package/lib/typescript/config/types.d.ts.map +1 -0
- package/lib/typescript/createIconSet.d.ts +1 -1
- package/lib/typescript/createIconSet.d.ts.map +1 -1
- package/lib/typescript/explorer/IconExplorer.d.ts +54 -0
- package/lib/typescript/explorer/IconExplorer.d.ts.map +1 -0
- package/lib/typescript/explorer/iconSets.d.ts +35 -0
- package/lib/typescript/explorer/iconSets.d.ts.map +1 -0
- package/lib/typescript/explorer/index.d.ts +33 -0
- package/lib/typescript/explorer/index.d.ts.map +1 -0
- package/lib/typescript/explorer/types.d.ts +329 -0
- package/lib/typescript/explorer/types.d.ts.map +1 -0
- package/lib/typescript/explorer/useExplorer.d.ts +18 -0
- package/lib/typescript/explorer/useExplorer.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +25 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/navigation/createDrawerIcon.d.ts +74 -0
- package/lib/typescript/navigation/createDrawerIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/createHeaderIcon.d.ts +145 -0
- package/lib/typescript/navigation/createHeaderIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/createTabBarIcon.d.ts +99 -0
- package/lib/typescript/navigation/createTabBarIcon.d.ts.map +1 -0
- package/lib/typescript/navigation/index.d.ts +51 -0
- package/lib/typescript/navigation/index.d.ts.map +1 -0
- package/lib/typescript/navigation/types.d.ts +149 -0
- package/lib/typescript/navigation/types.d.ts.map +1 -0
- package/lib/typescript/navigation/useNavigationIcon.d.ts +91 -0
- package/lib/typescript/navigation/useNavigationIcon.d.ts.map +1 -0
- package/lib/typescript/network/IconifyAPI.d.ts +32 -0
- package/lib/typescript/network/IconifyAPI.d.ts.map +1 -1
- package/lib/typescript/network/index.d.ts +2 -1
- package/lib/typescript/network/index.d.ts.map +1 -1
- package/lib/typescript/performance/PerformanceMonitor.d.ts +76 -0
- package/lib/typescript/performance/PerformanceMonitor.d.ts.map +1 -0
- package/lib/typescript/performance/index.d.ts +21 -0
- package/lib/typescript/performance/index.d.ts.map +1 -0
- package/lib/typescript/performance/types.d.ts +156 -0
- package/lib/typescript/performance/types.d.ts.map +1 -0
- package/lib/typescript/placeholder/PlaceholderFactory.d.ts +44 -0
- package/lib/typescript/placeholder/PlaceholderFactory.d.ts.map +1 -0
- package/lib/typescript/placeholder/Pulse.d.ts +18 -0
- package/lib/typescript/placeholder/Pulse.d.ts.map +1 -0
- package/lib/typescript/placeholder/Shimmer.d.ts +19 -0
- package/lib/typescript/placeholder/Shimmer.d.ts.map +1 -0
- package/lib/typescript/placeholder/Skeleton.d.ts +18 -0
- package/lib/typescript/placeholder/Skeleton.d.ts.map +1 -0
- package/lib/typescript/placeholder/index.d.ts +12 -0
- package/lib/typescript/placeholder/index.d.ts.map +1 -0
- package/lib/typescript/placeholder/types.d.ts +63 -0
- package/lib/typescript/placeholder/types.d.ts.map +1 -0
- package/lib/typescript/theme/IconThemeProvider.d.ts +64 -0
- package/lib/typescript/theme/IconThemeProvider.d.ts.map +1 -0
- package/lib/typescript/theme/context.d.ts +24 -0
- package/lib/typescript/theme/context.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +10 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/theme/types.d.ts +85 -0
- package/lib/typescript/theme/types.d.ts.map +1 -0
- package/lib/typescript/theme/useIconTheme.d.ts +78 -0
- package/lib/typescript/theme/useIconTheme.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +58 -1
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/package.json +41 -3
- package/src/IconRenderer.tsx +91 -4
- package/src/accessibility/AccessibilityProvider.tsx +220 -0
- package/src/accessibility/index.ts +63 -0
- package/src/accessibility/types.ts +152 -0
- package/src/accessibility/useAccessibleIcon.ts +220 -0
- package/src/accessibility/utils.ts +180 -0
- package/src/alias/Icon.tsx +113 -0
- package/src/alias/IconAliasContext.tsx +180 -0
- package/src/alias/createIconAliases.tsx +233 -0
- package/src/alias/index.ts +59 -0
- package/src/alias/types.ts +132 -0
- package/src/animated/AnimatedIcon.tsx +116 -0
- package/src/animated/index.ts +97 -0
- package/src/animated/presets.ts +211 -0
- package/src/animated/types.ts +239 -0
- package/src/animated/useIconAnimation.ts +383 -0
- package/src/babel/ast-utils.ts +219 -0
- package/src/babel/cache-writer.ts +323 -0
- package/src/babel/collector.ts +224 -0
- package/src/babel/index.ts +60 -0
- package/src/babel/plugin.ts +254 -0
- package/src/babel/types.ts +717 -0
- package/src/bundle/index.ts +313 -0
- package/src/cache/CacheManager.ts +123 -6
- package/src/cli/commands/analyze.ts +195 -0
- package/src/cli/commands/bundle.ts +231 -0
- package/src/cli/index.ts +153 -0
- package/src/cli/parser.ts +275 -0
- package/src/cli/types.ts +187 -0
- package/src/components/index.ts +52 -1
- package/src/config/ConfigManager.ts +196 -0
- package/src/config/index.ts +34 -0
- package/src/config/types.ts +149 -0
- package/src/createIconSet.tsx +48 -9
- package/src/explorer/IconExplorer.tsx +844 -0
- package/src/explorer/iconSets.ts +334 -0
- package/src/explorer/index.ts +64 -0
- package/src/explorer/types.ts +392 -0
- package/src/explorer/useExplorer.ts +390 -0
- package/src/index.ts +218 -9
- package/src/navigation/createDrawerIcon.tsx +113 -0
- package/src/navigation/createHeaderIcon.tsx +213 -0
- package/src/navigation/createTabBarIcon.tsx +180 -0
- package/src/navigation/index.ts +80 -0
- package/src/navigation/types.ts +155 -0
- package/src/navigation/useNavigationIcon.tsx +156 -0
- package/src/network/IconifyAPI.ts +182 -14
- package/src/network/index.ts +11 -1
- package/src/performance/PerformanceMonitor.ts +367 -0
- package/src/performance/index.ts +39 -0
- package/src/performance/types.ts +185 -0
- package/src/placeholder/PlaceholderFactory.tsx +133 -0
- package/src/placeholder/Pulse.tsx +86 -0
- package/src/placeholder/Shimmer.tsx +104 -0
- package/src/placeholder/Skeleton.tsx +52 -0
- package/src/placeholder/index.ts +21 -0
- package/src/placeholder/types.ts +78 -0
- package/src/theme/IconThemeProvider.tsx +94 -0
- package/src/theme/context.ts +51 -0
- package/src/theme/index.ts +19 -0
- package/src/theme/types.ts +108 -0
- package/src/theme/useIconTheme.ts +119 -0
- package/src/types/index.ts +78 -1
- package/lib/commonjs/components/Phosphor.js +0 -493
- package/lib/commonjs/components/Phosphor.js.map +0 -1
- package/lib/module/components/Phosphor.js +0 -488
- package/lib/module/components/Phosphor.js.map +0 -1
- package/lib/typescript/components/Phosphor.d.ts +0 -472
- package/lib/typescript/components/Phosphor.d.ts.map +0 -1
- package/src/components/Phosphor.tsx +0 -506
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessibility types for rn-iconify
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import type { AccessibilityRole } from 'react-native';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Accessibility configuration
|
|
9
|
+
*/
|
|
10
|
+
export interface AccessibilityConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Enable auto-generated accessibility labels
|
|
13
|
+
* @default true
|
|
14
|
+
*/
|
|
15
|
+
autoLabels?: boolean;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Custom label generator function
|
|
19
|
+
*/
|
|
20
|
+
labelGenerator?: (iconName: string) => string;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Enable high contrast mode
|
|
24
|
+
* @default false (auto-detect from system)
|
|
25
|
+
*/
|
|
26
|
+
highContrast?: boolean;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Respect reduced motion preference
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
respectReducedMotion?: boolean;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Default accessibility role for icons
|
|
36
|
+
* @default 'image'
|
|
37
|
+
*/
|
|
38
|
+
defaultRole?: AccessibilityRole;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Enable focus indicators
|
|
42
|
+
* @default true
|
|
43
|
+
*/
|
|
44
|
+
showFocusIndicators?: boolean;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Minimum touch target size (for pressable icons)
|
|
48
|
+
* @default 44
|
|
49
|
+
*/
|
|
50
|
+
minTouchTargetSize?: number;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Resolved accessibility config with defaults applied
|
|
55
|
+
*/
|
|
56
|
+
export interface ResolvedAccessibilityConfig {
|
|
57
|
+
autoLabels: boolean;
|
|
58
|
+
labelGenerator: (iconName: string) => string;
|
|
59
|
+
highContrast: boolean;
|
|
60
|
+
respectReducedMotion: boolean;
|
|
61
|
+
defaultRole: AccessibilityRole;
|
|
62
|
+
showFocusIndicators: boolean;
|
|
63
|
+
minTouchTargetSize: number;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Accessibility context value
|
|
68
|
+
*/
|
|
69
|
+
export interface AccessibilityContextValue {
|
|
70
|
+
/**
|
|
71
|
+
* Current accessibility configuration
|
|
72
|
+
*/
|
|
73
|
+
config: ResolvedAccessibilityConfig;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* System prefers reduced motion
|
|
77
|
+
*/
|
|
78
|
+
prefersReducedMotion: boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* System high contrast mode enabled
|
|
82
|
+
*/
|
|
83
|
+
isHighContrast: boolean;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Update accessibility configuration
|
|
87
|
+
*/
|
|
88
|
+
setConfig: (config: Partial<AccessibilityConfig>) => void;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Generate label for icon
|
|
92
|
+
*/
|
|
93
|
+
getLabel: (iconName: string, customLabel?: string) => string | undefined;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Get color adjusted for high contrast
|
|
97
|
+
*/
|
|
98
|
+
getContrastColor: (color: string) => string;
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Check if animations should be disabled
|
|
102
|
+
*/
|
|
103
|
+
shouldDisableAnimations: () => boolean;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Props for accessibility-enhanced icons
|
|
108
|
+
*/
|
|
109
|
+
export interface AccessibleIconProps {
|
|
110
|
+
/**
|
|
111
|
+
* Accessibility label (auto-generated if not provided)
|
|
112
|
+
*/
|
|
113
|
+
accessibilityLabel?: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Accessibility hint
|
|
117
|
+
*/
|
|
118
|
+
accessibilityHint?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Accessibility role
|
|
122
|
+
* @default 'image'
|
|
123
|
+
*/
|
|
124
|
+
accessibilityRole?: AccessibilityRole;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Whether the icon is part of a button or pressable
|
|
128
|
+
*/
|
|
129
|
+
accessibilityState?: {
|
|
130
|
+
disabled?: boolean;
|
|
131
|
+
selected?: boolean;
|
|
132
|
+
checked?: boolean | 'mixed';
|
|
133
|
+
busy?: boolean;
|
|
134
|
+
expanded?: boolean;
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Override high contrast mode for this icon
|
|
139
|
+
*/
|
|
140
|
+
highContrast?: boolean;
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Whether this icon should be hidden from screen readers
|
|
144
|
+
* Useful for decorative icons
|
|
145
|
+
*/
|
|
146
|
+
accessibilityElementsHidden?: boolean;
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Import for Android accessibility
|
|
150
|
+
*/
|
|
151
|
+
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants';
|
|
152
|
+
}
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook for creating accessible icon props
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { useMemo } from 'react';
|
|
6
|
+
import type { AccessibilityRole } from 'react-native';
|
|
7
|
+
import { useAccessibility } from './AccessibilityProvider';
|
|
8
|
+
import type { AccessibleIconProps } from './types';
|
|
9
|
+
import { calculateTouchTargetPadding, adjustForHighContrast } from './utils';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Input props for useAccessibleIcon hook
|
|
13
|
+
*/
|
|
14
|
+
export interface UseAccessibleIconInput {
|
|
15
|
+
/**
|
|
16
|
+
* Icon name for auto-label generation
|
|
17
|
+
*/
|
|
18
|
+
iconName: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Icon size for touch target calculation
|
|
22
|
+
*/
|
|
23
|
+
size?: number;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Custom accessibility label
|
|
27
|
+
*/
|
|
28
|
+
accessibilityLabel?: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Custom accessibility hint
|
|
32
|
+
*/
|
|
33
|
+
accessibilityHint?: string;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Custom accessibility role
|
|
37
|
+
*/
|
|
38
|
+
accessibilityRole?: AccessibilityRole;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Override high contrast for this icon
|
|
42
|
+
*/
|
|
43
|
+
highContrast?: boolean;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Hide from screen readers (decorative icon)
|
|
47
|
+
*/
|
|
48
|
+
accessibilityElementsHidden?: boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Android importantForAccessibility
|
|
52
|
+
*/
|
|
53
|
+
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants';
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Icon color for contrast adjustment
|
|
57
|
+
*/
|
|
58
|
+
color?: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Whether the icon is interactive (button, etc.)
|
|
62
|
+
*/
|
|
63
|
+
isInteractive?: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Output props from useAccessibleIcon hook
|
|
68
|
+
*/
|
|
69
|
+
export interface UseAccessibleIconOutput {
|
|
70
|
+
/**
|
|
71
|
+
* Props to spread on the icon component
|
|
72
|
+
*/
|
|
73
|
+
accessibilityProps: {
|
|
74
|
+
accessible: boolean;
|
|
75
|
+
accessibilityLabel?: string;
|
|
76
|
+
accessibilityHint?: string;
|
|
77
|
+
accessibilityRole: AccessibilityRole;
|
|
78
|
+
accessibilityElementsHidden?: boolean;
|
|
79
|
+
importantForAccessibility?: 'auto' | 'yes' | 'no' | 'no-hide-descendants';
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Adjusted color for high contrast
|
|
84
|
+
*/
|
|
85
|
+
adjustedColor?: string;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Padding needed to meet minimum touch target
|
|
89
|
+
*/
|
|
90
|
+
touchTargetPadding: number;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Whether animations should be disabled
|
|
94
|
+
*/
|
|
95
|
+
shouldDisableAnimations: boolean;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Whether high contrast mode is active
|
|
99
|
+
*/
|
|
100
|
+
isHighContrast: boolean;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Hook for creating accessible icon props
|
|
105
|
+
* Automatically generates labels, adjusts colors, and calculates touch targets
|
|
106
|
+
*
|
|
107
|
+
* @example
|
|
108
|
+
* ```tsx
|
|
109
|
+
* function MyIcon({ name, size, color }) {
|
|
110
|
+
* const { accessibilityProps, adjustedColor, touchTargetPadding } = useAccessibleIcon({
|
|
111
|
+
* iconName: name,
|
|
112
|
+
* size,
|
|
113
|
+
* color,
|
|
114
|
+
* });
|
|
115
|
+
*
|
|
116
|
+
* return (
|
|
117
|
+
* <View style={{ padding: touchTargetPadding }} {...accessibilityProps}>
|
|
118
|
+
* <Icon name={name} size={size} color={adjustedColor} />
|
|
119
|
+
* </View>
|
|
120
|
+
* );
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
export function useAccessibleIcon(input: UseAccessibleIconInput): UseAccessibleIconOutput {
|
|
125
|
+
const accessibility = useAccessibility();
|
|
126
|
+
|
|
127
|
+
return useMemo(() => {
|
|
128
|
+
// Default values when no provider is present
|
|
129
|
+
const defaults: UseAccessibleIconOutput = {
|
|
130
|
+
accessibilityProps: {
|
|
131
|
+
accessible: true,
|
|
132
|
+
accessibilityRole: input.accessibilityRole ?? 'image',
|
|
133
|
+
accessibilityLabel: input.accessibilityLabel,
|
|
134
|
+
accessibilityHint: input.accessibilityHint,
|
|
135
|
+
accessibilityElementsHidden: input.accessibilityElementsHidden,
|
|
136
|
+
importantForAccessibility: input.importantForAccessibility,
|
|
137
|
+
},
|
|
138
|
+
adjustedColor: input.color,
|
|
139
|
+
touchTargetPadding: 0,
|
|
140
|
+
shouldDisableAnimations: false,
|
|
141
|
+
isHighContrast: false,
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// Return defaults if no accessibility context
|
|
145
|
+
if (!accessibility) {
|
|
146
|
+
return defaults;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const { config, getLabel, getContrastColor, shouldDisableAnimations, isHighContrast } =
|
|
150
|
+
accessibility;
|
|
151
|
+
|
|
152
|
+
// Determine accessibility role
|
|
153
|
+
const role: AccessibilityRole = input.accessibilityRole ?? config.defaultRole;
|
|
154
|
+
|
|
155
|
+
// Generate label
|
|
156
|
+
const label = input.accessibilityElementsHidden
|
|
157
|
+
? undefined
|
|
158
|
+
: getLabel(input.iconName, input.accessibilityLabel);
|
|
159
|
+
|
|
160
|
+
// Calculate touch target padding for interactive icons
|
|
161
|
+
const touchTargetPadding =
|
|
162
|
+
input.isInteractive && input.size
|
|
163
|
+
? calculateTouchTargetPadding(input.size, config.minTouchTargetSize)
|
|
164
|
+
: 0;
|
|
165
|
+
|
|
166
|
+
// Adjust color for high contrast if needed
|
|
167
|
+
const shouldUseHighContrast = input.highContrast ?? isHighContrast;
|
|
168
|
+
// Use adjustForHighContrast directly when prop is set, otherwise use context's getContrastColor
|
|
169
|
+
const adjustedColor =
|
|
170
|
+
input.color && shouldUseHighContrast
|
|
171
|
+
? input.highContrast
|
|
172
|
+
? adjustForHighContrast(input.color)
|
|
173
|
+
: getContrastColor(input.color)
|
|
174
|
+
: input.color;
|
|
175
|
+
|
|
176
|
+
return {
|
|
177
|
+
accessibilityProps: {
|
|
178
|
+
accessible: !input.accessibilityElementsHidden,
|
|
179
|
+
accessibilityLabel: label,
|
|
180
|
+
accessibilityHint: input.accessibilityHint,
|
|
181
|
+
accessibilityRole: role,
|
|
182
|
+
accessibilityElementsHidden: input.accessibilityElementsHidden,
|
|
183
|
+
importantForAccessibility: input.importantForAccessibility,
|
|
184
|
+
},
|
|
185
|
+
adjustedColor,
|
|
186
|
+
touchTargetPadding,
|
|
187
|
+
shouldDisableAnimations: shouldDisableAnimations(),
|
|
188
|
+
isHighContrast: shouldUseHighContrast,
|
|
189
|
+
};
|
|
190
|
+
}, [
|
|
191
|
+
accessibility,
|
|
192
|
+
input.iconName,
|
|
193
|
+
input.size,
|
|
194
|
+
input.accessibilityLabel,
|
|
195
|
+
input.accessibilityHint,
|
|
196
|
+
input.accessibilityRole,
|
|
197
|
+
input.highContrast,
|
|
198
|
+
input.accessibilityElementsHidden,
|
|
199
|
+
input.importantForAccessibility,
|
|
200
|
+
input.color,
|
|
201
|
+
input.isInteractive,
|
|
202
|
+
]);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Higher-order component props enhancer
|
|
207
|
+
* Use this to add accessibility to existing icon components
|
|
208
|
+
*/
|
|
209
|
+
export function withAccessibility<P extends AccessibleIconProps>(
|
|
210
|
+
props: P & UseAccessibleIconInput
|
|
211
|
+
): P & UseAccessibleIconOutput['accessibilityProps'] {
|
|
212
|
+
// This is a simple merge for use without hooks (SSR, etc.)
|
|
213
|
+
return {
|
|
214
|
+
...props,
|
|
215
|
+
accessible: !props.accessibilityElementsHidden,
|
|
216
|
+
accessibilityRole: props.accessibilityRole ?? 'image',
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export default useAccessibleIcon;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessibility utility functions for rn-iconify
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Default label generator - converts icon names to readable labels
|
|
7
|
+
* Examples:
|
|
8
|
+
* - "mdi:home" -> "home icon"
|
|
9
|
+
* - "heroicons:user-circle" -> "user circle icon"
|
|
10
|
+
* - "lucide:arrow-left" -> "arrow left icon"
|
|
11
|
+
*/
|
|
12
|
+
export function defaultLabelGenerator(iconName: string): string {
|
|
13
|
+
// Extract icon name from prefix:name format
|
|
14
|
+
const parts = iconName.split(':');
|
|
15
|
+
const name = parts.length > 1 ? parts[1] : parts[0];
|
|
16
|
+
|
|
17
|
+
// Convert kebab-case and camelCase to readable text
|
|
18
|
+
const readable = name
|
|
19
|
+
// Insert space before capital letters (camelCase)
|
|
20
|
+
.replace(/([A-Z])/g, ' $1')
|
|
21
|
+
// Replace hyphens and underscores with spaces
|
|
22
|
+
.replace(/[-_]/g, ' ')
|
|
23
|
+
// Remove extra spaces
|
|
24
|
+
.replace(/\s+/g, ' ')
|
|
25
|
+
// Trim and lowercase
|
|
26
|
+
.trim()
|
|
27
|
+
.toLowerCase();
|
|
28
|
+
|
|
29
|
+
return `${readable} icon`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Adjust color for high contrast mode
|
|
34
|
+
* Increases contrast by pushing colors toward black or white
|
|
35
|
+
*/
|
|
36
|
+
export function adjustForHighContrast(color: string): string {
|
|
37
|
+
// Parse color
|
|
38
|
+
const rgb = parseColor(color);
|
|
39
|
+
if (!rgb) return color;
|
|
40
|
+
|
|
41
|
+
// Calculate luminance
|
|
42
|
+
const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
|
|
43
|
+
|
|
44
|
+
// Push toward black or white based on luminance
|
|
45
|
+
if (luminance > 0.5) {
|
|
46
|
+
// Light color - make it darker (black)
|
|
47
|
+
return '#000000';
|
|
48
|
+
} else {
|
|
49
|
+
// Dark color - make it lighter (white)
|
|
50
|
+
return '#FFFFFF';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Parse color string to RGB values
|
|
56
|
+
*/
|
|
57
|
+
function parseColor(color: string): { r: number; g: number; b: number } | null {
|
|
58
|
+
// Handle hex colors
|
|
59
|
+
if (color.startsWith('#')) {
|
|
60
|
+
const hex = color.slice(1);
|
|
61
|
+
if (hex.length === 3) {
|
|
62
|
+
return {
|
|
63
|
+
r: parseInt(hex[0] + hex[0], 16),
|
|
64
|
+
g: parseInt(hex[1] + hex[1], 16),
|
|
65
|
+
b: parseInt(hex[2] + hex[2], 16),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
if (hex.length === 6) {
|
|
69
|
+
return {
|
|
70
|
+
r: parseInt(hex.slice(0, 2), 16),
|
|
71
|
+
g: parseInt(hex.slice(2, 4), 16),
|
|
72
|
+
b: parseInt(hex.slice(4, 6), 16),
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Handle rgb/rgba colors
|
|
78
|
+
const rgbMatch = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
79
|
+
if (rgbMatch) {
|
|
80
|
+
return {
|
|
81
|
+
r: parseInt(rgbMatch[1], 10),
|
|
82
|
+
g: parseInt(rgbMatch[2], 10),
|
|
83
|
+
b: parseInt(rgbMatch[3], 10),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Handle named colors (common ones)
|
|
88
|
+
const namedColors: Record<string, { r: number; g: number; b: number }> = {
|
|
89
|
+
black: { r: 0, g: 0, b: 0 },
|
|
90
|
+
white: { r: 255, g: 255, b: 255 },
|
|
91
|
+
red: { r: 255, g: 0, b: 0 },
|
|
92
|
+
green: { r: 0, g: 128, b: 0 },
|
|
93
|
+
blue: { r: 0, g: 0, b: 255 },
|
|
94
|
+
yellow: { r: 255, g: 255, b: 0 },
|
|
95
|
+
cyan: { r: 0, g: 255, b: 255 },
|
|
96
|
+
magenta: { r: 255, g: 0, b: 255 },
|
|
97
|
+
gray: { r: 128, g: 128, b: 128 },
|
|
98
|
+
grey: { r: 128, g: 128, b: 128 },
|
|
99
|
+
orange: { r: 255, g: 165, b: 0 },
|
|
100
|
+
purple: { r: 128, g: 0, b: 128 },
|
|
101
|
+
pink: { r: 255, g: 192, b: 203 },
|
|
102
|
+
brown: { r: 165, g: 42, b: 42 },
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const lowerColor = color.toLowerCase();
|
|
106
|
+
if (namedColors[lowerColor]) {
|
|
107
|
+
return namedColors[lowerColor];
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Check if a color meets WCAG contrast requirements against a background
|
|
115
|
+
*/
|
|
116
|
+
export function meetsContrastRequirement(
|
|
117
|
+
foreground: string,
|
|
118
|
+
background: string,
|
|
119
|
+
level: 'AA' | 'AAA' = 'AA'
|
|
120
|
+
): boolean {
|
|
121
|
+
const fgRgb = parseColor(foreground);
|
|
122
|
+
const bgRgb = parseColor(background);
|
|
123
|
+
|
|
124
|
+
if (!fgRgb || !bgRgb) return true; // Assume it meets if we can't parse
|
|
125
|
+
|
|
126
|
+
const fgLuminance = getRelativeLuminance(fgRgb);
|
|
127
|
+
const bgLuminance = getRelativeLuminance(bgRgb);
|
|
128
|
+
|
|
129
|
+
const lighter = Math.max(fgLuminance, bgLuminance);
|
|
130
|
+
const darker = Math.min(fgLuminance, bgLuminance);
|
|
131
|
+
|
|
132
|
+
const contrastRatio = (lighter + 0.05) / (darker + 0.05);
|
|
133
|
+
|
|
134
|
+
// WCAG requirements for normal text
|
|
135
|
+
const requiredRatio = level === 'AAA' ? 7 : 4.5;
|
|
136
|
+
|
|
137
|
+
return contrastRatio >= requiredRatio;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Calculate relative luminance for WCAG calculations
|
|
142
|
+
*/
|
|
143
|
+
function getRelativeLuminance(rgb: { r: number; g: number; b: number }): number {
|
|
144
|
+
const rsRGB = rgb.r / 255;
|
|
145
|
+
const gsRGB = rgb.g / 255;
|
|
146
|
+
const bsRGB = rgb.b / 255;
|
|
147
|
+
|
|
148
|
+
const r = rsRGB <= 0.03928 ? rsRGB / 12.92 : Math.pow((rsRGB + 0.055) / 1.055, 2.4);
|
|
149
|
+
const g = gsRGB <= 0.03928 ? gsRGB / 12.92 : Math.pow((gsRGB + 0.055) / 1.055, 2.4);
|
|
150
|
+
const b = bsRGB <= 0.03928 ? bsRGB / 12.92 : Math.pow((bsRGB + 0.055) / 1.055, 2.4);
|
|
151
|
+
|
|
152
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Generate a high contrast alternative for a color
|
|
157
|
+
*/
|
|
158
|
+
export function getHighContrastAlternative(color: string, background: string = '#FFFFFF'): string {
|
|
159
|
+
const fgRgb = parseColor(color);
|
|
160
|
+
const bgRgb = parseColor(background);
|
|
161
|
+
|
|
162
|
+
if (!fgRgb || !bgRgb) return color;
|
|
163
|
+
|
|
164
|
+
const bgLuminance = getRelativeLuminance(bgRgb);
|
|
165
|
+
|
|
166
|
+
// If background is light, use black; if dark, use white
|
|
167
|
+
if (bgLuminance > 0.5) {
|
|
168
|
+
return '#000000';
|
|
169
|
+
} else {
|
|
170
|
+
return '#FFFFFF';
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Calculate minimum touch target padding needed
|
|
176
|
+
*/
|
|
177
|
+
export function calculateTouchTargetPadding(iconSize: number, minTargetSize: number): number {
|
|
178
|
+
if (iconSize >= minTargetSize) return 0;
|
|
179
|
+
return (minTargetSize - iconSize) / 2;
|
|
180
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic Icon Component
|
|
3
|
+
* Renders any icon by full name (prefix:name) or alias
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React from 'react';
|
|
7
|
+
import { IconRenderer } from '../IconRenderer';
|
|
8
|
+
import { useIconTheme } from '../theme';
|
|
9
|
+
import { DEFAULT_ICON_THEME } from '../theme/types';
|
|
10
|
+
import { useIconAliasContext } from './IconAliasContext';
|
|
11
|
+
import type { GenericIconProps } from './types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Generic Icon component that accepts any icon name or alias
|
|
15
|
+
*
|
|
16
|
+
* @example With full icon name
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { Icon } from 'rn-iconify';
|
|
19
|
+
*
|
|
20
|
+
* <Icon name="mdi:home" size={24} color="blue" />
|
|
21
|
+
* <Icon name="heroicons:user" size={24} />
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @example With aliases (requires IconAliasProvider)
|
|
25
|
+
* ```tsx
|
|
26
|
+
* import { Icon, IconAliasProvider } from 'rn-iconify';
|
|
27
|
+
*
|
|
28
|
+
* const aliases = {
|
|
29
|
+
* back: 'mdi:arrow-left',
|
|
30
|
+
* menu: 'heroicons:bars-3',
|
|
31
|
+
* };
|
|
32
|
+
*
|
|
33
|
+
* <IconAliasProvider aliases={aliases}>
|
|
34
|
+
* <Icon name="back" size={24} />
|
|
35
|
+
* <Icon name="menu" size={24} />
|
|
36
|
+
* </IconAliasProvider>
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export function Icon({
|
|
40
|
+
name,
|
|
41
|
+
size,
|
|
42
|
+
color,
|
|
43
|
+
width,
|
|
44
|
+
height,
|
|
45
|
+
style,
|
|
46
|
+
rotate,
|
|
47
|
+
flip,
|
|
48
|
+
fallback,
|
|
49
|
+
fallbackDelay,
|
|
50
|
+
placeholder,
|
|
51
|
+
placeholderColor,
|
|
52
|
+
placeholderDuration,
|
|
53
|
+
onLoad,
|
|
54
|
+
onError,
|
|
55
|
+
accessibilityLabel,
|
|
56
|
+
testID,
|
|
57
|
+
}: GenericIconProps) {
|
|
58
|
+
// Get theme defaults
|
|
59
|
+
const { theme } = useIconTheme();
|
|
60
|
+
|
|
61
|
+
// Get alias context
|
|
62
|
+
const { resolveIcon } = useIconAliasContext();
|
|
63
|
+
|
|
64
|
+
// Resolve the icon name (alias → full name)
|
|
65
|
+
const resolvedName = resolveIcon(name);
|
|
66
|
+
|
|
67
|
+
// Merge props with theme defaults (props take precedence)
|
|
68
|
+
const mergedSize = size ?? theme.size ?? DEFAULT_ICON_THEME.size;
|
|
69
|
+
const mergedColor = color ?? theme.color ?? DEFAULT_ICON_THEME.color;
|
|
70
|
+
const mergedRotate = rotate ?? theme.rotate ?? DEFAULT_ICON_THEME.rotate;
|
|
71
|
+
const mergedFlip = flip ?? theme.flip;
|
|
72
|
+
const mergedFallbackDelay =
|
|
73
|
+
fallbackDelay ?? theme.fallbackDelay ?? DEFAULT_ICON_THEME.fallbackDelay;
|
|
74
|
+
const mergedPlaceholder = placeholder ?? theme.placeholder;
|
|
75
|
+
const mergedPlaceholderColor =
|
|
76
|
+
placeholderColor ?? theme.placeholderColor ?? DEFAULT_ICON_THEME.placeholderColor;
|
|
77
|
+
const mergedPlaceholderDuration =
|
|
78
|
+
placeholderDuration ?? theme.placeholderDuration ?? DEFAULT_ICON_THEME.placeholderDuration;
|
|
79
|
+
|
|
80
|
+
// Validate icon name format in development
|
|
81
|
+
if (__DEV__ && !resolvedName.includes(':')) {
|
|
82
|
+
console.warn(
|
|
83
|
+
`[rn-iconify] Icon name "${name}" is not a valid icon name or registered alias. ` +
|
|
84
|
+
`Expected format: "prefix:name" (e.g., "mdi:home") or a registered alias.`
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<IconRenderer
|
|
90
|
+
iconName={resolvedName}
|
|
91
|
+
size={mergedSize}
|
|
92
|
+
color={mergedColor}
|
|
93
|
+
width={width}
|
|
94
|
+
height={height}
|
|
95
|
+
style={style}
|
|
96
|
+
rotate={mergedRotate}
|
|
97
|
+
flip={mergedFlip}
|
|
98
|
+
fallback={fallback}
|
|
99
|
+
fallbackDelay={mergedFallbackDelay}
|
|
100
|
+
placeholder={mergedPlaceholder}
|
|
101
|
+
placeholderColor={mergedPlaceholderColor}
|
|
102
|
+
placeholderDuration={mergedPlaceholderDuration}
|
|
103
|
+
onLoad={onLoad}
|
|
104
|
+
onError={onError}
|
|
105
|
+
accessibilityLabel={accessibilityLabel ?? name}
|
|
106
|
+
testID={testID}
|
|
107
|
+
/>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
Icon.displayName = 'Icon';
|
|
112
|
+
|
|
113
|
+
export default Icon;
|