UNPKG

@kelvininc/ui-components

Version:
35 lines (31 loc) 2.44 kB
import { r as registerInstance, h, H as Host } from './index-D-JVwta2.js'; import { g as getClassMap } from './css-class.helper-DKOxy79t.js'; import { g as getConfig } from './utils-Cx1GRYZc.js'; import './config-CJMopqu5.js'; import './components-DzZLIMy0.js'; import './lib-config-DwRzddFC.js'; import './action-button.types-DVds6a5Z.js'; import './absolute-time-picker-dropdown.types-CojoW2Y2.js'; import './icon.types-SVedE_O8.js'; import './summary-card.types-BcMhjKoS.js'; import './toaster.types-vhHhaF4Q.js'; import './tree-item.types-CBuzk8fR.js'; import './tag-alarm.types-DHk26cGe.js'; import './wizard.types-7ioMFMb5.js'; import './isNil-DjSNdVAB.js'; const iconCss = "@property --rotation{syntax:\"<angle>\";initial-value:0deg;inherits:false}@keyframes rotate-border{to{--rotation:360deg}}:host{--icon-color:var(--kv-text, #fff);--icon-height:16px;--icon-width:16px;--icon-rotation:0deg}.icon{display:flex;fill:var(--icon-color);width:var(--icon-width);height:var(--icon-height);transform:rotate(var(--icon-rotation));}.icon.icon-8{width:8px;height:8px}.icon.icon-12{width:12px;height:12px}.icon.icon-16{width:16px;height:16px}.icon.icon-20{width:20px;height:20px}.icon.icon-24{width:24px;height:24px}.icon.icon-40{width:40px;height:40px}.icon.icon-full-size{width:100%;height:100%}.icon.rotate-0{transform:rotate(0deg)}.icon.rotate-45{transform:rotate(45deg)}.icon.rotate-90{transform:rotate(90deg)}.icon.rotate-135{transform:rotate(135deg)}.icon.rotate-180{transform:rotate(180deg)}.icon.rotate-225{transform:rotate(225deg)}.icon.rotate-270{transform:rotate(270deg)}.icon.rotate-315{transform:rotate(315deg)}"; const KvIcon = class { constructor(hostRef) { registerInstance(this, hostRef); /** @inheritdoc */ this.customClass = ''; /** (optional) Icon custom color */ this.customColor = ''; } render() { const { baseAssetsUrl, symbolsFileName } = getConfig(); return (h(Host, { key: '5f095de8d3bc27d230cbca4d9c28c236fd1f7deb' }, h("svg", { key: 'dd7cc4f07e440c34313e6fa4f44ea07ada192957', part: "icon", xmlns: "http://www.w3.org/2000/svg", class: Object.assign(Object.assign({}, getClassMap(this.customClass)), { icon: true }), style: { fill: this.customColor } }, h("use", { key: 'a743d25411b98a263946c8da96ea951a5f36bba2', href: `${baseAssetsUrl}${symbolsFileName}#${this.name}` })))); } }; KvIcon.style = iconCss; export { KvIcon as kv_icon };