@inntechcorp/it-design 2.2.17 → 2.2.18
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 +7 -7
- package/dist/index.d.ts +2 -1
- package/dist/index.esm.js +7 -7
- package/dist/status/index.d.ts +1 -1
- package/dist/status/styled.d.ts +1 -0
- package/dist/types/StatusProps.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -4575,7 +4575,7 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
4575
4575
|
padding: 4px 8px;
|
|
4576
4576
|
span {
|
|
4577
4577
|
font-size: 9px;
|
|
4578
|
-
font-weight: 600;
|
|
4578
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4579
4579
|
}
|
|
4580
4580
|
}
|
|
4581
4581
|
|
|
@@ -4583,7 +4583,7 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
4583
4583
|
padding: 4px 8px;
|
|
4584
4584
|
span {
|
|
4585
4585
|
font-size: 10px;
|
|
4586
|
-
font-weight: 600;
|
|
4586
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
4589
|
|
|
@@ -4591,7 +4591,7 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
4591
4591
|
padding: 4px 8px;
|
|
4592
4592
|
span {
|
|
4593
4593
|
font-size: 11px;
|
|
4594
|
-
font-weight: 600;
|
|
4594
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
4597
|
|
|
@@ -4599,7 +4599,7 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
4599
4599
|
padding: 6px 10px;
|
|
4600
4600
|
span {
|
|
4601
4601
|
font-size: 12px;
|
|
4602
|
-
font-weight: 600;
|
|
4602
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4603
4603
|
}
|
|
4604
4604
|
}
|
|
4605
4605
|
|
|
@@ -4607,7 +4607,7 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
4607
4607
|
padding: 8px 12px;
|
|
4608
4608
|
span {
|
|
4609
4609
|
font-size: 12.4px;
|
|
4610
|
-
font-weight: 600;
|
|
4610
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4611
4611
|
}
|
|
4612
4612
|
}
|
|
4613
4613
|
|
|
@@ -4615,7 +4615,7 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
4615
4615
|
padding: 10px 14px;
|
|
4616
4616
|
span {
|
|
4617
4617
|
font-size: 12.6px;
|
|
4618
|
-
font-weight: 600;
|
|
4618
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4619
4619
|
}
|
|
4620
4620
|
}
|
|
4621
4621
|
|
|
@@ -5332,4 +5332,4 @@ function(b,z){M.exports?M.exports=z(Fo()):z(b.moment)}(Vo,(function(M){void 0===
|
|
|
5332
5332
|
gap : ${z};
|
|
5333
5333
|
`}}}
|
|
5334
5334
|
|
|
5335
|
-
`,Di=({gap:M,justify:b,align:p,vertical:o,wrap:c,stretch:e,style:O,className:t,children:n})=>z.jsx(Ci,{$gap:M,$justify:b,$align:p,$vertical:o,$wrap:c,$stretch:e,style:O,className:t,children:n}),Pi={tr:{itd:W,calendar:f},en:{itd:u,calendar:h}};M.use(b.initReactI18next).init({resources:Pi,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=Ar,exports.Accordion=mA,exports.AddDefaultThemeStyle=function(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Qo,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=oi,exports.ArrowIcon=cc,exports.BackToTop=Oc,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(si,{className:"itd-back-to-top",children:z.jsx(li,{onClick:O,$show:o,children:b||z.jsx(Oc,{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=AM,exports.Calendar=CA,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(wi,{className:"itd-card-extra",children:o})},d=()=>{if(c)return z.jsx(Ni,{tabs:c,activeTabKey:A,onTabChange:M=>e&&e(M)})},q=()=>{if(M)return z.jsx(Xi,{className:"itd-card-title",children:z.jsx(zc,{children:M})})},s=()=>!!(M||o||c);return z.jsx(Bi,{className:"itd-card",children:z.jsx(I,{updating:a,className:"itd-card-spin",children:z.jsxs(vi,{className:"itd-card-body",$minWidth:O,$minHeight:t,$hasHeader:s(),children:[(()=>{if(s())return z.jsxs(xi,{$showSeparator:b,className:"itd-card-header",children:[q(),d(),i()]})})(),(()=>{if(n)return z.jsx(yi,{className:"itd-card-body",$padding:r,children:n})})()]})})})},exports.CheckFileURL=wo,exports.Checkbox=gc,exports.Checkmark=tc,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=ur,exports.ConsoleLog=w,exports.ConvertCurrency=function(M,b){return M||(M=0),Xo(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=jA,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=Di,exports.Form=qA,exports.FormatBytes=To,exports.FormatDate=function(M,b="tr",z="D MMMM YYYY dddd"){return $o(new Date(M)).locale(b).format(z)},exports.FormatDateTime=function(M,b="tr",z="D MMMM YYYY dddd - HH:mm"){return $o(new Date(M)).locale(b).format(z)},exports.FormatSimpleDate=function(M,b="tr",z="D MMMM YYYY"){return $o(new Date(M)).locale(b).format(z)},exports.FormatSimpleDateTime=function(M,b="tr",z="MM/DD/YYYY - HH:mm"){return $o(new Date(M)).locale(b).format(z)},exports.FormatTime=function(M,b="tr",z="HH:mm"){return $o(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=xo(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=xo,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=`${yo(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=yo,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=_o,exports.H1=({children:M})=>z.jsx(Jo,{children:z.jsx("span",{children:M})}),exports.H2=zc,exports.H3=({children:M})=>z.jsx(Mc,{children:z.jsx("span",{children:M})}),exports.H4=pc,exports.ITDContext=vo,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(Bo,{className:"itd-provider","data-theme":o,"data-lang":t,children:z.jsx(vo.Provider,{value:l,children:z.jsx(go,{children:z.jsx(HM,{children:b.children})})})})},exports.Image=jc,exports.InlineSelect=Jr,exports.InlineSelectArrow=nc,exports.Input=Pa,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=oc,exports.ModalManager=UM,exports.NoData=ic,exports.Notification=No,exports.Picture=rc,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-"+M,z+=" itd-progress-percent-"+b,""!==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();return"active"===M||"normal"===M||p?z.jsx("span",{className:"itd-progress-status-text",children:b+"%"}):"success"===M?O:"exception"===M?t:void 0};return z.jsx(Ri,{$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=Tr,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=qi,exports.SVGLoader=(M,b,p)=>z.jsx(Eo,{$width:b,$height:p,children:z.jsx(e.ReactSVG,{src:M})}),exports.Select=Fn,exports.Spin=I,exports.Status=function({variant:M="gray-1",size:b="default",stretch:p=!1,children:o="",className:c=""}){const e=()=>{let z="itd-status";return z+=" itd-status-"+M,z+=" itd-status-"+bM(b),p&&(z+=" itd-status-stretch"),""!==c&&null!==c&&(z+=" "+c),z};return z.jsx(fi,{$status:M,className:e(),children:z.jsx("span",{children:o})})},exports.Switch=Ya,exports.Table=Ei,exports.Tabs=Ni,exports.TextArea=$a,exports.TinyScrollbar=wn,exports.Trash=Ac,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=tr,exports.UploadIcon=ec,exports.Wait=So,exports.ZoomIn=ac,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=Pi,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=E,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=k,exports.useOnClickOutside=T,exports.useOnESCKeyDown=_,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 w.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=>{w.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),M&&M(b)}))}catch(M){w.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=S;
|
|
5335
|
+
`,Di=({gap:M,justify:b,align:p,vertical:o,wrap:c,stretch:e,style:O,className:t,children:n})=>z.jsx(Ci,{$gap:M,$justify:b,$align:p,$vertical:o,$wrap:c,$stretch:e,style:O,className:t,children:n}),Pi={tr:{itd:W,calendar:f},en:{itd:u,calendar:h}};M.use(b.initReactI18next).init({resources:Pi,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=Ar,exports.Accordion=mA,exports.AddDefaultThemeStyle=function(){const M=document.createElement("style");document.head.appendChild(M),M.textContent=":root{color: #ffffff}"},exports.AddDefaultUnit=Qo,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=oi,exports.ArrowIcon=cc,exports.BackToTop=Oc,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(si,{className:"itd-back-to-top",children:z.jsx(li,{onClick:O,$show:o,children:b||z.jsx(Oc,{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=AM,exports.Calendar=CA,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(wi,{className:"itd-card-extra",children:o})},d=()=>{if(c)return z.jsx(Ni,{tabs:c,activeTabKey:A,onTabChange:M=>e&&e(M)})},q=()=>{if(M)return z.jsx(Xi,{className:"itd-card-title",children:z.jsx(zc,{children:M})})},s=()=>!!(M||o||c);return z.jsx(Bi,{className:"itd-card",children:z.jsx(I,{updating:a,className:"itd-card-spin",children:z.jsxs(vi,{className:"itd-card-body",$minWidth:O,$minHeight:t,$hasHeader:s(),children:[(()=>{if(s())return z.jsxs(xi,{$showSeparator:b,className:"itd-card-header",children:[q(),d(),i()]})})(),(()=>{if(n)return z.jsx(yi,{className:"itd-card-body",$padding:r,children:n})})()]})})})},exports.CheckFileURL=wo,exports.Checkbox=gc,exports.Checkmark=tc,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=ur,exports.ConsoleLog=w,exports.ConvertCurrency=function(M,b){return M||(M=0),Xo(M,"TRY"===b?"₺":"USD"===b?"$":"EUR"===b?"€":"?")},exports.DatePicker=jA,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=Di,exports.Form=qA,exports.FormatBytes=To,exports.FormatDate=function(M,b="tr",z="D MMMM YYYY dddd"){return $o(new Date(M)).locale(b).format(z)},exports.FormatDateTime=function(M,b="tr",z="D MMMM YYYY dddd - HH:mm"){return $o(new Date(M)).locale(b).format(z)},exports.FormatSimpleDate=function(M,b="tr",z="D MMMM YYYY"){return $o(new Date(M)).locale(b).format(z)},exports.FormatSimpleDateTime=function(M,b="tr",z="MM/DD/YYYY - HH:mm"){return $o(new Date(M)).locale(b).format(z)},exports.FormatTime=function(M,b="tr",z="HH:mm"){return $o(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=xo(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=xo,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=`${yo(b)}${M}`.replace(/\B(?=(\d{3})+(?!\d))/g,".")},exports.GetCurrencySymbol=yo,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=_o,exports.H1=({children:M})=>z.jsx(Jo,{children:z.jsx("span",{children:M})}),exports.H2=zc,exports.H3=({children:M})=>z.jsx(Mc,{children:z.jsx("span",{children:M})}),exports.H4=pc,exports.ITDContext=vo,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(Bo,{className:"itd-provider","data-theme":o,"data-lang":t,children:z.jsx(vo.Provider,{value:l,children:z.jsx(go,{children:z.jsx(HM,{children:b.children})})})})},exports.Image=jc,exports.InlineSelect=Jr,exports.InlineSelectArrow=nc,exports.Input=Pa,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=oc,exports.ModalManager=UM,exports.NoData=ic,exports.Notification=No,exports.Picture=rc,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-"+M,z+=" itd-progress-percent-"+b,""!==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();return"active"===M||"normal"===M||p?z.jsx("span",{className:"itd-progress-status-text",children:b+"%"}):"success"===M?O:"exception"===M?t:void 0};return z.jsx(Ri,{$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=Tr,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=qi,exports.SVGLoader=(M,b,p)=>z.jsx(Eo,{$width:b,$height:p,children:z.jsx(e.ReactSVG,{src:M})}),exports.Select=Fn,exports.Spin=I,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-"+bM(b),p&&(z+=" itd-status-stretch"),o&&(z+=" itd-status-bold"),""!==e&&null!==e&&(z+=" "+e),z};return z.jsx(fi,{$status:M,$bold:o,className:O(),children:z.jsx("span",{children:c})})},exports.Switch=Ya,exports.Table=Ei,exports.Tabs=Ni,exports.TextArea=$a,exports.TinyScrollbar=wn,exports.Trash=Ac,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=tr,exports.UploadIcon=ec,exports.Wait=So,exports.ZoomIn=ac,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=Pi,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=E,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=k,exports.useOnClickOutside=T,exports.useOnESCKeyDown=_,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 w.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=>{w.double("ReCaptcha V3","Token is valid"),console.log("token: "+b),M&&M(b)}))}catch(M){w.double("ReCaptcha V3","Token is invalid","error")}}))}}},exports.useSingleQuery=S;
|
package/dist/index.d.ts
CHANGED
|
@@ -696,7 +696,7 @@ declare const Spin: ({ updating, opacity, size, className, children }: ISpin) =>
|
|
|
696
696
|
|
|
697
697
|
declare function BackTop(props: any): react_jsx_runtime.JSX.Element;
|
|
698
698
|
|
|
699
|
-
declare function Status({ variant, size, stretch, children, className, }: StatusProps): react_jsx_runtime.JSX.Element;
|
|
699
|
+
declare function Status({ variant, size, stretch, bold, children, className, }: StatusProps): react_jsx_runtime.JSX.Element;
|
|
700
700
|
|
|
701
701
|
declare function Progress({ status, percent, alwaysShowPercent, showInfo, className, }: ProgressProps): react_jsx_runtime.JSX.Element;
|
|
702
702
|
|
|
@@ -1487,6 +1487,7 @@ type StatusProps = {
|
|
|
1487
1487
|
variant?: StatusVariant;
|
|
1488
1488
|
size?: ITDSize;
|
|
1489
1489
|
stretch?: boolean;
|
|
1490
|
+
bold?: boolean;
|
|
1490
1491
|
children?: ChildrenProps;
|
|
1491
1492
|
className?: string;
|
|
1492
1493
|
};
|
package/dist/index.esm.js
CHANGED
|
@@ -4575,7 +4575,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4575
4575
|
padding: 4px 8px;
|
|
4576
4576
|
span {
|
|
4577
4577
|
font-size: 9px;
|
|
4578
|
-
font-weight: 600;
|
|
4578
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4579
4579
|
}
|
|
4580
4580
|
}
|
|
4581
4581
|
|
|
@@ -4583,7 +4583,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4583
4583
|
padding: 4px 8px;
|
|
4584
4584
|
span {
|
|
4585
4585
|
font-size: 10px;
|
|
4586
|
-
font-weight: 600;
|
|
4586
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
4589
|
|
|
@@ -4591,7 +4591,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4591
4591
|
padding: 4px 8px;
|
|
4592
4592
|
span {
|
|
4593
4593
|
font-size: 11px;
|
|
4594
|
-
font-weight: 600;
|
|
4594
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4595
4595
|
}
|
|
4596
4596
|
}
|
|
4597
4597
|
|
|
@@ -4599,7 +4599,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4599
4599
|
padding: 6px 10px;
|
|
4600
4600
|
span {
|
|
4601
4601
|
font-size: 12px;
|
|
4602
|
-
font-weight: 600;
|
|
4602
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4603
4603
|
}
|
|
4604
4604
|
}
|
|
4605
4605
|
|
|
@@ -4607,7 +4607,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4607
4607
|
padding: 8px 12px;
|
|
4608
4608
|
span {
|
|
4609
4609
|
font-size: 12.4px;
|
|
4610
|
-
font-weight: 600;
|
|
4610
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4611
4611
|
}
|
|
4612
4612
|
}
|
|
4613
4613
|
|
|
@@ -4615,7 +4615,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4615
4615
|
padding: 10px 14px;
|
|
4616
4616
|
span {
|
|
4617
4617
|
font-size: 12.6px;
|
|
4618
|
-
font-weight: 600;
|
|
4618
|
+
font-weight: ${({$bold:M})=>M?600:500};
|
|
4619
4619
|
}
|
|
4620
4620
|
}
|
|
4621
4621
|
|
|
@@ -4626,7 +4626,7 @@ function(b,z){M.exports?M.exports=z(FO()):z(b.moment)}(jO,(function(M){void 0===
|
|
|
4626
4626
|
}
|
|
4627
4627
|
`;var b}}
|
|
4628
4628
|
|
|
4629
|
-
`;function xd({variant:M="gray-1",size:b="default",stretch:z=!1,children:
|
|
4629
|
+
`;function xd({variant:M="gray-1",size:b="default",stretch:z=!1,bold:o=!0,children:O="",className:c=""}){return p(yd,{$status:M,$bold:o,className:(()=>{let p="itd-status";return p+=" itd-status-"+M,p+=" itd-status-"+SM(b),z&&(p+=" itd-status-stretch"),o&&(p+=" itd-status-bold"),""!==c&&null!==c&&(p+=" "+c),p})(),children:p("span",{children:O})})}const wd={normal:{background:"#1B84FF",remaining:"#efefef"},active:{background:"#1B84FF",remaining:"#efefef"},success:{background:"#17C653",remaining:"#efefef"},exception:{background:"#F8285A",remaining:"#efefef"}},Td=k.div`
|
|
4630
4630
|
|
|
4631
4631
|
position: relative;
|
|
4632
4632
|
width: 100%;
|
package/dist/status/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StatusProps } from '../index';
|
|
2
|
-
export default function Status({ variant, size, stretch, children, className, }: StatusProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function Status({ variant, size, stretch, bold, children, className, }: StatusProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/status/styled.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { StatusVariant } from '../index';
|
|
2
2
|
declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
$status: StatusVariant;
|
|
4
|
+
$bold: boolean;
|
|
4
5
|
}>> & string;
|
|
5
6
|
export { Wrapper };
|