@bento-core/table 1.0.1-ins.22 → 1.0.1-ins.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.
|
@@ -10,6 +10,7 @@ var _TableSortLabel = _interopRequireDefault(require("@material-ui/core/TableSor
|
|
|
10
10
|
var _Tooltip = _interopRequireDefault(require("@material-ui/core/Tooltip"));
|
|
11
11
|
var _Types = require("../util/Types");
|
|
12
12
|
require("./CustomHeaderCell.css");
|
|
13
|
+
var _help = _interopRequireDefault(require("./help.svg"));
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -62,10 +63,10 @@ const CustomHeaderCell = _ref => {
|
|
|
62
63
|
hideSortIcon: sortBy !== dataField,
|
|
63
64
|
direction: sortBy === dataField ? sortOrder : 'asc',
|
|
64
65
|
onClick: toggleSort
|
|
65
|
-
}, headerType === _Types.headerTypes.CUSTOM_ELEM && customColHeaderRender ? customColHeaderRender(column) : header)), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
}, headerType === _Types.headerTypes.CUSTOM_ELEM && customColHeaderRender ? customColHeaderRender(column) : header)), tooltipDefinition && /*#__PURE__*/_react.default.createElement("div", {
|
|
66
67
|
className: "tooltip-icon"
|
|
67
68
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
68
|
-
src:
|
|
69
|
+
src: _help.default,
|
|
69
70
|
alt: "tooltipIcon"
|
|
70
71
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
71
72
|
className: "tooltip-text"
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
.tooltip-text {
|
|
7
7
|
visibility: hidden;
|
|
8
|
-
width: 80px;
|
|
9
|
-
background-color: black;
|
|
10
|
-
color: #fff;
|
|
11
|
-
text-align: center;
|
|
12
|
-
border-radius: 6px;
|
|
13
|
-
padding: 5px 0;
|
|
14
8
|
position: absolute;
|
|
9
|
+
padding: 12px;
|
|
15
10
|
z-index: 1;
|
|
16
11
|
bottom: 125%;
|
|
17
|
-
left:
|
|
18
|
-
margin-left:
|
|
19
|
-
opacity: 0;
|
|
12
|
+
left: -150px;
|
|
13
|
+
margin-left: 8px;
|
|
20
14
|
transition: opacity 0.3s;
|
|
15
|
+
width: 300px;
|
|
16
|
+
gap: 0px;
|
|
17
|
+
border: 1px 0px 0px 0px;
|
|
18
|
+
opacity: 0px;
|
|
19
|
+
background: #FFFFFF;
|
|
20
|
+
border: 1px solid #9C0592;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.tooltip-text::after {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 -960 960 960" width="16px" fill="#6A6A6A"><path d="M480-240q20 0 34-14t14-34q0-20-14-34t-34-14q-20 0-34 14t-14 34q0 20 14 34t34 14Zm-36-153h73q0-37 6.5-52.5T555-485q35-34 48.5-58t13.5-53q0-55-37.5-89.5T484-720q-51 0-88.5 27T343-620l65 27q9-28 28.5-43.5T482-652q28 0 46 16t18 42q0 23-15.5 41T496-518q-35 32-43.5 52.5T444-393Zm36 297q-79 0-149-30t-122.5-82.5Q156-261 126-331T96-480q0-80 30-149.5t82.5-122Q261-804 331-834t149-30q80 0 149.5 30t122 82.5Q804-699 834-629.5T864-480q0 79-30 149t-82.5 122.5Q699-156 629.5-126T480-96Z"/></svg>
|
package/package.json
CHANGED
package/src/header/CustomCell.js
CHANGED
|
@@ -4,6 +4,7 @@ import TableSortLabel from '@material-ui/core/TableSortLabel';
|
|
|
4
4
|
import MuiTooltip from '@material-ui/core/Tooltip';
|
|
5
5
|
import { headerTypes } from '../util/Types';
|
|
6
6
|
import './CustomHeaderCell.css';
|
|
7
|
+
import helpIcon from './help.svg';
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
*
|
|
@@ -61,12 +62,17 @@ const CustomHeaderCell = ({
|
|
|
61
62
|
? customColHeaderRender(column) : header}
|
|
62
63
|
</TableSortLabel>
|
|
63
64
|
</Tooltip>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
65
|
+
{
|
|
66
|
+
tooltipDefinition
|
|
67
|
+
&& (
|
|
68
|
+
<div className="tooltip-icon">
|
|
69
|
+
<img src={helpIcon} alt="tooltipIcon" />
|
|
70
|
+
<div className="tooltip-text">
|
|
71
|
+
{tooltipDefinition}
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
)
|
|
75
|
+
}
|
|
70
76
|
</TableCell>
|
|
71
77
|
);
|
|
72
78
|
};
|
|
@@ -5,19 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
.tooltip-text {
|
|
7
7
|
visibility: hidden;
|
|
8
|
-
width: 80px;
|
|
9
|
-
background-color: black;
|
|
10
|
-
color: #fff;
|
|
11
|
-
text-align: center;
|
|
12
|
-
border-radius: 6px;
|
|
13
|
-
padding: 5px 0;
|
|
14
8
|
position: absolute;
|
|
9
|
+
padding: 12px;
|
|
15
10
|
z-index: 1;
|
|
16
11
|
bottom: 125%;
|
|
17
|
-
left:
|
|
18
|
-
margin-left:
|
|
19
|
-
opacity: 0;
|
|
12
|
+
left: -150px;
|
|
13
|
+
margin-left: 8px;
|
|
20
14
|
transition: opacity 0.3s;
|
|
15
|
+
width: 300px;
|
|
16
|
+
gap: 0px;
|
|
17
|
+
border: 1px 0px 0px 0px;
|
|
18
|
+
opacity: 0px;
|
|
19
|
+
background: #FFFFFF;
|
|
20
|
+
border: 1px solid #9C0592;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
.tooltip-text::after {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 -960 960 960" width="16px" fill="#6A6A6A"><path d="M480-240q20 0 34-14t14-34q0-20-14-34t-34-14q-20 0-34 14t-14 34q0 20 14 34t34 14Zm-36-153h73q0-37 6.5-52.5T555-485q35-34 48.5-58t13.5-53q0-55-37.5-89.5T484-720q-51 0-88.5 27T343-620l65 27q9-28 28.5-43.5T482-652q28 0 46 16t18 42q0 23-15.5 41T496-518q-35 32-43.5 52.5T444-393Zm36 297q-79 0-149-30t-122.5-82.5Q156-261 126-331T96-480q0-80 30-149.5t82.5-122Q261-804 331-834t149-30q80 0 149.5 30t122 82.5Q804-699 834-629.5T864-480q0 79-30 149t-82.5 122.5Q699-156 629.5-126T480-96Z"/></svg>
|