UNPKG

@public-ui/components

Version:

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

4 lines 1.07 kB
/*! * KoliBri - The accessible HTML-Standard */ import{_ as __rest}from"./Heading-D6_TFw6T.js";import{h,F as Fragment}from"./index-CElQfBOC.js";import{c as clsx}from"./clsx-eK3rPvPS.js";import"./common-7RW_NFNf.js";import{e as getDefaultProps,c as checkHasMsg}from"./FormFieldStateWrapper-BlcmQgCr.js";const InputFc=e=>{const{class:s,msg:a,required:l,disabled:r,touched:o,readonly:i,ariaDescribedBy:t,hideLabel:n,label:d,suggestions:c,value:u}=e,p=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),g=checkHasMsg(a,o),m={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(l),"kol-input--touched":Boolean(o),"kol-input--readonly":Boolean(i),[`kol-input--${(null==a?void 0:a.type)||"error"}`]:g},b=Object.assign(Object.assign({class:clsx("kol-input",m,s),required:l,disabled:r,readonly:i,type:"text",list:c?`${p.id}-list`:void 0},getDefaultProps({ariaDescribedBy:t,hideLabel:n,label:d})),p);return h(Fragment,null,h("input",Object.assign({},b,{value:u})),c)};export{InputFc as I};