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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","
|
|
1
|
+
{"version":3,"names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_placeholder","_theme","_alias","_createIconSet","_animated","_navigation","_CacheManager","_config","_IconifyAPI","_native","_bundle","_performance","_accessibility","_explorer","prefetchIcons","iconNames","CacheManager","prefetch","fetchIcon","clearCache","clear","clearNative","getCacheStats","getStats"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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BA;;AAgCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAe2B,aAAaA,CACjCC,SAAmB,EAC+B;EAClD,OAAOC,0BAAY,CAACC,QAAQ,CAACF,SAAS,EAAEG,qBAAS,CAAC;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeC,UAAUA,CAAA,EAAkB;EAChDH,0BAAY,CAACI,KAAK,CAAC,CAAC;EACpB,MAAMJ,0BAAY,CAACK,WAAW,CAAC,CAAC;AAClC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,aAAaA,CAAA,EAK3B;EACA,OAAON,0BAAY,CAACO,QAAQ,CAAC,CAAC;AAChC","ignoreList":[]}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createDrawerIcon = createDrawerIcon;
|
|
7
|
+
exports.createDrawerIcons = createDrawerIcons;
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _alias = require("../alias");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* createDrawerIcon - Helper for React Navigation drawer icons
|
|
14
|
+
* Creates a drawerIcon function for drawer navigation items
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
// IconSpec is just a type alias for string (icon name)
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Normalize config to full DrawerIconConfig
|
|
21
|
+
*/
|
|
22
|
+
function normalizeConfig(config) {
|
|
23
|
+
if (typeof config === 'string') {
|
|
24
|
+
return {
|
|
25
|
+
icon: config
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return config;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Create a drawer icon function for React Navigation
|
|
33
|
+
*
|
|
34
|
+
* @example Simple usage
|
|
35
|
+
* ```tsx
|
|
36
|
+
* import { createDrawerIcon } from 'rn-iconify/navigation';
|
|
37
|
+
*
|
|
38
|
+
* <Drawer.Screen
|
|
39
|
+
* name="Home"
|
|
40
|
+
* component={HomeScreen}
|
|
41
|
+
* options={{
|
|
42
|
+
* drawerIcon: createDrawerIcon('mdi:home'),
|
|
43
|
+
* }}
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* @example Different icons for focused/unfocused
|
|
48
|
+
* ```tsx
|
|
49
|
+
* <Drawer.Screen
|
|
50
|
+
* options={{
|
|
51
|
+
* drawerIcon: createDrawerIcon({
|
|
52
|
+
* icon: 'mdi:home-outline',
|
|
53
|
+
* focusedIcon: 'mdi:home',
|
|
54
|
+
* }),
|
|
55
|
+
* }}
|
|
56
|
+
* />
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @example With custom size
|
|
60
|
+
* ```tsx
|
|
61
|
+
* <Drawer.Screen
|
|
62
|
+
* options={{
|
|
63
|
+
* drawerIcon: createDrawerIcon({
|
|
64
|
+
* icon: 'mdi:settings',
|
|
65
|
+
* size: 28,
|
|
66
|
+
* }),
|
|
67
|
+
* }}
|
|
68
|
+
* />
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
function createDrawerIcon(config) {
|
|
72
|
+
const normalizedConfig = normalizeConfig(config);
|
|
73
|
+
return function DrawerIcon({
|
|
74
|
+
focused,
|
|
75
|
+
color,
|
|
76
|
+
size
|
|
77
|
+
}) {
|
|
78
|
+
const {
|
|
79
|
+
icon,
|
|
80
|
+
focusedIcon,
|
|
81
|
+
size: customSize,
|
|
82
|
+
style
|
|
83
|
+
} = normalizedConfig;
|
|
84
|
+
|
|
85
|
+
// Determine which icon to show
|
|
86
|
+
const iconName = focused && focusedIcon ? focusedIcon : icon;
|
|
87
|
+
|
|
88
|
+
// Determine size
|
|
89
|
+
const iconSize = customSize ?? size;
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_alias.Icon, {
|
|
91
|
+
name: iconName,
|
|
92
|
+
size: iconSize,
|
|
93
|
+
color: color,
|
|
94
|
+
style: style
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Create multiple drawer icons at once
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```tsx
|
|
104
|
+
* import { createDrawerIcons } from 'rn-iconify/navigation';
|
|
105
|
+
*
|
|
106
|
+
* const drawerIcons = createDrawerIcons({
|
|
107
|
+
* Home: 'mdi:home',
|
|
108
|
+
* Profile: 'mdi:account',
|
|
109
|
+
* Settings: {
|
|
110
|
+
* icon: 'mdi:cog-outline',
|
|
111
|
+
* focusedIcon: 'mdi:cog',
|
|
112
|
+
* },
|
|
113
|
+
* });
|
|
114
|
+
*
|
|
115
|
+
* <Drawer.Screen
|
|
116
|
+
* name="Home"
|
|
117
|
+
* options={{ drawerIcon: drawerIcons.Home }}
|
|
118
|
+
* />
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
function createDrawerIcons(configs) {
|
|
122
|
+
const result = {};
|
|
123
|
+
for (const [key, config] of Object.entries(configs)) {
|
|
124
|
+
result[key] = createDrawerIcon(config);
|
|
125
|
+
}
|
|
126
|
+
return result;
|
|
127
|
+
}
|
|
128
|
+
var _default = exports.default = createDrawerIcon;
|
|
129
|
+
//# sourceMappingURL=createDrawerIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_alias","e","__esModule","default","normalizeConfig","config","icon","createDrawerIcon","normalizedConfig","DrawerIcon","focused","color","size","focusedIcon","customSize","style","iconName","iconSize","createElement","Icon","name","createDrawerIcons","configs","result","key","Object","entries","_default","exports"],"sourceRoot":"../../../src","s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AC7E,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASM,iBAAiBA,CAC/BC,OAAU,EAC8B;EACxC,MAAMC,MAAM,GAAG,CAAC,CAA2C;EAE3D,KAAK,MAAM,CAACC,GAAG,EAAEnB,MAAM,CAAC,IAAIoB,MAAM,CAACC,OAAO,CAACJ,OAAO,CAAC,EAAE;IACnDC,MAAM,CAACC,GAAG,CAAY,GAAGjB,gBAAgB,CAACF,MAAM,CAAC;EACnD;EAEA,OAAOkB,MAAM;AACf;AAAC,IAAAI,QAAA,GAAAC,OAAA,CAAAzB,OAAA,GAEcI,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createBackIcon = createBackIcon;
|
|
7
|
+
exports.createCloseIcon = createCloseIcon;
|
|
8
|
+
exports.createHeaderIcon = createHeaderIcon;
|
|
9
|
+
exports.createMenuIcon = createMenuIcon;
|
|
10
|
+
exports.default = void 0;
|
|
11
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
|
+
var _reactNative = require("react-native");
|
|
13
|
+
var _alias = require("../alias");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
/**
|
|
16
|
+
* createHeaderIcon - Helper for React Navigation header icons
|
|
17
|
+
* Creates header icons for headerLeft, headerRight, etc.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Configuration for header icon
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Create a header icon component for React Navigation
|
|
26
|
+
*
|
|
27
|
+
* @example headerRight with back action
|
|
28
|
+
* ```tsx
|
|
29
|
+
* import { createHeaderIcon } from 'rn-iconify/navigation';
|
|
30
|
+
*
|
|
31
|
+
* <Stack.Screen
|
|
32
|
+
* name="Details"
|
|
33
|
+
* options={({ navigation }) => ({
|
|
34
|
+
* headerRight: createHeaderIcon({
|
|
35
|
+
* icon: 'mdi:close',
|
|
36
|
+
* onPress: () => navigation.goBack(),
|
|
37
|
+
* }),
|
|
38
|
+
* })}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @example headerLeft with menu
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <Stack.Screen
|
|
45
|
+
* options={({ navigation }) => ({
|
|
46
|
+
* headerLeft: createHeaderIcon({
|
|
47
|
+
* icon: 'mdi:menu',
|
|
48
|
+
* onPress: () => navigation.openDrawer(),
|
|
49
|
+
* accessibilityLabel: 'Open menu',
|
|
50
|
+
* }),
|
|
51
|
+
* })}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example Custom styling
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <Stack.Screen
|
|
58
|
+
* options={{
|
|
59
|
+
* headerRight: createHeaderIcon({
|
|
60
|
+
* icon: 'mdi:dots-vertical',
|
|
61
|
+
* size: 28,
|
|
62
|
+
* color: '#007AFF',
|
|
63
|
+
* style: { marginRight: 8 },
|
|
64
|
+
* }),
|
|
65
|
+
* }}
|
|
66
|
+
* />
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
function createHeaderIcon(config) {
|
|
70
|
+
const {
|
|
71
|
+
icon,
|
|
72
|
+
size = 24,
|
|
73
|
+
color,
|
|
74
|
+
onPress,
|
|
75
|
+
style,
|
|
76
|
+
accessibilityLabel,
|
|
77
|
+
hitSlop = {
|
|
78
|
+
top: 10,
|
|
79
|
+
bottom: 10,
|
|
80
|
+
left: 10,
|
|
81
|
+
right: 10
|
|
82
|
+
}
|
|
83
|
+
} = config;
|
|
84
|
+
return function HeaderIcon(props) {
|
|
85
|
+
const iconColor = color ?? props.tintColor ?? '#000000';
|
|
86
|
+
const iconElement = /*#__PURE__*/_react.default.createElement(_alias.Icon, {
|
|
87
|
+
name: icon,
|
|
88
|
+
size: size,
|
|
89
|
+
color: iconColor,
|
|
90
|
+
accessibilityLabel: accessibilityLabel
|
|
91
|
+
});
|
|
92
|
+
if (onPress) {
|
|
93
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.TouchableOpacity, {
|
|
94
|
+
onPress: onPress,
|
|
95
|
+
style: [styles.container, style, {
|
|
96
|
+
padding: 8
|
|
97
|
+
}],
|
|
98
|
+
hitSlop: hitSlop,
|
|
99
|
+
accessibilityRole: "button",
|
|
100
|
+
accessibilityLabel: accessibilityLabel,
|
|
101
|
+
activeOpacity: props.pressOpacity ?? 0.7
|
|
102
|
+
}, iconElement);
|
|
103
|
+
}
|
|
104
|
+
return iconElement;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Create a back button icon for navigation headers
|
|
110
|
+
*
|
|
111
|
+
* @example
|
|
112
|
+
* ```tsx
|
|
113
|
+
* import { createBackIcon } from 'rn-iconify/navigation';
|
|
114
|
+
*
|
|
115
|
+
* <Stack.Screen
|
|
116
|
+
* options={({ navigation }) => ({
|
|
117
|
+
* headerLeft: createBackIcon({
|
|
118
|
+
* onPress: () => navigation.goBack(),
|
|
119
|
+
* }),
|
|
120
|
+
* })}
|
|
121
|
+
* />
|
|
122
|
+
* ```
|
|
123
|
+
*/
|
|
124
|
+
function createBackIcon(options = {}) {
|
|
125
|
+
return createHeaderIcon({
|
|
126
|
+
icon: 'mdi:arrow-left',
|
|
127
|
+
accessibilityLabel: 'Go back',
|
|
128
|
+
...options
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Create a close button icon for modal screens
|
|
134
|
+
*
|
|
135
|
+
* @example
|
|
136
|
+
* ```tsx
|
|
137
|
+
* import { createCloseIcon } from 'rn-iconify/navigation';
|
|
138
|
+
*
|
|
139
|
+
* <Stack.Screen
|
|
140
|
+
* options={({ navigation }) => ({
|
|
141
|
+
* headerRight: createCloseIcon({
|
|
142
|
+
* onPress: () => navigation.goBack(),
|
|
143
|
+
* }),
|
|
144
|
+
* })}
|
|
145
|
+
* />
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
function createCloseIcon(options = {}) {
|
|
149
|
+
return createHeaderIcon({
|
|
150
|
+
icon: 'mdi:close',
|
|
151
|
+
accessibilityLabel: 'Close',
|
|
152
|
+
...options
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Create a menu button icon for opening drawers
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* ```tsx
|
|
161
|
+
* import { createMenuIcon } from 'rn-iconify/navigation';
|
|
162
|
+
*
|
|
163
|
+
* <Stack.Screen
|
|
164
|
+
* options={({ navigation }) => ({
|
|
165
|
+
* headerLeft: createMenuIcon({
|
|
166
|
+
* onPress: () => navigation.openDrawer(),
|
|
167
|
+
* }),
|
|
168
|
+
* })}
|
|
169
|
+
* />
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
function createMenuIcon(options = {}) {
|
|
173
|
+
return createHeaderIcon({
|
|
174
|
+
icon: 'mdi:menu',
|
|
175
|
+
accessibilityLabel: 'Open menu',
|
|
176
|
+
...options
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
const styles = _reactNative.StyleSheet.create({
|
|
180
|
+
container: {
|
|
181
|
+
padding: 8
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
var _default = exports.default = createHeaderIcon;
|
|
185
|
+
//# sourceMappingURL=createHeaderIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_alias","e","__esModule","default","createHeaderIcon","config","icon","size","color","onPress","style","accessibilityLabel","hitSlop","top","bottom","left","right","HeaderIcon","props","iconColor","tintColor","iconElement","createElement","Icon","name","TouchableOpacity","styles","container","padding","accessibilityRole","activeOpacity","pressOpacity","createBackIcon","options","createCloseIcon","createMenuIcon","StyleSheet","create","_default","exports"],"sourceRoot":"../../../src","sources":["navigation/createHeaderIcon.tsx"],"mappings":";;;;;;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAAgC,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAPhC;AACA;AACA;AACA;;AAQA;AACA;AACA;;AAuCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,gBAAgBA,CAACC,MAAwB,EAAE;EACzD,MAAM;IACJC,IAAI;IACJC,IAAI,GAAG,EAAE;IACTC,KAAK;IACLC,OAAO;IACPC,KAAK;IACLC,kBAAkB;IAClBC,OAAO,GAAG;MAAEC,GAAG,EAAE,EAAE;MAAEC,MAAM,EAAE,EAAE;MAAEC,IAAI,EAAE,EAAE;MAAEC,KAAK,EAAE;IAAG;EACvD,CAAC,GAAGX,MAAM;EAEV,OAAO,SAASY,UAAUA,CAACC,KAAsB,EAAE;IACjD,MAAMC,SAAS,GAAGX,KAAK,IAAIU,KAAK,CAACE,SAAS,IAAI,SAAS;IAEvD,MAAMC,WAAW,gBACfzB,MAAA,CAAAO,OAAA,CAAAmB,aAAA,CAACtB,MAAA,CAAAuB,IAAI;MAACC,IAAI,EAAElB,IAAK;MAACC,IAAI,EAAEA,IAAK;MAACC,KAA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/B,GAAGsB;EACL,CAAC,CAAC;AACJ;AAEA,MAAMP,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAAC,IAAAU,QAAA,GAAAC,OAAA,CAAApC,OAAA,GAEYC,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createTabBarIcon = createTabBarIcon;
|
|
7
|
+
exports.createTabBarIcons = createTabBarIcons;
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
exports.tabIcon = tabIcon;
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _alias = require("../alias");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
/**
|
|
14
|
+
* createTabBarIcon - Helper for React Navigation tab bar icons
|
|
15
|
+
* Creates a tabBarIcon function that handles focused/unfocused states
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Normalize config to full TabBarIconConfig
|
|
20
|
+
*/
|
|
21
|
+
function normalizeConfig(config) {
|
|
22
|
+
// String: same icon for both states
|
|
23
|
+
if (typeof config === 'string') {
|
|
24
|
+
return {
|
|
25
|
+
focused: config
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Array: [focused, unfocused]
|
|
30
|
+
if (Array.isArray(config)) {
|
|
31
|
+
return {
|
|
32
|
+
focused: config[0],
|
|
33
|
+
unfocused: config[1]
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Full config object
|
|
38
|
+
return config;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Create a tab bar icon function for React Navigation
|
|
43
|
+
*
|
|
44
|
+
* @example Simple usage (same icon for both states)
|
|
45
|
+
* ```tsx
|
|
46
|
+
* import { createTabBarIcon } from 'rn-iconify/navigation';
|
|
47
|
+
*
|
|
48
|
+
* <Tab.Screen
|
|
49
|
+
* name="Home"
|
|
50
|
+
* component={HomeScreen}
|
|
51
|
+
* options={{
|
|
52
|
+
* tabBarIcon: createTabBarIcon('mdi:home'),
|
|
53
|
+
* }}
|
|
54
|
+
* />
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* @example Different icons for focused/unfocused
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <Tab.Screen
|
|
60
|
+
* options={{
|
|
61
|
+
* tabBarIcon: createTabBarIcon(['mdi:home', 'mdi:home-outline']),
|
|
62
|
+
* }}
|
|
63
|
+
* />
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @example With full configuration
|
|
67
|
+
* ```tsx
|
|
68
|
+
* <Tab.Screen
|
|
69
|
+
* options={{
|
|
70
|
+
* tabBarIcon: createTabBarIcon({
|
|
71
|
+
* focused: 'mdi:home',
|
|
72
|
+
* unfocused: 'mdi:home-outline',
|
|
73
|
+
* size: 28,
|
|
74
|
+
* focusedColor: '#007AFF',
|
|
75
|
+
* }),
|
|
76
|
+
* }}
|
|
77
|
+
* />
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @example With aliases (requires IconAliasProvider)
|
|
81
|
+
* ```tsx
|
|
82
|
+
* <Tab.Screen
|
|
83
|
+
* options={{
|
|
84
|
+
* tabBarIcon: createTabBarIcon(['home', 'home-outline']),
|
|
85
|
+
* }}
|
|
86
|
+
* />
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
function createTabBarIcon(config) {
|
|
90
|
+
const normalizedConfig = normalizeConfig(config);
|
|
91
|
+
return function TabBarIcon({
|
|
92
|
+
focused,
|
|
93
|
+
color,
|
|
94
|
+
size
|
|
95
|
+
}) {
|
|
96
|
+
const {
|
|
97
|
+
focused: focusedIcon,
|
|
98
|
+
unfocused: unfocusedIcon,
|
|
99
|
+
size: customSize,
|
|
100
|
+
focusedColor,
|
|
101
|
+
unfocusedColor,
|
|
102
|
+
style,
|
|
103
|
+
accessibilityLabel
|
|
104
|
+
} = normalizedConfig;
|
|
105
|
+
|
|
106
|
+
// Determine which icon to show
|
|
107
|
+
const iconName = focused ? focusedIcon : unfocusedIcon ?? focusedIcon;
|
|
108
|
+
|
|
109
|
+
// Determine color
|
|
110
|
+
const iconColor = focused ? focusedColor ?? color : unfocusedColor ?? color;
|
|
111
|
+
|
|
112
|
+
// Determine size
|
|
113
|
+
const iconSize = customSize ?? size;
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_alias.Icon, {
|
|
115
|
+
name: iconName,
|
|
116
|
+
size: iconSize,
|
|
117
|
+
color: iconColor,
|
|
118
|
+
style: style,
|
|
119
|
+
accessibilityLabel: accessibilityLabel
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Create multiple tab bar icons at once
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* import { createTabBarIcons } from 'rn-iconify/navigation';
|
|
130
|
+
*
|
|
131
|
+
* const tabIcons = createTabBarIcons({
|
|
132
|
+
* Home: ['mdi:home', 'mdi:home-outline'],
|
|
133
|
+
* Search: 'mdi:magnify',
|
|
134
|
+
* Profile: ['mdi:account', 'mdi:account-outline'],
|
|
135
|
+
* Settings: {
|
|
136
|
+
* focused: 'mdi:cog',
|
|
137
|
+
* unfocused: 'mdi:cog-outline',
|
|
138
|
+
* size: 26,
|
|
139
|
+
* },
|
|
140
|
+
* });
|
|
141
|
+
*
|
|
142
|
+
* <Tab.Screen
|
|
143
|
+
* name="Home"
|
|
144
|
+
* options={{ tabBarIcon: tabIcons.Home }}
|
|
145
|
+
* />
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
function createTabBarIcons(configs) {
|
|
149
|
+
const result = {};
|
|
150
|
+
for (const [key, config] of Object.entries(configs)) {
|
|
151
|
+
result[key] = createTabBarIcon(config);
|
|
152
|
+
}
|
|
153
|
+
return result;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Quick helper for common tab patterns
|
|
158
|
+
* Uses filled/outline icon variants automatically
|
|
159
|
+
*
|
|
160
|
+
* @example
|
|
161
|
+
* ```tsx
|
|
162
|
+
* import { tabIcon } from 'rn-iconify/navigation';
|
|
163
|
+
*
|
|
164
|
+
* <Tab.Screen
|
|
165
|
+
* options={{
|
|
166
|
+
* tabBarIcon: tabIcon('mdi', 'home'), // mdi:home / mdi:home-outline
|
|
167
|
+
* }}
|
|
168
|
+
* />
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
function tabIcon(prefix, name, outlineSuffix = '-outline') {
|
|
172
|
+
return createTabBarIcon({
|
|
173
|
+
focused: `${prefix}:${name}`,
|
|
174
|
+
unfocused: `${prefix}:${name}${outlineSuffix}`
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
var _default = exports.default = createTabBarIcon;
|
|
178
|
+
//# sourceMappingURL=createTabBarIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_alias","e","__esModule","default","normalizeConfig","config","focused","Array","isArray","unfocused","createTabBarIcon","normalizedConfig","TabBarIcon","color","size","focusedIcon","unfocusedIcon","customSize","focusedColor","unfocusedColor","style","accessibilityLabel","iconName","iconColor","iconSize","createElement","Icon","name","createTabBarIcons","configs","result","key","Object","entries","tabIcon","prefix","outlineSuffix","_default","exports"],"sourceRoot":"../../../src","sources":["navigation/createTabBarIcon.tsx"],"mappings":";;;;;;;;;AAKA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAgC,SAAAD,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA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H,IAAI;IAEnC,oBACEjB,MAAA,CAAAM,OAAA,CAAAsB,aAAA,CAACzB,MAAA,CAAA0B,IAAI;MACHC,IAAI,EAAEL,QAAS;MACfR,IAAI,EAAEU,QAAS;MACfX,KAAK,EAAEU,SAAU;MACjBH,KAAK,EAAEA,KAAM;MACbC,kBAAkB,EAAEA;IAAmB,CACxC,CAAC;EAEN,CAAC;AACH;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASO,iBAAiBA,CAE/BC,OAAU,EAA0C;EACpD,MAAMC,MAAM,GAAG,CAAC,CAA2C;EAE3D,KAAK,MAAM,CAACC,GAAG,EAAE1B,MAAM,CAAC,IAAI2B,MAAM,CAACC,OAAO,CAACJ,OAAO,CAAC,EAAE;IACnDC,MAAM,CAACC,GAAG,CAAY,GAAGrB,gBAAgB,CAACL,MAAM,CAAC;EACnD;EAEA,OAAOyB,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,OAAOA,CACrBC,MAAc,EACdR,IAAY,EACZS,aAAa,GAAG,UAAU,EACN;EACpB,OAAO1B,gBAAgB,CAAC;IACtBJ,OAAO,EAAE,GAAG6B,MAAM,IAAIR,IAAI,EAAE;IAC5BlB,SAAS,EAAE,GAAG0B,MAAM,IAAIR,IAAI,GAAGS,aAAa;EAC9C,CAAC,CAAC;AACJ;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnC,OAAA,GAEcO,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "DEFAULT_NAVIGATION_PRESETS", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _types.DEFAULT_NAVIGATION_PRESETS;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createBackIcon", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _createHeaderIcon.createBackIcon;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "createCloseIcon", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _createHeaderIcon.createCloseIcon;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "createDrawerIcon", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _createDrawerIcon.createDrawerIcon;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "createDrawerIcons", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _createDrawerIcon.createDrawerIcons;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "createHeaderIcon", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _createHeaderIcon.createHeaderIcon;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "createMenuIcon", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _createHeaderIcon.createMenuIcon;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "createTabBarIcon", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _createTabBarIcon.createTabBarIcon;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "createTabBarIcons", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _createTabBarIcon.createTabBarIcons;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "default", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _createTabBarIcon.createTabBarIcon;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "tabIcon", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _createTabBarIcon.tabIcon;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "useNavigationIcon", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _useNavigationIcon.useNavigationIcon;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var _types = require("./types");
|
|
79
|
+
var _createTabBarIcon = require("./createTabBarIcon");
|
|
80
|
+
var _createDrawerIcon = require("./createDrawerIcon");
|
|
81
|
+
var _createHeaderIcon = require("./createHeaderIcon");
|
|
82
|
+
var _useNavigationIcon = require("./useNavigationIcon");
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_types","require","_createTabBarIcon","_createDrawerIcon","_createHeaderIcon","_useNavigationIcon"],"sourceRoot":"../../../src","sources":["navigation/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyDA,IAAAA,MAAA,GAAAC,OAAA;AAGA,IAAAC,iBAAA,GAAAD,OAAA;AAGA,IAAAE,iBAAA,GAAAF,OAAA;AAGA,IAAAG,iBAAA,GAAAH,OAAA;AASA,IAAAI,kBAAA,GAAAJ,OAAA","ignoreList":[]}
|