UNPKG

@kelvininc/ui-components

Version:
37 lines (32 loc) 2.48 kB
'use strict'; var index = require('./index-DpuMIXDY.js'); var cssClass_helper = require('./css-class.helper-B7G6WFT7.js'); var utils = require('./utils-B3rsVRCe.js'); require('./config-TIjltaxO.js'); require('./components-D2lyDQ_a.js'); require('./lib-config-QLtHwxiM.js'); require('./action-button.types-BYOe6st0.js'); require('./absolute-time-picker-dropdown.types-mPwO9zQk.js'); require('./icon.types-B8lvUrX_.js'); require('./summary-card.types-W26sTdH1.js'); require('./toaster.types-DlSCye8T.js'); require('./tree-item.types-C2yRoORC.js'); require('./tag-alarm.types-BeZw-7PT.js'); require('./wizard.types-DTbE-B6d.js'); require('./isNil-B-fGcnNC.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) { index.registerInstance(this, hostRef); /** @inheritdoc */ this.customClass = ''; /** (optional) Icon custom color */ this.customColor = ''; } render() { const { baseAssetsUrl, symbolsFileName } = utils.getConfig(); return (index.h(index.Host, { key: '5f095de8d3bc27d230cbca4d9c28c236fd1f7deb' }, index.h("svg", { key: 'dd7cc4f07e440c34313e6fa4f44ea07ada192957', part: "icon", xmlns: "http://www.w3.org/2000/svg", class: Object.assign(Object.assign({}, cssClass_helper.getClassMap(this.customClass)), { icon: true }), style: { fill: this.customColor } }, index.h("use", { key: 'a743d25411b98a263946c8da96ea951a5f36bba2', href: `${baseAssetsUrl}${symbolsFileName}#${this.name}` })))); } }; KvIcon.style = iconCss; exports.kv_icon = KvIcon;