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,189 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AccessibilityContext = void 0;
|
|
7
|
+
exports.AccessibilityProvider = AccessibilityProvider;
|
|
8
|
+
exports.default = exports.DEFAULT_ACCESSIBILITY_CONFIG = void 0;
|
|
9
|
+
exports.useAccessibility = useAccessibility;
|
|
10
|
+
exports.useAccessibilityContext = useAccessibilityContext;
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _reactNative = require("react-native");
|
|
13
|
+
var _utils = require("./utils");
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
+
/**
|
|
16
|
+
* Accessibility Provider for rn-iconify
|
|
17
|
+
* Provides accessibility context to all icon components
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Default accessibility configuration
|
|
22
|
+
*/
|
|
23
|
+
const DEFAULT_ACCESSIBILITY_CONFIG = exports.DEFAULT_ACCESSIBILITY_CONFIG = {
|
|
24
|
+
autoLabels: true,
|
|
25
|
+
labelGenerator: _utils.defaultLabelGenerator,
|
|
26
|
+
highContrast: false,
|
|
27
|
+
respectReducedMotion: true,
|
|
28
|
+
defaultRole: 'image',
|
|
29
|
+
showFocusIndicators: true,
|
|
30
|
+
minTouchTargetSize: 44
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Accessibility context
|
|
35
|
+
*/
|
|
36
|
+
const AccessibilityContext = exports.AccessibilityContext = /*#__PURE__*/(0, _react.createContext)(null);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Props for AccessibilityProvider
|
|
40
|
+
*/
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Accessibility Provider Component
|
|
44
|
+
* Wraps your app to provide accessibility features to all icons
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* import { AccessibilityProvider } from 'rn-iconify';
|
|
49
|
+
*
|
|
50
|
+
* function App() {
|
|
51
|
+
* return (
|
|
52
|
+
* <AccessibilityProvider config={{ autoLabels: true }}>
|
|
53
|
+
* <MyApp />
|
|
54
|
+
* </AccessibilityProvider>
|
|
55
|
+
* );
|
|
56
|
+
* }
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
function AccessibilityProvider({
|
|
60
|
+
config: initialConfig,
|
|
61
|
+
children
|
|
62
|
+
}) {
|
|
63
|
+
// Resolved configuration state
|
|
64
|
+
const [config, setConfigState] = (0, _react.useState)(() => ({
|
|
65
|
+
...DEFAULT_ACCESSIBILITY_CONFIG,
|
|
66
|
+
...initialConfig,
|
|
67
|
+
labelGenerator: initialConfig?.labelGenerator ?? DEFAULT_ACCESSIBILITY_CONFIG.labelGenerator
|
|
68
|
+
}));
|
|
69
|
+
|
|
70
|
+
// System preferences
|
|
71
|
+
const [prefersReducedMotion, setPrefersReducedMotion] = (0, _react.useState)(false);
|
|
72
|
+
const [isHighContrast, setIsHighContrast] = (0, _react.useState)(false);
|
|
73
|
+
|
|
74
|
+
// Listen for reduced motion preference
|
|
75
|
+
(0, _react.useEffect)(() => {
|
|
76
|
+
const checkReducedMotion = async () => {
|
|
77
|
+
try {
|
|
78
|
+
const isReducedMotion = await _reactNative.AccessibilityInfo.isReduceMotionEnabled();
|
|
79
|
+
setPrefersReducedMotion(isReducedMotion);
|
|
80
|
+
} catch {
|
|
81
|
+
// Ignore errors on unsupported platforms
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
checkReducedMotion();
|
|
85
|
+
const subscription = _reactNative.AccessibilityInfo.addEventListener('reduceMotionChanged', setPrefersReducedMotion);
|
|
86
|
+
return () => {
|
|
87
|
+
subscription?.remove();
|
|
88
|
+
};
|
|
89
|
+
}, []);
|
|
90
|
+
|
|
91
|
+
// Listen for high contrast preference (iOS only, via bold text as proxy)
|
|
92
|
+
(0, _react.useEffect)(() => {
|
|
93
|
+
const checkHighContrast = async () => {
|
|
94
|
+
try {
|
|
95
|
+
// Use bold text as a proxy for high contrast preference
|
|
96
|
+
const isBoldText = await _reactNative.AccessibilityInfo.isBoldTextEnabled();
|
|
97
|
+
setIsHighContrast(isBoldText);
|
|
98
|
+
} catch {
|
|
99
|
+
// Ignore errors on unsupported platforms
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
checkHighContrast();
|
|
103
|
+
const subscription = _reactNative.AccessibilityInfo.addEventListener('boldTextChanged', setIsHighContrast);
|
|
104
|
+
return () => {
|
|
105
|
+
subscription?.remove();
|
|
106
|
+
};
|
|
107
|
+
}, []);
|
|
108
|
+
|
|
109
|
+
// Update config handler
|
|
110
|
+
const setConfig = (0, _react.useCallback)(newConfig => {
|
|
111
|
+
setConfigState(prev => ({
|
|
112
|
+
...prev,
|
|
113
|
+
...newConfig,
|
|
114
|
+
labelGenerator: newConfig.labelGenerator ?? prev.labelGenerator
|
|
115
|
+
}));
|
|
116
|
+
}, []);
|
|
117
|
+
|
|
118
|
+
// Destructure config for stable dependencies
|
|
119
|
+
const {
|
|
120
|
+
autoLabels,
|
|
121
|
+
labelGenerator,
|
|
122
|
+
highContrast,
|
|
123
|
+
respectReducedMotion
|
|
124
|
+
} = config;
|
|
125
|
+
|
|
126
|
+
// Get label for icon
|
|
127
|
+
const getLabel = (0, _react.useCallback)((iconName, customLabel) => {
|
|
128
|
+
// Custom label takes precedence
|
|
129
|
+
if (customLabel) return customLabel;
|
|
130
|
+
|
|
131
|
+
// Return undefined if auto-labels are disabled
|
|
132
|
+
if (!autoLabels) return undefined;
|
|
133
|
+
|
|
134
|
+
// Generate label using configured generator
|
|
135
|
+
return labelGenerator(iconName);
|
|
136
|
+
}, [autoLabels, labelGenerator]);
|
|
137
|
+
|
|
138
|
+
// Get contrast-adjusted color
|
|
139
|
+
const getContrastColor = (0, _react.useCallback)(color => {
|
|
140
|
+
// Check if high contrast should be applied
|
|
141
|
+
const shouldApplyHighContrast = highContrast || isHighContrast;
|
|
142
|
+
if (shouldApplyHighContrast) {
|
|
143
|
+
return (0, _utils.adjustForHighContrast)(color);
|
|
144
|
+
}
|
|
145
|
+
return color;
|
|
146
|
+
}, [highContrast, isHighContrast]);
|
|
147
|
+
|
|
148
|
+
// Check if animations should be disabled
|
|
149
|
+
const shouldDisableAnimations = (0, _react.useCallback)(() => {
|
|
150
|
+
if (!respectReducedMotion) return false;
|
|
151
|
+
return prefersReducedMotion;
|
|
152
|
+
}, [respectReducedMotion, prefersReducedMotion]);
|
|
153
|
+
|
|
154
|
+
// Context value
|
|
155
|
+
const contextValue = (0, _react.useMemo)(() => ({
|
|
156
|
+
config,
|
|
157
|
+
prefersReducedMotion,
|
|
158
|
+
isHighContrast,
|
|
159
|
+
setConfig,
|
|
160
|
+
getLabel,
|
|
161
|
+
getContrastColor,
|
|
162
|
+
shouldDisableAnimations
|
|
163
|
+
}), [config, prefersReducedMotion, isHighContrast, setConfig, getLabel, getContrastColor, shouldDisableAnimations]);
|
|
164
|
+
return /*#__PURE__*/_react.default.createElement(AccessibilityContext.Provider, {
|
|
165
|
+
value: contextValue
|
|
166
|
+
}, children);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Hook to access accessibility context
|
|
171
|
+
* Throws if used outside AccessibilityProvider
|
|
172
|
+
*/
|
|
173
|
+
function useAccessibilityContext() {
|
|
174
|
+
const context = (0, _react.useContext)(AccessibilityContext);
|
|
175
|
+
if (!context) {
|
|
176
|
+
throw new Error('useAccessibilityContext must be used within an AccessibilityProvider');
|
|
177
|
+
}
|
|
178
|
+
return context;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Hook to safely access accessibility context
|
|
183
|
+
* Returns null if used outside AccessibilityProvider
|
|
184
|
+
*/
|
|
185
|
+
function useAccessibility() {
|
|
186
|
+
return (0, _react.useContext)(AccessibilityContext);
|
|
187
|
+
}
|
|
188
|
+
var _default = exports.default = AccessibilityProvider;
|
|
189
|
+
//# sourceMappingURL=AccessibilityProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_utils","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_ACCESSIBILITY_CONFIG","exports","autoLabels","labelGenerator","defaultLabelGenerator","highContrast","respectReducedMotion","defaultRole","showFocusIndicators","minTouchTargetSize","AccessibilityContext","createContext","AccessibilityProvider","config","initialConfig","children","setConfigState","useState","prefersReducedMotion","setPrefersReducedMotion","isHighContrast","setIsHighContrast","useEffect","checkReducedMotion","isReducedMotion","AccessibilityInfo","isReduceMotionEnabled","subscription","addEventListener","remove","checkHighContrast","isBoldText","isBoldTextEnabled","setConfig","useCallback","newConfig","prev","getLabel","iconName","customLabel","undefined","getContrastColor","color","shouldApplyHighContrast","adjustForHighContrast","shouldDisableAnimations","contextValue","useMemo","createElement","Provider","value","useAccessibilityContext","context","useContext","Error","useAccessibility","_default"],"sourceRoot":"../../../src","sources":["accessibility/Access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,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "AccessibilityContext", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _AccessibilityProvider.AccessibilityContext;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "AccessibilityProvider", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _AccessibilityProvider.AccessibilityProvider;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "DEFAULT_ACCESSIBILITY_CONFIG", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _AccessibilityProvider.DEFAULT_ACCESSIBILITY_CONFIG;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "adjustForHighContrast", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _utils.adjustForHighContrast;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "calculateTouchTargetPadding", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _utils.calculateTouchTargetPadding;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "default", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _AccessibilityProvider.AccessibilityProvider;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "defaultLabelGenerator", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () {
|
|
45
|
+
return _utils.defaultLabelGenerator;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "getHighContrastAlternative", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _utils.getHighContrastAlternative;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "meetsContrastRequirement", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function () {
|
|
57
|
+
return _utils.meetsContrastRequirement;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "useAccessibility", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () {
|
|
63
|
+
return _AccessibilityProvider.useAccessibility;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "useAccessibilityContext", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function () {
|
|
69
|
+
return _AccessibilityProvider.useAccessibilityContext;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "useAccessibleIcon", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _useAccessibleIcon.useAccessibleIcon;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "withAccessibility", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _useAccessibleIcon.withAccessibility;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
var _AccessibilityProvider = require("./AccessibilityProvider");
|
|
85
|
+
var _useAccessibleIcon = require("./useAccessibleIcon");
|
|
86
|
+
var _utils = require("./utils");
|
|
87
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_AccessibilityProvider","require","_useAccessibleIcon","_utils"],"sourceRoot":"../../../src","sources":["accessibility/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAAA,sBAAA,GAAAC,OAAA;AAUA,IAAAC,kBAAA,GAAAD,OAAA;AAIA,IAAAE,MAAA,GAAAF,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["accessibility/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
exports.useAccessibleIcon = useAccessibleIcon;
|
|
8
|
+
exports.withAccessibility = withAccessibility;
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
var _AccessibilityProvider = require("./AccessibilityProvider");
|
|
11
|
+
var _utils = require("./utils");
|
|
12
|
+
/**
|
|
13
|
+
* Hook for creating accessible icon props
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Input props for useAccessibleIcon hook
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Output props from useAccessibleIcon hook
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Hook for creating accessible icon props
|
|
26
|
+
* Automatically generates labels, adjusts colors, and calculates touch targets
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* function MyIcon({ name, size, color }) {
|
|
31
|
+
* const { accessibilityProps, adjustedColor, touchTargetPadding } = useAccessibleIcon({
|
|
32
|
+
* iconName: name,
|
|
33
|
+
* size,
|
|
34
|
+
* color,
|
|
35
|
+
* });
|
|
36
|
+
*
|
|
37
|
+
* return (
|
|
38
|
+
* <View style={{ padding: touchTargetPadding }} {...accessibilityProps}>
|
|
39
|
+
* <Icon name={name} size={size} color={adjustedColor} />
|
|
40
|
+
* </View>
|
|
41
|
+
* );
|
|
42
|
+
* }
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
function useAccessibleIcon(input) {
|
|
46
|
+
const accessibility = (0, _AccessibilityProvider.useAccessibility)();
|
|
47
|
+
return (0, _react.useMemo)(() => {
|
|
48
|
+
// Default values when no provider is present
|
|
49
|
+
const defaults = {
|
|
50
|
+
accessibilityProps: {
|
|
51
|
+
accessible: true,
|
|
52
|
+
accessibilityRole: input.accessibilityRole ?? 'image',
|
|
53
|
+
accessibilityLabel: input.accessibilityLabel,
|
|
54
|
+
accessibilityHint: input.accessibilityHint,
|
|
55
|
+
accessibilityElementsHidden: input.accessibilityElementsHidden,
|
|
56
|
+
importantForAccessibility: input.importantForAccessibility
|
|
57
|
+
},
|
|
58
|
+
adjustedColor: input.color,
|
|
59
|
+
touchTargetPadding: 0,
|
|
60
|
+
shouldDisableAnimations: false,
|
|
61
|
+
isHighContrast: false
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Return defaults if no accessibility context
|
|
65
|
+
if (!accessibility) {
|
|
66
|
+
return defaults;
|
|
67
|
+
}
|
|
68
|
+
const {
|
|
69
|
+
config,
|
|
70
|
+
getLabel,
|
|
71
|
+
getContrastColor,
|
|
72
|
+
shouldDisableAnimations,
|
|
73
|
+
isHighContrast
|
|
74
|
+
} = accessibility;
|
|
75
|
+
|
|
76
|
+
// Determine accessibility role
|
|
77
|
+
const role = input.accessibilityRole ?? config.defaultRole;
|
|
78
|
+
|
|
79
|
+
// Generate label
|
|
80
|
+
const label = input.accessibilityElementsHidden ? undefined : getLabel(input.iconName, input.accessibilityLabel);
|
|
81
|
+
|
|
82
|
+
// Calculate touch target padding for interactive icons
|
|
83
|
+
const touchTargetPadding = input.isInteractive && input.size ? (0, _utils.calculateTouchTargetPadding)(input.size, config.minTouchTargetSize) : 0;
|
|
84
|
+
|
|
85
|
+
// Adjust color for high contrast if needed
|
|
86
|
+
const shouldUseHighContrast = input.highContrast ?? isHighContrast;
|
|
87
|
+
// Use adjustForHighContrast directly when prop is set, otherwise use context's getContrastColor
|
|
88
|
+
const adjustedColor = input.color && shouldUseHighContrast ? input.highContrast ? (0, _utils.adjustForHighContrast)(input.color) : getContrastColor(input.color) : input.color;
|
|
89
|
+
return {
|
|
90
|
+
accessibilityProps: {
|
|
91
|
+
accessible: !input.accessibilityElementsHidden,
|
|
92
|
+
accessibilityLabel: label,
|
|
93
|
+
accessibilityHint: input.accessibilityHint,
|
|
94
|
+
accessibilityRole: role,
|
|
95
|
+
accessibilityElementsHidden: input.accessibilityElementsHidden,
|
|
96
|
+
importantForAccessibility: input.importantForAccessibility
|
|
97
|
+
},
|
|
98
|
+
adjustedColor,
|
|
99
|
+
touchTargetPadding,
|
|
100
|
+
shouldDisableAnimations: shouldDisableAnimations(),
|
|
101
|
+
isHighContrast: shouldUseHighContrast
|
|
102
|
+
};
|
|
103
|
+
}, [accessibility, input.iconName, input.size, input.accessibilityLabel, input.accessibilityHint, input.accessibilityRole, input.highContrast, input.accessibilityElementsHidden, input.importantForAccessibility, input.color, input.isInteractive]);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Higher-order component props enhancer
|
|
108
|
+
* Use this to add accessibility to existing icon components
|
|
109
|
+
*/
|
|
110
|
+
function withAccessibility(props) {
|
|
111
|
+
// This is a simple merge for use without hooks (SSR, etc.)
|
|
112
|
+
return {
|
|
113
|
+
...props,
|
|
114
|
+
accessible: !props.accessibilityElementsHidden,
|
|
115
|
+
accessibilityRole: props.accessibilityRole ?? 'image'
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
var _default = exports.default = useAccessibleIcon;
|
|
119
|
+
//# sourceMappingURL=useAccessibleIcon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_AccessibilityProvider","_utils","useAccessibleIcon","input","accessibility","useAccessibility","useMemo","defaults","accessibilityProps","accessible","accessibilityRole","accessibilityLabel","accessibilityHint","accessibilityElementsHidden","importantForAccessibility","adjustedColor","color","touchTargetPadding","shouldDisableAnimations","isHighContrast","config","getLabel","getContrastColor","role","defaultRole","label","undefined","iconName","isInteractive","size","calculateTouchTargetPadding","minTouchTargetSize","shouldUseHighContrast","highContrast","adjustForHighContrast","withAccessibility","props","_default","exports","default"],"sourceRoot":"../../../src","sources":["accessibility/useAccessibleIcon.ts"],"mappings":";;;;;;;;AAIA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,MAAA,GAAAF,OAAA;AARA;AACA;AACA;;AAQA;AACA;AACA;;AAqDA;AACA;AACA;;AAmCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAACC,KAA6B,EAA2B;EACxF,MAAMC,aAAa,GAAG,IAAAC,uCAAgB,EAAC,CAAC;EAExC,OAAO,IAAAC,cAAO,EAAC,MAAM;IACnB;IACA,MAAMC,QAAiC,GAAG;MACxCC,kBAAkB,EAAE;QAClBC,UAAU,EAAE,IAAI;QAChBC,iBAAiB,EAAEP,KAAK,CAACO,iBAAiB,IAAI,OAAO;QACrDC,kBAAkB,EAAER,KAAK,CAACQ,kBAAkB;QAC5CC,iBAAiB,EAAET,KAAK,CAACS,iBAAiB;QAC1CC,2BAA2B,EAAEV,KAAK,CAACU,2BAA2B;QAC9DC,yBAAyB,EAAEX,KAAK,CAACW;MACnC,CAAC;MACDC,aAAa,EAAEZ,KAAK,CAACa,KAAK;MAC1BC,kBAAkB,EAAE,CAAC;MACrBC,uBAAuB,EAAE,KAAK;MAC9BC,cAAc,EAAE;IAClB,CAAC;;IAED;IACA,IAAI,CAACf,aAAa,EAAE;MAClB,OAAOG,QAAQ;IACjB;IAEA,MAAM;MAAEa,MAAM;MAAEC,QAAQ;MAAEC,gBAAgB;MAAEJ,uBAAuB;MAAEC;IAAe,CAAC,GACnFf,aAAa;;IAEf;IACA,MAAMmB,IAAuB,GAAGpB,KAAK,CAACO,iBAAi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AK,CAACU,2BAA2B,EACjCV,KAAK,CAACW,yBAAyB,EAC/BX,KAAK,CAACa,KAAK,EACXb,KAAK,CAACyB,aAAa,CACpB,CAAC;AACJ;;AAEA;AACA;AACA;AACA;AACO,SAASO,iBAAiBA,CAC/BC,KAAiC,EACkB;EACnD;EACA,OAAO;IACL,GAAGA,KAAK;IACR3B,UAAU,EAAE,CAAC2B,KAAK,CAACvB,2BAA2B;IAC9CH,iBAAiB,EAAE0B,KAAK,CAAC1B,iBAAiB,IAAI;EAChD,CAAC;AACH;AAAC,IAAA2B,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEcrC,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.adjustForHighContrast = adjustForHighContrast;
|
|
7
|
+
exports.calculateTouchTargetPadding = calculateTouchTargetPadding;
|
|
8
|
+
exports.defaultLabelGenerator = defaultLabelGenerator;
|
|
9
|
+
exports.getHighContrastAlternative = getHighContrastAlternative;
|
|
10
|
+
exports.meetsContrastRequirement = meetsContrastRequirement;
|
|
11
|
+
/**
|
|
12
|
+
* Accessibility utility functions for rn-iconify
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Default label generator - converts icon names to readable labels
|
|
17
|
+
* Examples:
|
|
18
|
+
* - "mdi:home" -> "home icon"
|
|
19
|
+
* - "heroicons:user-circle" -> "user circle icon"
|
|
20
|
+
* - "lucide:arrow-left" -> "arrow left icon"
|
|
21
|
+
*/
|
|
22
|
+
function defaultLabelGenerator(iconName) {
|
|
23
|
+
// Extract icon name from prefix:name format
|
|
24
|
+
const parts = iconName.split(':');
|
|
25
|
+
const name = parts.length > 1 ? parts[1] : parts[0];
|
|
26
|
+
|
|
27
|
+
// Convert kebab-case and camelCase to readable text
|
|
28
|
+
const readable = name
|
|
29
|
+
// Insert space before capital letters (camelCase)
|
|
30
|
+
.replace(/([A-Z])/g, ' $1')
|
|
31
|
+
// Replace hyphens and underscores with spaces
|
|
32
|
+
.replace(/[-_]/g, ' ')
|
|
33
|
+
// Remove extra spaces
|
|
34
|
+
.replace(/\s+/g, ' ')
|
|
35
|
+
// Trim and lowercase
|
|
36
|
+
.trim().toLowerCase();
|
|
37
|
+
return `${readable} icon`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Adjust color for high contrast mode
|
|
42
|
+
* Increases contrast by pushing colors toward black or white
|
|
43
|
+
*/
|
|
44
|
+
function adjustForHighContrast(color) {
|
|
45
|
+
// Parse color
|
|
46
|
+
const rgb = parseColor(color);
|
|
47
|
+
if (!rgb) return color;
|
|
48
|
+
|
|
49
|
+
// Calculate luminance
|
|
50
|
+
const luminance = (0.299 * rgb.r + 0.587 * rgb.g + 0.114 * rgb.b) / 255;
|
|
51
|
+
|
|
52
|
+
// Push toward black or white based on luminance
|
|
53
|
+
if (luminance > 0.5) {
|
|
54
|
+
// Light color - make it darker (black)
|
|
55
|
+
return '#000000';
|
|
56
|
+
} else {
|
|
57
|
+
// Dark color - make it lighter (white)
|
|
58
|
+
return '#FFFFFF';
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Parse color string to RGB values
|
|
64
|
+
*/
|
|
65
|
+
function parseColor(color) {
|
|
66
|
+
// Handle hex colors
|
|
67
|
+
if (color.startsWith('#')) {
|
|
68
|
+
const hex = color.slice(1);
|
|
69
|
+
if (hex.length === 3) {
|
|
70
|
+
return {
|
|
71
|
+
r: parseInt(hex[0] + hex[0], 16),
|
|
72
|
+
g: parseInt(hex[1] + hex[1], 16),
|
|
73
|
+
b: parseInt(hex[2] + hex[2], 16)
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
if (hex.length === 6) {
|
|
77
|
+
return {
|
|
78
|
+
r: parseInt(hex.slice(0, 2), 16),
|
|
79
|
+
g: parseInt(hex.slice(2, 4), 16),
|
|
80
|
+
b: parseInt(hex.slice(4, 6), 16)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Handle rgb/rgba colors
|
|
86
|
+
const rgbMatch = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
|
|
87
|
+
if (rgbMatch) {
|
|
88
|
+
return {
|
|
89
|
+
r: parseInt(rgbMatch[1], 10),
|
|
90
|
+
g: parseInt(rgbMatch[2], 10),
|
|
91
|
+
b: parseInt(rgbMatch[3], 10)
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
// Handle named colors (common ones)
|
|
96
|
+
const namedColors = {
|
|
97
|
+
black: {
|
|
98
|
+
r: 0,
|
|
99
|
+
g: 0,
|
|
100
|
+
b: 0
|
|
101
|
+
},
|
|
102
|
+
white: {
|
|
103
|
+
r: 255,
|
|
104
|
+
g: 255,
|
|
105
|
+
b: 255
|
|
106
|
+
},
|
|
107
|
+
red: {
|
|
108
|
+
r: 255,
|
|
109
|
+
g: 0,
|
|
110
|
+
b: 0
|
|
111
|
+
},
|
|
112
|
+
green: {
|
|
113
|
+
r: 0,
|
|
114
|
+
g: 128,
|
|
115
|
+
b: 0
|
|
116
|
+
},
|
|
117
|
+
blue: {
|
|
118
|
+
r: 0,
|
|
119
|
+
g: 0,
|
|
120
|
+
b: 255
|
|
121
|
+
},
|
|
122
|
+
yellow: {
|
|
123
|
+
r: 255,
|
|
124
|
+
g: 255,
|
|
125
|
+
b: 0
|
|
126
|
+
},
|
|
127
|
+
cyan: {
|
|
128
|
+
r: 0,
|
|
129
|
+
g: 255,
|
|
130
|
+
b: 255
|
|
131
|
+
},
|
|
132
|
+
magenta: {
|
|
133
|
+
r: 255,
|
|
134
|
+
g: 0,
|
|
135
|
+
b: 255
|
|
136
|
+
},
|
|
137
|
+
gray: {
|
|
138
|
+
r: 128,
|
|
139
|
+
g: 128,
|
|
140
|
+
b: 128
|
|
141
|
+
},
|
|
142
|
+
grey: {
|
|
143
|
+
r: 128,
|
|
144
|
+
g: 128,
|
|
145
|
+
b: 128
|
|
146
|
+
},
|
|
147
|
+
orange: {
|
|
148
|
+
r: 255,
|
|
149
|
+
g: 165,
|
|
150
|
+
b: 0
|
|
151
|
+
},
|
|
152
|
+
purple: {
|
|
153
|
+
r: 128,
|
|
154
|
+
g: 0,
|
|
155
|
+
b: 128
|
|
156
|
+
},
|
|
157
|
+
pink: {
|
|
158
|
+
r: 255,
|
|
159
|
+
g: 192,
|
|
160
|
+
b: 203
|
|
161
|
+
},
|
|
162
|
+
brown: {
|
|
163
|
+
r: 165,
|
|
164
|
+
g: 42,
|
|
165
|
+
b: 42
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
const lowerColor = color.toLowerCase();
|
|
169
|
+
if (namedColors[lowerColor]) {
|
|
170
|
+
return namedColors[lowerColor];
|
|
171
|
+
}
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Check if a color meets WCAG contrast requirements against a background
|
|
177
|
+
*/
|
|
178
|
+
function meetsContrastRequirement(foreground, background, level = 'AA') {
|
|
179
|
+
const fgRgb = parseColor(foreground);
|
|
180
|
+
const bgRgb = parseColor(background);
|
|
181
|
+
if (!fgRgb || !bgRgb) return true; // Assume it meets if we can't parse
|
|
182
|
+
|
|
183
|
+
const fgLuminance = getRelativeLuminance(fgRgb);
|
|
184
|
+
const bgLuminance = getRelativeLuminance(bgRgb);
|
|
185
|
+
const lighter = Math.max(fgLuminance, bgLuminance);
|
|
186
|
+
const darker = Math.min(fgLuminance, bgLuminance);
|
|
187
|
+
const contrastRatio = (lighter + 0.05) / (darker + 0.05);
|
|
188
|
+
|
|
189
|
+
// WCAG requirements for normal text
|
|
190
|
+
const requiredRatio = level === 'AAA' ? 7 : 4.5;
|
|
191
|
+
return contrastRatio >= requiredRatio;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Calculate relative luminance for WCAG calculations
|
|
196
|
+
*/
|
|
197
|
+
function getRelativeLuminance(rgb) {
|
|
198
|
+
const rsRGB = rgb.r / 255;
|
|
199
|
+
const gsRGB = rgb.g / 255;
|
|
200
|
+
const bsRGB = rgb.b / 255;
|
|
201
|
+
const r = rsRGB <= 0.03928 ? rsRGB / 12.92 : Math.pow((rsRGB + 0.055) / 1.055, 2.4);
|
|
202
|
+
const g = gsRGB <= 0.03928 ? gsRGB / 12.92 : Math.pow((gsRGB + 0.055) / 1.055, 2.4);
|
|
203
|
+
const b = bsRGB <= 0.03928 ? bsRGB / 12.92 : Math.pow((bsRGB + 0.055) / 1.055, 2.4);
|
|
204
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Generate a high contrast alternative for a color
|
|
209
|
+
*/
|
|
210
|
+
function getHighContrastAlternative(color, background = '#FFFFFF') {
|
|
211
|
+
const fgRgb = parseColor(color);
|
|
212
|
+
const bgRgb = parseColor(background);
|
|
213
|
+
if (!fgRgb || !bgRgb) return color;
|
|
214
|
+
const bgLuminance = getRelativeLuminance(bgRgb);
|
|
215
|
+
|
|
216
|
+
// If background is light, use black; if dark, use white
|
|
217
|
+
if (bgLuminance > 0.5) {
|
|
218
|
+
return '#000000';
|
|
219
|
+
} else {
|
|
220
|
+
return '#FFFFFF';
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Calculate minimum touch target padding needed
|
|
226
|
+
*/
|
|
227
|
+
function calculateTouchTargetPadding(iconSize, minTargetSize) {
|
|
228
|
+
if (iconSize >= minTargetSize) return 0;
|
|
229
|
+
return (minTargetSize - iconSize) / 2;
|
|
230
|
+
}
|
|
231
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["defaultLabelGenerator","iconName","parts","split","name","length","readable","replace","trim","toLowerCase","adjustForHighContrast","color","rgb","parseColor","luminance","r","g","b","startsWith","hex","slice","parseInt","rgbMatch","match","namedColors","black","white","red","green","blue","yellow","cyan","magenta","gray","grey","orange","purple","pink","brown","lowerColor","meetsContrastRequirement","foreground","background","level","fgRgb","bgRgb","fgLuminance","getRelativeLuminance","bgLuminance","lighter","Math","max","darker","min","contrastRatio","requiredRatio","rsRGB","gsRGB","bsRGB","pow","getHighContrastAlternative","calculateTouchTargetPadding","iconSize","minTargetSize"],"sourceRoot":"../../../src","sources":["accessibility/utils.ts"],"mappings":";;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,qBAAqBA,CAACC,QAAgB,EAAU;EAC9D;EACA,MAAMC,KAAK,GAAGD,QAAQ,CAACE,KAAK,CAAC,GAAG,CAAC;EACjC,MAAMC,IAAI,GAAGF,KAAK,CAACG,MAAM,GAAG,CAAC,GAAGH,KAAK,CAAC,CAAC,CAAC,GAAGA,KAAK,CAAC,CAAC,CAAC;;EAEnD;EACA,MAAMI,QAAQ,GAAGF;EACf;EAAA,CACCG,OAAO,CAAC,UAAU,EAAE,KAAK;EAC1B;EAAA,CACCA,OAAO,CAAC,OAAO,EAAE,GAAG;EACrB;EAAA,CACCA,OAAO,CAAC,MAAM,EAAE,GAAG;EACpB;EAAA,CACCC,IAAI,CAAC,CAAC,CACNC,WAAW,CAAC,CAAC;EAEhB,OAAO,GAAGH,QAAQ,OAAO;AAC3B;;AAEA;AACA;AACA;AACA;AACO,SAASI,qBAAqBA,CAACC,KAAa,EAAU;EAC3D;EACA,MAAMC,GAAG,GAAGC,UAAU,CAACF,KAAK,CAAC;EAC7B,IAAI,CAACC,GAAG,EAAE,OAAOD,KAAK;;EAEtB;EACA,MAAMG,SAAS,GAAG,CAAC,KAAK,GAAGF,GAAG,CAACG,CAAC,GAAG,KAAK,GAAGH,GAAG,CAACI,CA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