UNPKG

@telekom/scale-components

Version:

Scale is the digital design system for Telekom products and experiences.

61 lines (56 loc) 3.56 kB
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client'; const iconCss = "scale-icon{--display:inline-flex;--transition:all var(--telekom-motion-duration-transition)\n var(--telekom-motion-easing-standard);display:var(--display)}scale-icon path{transition:var(--transition)}@media screen and (forced-colors: active), (-ms-high-contrast: active){scale-icon svg,.scale-icon{color:white;stroke:white}}"; const ContentThreats = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement { constructor() { super(); this.__registerHost(); /** (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: "M12 .998c5.171 0 9.377 4.205 9.377 9.376a9.297 9.297 0 01-3.141 6.986l-.236.203V20a3.003 3.003 0 01-2.823 2.995L15 23h-.502v-3.014h-1.5V23h-1.997v-3.014h-1.5V23H9a3.003 3.003 0 01-2.994-2.824L6 20v-2.438a9.303 9.303 0 01-3.376-7.189c0-5.17 4.206-9.375 9.377-9.375zM13 15h-2v2.5h2V15zm2.5-5a2 2 0 100 4 2 2 0 000-4zm-7 0a2 2 0 100 4 2 2 0 000-4z", "fill-rule": "evenodd" }))) : (h("g", null, h("path", { d: "M12 .998c-5.17 0-9.376 4.205-9.376 9.375A9.303 9.303 0 006 17.563V20c0 1.654 1.346 3 3 3h6c1.654 0 3-1.346 3-3v-2.438a9.304 9.304 0 003.377-7.188c0-5.17-4.206-9.377-9.377-9.377zm4.792 15.61l-.292.226V20c0 .827-.673 1.5-1.5 1.5h-.5V19H13v2.5h-2V19H9.5v2.5H9c-.827 0-1.5-.673-1.5-1.5v-3.166l-.292-.226c-1.96-1.51-3.084-3.783-3.084-6.235 0-4.342 3.533-7.875 7.876-7.875s7.877 3.532 7.877 7.875c0 2.453-1.124 4.725-3.085 6.236zM8.5 10a2 2 0 100 4 2 2 0 000-4zm7 0a2 2 0 100 4 2 2 0 000-4zM11 17.5h2V15h-2v2.5z", "fill-rule": "evenodd" }))))))); } get hostElement() { return this; } static get style() { return iconCss; } }, [0, "scale-icon-content-threats", { "size": [514], "fill": [1], "color": [1], "selected": [516], "decorative": [4], "accessibilityTitle": [1, "accessibility-title"], "focusable": [4] }]); function defineCustomElement$1() { if (typeof customElements === "undefined") { return; } const components = ["scale-icon-content-threats"]; components.forEach(tagName => { switch (tagName) { case "scale-icon-content-threats": if (!customElements.get(tagName)) { customElements.define(tagName, ContentThreats); } break; } }); } const ScaleIconContentThreats = ContentThreats; const defineCustomElement = defineCustomElement$1; export { ScaleIconContentThreats, defineCustomElement };