UNPKG

@public-ui/components

Version:

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

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