@bento-core/table 1.0.1-ccdihub.118 → 1.0.1-ccdihub.119
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/dist/ExtendedView.js
CHANGED
|
@@ -21,6 +21,8 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typ
|
|
|
21
21
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
22
22
|
const downloadAreaStyle = {
|
|
23
23
|
display: 'flex',
|
|
24
|
+
justifyContent: 'space-between',
|
|
25
|
+
alignItems: 'center',
|
|
24
26
|
borderTop: '1px solid #8A7F7C',
|
|
25
27
|
paddingRight: '48px',
|
|
26
28
|
paddingTop: '5px',
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _core = require("@material-ui/core");
|
|
9
|
+
var _Search_Icon = _interopRequireDefault(require("./assets/Search_Icon.svg"));
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
const SearchBar = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
onSearch
|
|
16
|
+
} = _ref;
|
|
17
|
+
const [searchValue, setSearchValue] = (0, _react.useState)('');
|
|
18
|
+
const handleSearchClick = () => {
|
|
19
|
+
if (onSearch) {
|
|
20
|
+
onSearch(searchValue);
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const handleKeyPress = event => {
|
|
24
|
+
if (event.key === 'Enter') {
|
|
25
|
+
handleSearchClick();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const handleChange = event => {
|
|
29
|
+
setSearchValue(event.target.value);
|
|
30
|
+
};
|
|
31
|
+
const useStyles = (0, _core.makeStyles)({
|
|
32
|
+
searchContainer: {
|
|
33
|
+
display: 'flex',
|
|
34
|
+
alignItems: 'center',
|
|
35
|
+
border: '0.75px solid #606060',
|
|
36
|
+
borderRadius: '5px',
|
|
37
|
+
backgroundColor: '#ffffff',
|
|
38
|
+
height: '36px',
|
|
39
|
+
width: '300px',
|
|
40
|
+
paddingLeft: '12px',
|
|
41
|
+
paddingRight: '4px',
|
|
42
|
+
marginTop: '8px',
|
|
43
|
+
marginBottom: '8px',
|
|
44
|
+
marginLeft: '-28px',
|
|
45
|
+
float: 'left'
|
|
46
|
+
},
|
|
47
|
+
inputBase: {
|
|
48
|
+
flex: 1,
|
|
49
|
+
fontFamily: 'Poppins',
|
|
50
|
+
fontSize: '14px',
|
|
51
|
+
color: '#000000',
|
|
52
|
+
'& input::placeholder': {
|
|
53
|
+
color: '#9B9B9B',
|
|
54
|
+
opacity: 1
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
searchButton: {
|
|
58
|
+
padding: '6px',
|
|
59
|
+
backgroundColor: 'transparent',
|
|
60
|
+
'&:hover': {
|
|
61
|
+
backgroundColor: 'rgba(0, 0, 0, 0.04)'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
searchIcon: {
|
|
65
|
+
width: '15px',
|
|
66
|
+
height: '15px'
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
const classes = useStyles();
|
|
70
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
71
|
+
className: classes.searchContainer
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_core.InputBase, {
|
|
73
|
+
className: classes.inputBase,
|
|
74
|
+
placeholder: "Search...",
|
|
75
|
+
value: searchValue,
|
|
76
|
+
onChange: handleChange,
|
|
77
|
+
onKeyPress: handleKeyPress,
|
|
78
|
+
inputProps: {
|
|
79
|
+
'aria-label': 'search'
|
|
80
|
+
}
|
|
81
|
+
}), /*#__PURE__*/_react.default.createElement(_core.IconButton, {
|
|
82
|
+
className: classes.searchButton,
|
|
83
|
+
onClick: handleSearchClick,
|
|
84
|
+
"aria-label": "search"
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
86
|
+
src: _Search_Icon.default,
|
|
87
|
+
alt: "search",
|
|
88
|
+
className: classes.searchIcon
|
|
89
|
+
})));
|
|
90
|
+
};
|
|
91
|
+
var _default = SearchBar;
|
|
92
|
+
exports.default = _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.4134 1C3.43007 1 1 3.43007 1 6.4134C1 9.39672 3.43007 11.8268 6.4134 11.8268C7.71072 11.8268 8.90214 11.3661 9.83589 10.6014L13.0681 13.8336C13.118 13.8855 13.1777 13.927 13.2438 13.9556C13.3099 13.9841 13.3811 13.9992 13.4531 14C13.5251 14.0007 13.5966 13.9871 13.6632 13.9598C13.7299 13.9326 13.7905 13.8924 13.8414 13.8414C13.8924 13.7905 13.9326 13.7299 13.9598 13.6632C13.9871 13.5966 14.0007 13.5251 14 13.4531C13.9992 13.3811 13.9841 13.3099 13.9556 13.2438C13.927 13.1777 13.8855 13.118 13.8336 13.0681L10.6014 9.83589C11.3661 8.90214 11.8268 7.71072 11.8268 6.4134C11.8268 3.43007 9.39672 1 6.4134 1ZM6.4134 2.08268C8.8116 2.08268 10.7441 4.0152 10.7441 6.4134C10.7441 8.8116 8.8116 10.7441 6.4134 10.7441C4.0152 10.7441 2.08268 8.8116 2.08268 6.4134C2.08268 4.0152 4.0152 2.08268 6.4134 2.08268Z" fill="#4D889E" stroke="#4D889E"/>
|
|
3
|
+
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bento-core/table",
|
|
3
|
-
"version": "1.0.1-ccdihub.
|
|
3
|
+
"version": "1.0.1-ccdihub.119",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
|
package/src/ExtendedView.js
CHANGED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
IconButton,
|
|
4
|
+
InputBase,
|
|
5
|
+
makeStyles,
|
|
6
|
+
} from '@material-ui/core';
|
|
7
|
+
import SearchIcon from './assets/Search_Icon.svg';
|
|
8
|
+
|
|
9
|
+
const SearchBar = ({ onSearch }) => {
|
|
10
|
+
const [searchValue, setSearchValue] = useState('');
|
|
11
|
+
|
|
12
|
+
const handleSearchClick = () => {
|
|
13
|
+
if (onSearch) {
|
|
14
|
+
onSearch(searchValue);
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const handleKeyPress = (event) => {
|
|
19
|
+
if (event.key === 'Enter') {
|
|
20
|
+
handleSearchClick();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const handleChange = (event) => {
|
|
25
|
+
setSearchValue(event.target.value);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const useStyles = makeStyles({
|
|
29
|
+
searchContainer: {
|
|
30
|
+
display: 'flex',
|
|
31
|
+
alignItems: 'center',
|
|
32
|
+
border: '0.75px solid #606060',
|
|
33
|
+
borderRadius: '5px',
|
|
34
|
+
backgroundColor: '#ffffff',
|
|
35
|
+
height: '36px',
|
|
36
|
+
width: '300px',
|
|
37
|
+
paddingLeft: '12px',
|
|
38
|
+
paddingRight: '4px',
|
|
39
|
+
marginTop: '8px',
|
|
40
|
+
marginBottom: '8px',
|
|
41
|
+
marginLeft: '-28px',
|
|
42
|
+
float: 'left',
|
|
43
|
+
},
|
|
44
|
+
inputBase: {
|
|
45
|
+
flex: 1,
|
|
46
|
+
fontFamily: 'Poppins',
|
|
47
|
+
fontSize: '14px',
|
|
48
|
+
color: '#000000',
|
|
49
|
+
'& input::placeholder': {
|
|
50
|
+
color: '#9B9B9B',
|
|
51
|
+
opacity: 1,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
searchButton: {
|
|
55
|
+
padding: '6px',
|
|
56
|
+
backgroundColor: 'transparent',
|
|
57
|
+
'&:hover': {
|
|
58
|
+
backgroundColor: 'rgba(0, 0, 0, 0.04)',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
searchIcon: {
|
|
62
|
+
width: '15px',
|
|
63
|
+
height: '15px',
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
const classes = useStyles();
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<div className={classes.searchContainer}>
|
|
71
|
+
<InputBase
|
|
72
|
+
className={classes.inputBase}
|
|
73
|
+
placeholder="Search..."
|
|
74
|
+
value={searchValue}
|
|
75
|
+
onChange={handleChange}
|
|
76
|
+
onKeyPress={handleKeyPress}
|
|
77
|
+
inputProps={{ 'aria-label': 'search' }}
|
|
78
|
+
/>
|
|
79
|
+
<IconButton
|
|
80
|
+
className={classes.searchButton}
|
|
81
|
+
onClick={handleSearchClick}
|
|
82
|
+
aria-label="search"
|
|
83
|
+
>
|
|
84
|
+
<img src={SearchIcon} alt="search" className={classes.searchIcon} />
|
|
85
|
+
</IconButton>
|
|
86
|
+
</div>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
export default SearchBar;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M6.4134 1C3.43007 1 1 3.43007 1 6.4134C1 9.39672 3.43007 11.8268 6.4134 11.8268C7.71072 11.8268 8.90214 11.3661 9.83589 10.6014L13.0681 13.8336C13.118 13.8855 13.1777 13.927 13.2438 13.9556C13.3099 13.9841 13.3811 13.9992 13.4531 14C13.5251 14.0007 13.5966 13.9871 13.6632 13.9598C13.7299 13.9326 13.7905 13.8924 13.8414 13.8414C13.8924 13.7905 13.9326 13.7299 13.9598 13.6632C13.9871 13.5966 14.0007 13.5251 14 13.4531C13.9992 13.3811 13.9841 13.3099 13.9556 13.2438C13.927 13.1777 13.8855 13.118 13.8336 13.0681L10.6014 9.83589C11.3661 8.90214 11.8268 7.71072 11.8268 6.4134C11.8268 3.43007 9.39672 1 6.4134 1ZM6.4134 2.08268C8.8116 2.08268 10.7441 4.0152 10.7441 6.4134C10.7441 8.8116 8.8116 10.7441 6.4134 10.7441C4.0152 10.7441 2.08268 8.8116 2.08268 6.4134C2.08268 4.0152 4.0152 2.08268 6.4134 2.08268Z" fill="#4D889E" stroke="#4D889E"/>
|
|
3
|
+
</svg>
|