{"_id":"@alphinex/icons","_rev":"4-d3d5bee7eec67e0665c8e399e72c780d","name":"@alphinex/icons","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@alphinex/icons","version":"1.0.0","license":"UNLICENSED","_id":"@alphinex/icons@1.0.0","maintainers":[{"name":"anasaliqureshi","email":"anas@alphinex.com"}],"dist":{"shasum":"25ce49bc7b12146d288c08e7b68330ce98522d49","tarball":"https://registry.npmjs.org/@alphinex/icons/-/icons-1.0.0.tgz","fileCount":5,"integrity":"sha512-TZZA7lLMK5TiO+5WnhRYFCr9o9gnGNboi1SRp142s6V+saMcqWr2hUBRY2p3HJSTNZy0UIjHQYzHNooUPEWgDw==","signatures":[{"sig":"MEQCICsGBXB2jhSpuKbP/xyBaYcQWKmOEkOsOlbXPHNHT98cAiB/VAWPQmt2Io+WdRgTh5WpeR4hVYe8+1yLJoFXbmWoTQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13822},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"dev":"vite build --watch","lint":"eslint .","test":"vitest run","build":"vite build","clean":"rimraf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"anasaliqureshi","email":"anas@alphinex.com"},"description":"Icon abstraction layer decoupling components from any specific icon set.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"lucide-react":"^0.469.0","@alphinex/core":"1.0.0","@alphinex/theme":"1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.5","jsdom":"^25.0.1","react":"^19.0.0","eslint":"^9.17.0","vitest":"^2.1.8","react-dom":"^19.0.0","typescript":"^5.7.2","@types/react":"^19.0.2","@types/react-dom":"^19.0.2","@vitejs/plugin-react":"^4.3.4","@alphinex/build-config":"0.0.0","@testing-library/react":"^16.1.0","@alphinex/eslint-config":"0.0.0","@testing-library/jest-dom":"^6.6.3","@alphinex/typescript-config":"0.0.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"react-dom":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/icons_1.0.0_1785852479523_0.310496625880021","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@alphinex/icons","version":"1.0.1","license":"UNLICENSED","_id":"@alphinex/icons@1.0.1","maintainers":[{"name":"anasaliqureshi","email":"anas@alphinex.com"}],"dist":{"shasum":"db9e2bd84a07669dc90d67a095b8d34e44478b89","tarball":"https://registry.npmjs.org/@alphinex/icons/-/icons-1.0.1.tgz","fileCount":5,"integrity":"sha512-pCJpO4oo8rtrDZBaMeEmPeu2uCh/7xd/lU5CHzjFEtK5EQiNqGnjiep2LiodYfwbnQ/tJ0o7gRldzPOyBgPQEA==","signatures":[{"sig":"MEUCIQCv//tfCZD1ZZAg/9I6IxL1YBfF2WbOE6JsekHewQNOOwIgPOytkOexp1tdmUhfGfoYfi2GAPfjHUmwbVkn40+y/hE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13822},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"dev":"vite build --watch","lint":"eslint .","test":"vitest run","build":"vite build","clean":"rimraf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"anasaliqureshi","email":"anas@alphinex.com"},"description":"Icon abstraction layer decoupling components from any specific icon set.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"lucide-react":"^0.469.0","@alphinex/core":"1.0.0","@alphinex/theme":"1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.5","jsdom":"^25.0.1","react":"^19.0.0","eslint":"^9.17.0","vitest":"^2.1.8","react-dom":"^19.0.0","typescript":"^5.7.2","@types/react":"^19.0.2","@types/react-dom":"^19.0.2","@vitejs/plugin-react":"^4.3.4","@alphinex/build-config":"0.0.0","@testing-library/react":"^16.1.0","@alphinex/eslint-config":"0.0.0","@testing-library/jest-dom":"^6.6.3","@alphinex/typescript-config":"0.0.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"react-dom":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/icons_1.0.1_1785858426176_0.4044190075695375","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@alphinex/icons","version":"1.1.0","license":"UNLICENSED","_id":"@alphinex/icons@1.1.0","maintainers":[{"name":"anasaliqureshi","email":"anas@alphinex.com"}],"dist":{"shasum":"5489937ecf6db5a63f078c5ce1b79c7edf99e7bf","tarball":"https://registry.npmjs.org/@alphinex/icons/-/icons-1.1.0.tgz","fileCount":5,"integrity":"sha512-8H0nv6QVof6XWkvOiM9EV84drd2lT3R4SIcMk41OOx3aZ/8Qi+kJ9sZWh63+kxUJ2lIAGTe03EtQlugCeztz6Q==","signatures":[{"sig":"MEYCIQCI26TAhKVNutYkSENjQmHwSoCd1i0GzwuRNXSyp6dgXQIhAJPF4wImpT9dxRjAfKBOv16Vt+iNe8YAiBUr1mt+022K","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19394},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"dev":"vite build --watch","lint":"eslint .","test":"vitest run","build":"vite build","clean":"rimraf dist .turbo","typecheck":"tsc --noEmit"},"_npmUser":{"name":"anasaliqureshi","email":"anas@alphinex.com"},"description":"Icon abstraction layer decoupling components from any specific icon set.","directories":{},"sideEffects":false,"_nodeVersion":"22.14.0","dependencies":{"lucide-react":"^0.469.0","@alphinex/core":"1.0.0","@alphinex/theme":"1.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.5","jsdom":"^25.0.1","react":"^19.0.0","eslint":"^9.17.0","vitest":"^2.1.8","react-dom":"^19.0.0","typescript":"^5.7.2","@types/react":"^19.0.2","@types/react-dom":"^19.0.2","@vitejs/plugin-react":"^4.3.4","@alphinex/build-config":"0.0.0","@testing-library/react":"^16.1.0","@alphinex/eslint-config":"0.0.0","@testing-library/jest-dom":"^6.6.3","@alphinex/typescript-config":"0.0.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"react-dom":{"optional":false}},"_npmOperationalInternal":{"tmp":"tmp/icons_1.1.0_1786298608133_0.16928340223541638","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@alphinex/icons","version":"1.2.0","private":false,"description":"Icon abstraction layer decoupling components from any specific icon set.","license":"UNLICENSED","type":"module","sideEffects":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"dependencies":{"lucide-react":"^0.469.0","@alphinex/core":"1.0.0","@alphinex/theme":"1.1.0"},"peerDependencies":{"react":"^19.0.0","react-dom":"^19.0.0"},"peerDependenciesMeta":{"react":{"optional":false},"react-dom":{"optional":false}},"devDependencies":{"typescript":"^5.7.2","vite":"^6.0.5","vitest":"^2.1.8","react":"^19.0.0","react-dom":"^19.0.0","@types/react":"^19.0.2","@types/react-dom":"^19.0.2","@testing-library/react":"^16.1.0","@testing-library/jest-dom":"^6.6.3","@vitejs/plugin-react":"^4.3.4","jsdom":"^25.0.1","eslint":"^9.17.0","@alphinex/build-config":"0.0.0","@alphinex/eslint-config":"0.0.0","@alphinex/typescript-config":"0.0.0"},"scripts":{"build":"vite build","dev":"vite build --watch","lint":"eslint .","typecheck":"tsc --noEmit","test":"vitest run","clean":"rimraf dist .turbo"},"_nodeVersion":"22.14.0","_id":"@alphinex/icons@1.2.0","dist":{"integrity":"sha512-TPtp3pb6Pn0WdAXGpath5+pcR5hCIfzhxcW5qZ+PwhQlAkJq3/ZJ9O2wNMC5LzN8lI8aJhuD5op4RB/WptaKVQ==","shasum":"5b2dfd0788f5349e35381fa7667d956a1b3c14b9","tarball":"https://registry.npmjs.org/@alphinex/icons/-/icons-1.2.0.tgz","fileCount":5,"unpackedSize":20667,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDYV0n3o6xUW6byYzuasRaE1y+Fh1CmWFIAhlc6D4CW4gIgcdGGZh8+WOKAoVTTW50v5vq6lBJfS6DOw/jrkSDgQgQ="}]},"_npmUser":{"name":"anasaliqureshi","email":"anas@alphinex.com"},"directories":{},"maintainers":[{"name":"anasaliqureshi","email":"anas@alphinex.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/icons_1.2.0_1786525490873_0.06112140668775634"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T14:07:59.347Z","modified":"2026-08-12T09:04:51.192Z","1.0.0":"2026-08-04T14:07:59.659Z","1.0.1":"2026-08-04T15:47:06.331Z","1.1.0":"2026-08-09T18:03:28.290Z","1.2.0":"2026-08-12T09:04:51.038Z"},"license":"UNLICENSED","description":"Icon abstraction layer decoupling components from any specific icon set.","maintainers":[{"name":"anasaliqureshi","email":"anas@alphinex.com"}],"readme":"# @alphinex/icons\n\nAn icon abstraction layer that decouples every call site — `@alphinex/ui` components and consuming\napps alike — from any specific icon library. Icons are looked up by name from a registry rather than\nimported directly, so swapping icon libraries or adding a domain-specific icon set (e.g. medical\nicons for a Hospital SaaS tenant) never requires touching component code. See ADR-0001 for why this\nstays a thin abstraction rather than a full design-system icon component with variants.\n\n## Icon\n\nThe one component that renders icons. Look one up by registered `name`, or pass a component directly\nvia `icon` as an escape hatch for a one-off icon that isn't registered. `size` accepts the named scale\n(`\"sm\" | \"md\" | \"lg\"`, default `\"md\"`) or a raw number/string; `tone` maps to a semantic color token\nand is ignored if `color` is explicitly supplied. Icons are decorative (hidden from assistive tech) by\ndefault — pass `label` to give one an accessible name instead:\n\n```tsx\nimport { Icon } from \"@alphinex/icons\";\n\n<Icon name=\"check\" tone=\"success\" />\n<Icon name=\"alert-triangle\" tone=\"danger\" size=\"lg\" label=\"Warning\" />\n<Icon name=\"search\" size={20} color=\"#6366f1\" />\n```\n\nIf `name` doesn't resolve to a registered icon (and no `icon` override is given), `Icon` warns to the\nconsole and renders nothing — a useful signal that `registerIconSet()` wasn't called, or the name is\nmisspelled.\n\n## Registering icons: registerIconSet, getIcon, hasIcon\n\nThe registry starts pre-loaded with `defaultIconSet` — the platform's built-in icons (chevrons,\ncheck, alert/info glyphs, basic rich-text-editor icons like bold/italic/list, etc.), sourced from\n[lucide-react](https://lucide.dev/). Registration is additive: call `registerIconSet` with your own\n`Record<string, SvgIconComponent>` to add icons alongside the built-in set, not replace it. By default\nit warns and skips a name that's already registered — pass `{ overwrite: true }` to replace it\nintentionally:\n\n```tsx\nimport { registerIconSet } from \"@alphinex/icons\";\nimport { Stethoscope, Syringe } from \"lucide-react\";\n\nregisterIconSet({\n  stethoscope: Stethoscope,\n  syringe: Syringe,\n});\n\n// Later, anywhere in the app:\n<Icon name=\"stethoscope\" label=\"Consultation\" />;\n```\n\nCall `registerIconSet` once, early — e.g. in your app's entry point, before any `<Icon>` renders.\nAny component matching the `SvgIconComponent` shape (`ComponentType<SvgIconProps>` — same shape as a\nlucide-react icon: `size`, `color`, and standard SVG props) can be registered, not just lucide icons:\n\n```tsx\nimport { registerIconSet, hasIcon, getIcon } from \"@alphinex/icons\";\nimport { MyCustomLogoIcon } from \"./MyCustomLogoIcon\";\n\nregisterIconSet({ \"brand-logo\": MyCustomLogoIcon }, { overwrite: true });\n\nhasIcon(\"brand-logo\"); // true\ngetIcon(\"brand-logo\"); // MyCustomLogoIcon — mostly useful for testing/introspection\n```\n\n`defaultIconSet` itself is also exported, in case you need to reference or enumerate the built-in\nnames directly rather than going through the registry.\n\n## Tokens: ICON_SIZES, ICON_TONE_VARS\n\n`ICON_SIZES` maps the named `IconSize` scale (`sm`/`md`/`lg`) to rem values — icons are sized on their\nown primitive scale, independent of the type scale. `ICON_TONE_VARS` maps each `IconTone`\n(`neutral`/`muted`/`accent`/`danger`/`success`/`warning`) to the matching CSS custom property set by\n`@alphinex/theme`'s `ThemeProvider` at runtime, so `tone=\"danger\"` always tracks the current theme\nwithout a hardcoded color:\n\n```ts\nimport { ICON_SIZES, ICON_TONE_VARS } from \"@alphinex/icons\";\n\nICON_SIZES.lg; // \"1.5rem\"\nICON_TONE_VARS.accent; // \"var(--aui-color-accent-default)\"\n```\n\nThese are what `Icon` resolves `size`/`tone` against internally — pull them directly only if you're\nsizing/coloring something that renders outside of `<Icon>` but needs to match it exactly.\n\nSee [documentation/ARCHITECTURE.md](../../documentation/ARCHITECTURE.md) for the full package contract, dependency rules, and roadmap placement.\n","readmeFilename":""}