@bikdotai/bik-component-library 0.0.476-0 → 0.0.476-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../button/Button.js"),i=require("./Input-helper.js"),r=require("../TypographyStyle.js"),l=require("../../assets/icons/errorInfo.svg.js"),s=require("./context/InputStyleProvider.js"),a=require("./Input.styled.js");const o=t.forwardRef(((o,u)=>{var c,d,h,v,p;const{placeholder:x,leftIcon:g,rightIcon:f,labelText:j,maxCharLimit:y,isRequired:b,hintText:m,type:C,state:I,validate:w,variant:E,button:k,suffixText:S,prefixText:H,onChangeText:O,value:q,noErrorHint:F,reset:L,rangeValidation:M,noKeyDownChange:T,version:B,noMaxCharCheck:R,labelElement:z,autoGrow:A,minHeight:D,maxHeight:K}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},o),P=null==g?void 0:g.icon,G=null==f?void 0:f.icon,[W,_]=t.useState(!1),[N,V]=t.useState(!1),[$,J]=t.useState(),Q="small"===E?"18px":"22px",U=t.useContext(s.InputStyleContext),[X,Y]=t.useState(),Z=t.useRef(null),ee=null!=u?u:Z;t.useEffect((()=>{Y(q)}),[q]),t.useEffect((()=>{var e;ee.current&&(null===(e=o.onReferenceInit)||void 0===e||e.call(o,ee.current))}),[ee]),t.useEffect((()=>{const e=ee.current;if(e&&["phonenumber","zip","number"].includes(C))return e.addEventListener("wheel",re,{passive:!1}),()=>{e.removeEventListener("wheel",re)}}),[]),t.useEffect((()=>{L&&Y("")}),[L]),t.useEffect((()=>{var e;V(!!o.isActive),o.isActive&&(null===(e=ee.current)||void 0===e||e.focus())}),[o.isActive]),t.useEffect((()=>{J(o.errorMessage)}),[o.errorMessage]),t.useEffect((()=>{var e;_(!1),("invalid"===o.state||$||"disabled-invalid"===o.state)&&_(!0),"active"===o.state&&(null===(e=ee.current)||void 0===e||e.focus())}),[o.state,$]),t.useEffect((()=>{_(!!$)}),[$]);const te=function(e){if(i.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e(...n)}},ne=()=>"zip"===C?6:60,ie=e=>{const t=0!==y?y:ne();if(T||O(q||"",e),R)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},re=e=>{e.preventDefault()},le=e=>{let t=e.target.value;const n=0!==y?y+1:ne();!R&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),O(t,e),o.textControl||Y(t),A&&(ee.current.style.height=`${ee.current.scrollHeight}px`,t||(ee.current.style.height=D||"48px"));const r=w||i.validateInput;if(!r||!i.isFunction(r))return;const[l,s]=r(t,C,M);_(!l),J(o.errorMessage?o.errorMessage:s)},se=e=>{var t;o.skipFocus||V(!0),te(null===(t=o.onFocus)||void 0===t?void 0:t.call(o,e))},ae=e=>{var t;o.skipFocus||V(!1),te(null===(t=o.onBlur)||void 0===t?void 0:t.call(o,e))},oe=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==C&&e.jsx("input",{"data-test":o["data-test"],id:o.id,style:null!==(t=null==U?void 0:U.input)&&void 0!==t?t:{},ref:ee,type:["phonenumber","zip","number"].includes(C)?"number":C,value:X,onFocus:e=>se(e),onBlur:e=>ae(e),placeholder:x||"Enter here",onChange:le,onClick:e=>te(o.onClick),onKeyDown:e=>ie(e)}),"multiline"===C&&e.jsx("textarea",{"data-test":o["data-test"],value:X,ref:ee,onFocus:e=>se(e),onBlur:e=>ae(e),onClick:e=>te(o.onClick),placeholder:x||"Enter here",onChange:le,onKeyDown:e=>ie(e),maxLength:y>0?y:void 0})]})};return e.jsxs(a.RootContainer,Object.assign({width:o.width,height:o.height,state:I,type:C,style:null!==(c=null==U?void 0:U.RootContainer)&&void 0!==c?c:{}},{children:[!F&&(!!m||!!$)&&e.jsxs(a.InputFooter,Object.assign({invalid:!!$},{children:[!!$&&e.jsx(l.default,{width:16,height:16}),$||m]})),e.jsxs(a.InputWrapper,Object.assign({variant:E,state:I,width:o.width,isActive:"active"===I||N,isInvalid:W,style:null!==(d=null==U?void 0:U.InputWrapper)&&void 0!==d?d:{},version:B,height:o.height},{children:[!!P&&e.jsx(a.IconHolder,Object.assign({variant:E,iconSize:Q,onClick:()=>te(null==g?void 0:g.callback),isLeft:!0,style:null!==(h=null==U?void 0:U.IconHolder)&&void 0!==h?h:{}},{children:e.jsx(P,{})})),!!H&&e.jsx(a.PrefixHolder,Object.assign({variant:E},{children:H})),"default"===E&&e.jsx(a.InputContainer,Object.assign({height:o.height,type:o.type,minHeight:D,maxHeight:K,autoGrow:A},{children:oe()})),"small"===E&&e.jsx(a.InputContainerSmall,Object.assign({height:o.height,type:o.type},{children:oe()})),!!G&&e.jsx(a.IconHolder,Object.assign({variant:E,iconSize:Q,onClick:()=>te(null==f?void 0:f.callback),isLeft:!1},{children:e.jsx(G,{})})),!!S&&e.jsx(a.SuffixHolder,Object.assign({variant:E},{children:S})),k&&k.text&&e.jsx(n.Button,{buttonText:k.text,onClick:()=>te(null==k?void 0:k.onClick)})]})),(!!j||!!y)&&e.jsxs(a.InputHeader,Object.assign({invalid:W},{children:[z&&z,e.jsxs(r.BodySecondary,{children:[j,b?e.jsx("span",{children:"*"}):""]}),y>0&&e.jsxs(a.MaxCharStyle,{children:[null!==(p=null===(v=o.value)||void 0===v?void 0:v.length)&&void 0!==p?p:0,"/",y]})]}))]}))}));o.displayName="Input",exports.Input=o;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../button/Button.js"),i=require("./Input-helper.js"),r=require("../TypographyStyle.js"),l=require("../../assets/icons/errorInfo.svg.js"),s=require("./context/InputStyleProvider.js"),a=require("./Input.styled.js");const o=t.forwardRef(((o,u)=>{var c,d,h,v,p;const{placeholder:x,leftIcon:g,rightIcon:f,labelText:j,maxCharLimit:y,isRequired:b,hintText:m,type:C,state:I,validate:w,variant:E,button:k,suffixText:S,prefixText:H,onChangeText:O,value:q,noErrorHint:F,reset:L,rangeValidation:M,noKeyDownChange:T,version:B,noMaxCharCheck:R,labelElement:z,autoGrow:A,minHeight:D,maxHeight:K}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},o),P=null==g?void 0:g.icon,G=null==f?void 0:f.icon,[W,_]=t.useState(!1),[N,V]=t.useState(!1),[$,J]=t.useState(),Q="small"===E?"18px":"22px",U=t.useContext(s.InputStyleContext),[X,Y]=t.useState(),Z=t.useRef(null),ee=null!=u?u:Z;t.useEffect((()=>{Y(q),!q&&A&&(ee.current.style.height=D||"48px")}),[q]),t.useEffect((()=>{var e;ee.current&&(null===(e=o.onReferenceInit)||void 0===e||e.call(o,ee.current))}),[ee]),t.useEffect((()=>{const e=ee.current;if(e&&["phonenumber","zip","number"].includes(C))return e.addEventListener("wheel",re,{passive:!1}),()=>{e.removeEventListener("wheel",re)}}),[]),t.useEffect((()=>{L&&Y("")}),[L]),t.useEffect((()=>{var e;V(!!o.isActive),o.isActive&&(null===(e=ee.current)||void 0===e||e.focus())}),[o.isActive]),t.useEffect((()=>{J(o.errorMessage)}),[o.errorMessage]),t.useEffect((()=>{var e;_(!1),("invalid"===o.state||$||"disabled-invalid"===o.state)&&_(!0),"active"===o.state&&(null===(e=ee.current)||void 0===e||e.focus())}),[o.state,$]),t.useEffect((()=>{_(!!$)}),[$]);const te=function(e){if(i.isFunction(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e(...n)}},ne=()=>"zip"===C?6:60,ie=e=>{const t=0!==y?y:ne();if(T||O(q||"",e),R)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},re=e=>{e.preventDefault()},le=e=>{let t=e.target.value;const n=0!==y?y+1:ne();!R&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),O(t,e),o.textControl||Y(t),A&&(ee.current.style.height=`${ee.current.scrollHeight}px`,t||(ee.current.style.height=D||"48px"));const r=w||i.validateInput;if(!r||!i.isFunction(r))return;const[l,s]=r(t,C,M);_(!l),J(o.errorMessage?o.errorMessage:s)},se=e=>{var t;o.skipFocus||V(!0),te(null===(t=o.onFocus)||void 0===t?void 0:t.call(o,e))},ae=e=>{var t;o.skipFocus||V(!1),te(null===(t=o.onBlur)||void 0===t?void 0:t.call(o,e))},oe=()=>{var t;return e.jsxs(e.Fragment,{children:["multiline"!==C&&e.jsx("input",{"data-test":o["data-test"],id:o.id,style:null!==(t=null==U?void 0:U.input)&&void 0!==t?t:{},ref:ee,type:["phonenumber","zip","number"].includes(C)?"number":C,value:X,onFocus:e=>se(e),onBlur:e=>ae(e),placeholder:x||"Enter here",onChange:le,onClick:e=>te(o.onClick),onKeyDown:e=>ie(e)}),"multiline"===C&&e.jsx("textarea",{"data-test":o["data-test"],value:X,ref:ee,onFocus:e=>se(e),onBlur:e=>ae(e),onClick:e=>te(o.onClick),placeholder:x||"Enter here",onChange:le,onKeyDown:e=>ie(e),maxLength:y>0?y:void 0})]})};return e.jsxs(a.RootContainer,Object.assign({width:o.width,height:o.height,state:I,type:C,style:null!==(c=null==U?void 0:U.RootContainer)&&void 0!==c?c:{}},{children:[!F&&(!!m||!!$)&&e.jsxs(a.InputFooter,Object.assign({invalid:!!$},{children:[!!$&&e.jsx(l.default,{width:16,height:16}),$||m]})),e.jsxs(a.InputWrapper,Object.assign({variant:E,state:I,width:o.width,isActive:"active"===I||N,isInvalid:W,style:null!==(d=null==U?void 0:U.InputWrapper)&&void 0!==d?d:{},version:B,height:o.height},{children:[!!P&&e.jsx(a.IconHolder,Object.assign({variant:E,iconSize:Q,onClick:()=>te(null==g?void 0:g.callback),isLeft:!0,style:null!==(h=null==U?void 0:U.IconHolder)&&void 0!==h?h:{}},{children:e.jsx(P,{})})),!!H&&e.jsx(a.PrefixHolder,Object.assign({variant:E},{children:H})),"default"===E&&e.jsx(a.InputContainer,Object.assign({height:o.height,type:o.type,minHeight:D,maxHeight:K,autoGrow:A},{children:oe()})),"small"===E&&e.jsx(a.InputContainerSmall,Object.assign({height:o.height,type:o.type},{children:oe()})),!!G&&e.jsx(a.IconHolder,Object.assign({variant:E,iconSize:Q,onClick:()=>te(null==f?void 0:f.callback),isLeft:!1},{children:e.jsx(G,{})})),!!S&&e.jsx(a.SuffixHolder,Object.assign({variant:E},{children:S})),k&&k.text&&e.jsx(n.Button,{buttonText:k.text,onClick:()=>te(null==k?void 0:k.onClick)})]})),(!!j||!!y)&&e.jsxs(a.InputHeader,Object.assign({invalid:W},{children:[z&&z,e.jsxs(r.BodySecondary,{children:[j,b?e.jsx("span",{children:"*"}):""]}),y>0&&e.jsxs(a.MaxCharStyle,{children:[null!==(p=null===(v=o.value)||void 0===v?void 0:v.length)&&void 0!==p?p:0,"/",y]})]}))]}))}));o.displayName="Input",exports.Input=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{forwardRef as i,useState as r,useContext as l,useRef as o,useEffect as a}from"react";import{Button as s}from"../button/Button.js";import{isFunction as c,validateInput as u}from"./Input-helper.js";import{BodySecondary as h}from"../TypographyStyle.js";import d from"../../assets/icons/errorInfo.svg.js";import{InputStyleContext as v}from"./context/InputStyleProvider.js";import{RootContainer as p,InputFooter as g,InputWrapper as m,IconHolder as f,PrefixHolder as x,InputContainer as b,InputContainerSmall as y,SuffixHolder as j,InputHeader as C,MaxCharStyle as w}from"./Input.styled.js";const k=i(((i,k)=>{var I,O,H,L,T;const{placeholder:E,leftIcon:z,rightIcon:A,labelText:D,maxCharLimit:F,isRequired:M,hintText:B,type:S,state:K,validate:R,variant:G,button:q,suffixText:N,prefixText:P,onChangeText:V,value:W,noErrorHint:$,reset:J,rangeValidation:Q,noKeyDownChange:U,version:X,noMaxCharCheck:Y,labelElement:Z,autoGrow:_,minHeight:ee,maxHeight:te}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},i),ne=null==z?void 0:z.icon,ie=null==A?void 0:A.icon,[re,le]=r(!1),[oe,ae]=r(!1),[se,ce]=r(),ue="small"===G?"18px":"22px",he=l(v),[de,ve]=r(),pe=o(null),ge=null!=k?k:pe;a((()=>{ve(W)}),[W]),a((()=>{var e;ge.current&&(null===(e=i.onReferenceInit)||void 0===e||e.call(i,ge.current))}),[ge]),a((()=>{const e=ge.current;if(e&&["phonenumber","zip","number"].includes(S))return e.addEventListener("wheel",be,{passive:!1}),()=>{e.removeEventListener("wheel",be)}}),[]),a((()=>{J&&ve("")}),[J]),a((()=>{var e;ae(!!i.isActive),i.isActive&&(null===(e=ge.current)||void 0===e||e.focus())}),[i.isActive]),a((()=>{ce(i.errorMessage)}),[i.errorMessage]),a((()=>{var e;le(!1),("invalid"===i.state||se||"disabled-invalid"===i.state)&&le(!0),"active"===i.state&&(null===(e=ge.current)||void 0===e||e.focus())}),[i.state,se]),a((()=>{le(!!se)}),[se]);const me=function(e){if(c(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e(...n)}},fe=()=>"zip"===S?6:60,xe=e=>{const t=0!==F?F:fe();if(U||V(W||"",e),Y)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},be=e=>{e.preventDefault()},ye=e=>{let t=e.target.value;const n=0!==F?F+1:fe();!Y&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),V(t,e),i.textControl||ve(t),_&&(ge.current.style.height=`${ge.current.scrollHeight}px`,t||(ge.current.style.height=ee||"48px"));const r=R||u;if(!r||!c(r))return;const[l,o]=r(t,S,Q);le(!l),ce(i.errorMessage?i.errorMessage:o)},je=e=>{var t;i.skipFocus||ae(!0),me(null===(t=i.onFocus)||void 0===t?void 0:t.call(i,e))},Ce=e=>{var t;i.skipFocus||ae(!1),me(null===(t=i.onBlur)||void 0===t?void 0:t.call(i,e))},we=()=>{var r;return e(n,{children:["multiline"!==S&&t("input",{"data-test":i["data-test"],id:i.id,style:null!==(r=null==he?void 0:he.input)&&void 0!==r?r:{},ref:ge,type:["phonenumber","zip","number"].includes(S)?"number":S,value:de,onFocus:e=>je(e),onBlur:e=>Ce(e),placeholder:E||"Enter here",onChange:ye,onClick:e=>me(i.onClick),onKeyDown:e=>xe(e)}),"multiline"===S&&t("textarea",{"data-test":i["data-test"],value:de,ref:ge,onFocus:e=>je(e),onBlur:e=>Ce(e),onClick:e=>me(i.onClick),placeholder:E||"Enter here",onChange:ye,onKeyDown:e=>xe(e),maxLength:F>0?F:void 0})]})};return e(p,Object.assign({width:i.width,height:i.height,state:K,type:S,style:null!==(I=null==he?void 0:he.RootContainer)&&void 0!==I?I:{}},{children:[!$&&(!!B||!!se)&&e(g,Object.assign({invalid:!!se},{children:[!!se&&t(d,{width:16,height:16}),se||B]})),e(m,Object.assign({variant:G,state:K,width:i.width,isActive:"active"===K||oe,isInvalid:re,style:null!==(O=null==he?void 0:he.InputWrapper)&&void 0!==O?O:{},version:X,height:i.height},{children:[!!ne&&t(f,Object.assign({variant:G,iconSize:ue,onClick:()=>me(null==z?void 0:z.callback),isLeft:!0,style:null!==(H=null==he?void 0:he.IconHolder)&&void 0!==H?H:{}},{children:t(ne,{})})),!!P&&t(x,Object.assign({variant:G},{children:P})),"default"===G&&t(b,Object.assign({height:i.height,type:i.type,minHeight:ee,maxHeight:te,autoGrow:_},{children:we()})),"small"===G&&t(y,Object.assign({height:i.height,type:i.type},{children:we()})),!!ie&&t(f,Object.assign({variant:G,iconSize:ue,onClick:()=>me(null==A?void 0:A.callback),isLeft:!1},{children:t(ie,{})})),!!N&&t(j,Object.assign({variant:G},{children:N})),q&&q.text&&t(s,{buttonText:q.text,onClick:()=>me(null==q?void 0:q.onClick)})]})),(!!D||!!F)&&e(C,Object.assign({invalid:re},{children:[Z&&Z,e(h,{children:[D,M?t("span",{children:"*"}):""]}),F>0&&e(w,{children:[null!==(T=null===(L=i.value)||void 0===L?void 0:L.length)&&void 0!==T?T:0,"/",F]})]}))]}))}));k.displayName="Input";export{k as Input};
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{forwardRef as i,useState as r,useContext as l,useRef as o,useEffect as a}from"react";import{Button as s}from"../button/Button.js";import{isFunction as c,validateInput as u}from"./Input-helper.js";import{BodySecondary as h}from"../TypographyStyle.js";import d from"../../assets/icons/errorInfo.svg.js";import{InputStyleContext as v}from"./context/InputStyleProvider.js";import{RootContainer as p,InputFooter as g,InputWrapper as m,IconHolder as f,PrefixHolder as x,InputContainer as b,InputContainerSmall as y,SuffixHolder as j,InputHeader as C,MaxCharStyle as w}from"./Input.styled.js";const k=i(((i,k)=>{var I,O,H,L,T;const{placeholder:E,leftIcon:z,rightIcon:A,labelText:D,maxCharLimit:F,isRequired:M,hintText:B,type:S,state:K,validate:R,variant:G,button:q,suffixText:N,prefixText:P,onChangeText:V,value:W,noErrorHint:$,reset:J,rangeValidation:Q,noKeyDownChange:U,version:X,noMaxCharCheck:Y,labelElement:Z,autoGrow:_,minHeight:ee,maxHeight:te}=Object.assign({maxCharLimit:0,type:"text",variant:"default"},i),ne=null==z?void 0:z.icon,ie=null==A?void 0:A.icon,[re,le]=r(!1),[oe,ae]=r(!1),[se,ce]=r(),ue="small"===G?"18px":"22px",he=l(v),[de,ve]=r(),pe=o(null),ge=null!=k?k:pe;a((()=>{ve(W),!W&&_&&(ge.current.style.height=ee||"48px")}),[W]),a((()=>{var e;ge.current&&(null===(e=i.onReferenceInit)||void 0===e||e.call(i,ge.current))}),[ge]),a((()=>{const e=ge.current;if(e&&["phonenumber","zip","number"].includes(S))return e.addEventListener("wheel",be,{passive:!1}),()=>{e.removeEventListener("wheel",be)}}),[]),a((()=>{J&&ve("")}),[J]),a((()=>{var e;ae(!!i.isActive),i.isActive&&(null===(e=ge.current)||void 0===e||e.focus())}),[i.isActive]),a((()=>{ce(i.errorMessage)}),[i.errorMessage]),a((()=>{var e;le(!1),("invalid"===i.state||se||"disabled-invalid"===i.state)&&le(!0),"active"===i.state&&(null===(e=ge.current)||void 0===e||e.focus())}),[i.state,se]),a((()=>{le(!!se)}),[se]);const me=function(e){if(c(e)){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];e(...n)}},fe=()=>"zip"===S?6:60,xe=e=>{const t=0!==F?F:fe();if(U||V(W||"",e),Y)return;const n=e.target.value;![8].includes(e.which)&&t>0&&n.length>=t&&e.preventDefault()},be=e=>{e.preventDefault()},ye=e=>{let t=e.target.value;const n=0!==F?F+1:fe();!Y&&n>0&&t.length>=n&&(t=t.substring(0,n-1)),V(t,e),i.textControl||ve(t),_&&(ge.current.style.height=`${ge.current.scrollHeight}px`,t||(ge.current.style.height=ee||"48px"));const r=R||u;if(!r||!c(r))return;const[l,o]=r(t,S,Q);le(!l),ce(i.errorMessage?i.errorMessage:o)},je=e=>{var t;i.skipFocus||ae(!0),me(null===(t=i.onFocus)||void 0===t?void 0:t.call(i,e))},Ce=e=>{var t;i.skipFocus||ae(!1),me(null===(t=i.onBlur)||void 0===t?void 0:t.call(i,e))},we=()=>{var r;return e(n,{children:["multiline"!==S&&t("input",{"data-test":i["data-test"],id:i.id,style:null!==(r=null==he?void 0:he.input)&&void 0!==r?r:{},ref:ge,type:["phonenumber","zip","number"].includes(S)?"number":S,value:de,onFocus:e=>je(e),onBlur:e=>Ce(e),placeholder:E||"Enter here",onChange:ye,onClick:e=>me(i.onClick),onKeyDown:e=>xe(e)}),"multiline"===S&&t("textarea",{"data-test":i["data-test"],value:de,ref:ge,onFocus:e=>je(e),onBlur:e=>Ce(e),onClick:e=>me(i.onClick),placeholder:E||"Enter here",onChange:ye,onKeyDown:e=>xe(e),maxLength:F>0?F:void 0})]})};return e(p,Object.assign({width:i.width,height:i.height,state:K,type:S,style:null!==(I=null==he?void 0:he.RootContainer)&&void 0!==I?I:{}},{children:[!$&&(!!B||!!se)&&e(g,Object.assign({invalid:!!se},{children:[!!se&&t(d,{width:16,height:16}),se||B]})),e(m,Object.assign({variant:G,state:K,width:i.width,isActive:"active"===K||oe,isInvalid:re,style:null!==(O=null==he?void 0:he.InputWrapper)&&void 0!==O?O:{},version:X,height:i.height},{children:[!!ne&&t(f,Object.assign({variant:G,iconSize:ue,onClick:()=>me(null==z?void 0:z.callback),isLeft:!0,style:null!==(H=null==he?void 0:he.IconHolder)&&void 0!==H?H:{}},{children:t(ne,{})})),!!P&&t(x,Object.assign({variant:G},{children:P})),"default"===G&&t(b,Object.assign({height:i.height,type:i.type,minHeight:ee,maxHeight:te,autoGrow:_},{children:we()})),"small"===G&&t(y,Object.assign({height:i.height,type:i.type},{children:we()})),!!ie&&t(f,Object.assign({variant:G,iconSize:ue,onClick:()=>me(null==A?void 0:A.callback),isLeft:!1},{children:t(ie,{})})),!!N&&t(j,Object.assign({variant:G},{children:N})),q&&q.text&&t(s,{buttonText:q.text,onClick:()=>me(null==q?void 0:q.onClick)})]})),(!!D||!!F)&&e(C,Object.assign({invalid:re},{children:[Z&&Z,e(h,{children:[D,M?t("span",{children:"*"}):""]}),F>0&&e(w,{children:[null!==(T=null===(L=i.value)||void 0===L?void 0:L.length)&&void 0!==T?T:0,"/",F]})]}))]}))}));k.displayName="Input";export{k as Input};
|