@kelvininc/ui-components
Version:
Kelvin UI Components
1 lines • 2.42 kB
JavaScript
import{r as t,c as i,h as o,H as a}from"./p-D-JVwta2.js";import{a as e}from"./p-DzZLIMy0.js";import"./p-DwRzddFC.js";import{i as n}from"./p-BA_npyc9.js";import"./p-CiDQ1Z66.js";import"./p-DfPM2t43.js";import"./p-Dkd2PDJ-.js";const s=class{constructor(o){t(this,o),this.clickButton=i(this,"clickButton",7),this.focusButton=i(this,"focusButton",7),this.blurButton=i(this,"blurButton",7),this.disabled=!1,this.active=!1,this.loading=!1,this.size=e.Small}render(){return o(a,{key:"25dbc3f7db60a9da257979cc7282d23cbd5a7cdd"},o("div",{key:"1b8e9ce8e9592f88e65e65dbe99e845befdd1359",class:{"action-button-icon":!0,[`action-button-icon--size-${this.size}`]:!0}},o("kv-action-button",{key:"1e36e61292a0c4d82a3df7fe0f477c13ee4874af",type:this.type,active:this.active,loading:this.loading,size:this.size,disabled:this.disabled,exportparts:"button"},o("kv-icon",{key:"8ea12e905429bd969581935046dc8bbf5aa7f89f",name:this.icon,exportparts:"icon"}),!n(this.badgeLabel)&&o("div",{key:"0bcf0b5bef891aaa284b01df38a3cfd346428dcf",class:"button-badge",exportparts:"badge"},o("kv-badge",{key:"d4abe78228d53bca4a7bade95f2d6de67712d9b1",state:this.badgeState},this.badgeLabel)))))}};s.style='@property --rotation{syntax:"<angle>";initial-value:0deg;inherits:false}@keyframes rotate-border{to{--rotation:360deg}}:host{--button-size-large:36px;--button-size-small:28px;--button-icon-large-width:24px;--button-icon-large-height:24px;--button-icon-small-height:20px;--button-icon-small-width:20px;position:relative}.action-button-icon--size-large kv-action-button::part(button){width:var(--button-size-large)}.action-button-icon--size-large kv-icon{--icon-width:var(--button-icon-large-width);--icon-height:var(--button-icon-large-height)}.action-button-icon--size-small kv-action-button::part(button){width:var(--button-size-small)}.action-button-icon--size-small kv-icon{--icon-width:var(--button-icon-small-width);--icon-height:var(--button-icon-small-height)}kv-action-button{--background-color-active-tertiary:var(--kv-neutral-5, #707070);--border-color-active-tertiary:var(--kv-neutral-4, #bebebe);--text-color-active-tertiary:var(--kv-neutral-4, #bebebe);--button-padding-x-small:0;--button-height-large:var(--button-size-large);--button-height-small:var(--button-size-small);display:flex}kv-action-button::part(button){justify-content:center}.button-badge{position:absolute;z-index:1;top:-5px;right:-5px}';export{s as kv_action_button_icon}