UNPKG

@public-ui/components

Version:

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

4 lines 1.15 kB
/*! * KoliBri - The accessible HTML-Standard */ "use strict";var tslib_es6=require("./tslib.es6-7DbU_BSw.js"),index=require("./index-C3uXtd6W.js"),clsx=require("./clsx-CkZlkaek.js");require("./common-1pTy2kta.js");var FormFieldStateWrapper=require("./FormFieldStateWrapper-JRuyDpZT.js");const InputFc=e=>{const{class:i,msg:s,required:r,disabled:l,touched:t,readonly:a,ariaDescribedBy:d,hideLabel:n,label:o,suggestions:u,value:p}=e,c=tslib_es6.__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),b={"kol-input--disabled":Boolean(l),"kol-input--required":Boolean(r),"kol-input--touched":Boolean(t),"kol-input--readonly":Boolean(a),[`kol-input--${FormFieldStateWrapper.getMsgType(s)}`]:FormFieldStateWrapper.isMsgDefinedAndInputTouched(s,t)},g=Object.assign(Object.assign({class:clsx.clsx("kol-input",b,i),required:r,disabled:l,readonly:a,type:"text",list:u?`${c.id}-list`:void 0},FormFieldStateWrapper.getDefaultProps({ariaDescribedBy:d,hideLabel:n,label:o})),c);return index.h(index.Fragment,null,index.h("input",Object.assign({},g,{value:p})),u)};exports.InputFc=InputFc;