UNPKG

@kelvininc/ui-components

Version:
1 lines 1.21 kB
import{r as t,c as e,h as s,H as o}from"./p-WTwLUJcM.js";import{c as i}from"./p-COrzvkrr.js";const r=class{constructor(s){t(this,s),this.checkedChange=e(this,"checkedChange",7),this.buttons=[],this.withRadio=!1,this.disabled=!1,this.size=i.Small,this.selectedButtons={},this.disabledButtons={},this.radioButtons={}}render(){return s(o,{key:"b6340ed668eb3bfa6b7774e2ea7655a551cbd1b3"},this.buttons.map((t=>{var e;return s("kv-toggle-button",{part:"toggle-button-container",exportparts:"toggle-button",icon:t.icon,value:t.value,label:t.label,tooltip:t.tooltip,size:null!==(e=this.size)&&void 0!==e?e:t.size,preventDefault:t.preventDefault,checked:this.selectedButtons[t.value]||t.checked,disabled:this.disabled||this.disabledButtons[t.value]||t.disabled,withRadio:this.withRadio||this.radioButtons[t.value]||t.withRadio,customAttributes:t.customAttributes})})))}};r.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}:host{display:flex;gap:var(--spacing-xs);--toggle-group-width:unset}:host>kv-toggle-button{width:var(--toggle-group-width)}';export{r as kv_toggle_button_group}