@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 1.11 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
;const tslib_es6=require("./tslib.es6-5e301284.js"),index=require("./index-a40019ac.js"),clsx=require("./clsx-dd4d6dd1.js");require("./index-94c17ce6.js");const getRenderStates=require("./getRenderStates-8372d842.js"),InputFc=e=>{const{class:s,msg:t,required:i,disabled:l,touched:d,readonly:a,ariaDescribedBy:r,hideLabel:n,label:u,suggestions:o,value:c}=e,b=tslib_es6.__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),g=getRenderStates.checkHasMsg(t,d),p={"kol-input--disabled":Boolean(l),"kol-input--required":Boolean(i),"kol-input--touched":Boolean(d),"kol-input--readonly":Boolean(a),[`kol-input--${(null==t?void 0:t.type)||"error"}`]:g},x=Object.assign(Object.assign({class:clsx.clsx("kol-input",p,s),required:i,disabled:l,readonly:a,type:"text",list:o?`${b.id}-list`:void 0},getRenderStates.getDefaultProps({ariaDescribedBy:r,hideLabel:n,label:u})),b);return index.h(index.Fragment,null,index.h("input",Object.assign({},x,{value:c})),o)};exports.InputFc=InputFc;