@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
package/CHANGELOG.md CHANGED
@@ -1,3 +1,155 @@
1
+ # [2.0.0-beta.64](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.64) (2019-04-15)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **eslint:** remove eslint warrnings in components (ignore test files) ([d236c62](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d236c62))
7
+ * **HiAlertModal:** Correct styles and buttons positions ([2cfa2a9](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2cfa2a9))
8
+ * **HiBreadcrumb:** clean eslint warnings ([6db12fb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6db12fb))
9
+ * **HiDatePicker:** add static positions for custom overlays ([c3edf24](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c3edf24))
10
+ * **HiDynamicSelect:** remove onSelect override ([b803044](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b803044))
11
+ * **HiExpansionPanel:** fix props propagation collapseDisable || expanded ([eb18a96](https://gitlab.hipay.org/backend/hipay-material-ui/commit/eb18a96))
12
+ * **HiExpansionPanel:** Fix props type a requirement ([cbc3b48](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cbc3b48))
13
+ * **HiInput:** forward event in onClick ([be94fe0](https://gitlab.hipay.org/backend/hipay-material-ui/commit/be94fe0))
14
+ * **HiInput:** handle focus state through prop when needed to override default comportment ([9a133cc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a133cc))
15
+ * **HiInput:** rename prop to spellCheck ([c11939f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c11939f))
16
+ * **HiKpiNotice:** eslint clean warnings ([11b5552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/11b5552))
17
+ * **HiSelect:** Fix build of HiSelectContent ([4b87f78](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4b87f78))
18
+ * **HiSelect:** focus on undefined item ([2d084e6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2d084e6))
19
+ * **HiSelect:** Forward event in onBlur ([76c6778](https://gitlab.hipay.org/backend/hipay-material-ui/commit/76c6778))
20
+ * **HiSelect:** handle staticPosition & width properly for HiDateRangeSelector usage ([7b19ffb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7b19ffb))
21
+ * **HiSelect:** remove HiSelectNew calls ([cc5397d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cc5397d))
22
+ * **HiSelectableList:** Add lazy props to activate lazyloading (default true) and fix unit tests ([b41f8d2](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b41f8d2))
23
+ * **HiSelectableListItem:** disabled item checkbox color ([9f10552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9f10552))
24
+ * **HiSelectableListItem:** remove item width ([a913945](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a913945))
25
+ * **HiSelectContent:** Remove compute of input value ([b86db83](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b86db83))
26
+ * **HiSlider:** eslint clean warnings ([08964b1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/08964b1))
27
+ * **HiTable:** Fix test ([9a009a8](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a009a8))
28
+ * **HiUploadField:** clean eslint warnings ([c76aaf1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c76aaf1))
29
+ * **migration:** fix contrast threshold ... ([6fb3b18](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6fb3b18))
30
+ * **package:** add cross-env ([7098fd6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7098fd6))
31
+
32
+
33
+ ### Code Refactoring
34
+
35
+ * deleting the old HiSelect and replacing it by the new (PSYCHE-1382) ([d5fc252](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d5fc252))
36
+
37
+
38
+ ### Features
39
+
40
+ * **CellImage:** Handle fallbackImage ([254799d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/254799d))
41
+ * **CellSentinel:** Uniformize cell api with front CellSentinel ([4e2975b](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4e2975b))
42
+ * **CellSentinel:** Update CellSentinel to the new way (split each result in different column) ([efe2711](https://gitlab.hipay.org/backend/hipay-material-ui/commit/efe2711))
43
+ * **CellSentinelScore:** Add CellSentinelScore ([2fff04d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2fff04d))
44
+ * **CellText:** Handle active prop in CellText & column views in HiTable ([4366e60](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4366e60))
45
+ * **HiCells:** Add simple cells types (Address, Date, Icon, Image, Numeric, PinToAction, Rate, Senti ([f688517](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f688517))
46
+ * **HiDatePicke:** add timezone props ([18360a5](https://gitlab.hipay.org/backend/hipay-material-ui/commit/18360a5))
47
+ * **HiDatePicker:** BREAKING CHANGE - add local prop to handle calendar translations ([b1b3743](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b1b3743))
48
+ * **HiIcon:** Add mdi-material-ui as available icons via 'mdi_' prefix ([1091d6d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/1091d6d))
49
+ * **HiInput:** Add inputProps to enable passing props directly to input element ([d57466c](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d57466c))
50
+ * **HiInput:** add spellcheck property ([b2feac3](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b2feac3))
51
+ * **HiMap:** unregister fetch on unmount ([0afa931](https://gitlab.hipay.org/backend/hipay-material-ui/commit/0afa931))
52
+ * **HiSelect:** Add (NEW) HiSelect, HiNestedSelect, HiDynamicSelect ([4c6447e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4c6447e))
53
+ * **HiSelect:** Reset search input on blur & on close ([d9af584](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d9af584))
54
+ * **HiSelectableList:** Add sort props to sort item list on label ([f412ddc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f412ddc))
55
+ * **HiSelectContent:** Add new HiSelectContent & HiNestedSelectContent ([215ad8f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/215ad8f))
56
+ * **HiSelectContent:** export utils functions ([7c41d87](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7c41d87))
57
+ * **HiUploadField:** rename component HiUploadField ([593f77e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/593f77e))
58
+ * **notice:** Création notice KPI ([bba3f89](https://gitlab.hipay.org/backend/hipay-material-ui/commit/bba3f89))
59
+
60
+
61
+ ### Performance Improvements
62
+
63
+ * **PureFunction:** Use pure & functional components ([220c686](https://gitlab.hipay.org/backend/hipay-material-ui/commit/220c686))
64
+
65
+
66
+ ### BREAKING CHANGES
67
+
68
+ * HiSelectNew no longer exist, make sure you're importing HiSelect instead
69
+ * **HiDatePicker:** Required "local" props (use polyglot, p.currentLocal)
70
+ * **HiUploadField:** Components names changes
71
+ * **HiCells:** Remove CellCountry, CellThirdParty, CellStatus & CellAccount (use generic type
72
+ CellImage & CellText)
73
+ * **HiSelect:** HiSelect API change, use HiNestedSelect or HiDynamicSelect relative to situation
74
+
75
+
76
+
77
+ # [2.0.0-beta.64](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.64) (2019-04-04)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * **eslint:** remove eslint warrnings in components (ignore test files) ([d236c62](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d236c62))
83
+ * **HiAlertModal:** Correct styles and buttons positions ([2cfa2a9](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2cfa2a9))
84
+ * **HiBreadcrumb:** clean eslint warnings ([6db12fb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6db12fb))
85
+ * **HiDatePicker:** add static positions for custom overlays ([c3edf24](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c3edf24))
86
+ * **HiDynamicSelect:** remove onSelect override ([b803044](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b803044))
87
+ * **HiExpansionPanel:** fix props propagation collapseDisable || expanded ([eb18a96](https://gitlab.hipay.org/backend/hipay-material-ui/commit/eb18a96))
88
+ * **HiExpansionPanel:** Fix props type a requirement ([cbc3b48](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cbc3b48))
89
+ * **HiInput:** forward event in onClick ([be94fe0](https://gitlab.hipay.org/backend/hipay-material-ui/commit/be94fe0))
90
+ * **HiInput:** handle focus state through prop when needed to override default comportment ([9a133cc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a133cc))
91
+ * **HiInput:** rename prop to spellCheck ([c11939f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c11939f))
92
+ * **HiKpiNotice:** eslint clean warnings ([11b5552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/11b5552))
93
+ * **HiSelect:** Fix build of HiSelectContent ([4b87f78](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4b87f78))
94
+ * **HiSelect:** focus on undefined item ([2d084e6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2d084e6))
95
+ * **HiSelect:** Forward event in onBlur ([76c6778](https://gitlab.hipay.org/backend/hipay-material-ui/commit/76c6778))
96
+ * **HiSelect:** handle staticPosition & width properly for HiDateRangeSelector usage ([7b19ffb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7b19ffb))
97
+ * **HiSelect:** remove HiSelectNew calls ([cc5397d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/cc5397d))
98
+ * **HiSelectableList:** Add lazy props to activate lazyloading (default true) and fix unit tests ([b41f8d2](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b41f8d2))
99
+ * **HiSelectableListItem:** disabled item checkbox color ([9f10552](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9f10552))
100
+ * **HiSelectableListItem:** remove item width ([a913945](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a913945))
101
+ * **HiSelectContent:** Remove compute of input value ([b86db83](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b86db83))
102
+ * **HiSlider:** eslint clean warnings ([08964b1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/08964b1))
103
+ * **HiTable:** Fix test ([9a009a8](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9a009a8))
104
+ * **HiUploadField:** clean eslint warnings ([c76aaf1](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c76aaf1))
105
+ * **migration:** fix contrast threshold ... ([6fb3b18](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6fb3b18))
106
+ * **package:** add cross-env ([7098fd6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7098fd6))
107
+
108
+
109
+ ### Code Refactoring
110
+
111
+ * deleting the old HiSelect and replacing it by the new (PSYCHE-1382) ([d5fc252](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d5fc252))
112
+
113
+
114
+ ### Features
115
+
116
+ * **CellImage:** Handle fallbackImage ([254799d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/254799d))
117
+ * **CellSentinel:** Uniformize cell api with front CellSentinel ([4e2975b](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4e2975b))
118
+ * **CellSentinel:** Update CellSentinel to the new way (split each result in different column) ([efe2711](https://gitlab.hipay.org/backend/hipay-material-ui/commit/efe2711))
119
+ * **CellSentinelScore:** Add CellSentinelScore ([2fff04d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/2fff04d))
120
+ * **CellText:** Handle active prop in CellText & column views in HiTable ([4366e60](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4366e60))
121
+ * **HiCells:** Add simple cells types (Address, Date, Icon, Image, Numeric, PinToAction, Rate, Senti ([f688517](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f688517))
122
+ * **HiDatePicke:** add timezone props ([18360a5](https://gitlab.hipay.org/backend/hipay-material-ui/commit/18360a5))
123
+ * **HiDatePicker:** BREAKING CHANGE - add local prop to handle calendar translations ([b1b3743](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b1b3743))
124
+ * **HiIcon:** Add mdi-material-ui as available icons via 'mdi_' prefix ([1091d6d](https://gitlab.hipay.org/backend/hipay-material-ui/commit/1091d6d))
125
+ * **HiInput:** Add inputProps to enable passing props directly to input element ([d57466c](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d57466c))
126
+ * **HiInput:** add spellcheck property ([b2feac3](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b2feac3))
127
+ * **HiMap:** unregister fetch on unmount ([0afa931](https://gitlab.hipay.org/backend/hipay-material-ui/commit/0afa931))
128
+ * **HiSelect:** Add (NEW) HiSelect, HiNestedSelect, HiDynamicSelect ([4c6447e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4c6447e))
129
+ * **HiSelect:** Reset search input on blur & on close ([d9af584](https://gitlab.hipay.org/backend/hipay-material-ui/commit/d9af584))
130
+ * **HiSelectableList:** Add sort props to sort item list on label ([f412ddc](https://gitlab.hipay.org/backend/hipay-material-ui/commit/f412ddc))
131
+ * **HiSelectContent:** Add new HiSelectContent & HiNestedSelectContent ([215ad8f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/215ad8f))
132
+ * **HiSelectContent:** export utils functions ([7c41d87](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7c41d87))
133
+ * **HiUploadField:** rename component HiUploadField ([593f77e](https://gitlab.hipay.org/backend/hipay-material-ui/commit/593f77e))
134
+ * **notice:** Création notice KPI ([bba3f89](https://gitlab.hipay.org/backend/hipay-material-ui/commit/bba3f89))
135
+
136
+
137
+ ### Performance Improvements
138
+
139
+ * **PureFunction:** Use pure & functional components ([220c686](https://gitlab.hipay.org/backend/hipay-material-ui/commit/220c686))
140
+
141
+
142
+ ### BREAKING CHANGES
143
+
144
+ * HiSelectNew no longer exist, make sure you're importing HiSelect instead
145
+ * **HiDatePicker:** Required "local" props (use polyglot, p.currentLocal)
146
+ * **HiUploadField:** Components names changes
147
+ * **HiCells:** Remove CellCountry, CellThirdParty, CellStatus & CellAccount (use generic type
148
+ CellImage & CellText)
149
+ * **HiSelect:** HiSelect API change, use HiNestedSelect or HiDynamicSelect relative to situation
150
+
151
+
152
+
1
153
  # [2.0.0-beta.64](https://gitlab.hipay.org/backend/hipay-material-ui/compare/0.0.1...2.0.0-beta.64) (2019-03-27)
2
154
 
3
155
 
@@ -25,6 +25,8 @@ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
25
25
 
26
26
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
27
27
 
28
+ var _HiIconButton = _interopRequireDefault(require("../HiIconButton"));
29
+
28
30
  var styles = {
29
31
  icon: {
30
32
  float: 'left'
@@ -65,12 +67,35 @@ function (_React$PureComponent) {
65
67
  color = _this$props.color,
66
68
  icon = _this$props.icon,
67
69
  label = _this$props.label,
68
- view = _this$props.view,
69
- size = _this$props.size;
70
+ onClick = _this$props.onClick,
71
+ size = _this$props.size,
72
+ view = _this$props.view;
73
+
74
+ if (onClick) {
75
+ return _react.default.createElement("div", {
76
+ className: classes.wrapper,
77
+ title: label
78
+ }, _react.default.createElement(_HiIconButton.default, {
79
+ color: 'inherit',
80
+ style: {
81
+ color: color,
82
+ fontSize: size || 24,
83
+ maxHeight: 31,
84
+ maxWidth: 31
85
+ },
86
+ onClick: onClick
87
+ }, _react.default.createElement(_HiIcon.default, {
88
+ className: classes.icon,
89
+ icon: icon
90
+ }), view !== 's' && label && _react.default.createElement("span", {
91
+ className: classes.label
92
+ }, label)));
93
+ }
94
+
70
95
  return _react.default.createElement("div", {
71
96
  className: classes.wrapper,
72
97
  title: label
73
- }, icon && _react.default.createElement(_HiIcon.default, {
98
+ }, _react.default.createElement(_HiIcon.default, {
74
99
  color: 'inherit',
75
100
  style: {
76
101
  color: color,
@@ -112,6 +137,11 @@ CellIcon.propTypes = process.env.NODE_ENV !== "production" ? {
112
137
  */
113
138
  label: _propTypes.default.string,
114
139
 
140
+ /**
141
+ * Fonction déclenchée lors du clic
142
+ */
143
+ onClick: _propTypes.default.func,
144
+
115
145
  /**
116
146
  * View (L/M/S)
117
147
  */
@@ -40,7 +40,7 @@ var styles = function styles(theme) {
40
40
  overflow: 'hidden',
41
41
  position: 'relative',
42
42
  textAlign: 'right',
43
- paddingTop: 10
43
+ maxHeight: '32px'
44
44
  },
45
45
  trendChipIcon: {
46
46
  width: 14,
@@ -13,6 +13,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
 
14
14
  var _HiColoredLabel = _interopRequireDefault(require("../HiColoredLabel"));
15
15
 
16
+ var _HiButton = _interopRequireDefault(require("../HiButton"));
17
+
16
18
  var styleRoot = {
17
19
  width: '100%',
18
20
  height: 19,
@@ -33,12 +35,18 @@ var styleLabel = {
33
35
  whiteSpace: 'pre',
34
36
  width: '100%'
35
37
  };
38
+ var styleButton = {
39
+ padding: '1px 5px',
40
+ minHeight: '18px',
41
+ maxHeight: '18px'
42
+ };
36
43
  /**
37
44
  * CellText functional component
38
45
  * (don't includes complex ellipsis: middle, after-first-word...)
39
46
  *
40
47
  * @param label
41
48
  * @param color
49
+ * @param isButton
42
50
  * @param value
43
51
  * @param active
44
52
  * @param title
@@ -49,6 +57,8 @@ var styleLabel = {
49
57
  var CellTextStyled = function CellTextStyled(_ref) {
50
58
  var label = _ref.label,
51
59
  color = _ref.color,
60
+ isButton = _ref.isButton,
61
+ onClick = _ref.onClick,
52
62
  _ref$value = _ref.value,
53
63
  value = _ref$value === void 0 ? '' : _ref$value,
54
64
  _ref$active = _ref.active,
@@ -56,6 +66,17 @@ var CellTextStyled = function CellTextStyled(_ref) {
56
66
  _ref$title = _ref.title,
57
67
  title = _ref$title === void 0 ? '' : _ref$title;
58
68
  var valueString = label ? label.toString() : value.toString();
69
+
70
+ if (isButton) {
71
+ return _react.default.createElement(_HiButton.default, {
72
+ color: color,
73
+ onClick: onClick,
74
+ size: "small",
75
+ style: styleButton,
76
+ variant: "raised"
77
+ }, valueString);
78
+ }
79
+
59
80
  return _react.default.createElement("div", {
60
81
  style: styleRoot,
61
82
  title: title || valueString
@@ -80,11 +101,21 @@ CellTextStyled.propTypes = process.env.NODE_ENV !== "production" ? {
80
101
  */
81
102
  color: _propTypes.default.string,
82
103
 
104
+ /**
105
+ * Définit si la cellule de text
106
+ */
107
+ isButton: _propTypes.default.bool,
108
+
83
109
  /**
84
110
  * Label
85
111
  */
86
112
  label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]),
87
113
 
114
+ /**
115
+ * Fonction déclenchée lors du clic
116
+ */
117
+ onClick: _propTypes.default.func,
118
+
88
119
  /**
89
120
  * Tooltip
90
121
  */
@@ -238,7 +238,7 @@ function (_React$PureComponent) {
238
238
  }(_react.default.PureComponent);
239
239
 
240
240
  HiChipSwitch.defaultProps = {
241
- active: true,
241
+ active: false,
242
242
  activeIcon: 'check',
243
243
  selection: null,
244
244
  selectionTitle: ''
@@ -33,7 +33,7 @@ var _ExpansionPanelSummary = _interopRequireDefault(require("@material-ui/core/E
33
33
 
34
34
  var _ExpansionPanelDetails = _interopRequireDefault(require("@material-ui/core/ExpansionPanelDetails"));
35
35
 
36
- var _ExpandMore = _interopRequireDefault(require("@material-ui/icons/ExpandMore"));
36
+ var _HiIcon = _interopRequireDefault(require("./../HiIcon"));
37
37
 
38
38
  var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
39
39
 
@@ -64,20 +64,28 @@ var styles = function styles(theme) {
64
64
  pointerEvents: 'none'
65
65
  },
66
66
  heading: (0, _extends2.default)({}, theme.typography.b1, {
67
+ height: 48,
68
+ display: 'flex',
69
+ alignItems: 'center',
67
70
  fontSize: 20,
68
71
  lineHeight: '24px',
69
72
  fontWeight: theme.typography.fontWeightLight
70
73
  }),
71
74
  secondaryHeading: (0, _extends2.default)({}, theme.typography.b3, {
72
75
  color: theme.palette.neutral.light,
76
+ height: 48,
77
+ display: 'flex',
78
+ alignItems: 'center',
73
79
  fontSize: 11,
74
80
  lineHeight: '24px',
75
81
  float: 'right',
76
82
  marginRight: 32,
77
83
  '&>svg': {
78
84
  fontSize: 18,
79
- marginLeft: 3,
80
- marginBottom: -5
85
+ marginLeft: 3
86
+ },
87
+ "&>button": {
88
+ marginRight: -12
81
89
  }
82
90
  }),
83
91
  panel: {
@@ -101,7 +109,10 @@ var styles = function styles(theme) {
101
109
 
102
110
  exports.styles = styles;
103
111
 
104
- var _ref = _react.default.createElement(_ExpandMore.default, null);
112
+ var _ref = _react.default.createElement(_HiIcon.default, {
113
+ icon: "mdi_menu_up",
114
+ size: 24
115
+ });
105
116
 
106
117
  var HiExpansionPanel =
107
118
  /*#__PURE__*/
package/HiForm/HiInput.js CHANGED
@@ -52,7 +52,7 @@ var styles = function styles(theme) {
52
52
  },
53
53
  width: '100%',
54
54
  // Ajout d'1px pour ne pas avoir de décalage en mode error avec le border top
55
- '&:not($error)': {
55
+ '&:$error': {
56
56
  marginTop: 1
57
57
  }
58
58
  }),
@@ -341,7 +341,8 @@ function (_React$PureComponent) {
341
341
  inputClassName = _this$props.inputClassName,
342
342
  onReset = _this$props.onReset,
343
343
  spellcheck = _this$props.spellcheck,
344
- startAdornmentColor = _this$props.startAdornmentColor;
344
+ startAdornmentColor = _this$props.startAdornmentColor,
345
+ inputProps = _this$props.inputProps;
345
346
  var focused = this.state.focused;
346
347
  var overlayProps = (0, _extends2.default)({
347
348
  className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.disabled, disabled && !error), (0, _defineProperty2.default)(_classNames, classes.inkbar, !disabled), (0, _defineProperty2.default)(_classNames, classes.focused, focused), (0, _defineProperty2.default)(_classNames, classes.error, error), _classNames), className)
@@ -420,10 +421,10 @@ function (_React$PureComponent) {
420
421
  _this2.endAdornmentNode = el;
421
422
  }
422
423
  }, eraseIcon, endAdornment),
423
- inputProps: {
424
+ inputProps: (0, _extends2.default)({
424
425
  spellCheck: spellcheck ? "true" : "false",
425
426
  className: (0, _classnames.default)(inputClassName, classes.inputPropsClassName, (_classNames4 = {}, (0, _defineProperty2.default)(_classNames4, classes.inputText, !multiline), (0, _defineProperty2.default)(_classNames4, classes.inputTextArea, multiline), _classNames4))
426
- }
427
+ }, inputProps)
427
428
  }));
428
429
  }
429
430
  }], [{
@@ -509,6 +510,11 @@ HiInput.propTypes = process.env.NODE_ENV !== "production" ? {
509
510
  */
510
511
  inputId: _propTypes.default.string,
511
512
 
513
+ /**
514
+ * Passe des props directement à l'input
515
+ */
516
+ inputProps: _propTypes.default.object,
517
+
512
518
  /**
513
519
  * Passe une ref callback au composant input
514
520
  */
package/HiPin/HiPin.js CHANGED
@@ -23,9 +23,9 @@ var styles = function styles(theme) {
23
23
  return {
24
24
  root: {
25
25
  display: 'inline-block',
26
- padding: '1px 9px',
27
- height: 16,
28
- lineHeight: '16px',
26
+ padding: '0px 9px',
27
+ height: 17,
28
+ lineHeight: '17px',
29
29
  minWidth: 25,
30
30
  textAlign: 'center',
31
31
  borderRadius: '45px',
@@ -79,13 +79,14 @@ var styles = function styles(theme) {
79
79
  transition: 'none !important'
80
80
  },
81
81
  labelIcon: {
82
- marginRight: 10
82
+ marginRight: 10,
83
+ verticalAlign: 'text-bottom'
83
84
  },
84
85
  labelImg: {
85
86
  height: 18,
86
87
  width: 'auto',
87
88
  margin: '0 4px',
88
- verticalAlign: 'middle'
89
+ verticalAlign: 'text-bottom'
89
90
  },
90
91
  selectIconLabel: (0, _extends2.default)({
91
92
  whiteSpace: 'nowrap',
@@ -93,7 +94,7 @@ var styles = function styles(theme) {
93
94
  textOverflow: 'ellipsis',
94
95
  paddingRight: 16
95
96
  }, theme.typography.b1, {
96
- display: 'inline-flex',
97
+ display: 'inline-block',
97
98
  width: '100%'
98
99
  }),
99
100
  selectImgLabel: (0, _extends2.default)({
@@ -510,11 +511,28 @@ function (_React$PureComponent) {
510
511
  this.inputEl.focus();
511
512
  }
512
513
  }
514
+ }, {
515
+ key: "getLengthItemList",
516
+ value: function getLengthItemList(itemList) {
517
+ var _this2 = this;
518
+
519
+ var itemListLength = 0;
520
+ itemList.forEach(function (parent) {
521
+ if (parent.displayed && itemListLength < 10) {
522
+ itemListLength += 1;
523
+
524
+ if (parent.children && itemListLength < 10) {
525
+ itemListLength += _this2.getLengthItemList(parent.children);
526
+ }
527
+ }
528
+ });
529
+ return itemListLength;
530
+ }
513
531
  }, {
514
532
  key: "render",
515
533
  value: function render() {
516
534
  var _classNames,
517
- _this2 = this;
535
+ _this3 = this;
518
536
 
519
537
  var _this$props4 = this.props,
520
538
  classes = _this$props4.classes,
@@ -581,10 +599,10 @@ function (_React$PureComponent) {
581
599
  return _react.default.createElement(_HiInput.default, (0, _extends2.default)({
582
600
  value: searchValue,
583
601
  autoFocus: true,
584
- inputRef: _this2.getInputElement,
585
- onKeyDown: _this2.handleKeyDownSearch,
586
- onChange: _this2.handleSearch,
587
- onReset: _this2.handleSearchReset,
602
+ inputRef: _this3.getInputElement,
603
+ onKeyDown: _this3.handleKeyDownSearch,
604
+ onChange: _this3.handleSearch,
605
+ onReset: _this3.handleSearchReset,
588
606
  placeholder: translations.search,
589
607
  startAdornment: 'search',
590
608
  tabIndex: 0,
@@ -597,8 +615,10 @@ function (_React$PureComponent) {
597
615
 
598
616
 
599
617
  if (this.placement && this.placement.indexOf('top') >= 0 && !!searchable) {
600
- // +1 for search input
601
- var nbItems = itemList.length <= 10 ? itemList.length + 1 : 11;
618
+ // In case we have a nested list
619
+ var itemListLength = this.getLengthItemList(itemList); // +1 for search input
620
+
621
+ var nbItems = itemListLength <= 10 ? itemListLength + 1 : 11;
602
622
  popperStyle.transform = "translate3d(-1px, -".concat(nbItems * 40 + 2, "px, 0px)");
603
623
  } else if (this.placement && this.placement.indexOf('top') < 0 && !!searchable) {
604
624
  popperStyle.transform = 'translate3d(-1px, 40px, 0px)';
@@ -607,12 +627,12 @@ function (_React$PureComponent) {
607
627
  var content = function content(_ref) {
608
628
  var placement = _ref.placement;
609
629
 
610
- if (placement !== _this2.placement) {
611
- _this2.placement = placement;
630
+ if (placement !== _this3.placement) {
631
+ _this3.placement = placement;
612
632
  }
613
633
 
614
634
  return _react.default.createElement(_ClickAwayListener.default, {
615
- onClickAway: _this2.handleClickAway
635
+ onClickAway: _this3.handleClickAway
616
636
  }, _react.default.createElement(_Grow.default, {
617
637
  in: open,
618
638
  id: "menu-list",
@@ -621,29 +641,29 @@ function (_React$PureComponent) {
621
641
  }
622
642
  }, _react.default.createElement(_Paper.default, {
623
643
  className: classes.paper
624
- }, (_this2.placement && _this2.placement.indexOf('bottom') >= 0 || staticPosition) && searchInput('bottom'), startAdornment, _react.default.createElement(_reactCustomScrollbars.default, (0, _extends2.default)({
644
+ }, (_this3.placement && _this3.placement.indexOf('bottom') >= 0 || staticPosition) && searchInput('bottom'), startAdornment, _react.default.createElement(_reactCustomScrollbars.default, (0, _extends2.default)({
625
645
  ref: function ref(contentEl) {
626
- _this2.optionsContent = contentEl;
646
+ _this3.optionsContent = contentEl;
627
647
  },
628
648
  autoHeight: true,
629
649
  autoHeightMax: 430
630
650
  }, onScrollReachBottom && {
631
- onScroll: _this2.handleScroll
651
+ onScroll: _this3.handleScroll
632
652
  }), _react.default.createElement(_HiSelectableList.default, (0, _extends2.default)({
633
653
  type: type,
634
654
  itemList: itemList,
635
- onSelect: _this2.handleSelect,
655
+ onSelect: _this3.handleSelect,
636
656
  selectedItemIdList: selectedItemIdList,
637
- fallbackImage: _this2.props.fallbackImage,
638
- overlay: _this2.overlay,
657
+ fallbackImage: _this3.props.fallbackImage,
658
+ overlay: _this3.overlay,
639
659
  value: value
640
- }, hiSelectableListProps))), _this2.placement && _this2.placement.indexOf('top') >= 0 && !staticPosition && searchInput('top'))));
660
+ }, hiSelectableListProps))), _this3.placement && _this3.placement.indexOf('top') >= 0 && !staticPosition && searchInput('top'))));
641
661
  };
642
662
 
643
663
  return _react.default.createElement("div", {
644
664
  className: classes.root,
645
665
  ref: function ref(el) {
646
- _this2.overlay = el;
666
+ _this3.overlay = el;
647
667
  },
648
668
  onKeyDown: this.handleKeyDown,
649
669
  onKeyDownCapture: this.handleKeyDownCapture
@@ -666,7 +686,7 @@ function (_React$PureComponent) {
666
686
  placeholder: placeholder
667
687
  }, hiSelectInputProps, {
668
688
  refElement: function refElement(el) {
669
- _this2.inputEl = el;
689
+ _this3.inputEl = el;
670
690
  }
671
691
  })), open && staticPosition ? _react.default.createElement("div", {
672
692
  style: popperStyle,
@@ -127,8 +127,9 @@ var styles = function styles(theme) {
127
127
  overflow: 'hidden',
128
128
  textOverflow: 'ellipsis'
129
129
  }, theme.typography.b1, {
130
- display: 'inline-flex',
131
- width: '100%'
130
+ display: 'inline-block',
131
+ width: '100%',
132
+ maxWidth: 500
132
133
  }),
133
134
  placeholder: {
134
135
  color: theme.palette.grey[400]
@@ -225,7 +225,8 @@ function (_React$PureComponent) {
225
225
  onSearch = _this$props.onSearch,
226
226
  translations = _this$props.translations,
227
227
  align = _this$props.align,
228
- otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align"]);
228
+ inputClasses = _this$props.inputClasses,
229
+ otherProps = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align", "inputClasses"]);
229
230
  var _this$state = this.state,
230
231
  focused = _this$state.focused,
231
232
  options = _this$state.options;
@@ -265,7 +266,8 @@ function (_React$PureComponent) {
265
266
  onChange: onSearch,
266
267
  onKeyDown: this.handleKeyDownSearch,
267
268
  onBlur: this.handleBlur,
268
- onFocus: this.handleFocus
269
+ onFocus: this.handleFocus,
270
+ classes: inputClasses
269
271
  })), open && _react.default.createElement(_Popper.default, {
270
272
  disablePortal: true,
271
273
  anchorEl: this.textInput,
@@ -319,6 +321,11 @@ HiSuggestSelect.propTypes = process.env.NODE_ENV !== "production" ? {
319
321
  */
320
322
  id: _propTypes.default.string,
321
323
 
324
+ /**
325
+ * Object that contains the style for Input component
326
+ */
327
+ inputClasses: _propTypes.default.object,
328
+
322
329
  /**
323
330
  * Passe une ref callback au composant input
324
331
  */
@@ -163,9 +163,9 @@ function (_React$PureComponent) {
163
163
  overflow: true,
164
164
  placeholder: placeholderContent
165
165
  }, itemComponent);
166
- } else {
167
- return itemComponent;
168
166
  }
167
+
168
+ return itemComponent;
169
169
  };
170
170
 
171
171
  _this.compareItem = function (a, b) {