@kelvininc/ui-components
Version:
Kelvin UI Components
1 lines • 1.55 kB
JavaScript
import{r as t,c as r,h as e,H as o}from"./p-WTwLUJcM.js";import{c as i}from"./p-COrzvkrr.js";const s=class{constructor(e){t(this,e),this.checkedChange=r(this,"checkedChange",7),this.options=[],this.disabled=!1,this.size=i.Small,this.selectedOption="",this.disabledButtons={}}render(){return e(o,{key:"3d72ccf4578635b32fe65a1d177a006dc7945598"},e("div",{key:"037f38ff83df0d9facdf303113b4b3a58a2f54f9",class:"toggle-switch-container"},this.options.map((t=>{var r;return e("kv-toggle-button",{part:"toggle-switch-option-container",exportparts:"toggle-button",icon:t.icon,value:t.value,label:t.label,tooltip:t.tooltip,size:null!==(r=this.size)&&void 0!==r?r:t.size,preventDefault:t.preventDefault,checked:this.selectedOption===t.value,disabled:this.disabled||this.disabledButtons[t.value]||t.disabled,customAttributes:t.customAttributes})}))))}};s.style='@property --rotation{syntax:"<angle>";initial-value:0deg;inherits:false}@keyframes rotate-border{to{--rotation:360deg}}kv-dropdown-base:not(.hydrated)>[slot=list]{display:none}.toggle-switch-container{display:flex}.toggle-switch-container>:last-child{--border-radius-top-right:var(--toggle-radius-default);--border-radius-bottom-right:var(--toggle-radius-default)}.toggle-switch-container>:first-child{--border-radius-top-left:var(--toggle-radius-default);--border-radius-bottom-left:var(--toggle-radius-default)}.toggle-switch-container kv-toggle-button{--border-radius-top-right:0;--border-radius-bottom-right:0;--border-radius-top-left:0;--border-radius-bottom-left:0}';export{s as kv_toggle_switch}