@zimyo/ui 1.10.8 → 1.10.9

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.
@@ -11,10 +11,11 @@ interface CardRootProps extends CardProps {
11
11
  }
12
12
  declare const CardRoot: React__default.FC<CardRootProps>;
13
13
 
14
- declare const CardHeader: ({ title, subtitle, action, }: {
14
+ declare const CardHeader: ({ title, subtitle, action, sx, }: {
15
15
  title?: string | React__default.ReactNode;
16
16
  subtitle?: string | React__default.ReactNode;
17
17
  action?: React__default.ReactNode;
18
+ sx?: any;
18
19
  }) => react_jsx_runtime.JSX.Element;
19
20
 
20
21
  declare const CardContent: ({ children, sx }: {
@@ -27,10 +28,11 @@ declare const CardActions: ({ children, sx }: {
27
28
  sx?: any;
28
29
  }) => react_jsx_runtime.JSX.Element;
29
30
 
30
- declare const CardImage: ({ src, height, alt }: {
31
+ declare const CardImage: ({ src, height, alt, sx }: {
31
32
  src: string;
32
33
  height?: number | string;
33
34
  alt?: string;
35
+ sx?: any;
34
36
  }) => react_jsx_runtime.JSX.Element;
35
37
 
36
38
  declare const CardSkeleton: ({ lines }: {
@@ -38,10 +40,11 @@ declare const CardSkeleton: ({ lines }: {
38
40
  }) => react_jsx_runtime.JSX.Element;
39
41
 
40
42
  declare const Card: React$1.FC<CardRootProps> & {
41
- Header: ({ title, subtitle, action, }: {
43
+ Header: ({ title, subtitle, action, sx, }: {
42
44
  title?: string | React.ReactNode;
43
45
  subtitle?: string | React.ReactNode;
44
46
  action?: React.ReactNode;
47
+ sx?: any;
45
48
  }) => react_jsx_runtime.JSX.Element;
46
49
  Content: ({ children, sx }: {
47
50
  children: React.ReactNode;
@@ -55,10 +58,11 @@ declare const Card: React$1.FC<CardRootProps> & {
55
58
  children: React.ReactNode;
56
59
  sx?: any;
57
60
  }) => react_jsx_runtime.JSX.Element;
58
- Image: ({ src, height, alt }: {
61
+ Image: ({ src, height, alt, sx }: {
59
62
  src: string;
60
63
  height?: number | string;
61
64
  alt?: string;
65
+ sx?: any;
62
66
  }) => react_jsx_runtime.JSX.Element;
63
67
  Skeleton: ({ lines }: {
64
68
  lines?: number;
@@ -1 +1 @@
1
- import{_ as e,a as r,b as t}from"../../chunks/tslib.es6-49e5b83c.esm.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useTheme as n,Card as o,CardHeader as d,Typography as l,CardActions as s,Box as c,Skeleton as u}from"@mui/material";import v from"@mui/material/CardContent";import m from"@mui/material/CardMedia";var h=function(t){var a,d=t.children,l=t.sx,s=void 0===l?{}:l,c=t.elevation,u=void 0===c?1:c,v=t.variant,m=void 0===v?"elevated":v,h=e(t,["children","sx","elevation","variant"]),f=n();return i(o,r({elevation:"elevated"===m?u:0,variant:"outlined"===m?"outlined":"elevation",sx:r({borderRadius:(null===(a=f.radius)||void 0===a?void 0:a.sm)||8,border:"bordered"===m?"1px solid ".concat(f.palette.divider):"none",overflow:"hidden",backgroundColor:f.palette.background.paper},s)},h,{children:d}))},f=function(e){var r=e.title,t=e.subtitle,a=e.action;return i(d,{title:"string"==typeof r?i(l,{variant:"h6",fontWeight:600,children:r}):r,subheader:"string"==typeof t?i(l,{variant:"body2",color:"text.secondary",children:t}):t,action:a})},p=function(e){var r=e.children,t=e.sx;return i(v,{sx:t,children:r})},g=function(e){var r=e.children,t=e.sx;return i(s,{sx:t,children:r})},x=function(e){var r=e.src,t=e.height,a=void 0===t?160:t,n=e.alt;return i(m,{component:"img",height:a,image:r,alt:void 0===n?"card image":n})},b=function(e){var r=e.lines,n=void 0===r?3:r;return a(c,{p:2,children:[i(u,{variant:"rectangular",height:140}),t([],Array(n),!0).map(function(e,r){return i(u,{variant:"text",height:20,sx:{mt:1}},r)})]})},C=Object.assign(h,{Header:f,Content:p,Body:p,Actions:g,Image:x,Skeleton:b});export{g as CardActions,p as CardContent,f as CardHeader,x as CardImage,h as CardRoot,b as CardSkeleton,C as default};
1
+ import{_ as e,a as r,b as t}from"../../chunks/tslib.es6-49e5b83c.esm.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{useTheme as n,Card as o,CardHeader as d,Typography as l,CardActions as s,Box as c,Skeleton as u}from"@mui/material";import v from"@mui/material/CardContent";import m from"@mui/material/CardMedia";var h=function(t){var a,d=t.children,l=t.sx,s=void 0===l?{}:l,c=t.elevation,u=void 0===c?1:c,v=t.variant,m=void 0===v?"elevated":v,h=e(t,["children","sx","elevation","variant"]),p=n();return i(o,r({elevation:"elevated"===m?u:0,variant:"outlined"===m?"outlined":"elevation",sx:r({borderRadius:(null===(a=p.radius)||void 0===a?void 0:a.sm)||8,border:"bordered"===m?"1px solid ".concat(p.palette.divider):"none",overflow:"hidden",backgroundColor:p.palette.background.paper},s)},h,{children:d}))},p=function(e){var t=e.title,a=e.subtitle,n=e.action,o=e.sx;return i(d,{title:"string"==typeof t?i(l,{variant:"h6",fontWeight:600,children:t}):t,subheader:"string"==typeof a?i(l,{variant:"body2",color:"text.secondary",children:a}):a,action:n,sx:r({p:0},o)})},f=function(e){var t=e.children,a=e.sx;return i(v,{sx:r({p:0,"&:last-child":{pb:0}},a),children:t})},x=function(e){var t=e.children,a=e.sx;return i(s,{sx:r({p:0},a),children:t})},g=function(e){var t=e.src,a=e.height,n=void 0===a?160:a,o=e.alt,d=void 0===o?"card image":o,l=e.sx;return i(m,{sx:r({p:0},l),component:"img",height:n,image:t,alt:d})},b=function(e){var r=e.lines,n=void 0===r?3:r;return a(c,{p:2,children:[i(u,{variant:"rectangular",height:140}),t([],Array(n),!0).map(function(e,r){return i(u,{variant:"text",height:20,sx:{mt:1}},r)})]})},C=Object.assign(h,{Header:p,Content:f,Body:f,Actions:x,Image:g,Skeleton:b});export{x as CardActions,f as CardContent,p as CardHeader,g as CardImage,h as CardRoot,b as CardSkeleton,C as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../chunks/tslib.es6-fa3b2784.js"),r=require("react/jsx-runtime"),t=require("@mui/material"),i=require("@mui/material/CardContent"),a=require("@mui/material/CardMedia"),n=function(i){var a,n=i.children,o=i.sx,d=void 0===o?{}:o,s=i.elevation,l=void 0===s?1:s,u=i.variant,c=void 0===u?"elevated":u,v=e.__rest(i,["children","sx","elevation","variant"]),x=t.useTheme();return r.jsx(t.Card,e.__assign({elevation:"elevated"===c?l:0,variant:"outlined"===c?"outlined":"elevation",sx:e.__assign({borderRadius:(null===(a=x.radius)||void 0===a?void 0:a.sm)||8,border:"bordered"===c?"1px solid ".concat(x.palette.divider):"none",overflow:"hidden",backgroundColor:x.palette.background.paper},d)},v,{children:n}))},o=function(e){var i=e.title,a=e.subtitle,n=e.action;return r.jsx(t.CardHeader,{title:"string"==typeof i?r.jsx(t.Typography,{variant:"h6",fontWeight:600,children:i}):i,subheader:"string"==typeof a?r.jsx(t.Typography,{variant:"body2",color:"text.secondary",children:a}):a,action:n})},d=function(e){var t=e.children,a=e.sx;return r.jsx(i,{sx:a,children:t})},s=function(e){var i=e.children,a=e.sx;return r.jsx(t.CardActions,{sx:a,children:i})},l=function(e){var t=e.src,i=e.height,n=void 0===i?160:i,o=e.alt,d=void 0===o?"card image":o;return r.jsx(a,{component:"img",height:n,image:t,alt:d})},u=function(i){var a=i.lines,n=void 0===a?3:a;return r.jsxs(t.Box,{p:2,children:[r.jsx(t.Skeleton,{variant:"rectangular",height:140}),e.__spreadArray([],Array(n),!0).map(function(e,i){return r.jsx(t.Skeleton,{variant:"text",height:20,sx:{mt:1}},i)})]})},c=Object.assign(n,{Header:o,Content:d,Body:d,Actions:s,Image:l,Skeleton:u});exports.CardActions=s,exports.CardContent=d,exports.CardHeader=o,exports.CardImage=l,exports.CardRoot=n,exports.CardSkeleton=u,exports.default=c;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../chunks/tslib.es6-fa3b2784.js"),r=require("react/jsx-runtime"),t=require("@mui/material"),i=require("@mui/material/CardContent"),a=require("@mui/material/CardMedia"),n=function(i){var a,n=i.children,s=i.sx,o=void 0===s?{}:s,d=i.elevation,l=void 0===d?1:d,u=i.variant,c=void 0===u?"elevated":u,x=e.__rest(i,["children","sx","elevation","variant"]),v=t.useTheme();return r.jsx(t.Card,e.__assign({elevation:"elevated"===c?l:0,variant:"outlined"===c?"outlined":"elevation",sx:e.__assign({borderRadius:(null===(a=v.radius)||void 0===a?void 0:a.sm)||8,border:"bordered"===c?"1px solid ".concat(v.palette.divider):"none",overflow:"hidden",backgroundColor:v.palette.background.paper},o)},x,{children:n}))},s=function(i){var a=i.title,n=i.subtitle,s=i.action,o=i.sx;return r.jsx(t.CardHeader,{title:"string"==typeof a?r.jsx(t.Typography,{variant:"h6",fontWeight:600,children:a}):a,subheader:"string"==typeof n?r.jsx(t.Typography,{variant:"body2",color:"text.secondary",children:n}):n,action:s,sx:e.__assign({p:0},o)})},o=function(t){var a=t.children,n=t.sx;return r.jsx(i,{sx:e.__assign({p:0,"&:last-child":{pb:0}},n),children:a})},d=function(i){var a=i.children,n=i.sx;return r.jsx(t.CardActions,{sx:e.__assign({p:0},n),children:a})},l=function(t){var i=t.src,n=t.height,s=void 0===n?160:n,o=t.alt,d=void 0===o?"card image":o,l=t.sx;return r.jsx(a,{sx:e.__assign({p:0},l),component:"img",height:s,image:i,alt:d})},u=function(i){var a=i.lines,n=void 0===a?3:a;return r.jsxs(t.Box,{p:2,children:[r.jsx(t.Skeleton,{variant:"rectangular",height:140}),e.__spreadArray([],Array(n),!0).map(function(e,i){return r.jsx(t.Skeleton,{variant:"text",height:20,sx:{mt:1}},i)})]})},c=Object.assign(n,{Header:s,Content:o,Body:o,Actions:d,Image:l,Skeleton:u});exports.CardActions=d,exports.CardContent=o,exports.CardHeader=s,exports.CardImage=l,exports.CardRoot=n,exports.CardSkeleton=u,exports.default=c;
package/dist/index.d.ts CHANGED
@@ -42,10 +42,11 @@ interface CardRootProps extends CardProps {
42
42
  }
43
43
  declare const CardRoot: React__default.FC<CardRootProps>;
44
44
 
45
- declare const CardHeader: ({ title, subtitle, action, }: {
45
+ declare const CardHeader: ({ title, subtitle, action, sx, }: {
46
46
  title?: string | React__default.ReactNode;
47
47
  subtitle?: string | React__default.ReactNode;
48
48
  action?: React__default.ReactNode;
49
+ sx?: any;
49
50
  }) => react_jsx_runtime.JSX.Element;
50
51
 
51
52
  declare const CardContent: ({ children, sx }: {
@@ -58,10 +59,11 @@ declare const CardActions: ({ children, sx }: {
58
59
  sx?: any;
59
60
  }) => react_jsx_runtime.JSX.Element;
60
61
 
61
- declare const CardImage: ({ src, height, alt }: {
62
+ declare const CardImage: ({ src, height, alt, sx }: {
62
63
  src: string;
63
64
  height?: number | string;
64
65
  alt?: string;
66
+ sx?: any;
65
67
  }) => react_jsx_runtime.JSX.Element;
66
68
 
67
69
  declare const CardSkeleton: ({ lines }: {
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@zimyo/ui",
3
- "version": "1.10.8",
3
+ "version": "1.10.9",
4
4
  "description": "Zimyo UI library built on MUI Material",
5
- "type": "module",
6
5
  "main": "dist/index.js",
7
6
  "module": "dist/index.esm.js",
8
7
  "types": "dist/index.d.ts",