@zimyo/ui 1.7.0 → 1.8.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.
- package/dist/AppList/index.d.ts +27 -0
- package/dist/AppList/index.esm.js +26 -0
- package/dist/AppList/index.js +26 -0
- package/dist/Card/index.js +1 -1
- package/dist/DatePicker/index.esm.js +1 -1
- package/dist/DatePicker/index.js +1 -1
- package/dist/DateRangePicker/index.esm.js +3 -3
- package/dist/DateRangePicker/index.js +1 -1
- package/dist/Form/index.esm.js +2 -2
- package/dist/Form/index.js +1 -1
- package/dist/GlobalMenuSearch/index.d.ts +16 -0
- package/dist/GlobalMenuSearch/index.esm.js +27 -0
- package/dist/GlobalMenuSearch/index.js +27 -0
- package/dist/Input/index.d.ts +1 -0
- package/dist/Input/index.esm.js +1 -1
- package/dist/Input/index.js +1 -1
- package/dist/Popover/index.esm.js +1 -1
- package/dist/Popover/index.js +1 -1
- package/dist/Radio/index.js +1 -1
- package/dist/index.d.ts +433 -25
- package/dist/index.esm.js +27 -1
- package/dist/index.js +27 -1
- package/package.json +16 -2
|
@@ -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,26 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=require("react/jsx-runtime"),e=require("react"),o=require("@mui/material/IconButton"),i=require("@mui/material"),t=require("@mui/material/List"),n=require("@mui/material/ListItemText"),a=require("@mui/material/ListItemIcon"),c=function(){return c=Object.assign||function(r){for(var e,o=1,i=arguments.length;o<i;o++)for(var t in e=arguments[o])Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r},c.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var l=function(e){var o=e.open,t=e.onClose,n=e.anchorEl,a=e.children,l=e.width,s=e.maxWidth,d=void 0===s?"100%":s,p=e.minWidth,u=e.padding,h=void 0===u?2:u,m=e.border,v=void 0===m||m,y=e.anchorOrigin,f=void 0===y?{vertical:"bottom",horizontal:"left"}:y,g=e.transformOrigin,x=void 0===g?{vertical:"top",horizontal:"left"}:g,b=function(r,e){var o={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(o[i]=r[i]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(i=Object.getOwnPropertySymbols(r);t<i.length;t++)e.indexOf(i[t])<0&&Object.prototype.propertyIsEnumerable.call(r,i[t])&&(o[i[t]]=r[i[t]])}return o}(e,["open","onClose","anchorEl","children","width","maxWidth","minWidth","padding","border","anchorOrigin","transformOrigin"]),k=i.useTheme();return r.jsx(i.Popover,c({open:o,anchorEl:n,onClose:t,disableScrollLock:!0,TransitionComponent:i.Fade,transitionDuration:150,anchorOrigin:f,transformOrigin:x,slotProps:{paper:{elevation:0,sx:{boxShadow:"none",bgcolor:k.palette.background.paper,border:v?"1px solid ".concat(k.palette.divider):"none",borderRadius:k.radius.md,px:k.spacing(h),py:k.spacing(h),width:l,maxWidth:d,minWidth:p}}}},b,{children:a}))};
|
|
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 s=r=>{const e=(r=>r.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,e,o)=>o?o.toUpperCase():e.toLowerCase()))(r);return e.charAt(0).toUpperCase()+e.slice(1)},d=(...r)=>r.filter((r,e,o)=>Boolean(r)&&""!==r.trim()&&o.indexOf(r)===e).join(" ").trim(),p=r=>{for(const e in r)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 u={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 h=e.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:i=2,absoluteStrokeWidth:t,className:n="",children:a,iconNode:c,...l},s)=>e.createElement("svg",{ref:s,...u,width:o,height:o,stroke:r,strokeWidth:t?24*Number(i)/Number(o):i,className:d("lucide",n),...!a&&!p(l)&&{"aria-hidden":"true"},...l},[...c.map(([r,o])=>e.createElement(r,o)),...Array.isArray(a)?a:[a]])),m=((r,o)=>{const i=e.forwardRef(({className:i,...t},n)=>{return e.createElement(h,{ref:n,iconNode:o,className:d(`lucide-${a=s(r),a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${r}`,i),...t});var a});return i.displayName=s(r),i})("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 v=function(s){var d=s.apps,p=void 0===d?[]:d,u=s.icon,h=void 0===u?m:u,v=s.urlKey,y=void 0===v?"url":v,f=s.nameKey,g=void 0===f?"name":f,x=s.appIconKey,b=void 0===x?"appIcon":x,k=s.iconProps,w=void 0===k?{}:k,O=s.popoverProps,j=void 0===O?{}:O,C=s.listProps,P=void 0===C?{}:C,W=s.listItemProps,E=void 0===W?{}:W,I=s.listItemTextProps,L=void 0===I?{}:I,N=s.width,q=void 0===N?240:N,S=s.padding,z=void 0===S?0:S,A=s.border,B=void 0===A||A,T=s.target,$=void 0===T?"_blank":T,_=e.useState(null),K=_[0],R=_[1],F=Boolean(K)?"simple-popover":void 0,M=e.useMemo(function(){return null==p?void 0:p.filter(function(r){return r.display})},[p]);return r.jsxs(r.Fragment,{children:[r.jsx(o,c({"aria-describedby":F,onClick:function(r){R(r.currentTarget)}},w,{children:r.jsx(h,{})})),r.jsx(l,c({open:Boolean(K),onClose:function(){R(null)},anchorEl:K,width:q,padding:z,border:B,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},j,{children:r.jsx(t,c({disablePadding:!0},P,{children:M.map(function(e,o){return r.jsxs(i.ListItemButton,c({component:"div",sx:{":hover":{backgroundColor:e.backgroundColor}},onClick:function(){return window.open(e[y],$)}},E,{children:[e[b]?r.jsx(a,{sx:{minWidth:30,backgroundColor:e.backgroundColor},children:r.jsx("img",{width:22,height:22,src:e[b],alt:e.name})}):null,r.jsx(n,c({sx:{ml:1},primaryTypographyProps:{variant:"body2",fontWeight:500},primary:e[g]},L))]}),o)})}))}))]})};exports.AppList=v,exports.default=v;
|
package/dist/Card/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@mui/material"),t=require("@mui/material/CardContent"),n=require("@mui/material/CardMedia"),i=function(){return i=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},i.apply(this,arguments)};function o(e,r,t){if(t||2===arguments.length)for(var n,i=0,o=r.length;i<o;i++)!n&&i in r||(n||(n=Array.prototype.slice.call(r,0,i)),n[i]=r[i]);return e.concat(n||Array.prototype.slice.call(r))}"function"==typeof SuppressedError&&SuppressedError;var a=function(r){var n=r.children,i=r.sx;return e.jsx(t,{sx:i,children:n})},l=Object.assign(function(t){var n,o=t.children,a=t.sx,l=void 0===a?{}:a,c=t.elevation,d=void 0===c?1:c,s=t.variant,u=void 0===s?"elevated":s,p=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)r.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(t[n[i]]=e[n[i]])}return t}(t,["children","sx","elevation","variant"]),v=r.useTheme();return e.jsx(r.Card,i({elevation:"elevated"===u?d:0,variant:"outlined"===u?"outlined":"elevation",sx:i({borderRadius:(null===(n=v.radius)||void 0===n?void 0:n.sm)||8,border:"bordered"===u?"1px solid ".concat(v.palette.divider):"none",overflow:"hidden",backgroundColor:v.palette.background.paper},l)},p,{children:o}))},{Header:function(t){var n=t.title,i=t.subtitle,o=t.action;return e.jsx(r.CardHeader,{title:"string"==typeof n?e.jsx(r.Typography,{variant:"h6",fontWeight:600,children:n}):n,subheader:"string"==typeof i?e.jsx(r.Typography,{variant:"body2",color:"text.secondary",children:i}):i,action:o})},Content:a,Body:a,Actions:function(t){var n=t.children,i=t.sx;return e.jsx(r.CardActions,{sx:i,children:n})},Image:function(r){var t=r.src,i=r.height,o=void 0===i?160:i,a=r.alt,l=void 0===a?"card image":a;return e.jsx(n,{component:"img",height:o,image:t,alt:l})},Skeleton:function(t){var n=t.lines,i=void 0===n?3:n;return e.jsxs(r.Box,{p:2,children:[e.jsx(r.Skeleton,{variant:"rectangular",height:140}),o([],Array(i),!0).map(function(t,n){return e.jsx(r.Skeleton,{variant:"text",height:20,sx:{mt:1}},n)})]})}});module.exports=l;
|