UNPKG

@telekom/scale-components

Version:

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

40 lines (34 loc) 2.53 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-a0ea3d79.js'); 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 ActionArrange = class { constructor(hostRef) { index.registerInstance(this, hostRef); /** (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 (index.h(index.Host, null, index.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 && index.h("title", null, this.accessibilityTitle), index.h("g", { fill: ((this.fill === 'currentColor') ? this.color : this.fill) }, this.selected ? (index.h("g", null, index.h("path", { d: "M5.25 1l3.6 5.5H6.5V17h2.35l-3.6 5.5-3.6-5.5H4V6.5H1.65L5.25 1zm15.499 15.52a1.25 1.25 0 01.128 2.494l-.128.007H11v-2.5h9.749zM11 10.477l9.753.034a1.25 1.25 0 01.123 2.494l-.132.006L11 12.976v-2.5zM20.749 4.5a1.25 1.25 0 01.128 2.493L20.749 7H11V4.5h9.749z", "fill-rule": "evenodd" }))) : (index.h("g", null, index.h("path", { d: "M22 5.75a.75.75 0 00-.75-.75H11v1.5h10.25a.75.75 0 00.75-.75zM8.85 6.5L5.25 1l-3.6 5.5H4.5V17H1.65l3.6 5.5 3.6-5.5H6V6.5h2.85zm12.4 4.5H11v1.5h10.25a.75.75 0 100-1.5zm0 6H11v1.5h10.25a.75.75 0 100-1.5z", "fill-rule": "evenodd" }))))))); } get hostElement() { return index.getElement(this); } }; ActionArrange.style = iconCss; exports.scale_icon_action_arrange = ActionArrange;