@carbon/icons-angular
Version:
Angular components for icons in digital and software products using the Carbon Design System
177 lines (172 loc) • 18.2 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('tslib'), require('/core'), require('@carbon/icon-helpers')) :
typeof define === 'function' && define.amd ? define(['exports', 'tslib', '/core', '@carbon/icon-helpers'], factory) :
(global = global || self, factory((global.CarbonIconsAngular = global.CarbonIconsAngular || {}, global.CarbonIconsAngular.SnowScatteredNight = {}), global.tslib, global.ng.core, global.CarbonIconHelpers));
}(this, (function (exports, tslib, core, iconHelpers) { 'use strict';
var SnowScatteredNightComponent = /** @class */ (function () {
function SnowScatteredNightComponent() {
this.focusable = false;
}
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightComponent.prototype, "ariaLabel", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightComponent.prototype, "ariaLabelledby", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], SnowScatteredNightComponent.prototype, "ariaHidden", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightComponent.prototype, "title", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], SnowScatteredNightComponent.prototype, "focusable", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightComponent.prototype, "innerClass", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightComponent.prototype, "size", void 0);
SnowScatteredNightComponent = tslib.__decorate([
core.Component({
selector: "ibm-icon-snow-scattered-night",
template: "\n <svg\n ibmIconSnowScatteredNight\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 "
})
], SnowScatteredNightComponent);
return SnowScatteredNightComponent;
}());
var SnowScatteredNightDirective = /** @class */ (function () {
function SnowScatteredNightDirective(elementRef) {
this.elementRef = elementRef;
this.isFocusable = false;
this.icons = {
"32": {
metadata: { "moduleName": "SnowScatteredNight32", "filepath": "snow--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": "M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z" } }], "name": "snow--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=\"M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z\"></path></svg>"
},
"24": {
metadata: { "moduleName": "SnowScatteredNight24", "filepath": "snow--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": "M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z" } }], "name": "snow--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=\"M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z\"></path></svg>"
},
"20": {
metadata: { "moduleName": "SnowScatteredNight20", "filepath": "snow--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": "M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z" } }], "name": "snow--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=\"M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z\"></path></svg>"
},
"16": {
metadata: { "moduleName": "SnowScatteredNight16", "filepath": "snow--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": "M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z" } }], "name": "snow--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=\"M2 26H4V28H2zM4 28H6V30H4zM6 30H8V32H6zM6 26H8V28H6zM2 30H4V32H2zM20 26H22V28H20zM22 28H24V30H22zM24 30H26V32H24zM24 26H26V28H24zM20 30H22V32H20zM11 26H13V28H11zM13 28H15V30H13zM15 30H17V32H15zM15 26H17V28H15zM11 30H13V32H11zM29.8439 13.0347a1.517 1.517 0 00-1.23-.8658 5.3552 5.3552 0 01-3.4095-1.7158 6.4655 6.4655 0 01-1.286-6.3926 1.6025 1.6025 0 00-.2989-1.5459 1.4543 1.4543 0 00-1.36-.4931l-.0191.0039a7.7685 7.7685 0 00-5.8847 5.5737A7.3706 7.3706 0 0013.5 7a7.5511 7.5511 0 00-7.1494 5.2441A5.9926 5.9926 0 008 24H19a6.0066 6.0066 0 006-6c0-.0571-.0123-.1113-.0139-.1685a7.5076 7.5076 0 004.7611-3.2768A1.5369 1.5369 0 0029.8439 13.0347zM19 22H8a3.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 22zm5.5974-6.1289a5.9661 5.9661 0 00-3.948-3.627 7.49 7.49 0 00-2.489-3.58 5.9018 5.9018 0 013.6381-4.4473 8.4577 8.4577 0 001.94 7.5967A7.4007 7.4007 0 0027.64 14.041 5.4487 5.4487 0 0124.5974 15.8711z\"></path></svg>"
},
};
}
SnowScatteredNightDirective_1 = SnowScatteredNightDirective;
SnowScatteredNightDirective.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;
SnowScatteredNightDirective_1.titleIdCounter++;
title.setAttribute("id", "snow-scattered-night-" + SnowScatteredNightDirective_1.titleIdCounter);
svg.appendChild(title);
svg.setAttribute("aria-labelledby", "snow-scattered-night-" + SnowScatteredNightDirective_1.titleIdCounter);
}
};
var SnowScatteredNightDirective_1;
SnowScatteredNightDirective.titleIdCounter = 0;
SnowScatteredNightDirective.ctorParameters = function () { return [
{ type: core.ElementRef }
]; };
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightDirective.prototype, "ariaLabel", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightDirective.prototype, "ariaLabelledby", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], SnowScatteredNightDirective.prototype, "ariaHidden", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightDirective.prototype, "title", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], SnowScatteredNightDirective.prototype, "isFocusable", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], SnowScatteredNightDirective.prototype, "size", void 0);
SnowScatteredNightDirective = SnowScatteredNightDirective_1 = tslib.__decorate([
core.Directive({
selector: "[ibmIconSnowScatteredNight]"
}),
tslib.__metadata("design:paramtypes", [core.ElementRef])
], SnowScatteredNightDirective);
return SnowScatteredNightDirective;
}());
var SnowScatteredNightModule = /** @class */ (function () {
function SnowScatteredNightModule() {
}
SnowScatteredNightModule = tslib.__decorate([
core.NgModule({
declarations: [
SnowScatteredNightComponent,
SnowScatteredNightDirective,
],
exports: [
SnowScatteredNightComponent,
SnowScatteredNightDirective,
]
})
], SnowScatteredNightModule);
return SnowScatteredNightModule;
}());
exports.SnowScatteredNightComponent = SnowScatteredNightComponent;
exports.SnowScatteredNightDirective = SnowScatteredNightDirective;
exports.SnowScatteredNightModule = SnowScatteredNightModule;
Object.defineProperty(exports, '__esModule', { value: true });
})));