@bento-core/facet-filter 1.0.1-ccdihub.5 → 1.0.1-ccdihub.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.
@@ -9,6 +9,8 @@ var _styles = require("@material-ui/core/styles");
9
9
  var _core = require("@material-ui/core");
10
10
  var _clsx = _interopRequireDefault(require("clsx"));
11
11
  var _icons = require("@material-ui/icons");
12
+ var _emptycheckbox = _interopRequireDefault(require("./assets/emptycheckbox.svg"));
13
+ var _checkedbox = _interopRequireDefault(require("./assets/checkedbox.svg"));
12
14
  var _CheckboxStyle = _interopRequireDefault(require("./CheckboxStyle"));
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
16
  /* eslint-disable no-unused-vars */
@@ -71,19 +73,19 @@ const CheckBoxView = _ref => {
71
73
  })
72
74
  }, /*#__PURE__*/_react.default.createElement(_core.Checkbox, {
73
75
  id: "checkbox_".concat(facet.label, "_").concat(name),
74
- icon: /*#__PURE__*/_react.default.createElement(_icons.CheckBoxOutlineBlank, {
76
+ icon: /*#__PURE__*/_react.default.createElement(_core.Icon, {
75
77
  style: {
76
78
  fontSize: 18
77
79
  }
78
- }),
80
+ }, _emptycheckbox.default),
79
81
  onClick: handleToggle,
80
82
  checked: isChecked,
81
- checkedIcon: /*#__PURE__*/_react.default.createElement(_icons.CheckBox, {
83
+ checkedIcon: /*#__PURE__*/_react.default.createElement(_core.Icon, {
82
84
  style: {
83
85
  fontSize: 18
84
86
  },
85
87
  className: "".concat(checkedSection, "CheckedIcon")
86
- }),
88
+ }, _checkedbox.default),
87
89
  disableRipple: true,
88
90
  color: "secondary",
89
91
  classes: {
@@ -0,0 +1,4 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="14" height="14" fill="#6D5F5B"/>
3
+ <path d="M3 6.52174L4.95652 10L12 2" stroke="white" stroke-width="2"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="14" height="14" fill="#6D5F5B"/>
3
+ <rect width="14" height="14" fill="#6D5F5B"/>
4
+ <rect x="0.5" y="0.5" width="13" height="13" fill="white" stroke="#6D5F5B"/>
5
+ </svg>
@@ -97,6 +97,7 @@ const SliderView = _ref => {
97
97
  min: minLowerBound,
98
98
  max: maxUpperBound,
99
99
  classes: {
100
+ colorPrimary: classes.colorPrimary,
100
101
  rail: classes.rail,
101
102
  thumb: isValid() ? classes.thumb : classes.invalidThumb,
102
103
  track: isValid() ? classes.track : classes.invalidTrack
@@ -112,6 +113,9 @@ const SliderView = _ref => {
112
113
  }, sliderValue[0], ' - ', sliderValue[1], "\xA0", quantifier));
113
114
  };
114
115
  const styles = () => ({
116
+ colorPrimary: props => props.facet.style && props.facet.style.colorPrimary ? props.facet.style.colorPrimary : {
117
+ color: '#3f51b5'
118
+ },
115
119
  sliderRoot: props => props.facet.style && props.facet.style.sliderRoot ? props.facet.style.sliderRoot : {
116
120
  marginTop: '10px',
117
121
  marginLeft: '20px',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bento-core/facet-filter",
3
- "version": "1.0.1-ccdihub.5",
3
+ "version": "1.0.1-ccdihub.6",
4
4
  "description": "### Bento core sidebar design:",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -15,11 +15,14 @@ import {
15
15
  Tooltip,
16
16
  Box,
17
17
  Typography,
18
+ Icon,
18
19
  } from '@material-ui/core';
19
20
  import clsx from 'clsx';
20
21
  import {
21
22
  CheckBox as CheckBoxIcon, CheckBoxOutlineBlank as CheckBoxBlankIcon,
22
23
  } from '@material-ui/icons';
24
+ import emptyCheckBox from './assets/emptycheckbox.svg';
25
+ import checkedBox from './assets/checkedbox.svg';
23
26
  import styles from './CheckboxStyle';
24
27
 
25
28
  const alignment = 'flex-start';
@@ -78,16 +81,18 @@ const CheckBoxView = ({
78
81
  >
79
82
  <Checkbox
80
83
  id={`checkbox_${facet.label}_${name}`}
81
- icon={<CheckBoxBlankIcon style={{ fontSize: 18 }} />}
84
+ icon={<Icon style={{ fontSize: 18 }}>{emptyCheckBox}</Icon>}
82
85
  onClick={handleToggle}
83
86
  checked={isChecked}
84
87
  checkedIcon={(
85
- <CheckBoxIcon
88
+ <Icon
86
89
  style={{
87
90
  fontSize: 18,
88
91
  }}
89
92
  className={`${checkedSection}CheckedIcon`}
90
- />
93
+ >
94
+ {checkedBox}
95
+ </Icon>
91
96
  )}
92
97
  disableRipple
93
98
  color="secondary"
@@ -0,0 +1,4 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="14" height="14" fill="#6D5F5B"/>
3
+ <path d="M3 6.52174L4.95652 10L12 2" stroke="white" stroke-width="2"/>
4
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="14" height="14" fill="#6D5F5B"/>
3
+ <rect width="14" height="14" fill="#6D5F5B"/>
4
+ <rect x="0.5" y="0.5" width="13" height="13" fill="white" stroke="#6D5F5B"/>
5
+ </svg>
@@ -93,6 +93,7 @@ const SliderView = ({
93
93
  min={minLowerBound}
94
94
  max={maxUpperBound}
95
95
  classes={{
96
+ colorPrimary: classes.colorPrimary,
96
97
  rail: classes.rail,
97
98
  thumb: isValid() ? classes.thumb : classes.invalidThumb,
98
99
  track: isValid() ? classes.track : classes.invalidTrack,
@@ -128,6 +129,11 @@ const SliderView = ({
128
129
  };
129
130
 
130
131
  const styles = () => ({
132
+ colorPrimary: (props) => (props.facet.style && props.facet.style.colorPrimary
133
+ ? props.facet.style.colorPrimary
134
+ : {
135
+ color: '#3f51b5',
136
+ }),
131
137
  sliderRoot: (props) => (props.facet.style && props.facet.style.sliderRoot
132
138
  ? props.facet.style.sliderRoot
133
139
  : {