@corva/ui 0.75.0-2 → 0.75.0-3

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";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),o=require("react/jsx-runtime"),t=require("react"),i=require("classnames"),n=require("@material-ui/core"),r=require("../../../icons/index.js"),a=require("../../../utils/mobileDetect.js"),s=require("../../IconButton/index.js"),l=require("../../Modal/Modal.js"),c=require("../../Button/index.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(i),u=a.isNativeDetected||a.isMobileDetected,g=n.makeStyles((function(e){return{popoverPaper:{marginTop:function(e){return e.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:e.palette.background.b9,maxHeight:function(e){var o=e.maxHeight;return o?o-24:"calc(100% - 24px)"},"&.scrollable":{height:function(e){return e.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(e.palette.background.b9,", ").concat(e.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},shadow:{position:"absolute",bottom:0,width:"100%",height:16,background:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(e.palette.background.b9," 100%)")},modalActions:{display:"flex",justifyContent:"flex-end"}}}));exports.AppSettingsPopover=function(i){var d=i.Trigger,h=i.children,v=i.classes,m=i.defaultScrollable,x=void 0!==m&&m,b=i.header,f=void 0===b?"Settings":b,_=i.iconSettingsProps,j=void 0===_?{}:_,C=i.maxHeight,S=void 0===C?null:C,k=i.modalActions,P=void 0===k?null:k,T=i.modalProps,q=void 0===T?{}:T,w=i.onClose,y=void 0===w?function(){}:w,H=e.__rest(i,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),N=t.useState(null),z=N[0],A=N[1],D=t.useState(!0),I=D[0],M=D[1],O=g({maxHeight:S,isScrollable:I,isNativeDetected:a.isNativeDetected}),B=v||{},E=B.popoverContent,Y=e.__rest(B,["popoverContent"]),F=function(){A(null),y()},L=Boolean(z),W=function(e){return A(e.currentTarget)},X=P||o.jsx(c,e.__assign({variation:"secondary",onClick:F},{children:"CLOSE"}));return o.jsxs(o.Fragment,{children:[d?o.jsx(d,{onClick:W}):o.jsx(s,e.__assign({isActive:L,onClick:W,size:"small",tooltipProps:{title:"Settings"},variant:"contained",iconType:"iconPark"},j,{children:o.jsx(r.SettingTwoIcon,{size:16})})),!u&&o.jsxs(n.Popover,e.__assign({open:L,anchorEl:z,onClose:F,anchorOrigin:{vertical:I?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},H,{classes:e.__assign(e.__assign({},Y),{paper:p.default(O.popoverPaper,I&&"scrollable",null==Y?void 0:Y.paper)})},{children:[o.jsxs("div",e.__assign({className:p.default(O.popoverHeader,I&&"scrollable")},{children:[o.jsx("div",e.__assign({className:O.headerTitle},{children:f})),o.jsx(s,e.__assign({tooltipProps:{title:"Close"},onClick:F,iconType:"iconPark"},{children:o.jsx(r.CloseSmallIcon,{})}))]})),o.jsx("div",e.__assign({className:p.default(O.popoverContentContainer,I&&"scrollable"),ref:function(e){e&&e.scrollHeight<=e.clientHeight&&!x&&M(!1)}},{children:o.jsx("div",e.__assign({className:p.default(O.popoverContent,E)},{children:h}))})),o.jsx("div",{className:O.shadow})]})),u&&o.jsx(l,e.__assign({actions:X,onClose:F,open:L,actionsClassName:O.modalActions,title:f},q,{children:h}))]})};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require('./../../../ext-esm/tslib/tslib.es6.js'),o=require("react/jsx-runtime"),t=require("react"),i=require("classnames"),n=require("@material-ui/core"),r=require("../../../icons/index.js"),l=require("../../../utils/mobileDetect.js"),s=require("../../IconButton/index.js"),a=require("../../Modal/Modal.js"),c=require("../../Button/index.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=d(i),u=l.isNativeDetected||l.isMobileDetected,g=n.makeStyles((function(e){return{popoverPaper:{marginTop:function(e){return e.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:e.palette.background.b9,maxHeight:function(e){var o=e.maxHeight;return o?o-24:"calc(100% - 24px)"},"&.scrollable":{height:function(e){return e.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(e.palette.background.b9,", ").concat(e.palette.background.b9," 89%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},modalActions:{display:"flex",justifyContent:"flex-end"}}}));exports.AppSettingsPopover=function(i){var d=i.Trigger,h=i.children,v=i.classes,x=i.defaultScrollable,m=void 0!==x&&x,f=i.header,b=void 0===f?"Settings":f,_=i.iconSettingsProps,j=void 0===_?{}:_,C=i.maxHeight,S=void 0===C?null:C,P=i.modalActions,k=void 0===P?null:P,T=i.modalProps,q=void 0===T?{}:T,y=i.onClose,H=void 0===y?function(){}:y,N=e.__rest(i,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),w=t.useState(null),z=w[0],A=w[1],D=t.useState(!0),I=D[0],M=D[1],O=g({maxHeight:S,isScrollable:I,isNativeDetected:l.isNativeDetected}),B=v||{},E=B.popoverContent,Y=e.__rest(B,["popoverContent"]),F=function(){A(null),H()},L=Boolean(z),W=function(e){return A(e.currentTarget)},X=k||o.jsx(c,e.__assign({variation:"secondary",onClick:F},{children:"CLOSE"}));return o.jsxs(o.Fragment,{children:[d?o.jsx(d,{onClick:W}):o.jsx(s,e.__assign({isActive:L,onClick:W,size:"small",tooltipProps:{title:"Settings"},variant:"contained",iconType:"iconPark"},j,{children:o.jsx(r.SettingTwoIcon,{size:16})})),!u&&o.jsxs(n.Popover,e.__assign({open:L,anchorEl:z,onClose:F,anchorOrigin:{vertical:I?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},N,{classes:e.__assign(e.__assign({},Y),{paper:p.default(O.popoverPaper,I&&"scrollable",null==Y?void 0:Y.paper)})},{children:[o.jsxs("div",e.__assign({className:p.default(O.popoverHeader,I&&"scrollable")},{children:[o.jsx("div",e.__assign({className:O.headerTitle},{children:b})),o.jsx(s,e.__assign({tooltipProps:{title:"Close"},onClick:F,iconType:"iconPark"},{children:o.jsx(r.CloseSmallIcon,{})}))]})),o.jsx("div",e.__assign({className:p.default(O.popoverContentContainer,I&&"scrollable"),ref:function(e){e&&e.scrollHeight<=e.clientHeight&&!m&&M(!1)}},{children:o.jsx("div",e.__assign({className:p.default(O.popoverContent,E)},{children:h}))}))]})),u&&o.jsx(a,e.__assign({actions:X,onClose:F,open:L,actionsClassName:O.modalActions,title:b},q,{children:h}))]})};
@@ -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"),a=require("classnames"),r=require("lodash"),i=require("@material-ui/core"),l=require("../../IconButton/index.js"),d=require("../../Button/index.js"),s=require("../../../icons/index.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=c(o),u=c(a),h=i.makeStyles((function(e){var t,n;return i.createStyles({drawer:function(t){var n;return(n={height:"100%",position:"relative",width:t.openedDrawerWidth,borderTop:"1px solid",borderTopColor:e.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"})["&.".concat("closed")]={width:"48px"},n},drawerPaper:(t={position:"relative",width:"100%",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={height:48,borderBottom:"1px solid",borderBottomColor:e.palette.background.b7,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,left:0,right:0,letterSpacing:"1px",textTransform:"uppercase",fontSize:"14px",fontWeight:500,lineHeight:"20px",backgroundColor:e.palette.background.b5},n["&.".concat("open")]={padding:e.spacing(1.5),justifyContent:"flex-start"},n["&.".concat("withShadow")]={zIndex:1,boxShadow:"-18px 12px 12px #272727"},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("withShadow")]={zIndex:1,boxShadow:"-18px -12px 12px #272727"},t["&.".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}})})),f=function(o){var a,r=o.anchor,c=o.children,p=o.drawerPaperClassName,f=o.expandedTooltipTitle,g=o.collapsedTooltipTitle,x=o.header,m=o.headerIcon,b=o.headerTitleIcon,w=o.isOpen,T=o.openedDrawerWidth,S=o.setIsOpen,C=o.size,I=o.allOptionsButtonShown,j=o.isAllOptionsSelected,k=o.onAllOptionsClick,_=n.useState(!1),O=_[0],v=_[1],A=n.useRef(),B=h({anchor:r,openedDrawerWidth:T||{small:235,medium:354,large:473}[C]});n.useEffect((function(){var e=A.current,t=e.scrollHeight,n=e.clientHeight;v(t>n)}));var y="left"===r?s.RightIcon:s.LeftIcon;return t.jsxs(i.Drawer,e.__assign({"data-testid":"".concat("AppSideBar","_Drawer"),onClick:function(){w||S(!0)},className:u.default(B.drawer,!w&&"closed"),variant:"permanent",classes:{paper:u.default(B.drawerPaper,p,!w&&"closed")},anchor:r},{children:[t.jsxs("div",e.__assign({className:u.default(B.header,w&&"open",O&&"withShadow"),onClick:function(){w&&S(!1)}},{children:[w&&t.jsxs(t.Fragment,{children:[b||t.jsx(s.LeftAlignmentIcon,{size:24}),t.jsx("div",e.__assign({"data-testid":"".concat("AppSideBar","_header"),className:B.headerIconText},{children:x})),I&&t.jsx(d,e.__assign({className:B.selectAllButton,onClick:function(e){e.stopPropagation(),k(e)},startIcon:j?t.jsx(s.CloseSmallIcon,{size:16}):t.jsx(s.CheckSmallIcon,{size:16})},{children:j?"Clear All":"Select All"}))]}),!w&&m]})),t.jsx("div",e.__assign({className:B.contentWrapper,ref:A},{children:t.jsx("div",e.__assign({className:B.content},{children:w&&c}))})),t.jsx(i.Box,e.__assign({className:u.default(B.openToggleContainer,(a={},a.open=w,a.withShadow=O,a))},{children:t.jsx(i.Tooltip,e.__assign({title:w?f:g,placement:"bottom"},{children:t.jsx("div",{children:t.jsx(l,e.__assign({iconType:"iconPark","aria-label":"toggle sidebar",onClick:function(){S(!w)}},{children:t.jsx(y,{size:24,"data-testid":"".concat("AppSideBar","_arrowButton"),className:u.default(w&&B.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};f.propTypes=g,f.defaultProps={anchor:"left",drawerPaperClassName:"",expandedTooltipTitle:"Collapse",collapsedTooltipTitle:"Expand",header:null,headerIcon:null,headerTitleIcon:null,isOpen:!1,openedDrawerWidth:0,setIsOpen:r.noop,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:r.noop},module.exports=f;
1
+ "use strict";var e=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),n=require("react"),o=require("prop-types"),a=require("classnames"),r=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(a),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:"0 8px 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:e.palette.background.b7,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 a,r=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:r,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"===r?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:r},{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,(a={},a.open=T,a))},{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:r.noop,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:r.noop},module.exports=h;
@@ -1 +1 @@
1
- {"version":3,"file":"AppSettingsPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSettingsPopover/AppSettingsPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAc,YAAY,EAAW,MAAM,mBAAmB,CAAC;AAoEtE,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACR,OAAO,EACP,iBAAyB,EACzB,MAAmB,EACnB,iBAAsB,EACtB,SAAgB,EAChB,YAAmB,EACnB,UAAe,EACf,OAAkB,EAClB,GAAG,YAAY,EAChB,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAqGvC"}
1
+ {"version":3,"file":"AppSettingsPopover.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSettingsPopover/AppSettingsPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,SAAS,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAc,YAAY,EAAW,MAAM,mBAAmB,CAAC;AA8DtE,MAAM,WAAW,uBAAwB,SAAQ,YAAY;IAC3D,OAAO,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,GAAG;QACjC,cAAc,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,iBAAiB,CAAC,EAAE;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,YAAY,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAClC,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,EAAE,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACR,OAAO,EACP,iBAAyB,EACzB,MAAmB,EACnB,iBAAsB,EACtB,SAAgB,EAChB,YAAmB,EACnB,UAAe,EACf,OAAkB,EAClB,GAAG,YAAY,EAChB,EAAE,uBAAuB,GAAG,GAAG,CAAC,OAAO,CAoGvC"}
@@ -1 +1 @@
1
- import{__rest as o,__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as r}from"react";import l from"classnames";import{makeStyles as a,Popover as c}from"@material-ui/core";import{SettingTwoIcon as s,CloseSmallIcon as d}from"../../../icons/index.js";import{isNativeDetected as p,isMobileDetected as m}from"../../../utils/mobileDetect.js";import h from"../../IconButton/index.js";import g from"../../Modal/Modal.js";import u from"../../Button/index.js";var v=p||m,f=a((function(o){return{popoverPaper:{marginTop:function(o){return o.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:o.palette.background.b9,maxHeight:function(o){var e=o.maxHeight;return e?e-24:"calc(100% - 24px)"},"&.scrollable":{height:function(o){return o.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(o.palette.background.b9,", ").concat(o.palette.background.b9," 79%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},shadow:{position:"absolute",bottom:0,width:"100%",height:16,background:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(o.palette.background.b9," 100%)")},modalActions:{display:"flex",justifyContent:"flex-end"}}}));function b(a){var m=a.Trigger,b=a.children,C=a.classes,x=a.defaultScrollable,k=void 0!==x&&x,T=a.header,H=void 0===T?"Settings":T,P=a.iconSettingsProps,S=void 0===P?{}:P,j=a.maxHeight,w=void 0===j?null:j,y=a.modalActions,N=void 0===y?null:y,z=a.modalProps,A=void 0===z?{}:z,B=a.onClose,I=void 0===B?function(){}:B,O=o(a,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),D=r(null),E=D[0],M=D[1],Y=r(!0),L=Y[0],W=Y[1],X=f({maxHeight:w,isScrollable:L,isNativeDetected:p}),_=C||{},q=_.popoverContent,F=o(_,["popoverContent"]),G=function(){M(null),I()},J=Boolean(E),K=function(o){return M(o.currentTarget)},Q=N||t(u,e({variation:"secondary",onClick:G},{children:"CLOSE"}));return i(n,{children:[m?t(m,{onClick:K}):t(h,e({isActive:J,onClick:K,size:"small",tooltipProps:{title:"Settings"},variant:"contained",iconType:"iconPark"},S,{children:t(s,{size:16})})),!v&&i(c,e({open:J,anchorEl:E,onClose:G,anchorOrigin:{vertical:L?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},O,{classes:e(e({},F),{paper:l(X.popoverPaper,L&&"scrollable",null==F?void 0:F.paper)})},{children:[i("div",e({className:l(X.popoverHeader,L&&"scrollable")},{children:[t("div",e({className:X.headerTitle},{children:H})),t(h,e({tooltipProps:{title:"Close"},onClick:G,iconType:"iconPark"},{children:t(d,{})}))]})),t("div",e({className:l(X.popoverContentContainer,L&&"scrollable"),ref:function(o){o&&o.scrollHeight<=o.clientHeight&&!k&&W(!1)}},{children:t("div",e({className:l(X.popoverContent,q)},{children:b}))})),t("div",{className:X.shadow})]})),v&&t(g,e({actions:Q,onClose:G,open:J,actionsClassName:X.modalActions,title:H},A,{children:b}))]})}export{b as AppSettingsPopover};
1
+ import{__rest as o,__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as t,jsxs as i,Fragment as n}from"react/jsx-runtime";import{useState as r}from"react";import l from"classnames";import{makeStyles as a,Popover as c}from"@material-ui/core";import{SettingTwoIcon as s,CloseSmallIcon as d}from"../../../icons/index.js";import{isNativeDetected as p,isMobileDetected as m}from"../../../utils/mobileDetect.js";import h from"../../IconButton/index.js";import g from"../../Modal/Modal.js";import u from"../../Button/index.js";var v=p||m,f=a((function(o){return{popoverPaper:{marginTop:function(o){return o.isScrollable?0:8},minWidth:286,width:286,overflowY:"hidden",backgroundColor:o.palette.background.b9,maxHeight:function(o){var e=o.maxHeight;return e?e-24:"calc(100% - 24px)"},"&.scrollable":{height:function(o){return o.maxHeight||"100%"}}},popoverHeader:{display:"flex",justifyContent:"space-between",alignItems:"center",height:76,padding:"24px 16px 16px 16px",position:"absolute",left:0,right:0,zIndex:1,"&.scrollable":{background:"linear-gradient(to bottom, ".concat(o.palette.background.b9,", ").concat(o.palette.background.b9," 89%, rgba(65, 65, 65, 0) 100%)")}},headerTitle:{fontSize:20},popoverContentContainer:{marginTop:60,paddingTop:16,overflowX:"hidden",overflowY:"auto","&.scrollable":{height:"calc(100% - 60px)"}},popoverContent:{width:"100%"},modalActions:{display:"flex",justifyContent:"flex-end"}}}));function b(a){var m=a.Trigger,b=a.children,C=a.classes,x=a.defaultScrollable,k=void 0!==x&&x,T=a.header,H=void 0===T?"Settings":T,P=a.iconSettingsProps,S=void 0===P?{}:P,j=a.maxHeight,y=void 0===j?null:j,w=a.modalActions,z=void 0===w?null:w,N=a.modalProps,A=void 0===N?{}:N,B=a.onClose,I=void 0===B?function(){}:B,O=o(a,["Trigger","children","classes","defaultScrollable","header","iconSettingsProps","maxHeight","modalActions","modalProps","onClose"]),D=r(null),E=D[0],M=D[1],Y=r(!0),L=Y[0],W=Y[1],X=f({maxHeight:y,isScrollable:L,isNativeDetected:p}),_=C||{},q=_.popoverContent,F=o(_,["popoverContent"]),G=function(){M(null),I()},J=Boolean(E),K=function(o){return M(o.currentTarget)},Q=z||t(u,e({variation:"secondary",onClick:G},{children:"CLOSE"}));return i(n,{children:[m?t(m,{onClick:K}):t(h,e({isActive:J,onClick:K,size:"small",tooltipProps:{title:"Settings"},variant:"contained",iconType:"iconPark"},S,{children:t(s,{size:16})})),!v&&i(c,e({open:J,anchorEl:E,onClose:G,anchorOrigin:{vertical:L?"top":"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},marginThreshold:12},O,{classes:e(e({},F),{paper:l(X.popoverPaper,L&&"scrollable",null==F?void 0:F.paper)})},{children:[i("div",e({className:l(X.popoverHeader,L&&"scrollable")},{children:[t("div",e({className:X.headerTitle},{children:H})),t(h,e({tooltipProps:{title:"Close"},onClick:G,iconType:"iconPark"},{children:t(d,{})}))]})),t("div",e({className:l(X.popoverContentContainer,L&&"scrollable"),ref:function(o){o&&o.scrollHeight<=o.clientHeight&&!k&&W(!1)}},{children:t("div",e({className:l(X.popoverContent,q)},{children:b}))}))]})),v&&t(g,e({actions:Q,onClose:G,open:J,actionsClassName:X.modalActions,title:H},A,{children:b}))]})}export{b as AppSettingsPopover};
@@ -1 +1 @@
1
- {"version":3,"file":"AppSideBar.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSideBar/AppSideBar.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAyBnC,aAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/B,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC;IACvF,MAAM,EAAE,MAAM,CAAC;CAChB;AAqHD,QAAA,MAAM,UAAU;gPAgBb,eAAe,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoG/B,CAAC;AAEF,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAqBF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"AppSideBar.d.ts","sourceRoot":"","sources":["../../../../src/components/DevCenter/AppSideBar/AppSideBar.tsx"],"names":[],"mappings":";AACA,OAAO,SAAS,MAAM,YAAY,CAAC;AAwBnC,aAAK,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/B,MAAM,WAAW,eAAgB,SAAQ,SAAS,CAAC,UAAU,CAAC,OAAO,mBAAmB,CAAC;IACvF,MAAM,EAAE,MAAM,CAAC;CAChB;AA2GD,QAAA,MAAM,UAAU;gPAgBb,eAAe,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwF/B,CAAC;AAEF,QAAA,MAAM,mBAAmB;;;;;;;;;;;;;;;;CAgBxB,CAAC;AAqBF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- import{__assign as e}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsxs as o,Fragment as t,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 d from"classnames";import{noop as p}from"lodash";import{makeStyles as c,createStyles as s,Drawer as h,Box as u,Tooltip as m}from"@material-ui/core";import g from"../../IconButton/index.js";import f from"../../Button/index.js";import{LeftAlignmentIcon as x,CloseSmallIcon as b,CheckSmallIcon as w,RightIcon as T,LeftIcon as C}from"../../../icons/index.js";var S=c((function(e){var o,t;return s({drawer:function(o){var t;return(t={height:"100%",position:"relative",width:o.openedDrawerWidth,borderTop:"1px solid",borderTopColor:e.palette.background.b7,boxShadow:"4px 0px 8px rgba(0, 0, 0, 0.15)"})["&.".concat("closed")]={width:"48px"},t},drawerPaper:(o={position:"relative",width:"100%",backgroundColor:e.palette.background.b5},o["&.".concat("closed")]={cursor:"pointer","&:hover":{backgroundColor:e.palette.background.b7,"& > $header":{backgroundColor:e.palette.background.b7}}},o["&.MuiDrawer-paperAnchorDockedLeft"]={borderRight:"none"},o["&.MuiDrawer-paperAnchorDockedRight"]={borderLeft:"none"},o),header:(t={height:48,borderBottom:"1px solid",borderBottomColor:e.palette.background.b7,display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:0,left:0,right:0,letterSpacing:"1px",textTransform:"uppercase",fontSize:"14px",fontWeight:500,lineHeight:"20px",backgroundColor:e.palette.background.b5},t["&.".concat("open")]={padding:e.spacing(1.5),justifyContent:"flex-start"},t["&.".concat("withShadow")]={zIndex:1,boxShadow:"-18px 12px 12px #272727"},t),openToggleIconOpen:{transform:"rotate(180deg)"},openToggleContainer:function(e){var o,t=e.anchor;return(o={alignItems:"center",bottom:0,display:"flex",flex:"0 0",height:48,justifyContent:"center",padding:6,position:"absolute",width:"100%"})["&.".concat("withShadow")]={zIndex:1,boxShadow:"-18px -12px 12px #272727"},o["&.".concat("open")]={justifyContent:"left"===t?"flex-end":"flex-start",paddingRight:6},o},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 p,c=l.anchor,s=l.children,I=l.drawerPaperClassName,k=l.expandedTooltipTitle,O=l.collapsedTooltipTitle,v=l.header,A=l.headerIcon,B=l.headerTitleIcon,z=l.isOpen,y=l.openedDrawerWidth,D=l.setIsOpen,N=l.size,j=l.allOptionsButtonShown,P=l.isAllOptionsSelected,W=l.onAllOptionsClick,M=r(!1),R=M[0],H=M[1],L=i(),_=S({anchor:c,openedDrawerWidth:y||{small:235,medium:354,large:473}[N]});a((function(){var e=L.current,o=e.scrollHeight,t=e.clientHeight;H(o>t)}));var q="left"===c?T:C;return o(h,e({"data-testid":"".concat("AppSideBar","_Drawer"),onClick:function(){z||D(!0)},className:d(_.drawer,!z&&"closed"),variant:"permanent",classes:{paper:d(_.drawerPaper,I,!z&&"closed")},anchor:c},{children:[o("div",e({className:d(_.header,z&&"open",R&&"withShadow"),onClick:function(){z&&D(!1)}},{children:[z&&o(t,{children:[B||n(x,{size:24}),n("div",e({"data-testid":"".concat("AppSideBar","_header"),className:_.headerIconText},{children:v})),j&&n(f,e({className:_.selectAllButton,onClick:function(e){e.stopPropagation(),W(e)},startIcon:n(P?b:w,{size:16})},{children:P?"Clear All":"Select All"}))]}),!z&&A]})),n("div",e({className:_.contentWrapper,ref:L},{children:n("div",e({className:_.content},{children:z&&s}))})),n(u,e({className:d(_.openToggleContainer,(p={},p.open=z,p.withShadow=R,p))},{children:n(m,e({title:z?k:O,placement:"bottom"},{children:n("div",{children:n(g,e({iconType:"iconPark","aria-label":"toggle sidebar",onClick:function(){D(!z)}},{children:n(q,{size:24,"data-testid":"".concat("AppSideBar","_arrowButton"),className:d(z&&_.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:p,size:"medium",allOptionsButtonShown:!1,isAllOptionsSelected:!1,onAllOptionsClick:p};export{I as default};
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 m}from"@material-ui/core";import f 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:"0 8px 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:e.palette.background.b7,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}})})),k=function(l){var d,p=l.anchor,s=l.children,k=l.drawerPaperClassName,I=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,k,!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(m,e({title:y?I:v,placement:"bottom"},{children:n("div",{children:n(f,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)})}))})}))}))]}))},I={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};k.propTypes=I,k.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{k as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.75.0-2",
3
+ "version": "0.75.0-3",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"