UNPKG

@public-ui/components

Version:

Contains all web components that belong to KoliBri - The accessible HTML-Standard.

5 lines 935 B
/*! * KoliBri - The accessible HTML-Standard */ import{h as o}from"./index-BQlHOxik.js";import{b as s}from"./bem-registry-CWvl2xho.js";import"./common-Cx_AGO_M.js";import{l as t}from"./label-KTv-zMW0.js";import"./variant-quote-y0Z1TRdz.js";import{B as l}from"./base-controller-CXhqh4cR.js";const i=s.forBlock("kol-click-button");const e=i();const n=i("label");const c=({label:s,handleClick:t,refButton:l})=>o("button",{class:e,ref:l,onClick:t,onKeyDown:o=>o.preventDefault()},o("span",{class:n},s));const r={required:[t]};class a extends l{constructor(o){super(o,r);this.handleClick=()=>{console.log(this,this.buttonRef,"button clicked")};this.setButtonRef=o=>{this.buttonRef=o}}componentWillLoad(o){const{label:s}=o;this.watchLabel(s)}watchLabel(o){t.apply(o,(o=>{this.setRenderProp("label",o)}))}focus(){var o;(o=this.buttonRef)===null||o===void 0?void 0:o.focus()}}export{c as C,a}; //# sourceMappingURL=controller-osuRO7S2.js.map