@public-ui/components
Version:
Contains all web components that belong to KoliBri - The accessible HTML-Standard.
4 lines • 1.17 kB
JavaScript
/*!
* KoliBri - The accessible HTML-Standard
*/
;var tslib_es6=require("./tslib.es6-7DbU_BSw.js"),index=require("./index-C4Loo2IH.js"),clsx=require("./clsx-CkZlkaek.js");require("./common-Cd2qH809.js");var FormFieldStateWrapper=require("./FormFieldStateWrapper-Ci-xqnPO.js");const InputFc=e=>{const{class:r,msg:i,required:s,disabled:l,touched:a,readonly:t,ariaDescribedBy:o,hideLabel:d,label:n,suggestions:u,value:c}=e,p=tslib_es6.__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),b=FormFieldStateWrapper.checkHasMsg(i,a),g="string"==typeof i?"error":null==i?void 0:i._type,x={"kol-input--disabled":Boolean(l),"kol-input--required":Boolean(s),"kol-input--touched":Boolean(a),"kol-input--readonly":Boolean(t),[`kol-input--${g||"error"}`]:b},F=Object.assign(Object.assign({class:clsx.clsx("kol-input",x,r),required:s,disabled:l,readonly:t,type:"text",list:u?`${p.id}-list`:void 0},FormFieldStateWrapper.getDefaultProps({ariaDescribedBy:o,hideLabel:d,label:n})),p);return index.h(index.Fragment,null,index.h("input",Object.assign({},F,{value:c})),u)};exports.InputFc=InputFc;