@corva/ui 3.33.0-3 → 3.33.0-4
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/Table.stories.d.ts.map +1 -1
- package/components/Table/TableContainer/TableContainer.d.ts +5 -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,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require('./../../../ext-esm/tslib/tslib.es6.js'),t=require("react/jsx-runtime"),e=require("react"),r=require("classnames"),a=require("@material-ui/core");function i(o){return o&&"object"==typeof o&&"default"in o?o:{default:o}}var l=i(r),n="top",c="right",s="bottom",u="left",b="both",d="var(".concat("--CorvaUI-Table-ShadowColor",")"),h="rgb(from ".concat("--CorvaUI-Table-ShadowColor"," r g b / 0)"),g=a.makeStyles((function(o){return{root:function(t){return{borderTop:t.isStickyHeader?"1px solid ".concat(o.palette.primary.text9):"none","& .MuiTable-root .MuiTableHead-root .MuiTableRow-head":{position:(t.top||t.bothVertical)&&"sticky",zIndex:2,top:0,boxShadow:(t.top||t.bothVertical)&&"0px 16px 10px ".concat(d)},"& .MuiTable-root .MuiTableFooter-root":{"&:before":{content:(t.bottom||t.bothVertical)&&"no-open-quote",position:"absolute",bottom:-1,width:"inherit",height:"16px",background:"linear-gradient(360deg, ".concat(h," 0%, ").concat(d," 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:(t.left||t.bothHorizontal)&&"no-open-quote",position:"absolute",top:0,right:"-16px",width:"16px",height:"100%",background:"linear-gradient(270deg, ".concat(h," 0%, ").concat(d," 100%)")}},"& .MuiTable-root .MuiTableHead-root .MuiTableRow-head .stickyEmptyCell, & .MuiTable-root .MuiTableBody-root .MuiTableRow-root .stickyEmptyCell":{background:(t.right||t.bothHorizontal)&&"linear-gradient(90deg, ".concat(h," 0%, ").concat(d," 100%)")}}}}})),T=e.forwardRef((function(r,i){var d,h=r.stickyHeader,T=r.className,p=r.stickyColumn,m=r.classes,f=r.shadowColor,y=void 0===f?"B4":f,M=r.style,C=o.__rest(r,["stickyHeader","className","stickyColumn","classes","shadowColor","style"]),k=e.useState(h?s:""),w=k[0],x=k[1],P=e.useState(p?c:""),S=P[0],H=P[1],v=g({top:w===n,bottom:w===s,bothVertical:w===b,left:S===u,right:S===c,bothHorizontal:S===b,isStickyHeader:h}),_=function(o){var t=o.scroll,e=o.clientParam,r=o.scrollParam,a=o.setScrollPosition,i=o.gradientPositions;0===t?a(i[0]):Math.ceil(t)+e===r?a(i[1]):a(b)},q=a.useTheme().palette.background[y.toLowerCase()]||y;return t.jsx(a.TableContainer,o.__assign({onScroll:function(o){h?_({scroll:o.currentTarget.scrollTop,clientParam:o.currentTarget.clientHeight,scrollParam:o.currentTarget.scrollHeight,setScrollPosition:x,gradientPositions:[s,n]}):p&&_({scroll:o.currentTarget.scrollLeft,clientParam:o.currentTarget.clientWidth,scrollParam:o.currentTarget.scrollWidth,setScrollPosition:H,gradientPositions:[c,u]})},className:l.default(v.root,T,null==m?void 0:m.root),ref:i,style:o.__assign(o.__assign({},M),(d={},d["--CorvaUI-Table-ShadowColor"]=q,d))},C))}));exports.TableContainer=T;
|
|
2
2
|
//# sourceMappingURL=TableContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOhC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAiBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBA2CnC,CAAC;AAEF,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/Table/Table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAOhC,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC;AAE1C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,KAAK,CAGrB,CAAC;AAiBF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,UAAW,KAAK,gBA2CnC,CAAC;AAEF,eAAO,MAAM,YAAY,mBA2DxB,CAAC;AAQF,eAAO,MAAM,uBAAuB,mBAoDnC,CAAC;AAMF,eAAO,MAAM,SAAS,UAAW,KAAK,gBA2CrC,CAAC"}
|
|
@@ -4,6 +4,10 @@ export type TableContainerProps = {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
stickyColumn?: boolean;
|
|
6
6
|
classes?: Record<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Shadow colour for sticky headers, etc.
|
|
9
|
+
*/
|
|
10
|
+
shadowColor?: 'B1' | 'B2' | 'B3' | 'B4' | 'B5' | 'B6' | 'B7' | 'B8' | 'B9' | 'B10' | 'B11' | string;
|
|
7
11
|
} & Partial<Omit<MUITableContainerProps, 'classes' | 'className'>>;
|
|
8
|
-
export declare const TableContainer: import("react").ForwardRefExoticComponent<Pick<TableContainerProps, "children" | "className" | "onClick" | "slot" | "style" | "title" | "tabIndex" | "role" | "id" | "classes" | "color" | "translate" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "innerRef" | "stickyHeader" | "stickyColumn"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
12
|
+
export declare const TableContainer: import("react").ForwardRefExoticComponent<Pick<TableContainerProps, "children" | "className" | "onClick" | "slot" | "style" | "title" | "tabIndex" | "role" | "id" | "classes" | "color" | "translate" | "hidden" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "innerRef" | "stickyHeader" | "stickyColumn" | "shadowColor"> & import("react").RefAttributes<HTMLTableElement>>;
|
|
9
13
|
//# sourceMappingURL=TableContainer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/TableContainer/TableContainer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TableContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/Table/TableContainer/TableContainer.tsx"],"names":[],"mappings":"AASA,OAAO,EAGL,mBAAmB,IAAI,sBAAsB,EAE9C,MAAM,mBAAmB,CAAC;AA0D3B,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEjC;;OAEG;IACH,WAAW,CAAC,EACR,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,KAAK,GACL,KAAK,GACL,MAAM,CAAC;CACZ,GAAG,OAAO,CAAC,IAAI,CAAC,sBAAsB,EAAE,SAAS,GAAG,WAAW,CAAC,CAAC,CAAC;AAEnE,eAAO,MAAM,cAAc,yrJAkFzB,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__rest as
|
|
1
|
+
import{__rest as o,__assign as t}from'./../../../ext-esm/tslib/tslib.es6.js';import{jsx as r}from"react/jsx-runtime";import{forwardRef as e,useState as a}from"react";import i from"classnames";import{makeStyles as l,useTheme as c,TableContainer as n}from"@material-ui/core";var s="top",b="right",u="bottom",d="left",m="both",h="var(".concat("--CorvaUI-Table-ShadowColor",")"),p="rgb(from ".concat("--CorvaUI-Table-ShadowColor"," r g b / 0)"),g=l((function(o){return{root:function(t){return{borderTop:t.isStickyHeader?"1px solid ".concat(o.palette.primary.text9):"none","& .MuiTable-root .MuiTableHead-root .MuiTableRow-head":{position:(t.top||t.bothVertical)&&"sticky",zIndex:2,top:0,boxShadow:(t.top||t.bothVertical)&&"0px 16px 10px ".concat(h)},"& .MuiTable-root .MuiTableFooter-root":{"&:before":{content:(t.bottom||t.bothVertical)&&"no-open-quote",position:"absolute",bottom:-1,width:"inherit",height:"16px",background:"linear-gradient(360deg, ".concat(p," 0%, ").concat(h," 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:(t.left||t.bothHorizontal)&&"no-open-quote",position:"absolute",top:0,right:"-16px",width:"16px",height:"100%",background:"linear-gradient(270deg, ".concat(p," 0%, ").concat(h," 100%)")}},"& .MuiTable-root .MuiTableHead-root .MuiTableRow-head .stickyEmptyCell, & .MuiTable-root .MuiTableBody-root .MuiTableRow-root .stickyEmptyCell":{background:(t.right||t.bothHorizontal)&&"linear-gradient(90deg, ".concat(p," 0%, ").concat(h," 100%)")}}}}})),T=e((function(e,l){var h,p=e.stickyHeader,T=e.className,f=e.stickyColumn,y=e.classes,M=e.shadowColor,C=void 0===M?"B4":M,k=e.style,w=o(e,["stickyHeader","className","stickyColumn","classes","shadowColor","style"]),x=a(p?u:""),H=x[0],P=x[1],S=a(f?b:""),v=S[0],R=S[1],z=g({top:H===s,bottom:H===u,bothVertical:H===m,left:v===d,right:v===b,bothHorizontal:v===m,isStickyHeader:p}),I=function(o){var t=o.scroll,r=o.clientParam,e=o.scrollParam,a=o.setScrollPosition,i=o.gradientPositions;0===t?a(i[0]):Math.ceil(t)+r===e?a(i[1]):a(m)},V=c().palette.background[C.toLowerCase()]||C;return r(n,t({onScroll:function(o){p?I({scroll:o.currentTarget.scrollTop,clientParam:o.currentTarget.clientHeight,scrollParam:o.currentTarget.scrollHeight,setScrollPosition:P,gradientPositions:[u,s]}):f&&I({scroll:o.currentTarget.scrollLeft,clientParam:o.currentTarget.clientWidth,scrollParam:o.currentTarget.scrollWidth,setScrollPosition:R,gradientPositions:[b,d]})},className:i(z.root,T,null==y?void 0:y.root),ref:l,style:t(t({},k),(h={},h["--CorvaUI-Table-ShadowColor"]=V,h))},w))}));export{T as TableContainer};
|
|
2
2
|
//# sourceMappingURL=TableContainer.js.map
|