UNPKG

@public-ui/components

Version:

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

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