@corva/ui 0.34.0-23 → 0.34.0-24

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
- import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import n from"@babel/runtime/helpers/slicedToArray";import l from"@babel/runtime/helpers/objectWithoutProperties";import o from"prop-types";import{Table as t,TableHead as i,TableRow as p,TableCell as c,TableBody as u}from"@material-ui/core";import d from"./ResizableTableHeaderCell.js";import a from"./ResizableTableCell.js";import{jsxs as s,jsx as m}from"react/jsx-runtime";var b=["children"];function f(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);e&&(l=l.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,l)}return n}function h(e){for(var n=1;n<arguments.length;n++){var l=null!=arguments[n]?arguments[n]:{};n%2?f(Object(l),!0).forEach((function(n){r(e,n,l[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(l)):f(Object(l)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(l,r))}))}return e}var v=function(r){var o,f,v,y,O,j=r.children,P=l(r,b),g=n(j,2),w=g[0],k=g[1],A=null==k||null===(o=k.props)||void 0===o?void 0:o.children,D=null==w||null===(f=w.props)||void 0===f||null===(v=f.children)||void 0===v||null===(y=v.props)||void 0===y||null===(O=y.children)||void 0===O?void 0:O.reduce((function(r,n){return Array.isArray(n)?r.push.apply(r,e(n)):r.push(n),r}),[]);return s(t,h(h({},P),{},{children:[m(i,{children:m(p,{children:null==D?void 0:D.map((function(r,e){var n;return r?e===D.length-1?m(c,h(h({},r.props),{},{children:null===(n=r.props)||void 0===n?void 0:n.children}),r.key||e):m(d,{cellName:"cell".concat(e),children:r},r.key||e):null}))})}),m(u,{children:null==A?void 0:A.map((function(r){var e,n;return m(p,{children:null==r||null===(e=r.props)||void 0===e||null===(n=e.children)||void 0===n?void 0:n.map((function(r,e){return r&&m(a,{children:r},r.key||e)}))},r.key)}))})]}))};v.propTypes={children:o.node.isRequired};export{v as default};
1
+ import r from"@babel/runtime/helpers/defineProperty";import e from"@babel/runtime/helpers/toConsumableArray";import n from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import l from"prop-types";import{Table as o,TableHead as i,TableRow as c,TableCell as p,TableBody as u}from"@material-ui/core";import{useState as a}from"react";import d from"./ResizableTableHeaderCell.js";import s from"./ResizableTableCell.js";import{jsxs as m,jsx as f}from"react/jsx-runtime";var h=["children"];function b(r,e){var n=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.push.apply(n,t)}return n}function v(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?b(Object(t),!0).forEach((function(n){r(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var y=function(r){var l,b,y,O,j,P=r.children,g=t(r,h),w=n(P,2),k=w[0],A=w[1],C=null==A||null===(l=A.props)||void 0===l?void 0:l.children,D=null==k||null===(b=k.props)||void 0===b||null===(y=b.children)||void 0===y||null===(O=y.props)||void 0===O||null===(j=O.children)||void 0===j?void 0:j.reduce((function(r,n){return Array.isArray(n)?r.push.apply(r,e(n)):r.push(n),r}),[]),T=a({}),x=n(T,2),R=x[0],z=x[1],E=function(r){return z((function(e){return v(v({},e),r)}))};return m(o,v(v({},g),{},{children:[f(i,{children:f(c,{children:null==D?void 0:D.map((function(r,e){var n;return r?e===D.length-1?f(p,v(v({},r.props),{},{children:null===(n=r.props)||void 0===n?void 0:n.children}),r.key||e):f(d,{cellName:"cell".concat(e),nextCellName:"cell".concat(e+1),handleWidthsUpdate:E,widths:R,children:r},r.key||e):null}))})}),f(u,{children:null==C?void 0:C.map((function(r){var e,n;return f(c,{children:null==r||null===(e=r.props)||void 0===e||null===(n=e.children)||void 0===n?void 0:n.map((function(r,e){return r&&f(s,{children:r},r.key||e)}))},r.key)}))})]}))};y.propTypes={children:l.node.isRequired};export{y as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as o}from"react";import n from"prop-types";import i from"classnames";import a from"react-draggable";import{makeStyles as l}from"@material-ui/core/styles";import{TableCell as c}from"@material-ui/core";import{jsx as s,jsxs as u}from"react/jsx-runtime";function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function d(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var m=l((function(e){return{resizableColumnHeader:{display:"flex",paddingRight:0,justifyContent:"space-between"},tableResizer:{width:6,borderRadius:10,opacity:.7,cursor:"col-resize",marginRight:-19,marginTop:-16,marginBottom:-16},hovered:{backgroundColor:e.palette.primary.main}}}));function f(e){var n,l,p=e.children,f=e.cellName,b=m(),y=t(!1),h=r(y,2),g=h[0],v=h[1],O=t(),j=r(O,2),w=j[0],P=j[1];if(o((function(){var e;P(null===(e=document.getElementById(f))||void 0===e?void 0:e.offsetWidth)})),!p)return null;return s(c,d(d({width:w,id:f},p.props),{},{children:u("div",{className:b.resizableColumnHeader,children:[s("div",{children:null!==(n=null==p||null===(l=p.props)||void 0===l?void 0:l.children)&&void 0!==n?n:null}),s(a,{axis:"x",onDrag:function(e,r){var t=r.deltaX;r.x,r.lastX,function(e){P(w+e)}(t)},position:{x:0},zIndex:999,onStart:function(){P(w),v(!0)},onStop:function(){v(!1)},children:s("div",{className:i(b.tableResizer,g&&b.hovered),onMouseEnter:function(){return v(!0)},onMouseLeave:function(){return v(!1)}})})]})}))}f.propTypes={children:n.node.isRequired,cellName:n.string.isRequired};export{f as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/slicedToArray";import{useState as t,useEffect as n}from"react";import i from"prop-types";import o from"classnames";import a from"react-draggable";import{makeStyles as c}from"@material-ui/core/styles";import{TableCell as l}from"@material-ui/core";import{jsx as s,jsxs as d}from"react/jsx-runtime";function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function p(r){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){e(r,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(n,e))}))}return r}var m=c((function(e){return{resizableColumnHeader:{display:"flex",paddingRight:0,justifyContent:"space-between"},tableResizer:{width:6,borderRadius:10,opacity:.7,cursor:"col-resize",marginRight:-11,marginTop:-16,marginBottom:-16},hovered:{backgroundColor:e.palette.primary.main}}})),f=function(e){var r;return null===(r=document.getElementById(e))||void 0===r?void 0:r.offsetWidth};function h(i){var c,u,h=i.children,b=i.cellName,y=i.nextCellName,g=i.widths,v=i.handleWidthsUpdate,O=m(),j=t(!1),w=r(j,2),x=w[0],R=w[1],P=t(),z=r(P,2),C=z[0],N=z[1],q=t(),D=r(q,2),E=D[0],S=D[1];if(n((function(){N(f("content-".concat(b))+12),S(f("content-".concat(y))+12),v(e({},b,f(b)))}),[]),!h)return null;return s(l,p(p({width:g[b],id:b},h.props),{},{children:d("div",{className:O.resizableColumnHeader,children:[s("div",{id:"content-".concat(b),children:null!==(c=null==h||null===(u=h.props)||void 0===u?void 0:u.children)&&void 0!==c?c:null}),s(a,{axis:"x",onDrag:function(r,t){var n=t.deltaX;t.x,t.lastX,function(r){var t,n=g[b]+r,i=g[y]-r;n<0||n<C||i<E||v((e(t={},b,n),e(t,y,i),t))}(n)},position:{x:0},zIndex:999,onStart:function(){R(!0)},onStop:function(){g[b]!==f(b)&&v(e({},b,f(b))),R(!1)},children:s("div",{className:o(O.tableResizer,x&&O.hovered),onMouseEnter:function(){return R(!0)},onMouseLeave:function(){return R(!1)}})})]})}))}h.propTypes={children:i.node.isRequired,cellName:i.string.isRequired,nextCellName:i.string.isRequired,widths:i.shape({}).isRequired,handleWidthsUpdate:i.func.isRequired};export{h as default};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r}from"react";import i from"classnames";import a from"prop-types";import{Grid as o,Tooltip as l,Typography as s,Switch as c,withStyles as n}from"@material-ui/core";import b from"./style.css.js";import{jsxs as d,jsx as p}from"react/jsx-runtime";var m=["root","track","switchBase"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function f(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?h(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var u=r((function(r,a){var n,h,u=r.title,g=r.leftLabel,y=r.rightLabel,L=r.checked,w=r.onChange,D=r.disabled,k=r.classes,O=r.size,v=r.className,j=r.rightLabelTooltip,C=r.leftLabelTooltip,B=r.customClasses,N=g&&y,P=B.root,x=B.track,S=B.switchBase,T=t(B,m);return d("div",{className:v,children:[u&&p("div",{className:b.switchControlTitle,children:u}),d(o,{component:"label",container:!0,alignItems:"center",spacing:0,children:[g&&p(o,{item:!0,children:p(l,{title:C,children:p(s,{variant:"body2",className:i(k.label,"small"===O&&k.labelSmall,!L&&!D&&k.activeLabel,D&&k.disabledLabel),children:g})})}),p(o,{item:!0,children:p(c,{ref:a,checked:L,onChange:w,color:"primary",disabled:D,classes:f({root:i(k.root,P),switchBase:i((n={},e(n,k.switchBase,N||L&&!D),e(n,k.switchBaseDisabled,D&&(N||L)),e(n,k.switchBaseDisabledNoLabels,!N&&D&&!L),n),S),track:i((h={},e(h,k.track,N||L&&!D),e(h,k.trackDisabled,D&&(N||L)),e(h,k.trackDisabledNoLabels,!N&&D&&!L),h),x)},T),size:O})}),y&&p(o,{item:!0,children:p(l,{title:j,children:p(s,{variant:"body2",className:i(k.label,"small"===O&&k.labelSmall,L&&!D&&k.activeLabel,D&&k.disabledLabel),children:y})})})]})]})}));u.propTypes={title:a.string,leftLabel:a.string,rightLabel:a.string,checked:a.bool.isRequired,onChange:a.func.isRequired,disabled:a.bool,classes:a.shape({}).isRequired,size:a.string,className:a.string,customClasses:a.shape(),rightLabelTooltip:a.string,leftLabelTooltip:a.string},u.defaultProps={title:"",leftLabel:"",rightLabel:"",disabled:!1,size:"medium",className:"",customClasses:{},rightLabelTooltip:"",leftLabelTooltip:""};var g=n({root:{width:60,height:40,padding:13,"&.MuiSwitch-sizeSmall":{width:52,height:36,padding:13},"& .MuiSwitch-switchBase":{padding:10}},switchBase:{padding:10,color:"#03BCD4","&.MuiIconButton-root:hover":{backgroundColor:"rgba(3, 188, 212, 0.08)"}},switchBaseDisabled:{color:"#196069 !important"},track:{backgroundColor:"#196069 !important",opacity:"1 !important",border:"none"},trackDisabled:{backgroundColor:"#223D40 !important",opacity:"1 !important",border:"none"},switchBaseDisabledNoLabels:{color:"#545454 !important"},trackDisabledNoLabels:{backgroundColor:"#3D3D3D !important",opacity:"1 !important",border:"none"},label:{display:"flex",justifyContent:"center",flexDirection:"column",fontSize:"16px",lineHeight:"22px",color:"#bdbdbd",margin:"8px 0px",cursor:"pointer"},labelSmall:{fontSize:"14px",lineHeight:"20px"},disabledLabel:{cursor:"default",color:"#616161"},activeLabel:{color:"#ffffff"}})(u);export{u as SwitchControl,g as default};
1
+ import e from"@babel/runtime/helpers/defineProperty";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r}from"react";import i from"classnames";import a from"prop-types";import{Grid as o,Tooltip as l,Typography as s,Switch as c,withStyles as n}from"@material-ui/core";import b from"./style.css.js";import{jsxs as d,jsx as p}from"react/jsx-runtime";var m=["root","track","switchBase"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function f(t){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?h(Object(i),!0).forEach((function(r){e(t,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):h(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}var u=r((function(r,a){var n,h,u=r.title,g=r.leftLabel,y=r.rightLabel,L=r.checked,w=r.onChange,D=r.disabled,k=r.classes,O=r.size,v=r.className,j=r.rightLabelTooltip,C=r.leftLabelTooltip,B=r.customClasses,N=g&&y,P=B.root,x=B.track,S=B.switchBase,T=t(B,m);return d("div",{className:v,children:[u&&p("div",{className:b.switchControlTitle,children:u}),d(o,{component:"label",container:!0,alignItems:"center",spacing:0,children:[g&&p(o,{item:!0,children:p(l,{title:C,children:p(s,{variant:"body2",className:i(k.label,"small"===O&&k.labelSmall,!L&&!D&&k.activeLabel,D&&k.disabledLabel),children:g})})}),p(o,{item:!0,children:p(c,{ref:a,checked:L,onChange:w,color:"primary",disabled:D,classes:f({root:i(k.root,P),switchBase:i((n={},e(n,k.switchBase,N||L&&!D),e(n,k.switchBaseDisabled,D&&(N||L)),e(n,k.switchBaseDisabledNoLabels,!N&&D&&!L),n),S),track:i((h={},e(h,k.track,N||L&&!D),e(h,k.trackDisabled,D&&(N||L)),e(h,k.trackDisabledNoLabels,!N&&D&&!L),h),x)},T),size:O})}),y&&p(o,{item:!0,children:p(l,{title:j,children:p(s,{variant:"body2",className:i(k.label,"small"===O&&k.labelSmall,L&&!D&&k.activeLabel,D&&k.disabledLabel),children:y})})})]})]})}));u.propTypes={title:a.string,leftLabel:a.string,rightLabel:a.string,checked:a.bool.isRequired,onChange:a.func.isRequired,disabled:a.bool,classes:a.shape({}).isRequired,size:a.string,className:a.string,customClasses:a.shape(),rightLabelTooltip:a.string,leftLabelTooltip:a.string},u.defaultProps={title:"",leftLabel:"",rightLabel:"",disabled:!1,size:"medium",className:"",customClasses:{},rightLabelTooltip:"",leftLabelTooltip:""};var g=n({root:{width:60,height:40,padding:13,"&.MuiSwitch-sizeSmall":{width:52,height:36,padding:13},"& .MuiSwitch-switchBase":{padding:10}},switchBase:{padding:10,color:"#03BCD4","&.MuiIconButton-root:hover":{backgroundColor:"rgba(3, 188, 212, 0.08)"}},switchBaseDisabled:{color:"#196069 !important"},track:{backgroundColor:"#196069 !important",opacity:"1 !important",border:"none"},trackDisabled:{backgroundColor:"#223D40 !important",opacity:"1 !important",border:"none"},switchBaseDisabledNoLabels:{color:"#545454 !important"},trackDisabledNoLabels:{backgroundColor:"#3D3D3D !important",opacity:"1 !important",border:"none"},label:{display:"flex",justifyContent:"center",flexDirection:"column",fontSize:"16px",lineHeight:"22px",color:"#bdbdbd",margin:"8px 0px",cursor:"pointer"},labelSmall:{fontSize:"14px",lineHeight:"20px"},disabledLabel:{cursor:"default",color:"#616161"},activeLabel:{color:"#ffffff"}})(u);export{u as SwitchControlComponent,g as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/ui",
3
- "version": "0.34.0-23",
3
+ "version": "0.34.0-24",
4
4
  "description": "Shared components/utils for Corva ui projects",
5
5
  "keywords": [
6
6
  "corva-ui"
@@ -212,7 +212,7 @@
212
212
  "rollup-plugin-visualizer": "^4.1.1",
213
213
  "sass-loader": "10.1.1",
214
214
  "standard-version": "^9.0.0",
215
- "storybook-source-link": "^1.1.0"
215
+ "storybook-addon-external-links": "2.0.0"
216
216
  },
217
217
  "engines": {
218
218
  "node": ">=10"