@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 1.03 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
import{_ as __rest}from"./Heading.js";import{h,Fragment}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import"./common.js";import{e as getDefaultProps,c as checkHasMsg}from"./controller2.js";const InputFc=e=>{const{class:s,msg:l,required:a,disabled:o,touched:t,readonly:i,ariaDescribedBy:r,hideLabel:n,label:c,suggestions:d,value:u}=e,p=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),b=checkHasMsg(l,t),g={"kol-input--disabled":Boolean(o),"kol-input--required":Boolean(a),"kol-input--touched":Boolean(t),"kol-input--readonly":Boolean(i),[`kol-input--${(null==l?void 0:l.type)||"error"}`]:b},m=Object.assign(Object.assign({class:clsx("kol-input",g,s),required:a,disabled:o,readonly:i,type:"text",list:d?`${p.id}-list`:void 0},getDefaultProps({ariaDescribedBy:r,hideLabel:n,label:c})),p);return h(Fragment,null,h("input",Object.assign({},m,{value:u})),d)};export{InputFc as I};