@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.
@@ -1 +1 @@
1
- "use strict";var e=require('./../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),t=require("react"),i=require("classnames"),a=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 o=c(i);function d(i){var a=i.title,c=i.subtitle,d=i.image,f=i.classes,m=t.useState(l.SIZES.LARGE),b=m[0],j=m[1],v=t.useRef();r({callback:function(e){var s=e[0].borderBoxSize[0].blockSize;j(u.getSize(s))},containerRef:v});var g=n.useStyles({image:d,size:b}),S=b!==l.SIZES.SMALL;return s.jsx("div",e.__assign({className:o.default(g.root,f.root)},{children:s.jsxs("div",e.__assign({className:o.default(g.content,f.content),ref:v},{children:[s.jsx("div",e.__assign({className:o.default(g.title,f.title)},{children:a})),s.jsx("div",e.__assign({className:o.default(g.subtitle,f.subtitle)},{children:c})),S&&s.jsx("img",{src:d,className:g.image,alt:"error"})]}))}))}d.defaultProps={title:"No Data Available",subtitle:"",image:a.NoDataAvailable,classes:{}},d.IMAGES=a,module.exports=d;
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"),i=e.makeStyles((function(i){var r=i.palette;return e.createStyles({root:{display:"flex",flexDirection:"column",height:"100%"},content:{alignItems:"center",display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",overflow:"auto",padding:24,textAlign:"center"},title:function(e){var i=e.size;return{color:r.primary.text7,fontStyle:"italic",fontSize:i===t.SIZES.LARGE?32:24,lineHeight:i===t.SIZES.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(e){var i=e.size;return{color:r.primary.text7,fontSize:i===t.SIZES.LARGE?16:14,lineHeight:i===t.SIZES.LARGE?"22px":"20px",marginBottom:24}},image:function(e){var i=e.size,r=e.image;return{display:"flex",flexGrow:1,maxHeight:i===t.SIZES.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(r,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));exports.useStyles=i;
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;CACH;AAED,iBAAS,UAAU,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAsBrF;kBAtBQ,UAAU;;;;;;;;;AAiCnB,eAAe,UAAU,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 s,jsxs as t}from"react/jsx-runtime";import{useState as i,useRef as r}from"react";import o from"classnames";import*as a 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 f}from"./styles.js";function d(a){var m=a.title,d=a.subtitle,u=a.image,p=a.classes,b=i(c.LARGE),v=b[0],j=b[1],g=r();l({callback:function(e){var s=e[0].borderBoxSize[0].blockSize;j(n(s))},containerRef:g});var N=f({image:u,size:v}),x=v!==c.SMALL;return s("div",e({className:o(N.root,p.root)},{children:t("div",e({className:o(N.content,p.content),ref:g},{children:[s("div",e({className:o(N.title,p.title)},{children:m})),s("div",e({className:o(N.subtitle,p.subtitle)},{children:d})),x&&s("img",{src:u,className:N.image,alt:"error"})]}))}))}d.defaultProps={title:"No Data Available",subtitle:"",image:m,classes:{}},d.IMAGES=a;export{d as default};
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,6HAyCrB,CAAC"}
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 i}from"./constants.js";var n=t((function(t){var n=t.palette;return e({root:{display:"flex",flexDirection:"column",height:"100%"},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:n.primary.text7,fontStyle:"italic",fontSize:e===i.LARGE?32:24,lineHeight:e===i.LARGE?"38px":"28px",marginBottom:8}},subtitle:function(t){var e=t.size;return{color:n.primary.text7,fontSize:e===i.LARGE?16:14,lineHeight:e===i.LARGE?"22px":"20px",marginBottom:24}},image:function(t){var e=t.size,n=t.image;return{display:"flex",flexGrow:1,maxHeight:e===i.LARGE?300:200,width:"100%",backgroundImage:"url(".concat(n,")"),backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"contain"}}})}));export{n as useStyles};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.61.0-5",
3
+ "version": "0.61.0-6",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"