@grassus/ui-package 1.0.24 → 1.0.25

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/cjs/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),t=require("antd");const{Title:n}=t.Typography,{Sider:l}=t.Layout,r={height:"100vh",position:"sticky",top:0,overflow:"hidden"},a=e=>({scrollbarGutter:"stable",overflow:e?"auto":"hidden"}),o="menuCollapsed";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&l.firstChild?l.insertBefore(r,l.firstChild):l.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("button {\r\n font-size: 60px;\r\n}\r\n");exports.Header=({title:l,level:r=3,extra:a,actions:o,gap:s,styles:i})=>e.createElement(t.Layout.Header,{style:(null==i?void 0:i.body)||{}},e.createElement(t.Flex,{align:"center",gap:s,style:{width:"100%"}},a&&e.createElement("div",{style:(null==i?void 0:i.extra)||{}},a),e.createElement(t.Flex,{flex:"1 1 auto",style:{overflow:"hidden"}},e.createElement(n,{level:r,ellipsis:!0,style:(null==i?void 0:i.title)||{margin:"0px"}},l)),o&&e.createElement("div",{style:(null==i?void 0:i.actions)||{}},o))),exports.SiderMenu=({collapsed:n,title:o,extra:s,styles:i,loading:d,menuProps:c})=>{const[u,p]=e.useState(!1);let m;return"boolean"==typeof d?m={spinning:d}:"object"==typeof d&&(m=Object.assign({spinning:!0},d)),e.createElement(l,{collapsed:n,style:(null==i?void 0:i.body)||{}},e.createElement(t.Flex,{vertical:!0,style:r},o&&e.createElement(t.Flex,{align:"center",justify:"center",style:(null==i?void 0:i.header)||{}},e.createElement("div",{style:{width:"100%"}},o)),e.createElement(t.Flex,{vertical:!0,flex:"1 1 auto",style:a(u),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)}},e.createElement(t.Spin,Object.assign({spinning:!1},m),e.createElement(t.Menu,Object.assign({},c,{style:(null==i?void 0:i.actions)||{}})))),s&&e.createElement(t.Flex,{style:(null==i?void 0:i.extra)||{}},s)))},exports.StepPreloader=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:l=8,delay:r=1.2})=>{const a=e=>({animationDelay:`${.1*e}s`}),o={width:"10px",height:"70px",display:"inline-block",transformOrigin:"bottom center",borderTopRightRadius:"20px",borderTopLeftRadius:"20px",animation:`animationStepPreloader ${r}s linear infinite`,margin:"2px"};return e.createElement("span",null,e.createElement("style",null,`\n @keyframes animationStepPreloader {\n 0% {\n transform: scaleY(0.1);\n background: ${n};\n }\n 50% {\n transform: scaleY(1);\n background: ${t};\n }\n 100% {\n transform: scaleY(0.1);\n background: ${n};\n }\n }\n `),Array.from(Array(l).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),a(t))}))))},exports.TestInfo=t=>e.createElement("button",null,t.label),exports.useMenuCollapsed=t=>{const[n,l]=e.useState((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(t||o));return{menuCollapsed:n,setMenuCollapsed:e=>{l(e),window.localStorage.setItem(t||o,String(e))}}};
1
+ "use strict";var e=require("react"),t=require("antd");const{Title:n}=t.Typography,{Sider:l}=t.Layout,r={height:"100vh",position:"sticky",top:0,overflow:"hidden"},a=e=>({scrollbarGutter:"stable",overflow:e?"auto":"hidden"}),o="menuCollapsed";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===n&&l.firstChild?l.insertBefore(r,l.firstChild):l.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}}("button {\r\n /* font-size: 60px; */\r\n}\r\n");exports.Header=({title:l,level:r=3,extra:a,actions:o,gap:s,styles:i})=>e.createElement(t.Layout.Header,{style:(null==i?void 0:i.body)||{}},e.createElement(t.Flex,{align:"center",gap:s,style:{width:"100%"}},a&&e.createElement("div",{style:(null==i?void 0:i.extra)||{}},a),e.createElement(t.Flex,{flex:"1 1 auto",style:{overflow:"hidden"}},e.createElement(n,{level:r,ellipsis:!0,style:(null==i?void 0:i.title)||{margin:"0px"}},l)),o&&e.createElement("div",{style:(null==i?void 0:i.actions)||{}},o))),exports.SiderMenu=({collapsed:n,title:o,extra:s,styles:i,loading:d,menuProps:c})=>{const[u,p]=e.useState(!1);let m;return"boolean"==typeof d?m={spinning:d}:"object"==typeof d&&(m=Object.assign({spinning:!0},d)),e.createElement(l,{collapsed:n,style:(null==i?void 0:i.body)||{}},e.createElement(t.Flex,{vertical:!0,style:r},o&&e.createElement(t.Flex,{align:"center",justify:"center",style:(null==i?void 0:i.header)||{}},e.createElement("div",{style:{width:"100%"}},o)),e.createElement(t.Flex,{vertical:!0,flex:"1 1 auto",style:a(u),onMouseEnter:()=>{p(!0)},onMouseLeave:()=>{p(!1)}},e.createElement(t.Spin,Object.assign({spinning:!1},m),e.createElement(t.Menu,Object.assign({},c,{style:(null==i?void 0:i.actions)||{}})))),s&&e.createElement(t.Flex,{style:(null==i?void 0:i.extra)||{}},s)))},exports.StepPreloader=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:l=8,delay:r=1.2})=>{const a=e=>({animationDelay:`${.1*e}s`}),o={width:"10px",height:"70px",display:"inline-block",transformOrigin:"bottom center",borderTopRightRadius:"20px",borderTopLeftRadius:"20px",animation:`animationStepPreloader ${r}s linear infinite`,margin:"2px"};return e.createElement("span",null,e.createElement("style",null,`\n @keyframes animationStepPreloader {\n 0% {\n transform: scaleY(0.1);\n background: ${n};\n }\n 50% {\n transform: scaleY(1);\n background: ${t};\n }\n 100% {\n transform: scaleY(0.1);\n background: ${n};\n }\n }\n `),Array.from(Array(l).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),a(t))}))))},exports.TestInfo=t=>e.createElement("button",null,t.label),exports.useMenuCollapsed=t=>{const[n,l]=e.useState((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(t||o));return{menuCollapsed:n,setMenuCollapsed:e=>{l(e),window.localStorage.setItem(t||o,String(e))}}};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/preloaders/StepPreloader/StepPreloader.tsx","../../src/components/TestInfo/TestInfo.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["Title","Typography","Sider","Layout","siderWrapper","height","position","top","overflow","menuWrapper","isHover","scrollbarGutter","defaultMenuName","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","title","level","extra","actions","gap","styles","React","Header","body","Flex","align","width","flex","ellipsis","margin","collapsed","loading","menuProps","setIsHover","useState","spinProps","spinning","vertical","justify","header","onMouseEnter","onMouseLeave","Spin","Object","assign","Menu","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","Array","from","keys","map","key","props","label","menuName","menuCollapsed","setMenuCollapsed","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String"],"mappings":"sDAIA,MAAM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AQC,KAAKX,GACpC9B,EAAAd,cAAA,MAAA,CAAKwD,IAAKZ,EAAM7C,qCAAY+C,GAAcH,EAAQC,QAGtD,mBC5Cca,GACT3C,EAASd,cAAA,SAAA,KAAAyD,EAAMC,gCHOSC,IAC/B,MAAOC,EAAeC,GAAoBlC,EAAAA,SAXP,CAACgC,IACpC,MAAMG,EAAeC,OAAOC,aAAaC,QAAQN,GAEjD,QAAKG,GAIE,QAAQI,KAAKJ,EAAa,EAK/BK,CAA6BR,GAAYnE,IAG3C,MAAO,CACLoE,gBACAC,iBAAmBO,IACjBP,EAAiBO,GACjBL,OAAOC,aAAaK,QAAQV,GAAYnE,EAAiB8E,OAAOF,GAAO,EAE1E","x_google_ignoreList":[3]}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/preloaders/StepPreloader/StepPreloader.tsx","../../src/components/TestInfo/TestInfo.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["Title","Typography","Sider","Layout","siderWrapper","height","position","top","overflow","menuWrapper","isHover","scrollbarGutter","defaultMenuName","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","title","level","extra","actions","gap","styles","React","Header","body","Flex","align","width","flex","ellipsis","margin","collapsed","loading","menuProps","setIsHover","useState","spinProps","spinning","vertical","justify","header","onMouseEnter","onMouseLeave","Spin","Object","assign","Menu","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","Array","from","keys","map","key","props","label","menuName","menuCollapsed","setMenuCollapsed","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String"],"mappings":"sDAIA,MAAMA,MAAEA,GAAUC,cCCZC,MAAEA,GAAUC,SAkBZC,EAAoC,CACxCC,OAAQ,QACRC,SAAU,SACVC,IAAK,EACLC,SAAU,UAGNC,EAAeC,IACZ,CACLC,gBAAiB,SACjBH,SAAUE,EAAU,OAAS,WC/B3BE,EAAkB,iBCFxB,SAAqBC,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DC,EAAQH,SAASI,cAAc,SACnCD,EAAME,KAAO,WAEI,QAAbN,GACEE,EAAKK,WACPL,EAAKM,aAAaJ,EAAOF,EAAKK,YAKhCL,EAAKO,YAAYL,GAGfA,EAAMM,WACRN,EAAMM,WAAWC,QAAUb,EAE3BM,EAAMK,YAAYR,SAASW,eAAed,GAnBY,CAqB1D,kEHFe,EAAGe,QAAOC,QAAM,EAAGC,QAAOC,UAASC,MAAKC,YAGnDC,EAACd,cAAAjB,EAAAA,OAAOgC,QAAOhB,OAAOc,aAAM,EAANA,EAAQG,OAAQ,IACpCF,EAAAd,cAACiB,OAAK,CAAAC,MAAM,SAASN,IAAKA,EAAKb,MAAO,CAAEoB,MAAO,SAC5CT,GAASI,EAAKd,cAAA,MAAA,CAAAD,OAAOc,aAAA,EAAAA,EAAQH,QAAS,CAAA,GAAKA,GAE5CI,EAAAd,cAACiB,EAAIA,KAAA,CAACG,KAAK,WAAWrB,MAAO,CAAEX,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,GAAMD,OAInBE,EAAiC,CACrC3B,MAAO,OACPlC,OAAQ,OACR8D,QAAS,eACTC,gBAAiB,gBACjBC,qBAAsB,OACtBC,oBAAqB,OACrBC,UAAW,0BAA0BT,qBACrCpB,OAAQ,OAGV,OACER,EAAAd,cAAA,OAAA,KACEc,EACGd,cAAA,QAAA,KAAA,uIAImBwC,wGAIAD,2GAIAC,4CAKrBY,MAAMC,KAAKD,MAAMX,GAAOa,QAAQC,KAAKX,GACpC9B,EAAAd,cAAA,MAAA,CAAKwD,IAAKZ,EAAM7C,qCAAY+C,GAAcH,EAAQC,QAGtD,mBC5Cca,GACT3C,EAASd,cAAA,SAAA,KAAAyD,EAAMC,gCHOSC,IAC/B,MAAOC,EAAeC,GAAoBlC,EAAAA,SAXP,CAACgC,IACpC,MAAMG,EAAeC,OAAOC,aAAaC,QAAQN,GAEjD,QAAKG,GAIE,QAAQI,KAAKJ,EAAa,EAK/BK,CAA6BR,GAAYnE,IAG3C,MAAO,CACLoE,gBACAC,iBAAmBO,IACjBP,EAAiBO,GACjBL,OAAOC,aAAaK,QAAQV,GAAYnE,EAAiB8E,OAAOF,GAAO,EAE1E","x_google_ignoreList":[3]}
package/dist/esm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import e,{useState as t}from"react";import{Layout as n,Flex as l,Typography as a,Spin as r,Menu as o}from"antd";const{Title:i}=a,s=({title:t,level:a=3,extra:r,actions:o,gap:s,styles:c})=>e.createElement(n.Header,{style:(null==c?void 0:c.body)||{}},e.createElement(l,{align:"center",gap:s,style:{width:"100%"}},r&&e.createElement("div",{style:(null==c?void 0:c.extra)||{}},r),e.createElement(l,{flex:"1 1 auto",style:{overflow:"hidden"}},e.createElement(i,{level:a,ellipsis:!0,style:(null==c?void 0:c.title)||{margin:"0px"}},t)),o&&e.createElement("div",{style:(null==c?void 0:c.actions)||{}},o))),{Sider:c}=n,d={height:"100vh",position:"sticky",top:0,overflow:"hidden"},m=e=>({scrollbarGutter:"stable",overflow:e?"auto":"hidden"}),u=({collapsed:n,title:a,extra:i,styles:s,loading:u,menuProps:p})=>{const[y,f]=t(!1);let g;return"boolean"==typeof u?g={spinning:u}:"object"==typeof u&&(g=Object.assign({spinning:!0},u)),e.createElement(c,{collapsed:n,style:(null==s?void 0:s.body)||{}},e.createElement(l,{vertical:!0,style:d},a&&e.createElement(l,{align:"center",justify:"center",style:(null==s?void 0:s.header)||{}},e.createElement("div",{style:{width:"100%"}},a)),e.createElement(l,{vertical:!0,flex:"1 1 auto",style:m(y),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)}},e.createElement(r,Object.assign({spinning:!1},g),e.createElement(o,Object.assign({},p,{style:(null==s?void 0:s.actions)||{}})))),i&&e.createElement(l,{style:(null==s?void 0:s.extra)||{}},i)))},p="menuCollapsed",y=e=>{const[n,l]=t((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(e||p));return{menuCollapsed:n,setMenuCollapsed:t=>{l(t),window.localStorage.setItem(e||p,String(t))}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("button {\r\n font-size: 60px;\r\n}\r\n");const f=t=>e.createElement("button",null,t.label),g=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:l=8,delay:a=1.2})=>{const r=e=>({animationDelay:`${.1*e}s`}),o={width:"10px",height:"70px",display:"inline-block",transformOrigin:"bottom center",borderTopRightRadius:"20px",borderTopLeftRadius:"20px",animation:`animationStepPreloader ${a}s linear infinite`,margin:"2px"};return e.createElement("span",null,e.createElement("style",null,`\n @keyframes animationStepPreloader {\n 0% {\n transform: scaleY(0.1);\n background: ${n};\n }\n 50% {\n transform: scaleY(1);\n background: ${t};\n }\n 100% {\n transform: scaleY(0.1);\n background: ${n};\n }\n }\n `),Array.from(Array(l).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),r(t))}))))};export{s as Header,u as SiderMenu,g as StepPreloader,f as TestInfo,y as useMenuCollapsed};
1
+ import e,{useState as t}from"react";import{Layout as n,Flex as l,Typography as a,Spin as r,Menu as o}from"antd";const{Title:i}=a,s=({title:t,level:a=3,extra:r,actions:o,gap:s,styles:c})=>e.createElement(n.Header,{style:(null==c?void 0:c.body)||{}},e.createElement(l,{align:"center",gap:s,style:{width:"100%"}},r&&e.createElement("div",{style:(null==c?void 0:c.extra)||{}},r),e.createElement(l,{flex:"1 1 auto",style:{overflow:"hidden"}},e.createElement(i,{level:a,ellipsis:!0,style:(null==c?void 0:c.title)||{margin:"0px"}},t)),o&&e.createElement("div",{style:(null==c?void 0:c.actions)||{}},o))),{Sider:c}=n,d={height:"100vh",position:"sticky",top:0,overflow:"hidden"},m=e=>({scrollbarGutter:"stable",overflow:e?"auto":"hidden"}),u=({collapsed:n,title:a,extra:i,styles:s,loading:u,menuProps:p})=>{const[y,f]=t(!1);let g;return"boolean"==typeof u?g={spinning:u}:"object"==typeof u&&(g=Object.assign({spinning:!0},u)),e.createElement(c,{collapsed:n,style:(null==s?void 0:s.body)||{}},e.createElement(l,{vertical:!0,style:d},a&&e.createElement(l,{align:"center",justify:"center",style:(null==s?void 0:s.header)||{}},e.createElement("div",{style:{width:"100%"}},a)),e.createElement(l,{vertical:!0,flex:"1 1 auto",style:m(y),onMouseEnter:()=>{f(!0)},onMouseLeave:()=>{f(!1)}},e.createElement(r,Object.assign({spinning:!1},g),e.createElement(o,Object.assign({},p,{style:(null==s?void 0:s.actions)||{}})))),i&&e.createElement(l,{style:(null==s?void 0:s.extra)||{}},i)))},p="menuCollapsed",y=e=>{const[n,l]=t((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(e||p));return{menuCollapsed:n,setMenuCollapsed:t=>{l(t),window.localStorage.setItem(e||p,String(t))}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var l=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&l.firstChild?l.insertBefore(a,l.firstChild):l.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("button {\r\n /* font-size: 60px; */\r\n}\r\n");const f=t=>e.createElement("button",null,t.label),g=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:l=8,delay:a=1.2})=>{const r=e=>({animationDelay:`${.1*e}s`}),o={width:"10px",height:"70px",display:"inline-block",transformOrigin:"bottom center",borderTopRightRadius:"20px",borderTopLeftRadius:"20px",animation:`animationStepPreloader ${a}s linear infinite`,margin:"2px"};return e.createElement("span",null,e.createElement("style",null,`\n @keyframes animationStepPreloader {\n 0% {\n transform: scaleY(0.1);\n background: ${n};\n }\n 50% {\n transform: scaleY(1);\n background: ${t};\n }\n 100% {\n transform: scaleY(0.1);\n background: ${n};\n }\n }\n `),Array.from(Array(l).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),r(t))}))))};export{s as Header,u as SiderMenu,g as StepPreloader,f as TestInfo,y as useMenuCollapsed};
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/TestInfo/TestInfo.tsx","../../src/components/preloaders/StepPreloader/StepPreloader.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["Title","Typography","Header","title","level","extra","actions","gap","styles","React","createElement","Layout","style","body","Flex","align","width","flex","overflow","ellipsis","margin","Sider","siderWrapper","height","position","top","menuWrapper","isHover","scrollbarGutter","SiderMenu","collapsed","loading","menuProps","setIsHover","useState","spinProps","spinning","vertical","justify","header","onMouseEnter","onMouseLeave","Spin","Object","assign","Menu","defaultMenuName","useMenuCollapsed","menuName","menuCollapsed","setMenuCollapsed","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String","css","ref","insertAt","document","head","getElementsByTagName","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TestInfo","props","label","StepPreloader","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","Array","from","keys","map","key"],"mappings":"gHAIA,MAAMA,MAAEA,GAAUC,EAmBZC,EAAS,EAAGC,QAAOC,QAAM,EAAGC,QAAOC,UAASC,MAAKC,YAGnDC,EAACC,cAAAC,EAAOT,QAAOU,OAAOJ,aAAM,EAANA,EAAQK,OAAQ,IACpCJ,EAAAC,cAACI,EAAK,CAAAC,MAAM,SAASR,IAAKA,EAAKK,MAAO,CAAEI,MAAO,SAC5CX,GAASI,EAAKC,cAAA,MAAA,CAAAE,OAAOJ,aAAA,EAAAA,EAAQH,QAAS,CAAA,GAAKA,GAE5CI,EAAAC,cAACI,EAAI,CAACG,KAAK,WAAWL,MAAO,CAAEM,SAAU,WACvCT,EAACC,cAAAV,EAAM,CAAAI,MAAOA,EAAOe,UAAS,EAAAP,OAAOJ,aAAM,EAANA,EAAQL,QAAS,CAAEiB,OAAQ,QAC7DjB,IAIJG,GAAWG,uBAAKG,OAAOJ,aAAA,EAAAA,EAAQF,UAAW,CAAA,GAAKA,MC/BlDe,MAAEA,GAAUV,EA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AAmBO,IACjBP,EAAiBO,GACjBL,OAAOC,aAAaK,QAAQV,GAAYF,EAAiBa,OAAOF,GAAO,EAE1E,GCzBH,SAAqBG,EAAKC,QACX,IAARA,IAAiBA,EAAM,CAAA,GAC5B,IAAIC,EAAWD,EAAIC,SAEnB,GAAgC,oBAAbC,SAAnB,CAEA,IAAIC,EAAOD,SAASC,MAAQD,SAASE,qBAAqB,QAAQ,GAC9DrD,EAAQmD,SAASrD,cAAc,SACnCE,EAAMsD,KAAO,WAEI,QAAbJ,GACEE,EAAKG,WACPH,EAAKI,aAAaxD,EAAOoD,EAAKG,YAKhCH,EAAKK,YAAYzD,GAGfA,EAAM0D,WACR1D,EAAM0D,WAAWC,QAAUX,EAE3BhD,EAAMyD,YAAYN,SAASS,eAAeZ,GAnBY,CAqB1D,6CCnBA,MAAMa,EAAYC,GACTjE,EAASC,cAAA,SAAA,KAAAgE,EAAMC,OCElBC,EAAgB,EAAGC,eAAa,UAAWC,iBAAe,cAAeC,QAAM,EAAGC,QAAM,QAC5F,MAAMC,EAAWC,IAER,CAAEC,eAAgB,GADR,GAAMD,OAInBE,EAAiC,CACrCpE,MAAO,OACPO,OAAQ,OACR8D,QAAS,eACTC,gBAAiB,gBACjBC,qBAAsB,OACtBC,oBAAqB,OACrBC,UAAW,0BAA0BT,qBACrC5D,OAAQ,OAGV,OACEX,EAAAC,cAAA,OAAA,KACED,EACGC,cAAA,QAAA,KAAA,uIAImBoE,wGAIAD,2GAIAC,4CAKrBY,MAAMC,KAAKD,MAAMX,GAAOa,QAAQC,KAAKX,GACpCzE,EAAAC,cAAA,MAAA,CAAKoF,IAAKZ,EAAMtE,qCAAYwE,GAAcH,EAAQC,QAGtD","x_google_ignoreList":[3]}
1
+ {"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/SiderMenu/SiderMenu.tsx","../../src/components/SiderMenu/hooks/useMenuCollapsed.ts","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/TestInfo/TestInfo.tsx","../../src/components/preloaders/StepPreloader/StepPreloader.tsx"],"sourcesContent":[null,null,null,"function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n",null,null],"names":["Title","Typography","Header","title","level","extra","actions","gap","styles","React","createElement","Layout","style","body","Flex","align","width","flex","overflow","ellipsis","margin","Sider","siderWrapper","height","position","top","menuWrapper","isHover","scrollbarGutter","SiderMenu","collapsed","loading","menuProps","setIsHover","useState","spinProps","spinning","vertical","justify","header","onMouseEnter","onMouseLeave","Spin","Object","assign","Menu","defaultMenuName","useMenuCollapsed","menuName","menuCollapsed","setMenuCollapsed","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String","css","ref","insertAt","document","head","getElementsByTagName","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","TestInfo","props","label","StepPreloader","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","Array","from","keys","map","key"],"mappings":"gHAIA,MAAMA,MAAEA,GAAUC,EAmBZC,EAAS,EAAGC,QAAOC,QAAM,EAAGC,QAAOC,UAASC,MAAKC,YAGnDC,EAACC,cAAAC,EAAOT,QAAOU,OAAOJ,aAAM,EAANA,EAAQK,OAAQ,IACpCJ,EAAAC,cAACI,EAAK,CAAAC,MAAM,SAASR,IAAKA,EAAKK,MAAO,CAAEI,MAAO,SAC5CX,GAASI,EAAKC,cAAA,MAAA,CAAAE,OAAOJ,aAAA,EAAAA,EAAQH,QA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AAKD,MAAMX,GAAOa,QAAQC,KAAKX,GACpCzE,EAAAC,cAAA,MAAA,CAAKoF,IAAKZ,EAAMtE,qCAAYwE,GAAcH,EAAQC,QAGtD","x_google_ignoreList":[3]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grassus/ui-package",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Grassus UI package",
5
5
  "repository": "https://github.com/grassus/ui-package.git",
6
6
  "author": "Pavel 'Grassus' Dzekunov",