@grassus/ui-package 1.0.20 → 1.0.22
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 +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/Header/hooks/useMenuCollapsed.d.ts +4 -0
- package/dist/cjs/types/components/Header/index.d.ts +1 -0
- package/dist/cjs/types/components/index.d.ts +1 -1
- package/dist/cjs/types/components/preloaders/StepPreloader/StepPreloader.d.ts +1 -9
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Header/hooks/useMenuCollapsed.d.ts +4 -0
- package/dist/esm/types/components/Header/index.d.ts +1 -0
- package/dist/esm/types/components/index.d.ts +1 -1
- package/dist/esm/types/components/preloaders/StepPreloader/StepPreloader.d.ts +1 -9
- package/dist/index.d.ts +7 -10
- package/package.json +1 -1
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;!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("button {\r\n font-size: 60px;\r\n}\r\n");
|
|
1
|
+
"use strict";var e=require("react"),t=require("antd");const{Title:n}=t.Typography,r="menuCollapsed";!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css","top"===n&&r.firstChild?r.insertBefore(a,r.firstChild):r.appendChild(a),a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e))}}("button {\r\n font-size: 60px;\r\n}\r\n");exports.Header=({title:r,level:a=3,extra:l,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%"}},l&&e.createElement("div",{style:(null==i?void 0:i.extra)||{}},l),e.createElement(t.Flex,{flex:"1 1 auto",style:{overflow:"hidden"}},e.createElement(n,{level:a,ellipsis:!0,style:(null==i?void 0:i.title)||{margin:"0px"}},r)),o&&e.createElement("div",{style:(null==i?void 0:i.actions)||{}},o))),exports.StepPreloader=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:r=8,delay:a=1.2})=>{const l=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(r).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),l(t))}))))},exports.TestInfo=t=>e.createElement("button",null,t.label),exports.useMenuCollapsed=t=>{const[n,a]=e.useState((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(t||r));return{menuCollapsed:n,setMenuCollapsed:e=>{a(e),window.localStorage.setItem(t||r,String(e))}}};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/Header/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,"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","defaultMenuName","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","title","level","extra","actions","gap","styles","React","Layout","Header","body","Flex","align","width","flex","overflow","ellipsis","margin","colorPrimary","colorSecondary","count","delay","barItem","item","animationDelay","barStyle1","height","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","Array","from","keys","map","key","props","label","menuName","menuCollapsed","setMenuCollapsed","useState","sidebarState","window","localStorage","getItem","test","getInitialMenuCollapsedState","value","setItem","String"],"mappings":"sDAIA,MAAMA,MAAEA,GAAUC,aCFZC,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,4DFFe,EAAGe,QAAOC,QAAM,EAAGC,QAAOC,UAASC,MAAKC,YAGnDC,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ACAC,iBAAmBQ,IACjBR,EAAiBQ,GACjBL,OAAOC,aAAaK,QAAQX,GAAYtD,EAAiBkE,OAAOF,GAAO,EAE1E","x_google_ignoreList":[2]}
|
|
@@ -5,13 +5,5 @@ interface IStepPreloader {
|
|
|
5
5
|
colorSecondary?: string;
|
|
6
6
|
delay?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const StepPreloader: {
|
|
9
|
-
(props: IStepPreloader): React.JSX.Element;
|
|
10
|
-
defaultProps: {
|
|
11
|
-
count: number;
|
|
12
|
-
colorPrimary: string;
|
|
13
|
-
colorSecondary: string;
|
|
14
|
-
delay: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
8
|
+
declare const StepPreloader: ({ colorPrimary, colorSecondary, count, delay }: IStepPreloader) => React.JSX.Element;
|
|
17
9
|
export default StepPreloader;
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{Layout as
|
|
1
|
+
import e,{useState as t}from"react";import{Layout as n,Flex as r,Typography as l}from"antd";const{Title:a}=l,o=({title:t,level:l=3,extra:o,actions:i,gap:s,styles:d})=>e.createElement(n.Header,{style:(null==d?void 0:d.body)||{}},e.createElement(r,{align:"center",gap:s,style:{width:"100%"}},o&&e.createElement("div",{style:(null==d?void 0:d.extra)||{}},o),e.createElement(r,{flex:"1 1 auto",style:{overflow:"hidden"}},e.createElement(a,{level:l,ellipsis:!0,style:(null==d?void 0:d.title)||{margin:"0px"}},t)),i&&e.createElement("div",{style:(null==d?void 0:d.actions)||{}},i))),i="menuCollapsed",s=e=>{const[n,r]=t((e=>{const t=window.localStorage.getItem(e);return!!t&&/true/i.test(t)})(e||i));return{menuCollapsed:n,setMenuCollapsed:t=>{r(t),window.localStorage.setItem(e||i,String(t))}}};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],l=document.createElement("style");l.type="text/css","top"===n&&r.firstChild?r.insertBefore(l,r.firstChild):r.appendChild(l),l.styleSheet?l.styleSheet.cssText=e:l.appendChild(document.createTextNode(e))}}("button {\r\n font-size: 60px;\r\n}\r\n");const d=t=>e.createElement("button",null,t.label),c=({colorPrimary:t="#1677ff",colorSecondary:n="transparent",count:r=8,delay:l=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 ${l}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(r).keys()).map((t=>e.createElement("div",{key:t,style:Object.assign(Object.assign({},o),a(t))}))))};export{o as Header,c as StepPreloader,d as TestInfo,s as useMenuCollapsed};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../node_modules/style-inject/dist/style-inject.es.js","../../src/components/TestInfo/TestInfo.tsx","../../src/components/preloaders/StepPreloader/StepPreloader.tsx"],"sourcesContent":[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","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/components/Header/Header.tsx","../../src/components/Header/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,"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","defaultMenuName","useMenuCollapsed","menuName","menuCollapsed","setMenuCollapsed","useState","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","height","display","transformOrigin","borderTopRightRadius","borderTopLeftRadius","animation","Array","from","keys","map","key"],"mappings":"4FAIA,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,CA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AiB,gBACjBC,qBAAsB,OACtBC,oBAAqB,OACrBC,UAAW,0BAA0BV,qBACrCpC,OAAQ,OAGV,OACEX,EAAAC,cAAA,OAAA,KACED,EACGC,cAAA,QAAA,KAAA,uIAImB4C,wGAIAD,2GAIAC,4CAKrBa,MAAMC,KAAKD,MAAMZ,GAAOc,QAAQC,KAAKZ,GACpCjD,EAAAC,cAAA,MAAA,CAAK6D,IAAKb,EAAM9C,qCAAYgD,GAAcH,EAAQC,QAGtD","x_google_ignoreList":[2]}
|
|
@@ -5,13 +5,5 @@ interface IStepPreloader {
|
|
|
5
5
|
colorSecondary?: string;
|
|
6
6
|
delay?: number;
|
|
7
7
|
}
|
|
8
|
-
declare const StepPreloader: {
|
|
9
|
-
(props: IStepPreloader): React.JSX.Element;
|
|
10
|
-
defaultProps: {
|
|
11
|
-
count: number;
|
|
12
|
-
colorPrimary: string;
|
|
13
|
-
colorSecondary: string;
|
|
14
|
-
delay: number;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
8
|
+
declare const StepPreloader: ({ colorPrimary, colorSecondary, count, delay }: IStepPreloader) => React.JSX.Element;
|
|
17
9
|
export default StepPreloader;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,11 @@ interface IWrapperHeader {
|
|
|
17
17
|
}
|
|
18
18
|
declare const Header: ({ title, level, extra, actions, gap, styles }: IWrapperHeader) => React.JSX.Element;
|
|
19
19
|
|
|
20
|
+
declare const useMenuCollapsed: (menuName?: string) => {
|
|
21
|
+
menuCollapsed: boolean;
|
|
22
|
+
setMenuCollapsed: (value: boolean) => void;
|
|
23
|
+
};
|
|
24
|
+
|
|
20
25
|
interface ITestInfo {
|
|
21
26
|
label: string;
|
|
22
27
|
}
|
|
@@ -28,14 +33,6 @@ interface IStepPreloader {
|
|
|
28
33
|
colorSecondary?: string;
|
|
29
34
|
delay?: number;
|
|
30
35
|
}
|
|
31
|
-
declare const StepPreloader: {
|
|
32
|
-
(props: IStepPreloader): React.JSX.Element;
|
|
33
|
-
defaultProps: {
|
|
34
|
-
count: number;
|
|
35
|
-
colorPrimary: string;
|
|
36
|
-
colorSecondary: string;
|
|
37
|
-
delay: number;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
36
|
+
declare const StepPreloader: ({ colorPrimary, colorSecondary, count, delay }: IStepPreloader) => React.JSX.Element;
|
|
40
37
|
|
|
41
|
-
export { Header, StepPreloader, TestInfo };
|
|
38
|
+
export { Header, StepPreloader, TestInfo, useMenuCollapsed };
|