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,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pulse Placeholder Component
|
|
3
|
+
* Animated opacity fade effect while icon is loading
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { memo, useEffect, useRef } from 'react';
|
|
7
|
+
import { Animated, StyleSheet, Easing } from 'react-native';
|
|
8
|
+
import { DEFAULT_PLACEHOLDER_CONFIG } from './types';
|
|
9
|
+
import type { PlaceholderProps } from './types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Pulse placeholder - animated opacity fade effect
|
|
13
|
+
* Provides subtle visual feedback during loading
|
|
14
|
+
*/
|
|
15
|
+
function PulseComponent({
|
|
16
|
+
width,
|
|
17
|
+
height,
|
|
18
|
+
color = DEFAULT_PLACEHOLDER_CONFIG.color,
|
|
19
|
+
duration = DEFAULT_PLACEHOLDER_CONFIG.duration,
|
|
20
|
+
borderRadius = DEFAULT_PLACEHOLDER_CONFIG.borderRadius,
|
|
21
|
+
testID,
|
|
22
|
+
}: PlaceholderProps): React.ReactElement {
|
|
23
|
+
const opacity = useRef(new Animated.Value(1)).current;
|
|
24
|
+
const animationRef = useRef<Animated.CompositeAnimation | null>(null);
|
|
25
|
+
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
// Create looping pulse animation
|
|
28
|
+
animationRef.current = Animated.loop(
|
|
29
|
+
Animated.sequence([
|
|
30
|
+
Animated.timing(opacity, {
|
|
31
|
+
toValue: 0.4,
|
|
32
|
+
duration: duration / 2,
|
|
33
|
+
easing: Easing.inOut(Easing.ease),
|
|
34
|
+
useNativeDriver: true,
|
|
35
|
+
}),
|
|
36
|
+
Animated.timing(opacity, {
|
|
37
|
+
toValue: 1,
|
|
38
|
+
duration: duration / 2,
|
|
39
|
+
easing: Easing.inOut(Easing.ease),
|
|
40
|
+
useNativeDriver: true,
|
|
41
|
+
}),
|
|
42
|
+
])
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
animationRef.current.start();
|
|
46
|
+
|
|
47
|
+
return () => {
|
|
48
|
+
// Clean up animation on unmount
|
|
49
|
+
if (animationRef.current) {
|
|
50
|
+
animationRef.current.stop();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, [opacity, duration]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<Animated.View
|
|
57
|
+
style={[
|
|
58
|
+
styles.pulse,
|
|
59
|
+
{
|
|
60
|
+
width,
|
|
61
|
+
height,
|
|
62
|
+
backgroundColor: color,
|
|
63
|
+
borderRadius,
|
|
64
|
+
opacity,
|
|
65
|
+
},
|
|
66
|
+
]}
|
|
67
|
+
testID={testID}
|
|
68
|
+
accessibilityRole="none"
|
|
69
|
+
accessibilityElementsHidden
|
|
70
|
+
importantForAccessibility="no"
|
|
71
|
+
/>
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const styles = StyleSheet.create({
|
|
76
|
+
pulse: {
|
|
77
|
+
overflow: 'hidden',
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Memoized Pulse component
|
|
83
|
+
* Animation runs independently of re-renders
|
|
84
|
+
*/
|
|
85
|
+
export const Pulse = memo(PulseComponent);
|
|
86
|
+
Pulse.displayName = 'Pulse';
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shimmer Placeholder Component
|
|
3
|
+
* Animated gradient sweep effect while icon is loading
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { memo, useEffect, useRef } from 'react';
|
|
7
|
+
import { Animated, StyleSheet, View, Easing } from 'react-native';
|
|
8
|
+
import { DEFAULT_PLACEHOLDER_CONFIG } from './types';
|
|
9
|
+
import type { PlaceholderProps } from './types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Shimmer placeholder - animated light sweep effect
|
|
13
|
+
* Provides prominent visual feedback during loading
|
|
14
|
+
* Uses translateX animation for smooth performance
|
|
15
|
+
*/
|
|
16
|
+
function ShimmerComponent({
|
|
17
|
+
width,
|
|
18
|
+
height,
|
|
19
|
+
color = DEFAULT_PLACEHOLDER_CONFIG.color,
|
|
20
|
+
highlightColor = DEFAULT_PLACEHOLDER_CONFIG.highlightColor,
|
|
21
|
+
duration = DEFAULT_PLACEHOLDER_CONFIG.duration,
|
|
22
|
+
borderRadius = DEFAULT_PLACEHOLDER_CONFIG.borderRadius,
|
|
23
|
+
testID,
|
|
24
|
+
}: PlaceholderProps): React.ReactElement {
|
|
25
|
+
const translateX = useRef(new Animated.Value(-width)).current;
|
|
26
|
+
const animationRef = useRef<Animated.CompositeAnimation | null>(null);
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
// Reset animation when width changes
|
|
30
|
+
translateX.setValue(-width);
|
|
31
|
+
|
|
32
|
+
// Create looping shimmer animation
|
|
33
|
+
animationRef.current = Animated.loop(
|
|
34
|
+
Animated.timing(translateX, {
|
|
35
|
+
toValue: width,
|
|
36
|
+
duration: duration,
|
|
37
|
+
easing: Easing.linear,
|
|
38
|
+
useNativeDriver: true,
|
|
39
|
+
})
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
animationRef.current.start();
|
|
43
|
+
|
|
44
|
+
return () => {
|
|
45
|
+
// Clean up animation on unmount
|
|
46
|
+
if (animationRef.current) {
|
|
47
|
+
animationRef.current.stop();
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}, [translateX, width, duration]);
|
|
51
|
+
|
|
52
|
+
// Calculate shimmer bar width (30% of container width)
|
|
53
|
+
const shimmerWidth = Math.max(width * 0.3, 20);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<View
|
|
57
|
+
style={[
|
|
58
|
+
styles.container,
|
|
59
|
+
{
|
|
60
|
+
width,
|
|
61
|
+
height,
|
|
62
|
+
backgroundColor: color,
|
|
63
|
+
borderRadius,
|
|
64
|
+
},
|
|
65
|
+
]}
|
|
66
|
+
testID={testID}
|
|
67
|
+
accessibilityRole="none"
|
|
68
|
+
accessibilityElementsHidden
|
|
69
|
+
importantForAccessibility="no"
|
|
70
|
+
>
|
|
71
|
+
<Animated.View
|
|
72
|
+
style={[
|
|
73
|
+
styles.shimmer,
|
|
74
|
+
{
|
|
75
|
+
width: shimmerWidth,
|
|
76
|
+
height,
|
|
77
|
+
backgroundColor: highlightColor,
|
|
78
|
+
transform: [{ translateX }],
|
|
79
|
+
},
|
|
80
|
+
]}
|
|
81
|
+
/>
|
|
82
|
+
</View>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
const styles = StyleSheet.create({
|
|
87
|
+
container: {
|
|
88
|
+
overflow: 'hidden',
|
|
89
|
+
position: 'relative',
|
|
90
|
+
},
|
|
91
|
+
shimmer: {
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
top: 0,
|
|
94
|
+
left: 0,
|
|
95
|
+
opacity: 0.5,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Memoized Shimmer component
|
|
101
|
+
* Animation runs independently of re-renders
|
|
102
|
+
*/
|
|
103
|
+
export const Shimmer = memo(ShimmerComponent);
|
|
104
|
+
Shimmer.displayName = 'Shimmer';
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skeleton Placeholder Component
|
|
3
|
+
* Static gray box shown while icon is loading
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { memo } from 'react';
|
|
7
|
+
import { View, StyleSheet } from 'react-native';
|
|
8
|
+
import { DEFAULT_PLACEHOLDER_CONFIG } from './types';
|
|
9
|
+
import type { PlaceholderProps } from './types';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Skeleton placeholder - a simple static colored box
|
|
13
|
+
* Lightweight alternative when animation is not needed
|
|
14
|
+
*/
|
|
15
|
+
function SkeletonComponent({
|
|
16
|
+
width,
|
|
17
|
+
height,
|
|
18
|
+
color = DEFAULT_PLACEHOLDER_CONFIG.color,
|
|
19
|
+
borderRadius = DEFAULT_PLACEHOLDER_CONFIG.borderRadius,
|
|
20
|
+
testID,
|
|
21
|
+
}: PlaceholderProps): React.ReactElement {
|
|
22
|
+
return (
|
|
23
|
+
<View
|
|
24
|
+
style={[
|
|
25
|
+
styles.skeleton,
|
|
26
|
+
{
|
|
27
|
+
width,
|
|
28
|
+
height,
|
|
29
|
+
backgroundColor: color,
|
|
30
|
+
borderRadius,
|
|
31
|
+
},
|
|
32
|
+
]}
|
|
33
|
+
testID={testID}
|
|
34
|
+
accessibilityRole="none"
|
|
35
|
+
accessibilityElementsHidden
|
|
36
|
+
importantForAccessibility="no"
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
skeleton: {
|
|
43
|
+
overflow: 'hidden',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Memoized Skeleton component
|
|
49
|
+
* Only re-renders when dimensions or styling change
|
|
50
|
+
*/
|
|
51
|
+
export const Skeleton = memo(SkeletonComponent);
|
|
52
|
+
Skeleton.displayName = 'Skeleton';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholder System
|
|
3
|
+
* Provides visual feedback while icons are loading
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Types
|
|
7
|
+
export type {
|
|
8
|
+
PlaceholderPreset,
|
|
9
|
+
PlaceholderType,
|
|
10
|
+
PlaceholderConfig,
|
|
11
|
+
PlaceholderProps,
|
|
12
|
+
} from './types';
|
|
13
|
+
|
|
14
|
+
export { DEFAULT_PLACEHOLDER_CONFIG } from './types';
|
|
15
|
+
|
|
16
|
+
// Components
|
|
17
|
+
export { Skeleton } from './Skeleton';
|
|
18
|
+
export { Pulse } from './Pulse';
|
|
19
|
+
export { Shimmer } from './Shimmer';
|
|
20
|
+
export { PlaceholderFactory } from './PlaceholderFactory';
|
|
21
|
+
export type { PlaceholderFactoryProps } from './PlaceholderFactory';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Placeholder System Types
|
|
3
|
+
* Provides type definitions for icon loading placeholders
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Built-in placeholder animation types
|
|
10
|
+
* - skeleton: Static gray box (no animation)
|
|
11
|
+
* - pulse: Opacity fade animation
|
|
12
|
+
* - shimmer: Gradient sweep animation
|
|
13
|
+
*/
|
|
14
|
+
export type PlaceholderPreset = 'skeleton' | 'pulse' | 'shimmer';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Placeholder type - can be a preset string or custom ReactNode
|
|
18
|
+
*/
|
|
19
|
+
export type PlaceholderType = PlaceholderPreset | ReactNode;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Configuration for placeholder appearance
|
|
23
|
+
*/
|
|
24
|
+
export interface PlaceholderConfig {
|
|
25
|
+
/**
|
|
26
|
+
* Placeholder background color
|
|
27
|
+
* @default '#E1E1E1'
|
|
28
|
+
*/
|
|
29
|
+
color?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Secondary color for shimmer gradient
|
|
33
|
+
* @default '#F5F5F5'
|
|
34
|
+
*/
|
|
35
|
+
highlightColor?: string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Animation duration in milliseconds
|
|
39
|
+
* @default 1000
|
|
40
|
+
*/
|
|
41
|
+
duration?: number;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Border radius of the placeholder
|
|
45
|
+
* @default 4
|
|
46
|
+
*/
|
|
47
|
+
borderRadius?: number;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Props for placeholder components
|
|
52
|
+
*/
|
|
53
|
+
export interface PlaceholderProps extends PlaceholderConfig {
|
|
54
|
+
/**
|
|
55
|
+
* Width of the placeholder
|
|
56
|
+
*/
|
|
57
|
+
width: number;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Height of the placeholder
|
|
61
|
+
*/
|
|
62
|
+
height: number;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Test ID for testing
|
|
66
|
+
*/
|
|
67
|
+
testID?: string;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Default placeholder configuration values
|
|
72
|
+
*/
|
|
73
|
+
export const DEFAULT_PLACEHOLDER_CONFIG: Required<PlaceholderConfig> = {
|
|
74
|
+
color: '#E1E1E1',
|
|
75
|
+
highlightColor: '#F5F5F5',
|
|
76
|
+
duration: 1000,
|
|
77
|
+
borderRadius: 4,
|
|
78
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IconThemeProvider
|
|
3
|
+
* Provides global theme configuration for all icon components
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import React, { useState, useMemo, useCallback, memo } from 'react';
|
|
7
|
+
import { IconThemeContext, mergeWithDefaults } from './context';
|
|
8
|
+
import type { IconThemeProviderProps, IconTheme, IconThemeContextValue } from './types';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* IconThemeProvider
|
|
12
|
+
*
|
|
13
|
+
* Wraps your app to provide global icon theming.
|
|
14
|
+
* All descendant icon components will inherit these defaults.
|
|
15
|
+
*
|
|
16
|
+
* @example Basic usage
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { IconThemeProvider } from 'rn-iconify';
|
|
19
|
+
*
|
|
20
|
+
* export default function App() {
|
|
21
|
+
* return (
|
|
22
|
+
* <IconThemeProvider theme={{ size: 20, color: '#333' }}>
|
|
23
|
+
* <YourApp />
|
|
24
|
+
* </IconThemeProvider>
|
|
25
|
+
* );
|
|
26
|
+
* }
|
|
27
|
+
* ```
|
|
28
|
+
*
|
|
29
|
+
* @example With placeholder defaults
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <IconThemeProvider
|
|
32
|
+
* theme={{
|
|
33
|
+
* size: 24,
|
|
34
|
+
* color: '#1a1a1a',
|
|
35
|
+
* placeholder: 'shimmer',
|
|
36
|
+
* placeholderColor: '#f0f0f0',
|
|
37
|
+
* }}
|
|
38
|
+
* >
|
|
39
|
+
* <YourApp />
|
|
40
|
+
* </IconThemeProvider>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example Dynamic theme switching
|
|
44
|
+
* ```tsx
|
|
45
|
+
* function App() {
|
|
46
|
+
* const [isDark, setIsDark] = useState(false);
|
|
47
|
+
*
|
|
48
|
+
* return (
|
|
49
|
+
* <IconThemeProvider
|
|
50
|
+
* theme={{
|
|
51
|
+
* color: isDark ? '#ffffff' : '#000000',
|
|
52
|
+
* placeholderColor: isDark ? '#333333' : '#e1e1e1',
|
|
53
|
+
* }}
|
|
54
|
+
* >
|
|
55
|
+
* <YourApp />
|
|
56
|
+
* </IconThemeProvider>
|
|
57
|
+
* );
|
|
58
|
+
* }
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
function IconThemeProviderComponent({
|
|
62
|
+
theme: initialTheme,
|
|
63
|
+
children,
|
|
64
|
+
}: IconThemeProviderProps): React.ReactElement {
|
|
65
|
+
const [theme, setThemeState] = useState<IconTheme>(() => mergeWithDefaults(initialTheme));
|
|
66
|
+
|
|
67
|
+
// Memoized setTheme that supports both direct value and updater function
|
|
68
|
+
const setTheme = useCallback((newTheme: IconTheme | ((prev: IconTheme) => IconTheme)) => {
|
|
69
|
+
setThemeState((prevTheme) => {
|
|
70
|
+
const nextTheme = typeof newTheme === 'function' ? newTheme(prevTheme) : newTheme;
|
|
71
|
+
return mergeWithDefaults(nextTheme);
|
|
72
|
+
});
|
|
73
|
+
}, []);
|
|
74
|
+
|
|
75
|
+
// Update internal state when prop changes
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
setThemeState(mergeWithDefaults(initialTheme));
|
|
78
|
+
}, [initialTheme]);
|
|
79
|
+
|
|
80
|
+
// Memoize context value to prevent unnecessary re-renders
|
|
81
|
+
const contextValue = useMemo<IconThemeContextValue>(
|
|
82
|
+
() => ({
|
|
83
|
+
theme,
|
|
84
|
+
setTheme,
|
|
85
|
+
}),
|
|
86
|
+
[theme, setTheme]
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
return <IconThemeContext.Provider value={contextValue}>{children}</IconThemeContext.Provider>;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
IconThemeProviderComponent.displayName = 'IconThemeProvider';
|
|
93
|
+
|
|
94
|
+
export const IconThemeProvider = memo(IconThemeProviderComponent);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IconThemeContext
|
|
3
|
+
* React Context for icon theming
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { createContext } from 'react';
|
|
7
|
+
import type { IconThemeContextValue, IconTheme } from './types';
|
|
8
|
+
import { DEFAULT_ICON_THEME } from './types';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Default context value when no provider is present
|
|
12
|
+
* setTheme is a no-op by default
|
|
13
|
+
*/
|
|
14
|
+
const defaultContextValue: IconThemeContextValue = {
|
|
15
|
+
theme: DEFAULT_ICON_THEME,
|
|
16
|
+
setTheme: () => {
|
|
17
|
+
if (__DEV__) {
|
|
18
|
+
console.warn(
|
|
19
|
+
'[rn-iconify] setTheme called without IconThemeProvider. ' +
|
|
20
|
+
'Wrap your app with <IconThemeProvider> to enable theme updates.'
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* IconThemeContext
|
|
28
|
+
*
|
|
29
|
+
* Provides icon theme configuration to all descendant icon components.
|
|
30
|
+
* Use with IconThemeProvider for proper functionality.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```tsx
|
|
34
|
+
* // Access theme directly (prefer useIconTheme hook instead)
|
|
35
|
+
* const { theme, setTheme } = useContext(IconThemeContext);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
export const IconThemeContext = createContext<IconThemeContextValue>(defaultContextValue);
|
|
39
|
+
|
|
40
|
+
IconThemeContext.displayName = 'IconThemeContext';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Helper to merge theme with defaults
|
|
44
|
+
* Ensures all required properties have values
|
|
45
|
+
*/
|
|
46
|
+
export function mergeWithDefaults(theme: IconTheme): IconTheme {
|
|
47
|
+
return {
|
|
48
|
+
...DEFAULT_ICON_THEME,
|
|
49
|
+
...theme,
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme System
|
|
3
|
+
* Global icon theming and configuration
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Components
|
|
7
|
+
export { IconThemeProvider } from './IconThemeProvider';
|
|
8
|
+
|
|
9
|
+
// Context
|
|
10
|
+
export { IconThemeContext, mergeWithDefaults } from './context';
|
|
11
|
+
|
|
12
|
+
// Hooks
|
|
13
|
+
export { useIconTheme, useIconThemeValue, useMergedIconProps } from './useIconTheme';
|
|
14
|
+
|
|
15
|
+
// Types
|
|
16
|
+
export type { IconTheme, IconThemeProviderProps, IconThemeContextValue } from './types';
|
|
17
|
+
|
|
18
|
+
// Constants
|
|
19
|
+
export { DEFAULT_ICON_THEME } from './types';
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme System Types
|
|
3
|
+
* Defines types for global icon theming and configuration
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
7
|
+
import type { PlaceholderType } from '../placeholder/types';
|
|
8
|
+
import type { IconRotation, IconFlip } from '../types';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Icon theme configuration
|
|
12
|
+
* All properties are optional - components will use their own defaults if not provided
|
|
13
|
+
*/
|
|
14
|
+
export interface IconTheme {
|
|
15
|
+
/**
|
|
16
|
+
* Default icon size (width and height)
|
|
17
|
+
* @default 24
|
|
18
|
+
*/
|
|
19
|
+
size?: number;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Default icon color
|
|
23
|
+
* @default '#000000'
|
|
24
|
+
*/
|
|
25
|
+
color?: string;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Default placeholder type shown while icons load
|
|
29
|
+
* @example 'shimmer'
|
|
30
|
+
*/
|
|
31
|
+
placeholder?: PlaceholderType;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Default placeholder background color
|
|
35
|
+
* @default '#E1E1E1'
|
|
36
|
+
*/
|
|
37
|
+
placeholderColor?: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Default placeholder animation duration in milliseconds
|
|
41
|
+
* @default 1000
|
|
42
|
+
*/
|
|
43
|
+
placeholderDuration?: number;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Default rotation for all icons
|
|
47
|
+
* @default 0
|
|
48
|
+
*/
|
|
49
|
+
rotate?: IconRotation;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Default flip direction for all icons
|
|
53
|
+
*/
|
|
54
|
+
flip?: IconFlip;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Default fallback delay in milliseconds
|
|
58
|
+
* @default 0
|
|
59
|
+
*/
|
|
60
|
+
fallbackDelay?: number;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Props for IconThemeProvider component
|
|
65
|
+
*/
|
|
66
|
+
export interface IconThemeProviderProps {
|
|
67
|
+
/**
|
|
68
|
+
* Theme configuration
|
|
69
|
+
*/
|
|
70
|
+
theme: IconTheme;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* Child components that will receive the theme
|
|
74
|
+
*/
|
|
75
|
+
children: ReactNode;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Context value for icon theme
|
|
80
|
+
*/
|
|
81
|
+
export interface IconThemeContextValue {
|
|
82
|
+
/**
|
|
83
|
+
* Current theme configuration
|
|
84
|
+
*/
|
|
85
|
+
theme: IconTheme;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Update theme dynamically
|
|
89
|
+
* Useful for theme switching (e.g., dark mode)
|
|
90
|
+
*/
|
|
91
|
+
setTheme: (theme: IconTheme | ((prev: IconTheme) => IconTheme)) => void;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Default theme values
|
|
96
|
+
* Used when no theme is provided or for missing properties
|
|
97
|
+
*/
|
|
98
|
+
export const DEFAULT_ICON_THEME: Required<Omit<IconTheme, 'placeholder' | 'flip'>> &
|
|
99
|
+
Pick<IconTheme, 'placeholder' | 'flip'> = {
|
|
100
|
+
size: 24,
|
|
101
|
+
color: '#000000',
|
|
102
|
+
placeholder: undefined,
|
|
103
|
+
placeholderColor: '#E1E1E1',
|
|
104
|
+
placeholderDuration: 1000,
|
|
105
|
+
rotate: 0,
|
|
106
|
+
flip: undefined,
|
|
107
|
+
fallbackDelay: 0,
|
|
108
|
+
};
|