UNPKG

@carbon/icons-angular

Version:

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

177 lines (172 loc) 17.7 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.RainScatteredNight = {}), global.tslib, global.ng.core, global.CarbonIconHelpers)); }(this, (function (exports, tslib, core, iconHelpers) { 'use strict'; var RainScatteredNightComponent = /** @class */ (function () { function RainScatteredNightComponent() { this.focusable = false; } tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightComponent.prototype, "ariaLabel", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightComponent.prototype, "ariaLabelledby", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], RainScatteredNightComponent.prototype, "ariaHidden", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightComponent.prototype, "title", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], RainScatteredNightComponent.prototype, "focusable", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightComponent.prototype, "innerClass", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightComponent.prototype, "size", void 0); RainScatteredNightComponent = tslib.__decorate([ core.Component({ selector: "ibm-icon-rain-scattered-night", template: "\n <svg\n ibmIconRainScatteredNight\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 " }) ], RainScatteredNightComponent); return RainScatteredNightComponent; }()); var RainScatteredNightDirective = /** @class */ (function () { function RainScatteredNightDirective(elementRef) { this.elementRef = elementRef; this.isFocusable = false; this.icons = { "32": { metadata: { "moduleName": "RainScatteredNight32", "filepath": "rain--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": "M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z" } }], "name": "rain--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=\"M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z\"></path></svg>" }, "24": { metadata: { "moduleName": "RainScatteredNight24", "filepath": "rain--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": "M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z" } }], "name": "rain--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=\"M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z\"></path></svg>" }, "20": { metadata: { "moduleName": "RainScatteredNight20", "filepath": "rain--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": "M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z" } }], "name": "rain--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=\"M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z\"></path></svg>" }, "16": { metadata: { "moduleName": "RainScatteredNight16", "filepath": "rain--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": "M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z" } }], "name": "rain--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=\"M8.5084 32a1.0115 1.0115 0 01-.4485-.1055.9986.9986 0 01-.4486-1.3418l1.4934-3a1.0025 1.0025 0 011.7943.8945l-1.4934 3A1.0015 1.0015 0 018.5084 32zM29.8442 13.0347a1.5184 1.5184 0 00-1.2309-.8658 5.3587 5.3587 0 01-3.4094-1.7163 6.4648 6.4648 0 01-1.285-6.393 1.6031 1.6031 0 00-.3-1.5459 1.4535 1.4535 0 00-1.3594-.4922l-.0191.0029a7.8549 7.8549 0 00-6.1054 6.48A7.3725 7.3725 0 0013.5 8a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 25h7.3818L14.106 27.5527a1 1 0 101.7885.8946L17.6177 25H19a5.9549 5.9549 0 005.88-7.1455 7.5 7.5 0 004.8672-3.3A1.5381 1.5381 0 0029.8442 13.0347zM19 23H8a3.9926 3.9926 0 01-.6733-7.9292l.663-.1128.1456-.6562a5.496 5.496 0 0110.7294 0l.1456.6562.6626.1128A3.9925 3.9925 0 0119 23zm5.1509-7.0479a5.9639 5.9639 0 00-3.5015-2.708A7.5076 7.5076 0 0018.0286 9.55a6.01 6.01 0 013.77-5.334 8.4581 8.4581 0 001.9395 7.5972A7.4007 7.4007 0 0027.64 14.041 5.4392 5.4392 0 0124.1509 15.9521z\"></path></svg>" }, }; } RainScatteredNightDirective_1 = RainScatteredNightDirective; RainScatteredNightDirective.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; RainScatteredNightDirective_1.titleIdCounter++; title.setAttribute("id", "rain-scattered-night-" + RainScatteredNightDirective_1.titleIdCounter); svg.appendChild(title); svg.setAttribute("aria-labelledby", "rain-scattered-night-" + RainScatteredNightDirective_1.titleIdCounter); } }; var RainScatteredNightDirective_1; RainScatteredNightDirective.titleIdCounter = 0; RainScatteredNightDirective.ctorParameters = function () { return [ { type: core.ElementRef } ]; }; tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightDirective.prototype, "ariaLabel", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightDirective.prototype, "ariaLabelledby", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], RainScatteredNightDirective.prototype, "ariaHidden", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightDirective.prototype, "title", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", Boolean) ], RainScatteredNightDirective.prototype, "isFocusable", void 0); tslib.__decorate([ core.Input(), tslib.__metadata("design:type", String) ], RainScatteredNightDirective.prototype, "size", void 0); RainScatteredNightDirective = RainScatteredNightDirective_1 = tslib.__decorate([ core.Directive({ selector: "[ibmIconRainScatteredNight]" }), tslib.__metadata("design:paramtypes", [core.ElementRef]) ], RainScatteredNightDirective); return RainScatteredNightDirective; }()); var RainScatteredNightModule = /** @class */ (function () { function RainScatteredNightModule() { } RainScatteredNightModule = tslib.__decorate([ core.NgModule({ declarations: [ RainScatteredNightComponent, RainScatteredNightDirective, ], exports: [ RainScatteredNightComponent, RainScatteredNightDirective, ] }) ], RainScatteredNightModule); return RainScatteredNightModule; }()); exports.RainScatteredNightComponent = RainScatteredNightComponent; exports.RainScatteredNightDirective = RainScatteredNightDirective; exports.RainScatteredNightModule = RainScatteredNightModule; Object.defineProperty(exports, '__esModule', { value: true }); })));