UNPKG

@public-ui/components

Version:

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

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