UNPKG

@carbon/icons-angular

Version:

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

177 lines (172 loc) 16.4 kB
(function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('tslib'), require('@angular/core'), require('@carbon/icon-helpers')) : typeof define === 'function' && define.amd ? define(['exports', 'tslib', '@angular/core', '@carbon/icon-helpers'], factory) : (global = global || self, factory((global.CarbonIconsAngular = global.CarbonIconsAngular || {}, global.CarbonIconsAngular.WatsonHealthBrushPolygon = {}), global.tslib, global.ng.core, global.CarbonIconHelpers)); }(this, (function (exports, tslib, core, iconHelpers) { 'use strict'; var WatsonHealthBrushPolygonComponent = /** @class */ (function () { function WatsonHealthBrushPolygonComponent() { this.focusable = false; } tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonComponent.prototype, "ariaLabel", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonComponent.prototype, "ariaLabelledby", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], WatsonHealthBrushPolygonComponent.prototype, "ariaHidden", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonComponent.prototype, "title", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], WatsonHealthBrushPolygonComponent.prototype, "focusable", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonComponent.prototype, "innerClass", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonComponent.prototype, "size", void 0); WatsonHealthBrushPolygonComponent = tslib.__decorate([ core.Component({ selector: "ibm-icon-watson-health-brush-polygon", template: "\n <svg\n ibmIconWatsonHealthBrushPolygon\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 " }) ], WatsonHealthBrushPolygonComponent); return WatsonHealthBrushPolygonComponent; }()); var WatsonHealthBrushPolygonDirective = /** @class */ (function () { function WatsonHealthBrushPolygonDirective(elementRef) { this.elementRef = elementRef; this.isFocusable = false; this.icons = { "32": { metadata: { "moduleName": "WatsonHealthBrushPolygon32", "filepath": "watson-health/brush-polygon/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": "M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z" } }], "name": "brush-polygon", "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=\"M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z\"></path></svg>" }, "24": { metadata: { "moduleName": "WatsonHealthBrushPolygon24", "filepath": "watson-health/brush-polygon/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": "M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z" } }], "name": "brush-polygon", "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=\"M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z\"></path></svg>" }, "20": { metadata: { "moduleName": "WatsonHealthBrushPolygon20", "filepath": "watson-health/brush-polygon/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": "M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z" } }], "name": "brush-polygon", "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=\"M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z\"></path></svg>" }, "16": { metadata: { "moduleName": "WatsonHealthBrushPolygon16", "filepath": "watson-health/brush-polygon/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": "M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z" } }], "name": "brush-polygon", "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=\"M28.8281 3.1719a4.0941 4.0941 0 00-5.6562 0L4.05 22.292A6.9537 6.9537 0 002 27.2412V30H4.7559a6.9523 6.9523 0 004.95-2.05L28.8281 8.8286a3.999 3.999 0 000-5.6567zM10.91 18.26l2.8286 2.8286L11.6172 23.21 8.7886 20.3818zM8.2915 26.5356A4.9665 4.9665 0 014.7559 28H4v-.7588a4.9669 4.9669 0 011.4644-3.5351l1.91-1.91 2.8286 2.8281zM27.4141 7.4141L15.1528 19.6748l-2.8286-2.8286 12.2617-12.26a2.0473 2.0473 0 012.8282 0 1.9995 1.9995 0 010 2.8282zM14 2a2.9948 2.9948 0 00-2.8157 2H7.8157A2.9925 2.9925 0 104 7.8154v3.3687a3 3 0 102 0V7.8159A2.9959 2.9959 0 007.8157 6h3.3686A2.9947 2.9947 0 1014 2zM5 15a1 1 0 111-1A1.0008 1.0008 0 015 15zM5 6A1 1 0 116 5 1.0008 1.0008 0 015 6zm9 0a1 1 0 111-1A1.0008 1.0008 0 0114 6z\"></path></svg>" }, }; } WatsonHealthBrushPolygonDirective_1 = WatsonHealthBrushPolygonDirective; WatsonHealthBrushPolygonDirective.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 = iconHelpers.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; WatsonHealthBrushPolygonDirective_1.titleIdCounter++; title.setAttribute("id", "watson-health-brush-polygon-" + WatsonHealthBrushPolygonDirective_1.titleIdCounter); svg.appendChild(title); svg.setAttribute("aria-labelledby", "watson-health-brush-polygon-" + WatsonHealthBrushPolygonDirective_1.titleIdCounter); } }; var WatsonHealthBrushPolygonDirective_1; WatsonHealthBrushPolygonDirective.titleIdCounter = 0; WatsonHealthBrushPolygonDirective.ctorParameters = function () { return [ { type: core.ElementRef } ]; }; tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonDirective.prototype, "ariaLabel", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonDirective.prototype, "ariaLabelledby", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], WatsonHealthBrushPolygonDirective.prototype, "ariaHidden", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonDirective.prototype, "title", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], WatsonHealthBrushPolygonDirective.prototype, "isFocusable", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], WatsonHealthBrushPolygonDirective.prototype, "size", void 0); WatsonHealthBrushPolygonDirective = WatsonHealthBrushPolygonDirective_1 = tslib.__decorate([ core.Directive({ selector: "[ibmIconWatsonHealthBrushPolygon]" }), tslib.__metadata("design:paramtypes", [core.ElementRef]) ], WatsonHealthBrushPolygonDirective); return WatsonHealthBrushPolygonDirective; }()); var WatsonHealthBrushPolygonModule = /** @class */ (function () { function WatsonHealthBrushPolygonModule() { } WatsonHealthBrushPolygonModule = tslib.__decorate([ core.NgModule({ declarations: [ WatsonHealthBrushPolygonComponent, WatsonHealthBrushPolygonDirective, ], exports: [ WatsonHealthBrushPolygonComponent, WatsonHealthBrushPolygonDirective, ] }) ], WatsonHealthBrushPolygonModule); return WatsonHealthBrushPolygonModule; }()); exports.WatsonHealthBrushPolygonComponent = WatsonHealthBrushPolygonComponent; exports.WatsonHealthBrushPolygonDirective = WatsonHealthBrushPolygonDirective; exports.WatsonHealthBrushPolygonModule = WatsonHealthBrushPolygonModule; Object.defineProperty(exports, '__esModule', { value: true }); })));