@inntechcorp/it-design 2.2.50 → 2.2.52

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.
package/dist/index.cjs.js CHANGED
@@ -5316,4 +5316,4 @@ function(b,z){M.exports?M.exports=z(Co()):z(b.moment)}(Io,(function(M){void 0===
5316
5316
  gap : ${z};
5317
5317
  `}}}
5318
5318
 
5319
- `,_i=({gap:M,justify:b,align:p,vertical:o,wrap:c,stretch:e,style:O,className:t,children:n})=>z.jsx(Ti,{$gap:M,$justify:b,$align:p,$vertical:o,$wrap:c,$stretch:e,style:O,className:t,children:n}),Si={tr:{itd:l,calendar:u},en:{itd:W,calendar:f}};M.use(b.initReactI18next).init({resources:Si,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}}),exports.ALink=cr,exports.Accordion=uA,exports.AddDefaultThemeStyle=function(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Vo,exports.AddZero=function(M){var b=Number(M),z=M.toString().split(".");return(-1===M.toString().indexOf(".")||z[1].length<3||z[1].length>2)&&(M=(b=b.toFixed(2)).toString()),parseFloat(M).toFixed(2)},exports.Alert=Zr,exports.ArrowIcon=bc,exports.BackToTop=pc,exports.BackTop=function(M){const{children:b=null}=M,[o,c]=p.useState(!1);p.useEffect((()=>(document.addEventListener("scroll",e),()=>{document.removeEventListener("scroll",e)})),[]);const e=()=>{c(document.body.scrollTop>window.innerHeight)},O=()=>{window.scrollTo({top:0,behavior:"smooth"})};return z.jsx(ai,{className:"itd-back-to-top",children:z.jsx(ri,{onClick:O,$show:o,children:b||z.jsx(pc,{width:30,height:30})})})},exports.Base64Decode=function(M){return decodeURIComponent(atob(M).split("").map((function(M){return"%"+("00"+M.charCodeAt(0).toString(16)).slice(-2)})).join(""))},exports.Base64Encode=function(M){return btoa(encodeURIComponent(M).replace(/%([0-9A-F]{2})/g,(function(M,b){return String.fromCharCode(Number("0x"+b))})))},exports.Button=nM,exports.Calendar=TA,exports.Card=({title:M,titleSeparator:b,extra:o,tabs:c,onTabChange:e,minWidth:O,minHeight:t,children:n,activeTabKey:A="",updating:a=!1,contentPadding:r="30px"})=>{p.useEffect((()=>{}));const i=()=>{if(o)return z.jsx(Bi,{className:"itd-card-extra",children:o})},d=()=>{if(c)return z.jsx(hi,{tabs:c,activeTabKey:A,onTabChange:M=>e&&e(M)})},q=()=>{if(M)return z.jsx(gi,{className:"itd-card-title",children:z.jsx(Jo,{children:M})})},s=()=>!!(M||o||c);return z.jsx(Ri,{className:"itd-card",children:z.jsx(F,{updating:a,className:"itd-card-spin",children:z.jsxs(Li,{className:"itd-card-body",$minWidth:O,$minHeight:t,$hasHeader:s(),children:[(()=>{if(s())return z.jsxs(mi,{$showSeparator:b,className:"itd-card-header",children:[q(),d(),i()]})})(),(()=>{if(n)return z.jsx(Ni,{className:"itd-card-body",$padding:r,children:n})})()]})})})},exports.CheckFileURL=vo,exports.Checkbox=hc,exports.Checkmark=oc,exports.ChunkArray=function(M,b){let z=0,p=[];for(z=0;z<M.length;z+=b){const o=M.slice(z,z+b);"object"!=typeof o&&p.push(o)}return p},exports.Collapse=dr,exports.ConsoleLog=y,exports.ConvertCurrency=function(M,b){return M||(M=0),No(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=kA,exports.DetermineNewHeight=function(M,b,z){return M/b*z},exports.DetermineNewWidth=function(M,b,z){return b/M*z},exports.FileChecker=function(M="config",b="resource"){let z=void 0!==performance.getEntries().filter((M=>M.entryType===b)).filter((b=>b.name.indexOf(M)>-1))[0];return z?console.log("script already loaded"):console.log("script was not loaded"),z},exports.FindSelector=function(M){let b=!1;return document.querySelectorAll("head > style").forEach((z=>{Array(z.sheet.rules).forEach((z=>{for(var p=0;p<z.length;p++)z[p].cssText.search(M)>-1&&(b=!0)}))})),b},exports.Flex=_i,exports.Form=AA,exports.FormatBytes=xo,exports.FormatDate=function(M,b="tr",z="D MMMM YYYY dddd"){return Po(new Date(M)).locale(b).format(z)},exports.FormatDateTime=function(M,b="tr",z="D MMMM YYYY dddd - HH:mm"){return Po(new Date(M)).locale(b).format(z)},exports.FormatSimpleDate=function(M,b="tr",z="D MMMM YYYY"){return Po(new Date(M)).locale(b).format(z)},exports.FormatSimpleDateTime=function(M,b="tr",z="MM/DD/YYYY - HH:mm"){return Po(new Date(M)).locale(b).format(z)},exports.FormatTime=function(M,b="tr",z="HH:mm"){return Po(M).locale(b).format(z)},exports.GetByCurrency=function(M,b=!0,z="",p=2){if(""===z)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");isNaN(M)&&(M=0);let o=go(z);return b?new Intl.NumberFormat(o,{style:"currency",currency:z,minimumFractionDigits:p,maximumFractionDigits:p}).format(M):new Intl.NumberFormat(o,{minimumFractionDigits:p,maximumFractionDigits:p}).format(M)},exports.GetCountryCodeByCurrencyCode=go,exports.GetCountryCodeByLanguage=function(M){return"tr"===M?"tur":"en"===M?"usa":"language_not_found"},exports.GetCurrencyFormat=function(M,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===M?"":M=`${Bo(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=Bo,exports.GetDecimalByCurrency=function(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?",":"EUR"===M||"USD"===M?".":","},exports.GetTypeByFileType=Xo,exports.H1=({children:M})=>z.jsx(Go,{children:z.jsx("span",{children:M})}),exports.H2=Jo,exports.H3=({children:M})=>z.jsx(Ko,{children:z.jsx("span",{children:M})}),exports.H4=Zo,exports.ITDContext=mo,exports.ITDProvider=b=>{const[o,c]=p.useState(b.theme?b.theme:"dark"),[e,O]=p.useState(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[t,n]=p.useState(b.language?b.language:"en"),[A,a]=p.useState("en-US"),[r,i]=p.useState("");p.useEffect((()=>{b.theme&&d(b.theme),b.language&&s(b.language),b.dateFormat&&q(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const d=M=>{c(M)},q=M=>{O(M)},s=b=>{n(b),M.changeLanguage(b)},l={theme:o,brokenImage:r,dateFormat:e,language:t,locale:A,changeTheme:d,changeBrokenImage:M=>{i(M)},changeDateFormat:q,changeLanguage:s,changeLocale:M=>{a(M)}};return z.jsx(Lo,{className:"itd-provider","data-theme":o,"data-lang":t,children:z.jsx(mo.Provider,{value:l,children:z.jsx(ho,{children:z.jsx($M,{children:b.children})})})})},exports.Image=kc,exports.InlineSelect=Vr,exports.InlineSelectArrow=cc,exports.Input=Sa,exports.IsValidJSON=function(M){M="string"!=typeof M?JSON.stringify(M):M;try{M=JSON.parse(String(M))}catch(M){return!1}return"object"==typeof M&&null!==M},exports.LockIcon=Mc,exports.ModalManager=HM,exports.NoData=nc,exports.Notification=Ro,exports.Picture=tc,exports.Progress=function({status:M,percent:b=0,alwaysShowPercent:p=!1,showInfo:o=!0,className:c=""}){const e=()=>{let z="itd-progress";return z+=" itd-progress-percent-"+b,M&&(z+=" itd-progress-"+M),""!==c&&null!==c&&(z+=" "+c),z},O=z.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),t=z.jsx("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),n=()=>M||(b<100?"normal":"success"),A=()=>{if(o)return z.jsx("span",{className:"itd-progress-status",children:a()})},a=()=>{const M=n();if("active"===M||"normal"===M||p){const M=b%1!=0?b.toFixed(2):Math.floor(b).toString();return z.jsx("span",{className:"itd-progress-status-text",children:M+"%"})}return"success"===M?O:"exception"===M?t:void 0};return z.jsx(li,{$status:n(),$percent:b,className:e(),children:z.jsxs("div",{className:"itd-progress-outer",children:[z.jsx("div",{className:"itd-progress-inner",children:z.jsx("div",{className:"itd-progress-bg"})}),A()]})})},exports.Radio=vr,exports.RemoveUnits=function(M){return M?(M=M.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(M)):0},exports.Result=Ai,exports.SVGLoader=(M,b,p)=>z.jsx(To,{$width:b,$height:p,children:z.jsx(tM,{src:M})}),exports.Select=En,exports.Spin=F,exports.Status=function({variant:M="gray-1",size:b="default",stretch:p=!1,bold:o=!0,children:c="",className:e=""}){const O=()=>{let z="itd-status";return z+=" itd-status-"+M,z+=" itd-status-"+eM(b),p&&(z+=" itd-status-stretch"),o&&(z+=" itd-status-bold"),""!==e&&null!==e&&(z+=" "+e),z};return z.jsx(qi,{$status:M,$bold:o,className:O(),children:z.jsx("span",{children:c})})},exports.Switch=$a,exports.Table=wi,exports.Tabs=hi,exports.TextArea=Da,exports.TinyScrollbar=Bn,exports.Trash=ec,exports.UniUpperCase=function(M="",b="tr"){var z={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(M=M.replace(/(([iışğüçö]))/g,(M=>z[M]))),M.toUpperCase()},exports.UpdateThemeStyle=function(M){var b="",z=document.styleSheets[0];Object.keys(M).forEach((z=>{b+=`${z}:${M[z]};`})),z.hasOwnProperty("cssRules")&&(z.cssRules[0].style.cssText=b)},exports.Upload=pr,exports.UploadIcon=zc,exports.Wait=yo,exports.ZoomIn=Oc,exports.ZoomOut=({className:M="",height:b=24,width:p=24})=>z.jsx("svg",{className:M,height:b,width:p,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:z.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[z.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),z.jsx("path",{d:"M14.2928932,16.7071068 C13.9023689,16.3165825 13.9023689,15.6834175 14.2928932,15.2928932 C14.6834175,14.9023689 15.3165825,14.9023689 15.7071068,15.2928932 L19.7071068,19.2928932 C20.0976311,19.6834175 20.0976311,20.3165825 19.7071068,20.7071068 C19.3165825,21.0976311 18.6834175,21.0976311 18.2928932,20.7071068 L14.2928932,16.7071068 Z",fill:"#000000",fillRule:"nonzero",opacity:"0.3"}),z.jsx("path",{d:"M11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 Z M11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 C14.8659932,4 18,7.13400675 18,11 C18,14.8659932 14.8659932,18 11,18 Z",fill:"#000000",fillRule:"nonzero"}),z.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=Si,exports.toKebabCase=function(M,b=!1,z=!1){const p=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],o={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return M=M.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,(M=>o[M]||M)),b&&(M=M.split(" ").filter((M=>!p.includes(M.toLowerCase()))).join(" ")),z&&(M=M.replace(/\d+/g,"")),(M=(M=M.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(M,b=!1)=>{p.useEffect((()=>{var p=!1,o=document.head,c=z();return document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&(p=!0)})),p||o.appendChild(c),()=>{b&&document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&document.head.removeChild(b)}))}}),[M]);const z=()=>{var b=document.createElement("link");return b.type="text/css",b.rel="stylesheet",b.href=M,b}},exports.useComponentSize=M=>{const[b,z]=p.useState({width:0,height:0});return p.useEffect((()=>{if(!M.current)return;const b=new ResizeObserver((M=>{M.forEach((({target:M})=>{z({width:M.clientWidth,height:M.clientHeight})}))}));return b.observe(M.current),()=>b.disconnect()}),[M]),[b]},exports.useConnectionStatus=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("online",b),()=>{window.removeEventListener("online",b)}}),[M])},exports.useConstructor=(M=()=>{})=>{const[b,z]=p.useState(!1);b||(M(),z(!0))},exports.useContextBridge=(...M)=>{if(0===M.length)return({children:M})=>z.jsx(z.Fragment,{children:M});const b=M.map(p.useContext),o=p.useRef(b);return o.current=b,p.useMemo((()=>({children:b})=>M.reduceRight(((M,b,p)=>z.jsx(b.Provider,{value:o.current[p],children:M})),b)),[])},exports.useCoreFetch=k,exports.useKeyboardShortcut=({key:M,onKeyPressed:b})=>{p.useEffect((()=>{function z(z){z.key===M&&(z.preventDefault(),b())}return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}}),[M,b])},exports.useMultiQuery=S,exports.useOnClickOutside=w,exports.useOnESCKeyDown=T,exports.useOnResize=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}}),[M])},exports.useOrientation=()=>{const[M,b]=p.useState("portrait-primary"===window.screen.orientation.type?"portrait":"landscape");return p.useEffect((()=>{const M=M=>{const z=M.currentTarget.type;"landscape-primary"===z?b("landscape"):"portrait-primary"===z&&b("portrait")};return screen.orientation.addEventListener("change",M),()=>{screen.orientation.removeEventListener("change",M)}}),[]),M},exports.useReCaptcha=M=>{let b;const[z,o]=p.useState("");p.useEffect((()=>()=>{document.body.removeChild(b)}),[]);return{loadReCaptcha:M=>{b=document.createElement("script"),b.src="https://www.google.com/recaptcha/api.js?render="+M,b.onload=function(){o(M)},document.body.appendChild(b)},executeReCaptcha:()=>{if(""===z)return y.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(M&&M(null));window.grecaptcha.ready((b=>{try{window.grecaptcha.execute(z,{action:"login"}).then((b=>{y.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),M&&M(b)}))}catch(M){y.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=_;
5319
+ `,_i=({gap:M,justify:b,align:p,vertical:o,wrap:c,stretch:e,style:O,className:t,children:n})=>z.jsx(Ti,{$gap:M,$justify:b,$align:p,$vertical:o,$wrap:c,$stretch:e,style:O,className:t,children:n}),Si={tr:{itd:l,calendar:u},en:{itd:W,calendar:f}};M.use(b.initReactI18next).init({resources:Si,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}}),exports.ALink=cr,exports.Accordion=uA,exports.AddDefaultThemeStyle=function(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Vo,exports.AddZero=function(M){var b=Number(M),z=M.toString().split(".");return(-1===M.toString().indexOf(".")||z[1].length<3||z[1].length>2)&&(M=(b=b.toFixed(2)).toString()),parseFloat(M).toFixed(2)},exports.Alert=Zr,exports.ArrowIcon=bc,exports.BackToTop=pc,exports.BackTop=function(M){const{children:b=null}=M,[o,c]=p.useState(!1);p.useEffect((()=>(document.addEventListener("scroll",e),()=>{document.removeEventListener("scroll",e)})),[]);const e=()=>{c(document.body.scrollTop>window.innerHeight)},O=()=>{window.scrollTo({top:0,behavior:"smooth"})};return z.jsx(ai,{className:"itd-back-to-top",children:z.jsx(ri,{onClick:O,$show:o,children:b||z.jsx(pc,{width:30,height:30})})})},exports.Base64Decode=function(M){return decodeURIComponent(atob(M).split("").map((function(M){return"%"+("00"+M.charCodeAt(0).toString(16)).slice(-2)})).join(""))},exports.Base64Encode=function(M){return btoa(encodeURIComponent(M).replace(/%([0-9A-F]{2})/g,(function(M,b){return String.fromCharCode(Number("0x"+b))})))},exports.Button=nM,exports.Calendar=TA,exports.Card=({title:M,titleSeparator:b,extra:o,tabs:c,onTabChange:e,minWidth:O,minHeight:t,children:n,activeTabKey:A="",updating:a=!1,contentPadding:r="30px"})=>{p.useEffect((()=>{}));const i=()=>{if(o)return z.jsx(Bi,{className:"itd-card-extra",children:o})},d=()=>{if(c)return z.jsx(hi,{tabs:c,activeTabKey:A,onTabChange:M=>e&&e(M)})},q=()=>{if(M)return z.jsx(gi,{className:"itd-card-title",children:z.jsx(Jo,{children:M})})},s=()=>!!(M||o||c);return z.jsx(Ri,{className:"itd-card",children:z.jsx(F,{updating:a,className:"itd-card-spin",children:z.jsxs(Li,{className:"itd-card-body",$minWidth:O,$minHeight:t,$hasHeader:s(),children:[(()=>{if(s())return z.jsxs(mi,{$showSeparator:b,className:"itd-card-header",children:[q(),d(),i()]})})(),(()=>{if(n)return z.jsx(Ni,{className:"itd-card-body",$padding:r,children:n})})()]})})})},exports.CheckFileURL=vo,exports.Checkbox=hc,exports.Checkmark=oc,exports.ChunkArray=function(M,b){let z=0,p=[];for(z=0;z<M.length;z+=b){const o=M.slice(z,z+b);"object"!=typeof o&&p.push(o)}return p},exports.Collapse=dr,exports.ConsoleLog=y,exports.ConvertCurrency=function(M,b){return M||(M=0),No(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=kA,exports.DetermineNewHeight=function(M,b,z){return M/b*z},exports.DetermineNewWidth=function(M,b,z){return b/M*z},exports.FileChecker=function(M="config",b="resource"){let z=void 0!==performance.getEntries().filter((M=>M.entryType===b)).filter((b=>b.name.indexOf(M)>-1))[0];return z?console.log("script already loaded"):console.log("script was not loaded"),z},exports.FindSelector=function(M){let b=!1;return document.querySelectorAll("head > style").forEach((z=>{Array(z.sheet.rules).forEach((z=>{for(var p=0;p<z.length;p++)z[p].cssText.search(M)>-1&&(b=!0)}))})),b},exports.Flex=_i,exports.Form=AA,exports.FormatBytes=xo,exports.FormatDate=function(M,b="tr",z="D MMMM YYYY dddd"){return Po(new Date(M)).locale(b).format(z)},exports.FormatDateTime=function(M,b="tr",z="D MMMM YYYY dddd - HH:mm"){return Po(new Date(M)).locale(b).format(z)},exports.FormatSimpleDate=function(M,b="tr",z="D MMMM YYYY"){return Po(new Date(M)).locale(b).format(z)},exports.FormatSimpleDateTime=function(M,b="tr",z="MM/DD/YYYY - HH:mm"){return Po(new Date(M)).locale(b).format(z)},exports.FormatTime=function(M,b="tr",z="HH:mm"){return Po(M).locale(b).format(z)},exports.GetByCurrency=function(M,b=!0,z="",p=2){if(""===z)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");isNaN(M)&&(M=0);let o=go(z);return b?new Intl.NumberFormat(o,{style:"currency",currency:z,minimumFractionDigits:p,maximumFractionDigits:p}).format(M):new Intl.NumberFormat(o,{minimumFractionDigits:p,maximumFractionDigits:p}).format(M)},exports.GetCountryCodeByCurrencyCode=go,exports.GetCountryCodeByLanguage=function(M){return"tr"===M?"tur":"en"===M?"usa":"language_not_found"},exports.GetCurrencyFormat=function(M,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===M?"":M=`${Bo(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=Bo,exports.GetDecimalByCurrency=function(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?",":"EUR"===M||"USD"===M?".":","},exports.GetTypeByFileType=Xo,exports.H1=({children:M})=>z.jsx(Go,{children:z.jsx("span",{children:M})}),exports.H2=Jo,exports.H3=({children:M})=>z.jsx(Ko,{children:z.jsx("span",{children:M})}),exports.H4=Zo,exports.ITDContext=mo,exports.ITDProvider=b=>{const[o,c]=p.useState(b.theme?b.theme:"dark"),[e,O]=p.useState(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[t,n]=p.useState(b.language?b.language:"en"),[A,a]=p.useState("en-US"),[r,i]=p.useState("");p.useEffect((()=>{b.theme&&c(b.theme),b.language&&(n(b.language),M.changeLanguage(b.language)),b.dateFormat&&O(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const d=p.useCallback((M=>{c(M)}),[]),q=p.useCallback((M=>{i(M)}),[]),s=p.useCallback((M=>{O(M)}),[]),l=p.useCallback((M=>{a(M)}),[]),W=p.useCallback((b=>{n(b),M.changeLanguage(b)}),[]),u=p.useMemo((()=>({theme:o,brokenImage:r,dateFormat:e,language:t,locale:A,changeTheme:d,changeBrokenImage:q,changeDateFormat:s,changeLanguage:W,changeLocale:l})),[o,r,e,t,A,d,q,s,W,l]);return z.jsx(Lo,{className:"itd-provider","data-theme":o,"data-lang":t,children:z.jsx(mo.Provider,{value:u,children:z.jsx(ho,{children:z.jsx($M,{children:b.children})})})})},exports.Image=kc,exports.InlineSVGCached=tM,exports.InlineSelect=Vr,exports.InlineSelectArrow=cc,exports.Input=Sa,exports.IsValidJSON=function(M){M="string"!=typeof M?JSON.stringify(M):M;try{M=JSON.parse(String(M))}catch(M){return!1}return"object"==typeof M&&null!==M},exports.LockIcon=Mc,exports.ModalManager=HM,exports.NoData=nc,exports.Notification=Ro,exports.Picture=tc,exports.Progress=function({status:M,percent:b=0,alwaysShowPercent:p=!1,showInfo:o=!0,className:c=""}){const e=()=>{let z="itd-progress";return z+=" itd-progress-percent-"+b,M&&(z+=" itd-progress-"+M),""!==c&&null!==c&&(z+=" "+c),z},O=z.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"})}),t=z.jsx("svg",{fillRule:"evenodd",viewBox:"64 64 896 896",focusable:"false","data-icon":"close-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:z.jsx("path",{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"})}),n=()=>M||(b<100?"normal":"success"),A=()=>{if(o)return z.jsx("span",{className:"itd-progress-status",children:a()})},a=()=>{const M=n();if("active"===M||"normal"===M||p){const M=b%1!=0?b.toFixed(2):Math.floor(b).toString();return z.jsx("span",{className:"itd-progress-status-text",children:M+"%"})}return"success"===M?O:"exception"===M?t:void 0};return z.jsx(li,{$status:n(),$percent:b,className:e(),children:z.jsxs("div",{className:"itd-progress-outer",children:[z.jsx("div",{className:"itd-progress-inner",children:z.jsx("div",{className:"itd-progress-bg"})}),A()]})})},exports.Radio=vr,exports.RemoveUnits=function(M){return M?(M=M.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(M)):0},exports.Result=Ai,exports.SVGLoader=(M,b,p)=>z.jsx(To,{$width:b,$height:p,children:z.jsx(tM,{src:M})}),exports.Select=En,exports.Spin=F,exports.Status=function({variant:M="gray-1",size:b="default",stretch:p=!1,bold:o=!0,children:c="",className:e=""}){const O=()=>{let z="itd-status";return z+=" itd-status-"+M,z+=" itd-status-"+eM(b),p&&(z+=" itd-status-stretch"),o&&(z+=" itd-status-bold"),""!==e&&null!==e&&(z+=" "+e),z};return z.jsx(qi,{$status:M,$bold:o,className:O(),children:z.jsx("span",{children:c})})},exports.Switch=$a,exports.Table=wi,exports.Tabs=hi,exports.TextArea=Da,exports.TinyScrollbar=Bn,exports.Trash=ec,exports.UniUpperCase=function(M="",b="tr"){var z={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(M=M.replace(/(([iışğüçö]))/g,(M=>z[M]))),M.toUpperCase()},exports.UpdateThemeStyle=function(M){var b="",z=document.styleSheets[0];Object.keys(M).forEach((z=>{b+=`${z}:${M[z]};`})),z.hasOwnProperty("cssRules")&&(z.cssRules[0].style.cssText=b)},exports.Upload=pr,exports.UploadIcon=zc,exports.Wait=yo,exports.ZoomIn=Oc,exports.ZoomOut=({className:M="",height:b=24,width:p=24})=>z.jsx("svg",{className:M,height:b,width:p,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:z.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[z.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),z.jsx("path",{d:"M14.2928932,16.7071068 C13.9023689,16.3165825 13.9023689,15.6834175 14.2928932,15.2928932 C14.6834175,14.9023689 15.3165825,14.9023689 15.7071068,15.2928932 L19.7071068,19.2928932 C20.0976311,19.6834175 20.0976311,20.3165825 19.7071068,20.7071068 C19.3165825,21.0976311 18.6834175,21.0976311 18.2928932,20.7071068 L14.2928932,16.7071068 Z",fill:"#000000",fillRule:"nonzero",opacity:"0.3"}),z.jsx("path",{d:"M11,16 C13.7614237,16 16,13.7614237 16,11 C16,8.23857625 13.7614237,6 11,6 C8.23857625,6 6,8.23857625 6,11 C6,13.7614237 8.23857625,16 11,16 Z M11,18 C7.13400675,18 4,14.8659932 4,11 C4,7.13400675 7.13400675,4 11,4 C14.8659932,4 18,7.13400675 18,11 C18,14.8659932 14.8659932,18 11,18 Z",fill:"#000000",fillRule:"nonzero"}),z.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=Si,exports.toKebabCase=function(M,b=!1,z=!1){const p=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],o={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return M=M.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,(M=>o[M]||M)),b&&(M=M.split(" ").filter((M=>!p.includes(M.toLowerCase()))).join(" ")),z&&(M=M.replace(/\d+/g,"")),(M=(M=M.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(M,b=!1)=>{p.useEffect((()=>{var p=!1,o=document.head,c=z();return document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&(p=!0)})),p||o.appendChild(c),()=>{b&&document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(M)&&document.head.removeChild(b)}))}}),[M]);const z=()=>{var b=document.createElement("link");return b.type="text/css",b.rel="stylesheet",b.href=M,b}},exports.useComponentSize=M=>{const[b,z]=p.useState({width:0,height:0});return p.useEffect((()=>{if(!M.current)return;const b=new ResizeObserver((M=>{M.forEach((({target:M})=>{z({width:M.clientWidth,height:M.clientHeight})}))}));return b.observe(M.current),()=>b.disconnect()}),[M]),[b]},exports.useConnectionStatus=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("online",b),()=>{window.removeEventListener("online",b)}}),[M])},exports.useConstructor=(M=()=>{})=>{const[b,z]=p.useState(!1);b||(M(),z(!0))},exports.useContextBridge=(...M)=>{if(0===M.length)return({children:M})=>z.jsx(z.Fragment,{children:M});const b=M.map(p.useContext),o=p.useRef(b);return o.current=b,p.useMemo((()=>({children:b})=>M.reduceRight(((M,b,p)=>z.jsx(b.Provider,{value:o.current[p],children:M})),b)),[])},exports.useCoreFetch=k,exports.useKeyboardShortcut=({key:M,onKeyPressed:b})=>{p.useEffect((()=>{function z(z){z.key===M&&(z.preventDefault(),b())}return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}}),[M,b])},exports.useMultiQuery=S,exports.useOnClickOutside=w,exports.useOnESCKeyDown=T,exports.useOnResize=M=>{p.useEffect((()=>{const b=b=>{M(b)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}}),[M])},exports.useOrientation=()=>{const[M,b]=p.useState("portrait-primary"===window.screen.orientation.type?"portrait":"landscape");return p.useEffect((()=>{const M=M=>{const z=M.currentTarget.type;"landscape-primary"===z?b("landscape"):"portrait-primary"===z&&b("portrait")};return screen.orientation.addEventListener("change",M),()=>{screen.orientation.removeEventListener("change",M)}}),[]),M},exports.useReCaptcha=M=>{let b;const[z,o]=p.useState("");p.useEffect((()=>()=>{document.body.removeChild(b)}),[]);return{loadReCaptcha:M=>{b=document.createElement("script"),b.src="https://www.google.com/recaptcha/api.js?render="+M,b.onload=function(){o(M)},document.body.appendChild(b)},executeReCaptcha:()=>{if(""===z)return y.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(M&&M(null));window.grecaptcha.ready((b=>{try{window.grecaptcha.execute(z,{action:"login"}).then((b=>{y.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),M&&M(b)}))}catch(M){y.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=_;
package/dist/index.d.mts CHANGED
@@ -612,7 +612,7 @@ export * from './icons';
612
612
  /**
613
613
  * UTILS
614
614
  */
615
- export * from './utils/InlineSVGCached';
615
+ export { default as InlineSVGCached } from './utils/InlineSVGCached';
616
616
  /**
617
617
  * FORWARDED REF COMPONENTS
618
618
  */
package/dist/index.d.ts CHANGED
@@ -382,6 +382,17 @@ type IconProps = {
382
382
  };
383
383
  declare const NoData: ({ className, height, width }: IconProps) => react_jsx_runtime.JSX.Element;
384
384
 
385
+ type InlineSVGCachedProps = {
386
+ src: string;
387
+ className?: string;
388
+ style?: React.CSSProperties;
389
+ title?: string;
390
+ role?: string;
391
+ onLoaded?: () => void;
392
+ onError?: (error: unknown) => void;
393
+ };
394
+ declare const _default$4: react.MemoExoticComponent<({ src, className, style, title, role, onLoaded, onError }: InlineSVGCachedProps) => react_jsx_runtime.JSX.Element>;
395
+
385
396
  type OptionsTypeProps = {
386
397
  customKey?: string;
387
398
  icon?: ChildrenProps$1;
@@ -2155,5 +2166,5 @@ declare const resources: {
2155
2166
  };
2156
2167
  };
2157
2168
 
2158
- export { ALink, Accordion, AddDefaultThemeStyle, AddDefaultUnit, AddZero, Alert, Arrow as ArrowIcon, BackToTop, BackTop, Base64Decode, Base64Encode, Button, Calendar, Card, CheckFileURL, Checkbox, Checkmark, ChunkArray, Collapse, ConsoleLog, ConvertCurrency, DatePicker, DetermineNewHeight, DetermineNewWidth, FileChecker, FileExtensions, FileTypes, FindSelector, Flex, Form, FormValidationTypes, FormatBytes, FormatDate, FormatDateTime, FormatSimpleDate, FormatSimpleDateTime, FormatTime, GetByCurrency, GetCountryCodeByCurrencyCode, GetCountryCodeByLanguage, GetCurrencyFormat, GetCurrencySymbol, GetDecimalByCurrency, GetTypeByFileType, H1, H2, H3, H4, ITDContext, ITDProvider, _default as Image, InlineSelect, InlineSelectArrow, Input, IsValidJSON, Lock as LockIcon, ModalManager, ModalState, NoData, Notification, Picture, Progress, Radio, RemoveUnits, Result, SVGLoader, Select, Spin, Status, Switch, Table, Tabs, TextArea, TinyScrollbar, Trash, UniUpperCase, UpdateThemeStyle, Upload, Upload$1 as UploadIcon, Wait, ZoomIn, ZoomOut, resources, toKebabCase, useAddExternalCSS, useComponentSize, useConnectionStatus, useConstructor, useContextBridge, useCoreFetch, useKeyboardShortcut, useMultiQuery, useOnClickOutside, useOnESCKeyDown, useOnResize, useOrientation, useReCaptcha, useSingleQuery };
2169
+ export { ALink, Accordion, AddDefaultThemeStyle, AddDefaultUnit, AddZero, Alert, Arrow as ArrowIcon, BackToTop, BackTop, Base64Decode, Base64Encode, Button, Calendar, Card, CheckFileURL, Checkbox, Checkmark, ChunkArray, Collapse, ConsoleLog, ConvertCurrency, DatePicker, DetermineNewHeight, DetermineNewWidth, FileChecker, FileExtensions, FileTypes, FindSelector, Flex, Form, FormValidationTypes, FormatBytes, FormatDate, FormatDateTime, FormatSimpleDate, FormatSimpleDateTime, FormatTime, GetByCurrency, GetCountryCodeByCurrencyCode, GetCountryCodeByLanguage, GetCurrencyFormat, GetCurrencySymbol, GetDecimalByCurrency, GetTypeByFileType, H1, H2, H3, H4, ITDContext, ITDProvider, _default as Image, _default$4 as InlineSVGCached, InlineSelect, InlineSelectArrow, Input, IsValidJSON, Lock as LockIcon, ModalManager, ModalState, NoData, Notification, Picture, Progress, Radio, RemoveUnits, Result, SVGLoader, Select, Spin, Status, Switch, Table, Tabs, TextArea, TinyScrollbar, Trash, UniUpperCase, UpdateThemeStyle, Upload, Upload$1 as UploadIcon, Wait, ZoomIn, ZoomOut, resources, toKebabCase, useAddExternalCSS, useComponentSize, useConnectionStatus, useConstructor, useContextBridge, useCoreFetch, useKeyboardShortcut, useMultiQuery, useOnClickOutside, useOnESCKeyDown, useOnResize, useOrientation, useReCaptcha, useSingleQuery };
2159
2170
  export type { AccordionItemProps, AccordionProps, AccordionSubMenuProps, AlertProps, AlertSize, AlertType, ButtonContentPosition, ButtonProps, ButtonState, ButtonType, ButtonVariant, CalendarDayProps, CalendarProps, CalendarValueProps, CardProps, CheckboxEvent, CheckboxGroupProps, CheckboxProps, DatePickerProps, Direction, FieldUpdateProps, FlexAlignProps, FlexGapProps, FlexJustifyProps, FlexProps, FormContextType, FormItemProps, FormProps, FormRuleProps, FormSubComponentProps, FormValueProps, GroupCheckboxOptionType, ITDContextType, ITDImperativeFuncProps, ITDProviderProps, ITDSize, ITDSizeSlug, InputProps, InputVariant, ModalContentProps, ModalProps, ModalRefProps, NotificationContextType, NotificationsProps, ProgressProps, ProgressStatus, QueryValueProps, RadioButtonProps, RadioGroupProps, RadioType, ResultProps, SelectDirection, SelectOptionProps, SelectPosition, SelectProps, SelectToggleProps, SelectValue, SelectVariant, SingleQueryProps, StatusProps, StatusVariant, SwitchProps, TableColumnType, TableProps, TableRefProps, TableRow, TableTRProps, TabsItemProps, TabsProps, TextAreaEvent, TextAreaProps, TextAreaVariant, UploadProgressProps, UploadProps, UploadResultMessageProps };
package/dist/index.esm.js CHANGED
@@ -1343,7 +1343,7 @@ import M from"i18next";import{useTranslation as b,initReactI18next as z}from"rea
1343
1343
 
1344
1344
 
1345
1345
 
1346
- `,OO=s({});OO.displayName="ITDContext";const cO=b=>{const[z,o]=t(b.theme?b.theme:"dark"),[O,c]=t(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[e,A]=t(b.language?b.language:"en"),[a,i]=t("en-US"),[r,d]=t("");n((()=>{b.theme&&q(b.theme),b.language&&l(b.language),b.dateFormat&&s(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const q=M=>{o(M)},s=M=>{c(M)},l=b=>{A(b),M.changeLanguage(b)},W={theme:z,brokenImage:r,dateFormat:O,language:e,locale:a,changeTheme:q,changeBrokenImage:M=>{d(M)},changeDateFormat:s,changeLanguage:l,changeLocale:M=>{i(M)}};return p(oO,{className:"itd-provider","data-theme":z,"data-lang":e,children:p(OO.Provider,{value:W,children:p(zO,{children:p(gb,{children:b.children})})})})};function eO(M,b,z){return M/b*z}function tO(M,b,z){return b/M*z}function nO(M){let b=!1;return document.querySelectorAll("head > style").forEach((z=>{Array(z.sheet.rules).forEach((z=>{for(var p=0;p<z.length;p++)z[p].cssText.search(M)>-1&&(b=!0)}))})),b}function AO(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");switch(M.toUpperCase()){case"TRY":return"tr-TR";case"EUR":return"de-DE";case"USD":default:return"en-US";case"GBP":return"en-GB"}}function aO(M){return"tr"===M?"tur":"en"===M?"usa":"language_not_found"}function iO(M,b){return M||(M=0),rO(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")}const rO=(M,b)=>{let z=!1,p=parseFloat(String(M)).toFixed(2);return p.indexOf("-")>-1&&(z=!0,p=p.split("-")[1]),(z?"-":"")+b+p};function dO(M,b=!0,z="",p=2){if(""===z)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");isNaN(M)&&(M=0);let o=AO(z);return b?new Intl.NumberFormat(o,{style:"currency",currency:z,minimumFractionDigits:p,maximumFractionDigits:p}).format(M):new Intl.NumberFormat(o,{minimumFractionDigits:p,maximumFractionDigits:p}).format(M)}function qO(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?"₺":"USD"===M?"$":"EUR"===M?"€":"?"}function sO(M,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===M?"":M=`${qO(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")}function lO(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?",":"EUR"===M||"USD"===M?".":","}function WO(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"}function uO(M){var b="",z=document.styleSheets[0];Object.keys(M).forEach((z=>{b+=`${z}:${M[z]};`})),z.hasOwnProperty("cssRules")&&(z.cssRules[0].style.cssText=b)}function fO(M){M="string"!=typeof M?JSON.stringify(M):M;try{M=JSON.parse(String(M))}catch(M){return!1}return"object"==typeof M&&null!==M}function hO(M){var b=Number(M),z=M.toString().split(".");return(-1===M.toString().indexOf(".")||z[1].length<3||z[1].length>2)&&(M=(b=b.toFixed(2)).toString()),parseFloat(M).toFixed(2)}function RO(M){return M?(M=M.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(M)):0}function LO(M,b){let z=0,p=[];for(z=0;z<M.length;z+=b){const o=M.slice(z,z+b);"object"!=typeof o&&p.push(o)}return p}function mO(M="config",b="resource"){let z=void 0!==performance.getEntries().filter((M=>M.entryType===b)).filter((b=>b.name.indexOf(M)>-1))[0];return z?console.log("script already loaded"):console.log("script was not loaded"),z}function gO(M){if(!M)return!1;return!!M.split("?")[0].match(/(^data:image\/(jpeg|jpg|gif|png|svg|pdf|otf)(;base64,)(?:=*))|(\.(jpeg|jpg|gif|png|svg|pdf|otf)$)/)&&new Promise((b=>{var z=new Image;z.onload=function(){0!==z.height&&0!==z.width?b(!0):b(!1)},z.onerror=()=>b(!1),z.src=M}))}function NO(M="",b="tr"){var z={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(M=M.replace(/(([iışğüçö]))/g,(M=>z[M]))),M.toUpperCase()}function BO(M,b=2){if(!+M)return"0 Bytes";const z=b<0?0:b,p=Math.floor(Math.log(M)/Math.log(1024));return`${parseFloat((M/Math.pow(1024,p)).toFixed(z))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][p]}`}function vO(M){return M===D.SVG?P.SVG:M===D.JPG?P.JPG:M===D.PNG?P.PNG:M===D.GIF?P.GIF:M===D.OTF?P.OTF:M===D.PDF?P.PDF:""}function XO(M){return new Promise((b=>setTimeout(b,M)))}const yO=M=>"string"==typeof M?M:"number"==typeof M?M+"px":"auto",xO=_.div`
1346
+ `,OO=s({});OO.displayName="ITDContext";const cO=b=>{const[z,o]=t(b.theme?b.theme:"dark"),[O,c]=t(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[e,A]=t(b.language?b.language:"en"),[a,r]=t("en-US"),[d,q]=t("");n((()=>{b.theme&&o(b.theme),b.language&&(A(b.language),M.changeLanguage(b.language)),b.dateFormat&&c(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const s=l((M=>{o(M)}),[]),W=l((M=>{q(M)}),[]),u=l((M=>{c(M)}),[]),f=l((M=>{r(M)}),[]),h=l((b=>{A(b),M.changeLanguage(b)}),[]),R=i((()=>({theme:z,brokenImage:d,dateFormat:O,language:e,locale:a,changeTheme:s,changeBrokenImage:W,changeDateFormat:u,changeLanguage:h,changeLocale:f})),[z,d,O,e,a,s,W,u,h,f]);return p(oO,{className:"itd-provider","data-theme":z,"data-lang":e,children:p(OO.Provider,{value:R,children:p(zO,{children:p(gb,{children:b.children})})})})};function eO(M,b,z){return M/b*z}function tO(M,b,z){return b/M*z}function nO(M){let b=!1;return document.querySelectorAll("head > style").forEach((z=>{Array(z.sheet.rules).forEach((z=>{for(var p=0;p<z.length;p++)z[p].cssText.search(M)>-1&&(b=!0)}))})),b}function AO(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");switch(M.toUpperCase()){case"TRY":return"tr-TR";case"EUR":return"de-DE";case"USD":default:return"en-US";case"GBP":return"en-GB"}}function aO(M){return"tr"===M?"tur":"en"===M?"usa":"language_not_found"}function iO(M,b){return M||(M=0),rO(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")}const rO=(M,b)=>{let z=!1,p=parseFloat(String(M)).toFixed(2);return p.indexOf("-")>-1&&(z=!0,p=p.split("-")[1]),(z?"-":"")+b+p};function dO(M,b=!0,z="",p=2){if(""===z)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...)");isNaN(M)&&(M=0);let o=AO(z);return b?new Intl.NumberFormat(o,{style:"currency",currency:z,minimumFractionDigits:p,maximumFractionDigits:p}).format(M):new Intl.NumberFormat(o,{minimumFractionDigits:p,maximumFractionDigits:p}).format(M)}function qO(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?"₺":"USD"===M?"$":"EUR"===M?"€":"?"}function sO(M,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===M?"":M=`${qO(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")}function lO(M=""){if(""===M)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===M?",":"EUR"===M||"USD"===M?".":","}function WO(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"}function uO(M){var b="",z=document.styleSheets[0];Object.keys(M).forEach((z=>{b+=`${z}:${M[z]};`})),z.hasOwnProperty("cssRules")&&(z.cssRules[0].style.cssText=b)}function fO(M){M="string"!=typeof M?JSON.stringify(M):M;try{M=JSON.parse(String(M))}catch(M){return!1}return"object"==typeof M&&null!==M}function hO(M){var b=Number(M),z=M.toString().split(".");return(-1===M.toString().indexOf(".")||z[1].length<3||z[1].length>2)&&(M=(b=b.toFixed(2)).toString()),parseFloat(M).toFixed(2)}function RO(M){return M?(M=M.replaceAll("%","").replaceAll("px","").replaceAll("em","").replaceAll("ex","").replaceAll("ch","").replaceAll("rem","").replaceAll("vw","").replaceAll("vh","").replaceAll("vmin","").replaceAll("vmax","").replaceAll("pt","").replaceAll("pc","").replaceAll("in","").replaceAll("mm","").replaceAll("cm",""),parseInt(M)):0}function LO(M,b){let z=0,p=[];for(z=0;z<M.length;z+=b){const o=M.slice(z,z+b);"object"!=typeof o&&p.push(o)}return p}function mO(M="config",b="resource"){let z=void 0!==performance.getEntries().filter((M=>M.entryType===b)).filter((b=>b.name.indexOf(M)>-1))[0];return z?console.log("script already loaded"):console.log("script was not loaded"),z}function gO(M){if(!M)return!1;return!!M.split("?")[0].match(/(^data:image\/(jpeg|jpg|gif|png|svg|pdf|otf)(;base64,)(?:=*))|(\.(jpeg|jpg|gif|png|svg|pdf|otf)$)/)&&new Promise((b=>{var z=new Image;z.onload=function(){0!==z.height&&0!==z.width?b(!0):b(!1)},z.onerror=()=>b(!1),z.src=M}))}function NO(M="",b="tr"){var z={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(M=M.replace(/(([iışğüçö]))/g,(M=>z[M]))),M.toUpperCase()}function BO(M,b=2){if(!+M)return"0 Bytes";const z=b<0?0:b,p=Math.floor(Math.log(M)/Math.log(1024));return`${parseFloat((M/Math.pow(1024,p)).toFixed(z))} ${["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][p]}`}function vO(M){return M===D.SVG?P.SVG:M===D.JPG?P.JPG:M===D.PNG?P.PNG:M===D.GIF?P.GIF:M===D.OTF?P.OTF:M===D.PDF?P.PDF:""}function XO(M){return new Promise((b=>setTimeout(b,M)))}const yO=M=>"string"==typeof M?M:"number"==typeof M?M+"px":"auto",xO=_.div`
1347
1347
 
1348
1348
  >div {
1349
1349
 
@@ -5316,4 +5316,4 @@ function(b,z){M.exports?M.exports=z(EO()):z(b.moment)}(IO,(function(M){void 0===
5316
5316
  gap : ${z};
5317
5317
  `}}}
5318
5318
 
5319
- `,Vd=({gap:M,justify:b,align:z,vertical:o,wrap:O,stretch:c,style:e,className:t,children:n})=>p(jd,{$gap:M,$justify:b,$align:z,$vertical:o,$wrap:O,$stretch:c,style:e,className:t,children:n}),Yd={tr:{itd:$,calendar:U},en:{itd:H,calendar:j}};M.use(z).init({resources:Yd,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}});export{dr as ALink,Xa as Accordion,WO as AddDefaultThemeStyle,JO as AddDefaultUnit,hO as AddZero,td as Alert,Ac as ArrowIcon,ic as BackToTop,Ld as BackTop,ZO as Base64Decode,QO as Base64Encode,HM as Button,$a as Calendar,Pd as Card,gO as CheckFileURL,xc as Checkbox,rc as Checkmark,LO as ChunkArray,Lr as Collapse,pM as ConsoleLog,iO as ConvertCurrency,ja as DatePicker,eO as DetermineNewHeight,tO as DetermineNewWidth,mO as FileChecker,P as FileExtensions,D as FileTypes,nO as FindSelector,Vd as Flex,fa as Form,I as FormValidationTypes,BO as FormatBytes,jO as FormatDate,VO as FormatDateTime,YO as FormatSimpleDate,GO as FormatSimpleDateTime,KO as FormatTime,dO as GetByCurrency,AO as GetCountryCodeByCurrencyCode,aO as GetCountryCodeByLanguage,sO as GetCurrencyFormat,qO as GetCurrencySymbol,lO as GetDecimalByCurrency,vO as GetTypeByFileType,Oc as H1,cc as H2,ec as H3,tc as H4,OO as ITDContext,cO as ITDProvider,jc as Image,zd as InlineSelect,dc as InlineSelectArrow,Ui as Input,fO as IsValidJSON,nc as LockIcon,Nb as ModalManager,C as ModalState,uc as NoData,pO as Notification,Wc as Picture,Xd as Progress,Er as Radio,RO as RemoveUnits,ud as Result,wO as SVGLoader,VA as Select,LM as Spin,Nd as Status,Mr as Switch,Ud as Table,Td as Tabs,Gi as TextArea,EA as TinyScrollbar,qc as Trash,NO as UniUpperCase,uO as UpdateThemeStyle,ir as Upload,ac as UploadIcon,XO as Wait,sc as ZoomIn,lc as ZoomOut,Yd as resources,Mc as toKebabCase,cM as useAddExternalCSS,rM as useComponentSize,iM as useConnectionStatus,OM as useConstructor,qM as useContextBridge,dM as useCoreFetch,sM as useKeyboardShortcut,AM as useMultiQuery,eM as useOnClickOutside,tM as useOnESCKeyDown,aM as useOnResize,lM as useOrientation,oM as useReCaptcha,nM as useSingleQuery};
5319
+ `,Vd=({gap:M,justify:b,align:z,vertical:o,wrap:O,stretch:c,style:e,className:t,children:n})=>p(jd,{$gap:M,$justify:b,$align:z,$vertical:o,$wrap:O,$stretch:c,style:e,className:t,children:n}),Yd={tr:{itd:$,calendar:U},en:{itd:H,calendar:j}};M.use(z).init({resources:Yd,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}});export{dr as ALink,Xa as Accordion,WO as AddDefaultThemeStyle,JO as AddDefaultUnit,hO as AddZero,td as Alert,Ac as ArrowIcon,ic as BackToTop,Ld as BackTop,ZO as Base64Decode,QO as Base64Encode,HM as Button,$a as Calendar,Pd as Card,gO as CheckFileURL,xc as Checkbox,rc as Checkmark,LO as ChunkArray,Lr as Collapse,pM as ConsoleLog,iO as ConvertCurrency,ja as DatePicker,eO as DetermineNewHeight,tO as DetermineNewWidth,mO as FileChecker,P as FileExtensions,D as FileTypes,nO as FindSelector,Vd as Flex,fa as Form,I as FormValidationTypes,BO as FormatBytes,jO as FormatDate,VO as FormatDateTime,YO as FormatSimpleDate,GO as FormatSimpleDateTime,KO as FormatTime,dO as GetByCurrency,AO as GetCountryCodeByCurrencyCode,aO as GetCountryCodeByLanguage,sO as GetCurrencyFormat,qO as GetCurrencySymbol,lO as GetDecimalByCurrency,vO as GetTypeByFileType,Oc as H1,cc as H2,ec as H3,tc as H4,OO as ITDContext,cO as ITDProvider,jc as Image,$M as InlineSVGCached,zd as InlineSelect,dc as InlineSelectArrow,Ui as Input,fO as IsValidJSON,nc as LockIcon,Nb as ModalManager,C as ModalState,uc as NoData,pO as Notification,Wc as Picture,Xd as Progress,Er as Radio,RO as RemoveUnits,ud as Result,wO as SVGLoader,VA as Select,LM as Spin,Nd as Status,Mr as Switch,Ud as Table,Td as Tabs,Gi as TextArea,EA as TinyScrollbar,qc as Trash,NO as UniUpperCase,uO as UpdateThemeStyle,ir as Upload,ac as UploadIcon,XO as Wait,sc as ZoomIn,lc as ZoomOut,Yd as resources,Mc as toKebabCase,cM as useAddExternalCSS,rM as useComponentSize,iM as useConnectionStatus,OM as useConstructor,qM as useContextBridge,dM as useCoreFetch,sM as useKeyboardShortcut,AM as useMultiQuery,eM as useOnClickOutside,tM as useOnESCKeyDown,aM as useOnResize,lM as useOrientation,oM as useReCaptcha,nM as useSingleQuery};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.2.50",
3
+ "version": "2.2.52",
4
4
  "description": "All in one Design library for web applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",