@hipay/hipay-material-ui 2.0.0-beta.68 → 2.0.0-beta.70

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +152 -0
  2. package/HiCell/CellIcon.js +33 -3
  3. package/HiCell/CellRate.js +1 -1
  4. package/HiCell/CellTextStyled.js +31 -0
  5. package/HiChip/HiChipSwitch.js +1 -1
  6. package/HiExpansionPanel/HiExpansionPanel.js +15 -4
  7. package/HiForm/HiInput.js +10 -4
  8. package/HiPin/HiPin.js +3 -3
  9. package/HiSelect/HiSelect.js +42 -22
  10. package/HiSelect/HiSelectInput.js +3 -2
  11. package/HiSelect/HiSuggestSelect.js +9 -2
  12. package/HiSelectableList/HiSelectableList.js +2 -2
  13. package/HiTable/HiCellBuilder.js +10 -5
  14. package/HiTable/HiTableHeader.js +19 -14
  15. package/HiTable/HiTableRow.js +7 -3
  16. package/es/HiCell/CellIcon.js +32 -3
  17. package/es/HiCell/CellRate.js +1 -1
  18. package/es/HiCell/CellTextStyled.js +30 -0
  19. package/es/HiChip/HiChipSwitch.js +1 -1
  20. package/es/HiExpansionPanel/HiExpansionPanel.js +15 -4
  21. package/es/HiForm/HiInput.js +10 -4
  22. package/es/HiPin/HiPin.js +3 -3
  23. package/es/HiSelect/HiSelect.js +26 -9
  24. package/es/HiSelect/HiSelectInput.js +3 -2
  25. package/es/HiSelect/HiSuggestSelect.js +10 -3
  26. package/es/HiSelectableList/HiSelectableList.js +2 -2
  27. package/es/HiTable/HiCellBuilder.js +10 -5
  28. package/es/HiTable/HiTableHeader.js +16 -12
  29. package/es/HiTable/HiTableRow.js +7 -3
  30. package/es/hi-svg-icons/HiActivity.js +36 -0
  31. package/es/hi-svg-icons/HiPermission.js +36 -0
  32. package/es/hi-svg-icons/index.js +3 -1
  33. package/hi-svg-icons/HiActivity.js +50 -0
  34. package/hi-svg-icons/HiPermission.js +50 -0
  35. package/hi-svg-icons/index.js +17 -1
  36. package/index.es.js +1 -1
  37. package/index.js +1 -1
  38. package/package.json +1 -1
  39. package/umd/hipay-material-ui.development.js +234 -69
  40. package/umd/hipay-material-ui.production.min.js +2 -2
@@ -150,6 +150,7 @@ function (_React$PureComponent) {
150
150
  color: datacell.color,
151
151
  icon: datacell.icon,
152
152
  label: datacell.label,
153
+ onClick: datacell.handleClick,
153
154
  view: cell.view ? cell.view : cst.DEFAULT_VIEWS[cell.type],
154
155
  size: cell.size
155
156
  });
@@ -194,6 +195,8 @@ function (_React$PureComponent) {
194
195
  active: datacell.active,
195
196
  color: datacell.color,
196
197
  label: datacell.label,
198
+ isButton: datacell.isButton,
199
+ onClick: datacell.handleClick,
197
200
  title: cell.title ? cell.title(datacell, cell) : datacell.title,
198
201
  value: datacell.value
199
202
  });
@@ -211,15 +214,12 @@ function (_React$PureComponent) {
211
214
  key: "render",
212
215
  value: function render() {
213
216
  var _this$props = this.props,
217
+ className = _this$props.className,
214
218
  column = _this$props.column,
215
219
  data = _this$props.data,
216
220
  locale = _this$props.locale;
217
221
  return _react.default.createElement(_TableCell.default, {
218
- style: {
219
- border: 'none',
220
- paddingRight: '13px',
221
- paddingLeft: '13px'
222
- }
222
+ className: className
223
223
  }, this.createCell(column, data, locale));
224
224
  }
225
225
  }]);
@@ -227,6 +227,11 @@ function (_React$PureComponent) {
227
227
  }(_react.default.PureComponent);
228
228
 
229
229
  HiCellBuilder.propTypes = process.env.NODE_ENV !== "production" ? {
230
+ /**
231
+ * Override TableCell style
232
+ */
233
+ className: _propTypes.default.object,
234
+
230
235
  /**
231
236
  * Propriétés de la colonne
232
237
  */
@@ -36,13 +36,21 @@ var _TableSortLabel = _interopRequireDefault(require("@material-ui/core/TableSor
36
36
  var cst = _interopRequireWildcard(require("./constants"));
37
37
 
38
38
  // @inheritedComponent TableHeader
39
- var styles = {
40
- icon: {
41
- color: '#00ADE9'
42
- },
43
- headerRoot: {
44
- cursor: 'inherit'
45
- }
39
+ var styles = function styles(theme) {
40
+ return {
41
+ head: {
42
+ cursor: 'inherit',
43
+ borderBottom: "solid 1px ".concat(theme.palette.divider)
44
+ },
45
+ cell: {
46
+ border: 'none',
47
+ paddingRight: '13px',
48
+ paddingLeft: '13px'
49
+ },
50
+ icon: {
51
+ color: '#00ADE9'
52
+ }
53
+ };
46
54
  };
47
55
 
48
56
  var HiTableHeader =
@@ -84,7 +92,9 @@ function (_React$PureComponent) {
84
92
  orderBy = _this$props.orderBy,
85
93
  sortable = _this$props.sortable,
86
94
  dense = _this$props.dense;
87
- return _react.default.createElement(_TableHead.default, null, _react.default.createElement(_TableRow.default, {
95
+ return _react.default.createElement(_TableHead.default, {
96
+ className: classes.head
97
+ }, _react.default.createElement(_TableRow.default, {
88
98
  style: {
89
99
  height: dense ? cst.CELL_HEADER_HEIGHT_DENSE : cst.CELL_HEADER_HEIGHT,
90
100
  whiteSpace: 'nowrap'
@@ -100,13 +110,8 @@ function (_React$PureComponent) {
100
110
  var finalLabel = view === 's' ? smallLabel : label;
101
111
  return _react.default.createElement(_TableCell.default, {
102
112
  key: colId,
113
+ className: classes.cell,
103
114
  sortDirection: orderBy === colId ? order : false,
104
- style: {
105
- border: 'none',
106
- borderBottom: orderBy === colId ? 'solid 1px #00ADE9' : 'none',
107
- paddingRight: '13px',
108
- paddingLeft: '13px'
109
- },
110
115
  numeric: cst.ALIGN_RIGHT_TYPES.includes(type),
111
116
  title: headerTooltip
112
117
  }, sortable ? _react.default.createElement(_TableSortLabel.default, {
@@ -46,15 +46,18 @@ var styles = function styles(theme) {
46
46
  '&:last-child': {
47
47
  borderBottom: 'solid 1px #E4E7E8'
48
48
  },
49
- '&:first-child': {
50
- borderTop: 'solid 1px #E4E7E8'
51
- },
52
49
  '&:hover, &:focus': {
53
50
  backgroundColor: "".concat(theme.palette.action.hover, " !important")
54
51
  }
55
52
  },
56
53
  clickableRow: {
57
54
  cursor: 'pointer'
55
+ },
56
+ cell: {
57
+ border: 'none',
58
+ padding: '0px 13px',
59
+ minHeight: '32px',
60
+ maxHeight: '40px'
58
61
  }
59
62
  };
60
63
  };
@@ -115,6 +118,7 @@ function (_React$PureComponent) {
115
118
  }, Object.keys(columns).map(function (column) {
116
119
  return _react.default.createElement(_HiCellBuilder.default, {
117
120
  key: columns[column].colId,
121
+ className: classes.cell,
118
122
  column: columns[column],
119
123
  data: rowdata,
120
124
  locale: locale
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import withStyles from '../styles/withStyles';
4
4
  import HiIcon from '../HiIcon';
5
+ import HiIconButton from '../HiIconButton';
5
6
  export const styles = {
6
7
  icon: {
7
8
  float: 'left'
@@ -29,13 +30,36 @@ class CellIcon extends React.PureComponent {
29
30
  color,
30
31
  icon,
31
32
  label,
32
- view,
33
- size
33
+ onClick,
34
+ size,
35
+ view
34
36
  } = this.props;
37
+
38
+ if (onClick) {
39
+ return React.createElement("div", {
40
+ className: classes.wrapper,
41
+ title: label
42
+ }, React.createElement(HiIconButton, {
43
+ color: 'inherit',
44
+ style: {
45
+ color,
46
+ fontSize: size || 24,
47
+ maxHeight: 31,
48
+ maxWidth: 31
49
+ },
50
+ onClick: onClick
51
+ }, React.createElement(HiIcon, {
52
+ className: classes.icon,
53
+ icon: icon
54
+ }), view !== 's' && label && React.createElement("span", {
55
+ className: classes.label
56
+ }, label)));
57
+ }
58
+
35
59
  return React.createElement("div", {
36
60
  className: classes.wrapper,
37
61
  title: label
38
- }, icon && React.createElement(HiIcon, {
62
+ }, React.createElement(HiIcon, {
39
63
  color: 'inherit',
40
64
  style: {
41
65
  color,
@@ -76,6 +100,11 @@ CellIcon.propTypes = process.env.NODE_ENV !== "production" ? {
76
100
  */
77
101
  label: PropTypes.string,
78
102
 
103
+ /**
104
+ * Fonction déclenchée lors du clic
105
+ */
106
+ onClick: PropTypes.func,
107
+
79
108
  /**
80
109
  * View (L/M/S)
81
110
  */
@@ -12,7 +12,7 @@ export const styles = theme => ({
12
12
  overflow: 'hidden',
13
13
  position: 'relative',
14
14
  textAlign: 'right',
15
- paddingTop: 10
15
+ maxHeight: '32px'
16
16
  },
17
17
  trendChipIcon: {
18
18
  width: 14,
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import HiColoredLabel from '../HiColoredLabel';
4
+ import HiButton from '../HiButton';
4
5
  const styleRoot = {
5
6
  width: '100%',
6
7
  height: 19,
@@ -21,12 +22,18 @@ const styleLabel = {
21
22
  whiteSpace: 'pre',
22
23
  width: '100%'
23
24
  };
25
+ const styleButton = {
26
+ padding: '1px 5px',
27
+ minHeight: '18px',
28
+ maxHeight: '18px'
29
+ };
24
30
  /**
25
31
  * CellText functional component
26
32
  * (don't includes complex ellipsis: middle, after-first-word...)
27
33
  *
28
34
  * @param label
29
35
  * @param color
36
+ * @param isButton
30
37
  * @param value
31
38
  * @param active
32
39
  * @param title
@@ -37,11 +44,24 @@ const styleLabel = {
37
44
  const CellTextStyled = ({
38
45
  label,
39
46
  color,
47
+ isButton,
48
+ onClick,
40
49
  value = '',
41
50
  active = false,
42
51
  title = ''
43
52
  }) => {
44
53
  const valueString = label ? label.toString() : value.toString();
54
+
55
+ if (isButton) {
56
+ return React.createElement(HiButton, {
57
+ color: color,
58
+ onClick: onClick,
59
+ size: "small",
60
+ style: styleButton,
61
+ variant: "raised"
62
+ }, valueString);
63
+ }
64
+
45
65
  return React.createElement("div", {
46
66
  style: styleRoot,
47
67
  title: title || valueString
@@ -66,11 +86,21 @@ CellTextStyled.propTypes = process.env.NODE_ENV !== "production" ? {
66
86
  */
67
87
  color: PropTypes.string,
68
88
 
89
+ /**
90
+ * Définit si la cellule de text
91
+ */
92
+ isButton: PropTypes.bool,
93
+
69
94
  /**
70
95
  * Label
71
96
  */
72
97
  label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
73
98
 
99
+ /**
100
+ * Fonction déclenchée lors du clic
101
+ */
102
+ onClick: PropTypes.func,
103
+
74
104
  /**
75
105
  * Tooltip
76
106
  */
@@ -202,7 +202,7 @@ class HiChipSwitch extends React.PureComponent {
202
202
  }
203
203
 
204
204
  HiChipSwitch.defaultProps = {
205
- active: true,
205
+ active: false,
206
206
  activeIcon: 'check',
207
207
  selection: null,
208
208
  selectionTitle: ''
@@ -7,7 +7,7 @@ import PropTypes from 'prop-types';
7
7
  import ExpansionPanel from '@material-ui/core/ExpansionPanel';
8
8
  import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary';
9
9
  import ExpansionPanelDetails from '@material-ui/core/ExpansionPanelDetails';
10
- import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
10
+ import HiIcon from './../HiIcon';
11
11
  import withStyles from '../styles/withStyles';
12
12
  import classNames from 'classnames';
13
13
  export const styles = theme => ({
@@ -33,20 +33,28 @@ export const styles = theme => ({
33
33
  pointerEvents: 'none'
34
34
  },
35
35
  heading: _objectSpread({}, theme.typography.b1, {
36
+ height: 48,
37
+ display: 'flex',
38
+ alignItems: 'center',
36
39
  fontSize: 20,
37
40
  lineHeight: '24px',
38
41
  fontWeight: theme.typography.fontWeightLight
39
42
  }),
40
43
  secondaryHeading: _objectSpread({}, theme.typography.b3, {
41
44
  color: theme.palette.neutral.light,
45
+ height: 48,
46
+ display: 'flex',
47
+ alignItems: 'center',
42
48
  fontSize: 11,
43
49
  lineHeight: '24px',
44
50
  float: 'right',
45
51
  marginRight: 32,
46
52
  '&>svg': {
47
53
  fontSize: 18,
48
- marginLeft: 3,
49
- marginBottom: -5
54
+ marginLeft: 3
55
+ },
56
+ "&>button": {
57
+ marginRight: -12
50
58
  }
51
59
  }),
52
60
  panel: {
@@ -67,7 +75,10 @@ export const styles = theme => ({
67
75
  }
68
76
  });
69
77
 
70
- var _ref = React.createElement(ExpandMoreIcon, null);
78
+ var _ref = React.createElement(HiIcon, {
79
+ icon: "mdi_menu_up",
80
+ size: 24
81
+ });
71
82
 
72
83
  class HiExpansionPanel extends React.PureComponent {
73
84
  render() {
@@ -19,7 +19,7 @@ export const styles = theme => ({
19
19
  },
20
20
  width: '100%',
21
21
  // Ajout d'1px pour ne pas avoir de décalage en mode error avec le border top
22
- '&:not($error)': {
22
+ '&:$error': {
23
23
  marginTop: 1
24
24
  }
25
25
  }),
@@ -292,7 +292,8 @@ class HiInput extends React.PureComponent {
292
292
  inputClassName,
293
293
  onReset,
294
294
  spellcheck,
295
- startAdornmentColor
295
+ startAdornmentColor,
296
+ inputProps
296
297
  } = this.props;
297
298
  const {
298
299
  focused
@@ -385,13 +386,13 @@ class HiInput extends React.PureComponent {
385
386
  this.endAdornmentNode = el;
386
387
  }
387
388
  }, eraseIcon, endAdornment),
388
- inputProps: {
389
+ inputProps: _objectSpread({
389
390
  spellCheck: spellcheck ? "true" : "false",
390
391
  className: classNames(inputClassName, classes.inputPropsClassName, {
391
392
  [classes.inputText]: !multiline,
392
393
  [classes.inputTextArea]: multiline
393
394
  })
394
- }
395
+ }, inputProps)
395
396
  }));
396
397
  }
397
398
 
@@ -465,6 +466,11 @@ HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
465
466
  */
466
467
  inputId: PropTypes.string,
467
468
 
469
+ /**
470
+ * Passe des props directement à l'input
471
+ */
472
+ inputProps: PropTypes.object,
473
+
468
474
  /**
469
475
  * Passe une ref callback au composant input
470
476
  */
package/es/HiPin/HiPin.js CHANGED
@@ -6,9 +6,9 @@ import { withStyles } from '../styles';
6
6
  export const styles = theme => ({
7
7
  root: {
8
8
  display: 'inline-block',
9
- padding: '1px 9px',
10
- height: 16,
11
- lineHeight: '16px',
9
+ padding: '0px 9px',
10
+ height: 17,
11
+ lineHeight: '17px',
12
12
  minWidth: 25,
13
13
  textAlign: 'center',
14
14
  borderRadius: '45px',
@@ -38,13 +38,14 @@ export const styles = theme => ({
38
38
  transition: 'none !important'
39
39
  },
40
40
  labelIcon: {
41
- marginRight: 10
41
+ marginRight: 10,
42
+ verticalAlign: 'text-bottom'
42
43
  },
43
44
  labelImg: {
44
45
  height: 18,
45
46
  width: 'auto',
46
47
  margin: '0 4px',
47
- verticalAlign: 'middle'
48
+ verticalAlign: 'text-bottom'
48
49
  },
49
50
  selectIconLabel: _objectSpread({
50
51
  whiteSpace: 'nowrap',
@@ -52,7 +53,7 @@ export const styles = theme => ({
52
53
  textOverflow: 'ellipsis',
53
54
  paddingRight: 16
54
55
  }, theme.typography.b1, {
55
- display: 'inline-flex',
56
+ display: 'inline-block',
56
57
  width: '100%'
57
58
  }),
58
59
  selectImgLabel: _objectSpread({
@@ -432,6 +433,12 @@ class HiSelect extends React.PureComponent {
432
433
  this.getInputElement = this.getInputElement.bind(this);
433
434
  }
434
435
 
436
+ componentDidMount() {
437
+ if (this.props.autoFocus) {
438
+ this.inputEl.focus();
439
+ }
440
+ }
441
+
435
442
  static getDerivedStateFromProps(nextProps, prevState) {
436
443
  if (nextProps.options !== prevState.suggestions) {
437
444
  return _objectSpread({}, prevState, {
@@ -451,10 +458,18 @@ class HiSelect extends React.PureComponent {
451
458
  */
452
459
 
453
460
 
454
- componentDidMount() {
455
- if (this.props.autoFocus) {
456
- this.inputEl.focus();
457
- }
461
+ getLengthItemList(itemList) {
462
+ let itemListLength = 0;
463
+ itemList.forEach(parent => {
464
+ if (parent.displayed && itemListLength < 10) {
465
+ itemListLength += 1;
466
+
467
+ if (parent.children && itemListLength < 10) {
468
+ itemListLength += this.getLengthItemList(parent.children);
469
+ }
470
+ }
471
+ });
472
+ return itemListLength;
458
473
  }
459
474
 
460
475
  render() {
@@ -544,8 +559,10 @@ class HiSelect extends React.PureComponent {
544
559
 
545
560
 
546
561
  if (this.placement && this.placement.indexOf('top') >= 0 && !!searchable) {
547
- // +1 for search input
548
- const nbItems = itemList.length <= 10 ? itemList.length + 1 : 11;
562
+ // In case we have a nested list
563
+ const itemListLength = this.getLengthItemList(itemList); // +1 for search input
564
+
565
+ const nbItems = itemListLength <= 10 ? itemListLength + 1 : 11;
549
566
  popperStyle.transform = `translate3d(-1px, -${nbItems * 40 + 2}px, 0px)`;
550
567
  } else if (this.placement && this.placement.indexOf('top') < 0 && !!searchable) {
551
568
  popperStyle.transform = 'translate3d(-1px, 40px, 0px)';
@@ -93,8 +93,9 @@ export const styles = theme => ({
93
93
  overflow: 'hidden',
94
94
  textOverflow: 'ellipsis'
95
95
  }, theme.typography.b1, {
96
- display: 'inline-flex',
97
- width: '100%'
96
+ display: 'inline-block',
97
+ width: '100%',
98
+ maxWidth: 500
98
99
  }),
99
100
  placeholder: {
100
101
  color: theme.palette.grey[400]
@@ -161,9 +161,10 @@ class HiSuggestSelect extends React.PureComponent {
161
161
  showNoResults,
162
162
  onSearch,
163
163
  translations,
164
- align
164
+ align,
165
+ inputClasses
165
166
  } = _this$props,
166
- otherProps = _objectWithoutProperties(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align"]);
167
+ otherProps = _objectWithoutProperties(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align", "inputClasses"]);
167
168
 
168
169
  const {
169
170
  focused,
@@ -205,7 +206,8 @@ class HiSuggestSelect extends React.PureComponent {
205
206
  onChange: onSearch,
206
207
  onKeyDown: this.handleKeyDownSearch,
207
208
  onBlur: this.handleBlur,
208
- onFocus: this.handleFocus
209
+ onFocus: this.handleFocus,
210
+ classes: inputClasses
209
211
  })), open && React.createElement(Popper, {
210
212
  disablePortal: true,
211
213
  anchorEl: this.textInput,
@@ -260,6 +262,11 @@ HiSuggestSelect.propTypes = process.env.NODE_ENV !== "production" ? {
260
262
  */
261
263
  id: PropTypes.string,
262
264
 
265
+ /**
266
+ * Object that contains the style for Input component
267
+ */
268
+ inputClasses: PropTypes.object,
269
+
263
270
  /**
264
271
  * Passe une ref callback au composant input
265
272
  */
@@ -107,9 +107,9 @@ class HiSelectableList extends React.PureComponent {
107
107
  overflow: true,
108
108
  placeholder: placeholderContent
109
109
  }, itemComponent);
110
- } else {
111
- return itemComponent;
112
110
  }
111
+
112
+ return itemComponent;
113
113
  };
114
114
 
115
115
  this.compareItem = (a, b) => {
@@ -100,6 +100,7 @@ class HiCellBuilder extends React.PureComponent {
100
100
  color: datacell.color,
101
101
  icon: datacell.icon,
102
102
  label: datacell.label,
103
+ onClick: datacell.handleClick,
103
104
  view: cell.view ? cell.view : cst.DEFAULT_VIEWS[cell.type],
104
105
  size: cell.size
105
106
  });
@@ -144,6 +145,8 @@ class HiCellBuilder extends React.PureComponent {
144
145
  active: datacell.active,
145
146
  color: datacell.color,
146
147
  label: datacell.label,
148
+ isButton: datacell.isButton,
149
+ onClick: datacell.handleClick,
147
150
  title: cell.title ? cell.title(datacell, cell) : datacell.title,
148
151
  value: datacell.value
149
152
  });
@@ -157,22 +160,24 @@ class HiCellBuilder extends React.PureComponent {
157
160
 
158
161
  render() {
159
162
  const {
163
+ className,
160
164
  column,
161
165
  data,
162
166
  locale
163
167
  } = this.props;
164
168
  return React.createElement(TableCell, {
165
- style: {
166
- border: 'none',
167
- paddingRight: '13px',
168
- paddingLeft: '13px'
169
- }
169
+ className: className
170
170
  }, this.createCell(column, data, locale));
171
171
  }
172
172
 
173
173
  }
174
174
 
175
175
  HiCellBuilder.propTypes = process.env.NODE_ENV !== "production" ? {
176
+ /**
177
+ * Override TableCell style
178
+ */
179
+ className: PropTypes.object,
180
+
176
181
  /**
177
182
  * Propriétés de la colonne
178
183
  */
@@ -7,14 +7,21 @@ import TableHead from '@material-ui/core/TableHead';
7
7
  import TableRow from '@material-ui/core/TableRow';
8
8
  import TableSortLabel from '@material-ui/core/TableSortLabel';
9
9
  import * as cst from './constants';
10
- const styles = {
10
+
11
+ const styles = theme => ({
12
+ head: {
13
+ cursor: 'inherit',
14
+ borderBottom: `solid 1px ${theme.palette.divider}`
15
+ },
16
+ cell: {
17
+ border: 'none',
18
+ paddingRight: '13px',
19
+ paddingLeft: '13px'
20
+ },
11
21
  icon: {
12
22
  color: '#00ADE9'
13
- },
14
- headerRoot: {
15
- cursor: 'inherit'
16
23
  }
17
- };
24
+ });
18
25
 
19
26
  class HiTableHeader extends React.PureComponent {
20
27
  constructor(...args) {
@@ -34,7 +41,9 @@ class HiTableHeader extends React.PureComponent {
34
41
  sortable,
35
42
  dense
36
43
  } = this.props;
37
- return React.createElement(TableHead, null, React.createElement(TableRow, {
44
+ return React.createElement(TableHead, {
45
+ className: classes.head
46
+ }, React.createElement(TableRow, {
38
47
  style: {
39
48
  height: dense ? cst.CELL_HEADER_HEIGHT_DENSE : cst.CELL_HEADER_HEIGHT,
40
49
  whiteSpace: 'nowrap'
@@ -51,13 +60,8 @@ class HiTableHeader extends React.PureComponent {
51
60
  const finalLabel = view === 's' ? smallLabel : label;
52
61
  return React.createElement(TableCell, {
53
62
  key: colId,
63
+ className: classes.cell,
54
64
  sortDirection: orderBy === colId ? order : false,
55
- style: {
56
- border: 'none',
57
- borderBottom: orderBy === colId ? 'solid 1px #00ADE9' : 'none',
58
- paddingRight: '13px',
59
- paddingLeft: '13px'
60
- },
61
65
  numeric: cst.ALIGN_RIGHT_TYPES.includes(type),
62
66
  title: headerTooltip
63
67
  }, sortable ? React.createElement(TableSortLabel, {
@@ -12,15 +12,18 @@ export const styles = theme => ({
12
12
  '&:last-child': {
13
13
  borderBottom: 'solid 1px #E4E7E8'
14
14
  },
15
- '&:first-child': {
16
- borderTop: 'solid 1px #E4E7E8'
17
- },
18
15
  '&:hover, &:focus': {
19
16
  backgroundColor: `${theme.palette.action.hover} !important`
20
17
  }
21
18
  },
22
19
  clickableRow: {
23
20
  cursor: 'pointer'
21
+ },
22
+ cell: {
23
+ border: 'none',
24
+ padding: '0px 13px',
25
+ minHeight: '32px',
26
+ maxHeight: '40px'
24
27
  }
25
28
  });
26
29
 
@@ -65,6 +68,7 @@ class HiTableRow extends React.PureComponent {
65
68
  }, Object.keys(columns).map(column => {
66
69
  return React.createElement(HiCellBuilder, {
67
70
  key: columns[column].colId,
71
+ className: classes.cell,
68
72
  column: columns[column],
69
73
  data: rowdata,
70
74
  locale: locale