@bento-core/facet-filter 1.0.1-icdc.1 → 1.0.1-icdc.11

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.
@@ -17,7 +17,8 @@ const BentoFacetFilter = _ref => {
17
17
  let {
18
18
  sideBarSections,
19
19
  CustomFacetSection,
20
- CustomFacetView
20
+ CustomFacetView,
21
+ clearIcon
21
22
  } = _ref;
22
23
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, sideBarSections.map((section, index) => /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_core.Divider, {
23
24
  variant: "middle",
@@ -27,7 +28,8 @@ const BentoFacetFilter = _ref => {
27
28
  CustomSection: CustomFacetSection
28
29
  }, section.items.map(facet => /*#__PURE__*/_react.default.createElement(_ReduxFacetView.default, {
29
30
  facet: facet,
30
- CustomView: CustomFacetView
31
+ CustomView: CustomFacetView,
32
+ clearIcon: clearIcon
31
33
  }))))));
32
34
  };
33
35
  var _default = (0, _core.withStyles)(_FacetFilterStyle.default)(BentoFacetFilter);
@@ -31,23 +31,21 @@ var _default = () => ({
31
31
  },
32
32
  sortGroup: {
33
33
  paddingTop: '10px',
34
- marginBottom: '5px',
35
34
  borderTop: '1px solid #B1B1B1',
36
- textAlign: 'left',
37
- marginLeft: '-5px'
35
+ padding: '10px',
36
+ display: 'flex',
37
+ alignItems: 'center',
38
+ justifyContent: 'space-between'
38
39
  },
39
40
  sortGroupIcon: {
40
41
  cursor: 'pointer',
41
42
  fontFamily: 'Nunito',
42
- fontSize: '10px',
43
- marginRight: '12px',
44
- marginLeft: '16px'
43
+ fontSize: '10px'
45
44
  },
46
45
  sortGroupItem: {
47
46
  cursor: 'pointer',
48
47
  fontFamily: 'Nunito',
49
- fontSize: '10px',
50
- marginRight: '32px'
48
+ fontSize: '10px'
51
49
  },
52
50
  NonSortGroup: {
53
51
  marginBottom: '5px',
@@ -64,9 +62,7 @@ var _default = () => ({
64
62
  cursor: 'pointer',
65
63
  fontFamily: 'Nunito',
66
64
  fontSize: '10px',
67
- float: 'right',
68
- marginRight: '10px',
69
- marginTop: '5px'
65
+ float: 'right'
70
66
  },
71
67
  highlight: {
72
68
  color: '#b2c6d6'
@@ -29,7 +29,8 @@ const FacetView = _ref => {
29
29
  onClearSliderSection,
30
30
  CustomView,
31
31
  autoComplete,
32
- upload
32
+ upload,
33
+ clearIcon
33
34
  } = _ref;
34
35
  const [expand, setExpand] = (0, _react.useState)(false);
35
36
  const onExpandFacet = () => setExpand(!expand);
@@ -96,7 +97,7 @@ const FacetView = _ref => {
96
97
  },
97
98
  onClick: onClearSection
98
99
  }, /*#__PURE__*/_react.default.createElement("img", {
99
- src: _clearIcon.default,
100
+ src: clearIcon || _clearIcon.default,
100
101
  height: 12,
101
102
  width: 12,
102
103
  alt: "clear-icon"
package/package.json CHANGED
@@ -1,17 +1,14 @@
1
1
  {
2
2
  "name": "@bento-core/facet-filter",
3
- "version": "1.0.1-icdc.1",
4
- "description": "### Bento core sidebar design:",
3
+ "version": "1.0.1-icdc.11",
4
+ "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "build": "npm run lint && cross-env-shell rm -rf dist && NODE_ENV=production BABEL_ENV=es babel src --out-dir dist --copy-files",
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
9
  "lint": "eslint src"
10
10
  },
11
- "repository": {
12
- "type": "git",
13
- "url": "git+https://github.com/CBIIT/bento-frontend.git"
14
- },
11
+ "repository": "https://github.com/CBIIT/bento-frontend",
15
12
  "publishConfig": {
16
13
  "access": "public"
17
14
  },
@@ -27,9 +24,5 @@
27
24
  "react-redux": "^7.2.1"
28
25
  },
29
26
  "author": "CTOS Bento Team",
30
- "license": "ISC",
31
- "bugs": {
32
- "url": "https://github.com/CBIIT/bento-frontend/issues"
33
- },
34
- "homepage": "https://github.com/CBIIT/bento-frontend#readme"
27
+ "license": "ISC"
35
28
  }
@@ -13,6 +13,7 @@ const BentoFacetFilter = ({
13
13
  sideBarSections,
14
14
  CustomFacetSection,
15
15
  CustomFacetView,
16
+ clearIcon,
16
17
  }) => {
17
18
  return (
18
19
  <>
@@ -31,6 +32,7 @@ const BentoFacetFilter = ({
31
32
  <FacetView
32
33
  facet={facet}
33
34
  CustomView={CustomFacetView}
35
+ clearIcon={clearIcon}
34
36
  />
35
37
  ))}
36
38
  </FacetSectionView>
@@ -25,23 +25,21 @@ export default () => ({
25
25
  },
26
26
  sortGroup: {
27
27
  paddingTop: '10px',
28
- marginBottom: '5px',
29
28
  borderTop: '1px solid #B1B1B1',
30
- textAlign: 'left',
31
- marginLeft: '-5px',
29
+ padding: '10px',
30
+ display: 'flex',
31
+ alignItems: 'center',
32
+ justifyContent: 'space-between',
32
33
  },
33
34
  sortGroupIcon: {
34
35
  cursor: 'pointer',
35
36
  fontFamily: 'Nunito',
36
37
  fontSize: '10px',
37
- marginRight: '12px',
38
- marginLeft: '16px',
39
38
  },
40
39
  sortGroupItem: {
41
40
  cursor: 'pointer',
42
41
  fontFamily: 'Nunito',
43
42
  fontSize: '10px',
44
- marginRight: '32px',
45
43
  },
46
44
  NonSortGroup: {
47
45
  marginBottom: '5px',
@@ -59,8 +57,6 @@ export default () => ({
59
57
  fontFamily: 'Nunito',
60
58
  fontSize: '10px',
61
59
  float: 'right',
62
- marginRight: '10px',
63
- marginTop: '5px',
64
60
  },
65
61
  highlight: {
66
62
  color: '#b2c6d6',
@@ -11,7 +11,7 @@ import { InputTypes } from '../inputs/Types';
11
11
  import styles from './FacetStyle';
12
12
  import FilterItems from '../inputs/FilterItems';
13
13
  import { sortType } from '../../utils/Sort';
14
- import clearIcon from './assets/clearIcon.svg';
14
+ import clearIconLocal from './assets/clearIcon.svg';
15
15
 
16
16
  const FacetView = ({
17
17
  classes,
@@ -21,6 +21,7 @@ const FacetView = ({
21
21
  CustomView,
22
22
  autoComplete,
23
23
  upload,
24
+ clearIcon,
24
25
  }) => {
25
26
  const [expand, setExpand] = useState(false);
26
27
  const onExpandFacet = () => setExpand(!expand);
@@ -113,7 +114,7 @@ const FacetView = ({
113
114
  onClick={onClearSection}
114
115
  >
115
116
  <img
116
- src={clearIcon}
117
+ src={clearIcon || clearIconLocal}
117
118
  height={12}
118
119
  width={12}
119
120
  alt="clear-icon"