@inntechcorp/it-design 2.1.52 → 2.1.53

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
@@ -6237,4 +6237,4 @@ function Sa(e,b){if(Ya(e))for(let o=0;o<e.length&&!1!==b(e[o],o,e);o++);else e&&
6237
6237
  gap : ${o};
6238
6238
  `}}}
6239
6239
 
6240
- `,hW=({gap:e,justify:b,align:M,vertical:p,wrap:z,stretch:t,style:c,className:n,children:r})=>o.jsx(WW,{$gap:e,$justify:b,$align:M,$vertical:p,$wrap:z,$stretch:t,style:c,className:n,children:r}),mW={tr:{itd:f,calendar:h},en:{itd:W,calendar:m}};e.use(b.initReactI18next).init({resources:mW,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!0,interpolation:{escapeValue:!1}}),exports.ALink=Vu,exports.Accordion=Jl,exports.AddDefaultThemeStyle=function(){const e=document.createElement("style");document.head.appendChild(e),e.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=wi,exports.AddZero=function(e){var b=Number(e),o=e.toString().split(".");return(-1===e.toString().indexOf(".")||o[1].length<3||o[1].length>2)&&(e=(b=b.toFixed(2)).toString()),parseFloat(e).toFixed(2)},exports.Alert=Pf,exports.ArrowIcon=Di,exports.BackToTop=ji,exports.BackTop=function(e){const{children:b=null}=e,[p,z]=M.useState(!1);M.useEffect((()=>(document.addEventListener("scroll",t),()=>{document.removeEventListener("scroll",t)})),[]);const t=()=>{z(document.body.scrollTop>window.innerHeight)},c=()=>{window.scrollTo({top:0,behavior:"smooth"})};return o.jsx(Jf,{className:"itd-back-to-top",children:o.jsx(Zf,{onClick:c,$show:p,children:b||o.jsx(ji,{width:30,height:30})})})},exports.Base64Decode=function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))},exports.Base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,b){return String.fromCharCode(Number("0x"+b))})))},exports.Button=Kt,exports.Calendar=aq,exports.Card=({title:e,titleSeparator:b,extra:p,tabs:z,onTabChange:t,minWidth:c,minHeight:n,children:r,activeTabKey:O="",updating:i=!1,contentPadding:a="30px"})=>{M.useEffect((()=>{}));const s=()=>{if(p)return o.jsx(AW,{className:"itd-card-extra",children:p})},A=()=>{if(z)return o.jsx(nW,{tabs:z,activeTabKey:O,onTabChange:e=>t&&t(e)})},d=()=>{if(e)return o.jsx(aW,{className:"itd-card-title",children:o.jsx(Ei,{children:e})})},l=()=>!!(e||p||z);return o.jsx(rW,{children:o.jsx(wt,{updating:i,children:o.jsxs(OW,{className:"itd-card",$minWidth:c,$minHeight:n,$hasHeader:l(),children:[(()=>{if(l())return o.jsxs(iW,{$showSeparator:b,className:"itd-card-header",children:[d(),A(),s()]})})(),(()=>{if(r)return o.jsx(sW,{className:"itd-card-body",$padding:a,children:r})})()]})})})},exports.CheckFileURL=Ai,exports.Checkbox=za,exports.Checkmark=Ii,exports.ChunkArray=function(e,b){let o=0,M=[];for(o=0;o<e.length;o+=b){const p=e.slice(o,o+b);"object"!=typeof p&&M.push(p)}return M},exports.Collapse=ef,exports.ConsoleLog=S,exports.ConvertCurrency=function(e,b){return e||(e=0),ai(e,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=fq,exports.DetermineNewHeight=function(e,b,o){return e/b*o},exports.DetermineNewWidth=function(e,b,o){return b/e*o},exports.FileChecker=function(e="config",b="resource"){let o=void 0!==performance.getEntries().filter((e=>e.entryType===b)).filter((b=>b.name.indexOf(e)>-1))[0];return o?console.log("script already loaded"):console.log("script was not loaded"),o},exports.FindSelector=xM,exports.Flex=hW,exports.Form=Fl,exports.FormatBytes=di,exports.FormatDate=function(e,b="tr",o="D MMMM YYYY dddd"){return gi(new Date(e)).locale(b).format(o)},exports.FormatDateTime=function(e,b="tr",o="D MMMM YYYY dddd - HH:mm"){return gi(new Date(e)).locale(b).format(o)},exports.FormatSimpleDate=function(e,b="tr",o="D MMMM YYYY"){return gi(new Date(e)).locale(b).format(o)},exports.FormatSimpleDateTime=function(e,b="tr",o="MM/DD/YYYY - HH:mm"){return gi(new Date(e)).locale(b).format(o)},exports.FormatTime=function(e,b="tr",o="HH:mm"){return gi(e).locale(b).format(o)},exports.GetByCurrency=function(e,b=!0,o="",M=2){if(""===o)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");isNaN(e)&&(e=0);let p=ii(o);return b?new Intl.NumberFormat(p,{style:"currency",currency:o,minimumFractionDigits:M,maximumFractionDigits:M}).format(e):new Intl.NumberFormat(p,{minimumFractionDigits:M,maximumFractionDigits:M}).format(e)},exports.GetCountryCodeByCurrencyCode=ii,exports.GetCountryCodeByLanguage=function(e){return"tr"===e?"tur":"en"===e?"usa":"language_not_found"},exports.GetCurrencyFormat=function(e,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===e?"":e=`${si(b)}${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=si,exports.GetDecimalByCurrency=function(e=""){if(""===e)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===e?",":"EUR"===e||"USD"===e?".":","},exports.GetTypeByFileType=li,exports.H1=({children:e})=>o.jsx(Xi,{children:o.jsx("span",{children:e})}),exports.H2=Ei,exports.H3=({children:e})=>o.jsx(Ti,{children:o.jsx("span",{children:e})}),exports.H4=_i,exports.ITDContext=Oi,exports.ITDProvider=b=>{const[p,z]=M.useState(b.theme?b.theme:"dark"),[t,c]=M.useState(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[n,r]=M.useState(b.language?b.language:"en"),[O,i]=M.useState("en-US"),[a,s]=M.useState("");M.useEffect((()=>{b.theme&&A(b.theme),b.language&&l(b.language),b.dateFormat&&d(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const A=e=>{z(e)},d=e=>{c(e)},l=b=>{r(b),e.changeLanguage(b)},q={theme:p,brokenImage:a,dateFormat:t,language:n,locale:O,changeTheme:A,changeBrokenImage:e=>{s(e)},changeDateFormat:d,changeLanguage:l,changeLocale:e=>{i(e)}};return o.jsx(ri,{className:"itd-provider","data-theme":p,"data-lang":n,children:o.jsx(Oi.Provider,{value:q,children:o.jsx(JO,{children:o.jsx(ci,{children:o.jsx(uc,{children:b.children})})})})})},exports.Image=ha,exports.InlineSelect=Tf,exports.InlineSelectArrow=Fi,exports.Input=hu,exports.IsValidJSON=function(e){e="string"!=typeof e?JSON.stringify(e):e;try{e=JSON.parse(String(e))}catch(e){return!1}return"object"==typeof e&&null!==e},exports.LockIcon=Ci,exports.ModalManager=fc,exports.NoData=Hi,exports.Notification=ZO,exports.Picture=Ui,exports.Progress=function({status:e,percent:b=0,alwaysShowPercent:M=!1,showInfo:p=!0,className:z=""}){const t=()=>{let o="itd-progress";return o+=" itd-progress-"+e,o+=" itd-progress-percent-"+b,""!==z&&null!==z&&(o+=" "+z),o},c=o.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:o.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"})}),n=o.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:o.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"})}),r=()=>e||(b<100?"normal":"success"),O=()=>{if(p)return o.jsx("span",{className:"itd-progress-status",children:i()})},i=()=>{const e=r();return"active"===e||"normal"===e||M?o.jsx("span",{className:"itd-progress-status-text",children:b+"%"}):"success"===e?c:"exception"===e?n:void 0};return o.jsx(pW,{$status:r(),$percent:b,className:t(),children:o.jsxs("div",{className:"itd-progress-outer",children:[o.jsx("div",{className:"itd-progress-inner",children:o.jsx("div",{className:"itd-progress-bg"})}),O()]})})},exports.Radio=df,exports.RemoveUnits=function(e){return e?(e=e.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(e)):0},exports.Result=Qf,exports.SVGLoader=(e,b,M)=>o.jsx(fi,{$width:b,$height:M,children:o.jsx(t.ReactSVG,{src:e})}),exports.Select=Rl,exports.Spin=wt,exports.Status=function({variant:e="gray-1",size:b="default",stretch:M=!1,children:p="",className:z=""}){const t=()=>{let o="itd-status";return o+=" itd-status-"+e,o+=" itd-status-"+Ft(b),M&&(o+=" itd-status-stretch"),""!==z&&null!==z&&(o+=" "+z),o};return o.jsx(oW,{$status:e,className:t(),children:o.jsx("span",{children:p})})},exports.Switch=Bu,exports.Table=fW,exports.Tabs=nW,exports.TextArea=Lu,exports.TinyScrollbar=rl,exports.Tooltip=ni,exports.Trash=$i,exports.UniUpperCase=function(e="",b="tr"){var o={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(e=e.replace(/(([iışğüçö]))/g,(e=>o[e]))),e.toUpperCase()},exports.UpdateThemeStyle=function(e){var b="",o=document.styleSheets[0];Object.keys(e).forEach((o=>{b+=`${o}:${e[o]};`})),o.hasOwnProperty("cssRules")&&(o.cssRules[0].style.cssText=b)},exports.Upload=Fu,exports.UploadIcon=Pi,exports.Wait=qi,exports.ZoomIn=Vi,exports.ZoomOut=({className:e="",height:b=24,width:M=24})=>o.jsx("svg",{className:e,height:b,width:M,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:o.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[o.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),o.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"}),o.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"}),o.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=mW,exports.toKebabCase=function(e,b=!1,o=!1){const M=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],p={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return e=e.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,(e=>p[e]||e)),b&&(e=e.split(" ").filter((e=>!M.includes(e.toLowerCase()))).join(" ")),o&&(e=e.replace(/\d+/g,"")),(e=(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(e,b=!1)=>{M.useEffect((()=>{var M=!1,p=document.head,z=o();return document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(e)&&(M=!0)})),M||p.appendChild(z),()=>{b&&document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(e)&&document.head.removeChild(b)}))}}),[e]);const o=()=>{var b=document.createElement("link");return b.type="text/css",b.rel="stylesheet",b.href=e,b}},exports.useComponentSize=e=>{const[b,o]=M.useState({width:0,height:0});return M.useEffect((()=>{if(!e.current)return;const b=new ResizeObserver((e=>{e.forEach((({target:e})=>{o({width:e.clientWidth,height:e.clientHeight})}))}));return b.observe(e.current),()=>b.disconnect()}),[e]),[b]},exports.useConnectionStatus=e=>{M.useEffect((()=>{const b=b=>{e(b)};return window.addEventListener("online",b),()=>{window.removeEventListener("online",b)}}),[e])},exports.useConstructor=(e=()=>{})=>{const[b,o]=M.useState(!1);b||(e(),o(!0))},exports.useContextBridge=(...e)=>{if(0===e.length)return({children:e})=>o.jsx(o.Fragment,{children:e});const b=e.map(M.useContext),p=M.useRef(b);return p.current=b,M.useMemo((()=>({children:b})=>e.reduceRight(((e,b,M)=>o.jsx(b.Provider,{value:p.current[M],children:e})),b)),[])},exports.useCoreFetch=kM,exports.useCreateDynamicStyle=(e,b,o=K("itd-dynamic-style"))=>{M.useEffect((()=>(z()||p(),()=>{let e=t();"string"!=typeof e&&e.parentNode&&e.parentNode.removeChild(e)})),[]);const p=()=>{r(),b("cs-"+o)},z=()=>0===Object.keys(e).length,t=()=>{let e="";return document.querySelectorAll("head > style").forEach((b=>{b.id===o&&(e=b)})),e},r=()=>{let b=O(e);var M=document.createElement("style");M.setAttribute("type","text/css"),M.setAttribute("id",o),M.innerHTML=b.join(""),document.head.appendChild(M)},O=e=>{let b=[];for(var M in e){var p=JSON.stringify(e[M]).split('","').join(";").replace(/"/g,"");p=n().use(c).use(yM).use(Yo({})).process(p).css;var z=`.cs-${o} ${M} `;z+=p,z+=" ",b.push(z)}return b}},exports.useCreateStyledStyle=BM,exports.useKeyboardShortcut=({key:e,onKeyPressed:b})=>{M.useEffect((()=>{function o(o){o.key===e&&(o.preventDefault(),b())}return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}}),[e,b])},exports.useMultiQuery=TM,exports.useOnClickOutside=wM,exports.useOnESCKeyDown=XM,exports.useOnResize=e=>{M.useEffect((()=>{const b=b=>{e(b)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}}),[e])},exports.useOrientation=()=>{const[e,b]=M.useState("portrait-primary"===window.screen.orientation.type?"portrait":"landscape");return M.useEffect((()=>{const e=e=>{const o=e.currentTarget.type;"landscape-primary"===o?b("landscape"):"portrait-primary"===o&&b("portrait")};return screen.orientation.addEventListener("change",e),()=>{screen.orientation.removeEventListener("change",e)}}),[]),e},exports.useReCaptcha=e=>{let b;const[o,p]=M.useState("");M.useEffect((()=>()=>{document.body.removeChild(b)}),[]);return{loadReCaptcha:e=>{b=document.createElement("script"),b.src="https://www.google.com/recaptcha/api.js?render="+e,b.onload=function(){p(e)},document.body.appendChild(b)},executeReCaptcha:()=>{if(""===o)return S.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(e&&e(null));window.grecaptcha.ready((b=>{try{window.grecaptcha.execute(o,{action:"login"}).then((b=>{S.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),e&&e(b)}))}catch(e){S.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=SM;
6240
+ `,hW=({gap:e,justify:b,align:M,vertical:p,wrap:z,stretch:t,style:c,className:n,children:r})=>o.jsx(WW,{$gap:e,$justify:b,$align:M,$vertical:p,$wrap:z,$stretch:t,style:c,className:n,children:r}),mW={tr:{itd:f,calendar:h},en:{itd:W,calendar:m}};e.use(b.initReactI18next).init({resources:mW,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=Vu,exports.Accordion=Jl,exports.AddDefaultThemeStyle=function(){const e=document.createElement("style");document.head.appendChild(e),e.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=wi,exports.AddZero=function(e){var b=Number(e),o=e.toString().split(".");return(-1===e.toString().indexOf(".")||o[1].length<3||o[1].length>2)&&(e=(b=b.toFixed(2)).toString()),parseFloat(e).toFixed(2)},exports.Alert=Pf,exports.ArrowIcon=Di,exports.BackToTop=ji,exports.BackTop=function(e){const{children:b=null}=e,[p,z]=M.useState(!1);M.useEffect((()=>(document.addEventListener("scroll",t),()=>{document.removeEventListener("scroll",t)})),[]);const t=()=>{z(document.body.scrollTop>window.innerHeight)},c=()=>{window.scrollTo({top:0,behavior:"smooth"})};return o.jsx(Jf,{className:"itd-back-to-top",children:o.jsx(Zf,{onClick:c,$show:p,children:b||o.jsx(ji,{width:30,height:30})})})},exports.Base64Decode=function(e){return decodeURIComponent(atob(e).split("").map((function(e){return"%"+("00"+e.charCodeAt(0).toString(16)).slice(-2)})).join(""))},exports.Base64Encode=function(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,(function(e,b){return String.fromCharCode(Number("0x"+b))})))},exports.Button=Kt,exports.Calendar=aq,exports.Card=({title:e,titleSeparator:b,extra:p,tabs:z,onTabChange:t,minWidth:c,minHeight:n,children:r,activeTabKey:O="",updating:i=!1,contentPadding:a="30px"})=>{M.useEffect((()=>{}));const s=()=>{if(p)return o.jsx(AW,{className:"itd-card-extra",children:p})},A=()=>{if(z)return o.jsx(nW,{tabs:z,activeTabKey:O,onTabChange:e=>t&&t(e)})},d=()=>{if(e)return o.jsx(aW,{className:"itd-card-title",children:o.jsx(Ei,{children:e})})},l=()=>!!(e||p||z);return o.jsx(rW,{children:o.jsx(wt,{updating:i,children:o.jsxs(OW,{className:"itd-card",$minWidth:c,$minHeight:n,$hasHeader:l(),children:[(()=>{if(l())return o.jsxs(iW,{$showSeparator:b,className:"itd-card-header",children:[d(),A(),s()]})})(),(()=>{if(r)return o.jsx(sW,{className:"itd-card-body",$padding:a,children:r})})()]})})})},exports.CheckFileURL=Ai,exports.Checkbox=za,exports.Checkmark=Ii,exports.ChunkArray=function(e,b){let o=0,M=[];for(o=0;o<e.length;o+=b){const p=e.slice(o,o+b);"object"!=typeof p&&M.push(p)}return M},exports.Collapse=ef,exports.ConsoleLog=S,exports.ConvertCurrency=function(e,b){return e||(e=0),ai(e,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=fq,exports.DetermineNewHeight=function(e,b,o){return e/b*o},exports.DetermineNewWidth=function(e,b,o){return b/e*o},exports.FileChecker=function(e="config",b="resource"){let o=void 0!==performance.getEntries().filter((e=>e.entryType===b)).filter((b=>b.name.indexOf(e)>-1))[0];return o?console.log("script already loaded"):console.log("script was not loaded"),o},exports.FindSelector=xM,exports.Flex=hW,exports.Form=Fl,exports.FormatBytes=di,exports.FormatDate=function(e,b="tr",o="D MMMM YYYY dddd"){return gi(new Date(e)).locale(b).format(o)},exports.FormatDateTime=function(e,b="tr",o="D MMMM YYYY dddd - HH:mm"){return gi(new Date(e)).locale(b).format(o)},exports.FormatSimpleDate=function(e,b="tr",o="D MMMM YYYY"){return gi(new Date(e)).locale(b).format(o)},exports.FormatSimpleDateTime=function(e,b="tr",o="MM/DD/YYYY - HH:mm"){return gi(new Date(e)).locale(b).format(o)},exports.FormatTime=function(e,b="tr",o="HH:mm"){return gi(e).locale(b).format(o)},exports.GetByCurrency=function(e,b=!0,o="",M=2){if(""===o)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");isNaN(e)&&(e=0);let p=ii(o);return b?new Intl.NumberFormat(p,{style:"currency",currency:o,minimumFractionDigits:M,maximumFractionDigits:M}).format(e):new Intl.NumberFormat(p,{minimumFractionDigits:M,maximumFractionDigits:M}).format(e)},exports.GetCountryCodeByCurrencyCode=ii,exports.GetCountryCodeByLanguage=function(e){return"tr"===e?"tur":"en"===e?"usa":"language_not_found"},exports.GetCurrencyFormat=function(e,b=""){if(""===b)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return""===e?"":e=`${si(b)}${e}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=si,exports.GetDecimalByCurrency=function(e=""){if(""===e)throw new Error("Currency Error: You must send the currency (EUR, USD, TRY, etc...");return"TRY"===e?",":"EUR"===e||"USD"===e?".":","},exports.GetTypeByFileType=li,exports.H1=({children:e})=>o.jsx(Xi,{children:o.jsx("span",{children:e})}),exports.H2=Ei,exports.H3=({children:e})=>o.jsx(Ti,{children:o.jsx("span",{children:e})}),exports.H4=_i,exports.ITDContext=Oi,exports.ITDProvider=b=>{const[p,z]=M.useState(b.theme?b.theme:"dark"),[t,c]=M.useState(b.dateFormat?b.dateFormat:"MM/DD/YYYY"),[n,r]=M.useState(b.language?b.language:"en"),[O,i]=M.useState("en-US"),[a,s]=M.useState("");M.useEffect((()=>{b.theme&&A(b.theme),b.language&&l(b.language),b.dateFormat&&d(b.dateFormat)}),[b.theme,b.language,b.dateFormat]);const A=e=>{z(e)},d=e=>{c(e)},l=b=>{r(b),e.changeLanguage(b)},q={theme:p,brokenImage:a,dateFormat:t,language:n,locale:O,changeTheme:A,changeBrokenImage:e=>{s(e)},changeDateFormat:d,changeLanguage:l,changeLocale:e=>{i(e)}};return o.jsx(ri,{className:"itd-provider","data-theme":p,"data-lang":n,children:o.jsx(Oi.Provider,{value:q,children:o.jsx(JO,{children:o.jsx(ci,{children:o.jsx(uc,{children:b.children})})})})})},exports.Image=ha,exports.InlineSelect=Tf,exports.InlineSelectArrow=Fi,exports.Input=hu,exports.IsValidJSON=function(e){e="string"!=typeof e?JSON.stringify(e):e;try{e=JSON.parse(String(e))}catch(e){return!1}return"object"==typeof e&&null!==e},exports.LockIcon=Ci,exports.ModalManager=fc,exports.NoData=Hi,exports.Notification=ZO,exports.Picture=Ui,exports.Progress=function({status:e,percent:b=0,alwaysShowPercent:M=!1,showInfo:p=!0,className:z=""}){const t=()=>{let o="itd-progress";return o+=" itd-progress-"+e,o+=" itd-progress-percent-"+b,""!==z&&null!==z&&(o+=" "+z),o},c=o.jsx("svg",{viewBox:"64 64 896 896",focusable:"false","data-icon":"check-circle",width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",children:o.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"})}),n=o.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:o.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"})}),r=()=>e||(b<100?"normal":"success"),O=()=>{if(p)return o.jsx("span",{className:"itd-progress-status",children:i()})},i=()=>{const e=r();return"active"===e||"normal"===e||M?o.jsx("span",{className:"itd-progress-status-text",children:b+"%"}):"success"===e?c:"exception"===e?n:void 0};return o.jsx(pW,{$status:r(),$percent:b,className:t(),children:o.jsxs("div",{className:"itd-progress-outer",children:[o.jsx("div",{className:"itd-progress-inner",children:o.jsx("div",{className:"itd-progress-bg"})}),O()]})})},exports.Radio=df,exports.RemoveUnits=function(e){return e?(e=e.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(e)):0},exports.Result=Qf,exports.SVGLoader=(e,b,M)=>o.jsx(fi,{$width:b,$height:M,children:o.jsx(t.ReactSVG,{src:e})}),exports.Select=Rl,exports.Spin=wt,exports.Status=function({variant:e="gray-1",size:b="default",stretch:M=!1,children:p="",className:z=""}){const t=()=>{let o="itd-status";return o+=" itd-status-"+e,o+=" itd-status-"+Ft(b),M&&(o+=" itd-status-stretch"),""!==z&&null!==z&&(o+=" "+z),o};return o.jsx(oW,{$status:e,className:t(),children:o.jsx("span",{children:p})})},exports.Switch=Bu,exports.Table=fW,exports.Tabs=nW,exports.TextArea=Lu,exports.TinyScrollbar=rl,exports.Tooltip=ni,exports.Trash=$i,exports.UniUpperCase=function(e="",b="tr"){var o={i:"İ","ş":"Ş","ğ":"Ğ","ü":"Ü","ö":"Ö","ç":"Ç","ı":"I"};return"tr"===b&&(e=e.replace(/(([iışğüçö]))/g,(e=>o[e]))),e.toUpperCase()},exports.UpdateThemeStyle=function(e){var b="",o=document.styleSheets[0];Object.keys(e).forEach((o=>{b+=`${o}:${e[o]};`})),o.hasOwnProperty("cssRules")&&(o.cssRules[0].style.cssText=b)},exports.Upload=Fu,exports.UploadIcon=Pi,exports.Wait=qi,exports.ZoomIn=Vi,exports.ZoomOut=({className:e="",height:b=24,width:M=24})=>o.jsx("svg",{className:e,height:b,width:M,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:o.jsxs("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:[o.jsx("rect",{x:"0",y:"0",width:"24",height:"24"}),o.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"}),o.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"}),o.jsx("rect",{fill:"#000000",opacity:"0.3",x:"9",y:"10.5",width:"4",height:"1",rx:"0.5"})]})}),exports.resources=mW,exports.toKebabCase=function(e,b=!1,o=!1){const M=["the","is","in","at","on","and","a","an","ve","bir","bu","için","gibi"],p={"ğ":"g","ü":"u","ş":"s","ı":"i","ö":"o","ç":"c","Ğ":"g","Ü":"u","Ş":"s","İ":"i","Ö":"o","Ç":"c"};return e=e.replace(/[ğüşiöçıĞÜŞİÖÇ]/g,(e=>p[e]||e)),b&&(e=e.split(" ").filter((e=>!M.includes(e.toLowerCase()))).join(" ")),o&&(e=e.replace(/\d+/g,"")),(e=(e=e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")).toLowerCase().replace(/[^a-z0-9\s-]/g,"")).trim().replace(/\s+/g,"-")},exports.useAddExternalCSS=(e,b=!1)=>{M.useEffect((()=>{var M=!1,p=document.head,z=o();return document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(e)&&(M=!0)})),M||p.appendChild(z),()=>{b&&document.querySelectorAll("head > link").forEach((b=>{-1!==b.href.indexOf(e)&&document.head.removeChild(b)}))}}),[e]);const o=()=>{var b=document.createElement("link");return b.type="text/css",b.rel="stylesheet",b.href=e,b}},exports.useComponentSize=e=>{const[b,o]=M.useState({width:0,height:0});return M.useEffect((()=>{if(!e.current)return;const b=new ResizeObserver((e=>{e.forEach((({target:e})=>{o({width:e.clientWidth,height:e.clientHeight})}))}));return b.observe(e.current),()=>b.disconnect()}),[e]),[b]},exports.useConnectionStatus=e=>{M.useEffect((()=>{const b=b=>{e(b)};return window.addEventListener("online",b),()=>{window.removeEventListener("online",b)}}),[e])},exports.useConstructor=(e=()=>{})=>{const[b,o]=M.useState(!1);b||(e(),o(!0))},exports.useContextBridge=(...e)=>{if(0===e.length)return({children:e})=>o.jsx(o.Fragment,{children:e});const b=e.map(M.useContext),p=M.useRef(b);return p.current=b,M.useMemo((()=>({children:b})=>e.reduceRight(((e,b,M)=>o.jsx(b.Provider,{value:p.current[M],children:e})),b)),[])},exports.useCoreFetch=kM,exports.useCreateDynamicStyle=(e,b,o=K("itd-dynamic-style"))=>{M.useEffect((()=>(z()||p(),()=>{let e=t();"string"!=typeof e&&e.parentNode&&e.parentNode.removeChild(e)})),[]);const p=()=>{r(),b("cs-"+o)},z=()=>0===Object.keys(e).length,t=()=>{let e="";return document.querySelectorAll("head > style").forEach((b=>{b.id===o&&(e=b)})),e},r=()=>{let b=O(e);var M=document.createElement("style");M.setAttribute("type","text/css"),M.setAttribute("id",o),M.innerHTML=b.join(""),document.head.appendChild(M)},O=e=>{let b=[];for(var M in e){var p=JSON.stringify(e[M]).split('","').join(";").replace(/"/g,"");p=n().use(c).use(yM).use(Yo({})).process(p).css;var z=`.cs-${o} ${M} `;z+=p,z+=" ",b.push(z)}return b}},exports.useCreateStyledStyle=BM,exports.useKeyboardShortcut=({key:e,onKeyPressed:b})=>{M.useEffect((()=>{function o(o){o.key===e&&(o.preventDefault(),b())}return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}}),[e,b])},exports.useMultiQuery=TM,exports.useOnClickOutside=wM,exports.useOnESCKeyDown=XM,exports.useOnResize=e=>{M.useEffect((()=>{const b=b=>{e(b)};return window.addEventListener("resize",b),()=>{window.removeEventListener("resize",b)}}),[e])},exports.useOrientation=()=>{const[e,b]=M.useState("portrait-primary"===window.screen.orientation.type?"portrait":"landscape");return M.useEffect((()=>{const e=e=>{const o=e.currentTarget.type;"landscape-primary"===o?b("landscape"):"portrait-primary"===o&&b("portrait")};return screen.orientation.addEventListener("change",e),()=>{screen.orientation.removeEventListener("change",e)}}),[]),e},exports.useReCaptcha=e=>{let b;const[o,p]=M.useState("");M.useEffect((()=>()=>{document.body.removeChild(b)}),[]);return{loadReCaptcha:e=>{b=document.createElement("script"),b.src="https://www.google.com/recaptcha/api.js?render="+e,b.onload=function(){p(e)},document.body.appendChild(b)},executeReCaptcha:()=>{if(""===o)return S.double("useReCaptcha","Not yet initialized! reCaptcha can't execute right now.","error"),void(e&&e(null));window.grecaptcha.ready((b=>{try{window.grecaptcha.execute(o,{action:"login"}).then((b=>{S.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),e&&e(b)}))}catch(e){S.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=SM;
package/dist/index.esm.js CHANGED
@@ -6237,4 +6237,4 @@ function FA(e,b){if(os(e))for(let M=0;M<e.length&&!1!==b(e[M],M,e);M++);else e&&
6237
6237
  gap : ${M};
6238
6238
  `}}}
6239
6239
 
6240
- `,Th=({gap:e,justify:b,align:M,vertical:p,wrap:z,stretch:t,style:c,className:n,children:O})=>o(kh,{$gap:e,$justify:b,$align:M,$vertical:p,$wrap:z,$stretch:t,style:c,className:n,children:O}),Sh={tr:{itd:j,calendar:U},en:{itd:V,calendar:H}};e.use(M).init({resources:Sh,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!0,interpolation:{escapeValue:!1}});export{bW as ALink,cu as Accordion,oa as AddDefaultThemeStyle,Ta as AddDefaultUnit,ta as AddZero,GW as Alert,Ha as ArrowIcon,Ga as BackToTop,rh as BackTop,_a as Base64Decode,Sa as Base64Encode,wc as Button,hu as Calendar,Nh as Card,ra as CheckFileURL,sA as Checkbox,Ka as Checkmark,na as ChunkArray,rW as Collapse,pe as ConsoleLog,Qi as ConvertCurrency,yu as DatePicker,Hi as DetermineNewHeight,Yi as DetermineNewWidth,Oa as FileChecker,I as FileExtensions,P as FileTypes,pp as FindSelector,Th as Flex,Jq as Form,$ as FormValidationTypes,aa as FormatBytes,Ba as FormatDate,xa as FormatDateTime,wa as FormatSimpleDate,Xa as FormatSimpleDateTime,ka as FormatTime,Zi as GetByCurrency,Gi as GetCountryCodeByCurrencyCode,Ki as GetCountryCodeByLanguage,ba as GetCurrencyFormat,ea as GetCurrencySymbol,Ma as GetDecimalByCurrency,Aa as GetTypeByFileType,Fa as H1,$a as H2,ja as H3,Va as H4,Vi as ITDContext,Ui as ITDProvider,xA as Image,$W as InlineSelect,Qa as InlineSelectArrow,wf as Input,za as IsValidJSON,Ua as LockIcon,en as ModalManager,D as ModalState,MA as NoData,Ti as Notification,bA as Picture,lh as Progress,gW as Radio,ca as RemoveUnits,th as Result,qa as SVGLoader,Xq as Select,ac as Spin,Ah as Status,Pf as Switch,Xh as Table,Wh as Tabs,Sf as TextArea,uq as TinyScrollbar,$i as Tooltip,Ja as Trash,ia as UniUpperCase,pa as UpdateThemeStyle,Zf as Upload,Ya as UploadIcon,sa as Wait,Za as ZoomIn,eA as ZoomOut,Sh as resources,Ea as toKebabCase,ce as useAddExternalCSS,ap as useComponentSize,ip as useConnectionStatus,te as useConstructor,sp as useContextBridge,Ap as useCoreFetch,op as useCreateDynamicStyle,zp as useCreateStyledStyle,dp as useKeyboardShortcut,Op as useMultiQuery,tp as useOnClickOutside,cp as useOnESCKeyDown,rp as useOnResize,lp as useOrientation,ze as useReCaptcha,np as useSingleQuery};
6240
+ `,Th=({gap:e,justify:b,align:M,vertical:p,wrap:z,stretch:t,style:c,className:n,children:O})=>o(kh,{$gap:e,$justify:b,$align:M,$vertical:p,$wrap:z,$stretch:t,style:c,className:n,children:O}),Sh={tr:{itd:j,calendar:U},en:{itd:V,calendar:H}};e.use(M).init({resources:Sh,preload:["en","tr"],fallbackLng:["en","tr"],lng:"en-US",load:"languageOnly",ns:["itd","calendar"],defaultNS:"itd",initImmediate:!1,debug:!1,interpolation:{escapeValue:!1}});export{bW as ALink,cu as Accordion,oa as AddDefaultThemeStyle,Ta as AddDefaultUnit,ta as AddZero,GW as Alert,Ha as ArrowIcon,Ga as BackToTop,rh as BackTop,_a as Base64Decode,Sa as Base64Encode,wc as Button,hu as Calendar,Nh as Card,ra as CheckFileURL,sA as Checkbox,Ka as Checkmark,na as ChunkArray,rW as Collapse,pe as ConsoleLog,Qi as ConvertCurrency,yu as DatePicker,Hi as DetermineNewHeight,Yi as DetermineNewWidth,Oa as FileChecker,I as FileExtensions,P as FileTypes,pp as FindSelector,Th as Flex,Jq as Form,$ as FormValidationTypes,aa as FormatBytes,Ba as FormatDate,xa as FormatDateTime,wa as FormatSimpleDate,Xa as FormatSimpleDateTime,ka as FormatTime,Zi as GetByCurrency,Gi as GetCountryCodeByCurrencyCode,Ki as GetCountryCodeByLanguage,ba as GetCurrencyFormat,ea as GetCurrencySymbol,Ma as GetDecimalByCurrency,Aa as GetTypeByFileType,Fa as H1,$a as H2,ja as H3,Va as H4,Vi as ITDContext,Ui as ITDProvider,xA as Image,$W as InlineSelect,Qa as InlineSelectArrow,wf as Input,za as IsValidJSON,Ua as LockIcon,en as ModalManager,D as ModalState,MA as NoData,Ti as Notification,bA as Picture,lh as Progress,gW as Radio,ca as RemoveUnits,th as Result,qa as SVGLoader,Xq as Select,ac as Spin,Ah as Status,Pf as Switch,Xh as Table,Wh as Tabs,Sf as TextArea,uq as TinyScrollbar,$i as Tooltip,Ja as Trash,ia as UniUpperCase,pa as UpdateThemeStyle,Zf as Upload,Ya as UploadIcon,sa as Wait,Za as ZoomIn,eA as ZoomOut,Sh as resources,Ea as toKebabCase,ce as useAddExternalCSS,ap as useComponentSize,ip as useConnectionStatus,te as useConstructor,sp as useContextBridge,Ap as useCoreFetch,op as useCreateDynamicStyle,zp as useCreateStyledStyle,dp as useKeyboardShortcut,Op as useMultiQuery,tp as useOnClickOutside,cp as useOnESCKeyDown,rp as useOnResize,lp as useOrientation,ze as useReCaptcha,np as useSingleQuery};
@@ -1,2 +1,2 @@
1
1
  import { ITDSizeSlug } from "../index";
2
- export default function GetSizeBySizeSlug(size: ITDSizeSlug): "x-small" | "small" | "medium" | "default" | "large" | "x-large" | "df";
2
+ export default function GetSizeBySizeSlug(size: ITDSizeSlug): "large" | "small" | "x-small" | "medium" | "default" | "x-large" | "df";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inntechcorp/it-design",
3
- "version": "2.1.52",
3
+ "version": "2.1.53",
4
4
  "description": "All in one Design library for web applications.",
5
5
  "author": "Inn.Tech",
6
6
  "license": "ISC",