UNPKG

@kelvininc/ui-components

Version:
26 lines (22 loc) 1.54 kB
import { r as registerInstance, c as createEvent, h, H as Host } from './index-BOTigrTZ.js'; import './wizard.types-COrzvkrr.js'; const radioListCss = "@property --rotation{syntax:\"<angle>\";initial-value:0deg;inherits:false}@keyframes rotate-border{to{--rotation:360deg}}kv-dropdown-base:not(.hydrated)>[slot=list]{display:none}.radio-list-items{display:flex;flex-direction:column;gap:var(--spacing-md)}"; const KvRadioList = class { constructor(hostRef) { registerInstance(this, hostRef); this.optionSelected = createEvent(this, "optionSelected", 7); /** @inheritdoc */ this.required = false; this.onOptionClick = ({ detail }) => { this.optionSelected.emit(detail); }; } render() { return (h(Host, { key: 'e79d68404d65dc53382a6ba57eec123e817fd6ed' }, this.label && h("kv-form-label", { key: '2aacc1a83fc04dfb35d14c1308eee1576aef9968', label: this.label, required: this.required }), h("div", { key: '69d019f1bd664201f5c3f58e0e58443b82cb1fb5', class: "radio-list-items", part: "items-container" }, this.options.map(item => { var _a; return (h("kv-radio-list-item", Object.assign({}, item, { key: item.optionId, checked: this.selectedOption === item.optionId, disabled: item.disabled || ((_a = this.disabledOptions) === null || _a === void 0 ? void 0 : _a[item.optionId]), class: "radio-list-item", onOptionClick: this.onOptionClick }))); })))); } }; KvRadioList.style = radioListCss; export { KvRadioList as kv_radio_list };