UNPKG

@carbon/icons-angular

Version:

Angular components for icons in digital and software products using the Carbon Design System

169 lines (166 loc) 13.5 kB
import { __decorate, __metadata } from 'tslib'; import { Input, Component, ElementRef, Directive, NgModule } from '@angular/core'; import { getAttributes } from '@carbon/icon-helpers'; var LogoVmwareComponent = /** @class */ (function () { function LogoVmwareComponent() { this.focusable = false; } __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareComponent.prototype, "ariaLabel", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareComponent.prototype, "ariaLabelledby", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], LogoVmwareComponent.prototype, "ariaHidden", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareComponent.prototype, "title", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], LogoVmwareComponent.prototype, "focusable", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareComponent.prototype, "innerClass", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareComponent.prototype, "size", void 0); LogoVmwareComponent = __decorate([ Component({ selector: "ibm-icon-logo-vmware", template: "\n <svg\n ibmIconLogoVmware\n [size]=\"size\"\n [ariaLabel]=\"ariaLabel\"\n [ariaLabelledby]=\"ariaLabelledby\"\n [ariaHidden]=\"ariaHidden\"\n [title]=\"title\"\n [isFocusable]=\"focusable\"\n [attr.class]=\"innerClass\">\n </svg>\n " }) ], LogoVmwareComponent); return LogoVmwareComponent; }()); var LogoVmwareDirective = /** @class */ (function () { function LogoVmwareDirective(elementRef) { this.elementRef = elementRef; this.isFocusable = false; this.icons = { "32": { metadata: { "moduleName": "LogoVmware32", "filepath": "logo--vmware/32.js", "descriptor": { "elem": "svg", "attrs": { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 32 32", "fill": "currentColor", "width": 32, "height": 32 }, "content": [{ "elem": "path", "attrs": { "d": "M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z" } }], "name": "logo--vmware", "size": 32 }, "size": 32 }, svg: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z\"></path></svg>" }, "24": { metadata: { "moduleName": "LogoVmware24", "filepath": "logo--vmware/24.js", "descriptor": { "elem": "svg", "attrs": { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 32 32", "fill": "currentColor", "width": 24, "height": 24 }, "content": [{ "elem": "path", "attrs": { "d": "M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z" } }], "name": "logo--vmware", "size": 24 }, "size": 24 }, svg: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"24\" height=\"24\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z\"></path></svg>" }, "20": { metadata: { "moduleName": "LogoVmware20", "filepath": "logo--vmware/20.js", "descriptor": { "elem": "svg", "attrs": { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 32 32", "fill": "currentColor", "width": 20, "height": 20 }, "content": [{ "elem": "path", "attrs": { "d": "M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z" } }], "name": "logo--vmware", "size": 20 }, "size": 20 }, svg: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"20\" height=\"20\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z\"></path></svg>" }, "16": { metadata: { "moduleName": "LogoVmware16", "filepath": "logo--vmware/16.js", "descriptor": { "elem": "svg", "attrs": { "xmlns": "http://www.w3.org/2000/svg", "viewBox": "0 0 32 32", "fill": "currentColor", "width": 16, "height": 16 }, "content": [{ "elem": "path", "attrs": { "d": "M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z" } }], "name": "logo--vmware", "size": 16 }, "size": 16 }, svg: "<svg focusable=\"false\" preserveAspectRatio=\"xMidYMid meet\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"currentColor\" width=\"16\" height=\"16\" viewBox=\"0 0 32 32\" aria-hidden=\"true\"><path d=\"M30,16.67V14.1036c0-2.1716-2.1715-3.356-3.9482-3.356a5.9018,5.9018,0,0,0-3.356,1.3818,4.4329,4.4329,0,0,0-3.1586-1.3818,5.1967,5.1967,0,0,0-3.356,1.3818A3.34,3.34,0,0,0,13.22,10.7476a3.055,3.055,0,0,0-2.9233,1.5937L7.6925,18.2492,4.801,11.622a1.4616,1.4616,0,0,0-1.9148-.7574h0a1.4617,1.4617,0,0,0-.7518,1.9548l3.584,7.7987S6.3107,22,7.4951,22a1.67,1.67,0,0,0,1.7767-.9871c.2735-.41,2.3459-4.769,3.5944-7.41a.4969.4969,0,0,1,.9461.2132v6.551a1.6153,1.6153,0,0,0,1.4741,1.63,1.5794,1.5794,0,0,0,1.6845-1.5759V14.9919a1.678,1.678,0,1,1,3.356,0v5.4288a1.5793,1.5793,0,1,0,3.1585,0V14.9919a1.678,1.678,0,0,1,3.356,0v5.4288a1.5793,1.5793,0,0,0,3.1586,0Z\"></path></svg>" }, }; } LogoVmwareDirective_1 = LogoVmwareDirective; LogoVmwareDirective.prototype.ngAfterViewInit = function () { var svg = this.elementRef.nativeElement; svg.setAttribute("xmlns", "http://www.w3.org/2000/svg"); var icon = this.icons[this.size]; var domParser = new DOMParser(); var rawSVG = icon.svg; var svgElement = domParser.parseFromString(rawSVG, "image/svg+xml").documentElement; var node = svgElement.firstChild; while (node) { // importNode makes a clone of the node // this ensures we keep looping over the nodes in the parsed document svg.appendChild(svg.ownerDocument.importNode(node, true)); node = node.nextSibling; } var attributes = getAttributes({ width: icon.metadata.descriptor.attrs.height, height: icon.metadata.descriptor.attrs.height, viewBox: icon.metadata.descriptor.attrs.viewBox, title: this.title, "aria-label": this.ariaLabel, "aria-labelledby": this.ariaLabelledby, "aria-hidden": this.ariaHidden, focusable: this.isFocusable.toString() }); var attrKeys = Object.keys(attributes); for (var i = 0; i < attrKeys.length; i++) { var key = attrKeys[i]; var value = attributes[key]; if (key === "title") { continue; } if (value) { svg.setAttribute(key, value); } } if (attributes.title) { var title = document.createElement("title"); title.textContent = attributes.title; LogoVmwareDirective_1.titleIdCounter++; title.setAttribute("id", "logo-vmware-" + LogoVmwareDirective_1.titleIdCounter); svg.appendChild(title); svg.setAttribute("aria-labelledby", "logo-vmware-" + LogoVmwareDirective_1.titleIdCounter); } }; var LogoVmwareDirective_1; LogoVmwareDirective.titleIdCounter = 0; LogoVmwareDirective.ctorParameters = function () { return [ { type: ElementRef } ]; }; __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareDirective.prototype, "ariaLabel", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareDirective.prototype, "ariaLabelledby", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], LogoVmwareDirective.prototype, "ariaHidden", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareDirective.prototype, "title", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], LogoVmwareDirective.prototype, "isFocusable", void 0); __decorate([ Input(), __metadata("design:type", String) ], LogoVmwareDirective.prototype, "size", void 0); LogoVmwareDirective = LogoVmwareDirective_1 = __decorate([ Directive({ selector: "[ibmIconLogoVmware]" }), __metadata("design:paramtypes", [ElementRef]) ], LogoVmwareDirective); return LogoVmwareDirective; }()); var LogoVmwareModule = /** @class */ (function () { function LogoVmwareModule() { } LogoVmwareModule = __decorate([ NgModule({ declarations: [ LogoVmwareComponent, LogoVmwareDirective, ], exports: [ LogoVmwareComponent, LogoVmwareDirective, ] }) ], LogoVmwareModule); return LogoVmwareModule; }()); export { LogoVmwareComponent, LogoVmwareDirective, LogoVmwareModule };