UNPKG

@telekom/scale-components

Version:

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

61 lines (56 loc) 3.33 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 ActionMinimizeScreen = /*@__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: "M11.245 12.755l-1.76 8.43-2.45-2.45L2.88 22.89a1.252 1.252 0 01-1.868-1.66l.098-.11 4.155-4.155-2.45-2.465 8.43-1.745zM22.005.743c.332 0 .65.132.885.367a1.25 1.25 0 01.096 1.68l-.096.105-4.155 4.155 2.45 2.45-8.43 1.745 1.745-8.43 2.465 2.45L21.12 1.11a1.25 1.25 0 01.885-.367z", "fill-rule": "evenodd" }))) : (h("g", null, h("path", { d: "M11.245 12.755l-1.76 8.43L6.68 18.38l-4.155 4.155a.754.754 0 01-.53.22.754.754 0 01-.53-.22.744.744 0 01-.073-.975l.073-.085L5.62 17.32l-2.805-2.805 8.43-1.76zm10.23-11.29a.745.745 0 011.06 0c.268.264.293.68.073.975l-.073.085L18.38 6.68l2.805 2.805-8.43 1.76 1.76-8.43L17.32 5.62l4.155-4.155z", "fill-rule": "evenodd" }))))))); } get hostElement() { return this; } static get style() { return iconCss; } }, [0, "scale-icon-action-minimize-screen", { "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-action-minimize-screen"]; components.forEach(tagName => { switch (tagName) { case "scale-icon-action-minimize-screen": if (!customElements.get(tagName)) { customElements.define(tagName, ActionMinimizeScreen); } break; } }); } const ScaleIconActionMinimizeScreen = ActionMinimizeScreen; const defineCustomElement = defineCustomElement$1; export { ScaleIconActionMinimizeScreen, defineCustomElement };