@corva/ui 0.93.0-5 → 0.93.0-6
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/Table/TableContainer/TableContainer.js +1 -1
- package/components/Table/TableContainer/TableContainer.d.ts +1 -1
- package/components/Table/TableContainer/TableContainer.d.ts.map +1 -1
- package/components/Table/TableContainer/TableContainer.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),o=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react"),a=require("classnames"),i=require("@material-ui/core"),l=require("react/jsx-runtime");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=n(t),s=n(e),u=n(o),b=n(a),p=["stickyHeader","className","stickyColumn","classes"];function d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}var g="top",
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/slicedToArray"),o=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react"),a=require("classnames"),i=require("@material-ui/core"),l=require("react/jsx-runtime");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=n(t),s=n(e),u=n(o),b=n(a),p=["stickyHeader","className","stickyColumn","classes"];function d(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,r)}return o}var g="top",f="right",h="bottom",y="left",m="both",P=i.makeStyles((function(t){return{root:function(e){return{borderTop:e.isStickyHeader?"1px solid ".concat(t.palette.primary.text9):"none","& .MuiTable-root .MuiTableHead-root .MuiTableRow-head":{position:(e.top||e.bothVertical)&&"sticky",zIndex:2,top:0,boxShadow:(e.top||e.bothVertical)&&"0px 16px 10px ".concat(t.palette.background.b4)},"& .MuiTable-root .MuiTableFooter-root":{"&:before":{content:(e.bottom||e.bothVertical)&&"no-open-quote",position:"absolute",bottom:-1,width:"inherit",height:"16px",background:"linear-gradient(360deg, rgba(44, 44, 44, 0) 0%, ".concat(t.palette.background.b4," 100%)"),transform:"matrix(1, 0, 0, -1, 0, 0)"}},"& .MuiTable-root .MuiTableHead-root .MuiTableRow-head .stickyCell, & .MuiTable-root .MuiTableBody-root .MuiTableRow-root .stickyCell":{"&:after":{content:(e.left||e.bothHorizontal)&&"no-open-quote",position:"absolute",top:0,right:"-16px",width:"16px",height:"100%",background:"linear-gradient(270deg, rgba(44, 44, 44, 0) 0%, ".concat(t.palette.background.b4," 100%)")}},"& .MuiTable-root .MuiTableHead-root .MuiTableRow-head .stickyEmptyCell, & .MuiTable-root .MuiTableBody-root .MuiTableRow-root .stickyEmptyCell":{background:(e.right||e.bothHorizontal)&&"linear-gradient(90deg, rgba(44, 44, 44, 0) 0%, ".concat(t.palette.background.b4," 100%)")}}}}})),T=r.forwardRef((function(t,e){var o=t.stickyHeader,a=t.className,n=t.stickyColumn,T=t.classes,k=u.default(t,p),M=r.useState(o?h:""),O=s.default(M,2),j=O[0],w=O[1],x=r.useState(n?f:""),H=s.default(x,2),S=H[0],v=H[1],q=P({top:j===g,bottom:j===h,bothVertical:j===m,left:S===y,right:S===f,bothHorizontal:S===m,isStickyHeader:o}),C=function(t){var e=t.scroll,o=t.clientParam,r=t.scrollParam,a=t.setScrollPosition,i=t.gradientPositions;0===e?a(i[0]):Math.ceil(e)+o===r?a(i[1]):a(m)};return l.jsx(i.TableContainer,function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?d(Object(o),!0).forEach((function(e){c.default(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):d(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({onScroll:function(t){o?C({scroll:t.target.scrollTop,clientParam:t.target.clientHeight,scrollParam:t.target.scrollHeight,setScrollPosition:w,gradientPositions:[h,g]}):n&&C({scroll:t.target.scrollLeft,clientParam:t.target.clientWidth,scrollParam:t.target.scrollWidth,setScrollPosition:v,gradientPositions:[f,y]})},className:b.default(q.root,a,null==T?void 0:T.root),ref:e},k))}));exports.TableContainer=T;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export const TableContainer: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
2
2
|
//# sourceMappingURL=TableContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/TableContainer/TableContainer.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/TableContainer/TableContainer.js"],"names":[],"mappings":"AAsDA,2GA4DG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/objectWithoutProperties";import{useState as
|
|
1
|
+
import t from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r,useState as i}from"react";import a from"classnames";import{makeStyles as l,TableContainer as n}from"@material-ui/core";import{jsx as c}from"react/jsx-runtime";var s=["stickyHeader","className","stickyColumn","classes"];function b(t,o){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(t,o).enumerable}))),e.push.apply(e,r)}return e}var p="top",u="right",m="bottom",d="left",g="both",h=l((function(t){return{root:function(o){return{borderTop:o.isStickyHeader?"1px solid ".concat(t.palette.primary.text9):"none","& .MuiTable-root .MuiTableHead-root .MuiTableRow-head":{position:(o.top||o.bothVertical)&&"sticky",zIndex:2,top:0,boxShadow:(o.top||o.bothVertical)&&"0px 16px 10px ".concat(t.palette.background.b4)},"& .MuiTable-root .MuiTableFooter-root":{"&:before":{content:(o.bottom||o.bothVertical)&&"no-open-quote",position:"absolute",bottom:-1,width:"inherit",height:"16px",background:"linear-gradient(360deg, rgba(44, 44, 44, 0) 0%, ".concat(t.palette.background.b4," 100%)"),transform:"matrix(1, 0, 0, -1, 0, 0)"}},"& .MuiTable-root .MuiTableHead-root .MuiTableRow-head .stickyCell, & .MuiTable-root .MuiTableBody-root .MuiTableRow-root .stickyCell":{"&:after":{content:(o.left||o.bothHorizontal)&&"no-open-quote",position:"absolute",top:0,right:"-16px",width:"16px",height:"100%",background:"linear-gradient(270deg, rgba(44, 44, 44, 0) 0%, ".concat(t.palette.background.b4," 100%)")}},"& .MuiTable-root .MuiTableHead-root .MuiTableRow-head .stickyEmptyCell, & .MuiTable-root .MuiTableBody-root .MuiTableRow-root .stickyEmptyCell":{background:(o.right||o.bothHorizontal)&&"linear-gradient(90deg, rgba(44, 44, 44, 0) 0%, ".concat(t.palette.background.b4," 100%)")}}}}})),f=r((function(r,l){var f=r.stickyHeader,y=r.className,P=r.stickyColumn,T=r.classes,k=e(r,s),M=i(f?m:""),O=o(M,2),w=O[0],j=O[1],x=i(P?u:""),H=o(x,2),v=H[0],S=H[1],C=h({top:w===p,bottom:w===m,bothVertical:w===g,left:v===d,right:v===u,bothHorizontal:v===g,isStickyHeader:f}),R=function(t){var o=t.scroll,e=t.clientParam,r=t.scrollParam,i=t.setScrollPosition,a=t.gradientPositions;0===o?i(a[0]):Math.ceil(o)+e===r?i(a[1]):i(g)};return c(n,function(o){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){t(o,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(t){Object.defineProperty(o,t,Object.getOwnPropertyDescriptor(r,t))}))}return o}({onScroll:function(t){f?R({scroll:t.target.scrollTop,clientParam:t.target.clientHeight,scrollParam:t.target.scrollHeight,setScrollPosition:j,gradientPositions:[m,p]}):P&&R({scroll:t.target.scrollLeft,clientParam:t.target.clientWidth,scrollParam:t.target.scrollWidth,setScrollPosition:S,gradientPositions:[u,d]})},className:a(C.root,y,null==T?void 0:T.root),ref:l},k))}));export{f as TableContainer};
|