@telekom/scale-components
Version:
Scale is the digital design system for Telekom products and experiences.
178 lines (177 loc) • 6.22 kB
JavaScript
/**
* @license
* Scale https://github.com/telekom/scale
*
* Copyright (c) 2021 Egor Kirpichev and contributors, Deutsche Telekom AG
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
import { Component, Prop, Host, Element, h } from '@stencil/core';
export class HomeReducedWifi {
constructor() {
/** (optional) The width and height in pixels */
this.size = 24;
/** (optional) Sets the icon color via the `fill` attribute */
this.fill = 'currentColor';
/** (optional) Alias for `fill` */
this.color = 'currentColor';
/** (optional) If `true`, the icon changes visually */
this.selected = false;
/** (optional) If `true` the SVG element will get `aria-hidden="true"` */
this.decorative = false;
/** (optional) If `true` the icon can receive focus */
this.focusable = false;
}
connectedCallback() {
if (!this.hostElement.hasAttribute('styles')) {
this.hostElement.style.display = 'inline-flex';
}
}
render() {
const ariaHidden = this.decorative ? { 'aria-hidden': 'true' } : {};
const focusable = this.focusable ? { tabindex: 0 } : {};
return (h(Host, null,
h("svg", Object.assign({ class: "scale-icon", xmlns: "http://www.w3.org/2000/svg", width: this.size, height: this.size, viewBox: "0 0 24 24" }, ariaHidden, focusable),
this.accessibilityTitle && h("title", null, this.accessibilityTitle),
h("g", { fill: ((this.fill === 'currentColor') ? this.color : this.fill) }, this.selected ? (h("g", null,
h("path", { d: "M18.25 4.25a.75.75 0 10-1.5 0V13h-3.175l3.925 6 3.925-6H18.25V4.25zm-3.3 7.25h.3v-2a11 11 0 00-11.825 3.61l1.41 1.46A8.97 8.97 0 0114.95 11.5zm.3-4.6V4.845a15.5 15.5 0 00-14.965 5L1.68 11.3a13.475 13.475 0 0113.57-4.4zM12 18a2 2 0 100 4 2 2 0 000-4zm1.62-2.19l-1.3-2-.21-.31H12a6.5 6.5 0 00-5.405 2.895l1.435 1.5a4.47 4.47 0 015.59-2.075v-.01zm6.13-9.225V8.95a13.5 13.5 0 012.57 2.35l1.395-1.445a15.61 15.61 0 00-3.965-3.27z", "fill-rule": "evenodd" }))) : (h("g", null,
h("path", { d: "M12 18a2 2 0 110 4 2 2 0 010-4zm5.5-14.5a.75.75 0 01.744.648l.006.102V13h3.177L17.5 19l-3.927-6h3.177V4.25a.75.75 0 01.75-.75zm-5.388 10.007l1.508 2.303a4.478 4.478 0 00-5.486 1.888l-.105.185-1.436-1.49a6.465 6.465 0 015.241-2.885l.278-.001zM12 9c.99 0 1.95.133 2.862.38l.389.112v2.12a8.97 8.97 0 00-10.236 2.73l-.18.228-1.408-1.459A10.977 10.977 0 0112 9zm0-4.5c.956 0 1.891.09 2.799.256l.452.09v2.053a13.463 13.463 0 00-13.342 4.137l-.229.264L.287 9.855A15.459 15.459 0 0112 4.5zm7.75 2.082a15.625 15.625 0 013.65 2.923l.313.35-1.393 1.444c-.657-.777-1.401-1.479-2.216-2.091l-.354-.258V6.582z", "fill-rule": "evenodd" })))))));
}
static get is() { return "scale-icon-home-reduced-wifi"; }
static get originalStyleUrls() { return {
"$": ["../../icon/icon.css"]
}; }
static get styleUrls() { return {
"$": ["../../icon/icon.css"]
}; }
static get properties() { return {
"size": {
"type": "number",
"mutable": false,
"complexType": {
"original": "number",
"resolved": "number",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) The width and height in pixels"
},
"attribute": "size",
"reflect": true,
"defaultValue": "24"
},
"fill": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) Sets the icon color via the `fill` attribute"
},
"attribute": "fill",
"reflect": false,
"defaultValue": "'currentColor'"
},
"color": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) Alias for `fill`"
},
"attribute": "color",
"reflect": false,
"defaultValue": "'currentColor'"
},
"selected": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) If `true`, the icon changes visually"
},
"attribute": "selected",
"reflect": true,
"defaultValue": "false"
},
"decorative": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) If `true` the SVG element will get `aria-hidden=\"true\"`"
},
"attribute": "decorative",
"reflect": false,
"defaultValue": "false"
},
"accessibilityTitle": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) When using the icon standalone, make it meaningful for accessibility"
},
"attribute": "accessibility-title",
"reflect": false
},
"focusable": {
"type": "boolean",
"mutable": false,
"complexType": {
"original": "boolean",
"resolved": "boolean",
"references": {}
},
"required": false,
"optional": true,
"docs": {
"tags": [],
"text": "(optional) If `true` the icon can receive focus"
},
"attribute": "focusable",
"reflect": false,
"defaultValue": "false"
}
}; }
static get elementRef() { return "hostElement"; }
}