UNPKG

@public-ui/components

Version:

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

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