@transkripid/flowbite-react
Version:
Official React components built for Flowbite and Tailwind CSS - Transkrip.id fork
3 lines (2 loc) • 2.4 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),F=require("react/compiler-runtime"),O=require("react"),H=require("tailwind-merge"),P=require("../../helpers/merge-deep.js"),$=require("../../theme-store/index.js"),k=require("../HelperText/HelperText.js"),A=O.forwardRef((R,M)=>{const e=F.c(48);let s,l,n,r,o,d,a,N,T,c,b;e[0]!==R?({addon:n,className:r,color:N,helperText:o,icon:s,rightIcon:l,shadow:a,sizing:T,theme:c,type:b,...d}=R,e[0]=R,e[1]=s,e[2]=l,e[3]=n,e[4]=r,e[5]=o,e[6]=d,e[7]=a,e[8]=N,e[9]=T,e[10]=c,e[11]=b):(s=e[1],l=e[2],n=e[3],r=e[4],o=e[5],d=e[6],a=e[7],N=e[8],T=e[9],c=e[10],b=e[11]);const f=N===void 0?"gray":N,z=T===void 0?"md":T;let q;e[12]!==c?(q=c===void 0?{}:c,e[12]=c,e[13]=q):q=e[13];const S=q,D=b===void 0?"text":b;let u,p,h,m,g,x;if(e[14]!==s||e[15]!==l||e[16]!==n||e[17]!==r||e[18]!==f||e[19]!==S||e[20]!==a||e[21]!==z){const t=P.mergeDeep($.getTheme().textInput,S);u=H.twMerge(t.base,r),p=n&&i.jsx("span",{className:t.addon,children:n}),m=t.field.base,g=s&&i.jsx("div",{className:t.field.icon.base,children:i.jsx(s,{className:t.field.icon.svg})}),x=l&&i.jsx("div",{"data-testid":"right-icon",className:t.field.rightIcon.base,children:i.jsx(l,{className:t.field.rightIcon.svg})}),h=H.twMerge(t.field.input.base,t.field.input.colors[f],t.field.input.sizes[z],t.field.input.withIcon[s?"on":"off"],t.field.input.withRightIcon[l?"on":"off"],t.field.input.withAddon[n?"on":"off"],t.field.input.withShadow[a?"on":"off"]),e[14]=s,e[15]=l,e[16]=n,e[17]=r,e[18]=f,e[19]=S,e[20]=a,e[21]=z,e[22]=u,e[23]=p,e[24]=h,e[25]=m,e[26]=g,e[27]=x}else u=e[22],p=e[23],h=e[24],m=e[25],g=e[26],x=e[27];let j;e[28]!==d||e[29]!==M||e[30]!==h||e[31]!==D?(j=i.jsx("input",{className:h,type:D,...d,ref:M}),e[28]=d,e[29]=M,e[30]=h,e[31]=D,e[32]=j):j=e[32];let v;e[33]!==j||e[34]!==m||e[35]!==g||e[36]!==x?(v=i.jsxs("div",{className:m,children:[g,x,j]}),e[33]=j,e[34]=m,e[35]=g,e[36]=x,e[37]=v):v=e[37];let I;e[38]!==u||e[39]!==p||e[40]!==v?(I=i.jsxs("div",{className:u,children:[p,v]}),e[38]=u,e[39]=p,e[40]=v,e[41]=I):I=e[41];let w;e[42]!==f||e[43]!==o?(w=o&&i.jsx(k.HelperText,{color:f,children:o}),e[42]=f,e[43]=o,e[44]=w):w=e[44];let y;return e[45]!==I||e[46]!==w?(y=i.jsxs(i.Fragment,{children:[I,w]}),e[45]=I,e[46]=w,e[47]=y):y=e[47],y});A.displayName="TextInput";exports.TextInput=A;
//# sourceMappingURL=TextInput.js.map