@carbon/icons-angular
Version:
Angular components for icons in digital and software products using the Carbon Design System
177 lines (172 loc) • 15 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.DirectionRotaryStraightFilled = {}), global.tslib, global.ng.core, global.CarbonIconHelpers));
}(this, (function (exports, tslib, core, iconHelpers) { 'use strict';
var DirectionRotaryStraightFilledComponent = /** @class */ (function () {
function DirectionRotaryStraightFilledComponent() {
this.focusable = false;
}
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledComponent.prototype, "ariaLabel", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledComponent.prototype, "ariaLabelledby", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], DirectionRotaryStraightFilledComponent.prototype, "ariaHidden", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledComponent.prototype, "title", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], DirectionRotaryStraightFilledComponent.prototype, "focusable", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledComponent.prototype, "innerClass", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledComponent.prototype, "size", void 0);
DirectionRotaryStraightFilledComponent = tslib.__decorate([
core.Component({
selector: "ibm-icon-direction-rotary-straight-filled",
template: "\n <svg\n ibmIconDirectionRotaryStraightFilled\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 "
})
], DirectionRotaryStraightFilledComponent);
return DirectionRotaryStraightFilledComponent;
}());
var DirectionRotaryStraightFilledDirective = /** @class */ (function () {
function DirectionRotaryStraightFilledDirective(elementRef) {
this.elementRef = elementRef;
this.isFocusable = false;
this.icons = {
"32": {
metadata: { "moduleName": "DirectionRotaryStraightFilled32", "filepath": "direction--rotary--straight--filled/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": "circle", "attrs": { "cx": "16", "cy": "19", "r": "3" } }, { "elem": "path", "attrs": { "d": "M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z" } }, { "elem": "path", "attrs": { "fill": "none", "d": "M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z", "data-icon-path": "inner-path" } }], "name": "direction--rotary--straight--filled", "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\"><circle cx=\"16\" cy=\"19\" r=\"3\"></circle><path d=\"M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z\"></path><path fill=\"none\" d=\"M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z\" data-icon-path=\"inner-path\"></path></svg>"
},
"24": {
metadata: { "moduleName": "DirectionRotaryStraightFilled24", "filepath": "direction--rotary--straight--filled/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": "circle", "attrs": { "cx": "16", "cy": "19", "r": "3" } }, { "elem": "path", "attrs": { "d": "M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z" } }, { "elem": "path", "attrs": { "fill": "none", "d": "M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z", "data-icon-path": "inner-path" } }], "name": "direction--rotary--straight--filled", "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\"><circle cx=\"16\" cy=\"19\" r=\"3\"></circle><path d=\"M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z\"></path><path fill=\"none\" d=\"M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z\" data-icon-path=\"inner-path\"></path></svg>"
},
"20": {
metadata: { "moduleName": "DirectionRotaryStraightFilled20", "filepath": "direction--rotary--straight--filled/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": "circle", "attrs": { "cx": "16", "cy": "19", "r": "3" } }, { "elem": "path", "attrs": { "d": "M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z" } }, { "elem": "path", "attrs": { "fill": "none", "d": "M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z", "data-icon-path": "inner-path" } }], "name": "direction--rotary--straight--filled", "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\"><circle cx=\"16\" cy=\"19\" r=\"3\"></circle><path d=\"M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z\"></path><path fill=\"none\" d=\"M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z\" data-icon-path=\"inner-path\"></path></svg>"
},
"16": {
metadata: { "moduleName": "DirectionRotaryStraightFilled16", "filepath": "direction--rotary--straight--filled/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": "circle", "attrs": { "cx": "16", "cy": "19", "r": "3" } }, { "elem": "path", "attrs": { "d": "M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z" } }, { "elem": "path", "attrs": { "fill": "none", "d": "M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z", "data-icon-path": "inner-path" } }], "name": "direction--rotary--straight--filled", "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\"><circle cx=\"16\" cy=\"19\" r=\"3\"></circle><path d=\"M28,2H4A2,2,0,0,0,2,4V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V4A2,2,0,0,0,28,2ZM21.5859,12.4141,17,7.8281v6.273a5,5,0,0,1,0,9.7978V28H15V23.8989a5,5,0,0,1,0-9.7978V7.8281l-4.5859,4.586L9,11l7-7,7,7Z\"></path><path fill=\"none\" d=\"M21.5859,12.4141,23,11,16,4,9,11l1.4141,1.4141L15,7.8281v6.273a5,5,0,0,0,0,9.7978V28h2V23.8989a5,5,0,0,0,0-9.7978V7.8281ZM19,19a3,3,0,1,1-3-3A3.0033,3.0033,0,0,1,19,19Z\" data-icon-path=\"inner-path\"></path></svg>"
},
};
}
DirectionRotaryStraightFilledDirective_1 = DirectionRotaryStraightFilledDirective;
DirectionRotaryStraightFilledDirective.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;
DirectionRotaryStraightFilledDirective_1.titleIdCounter++;
title.setAttribute("id", "direction-rotary-straight-filled-" + DirectionRotaryStraightFilledDirective_1.titleIdCounter);
svg.appendChild(title);
svg.setAttribute("aria-labelledby", "direction-rotary-straight-filled-" + DirectionRotaryStraightFilledDirective_1.titleIdCounter);
}
};
var DirectionRotaryStraightFilledDirective_1;
DirectionRotaryStraightFilledDirective.titleIdCounter = 0;
DirectionRotaryStraightFilledDirective.ctorParameters = function () { return [
{ type: core.ElementRef }
]; };
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledDirective.prototype, "ariaLabel", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledDirective.prototype, "ariaLabelledby", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], DirectionRotaryStraightFilledDirective.prototype, "ariaHidden", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledDirective.prototype, "title", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", Boolean)
], DirectionRotaryStraightFilledDirective.prototype, "isFocusable", void 0);
tslib.__decorate([
core.Input(),
tslib.__metadata("design:type", String)
], DirectionRotaryStraightFilledDirective.prototype, "size", void 0);
DirectionRotaryStraightFilledDirective = DirectionRotaryStraightFilledDirective_1 = tslib.__decorate([
core.Directive({
selector: "[ibmIconDirectionRotaryStraightFilled]"
}),
tslib.__metadata("design:paramtypes", [core.ElementRef])
], DirectionRotaryStraightFilledDirective);
return DirectionRotaryStraightFilledDirective;
}());
var DirectionRotaryStraightFilledModule = /** @class */ (function () {
function DirectionRotaryStraightFilledModule() {
}
DirectionRotaryStraightFilledModule = tslib.__decorate([
core.NgModule({
declarations: [
DirectionRotaryStraightFilledComponent,
DirectionRotaryStraightFilledDirective,
],
exports: [
DirectionRotaryStraightFilledComponent,
DirectionRotaryStraightFilledDirective,
]
})
], DirectionRotaryStraightFilledModule);
return DirectionRotaryStraightFilledModule;
}());
exports.DirectionRotaryStraightFilledComponent = DirectionRotaryStraightFilledComponent;
exports.DirectionRotaryStraightFilledDirective = DirectionRotaryStraightFilledDirective;
exports.DirectionRotaryStraightFilledModule = DirectionRotaryStraightFilledModule;
Object.defineProperty(exports, '__esModule', { value: true });
})));