@nebular/eva-icons
Version:
@nebular/eva-icons
1 lines • 3.27 kB
Source Map (JSON)
{"version":3,"file":"nebular-eva-icons.mjs","sources":["../../../src/framework/eva-icons/eva-icons.module.ts","../../../src/framework/eva-icons/public_api.ts","../../../src/framework/eva-icons/nebular-eva-icons.ts"],"sourcesContent":["/*\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nimport { NgModule } from '@angular/core';\nimport { NbIconLibraries, NbSvgIcon, NbIcons } from '@nebular/theme';\nimport { icons } from 'eva-icons';\n\ninterface NbOriginalEvaIcon {\n toSvg(options: NbEvaIconOptions);\n}\n\nexport interface NbEvaIconOptions {\n width: string,\n height: string,\n fill: string,\n animation: {\n type: string,\n hover: boolean,\n infinite: boolean,\n },\n}\n\nexport class NbEvaSvgIcon extends NbSvgIcon {\n\n constructor(protected name, protected content: NbOriginalEvaIcon) {\n super(name, '');\n }\n\n getContent(options): string {\n return this.content.toSvg({\n width: '100%',\n height: '100%',\n fill: 'currentColor',\n ...options,\n });\n }\n}\n\n@NgModule({})\nexport class NbEvaIconsModule {\n\n private NAME = 'eva';\n\n constructor(iconLibrary: NbIconLibraries) {\n iconLibrary.registerSvgPack(this.NAME, this.createIcons());\n iconLibrary.setDefaultPack(this.NAME);\n }\n\n private createIcons(): NbIcons {\n return Object\n .entries<NbOriginalEvaIcon>(icons)\n .map(([name, icon]) => {\n return [name, new NbEvaSvgIcon(name, icon)] as [string, NbSvgIcon];\n })\n .reduce((newIcons, [name, icon]: [string, NbSvgIcon]) => {\n newIcons[name] = icon;\n return newIcons;\n }, {});\n }\n}\n","/*\n * @license\n * Copyright Akveo. All Rights Reserved.\n * Licensed under the MIT License. See License.txt in the project root for license information.\n */\n\nexport * from './eva-icons.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAA;;;;AAIG;AAqBG,MAAO,YAAa,SAAQ,SAAS,CAAA;IAEzC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