@hipay/hipay-material-ui 2.0.0-beta.48 → 2.0.0-beta.50

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,7 +28,13 @@ var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
28
28
  // @inheritedComponent Button
29
29
  var styles = function styles(theme) {
30
30
  return {
31
- root: {},
31
+ root: {
32
+ '&$raisedDisabled': {
33
+ color: theme.palette.neutral.contrastText,
34
+ backgroundColor: theme.palette.neutral.main
35
+ }
36
+ },
37
+ raisedDisabled: {},
32
38
  flatNeutral: {
33
39
  color: theme.palette.neutral.main,
34
40
  '&$disabled': {
@@ -193,7 +199,7 @@ function HiButton(props) {
193
199
  var hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? 'inherit' : color;
194
200
  var fab = variant === 'fab' || variant === 'extendedFab';
195
201
  var contained = variant === 'contained' || variant === 'raised';
196
- var buttonClassNames = (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.flatPositive, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.flatNegative, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.flatMiddle, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.flatNeutral, (variant === 'text' || variant === 'flat' || variant === 'outlined') && (color === 'default' || color === 'neutral')), (0, _defineProperty2.default)(_classNames, classes.containedPositive, (contained || fab) && color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.containedNegative, (contained || fab) && color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.containedMiddle, (contained || fab) && color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.containedNeutral, (contained || fab) && (color === 'default' || color === 'neutral')), (0, _defineProperty2.default)(_classNames, classes.outlinedPositive, variant === 'outlined' && color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.outlinedNegative, variant === 'outlined' && color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.outlinedMiddle, variant === 'outlined' && color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.outlinedNeutral, variant === 'outlined' && (color === 'default' || color === 'neutral')), (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), _classNames));
202
+ var buttonClassNames = (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.raisedDisabled, variant === 'raised' && disabled), (0, _defineProperty2.default)(_classNames, classes.flatPositive, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.flatNegative, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.flatMiddle, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.flatNeutral, (variant === 'text' || variant === 'flat' || variant === 'outlined') && (color === 'default' || color === 'neutral')), (0, _defineProperty2.default)(_classNames, classes.containedPositive, (contained || fab) && color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.containedNegative, (contained || fab) && color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.containedMiddle, (contained || fab) && color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.containedNeutral, (contained || fab) && (color === 'default' || color === 'neutral')), (0, _defineProperty2.default)(_classNames, classes.outlinedPositive, variant === 'outlined' && color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.outlinedNegative, variant === 'outlined' && color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.outlinedMiddle, variant === 'outlined' && color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.outlinedNeutral, variant === 'outlined' && (color === 'default' || color === 'neutral')), (0, _defineProperty2.default)(_classNames, classes.disabled, disabled), _classNames));
197
203
  return _react.default.createElement(_Button.default, (0, _extends2.default)({
198
204
  className: className,
199
205
  classes: {
package/HiChip/HiChip.js CHANGED
@@ -17,6 +17,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
18
  var _classnames = _interopRequireDefault(require("classnames"));
19
19
 
20
+ var _keycode = _interopRequireDefault(require("keycode"));
21
+
20
22
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
21
23
 
22
24
  var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
@@ -107,6 +109,13 @@ var styles = function styles(theme) {
107
109
 
108
110
  exports.styles = styles;
109
111
 
112
+ var handleKeyDown = function handleKeyDown(e, fn) {
113
+ if ((0, _keycode.default)(e) === 'space' || (0, _keycode.default)(e) === 'enter') {
114
+ e.preventDefault();
115
+ fn();
116
+ }
117
+ };
118
+
110
119
  function HiChip(props) {
111
120
  var _classNames;
112
121
 
@@ -138,7 +147,11 @@ function HiChip(props) {
138
147
  icon: icon,
139
148
  size: iconSize,
140
149
  onClick: onIconClick,
141
- title: titleIcon
150
+ onKeyDown: function onKeyDown(event) {
151
+ return handleKeyDown(event, onIconClick);
152
+ },
153
+ title: titleIcon,
154
+ tabIndex: onIconClick ? 0 : -1
142
155
  }), prefix && _react.default.createElement("span", {
143
156
  className: classes.prefix
144
157
  }, prefix), img && _react.default.createElement("img", {
@@ -157,24 +170,36 @@ function HiChip(props) {
157
170
  className: (0, _classnames.default)(classes.navigate),
158
171
  icon: "arrow_left",
159
172
  onClick: onPrevious,
173
+ onKeyDown: function onKeyDown(event) {
174
+ return handleKeyDown(event, onPrevious);
175
+ },
160
176
  size: iconSize,
161
- title: titlePrevious
177
+ title: titlePrevious,
178
+ tabIndex: 0
162
179
  }), _react.default.createElement("span", {
163
180
  className: classes.label
164
181
  }, label), onNext && _react.default.createElement(_HiIcon.default, {
165
182
  className: (0, _classnames.default)(classes.navigate),
166
183
  icon: "arrow_right",
167
184
  onClick: onNext,
185
+ onKeyDown: function onKeyDown(event) {
186
+ return handleKeyDown(event, onNext);
187
+ },
168
188
  size: iconSize,
169
- title: titleNext
189
+ title: titleNext,
190
+ tabIndex: 0
170
191
  }), onDelete && _react.default.createElement(_HiIcon.default, {
171
192
  classes: {
172
193
  root: classes.eraseIcon
173
194
  },
174
195
  icon: "cancel",
175
196
  onClick: onDelete,
197
+ onKeyDown: function onKeyDown(event) {
198
+ return handleKeyDown(event, onDelete);
199
+ },
176
200
  size: iconSize,
177
- title: titleDelete
201
+ title: titleDelete,
202
+ tabIndex: 0
178
203
  }));
179
204
  }
180
205
 
@@ -35,7 +35,8 @@ var styles = function styles(theme) {
35
35
  borderRadius: 2,
36
36
  textOverflow: 'ellipsis',
37
37
  overflow: 'hidden',
38
- whiteSpace: 'nowrap'
38
+ whiteSpace: 'nowrap',
39
+ lineHeight: 1
39
40
  }),
40
41
  color: {
41
42
  fontWeight: 400
@@ -236,7 +236,7 @@ function (_React$PureComponent) {
236
236
  onKeyDown: this.handleKeyDownSearch,
237
237
  onBlur: this.handleBlur,
238
238
  onFocus: this.handleFocus
239
- })), _react.default.createElement(_Popper.default, {
239
+ })), open && _react.default.createElement(_Popper.default, {
240
240
  disablePortal: true,
241
241
  anchorEl: this.textInput,
242
242
  placement: "bottom-start",
@@ -31,6 +31,8 @@ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
31
31
 
32
32
  var _HiSelectableListItem = _interopRequireDefault(require("./HiSelectableListItem"));
33
33
 
34
+ var _helpers = require("../utils/helpers");
35
+
34
36
  var styles = function styles() {
35
37
  return {
36
38
  root: {
@@ -110,7 +112,17 @@ function (_React$PureComponent) {
110
112
  return 0;
111
113
  }
112
114
 
113
- return a.label.toString().toLowerCase() > b.label.toString().toLowerCase();
115
+ var sortAppendList = _this.props.sortAppendList;
116
+
117
+ if (sortAppendList.indexOf(a.id) < sortAppendList.indexOf(b.id)) {
118
+ return 1;
119
+ }
120
+
121
+ if (sortAppendList.indexOf(a.id) > sortAppendList.indexOf(b.id)) {
122
+ return -1;
123
+ }
124
+
125
+ return (0, _helpers.foldAccents)(a.label.toString().toLowerCase()) > (0, _helpers.foldAccents)(b.label.toString().toLowerCase()) ? 1 : -1;
114
126
  };
115
127
 
116
128
  return _this;
@@ -151,7 +163,8 @@ HiSelectableList.defaultProps = {
151
163
  disabledItemIdList: [],
152
164
  hideCheckbox: false,
153
165
  selectedItemIdList: [],
154
- sort: false
166
+ sort: false,
167
+ sortAppendList: ['_all']
155
168
  };
156
169
  HiSelectableList.propTypes = process.env.NODE_ENV !== "production" ? {
157
170
  /**
@@ -215,7 +228,12 @@ HiSelectableList.propTypes = process.env.NODE_ENV !== "production" ? {
215
228
  /**
216
229
  * Tri des éléments selon leur label
217
230
  */
218
- sort: _propTypes.default.bool
231
+ sort: _propTypes.default.bool,
232
+
233
+ /**
234
+ * Liste des éléments à placer en premier, peu import le tri
235
+ */
236
+ sortAppendList: _propTypes.default.array
219
237
  } : {};
220
238
 
221
239
  var _default = (0, _withStyles.default)(styles, {
@@ -25,6 +25,8 @@ var _react = _interopRequireDefault(require("react"));
25
25
 
26
26
  var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
 
28
+ var _keycode = _interopRequireDefault(require("keycode"));
29
+
28
30
  var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
29
31
 
30
32
  var _TableRow = _interopRequireDefault(require("@material-ui/core/TableRow"));
@@ -43,7 +45,7 @@ var styles = function styles(theme) {
43
45
  '&:first-child': {
44
46
  borderTop: 'solid 1px #E4E7E8'
45
47
  },
46
- '&:hover': {
48
+ '&:hover, &:focus': {
47
49
  backgroundColor: "".concat(theme.palette.action.hover, " !important")
48
50
  }
49
51
  }
@@ -91,11 +93,18 @@ function (_React$PureComponent) {
91
93
  onClick: function onClick(event) {
92
94
  return _this2.handleClick(event, rowdata);
93
95
  },
96
+ onKeyDown: function onKeyDown(event) {
97
+ if ((0, _keycode.default)(event) === 'space' || (0, _keycode.default)(event) === 'enter') {
98
+ event.preventDefault();
99
+
100
+ _this2.handleClick(event, rowdata);
101
+ }
102
+ },
94
103
  key: key,
95
104
  style: {
96
105
  height: dense ? cst.CELL_HEIGHT_DENSE : cst.CELL_HEIGHT
97
106
  },
98
- tabIndex: -1
107
+ tabIndex: 0
99
108
  }, Object.keys(columns).map(function (key) {
100
109
  return _react.default.createElement(_HiCellBuilder.default, {
101
110
  key: columns[key].colId,
@@ -8,7 +8,13 @@ import { withStyles } from '../styles';
8
8
  import { fade } from '../styles/colorManipulator';
9
9
  import Button from '@material-ui/core/Button';
10
10
  export const styles = theme => ({
11
- root: {},
11
+ root: {
12
+ '&$raisedDisabled': {
13
+ color: theme.palette.neutral.contrastText,
14
+ backgroundColor: theme.palette.neutral.main
15
+ }
16
+ },
17
+ raisedDisabled: {},
12
18
  flatNeutral: {
13
19
  color: theme.palette.neutral.main,
14
20
  '&$disabled': {
@@ -172,6 +178,7 @@ function HiButton(props) {
172
178
  const fab = variant === 'fab' || variant === 'extendedFab';
173
179
  const contained = variant === 'contained' || variant === 'raised';
174
180
  const buttonClassNames = classNames(classes.root, {
181
+ [classes.raisedDisabled]: variant === 'raised' && disabled,
175
182
  [classes.flatPositive]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'positive',
176
183
  [classes.flatNegative]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'negative',
177
184
  [classes.flatMiddle]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'middle',
@@ -2,6 +2,7 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
+ import keycode from 'keycode';
5
6
  import HiIcon from '../HiIcon';
6
7
  import withStyles from '../styles/withStyles';
7
8
  export const styles = theme => ({
@@ -86,6 +87,13 @@ export const styles = theme => ({
86
87
  }
87
88
  });
88
89
 
90
+ const handleKeyDown = (e, fn) => {
91
+ if (keycode(e) === 'space' || keycode(e) === 'enter') {
92
+ e.preventDefault();
93
+ fn();
94
+ }
95
+ };
96
+
89
97
  function HiChip(props) {
90
98
  const {
91
99
  label,
@@ -123,7 +131,9 @@ function HiChip(props) {
123
131
  icon: icon,
124
132
  size: iconSize,
125
133
  onClick: onIconClick,
126
- title: titleIcon
134
+ onKeyDown: event => handleKeyDown(event, onIconClick),
135
+ title: titleIcon,
136
+ tabIndex: onIconClick ? 0 : -1
127
137
  }), prefix && React.createElement("span", {
128
138
  className: classes.prefix
129
139
  }, prefix), img && React.createElement("img", {
@@ -142,24 +152,30 @@ function HiChip(props) {
142
152
  className: classNames(classes.navigate),
143
153
  icon: "arrow_left",
144
154
  onClick: onPrevious,
155
+ onKeyDown: event => handleKeyDown(event, onPrevious),
145
156
  size: iconSize,
146
- title: titlePrevious
157
+ title: titlePrevious,
158
+ tabIndex: 0
147
159
  }), React.createElement("span", {
148
160
  className: classes.label
149
161
  }, label), onNext && React.createElement(HiIcon, {
150
162
  className: classNames(classes.navigate),
151
163
  icon: "arrow_right",
152
164
  onClick: onNext,
165
+ onKeyDown: event => handleKeyDown(event, onNext),
153
166
  size: iconSize,
154
- title: titleNext
167
+ title: titleNext,
168
+ tabIndex: 0
155
169
  }), onDelete && React.createElement(HiIcon, {
156
170
  classes: {
157
171
  root: classes.eraseIcon
158
172
  },
159
173
  icon: "cancel",
160
174
  onClick: onDelete,
175
+ onKeyDown: event => handleKeyDown(event, onDelete),
161
176
  size: iconSize,
162
- title: titleDelete
177
+ title: titleDelete,
178
+ tabIndex: 0
163
179
  }));
164
180
  }
165
181
 
@@ -5,7 +5,7 @@ import React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import classNames from 'classnames';
7
7
  import withStyles from '../styles/withStyles';
8
- import { capitalize, escapeHTML } from '../utils/helpers';
8
+ import { capitalize } from '../utils/helpers';
9
9
  import { fade } from '../styles/colorManipulator';
10
10
  export const styles = theme => ({
11
11
  root: _objectSpread({}, theme.typography.b1, {
@@ -16,7 +16,8 @@ export const styles = theme => ({
16
16
  borderRadius: 2,
17
17
  textOverflow: 'ellipsis',
18
18
  overflow: 'hidden',
19
- whiteSpace: 'nowrap'
19
+ whiteSpace: 'nowrap',
20
+ lineHeight: 1
20
21
  }),
21
22
  color: {
22
23
  fontWeight: 400
@@ -184,7 +184,7 @@ class HiSuggestSelect extends React.PureComponent {
184
184
  onKeyDown: this.handleKeyDownSearch,
185
185
  onBlur: this.handleBlur,
186
186
  onFocus: this.handleFocus
187
- })), React.createElement(Popper, {
187
+ })), open && React.createElement(Popper, {
188
188
  disablePortal: true,
189
189
  anchorEl: this.textInput,
190
190
  placement: "bottom-start",
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
5
5
  import List from '@material-ui/core/List';
6
6
  import withStyles from '../styles/withStyles';
7
7
  import HiSelectableListItem from './HiSelectableListItem';
8
+ import { foldAccents } from '../utils/helpers';
8
9
  export const styles = () => ({
9
10
  root: {
10
11
  padding: 0
@@ -60,7 +61,17 @@ class HiSelectableList extends React.PureComponent {
60
61
  return 0;
61
62
  }
62
63
 
63
- return a.label.toString().toLowerCase() > b.label.toString().toLowerCase();
64
+ const sortAppendList = this.props.sortAppendList;
65
+
66
+ if (sortAppendList.indexOf(a.id) < sortAppendList.indexOf(b.id)) {
67
+ return 1;
68
+ }
69
+
70
+ if (sortAppendList.indexOf(a.id) > sortAppendList.indexOf(b.id)) {
71
+ return -1;
72
+ }
73
+
74
+ return foldAccents(a.label.toString().toLowerCase()) > foldAccents(b.label.toString().toLowerCase()) ? 1 : -1;
64
75
  };
65
76
  }
66
77
 
@@ -91,7 +102,8 @@ HiSelectableList.defaultProps = {
91
102
  disabledItemIdList: [],
92
103
  hideCheckbox: false,
93
104
  selectedItemIdList: [],
94
- sort: false
105
+ sort: false,
106
+ sortAppendList: ['_all']
95
107
  };
96
108
  HiSelectableList.propTypes = process.env.NODE_ENV !== "production" ? {
97
109
  /**
@@ -155,7 +167,12 @@ HiSelectableList.propTypes = process.env.NODE_ENV !== "production" ? {
155
167
  /**
156
168
  * Tri des éléments selon leur label
157
169
  */
158
- sort: PropTypes.bool
170
+ sort: PropTypes.bool,
171
+
172
+ /**
173
+ * Liste des éléments à placer en premier, peu import le tri
174
+ */
175
+ sortAppendList: PropTypes.array
159
176
  } : {};
160
177
  export default withStyles(styles, {
161
178
  hiComponent: true,
@@ -1,6 +1,7 @@
1
1
  // @inheritedComponent TableRow
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
+ import keycode from 'keycode';
4
5
  import withStyles from '../styles/withStyles';
5
6
  import TableRow from '@material-ui/core/TableRow';
6
7
  import HiCellBuilder from './HiCellBuilder';
@@ -13,7 +14,7 @@ export const styles = theme => ({
13
14
  '&:first-child': {
14
15
  borderTop: 'solid 1px #E4E7E8'
15
16
  },
16
- '&:hover': {
17
+ '&:hover, &:focus': {
17
18
  backgroundColor: `${theme.palette.action.hover} !important`
18
19
  }
19
20
  }
@@ -44,11 +45,17 @@ class HiTableRow extends React.PureComponent {
44
45
  className: classes.row,
45
46
  hover: true,
46
47
  onClick: event => this.handleClick(event, rowdata),
48
+ onKeyDown: event => {
49
+ if (keycode(event) === 'space' || keycode(event) === 'enter') {
50
+ event.preventDefault();
51
+ this.handleClick(event, rowdata);
52
+ }
53
+ },
47
54
  key: key,
48
55
  style: {
49
56
  height: dense ? cst.CELL_HEIGHT_DENSE : cst.CELL_HEIGHT
50
57
  },
51
- tabIndex: -1
58
+ tabIndex: 0
52
59
  }, Object.keys(columns).map(key => {
53
60
  return React.createElement(HiCellBuilder, {
54
61
  key: columns[key].colId,
package/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.48
1
+ /** @license HiPay-Material-UI v2.0.0-beta.50
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.48
1
+ /** @license HiPay-Material-UI v2.0.0-beta.50
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@hipay/hipay-material-ui",
3
3
  "private": false,
4
4
  "author": "HiPay PSYCHE Team",
5
- "version": "2.0.0-beta.48",
5
+ "version": "2.0.0-beta.50",
6
6
  "description": "React components that implement Google's Material Design.",
7
7
  "keywords": [
8
8
  "react",
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.48
1
+ /** @license HiPay-Material-UI v2.0.0-beta.50
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -13298,7 +13298,13 @@
13298
13298
 
13299
13299
  var styles = function styles(theme) {
13300
13300
  return {
13301
- root: {},
13301
+ root: {
13302
+ '&$raisedDisabled': {
13303
+ color: theme.palette.neutral.contrastText,
13304
+ backgroundColor: theme.palette.neutral.main
13305
+ }
13306
+ },
13307
+ raisedDisabled: {},
13302
13308
  flatNeutral: {
13303
13309
  color: theme.palette.neutral.main,
13304
13310
  '&$disabled': {
@@ -13462,7 +13468,7 @@
13462
13468
  var hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? 'inherit' : color;
13463
13469
  var fab = variant === 'fab' || variant === 'extendedFab';
13464
13470
  var contained = variant === 'contained' || variant === 'raised';
13465
- var buttonClassNames = classnames(classes.root, (_classNames = {}, defineProperty(_classNames, classes.flatPositive, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'positive'), defineProperty(_classNames, classes.flatNegative, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'negative'), defineProperty(_classNames, classes.flatMiddle, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'middle'), defineProperty(_classNames, classes.flatNeutral, (variant === 'text' || variant === 'flat' || variant === 'outlined') && (color === 'default' || color === 'neutral')), defineProperty(_classNames, classes.containedPositive, (contained || fab) && color === 'positive'), defineProperty(_classNames, classes.containedNegative, (contained || fab) && color === 'negative'), defineProperty(_classNames, classes.containedMiddle, (contained || fab) && color === 'middle'), defineProperty(_classNames, classes.containedNeutral, (contained || fab) && (color === 'default' || color === 'neutral')), defineProperty(_classNames, classes.outlinedPositive, variant === 'outlined' && color === 'positive'), defineProperty(_classNames, classes.outlinedNegative, variant === 'outlined' && color === 'negative'), defineProperty(_classNames, classes.outlinedMiddle, variant === 'outlined' && color === 'middle'), defineProperty(_classNames, classes.outlinedNeutral, variant === 'outlined' && (color === 'default' || color === 'neutral')), defineProperty(_classNames, classes.disabled, disabled), _classNames));
13471
+ var buttonClassNames = classnames(classes.root, (_classNames = {}, defineProperty(_classNames, classes.raisedDisabled, variant === 'raised' && disabled), defineProperty(_classNames, classes.flatPositive, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'positive'), defineProperty(_classNames, classes.flatNegative, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'negative'), defineProperty(_classNames, classes.flatMiddle, (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'middle'), defineProperty(_classNames, classes.flatNeutral, (variant === 'text' || variant === 'flat' || variant === 'outlined') && (color === 'default' || color === 'neutral')), defineProperty(_classNames, classes.containedPositive, (contained || fab) && color === 'positive'), defineProperty(_classNames, classes.containedNegative, (contained || fab) && color === 'negative'), defineProperty(_classNames, classes.containedMiddle, (contained || fab) && color === 'middle'), defineProperty(_classNames, classes.containedNeutral, (contained || fab) && (color === 'default' || color === 'neutral')), defineProperty(_classNames, classes.outlinedPositive, variant === 'outlined' && color === 'positive'), defineProperty(_classNames, classes.outlinedNegative, variant === 'outlined' && color === 'negative'), defineProperty(_classNames, classes.outlinedMiddle, variant === 'outlined' && color === 'middle'), defineProperty(_classNames, classes.outlinedNeutral, variant === 'outlined' && (color === 'default' || color === 'neutral')), defineProperty(_classNames, classes.disabled, disabled), _classNames));
13466
13472
  return React__default.createElement(Button$2, _extends_1({
13467
13473
  className: className,
13468
13474
  classes: {
@@ -15092,6 +15098,28 @@
15092
15098
 
15093
15099
  return node.previousSibling;
15094
15100
  }
15101
+ /**
15102
+ * Retourne la chaîne de caractères passée en entrée sans les accents
15103
+ * @param toFold
15104
+ * @returns {*}
15105
+ */
15106
+
15107
+ function foldAccents(toFold) {
15108
+ return toFold.replace(/([àáâãäå])|([ç])|([èéêë])|([ìíîï])|([ñ])|([òóôõöø])|([ß])|([ùúûü])|([ÿ])|([æ])|([œ])/g, function (str, a, c, e, i, n, o, s, u, y, ae, oe) {
15109
+ if (a) return 'a';
15110
+ if (c) return 'c';
15111
+ if (e) return 'e';
15112
+ if (i) return 'i';
15113
+ if (n) return 'n';
15114
+ if (o) return 'o';
15115
+ if (s) return 's';
15116
+ if (u) return 'u';
15117
+ if (y) return 'y';
15118
+ if (ae) return 'ae';
15119
+ if (oe) return 'oe';
15120
+ return str;
15121
+ });
15122
+ }
15095
15123
 
15096
15124
  /**
15097
15125
  * @ignore - internal component.
@@ -66295,6 +66323,13 @@
66295
66323
  };
66296
66324
  };
66297
66325
 
66326
+ var handleKeyDown = function handleKeyDown(e, fn) {
66327
+ if (keycode(e) === 'space' || keycode(e) === 'enter') {
66328
+ e.preventDefault();
66329
+ fn();
66330
+ }
66331
+ };
66332
+
66298
66333
  function HiChip(props) {
66299
66334
  var _classNames;
66300
66335
 
@@ -66326,7 +66361,11 @@
66326
66361
  icon: icon,
66327
66362
  size: iconSize,
66328
66363
  onClick: onIconClick,
66329
- title: titleIcon
66364
+ onKeyDown: function onKeyDown(event) {
66365
+ return handleKeyDown(event, onIconClick);
66366
+ },
66367
+ title: titleIcon,
66368
+ tabIndex: onIconClick ? 0 : -1
66330
66369
  }), prefix && React__default.createElement("span", {
66331
66370
  className: classes.prefix
66332
66371
  }, prefix), img && React__default.createElement("img", {
@@ -66345,24 +66384,36 @@
66345
66384
  className: classnames(classes.navigate),
66346
66385
  icon: "arrow_left",
66347
66386
  onClick: onPrevious,
66387
+ onKeyDown: function onKeyDown(event) {
66388
+ return handleKeyDown(event, onPrevious);
66389
+ },
66348
66390
  size: iconSize,
66349
- title: titlePrevious
66391
+ title: titlePrevious,
66392
+ tabIndex: 0
66350
66393
  }), React__default.createElement("span", {
66351
66394
  className: classes.label
66352
66395
  }, label), onNext && React__default.createElement(HiIcon$1, {
66353
66396
  className: classnames(classes.navigate),
66354
66397
  icon: "arrow_right",
66355
66398
  onClick: onNext,
66399
+ onKeyDown: function onKeyDown(event) {
66400
+ return handleKeyDown(event, onNext);
66401
+ },
66356
66402
  size: iconSize,
66357
- title: titleNext
66403
+ title: titleNext,
66404
+ tabIndex: 0
66358
66405
  }), onDelete && React__default.createElement(HiIcon$1, {
66359
66406
  classes: {
66360
66407
  root: classes.eraseIcon
66361
66408
  },
66362
66409
  icon: "cancel",
66363
66410
  onClick: onDelete,
66411
+ onKeyDown: function onKeyDown(event) {
66412
+ return handleKeyDown(event, onDelete);
66413
+ },
66364
66414
  size: iconSize,
66365
- title: titleDelete
66415
+ title: titleDelete,
66416
+ tabIndex: 0
66366
66417
  }));
66367
66418
  }
66368
66419
 
@@ -80365,7 +80416,7 @@
80365
80416
  '&:first-child': {
80366
80417
  borderTop: 'solid 1px #E4E7E8'
80367
80418
  },
80368
- '&:hover': {
80419
+ '&:hover, &:focus': {
80369
80420
  backgroundColor: "".concat(theme.palette.action.hover, " !important")
80370
80421
  }
80371
80422
  }
@@ -80412,11 +80463,18 @@
80412
80463
  onClick: function onClick(event) {
80413
80464
  return _this2.handleClick(event, rowdata);
80414
80465
  },
80466
+ onKeyDown: function onKeyDown(event) {
80467
+ if (keycode(event) === 'space' || keycode(event) === 'enter') {
80468
+ event.preventDefault();
80469
+
80470
+ _this2.handleClick(event, rowdata);
80471
+ }
80472
+ },
80415
80473
  key: key,
80416
80474
  style: {
80417
80475
  height: dense ? CELL_HEIGHT_DENSE : CELL_HEIGHT
80418
80476
  },
80419
- tabIndex: -1
80477
+ tabIndex: 0
80420
80478
  }, Object.keys(columns).map(function (key) {
80421
80479
  return React__default.createElement(HiCellBuilder, {
80422
80480
  key: columns[key].colId,
@@ -93914,7 +93972,8 @@
93914
93972
  borderRadius: 2,
93915
93973
  textOverflow: 'ellipsis',
93916
93974
  overflow: 'hidden',
93917
- whiteSpace: 'nowrap'
93975
+ whiteSpace: 'nowrap',
93976
+ lineHeight: 1
93918
93977
  }),
93919
93978
  color: {
93920
93979
  fontWeight: 400
@@ -98433,7 +98492,17 @@
98433
98492
  return 0;
98434
98493
  }
98435
98494
 
98436
- return a.label.toString().toLowerCase() > b.label.toString().toLowerCase();
98495
+ var sortAppendList = _this.props.sortAppendList;
98496
+
98497
+ if (sortAppendList.indexOf(a.id) < sortAppendList.indexOf(b.id)) {
98498
+ return 1;
98499
+ }
98500
+
98501
+ if (sortAppendList.indexOf(a.id) > sortAppendList.indexOf(b.id)) {
98502
+ return -1;
98503
+ }
98504
+
98505
+ return foldAccents(a.label.toString().toLowerCase()) > foldAccents(b.label.toString().toLowerCase()) ? 1 : -1;
98437
98506
  };
98438
98507
 
98439
98508
  return _this;
@@ -98475,7 +98544,8 @@
98475
98544
  disabledItemIdList: [],
98476
98545
  hideCheckbox: false,
98477
98546
  selectedItemIdList: [],
98478
- sort: false
98547
+ sort: false,
98548
+ sortAppendList: ['_all']
98479
98549
  };
98480
98550
  HiSelectableList.propTypes = {
98481
98551
  /**
@@ -98539,7 +98609,12 @@
98539
98609
  /**
98540
98610
  * Tri des éléments selon leur label
98541
98611
  */
98542
- sort: propTypes.bool
98612
+ sort: propTypes.bool,
98613
+
98614
+ /**
98615
+ * Liste des éléments à placer en premier, peu import le tri
98616
+ */
98617
+ sortAppendList: propTypes.array
98543
98618
  };
98544
98619
  var HiSelectableList$1 = withStyles(styles$q, {
98545
98620
  hiComponent: true,