@corva/ui 0.61.0-5 → 0.61.0-6
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/cjs-bundle/components/EmptyState/EmptyState.js +1 -1
- package/cjs-bundle/components/EmptyState/styles.js +1 -1
- package/components/EmptyState/EmptyState.d.ts +2 -1
- package/components/EmptyState/EmptyState.d.ts.map +1 -1
- package/components/EmptyState/EmptyState.js +1 -1
- package/components/EmptyState/styles.d.ts.map +1 -1
- package/components/EmptyState/styles.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),t=require("react"),
|
|
1
|
+
"use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),t=require("react"),a=require("classnames"),i=require("./images/index.js"),r=require("../../effects/useResizeObserver.js"),l=require("./constants.js"),u=require("./utils.js"),n=require("./styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=c(a);function o(a){var i=a.title,c=a.subtitle,o=a.image,f=a.classes,m=a.dataTestId,b=t.useState(l.SIZES.LARGE),j=b[0],v=b[1],g=t.useRef();r({callback:function(e){var s=e[0].borderBoxSize[0].blockSize;v(u.getSize(s))},containerRef:g});var S=n.useStyles({image:o,size:j}),q=j!==l.SIZES.SMALL;return s.jsx("div",e.__assign({className:d.default(S.root,f.root),"data-testid":m},{children:s.jsxs("div",e.__assign({className:d.default(S.content,f.content),ref:g},{children:[s.jsx("div",e.__assign({className:d.default(S.title,f.title)},{children:i})),s.jsx("div",e.__assign({className:d.default(S.subtitle,f.subtitle)},{children:c})),q&&s.jsx("img",{src:o,className:S.image,alt:"error"})]}))}))}o.defaultProps={title:"No Data Available",subtitle:"",image:i.NoDataAvailable,classes:{}},o.IMAGES=i,module.exports=o;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),t=require("./constants.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@material-ui/core"),t=require("./constants.js"),r=e.makeStyles((function(r){var i=r.palette;return e.createStyles({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"auto",padding:24,textAlign:"center"},title:function(e){var r=e.size;return{color:i.primary.text7,fontStyle:"italic",fontSize:r===t.SIZES.LARGE?32:24,lineHeight:r===t.SIZES.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(e){var r=e.size;return{color:i.primary.text7,fontSize:r===t.SIZES.LARGE?16:14,lineHeight:r===t.SIZES.LARGE?"22px":"20px",marginBottom:24}},image:function(e){var r=e.size,i=e.image;return{display:"flex",flexGrow:1,maxHeight:r===t.SIZES.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(i,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));exports.useStyles=r;
|
|
@@ -11,8 +11,9 @@ export interface EmptyStateProps {
|
|
|
11
11
|
subtitle?: string;
|
|
12
12
|
image?: string;
|
|
13
13
|
};
|
|
14
|
+
dataTestId?: string;
|
|
14
15
|
}
|
|
15
|
-
declare function EmptyState({ title, subtitle, image, classes }: EmptyStateProps): JSX.Element;
|
|
16
|
+
declare function EmptyState({ title, subtitle, image, classes, dataTestId }: EmptyStateProps): JSX.Element;
|
|
16
17
|
declare namespace EmptyState {
|
|
17
18
|
var defaultProps: {
|
|
18
19
|
title: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"EmptyState.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAOnC,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAsBjG;kBAtBQ,UAAU;;;;;;;;;AAiCnB,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as
|
|
1
|
+
import{__assign as e}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as s}from"react/jsx-runtime";import{useState as i,useRef as r}from"react";import a from"classnames";import*as o from"./images/index.js";import{NoDataAvailable as m}from"./images/index.js";import l from"../../effects/useResizeObserver.js";import{SIZES as c}from"./constants.js";import{getSize as n}from"./utils.js";import{useStyles as d}from"./styles.js";function f(o){var m=o.title,f=o.subtitle,u=o.image,p=o.classes,b=o.dataTestId,v=i(c.LARGE),j=v[0],g=v[1],N=r();l({callback:function(e){var t=e[0].borderBoxSize[0].blockSize;g(n(t))},containerRef:N});var x=d({image:u,size:j}),h=j!==c.SMALL;return t("div",e({className:a(x.root,p.root),"data-testid":b},{children:s("div",e({className:a(x.content,p.content),ref:N},{children:[t("div",e({className:a(x.title,p.title)},{children:m})),t("div",e({className:a(x.subtitle,p.subtitle)},{children:f})),h&&t("img",{src:u,className:x.image,alt:"error"})]}))}))}f.defaultProps={title:"No Data Available",subtitle:"",image:m,classes:{}},f.IMAGES=o;export{f as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/styles.ts"],"names":[],"mappings":"AAGA,aAAK,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/components/EmptyState/styles.ts"],"names":[],"mappings":"AAGA,aAAK,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,eAAO,MAAM,SAAS,6HA2CrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{makeStyles as t,createStyles as e}from"@material-ui/core";import{SIZES as
|
|
1
|
+
import{makeStyles as t,createStyles as e}from"@material-ui/core";import{SIZES as n}from"./constants.js";var i=t((function(t){var i=t.palette;return e({root:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",flexGrow:1},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"auto",padding:24,textAlign:"center"},title:function(t){var e=t.size;return{color:i.primary.text7,fontStyle:"italic",fontSize:e===n.LARGE?32:24,lineHeight:e===n.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(t){var e=t.size;return{color:i.primary.text7,fontSize:e===n.LARGE?16:14,lineHeight:e===n.LARGE?"22px":"20px",marginBottom:24}},image:function(t){var e=t.size,i=t.image;return{display:"flex",flexGrow:1,maxHeight:e===n.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(i,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));export{i as useStyles};
|