UNPKG

@carbon/icons-angular

Version:

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

169 lines (166 loc) 16.2 kB
import { __decorate, __metadata } from 'tslib'; import { Input, Component, ElementRef, Directive, NgModule } from '@angular/core'; import { getAttributes } from '@carbon/icon-helpers'; var ThunderstormScatteredNightComponent = /** @class */ (function () { function ThunderstormScatteredNightComponent() { this.focusable = false; } __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightComponent.prototype, "ariaLabel", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightComponent.prototype, "ariaLabelledby", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], ThunderstormScatteredNightComponent.prototype, "ariaHidden", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightComponent.prototype, "title", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], ThunderstormScatteredNightComponent.prototype, "focusable", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightComponent.prototype, "innerClass", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightComponent.prototype, "size", void 0); ThunderstormScatteredNightComponent = __decorate([ Component({ selector: "ibm-icon-thunderstorm-scattered-night", template: "\n <svg\n ibmIconThunderstormScatteredNight\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 " }) ], ThunderstormScatteredNightComponent); return ThunderstormScatteredNightComponent; }()); var ThunderstormScatteredNightDirective = /** @class */ (function () { function ThunderstormScatteredNightDirective(elementRef) { this.elementRef = elementRef; this.isFocusable = false; this.icons = { "32": { metadata: { "moduleName": "ThunderstormScatteredNight32", "filepath": "thunderstorm--scattered--night/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": "M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z" } }, { "elem": "path", "attrs": { "d": "M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z" } }], "name": "thunderstorm--scattered--night", "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=\"M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z\"></path><path d=\"M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z\"></path></svg>" }, "24": { metadata: { "moduleName": "ThunderstormScatteredNight24", "filepath": "thunderstorm--scattered--night/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": "M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z" } }, { "elem": "path", "attrs": { "d": "M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z" } }], "name": "thunderstorm--scattered--night", "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=\"M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z\"></path><path d=\"M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z\"></path></svg>" }, "20": { metadata: { "moduleName": "ThunderstormScatteredNight20", "filepath": "thunderstorm--scattered--night/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": "M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z" } }, { "elem": "path", "attrs": { "d": "M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z" } }], "name": "thunderstorm--scattered--night", "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=\"M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z\"></path><path d=\"M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z\"></path></svg>" }, "16": { metadata: { "moduleName": "ThunderstormScatteredNight16", "filepath": "thunderstorm--scattered--night/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": "M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z" } }, { "elem": "path", "attrs": { "d": "M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z" } }], "name": "thunderstorm--scattered--night", "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=\"M13.338 30L11.602 29 13.889 25 10 25 13.993 18 15.73 19 13.446 23 17.337 23 13.338 30z\"></path><path d=\"M29.844,13.0347a1.52,1.52,0,0,0-1.231-.8658,5.3562,5.3562,0,0,1-3.4094-1.7158A6.4652,6.4652,0,0,1,23.9187,4.06a1.6039,1.6039,0,0,0-.3-1.5459,1.4547,1.4547,0,0,0-1.3591-.4922l-.0191.0039a7.8544,7.8544,0,0,0-6.1054,6.48A7.3725,7.3725,0,0,0,13.5,8a7.5511,7.5511,0,0,0-7.1494,5.2441A5.9926,5.9926,0,0,0,8,25V23a3.9926,3.9926,0,0,1-.6733-7.9292l.663-.1128.1456-.6562a5.496,5.496,0,0,1,10.7294,0l.1456.6562.6626.1128A3.9925,3.9925,0,0,1,19,23v2a5.9549,5.9549,0,0,0,5.88-7.1455,7.502,7.502,0,0,0,4.8669-3.3A1.537,1.537,0,0,0,29.844,13.0347Zm-5.6926,2.9179a5.9658,5.9658,0,0,0-3.502-2.7085A7.5084,7.5084,0,0,0,18.0288,9.55a6.0085,6.0085,0,0,1,3.77-5.3335,8.4582,8.4582,0,0,0,1.9392,7.5967A7.4037,7.4037,0,0,0,27.64,14.041,5.4419,5.4419,0,0,1,24.1514,15.9526Z\"></path></svg>" }, }; } ThunderstormScatteredNightDirective_1 = ThunderstormScatteredNightDirective; ThunderstormScatteredNightDirective.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; ThunderstormScatteredNightDirective_1.titleIdCounter++; title.setAttribute("id", "thunderstorm-scattered-night-" + ThunderstormScatteredNightDirective_1.titleIdCounter); svg.appendChild(title); svg.setAttribute("aria-labelledby", "thunderstorm-scattered-night-" + ThunderstormScatteredNightDirective_1.titleIdCounter); } }; var ThunderstormScatteredNightDirective_1; ThunderstormScatteredNightDirective.titleIdCounter = 0; ThunderstormScatteredNightDirective.ctorParameters = function () { return [ { type: ElementRef } ]; }; __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightDirective.prototype, "ariaLabel", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightDirective.prototype, "ariaLabelledby", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], ThunderstormScatteredNightDirective.prototype, "ariaHidden", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightDirective.prototype, "title", void 0); __decorate([ Input(), __metadata("design:type", Boolean) ], ThunderstormScatteredNightDirective.prototype, "isFocusable", void 0); __decorate([ Input(), __metadata("design:type", String) ], ThunderstormScatteredNightDirective.prototype, "size", void 0); ThunderstormScatteredNightDirective = ThunderstormScatteredNightDirective_1 = __decorate([ Directive({ selector: "[ibmIconThunderstormScatteredNight]" }), __metadata("design:paramtypes", [ElementRef]) ], ThunderstormScatteredNightDirective); return ThunderstormScatteredNightDirective; }()); var ThunderstormScatteredNightModule = /** @class */ (function () { function ThunderstormScatteredNightModule() { } ThunderstormScatteredNightModule = __decorate([ NgModule({ declarations: [ ThunderstormScatteredNightComponent, ThunderstormScatteredNightDirective, ], exports: [ ThunderstormScatteredNightComponent, ThunderstormScatteredNightDirective, ] }) ], ThunderstormScatteredNightModule); return ThunderstormScatteredNightModule; }()); export { ThunderstormScatteredNightComponent, ThunderstormScatteredNightDirective, ThunderstormScatteredNightModule };