@corva/ui 0.75.0-6 → 0.75.0-8
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/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/cjs-bundle/components/Notifications/Toast.js +1 -1
- package/components/DevCenter/AppSideBar/AppSideBar.js +1 -1
- package/components/Notifications/Toast.d.ts.map +1 -1
- package/components/Notifications/Toast.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),o=require("prop-types"),
|
|
1
|
+
"use strict";var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),o=require("prop-types"),r=require("classnames"),a=require("lodash"),i=require("@material-ui/core"),l=require("../../IconButton/index.js"),s=require("../../Button/index.js"),d=require("../../../icons/index.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=c(o),u=c(r),f=i.makeStyles((function(e){var t,n;return i.createStyles({drawer:function(e){var t;return(t={height:"100%",position:"relative",width:e.openedDrawerWidth})["&.".concat("closed")]={width:"48px"},t},drawerPaper:(t={position:"relative",width:"100%",borderRadius:function(e){return"left"===e.anchor?"0 8px 0 0":"8px 0 0 0"},backgroundColor:e.palette.background.b5},t["&.".concat("closed")]={cursor:"pointer","&:hover":{backgroundColor:e.palette.background.b7,"& > $header":{backgroundColor:e.palette.background.b7}}},t["&.MuiDrawer-paperAnchorDockedLeft"]={borderRight:"none"},t["&.MuiDrawer-paperAnchorDockedRight"]={borderLeft:"none"},t),header:(n={alignItems:"center",backgroundColor:e.palette.background.b5,borderBottom:"1px solid",borderBottomColor:"#ffffff14",display:"flex",fontSize:16,fontWeight:400,height:48,justifyContent:"center",left:0,letterSpacing:"1px",lineHeight:"22px",position:"absolute",right:0,textTransform:"capitalize",top:0},n["&.".concat("open")]={padding:e.spacing(1.5),justifyContent:"flex-start"},n),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(e){var t,n=e.anchor;return(t={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"})["&.".concat("open")]={justifyContent:"left"===n?"flex-end":"flex-start",paddingRight:6},t},contentWrapper:{marginTop:48,height:"calc(100% - 96px)",overflowY:"auto"},content:{padding:"16px 12px",display:"flex",flexDirection:"column"},selectAllButton:{textTransform:"none",fontSize:"10px",lineHeight:"14px",letterSpacing:"0.4px",marginLeft:16,"& .MuiButton-iconSizeMedium > *:first-child":{fontSize:"12px !important"},"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer",paddingLeft:7,letterSpacing:1}})})),h=function(o){var r,a=o.anchor,c=o.children,p=o.drawerPaperClassName,h=o.expandedTooltipTitle,g=o.collapsedTooltipTitle,x=o.header,m=o.headerIcon,b=o.headerTitleIcon,T=o.isOpen,j=o.openedDrawerWidth,w=o.setIsOpen,C=o.size,I=o.allOptionsButtonShown,S=o.isAllOptionsSelected,_=o.onAllOptionsClick,k=n.useState(!1);k[0];var O=k[1],v=n.useRef(),A=f({anchor:a,openedDrawerWidth:j||{small:235,medium:354,large:473}[C]});n.useEffect((function(){var e=v.current,t=e.scrollHeight,n=e.clientHeight;O(t>n)}));var B="left"===a?d.RightIcon:d.LeftIcon;return t.jsxs(i.Drawer,e.__assign({"data-testid":"".concat("AppSideBar","_Drawer"),onClick:function(){T||w(!0)},className:u.default(A.drawer,!T&&"closed"),variant:"permanent",classes:{paper:u.default(A.drawerPaper,p,!T&&"closed")},anchor:a},{children:[t.jsxs("div",e.__assign({className:u.default(A.header,T&&"open"),onClick:function(){T&&w(!1)}},{children:[T&&t.jsxs(t.Fragment,{children:[b||t.jsx(d.LeftAlignmentIcon,{size:24}),t.jsx("div",e.__assign({"data-testid":"".concat("AppSideBar","_header"),className:A.headerIconText},{children:x})),I&&t.jsx(s,e.__assign({className:A.selectAllButton,onClick:function(e){e.stopPropagation(),_(e)},startIcon:S?t.jsx(d.CloseSmallIcon,{size:16}):t.jsx(d.CheckSmallIcon,{size:16})},{children:S?"Clear All":"Select All"}))]}),!T&&m]})),t.jsx("div",e.__assign({className:A.contentWrapper,ref:v},{children:t.jsx("div",e.__assign({className:A.content},{children:T&&c}))})),t.jsx(i.Box,e.__assign({className:u.default(A.openToggleContainer,(r={},r.open=T,r))},{children:t.jsx(i.Tooltip,e.__assign({title:T?h:g,placement:"bottom"},{children:t.jsx("div",{children:t.jsx(l,e.__assign({iconType:"iconPark","aria-label":"toggle sidebar",onClick:function(){w(!T)}},{children:t.jsx(B,{size:24,"data-testid":"".concat("AppSideBar","_arrowButton"),className:u.default(T&&A.openToggleIconOpen)})}))})}))}))]}))},g={anchor:p.default.oneOf(["left","right"]),children:p.default.node.isRequired,drawerPaperClassName:p.default.string,expandedTooltipTitle:p.default.string,collapsedTooltipTitle:p.default.string,header:p.default.node,headerIcon:p.default.node,headerTitleIcon:p.default.node,isOpen:p.default.bool,openedDrawerWidth:p.default.oneOfType([p.default.string,p.default.number]),setIsOpen:p.default.func,size:p.default.oneOf(["small","medium","large"]),allOptionsButtonShown:p.default.bool,isAllOptionsSelected:p.default.bool,onAllOptionsClick:p.default.func};h.propTypes=g,h.defaultProps={anchor:"left",drawerPaperClassName:"",expandedTooltipTitle:"Collapse",collapsedTooltipTitle:"Expand",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:a.noop,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:a.noop},module.exports=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),t=require("react"),i=require("classnames"),a=require("lodash"),n=require("@material-ui/core"),o=require("../IconButton/index.js"),c=require("../../constants/notifications.js"),r=require("./Toast.styles.js"),l=require("../../icons/index.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d,_=u(i),I="NotificationPopup",m=((d={})[c.NOTIFICATION_VARIANTS.success]=l.CheckOneIcon,d[c.NOTIFICATION_VARIANTS.warning]=l.CautionIcon,d[c.NOTIFICATION_VARIANTS.error]=l.AttentionIcon,d[c.NOTIFICATION_VARIANTS.info]=l.InfoIcon,d[c.NOTIFICATION_VARIANTS.neutral]=l.PuzzleIcon,d);exports.PAGE_NAME=I,exports.Toast=function(i){var u,d=i.onDismissClick,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../ext-esm/tslib/tslib.es6.js'),s=require("react/jsx-runtime"),t=require("react"),i=require("classnames"),a=require("lodash"),n=require("@material-ui/core"),o=require("../IconButton/index.js"),c=require("../../constants/notifications.js"),r=require("./Toast.styles.js"),l=require("../../icons/index.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d,_=u(i),I="NotificationPopup",m=((d={})[c.NOTIFICATION_VARIANTS.success]=l.CheckOneIcon,d[c.NOTIFICATION_VARIANTS.warning]=l.CautionIcon,d[c.NOTIFICATION_VARIANTS.error]=l.AttentionIcon,d[c.NOTIFICATION_VARIANTS.info]=l.InfoIcon,d[c.NOTIFICATION_VARIANTS.neutral]=l.PuzzleIcon,d);exports.PAGE_NAME=I,exports.Toast=function(i){var u,d=i.onDismissClick,f=i.toast,p=e.__rest(i,["onDismissClick","toast"]),N=f.alertLevel,T=f.autoHideDuration,g=void 0===T?3e3:T,A=f.content,C=f.hideIcon,j=f.icon,v=f.id,x=f.onClick,h=void 0===x?a.noop:x,O=f.onClose,b=void 0===O?a.noop:O,y=f.timestamp,k=f.title,q=f.tooltipProps,S=f.variant,F=void 0===S?"info":S;t.useEffect((function(){if(g!==1/0){var e=setTimeout((function(){return d(v)}),g);return function(){return clearTimeout(e)}}}),[]);var P=r.useStyles(),R=m[F];return s.jsx(n.Grow,e.__assign({appear:!0,in:!0},{children:s.jsx(n.SnackbarContent,e.__assign({classes:{root:_.default(P.main,!N&&P[F],N&&P.alertNotification,N&&P["alertLevels-".concat(N)]),action:P.actionContainer,message:P.messageContainer},"aria-describedby":"client-snackbar",message:s.jsx(n.Tooltip,e.__assign({},q,{title:A,classes:{tooltip:P.tooltip},placement:"bottom"},{children:s.jsxs("div",e.__assign({id:"client-snackbar",className:P.messageWrapper,onClick:h,"data-testid":"".concat(I,"_status_").concat(c.NOTIFICATION_VARIANTS[F])},{children:[!C&&s.jsx("div",e.__assign({className:P.iconWrapper},{children:j?t.cloneElement(j,{className:P.icon,nativeColor:"#fff"}):s.jsx(R,{fill:F===c.NOTIFICATION_VARIANTS.warning?"#000":"#fff",size:16,className:P.icon})})),s.jsxs("div",e.__assign({className:P.message},{children:[s.jsxs("div",e.__assign({className:P.messageTop},{children:[k&&s.jsx(n.Typography,e.__assign({"data-testid":"".concat(I,"_title"),variant:"subtitle2",className:_.default(P.title,(u={},u[P.alertTitle]=N,u))},{children:k})),y&&s.jsx(n.Typography,e.__assign({className:_.default(P.timestamp,!N&&P[F])},{children:y}))]})),s.jsx("div",e.__assign({className:_.default(P.messageContent,!N&&P[F])},{children:s.jsx(n.Typography,e.__assign({"data-testid":"".concat(I,"_content"),className:_.default(N?P.alertContent:P.content)},{children:A}))}))]}))]}))})),action:[s.jsx(o,e.__assign({"data-testid":"".concat(I,"_closeButton"),"aria-label":"Close",color:"inherit",onClick:function(){b(),d(v)},size:"small",iconType:"iconPark",tooltipProps:{title:"Close",classes:{tooltip:P.tooltip}},className:P.closeIconButton},{children:s.jsx(l.CloseSmallIcon,{size:24,fill:N?"#000":"#fff"})}),"close")]},p))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as t,Fragment as o,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as i,useEffect as a}from"react";import l from"prop-types";import c from"classnames";import{noop as d}from"lodash";import{makeStyles as p,createStyles as s,Drawer as h,Box as u,Tooltip as
|
|
1
|
+
import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as t,Fragment as o,jsx as n}from"react/jsx-runtime";import{useState as r,useRef as i,useEffect as a}from"react";import l from"prop-types";import c from"classnames";import{noop as d}from"lodash";import{makeStyles as p,createStyles as s,Drawer as h,Box as u,Tooltip as f}from"@material-ui/core";import m from"../../IconButton/index.js";import g from"../../Button/index.js";import{LeftAlignmentIcon as x,CloseSmallIcon as b,CheckSmallIcon as T,RightIcon as w,LeftIcon as C}from"../../../icons/index.js";var O=p((function(e){var t,o;return s({drawer:function(e){var t;return(t={height:"100%",position:"relative",width:e.openedDrawerWidth})["&.".concat("closed")]={width:"48px"},t},drawerPaper:(t={position:"relative",width:"100%",borderRadius:function(e){return"left"===e.anchor?"0 8px 0 0":"8px 0 0 0"},backgroundColor:e.palette.background.b5},t["&.".concat("closed")]={cursor:"pointer","&:hover":{backgroundColor:e.palette.background.b7,"& > $header":{backgroundColor:e.palette.background.b7}}},t["&.MuiDrawer-paperAnchorDockedLeft"]={borderRight:"none"},t["&.MuiDrawer-paperAnchorDockedRight"]={borderLeft:"none"},t),header:(o={alignItems:"center",backgroundColor:e.palette.background.b5,borderBottom:"1px solid",borderBottomColor:"#ffffff14",display:"flex",fontSize:16,fontWeight:400,height:48,justifyContent:"center",left:0,letterSpacing:"1px",lineHeight:"22px",position:"absolute",right:0,textTransform:"capitalize",top:0},o["&.".concat("open")]={padding:e.spacing(1.5),justifyContent:"flex-start"},o),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(e){var t,o=e.anchor;return(t={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"})["&.".concat("open")]={justifyContent:"left"===o?"flex-end":"flex-start",paddingRight:6},t},contentWrapper:{marginTop:48,height:"calc(100% - 96px)",overflowY:"auto"},content:{padding:"16px 12px",display:"flex",flexDirection:"column"},selectAllButton:{textTransform:"none",fontSize:"10px",lineHeight:"14px",letterSpacing:"0.4px",marginLeft:16,"& .MuiButton-iconSizeMedium > *:first-child":{fontSize:"12px !important"},"& .MuiButton-startIcon":{marginRight:4}},headerIcon:{cursor:"pointer"},headerIconText:{cursor:"pointer",paddingLeft:7,letterSpacing:1}})})),I=function(l){var d,p=l.anchor,s=l.children,I=l.drawerPaperClassName,k=l.expandedTooltipTitle,v=l.collapsedTooltipTitle,S=l.header,A=l.headerIcon,B=l.headerTitleIcon,y=l.isOpen,z=l.openedDrawerWidth,D=l.setIsOpen,N=l.size,j=l.allOptionsButtonShown,P=l.isAllOptionsSelected,W=l.onAllOptionsClick,R=r(!1);R[0];var M=R[1],H=i(),L=O({anchor:p,openedDrawerWidth:z||{small:235,medium:354,large:473}[N]});a((function(){var e=H.current,t=e.scrollHeight,o=e.clientHeight;M(t>o)}));var _="left"===p?w:C;return t(h,e({"data-testid":"".concat("AppSideBar","_Drawer"),onClick:function(){y||D(!0)},className:c(L.drawer,!y&&"closed"),variant:"permanent",classes:{paper:c(L.drawerPaper,I,!y&&"closed")},anchor:p},{children:[t("div",e({className:c(L.header,y&&"open"),onClick:function(){y&&D(!1)}},{children:[y&&t(o,{children:[B||n(x,{size:24}),n("div",e({"data-testid":"".concat("AppSideBar","_header"),className:L.headerIconText},{children:S})),j&&n(g,e({className:L.selectAllButton,onClick:function(e){e.stopPropagation(),W(e)},startIcon:n(P?b:T,{size:16})},{children:P?"Clear All":"Select All"}))]}),!y&&A]})),n("div",e({className:L.contentWrapper,ref:H},{children:n("div",e({className:L.content},{children:y&&s}))})),n(u,e({className:c(L.openToggleContainer,(d={},d.open=y,d))},{children:n(f,e({title:y?k:v,placement:"bottom"},{children:n("div",{children:n(m,e({iconType:"iconPark","aria-label":"toggle sidebar",onClick:function(){D(!y)}},{children:n(_,{size:24,"data-testid":"".concat("AppSideBar","_arrowButton"),className:c(y&&L.openToggleIconOpen)})}))})}))}))]}))},k={anchor:l.oneOf(["left","right"]),children:l.node.isRequired,drawerPaperClassName:l.string,expandedTooltipTitle:l.string,collapsedTooltipTitle:l.string,header:l.node,headerIcon:l.node,headerTitleIcon:l.node,isOpen:l.bool,openedDrawerWidth:l.oneOfType([l.string,l.number]),setIsOpen:l.func,size:l.oneOf(["small","medium","large"]),allOptionsButtonShown:l.bool,isAllOptionsSelected:l.bool,onAllOptionsClick:l.func};I.propTypes=k,I.defaultProps={anchor:"left",drawerPaperClassName:"",expandedTooltipTitle:"Collapse",collapsedTooltipTitle:"Expand",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:d,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:d};export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/Toast.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYvC,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAU7C,UAAU,UAAU;IAClB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,wCAAyC,UAAU,KAAG,
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Notifications/Toast.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAYvC,eAAO,MAAM,SAAS,sBAAsB,CAAC;AAU7C,UAAU,UAAU;IAClB,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,EAAE,YAAY,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,wCAAyC,UAAU,KAAG,WA6HvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{__rest as t,__assign as i}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useEffect as a,cloneElement as s}from"react";import n from"classnames";import{noop as c}from"lodash";import{Grow as r,SnackbarContent as l,Tooltip as m,Typography as d}from"@material-ui/core";import
|
|
1
|
+
import{__rest as t,__assign as i}from'./../../ext-esm/tslib/tslib.es6.js';import{jsx as e,jsxs as o}from"react/jsx-runtime";import{useEffect as a,cloneElement as s}from"react";import n from"classnames";import{noop as c}from"lodash";import{Grow as r,SnackbarContent as l,Tooltip as m,Typography as d}from"@material-ui/core";import f from"../IconButton/index.js";import{NOTIFICATION_VARIANTS as p}from"../../constants/notifications.js";import{useStyles as u}from"./Toast.styles.js";import{CheckOneIcon as v,CautionIcon as h,AttentionIcon as C,InfoIcon as N,PuzzleIcon as b,CloseSmallIcon as g}from"../../icons/index.js";var k,j="NotificationPopup",T=((k={})[p.success]=v,k[p.warning]=h,k[p.error]=C,k[p.info]=N,k[p.neutral]=b,k),_=function(v){var h,C=v.onDismissClick,N=v.toast,b=t(v,["onDismissClick","toast"]),k=N.alertLevel,_=N.autoHideDuration,x=void 0===_?3e3:_,P=N.content,y=N.hideIcon,z=N.icon,B=N.id,D=N.onClick,I=void 0===D?c:D,w=N.onClose,L=void 0===w?c:w,W=N.timestamp,H=N.title,q=N.tooltipProps,A=N.variant,E=void 0===A?"info":A;a((function(){if(x!==1/0){var t=setTimeout((function(){return C(B)}),x);return function(){return clearTimeout(t)}}}),[]);var F=u(),G=T[E];return e(r,i({appear:!0,in:!0},{children:e(l,i({classes:{root:n(F.main,!k&&F[E],k&&F.alertNotification,k&&F["alertLevels-".concat(k)]),action:F.actionContainer,message:F.messageContainer},"aria-describedby":"client-snackbar",message:e(m,i({},q,{title:P,classes:{tooltip:F.tooltip},placement:"bottom"},{children:o("div",i({id:"client-snackbar",className:F.messageWrapper,onClick:I,"data-testid":"".concat(j,"_status_").concat(p[E])},{children:[!y&&e("div",i({className:F.iconWrapper},{children:z?s(z,{className:F.icon,nativeColor:"#fff"}):e(G,{fill:E===p.warning?"#000":"#fff",size:16,className:F.icon})})),o("div",i({className:F.message},{children:[o("div",i({className:F.messageTop},{children:[H&&e(d,i({"data-testid":"".concat(j,"_title"),variant:"subtitle2",className:n(F.title,(h={},h[F.alertTitle]=k,h))},{children:H})),W&&e(d,i({className:n(F.timestamp,!k&&F[E])},{children:W}))]})),e("div",i({className:n(F.messageContent,!k&&F[E])},{children:e(d,i({"data-testid":"".concat(j,"_content"),className:n(k?F.alertContent:F.content)},{children:P}))}))]}))]}))})),action:[e(f,i({"data-testid":"".concat(j,"_closeButton"),"aria-label":"Close",color:"inherit",onClick:function(){L(),C(B)},size:"small",iconType:"iconPark",tooltipProps:{title:"Close",classes:{tooltip:F.tooltip}},className:F.closeIconButton},{children:e(g,{size:24,fill:k?"#000":"#fff"})}),"close")]},b))}))};export{j as PAGE_NAME,_ as Toast};
|