@zimyo/ui 1.7.1 → 1.9.0

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.
Files changed (43) hide show
  1. package/dist/AppList/index.d.ts +27 -0
  2. package/dist/AppList/index.esm.js +26 -0
  3. package/dist/BulkActionsBar/index.d.ts +23 -0
  4. package/dist/BulkActionsBar/index.esm.js +26 -0
  5. package/dist/Card/index.d.ts +29 -1
  6. package/dist/Card/index.esm.js +1 -1
  7. package/dist/DatePicker/index.esm.js +1 -1
  8. package/dist/DateRangePicker/index.esm.js +3 -3
  9. package/dist/Form/index.esm.js +2 -2
  10. package/dist/GlobalMenuSearch/index.d.ts +16 -0
  11. package/dist/GlobalMenuSearch/index.esm.js +27 -0
  12. package/dist/Input/index.d.ts +1 -0
  13. package/dist/Input/index.esm.js +1 -1
  14. package/dist/Popover/index.esm.js +1 -1
  15. package/dist/Table/index.d.ts +79 -0
  16. package/dist/Table/index.esm.js +27 -0
  17. package/dist/Tabs/index.d.ts +15 -27
  18. package/dist/Tabs/index.esm.js +1 -1
  19. package/dist/index.d.ts +180 -4
  20. package/dist/index.esm.js +5 -5
  21. package/package.json +26 -21
  22. package/dist/Accordion/index.js +0 -27
  23. package/dist/Badge/index.js +0 -1
  24. package/dist/Button/index.js +0 -1
  25. package/dist/Card/index.js +0 -1
  26. package/dist/Checkbox/index.js +0 -27
  27. package/dist/CheckboxGroup/index.js +0 -26
  28. package/dist/DatePicker/index.js +0 -26
  29. package/dist/DateRangePicker/index.js +0 -26
  30. package/dist/Form/index.js +0 -26
  31. package/dist/Input/index.js +0 -27
  32. package/dist/Modal/index.js +0 -27
  33. package/dist/Notice/index.js +0 -26
  34. package/dist/Popover/index.js +0 -1
  35. package/dist/PopupConfirm/index.js +0 -27
  36. package/dist/Radio/index.js +0 -1
  37. package/dist/RadioGroup/index.js +0 -1
  38. package/dist/Select/index.js +0 -27
  39. package/dist/Switch/index.js +0 -1
  40. package/dist/Tabs/index.js +0 -1
  41. package/dist/Typography/index.js +0 -1
  42. package/dist/index.js +0 -27
  43. package/dist/theme/index.js +0 -1
@@ -0,0 +1,27 @@
1
+ import React, { ElementType } from 'react';
2
+
3
+ type AppListItem = {
4
+ [key: string]: any;
5
+ };
6
+ interface AppListProps {
7
+ apps: AppListItem[];
8
+ icon?: ElementType;
9
+ urlKey?: string;
10
+ nameKey?: string;
11
+ appIconKey?: string;
12
+ iconProps?: object;
13
+ popoverProps?: object;
14
+ listProps?: object;
15
+ listItemProps?: object;
16
+ listItemTextProps?: object;
17
+ width?: number | string;
18
+ maxWidth?: number | string;
19
+ minWidth?: number | string;
20
+ padding?: number;
21
+ border?: boolean;
22
+ target?: '_blank' | '_self' | '_parent' | '_top' | 'framename';
23
+ }
24
+ declare const AppList: React.FC<AppListProps>;
25
+
26
+ export { AppList, AppList as default };
27
+ export type { AppListProps };
@@ -0,0 +1,26 @@
1
+ import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{forwardRef as i,createElement as t,useState as n,useMemo as a}from"react";import c from"@mui/material/IconButton";import{useTheme as l,Popover as d,Fade as s,ListItemButton as p}from"@mui/material";import m from"@mui/material/List";import u from"@mui/material/ListItemText";import h from"@mui/material/ListItemIcon";var v=function(){return v=Object.assign||function(r){for(var o,e=1,i=arguments.length;e<i;e++)for(var t in o=arguments[e])Object.prototype.hasOwnProperty.call(o,t)&&(r[t]=o[t]);return r},v.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var f=function(o){var e=o.open,i=o.onClose,t=o.anchorEl,n=o.children,a=o.width,c=o.maxWidth,p=void 0===c?"100%":c,m=o.minWidth,u=o.padding,h=void 0===u?2:u,f=o.border,y=void 0===f||f,g=o.anchorOrigin,b=void 0===g?{vertical:"bottom",horizontal:"left"}:g,x=o.transformOrigin,k=void 0===x?{vertical:"top",horizontal:"left"}:x,w=function(r,o){var e={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&o.indexOf(i)<0&&(e[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)o.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(e[i[t]]=r[i[t]])}return e}(o,["open","onClose","anchorEl","children","width","maxWidth","minWidth","padding","border","anchorOrigin","transformOrigin"]),O=l();return r(d,v({open:e,anchorEl:t,onClose:i,disableScrollLock:!0,TransitionComponent:s,transitionDuration:150,anchorOrigin:b,transformOrigin:k,slotProps:{paper:{elevation:0,sx:{boxShadow:"none",bgcolor:O.palette.background.paper,border:y?"1px solid ".concat(O.palette.divider):"none",borderRadius:O.radius.md,px:O.spacing(h),py:O.spacing(h),width:a,maxWidth:p,minWidth:m}}}},w,{children:n}))};
2
+ /**
3
+ * @license lucide-react v0.525.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const y=r=>{const o=(r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,o,e)=>e?e.toUpperCase():o.toLowerCase()))(r);return o.charAt(0).toUpperCase()+o.slice(1)},g=(...r)=>r.filter((r,o,e)=>Boolean(r)&&""!==r.trim()&&e.indexOf(r)===o).join(" ").trim(),b=r=>{for(const o in r)if(o.startsWith("aria-")||"role"===o||"title"===o)return!0};
8
+ /**
9
+ * @license lucide-react v0.525.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ var x={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
15
+ /**
16
+ * @license lucide-react v0.525.0 - ISC
17
+ *
18
+ * This source code is licensed under the ISC license.
19
+ * See the LICENSE file in the root directory of this source tree.
20
+ */const k=i(({color:r="currentColor",size:o=24,strokeWidth:e=2,absoluteStrokeWidth:i,className:n="",children:a,iconNode:c,...l},d)=>t("svg",{ref:d,...x,width:o,height:o,stroke:r,strokeWidth:i?24*Number(e)/Number(o):e,className:g("lucide",n),...!a&&!b(l)&&{"aria-hidden":"true"},...l},[...c.map(([r,o])=>t(r,o)),...Array.isArray(a)?a:[a]])),w=((r,o)=>{const e=i(({className:e,...i},n)=>{return t(k,{ref:n,iconNode:o,className:g(`lucide-${a=y(r),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${r}`,e),...i});var a});return e.displayName=y(r),e})("grip",[["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"19",cy:"5",r:"1",key:"w8mnmm"}],["circle",{cx:"5",cy:"5",r:"1",key:"lttvr7"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}],["circle",{cx:"19",cy:"19",r:"1",key:"shf9b7"}],["circle",{cx:"5",cy:"19",r:"1",key:"bfqh0e"}]]);
21
+ /**
22
+ * @license lucide-react v0.525.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */var O=function(i){var t=i.apps,l=void 0===t?[]:t,d=i.icon,s=void 0===d?w:d,y=i.urlKey,g=void 0===y?"url":y,b=i.nameKey,x=void 0===b?"name":b,k=i.appIconKey,O=void 0===k?"appIcon":k,C=i.iconProps,P=void 0===C?{}:C,W=i.popoverProps,j=void 0===W?{}:W,I=i.listProps,N=void 0===I?{}:I,L=i.listItemProps,z=void 0===L?{}:L,E=i.listItemTextProps,S=void 0===E?{}:E,A=i.width,B=void 0===A?240:A,T=i.padding,$=void 0===T?0:T,K=i.border,U=void 0===K||K,Z=i.target,_=void 0===Z?"_blank":Z,q=n(null),D=q[0],R=q[1],F=Boolean(D)?"simple-popover":void 0,G=a(function(){return null==l?void 0:l.filter(function(r){return r.display})},[l]);return o(e,{children:[r(c,v({"aria-describedby":F,onClick:function(r){R(r.currentTarget)}},P,{children:r(s,{})})),r(f,v({open:Boolean(D),onClose:function(){R(null)},anchorEl:D,width:B,padding:$,border:U,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},j,{children:r(m,v({disablePadding:!0},N,{children:G.map(function(e,i){return o(p,v({component:"div",sx:{":hover":{backgroundColor:e.backgroundColor}},onClick:function(){return window.open(e[g],_)}},z,{children:[e[O]?r(h,{sx:{minWidth:30,backgroundColor:e.backgroundColor},children:r("img",{width:22,height:22,src:e[O],alt:e.name})}):null,r(u,v({sx:{ml:1},primaryTypographyProps:{variant:"body2",fontWeight:500},primary:e[x]},S))]}),i)})}))}))]})};export{O as AppList,O as default};
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+
3
+ interface BulkAction {
4
+ id: string;
5
+ label: string;
6
+ icon?: React.ReactNode;
7
+ onClick: (selectedIds: string[]) => void;
8
+ disabled?: boolean;
9
+ variant?: 'primary' | 'danger' | 'default';
10
+ type?: 'button' | 'dropdown';
11
+ onOpen?: () => void;
12
+ }
13
+ interface BulkActionsBarProps {
14
+ selectedRows: string[];
15
+ totalRows: number;
16
+ bulkActions: BulkAction[];
17
+ clearSelection: () => void;
18
+ maxVisibleActions?: number;
19
+ }
20
+ declare const BulkActionsBar: React.FC<BulkActionsBarProps>;
21
+
22
+ export { BulkActionsBar, BulkActionsBar as default };
23
+ export type { BulkActionsBarProps };
@@ -0,0 +1,26 @@
1
+ import{jsx as i,jsxs as e,Fragment as r}from"react/jsx-runtime";import o,{forwardRef as t,createElement as n,useState as a}from"react";import{Button as l,CircularProgress as d,Typography as s,useTheme as c,Popover as u,Fade as p,ListItemButton as m,IconButton as h}from"@mui/material";import b from"@mui/material/List";import v from"@mui/material/ListItemText";
2
+ /**
3
+ * @license lucide-react v0.525.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */const f=i=>{const e=(i=>i.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,e,r)=>r?r.toUpperCase():e.toLowerCase()))(i);return e.charAt(0).toUpperCase()+e.slice(1)},z=(...i)=>i.filter((i,e,r)=>Boolean(i)&&""!==i.trim()&&r.indexOf(i)===e).join(" ").trim(),g=i=>{for(const e in i)if(e.startsWith("aria-")||"role"===e||"title"===e)return!0};
8
+ /**
9
+ * @license lucide-react v0.525.0 - ISC
10
+ *
11
+ * This source code is licensed under the ISC license.
12
+ * See the LICENSE file in the root directory of this source tree.
13
+ */
14
+ var x={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};
15
+ /**
16
+ * @license lucide-react v0.525.0 - ISC
17
+ *
18
+ * This source code is licensed under the ISC license.
19
+ * See the LICENSE file in the root directory of this source tree.
20
+ */const y=t(({color:i="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:t="",children:a,iconNode:l,...d},s)=>n("svg",{ref:s,...x,width:e,height:e,stroke:i,strokeWidth:o?24*Number(r)/Number(e):r,className:z("lucide",t),...!a&&!g(d)&&{"aria-hidden":"true"},...d},[...l.map(([i,e])=>n(i,e)),...Array.isArray(a)?a:[a]])),w=(i,e)=>{const r=t(({className:r,...o},t)=>{return n(y,{ref:t,iconNode:e,className:z(`lucide-${a=f(i),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${i}`,r),...o});var a});return r.displayName=f(i),r},k=w("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),O=w("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);
21
+ /**
22
+ * @license lucide-react v0.525.0 - ISC
23
+ *
24
+ * This source code is licensed under the ISC license.
25
+ * See the LICENSE file in the root directory of this source tree.
26
+ */var C=function(){return C=Object.assign||function(i){for(var e,r=1,o=arguments.length;r<o;r++)for(var t in e=arguments[r])Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t]);return i},C.apply(this,arguments)};function N(i,e){var r={};for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&e.indexOf(o)<0&&(r[o]=i[o]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(o=Object.getOwnPropertySymbols(i);t<o.length;t++)e.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(i,o[t])&&(r[o[t]]=i[o[t]])}return r}"function"==typeof SuppressedError&&SuppressedError;var W=o.forwardRef(function(e,r){var o=e.children,t=e.loading,n=void 0!==t&&t,a=e.loadingText,s=e.loaderSize,c=void 0===s?18:s,u=e.loaderPosition,p=void 0===u?"start":u,m=e.variant,h=void 0===m?"contained":m,b=e.color,v=void 0===b?"primary":b,f=e.size,z=void 0===f?"medium":f,g=e.sx,x=void 0===g?{}:g,y=e.disabled,w=e.startIcon,k=e.endIcon,O=N(e,["children","loading","loadingText","loaderSize","loaderPosition","variant","color","size","sx","disabled","startIcon","endIcon"]),W=n&&"end"===p,j=n&&"center"===p;return i(l,C({ref:r,variant:h,color:v,disabled:y||n,size:z,startIcon:n&&"start"===p?i(d,{size:c,color:"inherit"}):w,endIcon:W?i(d,{size:c,color:"inherit"}):k,sx:C({position:"relative"},x)},O,{children:j?i(d,{size:c,color:"inherit"}):n&&a?a:o}))});W.displayName="Button";var j=function(e){var r=e.size,o=void 0===r?"md":r,t=N(e,["size"]);return i(s,C({variant:{sm:"body2",md:"body1",lg:"subtitle1"}[o],component:t.component||"p"},t))},P=function(e){var r=e.open,o=e.onClose,t=e.anchorEl,n=e.children,a=e.width,l=e.maxWidth,d=void 0===l?"100%":l,s=e.minWidth,m=e.padding,h=void 0===m?2:m,b=e.border,v=void 0===b||b,f=e.anchorOrigin,z=void 0===f?{vertical:"bottom",horizontal:"left"}:f,g=e.transformOrigin,x=void 0===g?{vertical:"top",horizontal:"left"}:g,y=N(e,["open","onClose","anchorEl","children","width","maxWidth","minWidth","padding","border","anchorOrigin","transformOrigin"]),w=c();return i(u,C({open:r,anchorEl:t,onClose:o,disableScrollLock:!0,TransitionComponent:p,transitionDuration:150,anchorOrigin:z,transformOrigin:x,slotProps:{paper:{elevation:0,sx:{boxShadow:"none",bgcolor:w.palette.background.paper,border:v?"1px solid ".concat(w.palette.divider):"none",borderRadius:w.radius.md,px:w.spacing(h),py:w.spacing(h),width:a,maxWidth:d,minWidth:s}}}},y,{children:n}))},S=function(o){var t=o.selectedRows,n=o.totalRows,l=o.bulkActions,d=o.clearSelection,s=o.maxVisibleActions,c=void 0===s?3:s,u=a(null),p=u[0],f=u[1],z=l.slice(0,c),g=l.slice(c),x=function(){f(null)},y=Boolean(p);return 0===t.length?null:e("div",{className:"zui:bg-blue-100 zui:border zui:border-blue-200 zui:shadow-sm zui:py-1 zui:px-2 zui:rounded-md zui:flex zui:justify-between zui:items-center zui:gap-2 zui:flex-wrap",children:[e(j,{size:"sm",fontWeight:500,className:"zui:text-blue-700 zui:mr-4",children:[t.length," of ",n," selected"]}),e("div",{className:"zui:flex zui:flex-row zui:gap-1.5",children:[z.map(function(e){return i(W,{className:"zui:h-8 zui:bg-white zui:text-blue-700 zui:text-xs zui:border-1 zui:border-gray-100",startIcon:e.icon,size:"small",variant:"text",disabled:e.disabled,onClick:function(){return e.onClick(t)},title:e.label,children:e.label},e.id)}),g.length>0&&e(r,{children:[e(W,{size:"small",variant:"text",className:"zui:h-8 zui:bg-white zui:text-blue-500 zui:text-xs zui:border-1 zui:border-gray-100","aria-controls":y?"more-actions-popover":void 0,"aria-haspopup":"true","aria-expanded":y?"true":void 0,onClick:function(i){f(i.currentTarget)},children:["More ",i(k,{className:"zui:w-4 zui:h-4 zui:ml-1"})]}),i(P,{padding:0,minWidth:200,id:"more-actions-popover",open:y,anchorEl:p,onClose:x,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:i(b,{disablePadding:!0,children:g.map(function(r){return e(m,{disabled:r.disabled,onClick:function(){r.onClick(t),x()},className:"danger"===r.variant?"zui:text-red-600":"",divider:!0,children:[r.icon,i(v,{primaryTypographyProps:{variant:"body2",ml:1},primary:r.label})]},r.id)})})})]}),e(h,{size:"small",onClick:d,children:[" ",i(O,{size:18})]})]})]})};export{S as BulkActionsBar,S as default};
@@ -9,6 +9,33 @@ interface CardRootProps extends CardProps {
9
9
  variant?: 'elevated' | 'outlined' | 'bordered';
10
10
  children: React__default.ReactNode;
11
11
  }
12
+ declare const CardRoot: React__default.FC<CardRootProps>;
13
+
14
+ declare const CardHeader: ({ title, subtitle, action, }: {
15
+ title?: string | React__default.ReactNode;
16
+ subtitle?: string | React__default.ReactNode;
17
+ action?: React__default.ReactNode;
18
+ }) => react_jsx_runtime.JSX.Element;
19
+
20
+ declare const CardContent: ({ children, sx }: {
21
+ children: React__default.ReactNode;
22
+ sx?: any;
23
+ }) => react_jsx_runtime.JSX.Element;
24
+
25
+ declare const CardActions: ({ children, sx }: {
26
+ children: React__default.ReactNode;
27
+ sx?: any;
28
+ }) => react_jsx_runtime.JSX.Element;
29
+
30
+ declare const CardImage: ({ src, height, alt }: {
31
+ src: string;
32
+ height?: number | string;
33
+ alt?: string;
34
+ }) => react_jsx_runtime.JSX.Element;
35
+
36
+ declare const CardSkeleton: ({ lines }: {
37
+ lines?: number;
38
+ }) => react_jsx_runtime.JSX.Element;
12
39
 
13
40
  declare const Card: React$1.FC<CardRootProps> & {
14
41
  Header: ({ title, subtitle, action, }: {
@@ -38,4 +65,5 @@ declare const Card: React$1.FC<CardRootProps> & {
38
65
  }) => react_jsx_runtime.JSX.Element;
39
66
  };
40
67
 
41
- export { Card as default };
68
+ export { CardActions, CardContent, CardHeader, CardImage, CardRoot, CardSkeleton, Card as default };
69
+ export type { CardRootProps };
@@ -1 +1 @@
1
- import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useTheme as t,Card as n,CardHeader as i,Typography as o,CardActions as a,Box as l,Skeleton as c}from"@mui/material";import d from"@mui/material/CardContent";import u from"@mui/material/CardMedia";var s=function(){return s=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},s.apply(this,arguments)};function p(r,e,t){if(t||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return r.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var v=function(e){var t=e.children,n=e.sx;return r(d,{sx:n,children:t})},f=Object.assign(function(e){var i,o=e.children,a=e.sx,l=void 0===a?{}:a,c=e.elevation,d=void 0===c?1:c,u=e.variant,p=void 0===u?"elevated":u,v=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]])}return t}(e,["children","sx","elevation","variant"]),f=t();return r(n,s({elevation:"elevated"===p?d:0,variant:"outlined"===p?"outlined":"elevation",sx:s({borderRadius:(null===(i=f.radius)||void 0===i?void 0:i.sm)||8,border:"bordered"===p?"1px solid ".concat(f.palette.divider):"none",overflow:"hidden",backgroundColor:f.palette.background.paper},l)},v,{children:o}))},{Header:function(e){var t=e.title,n=e.subtitle,a=e.action;return r(i,{title:"string"==typeof t?r(o,{variant:"h6",fontWeight:600,children:t}):t,subheader:"string"==typeof n?r(o,{variant:"body2",color:"text.secondary",children:n}):n,action:a})},Content:v,Body:v,Actions:function(e){var t=e.children,n=e.sx;return r(a,{sx:n,children:t})},Image:function(e){var t=e.src,n=e.height,i=void 0===n?160:n,o=e.alt;return r(u,{component:"img",height:i,image:t,alt:void 0===o?"card image":o})},Skeleton:function(t){var n=t.lines,i=void 0===n?3:n;return e(l,{p:2,children:[r(c,{variant:"rectangular",height:140}),p([],Array(i),!0).map(function(e,t){return r(c,{variant:"text",height:20,sx:{mt:1}},t)})]})}});export{f as default};
1
+ import{jsx as r,jsxs as e}from"react/jsx-runtime";import{useTheme as t,Card as n,CardHeader as i,Typography as o,CardActions as a,Box as l,Skeleton as c}from"@mui/material";import d from"@mui/material/CardContent";import u from"@mui/material/CardMedia";var s=function(){return s=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},s.apply(this,arguments)};function p(r,e,t){if(t||2===arguments.length)for(var n,i=0,o=e.length;i<o;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return r.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var v=function(e){var i,o=e.children,a=e.sx,l=void 0===a?{}:a,c=e.elevation,d=void 0===c?1:c,u=e.variant,p=void 0===u?"elevated":u,v=function(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(r);i<n.length;i++)e.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(t[n[i]]=r[n[i]])}return t}(e,["children","sx","elevation","variant"]),f=t();return r(n,s({elevation:"elevated"===p?d:0,variant:"outlined"===p?"outlined":"elevation",sx:s({borderRadius:(null===(i=f.radius)||void 0===i?void 0:i.sm)||8,border:"bordered"===p?"1px solid ".concat(f.palette.divider):"none",overflow:"hidden",backgroundColor:f.palette.background.paper},l)},v,{children:o}))},f=function(e){var t=e.title,n=e.subtitle,a=e.action;return r(i,{title:"string"==typeof t?r(o,{variant:"h6",fontWeight:600,children:t}):t,subheader:"string"==typeof n?r(o,{variant:"body2",color:"text.secondary",children:n}):n,action:a})},h=function(e){var t=e.children,n=e.sx;return r(d,{sx:n,children:t})},m=function(e){var t=e.children,n=e.sx;return r(a,{sx:n,children:t})},y=function(e){var t=e.src,n=e.height,i=void 0===n?160:n,o=e.alt;return r(u,{component:"img",height:i,image:t,alt:void 0===o?"card image":o})},g=function(t){var n=t.lines,i=void 0===n?3:n;return e(l,{p:2,children:[r(c,{variant:"rectangular",height:140}),p([],Array(i),!0).map(function(e,t){return r(c,{variant:"text",height:20,sx:{mt:1}},t)})]})},b=Object.assign(v,{Header:f,Content:h,Body:h,Actions:m,Image:y,Skeleton:g});export{m as CardActions,h as CardContent,f as CardHeader,y as CardImage,v as CardRoot,g as CardSkeleton,b as default};