@hipay/hipay-material-ui 2.2.0-beta-core3 → 2.2.0

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 (182) hide show
  1. package/CHANGELOG.md +0 -4
  2. package/HiAlertModal/HiAlertModal.js +1 -1
  3. package/HiAppBar/HiAppBar.js +1 -1
  4. package/HiBadge/HiBadge.js +2 -2
  5. package/HiBreadcrumb/HiStep.js +1 -1
  6. package/HiBreadcrumb/HiStepConnector.js +3 -3
  7. package/HiBreadcrumb/HiStepContent.js +1 -1
  8. package/HiBreadcrumb/HiStepIcon.js +1 -1
  9. package/HiBreadcrumb/HiStepLabel.js +1 -1
  10. package/HiBreadcrumb/HiStepper.js +1 -1
  11. package/HiButton/HiButton.js +92 -41
  12. package/HiCell/CellAddress.js +2 -2
  13. package/HiCell/CellDate.js +2 -2
  14. package/HiCell/CellIcon.js +2 -2
  15. package/HiCell/CellImage.js +2 -2
  16. package/HiCell/CellNumeric.js +2 -2
  17. package/HiCell/CellPinToAction.js +2 -2
  18. package/HiCell/CellRate.js +2 -2
  19. package/HiCell/CellSentinel.js +2 -2
  20. package/HiCell/CellSentinelScore.js +2 -2
  21. package/HiCell/CellText.js +2 -2
  22. package/HiCell/CellTextStyled.js +1 -1
  23. package/HiCheckbox/HiCheckbox.js +2 -2
  24. package/HiChip/HiChip.js +2 -2
  25. package/HiChip/HiChipSwitch.js +3 -3
  26. package/HiColoredLabel/HiColoredLabel.js +3 -3
  27. package/HiDatePicker/Caption.js +2 -2
  28. package/HiDatePicker/HiDatePicker.js +2 -2
  29. package/HiDatePicker/HiDatePickerMobile.js +2 -2
  30. package/HiDatePicker/HiDateRangePicker.js +2 -2
  31. package/HiDatePicker/HiDateRangeSelector.js +4 -5
  32. package/HiDatePicker/ListPicker.js +2 -2
  33. package/HiDatePicker/NavBar.js +2 -2
  34. package/HiDatePicker/Overlays/CustomOverlayLayout.js +2 -2
  35. package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +2 -2
  36. package/HiDatePicker/Overlays/Overlay.js +2 -2
  37. package/HiDatePicker/Overlays/TimePickerOverlay.js +2 -2
  38. package/HiDatePicker/stylesheet.js +1 -1
  39. package/HiDotsStepper/HiDot.js +2 -2
  40. package/HiDotsStepper/HiDotsStepper.js +2 -2
  41. package/HiExpansionPanel/HiExpansionPanel.js +2 -2
  42. package/HiForm/HiFormControl.js +2 -2
  43. package/HiForm/HiFormLabel.js +3 -3
  44. package/HiForm/HiInput.js +2 -2
  45. package/HiForm/HiPasswordField.js +2 -2
  46. package/HiForm/HiSlider.js +2 -2
  47. package/HiForm/HiUpload.js +2 -2
  48. package/HiForm/HiUploadInput.js +3 -3
  49. package/HiIcon/HiIcon.js +2 -2
  50. package/HiIconButton/HiIconButton.js +2 -2
  51. package/HiLoader/HiLoader.js +2 -2
  52. package/HiMap/HiMap.js +1 -1
  53. package/HiMap/HiMapExpand.js +1 -1
  54. package/HiNotice/HiKPI.js +1 -1
  55. package/HiPaymentMeans/HiPaymentMeans.js +1 -1
  56. package/HiPdfReader/HiPdfReader.js +1 -1
  57. package/HiPin/HiPin.js +2 -2
  58. package/HiRadio/HiRadio.js +1 -1
  59. package/HiSelect/HiNestedSelect.js +2 -2
  60. package/HiSelect/HiSelect.js +2 -2
  61. package/HiSelect/HiSelectContent.js +2 -2
  62. package/HiSelect/HiSelectInput.js +2 -2
  63. package/HiSelect/HiSelectMobile.js +2 -2
  64. package/HiSelect/HiSuggestSelect.js +1 -1
  65. package/HiSelectableList/HiSelectableList.js +2 -2
  66. package/HiSelectableList/HiSelectableListHierarchic.js +2 -2
  67. package/HiSelectableList/HiSelectableListItem.js +2 -2
  68. package/HiSwitch/HiSwitch.js +2 -2
  69. package/HiSwitch/HiSwitchState.js +2 -2
  70. package/HiTable/HiTable.js +2 -2
  71. package/HiTable/HiTableHeader.js +3 -3
  72. package/HiTable/HiTableRow.js +3 -4
  73. package/es/HiAlertModal/HiAlertModal.js +1 -1
  74. package/es/HiAppBar/HiAppBar.js +1 -1
  75. package/es/HiBadge/HiBadge.js +1 -1
  76. package/es/HiBreadcrumb/HiStep.js +1 -1
  77. package/es/HiBreadcrumb/HiStepConnector.js +3 -3
  78. package/es/HiBreadcrumb/HiStepContent.js +1 -1
  79. package/es/HiBreadcrumb/HiStepIcon.js +1 -1
  80. package/es/HiBreadcrumb/HiStepLabel.js +1 -1
  81. package/es/HiBreadcrumb/HiStepper.js +1 -1
  82. package/es/HiButton/HiButton.js +82 -56
  83. package/es/HiCell/CellAddress.js +1 -1
  84. package/es/HiCell/CellDate.js +1 -1
  85. package/es/HiCell/CellIcon.js +1 -1
  86. package/es/HiCell/CellImage.js +1 -1
  87. package/es/HiCell/CellNumeric.js +1 -1
  88. package/es/HiCell/CellPinToAction.js +1 -1
  89. package/es/HiCell/CellRate.js +1 -1
  90. package/es/HiCell/CellSentinel.js +1 -1
  91. package/es/HiCell/CellSentinelScore.js +1 -1
  92. package/es/HiCell/CellText.js +1 -1
  93. package/es/HiCell/CellTextStyled.js +1 -1
  94. package/es/HiCheckbox/HiCheckbox.js +1 -1
  95. package/es/HiChip/HiChip.js +1 -1
  96. package/es/HiChip/HiChipSwitch.js +2 -2
  97. package/es/HiColoredLabel/HiColoredLabel.js +2 -2
  98. package/es/HiDatePicker/Caption.js +1 -1
  99. package/es/HiDatePicker/HiDatePicker.js +1 -1
  100. package/es/HiDatePicker/HiDatePickerMobile.js +1 -1
  101. package/es/HiDatePicker/HiDateRangePicker.js +1 -1
  102. package/es/HiDatePicker/HiDateRangeSelector.js +3 -4
  103. package/es/HiDatePicker/ListPicker.js +1 -1
  104. package/es/HiDatePicker/NavBar.js +1 -1
  105. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +1 -1
  106. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +1 -1
  107. package/es/HiDatePicker/Overlays/Overlay.js +1 -1
  108. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +1 -1
  109. package/es/HiDatePicker/stylesheet.js +1 -1
  110. package/es/HiDotsStepper/HiDot.js +1 -1
  111. package/es/HiDotsStepper/HiDotsStepper.js +1 -1
  112. package/es/HiExpansionPanel/HiExpansionPanel.js +1 -1
  113. package/es/HiForm/HiFormControl.js +1 -1
  114. package/es/HiForm/HiFormLabel.js +2 -2
  115. package/es/HiForm/HiInput.js +1 -1
  116. package/es/HiForm/HiPasswordField.js +1 -1
  117. package/es/HiForm/HiSlider.js +1 -1
  118. package/es/HiForm/HiUpload.js +1 -1
  119. package/es/HiForm/HiUploadInput.js +2 -2
  120. package/es/HiIcon/HiIcon.js +1 -1
  121. package/es/HiIconButton/HiIconButton.js +2 -2
  122. package/es/HiLoader/HiLoader.js +1 -1
  123. package/es/HiMap/HiMap.js +1 -1
  124. package/es/HiMap/HiMapExpand.js +1 -1
  125. package/es/HiNotice/HiKPI.js +1 -1
  126. package/es/HiPaymentMeans/HiPaymentMeans.js +1 -1
  127. package/es/HiPdfReader/HiPdfReader.js +1 -1
  128. package/es/HiPin/HiPin.js +2 -2
  129. package/es/HiRadio/HiRadio.js +1 -1
  130. package/es/HiSelect/HiNestedSelect.js +1 -1
  131. package/es/HiSelect/HiSelect.js +1 -1
  132. package/es/HiSelect/HiSelectContent.js +1 -1
  133. package/es/HiSelect/HiSelectInput.js +1 -1
  134. package/es/HiSelect/HiSelectMobile.js +1 -1
  135. package/es/HiSelect/HiSuggestSelect.js +1 -1
  136. package/es/HiSelectableList/HiSelectableList.js +1 -1
  137. package/es/HiSelectableList/HiSelectableListHierarchic.js +1 -1
  138. package/es/HiSelectableList/HiSelectableListItem.js +1 -1
  139. package/es/HiSwitch/HiSwitch.js +1 -1
  140. package/es/HiSwitch/HiSwitchState.js +1 -1
  141. package/es/HiTable/HiTable.js +1 -1
  142. package/es/HiTable/HiTableHeader.js +2 -2
  143. package/es/HiTable/HiTableRow.js +2 -3
  144. package/es/hi-svg-icons/HiAccount.js +1 -1
  145. package/es/hi-svg-icons/HiActivity.js +1 -1
  146. package/es/hi-svg-icons/HiAll.js +1 -1
  147. package/es/hi-svg-icons/HiBilling.js +1 -1
  148. package/es/hi-svg-icons/HiCatalog.js +1 -1
  149. package/es/hi-svg-icons/HiCustomer.js +1 -1
  150. package/es/hi-svg-icons/HiFinance.js +1 -1
  151. package/es/hi-svg-icons/HiPermission.js +1 -1
  152. package/es/hi-svg-icons/HiRoute.js +1 -1
  153. package/es/hi-svg-icons/HiSettlement.js +1 -1
  154. package/es/hi-svg-icons/HiTransaction.js +1 -1
  155. package/es/hi-svg-icons/HiUser.js +1 -1
  156. package/es/hi-svg-icons/HiWidget.js +1 -1
  157. package/es/styles/createMixins.js +4 -4
  158. package/es/styles/spacing.js +5 -2
  159. package/es/test-utils/getClasses.js +16 -2
  160. package/es/withWidth/index.js +2 -0
  161. package/es/withWidth/withWidth.js +176 -0
  162. package/hi-svg-icons/HiAccount.js +1 -1
  163. package/hi-svg-icons/HiActivity.js +1 -1
  164. package/hi-svg-icons/HiAll.js +1 -1
  165. package/hi-svg-icons/HiBilling.js +1 -1
  166. package/hi-svg-icons/HiCatalog.js +1 -1
  167. package/hi-svg-icons/HiCustomer.js +1 -1
  168. package/hi-svg-icons/HiFinance.js +1 -1
  169. package/hi-svg-icons/HiPermission.js +1 -1
  170. package/hi-svg-icons/HiRoute.js +1 -1
  171. package/hi-svg-icons/HiSettlement.js +1 -1
  172. package/hi-svg-icons/HiTransaction.js +1 -1
  173. package/hi-svg-icons/HiUser.js +1 -1
  174. package/hi-svg-icons/HiWidget.js +1 -1
  175. package/index.es.js +1 -1
  176. package/index.js +1 -1
  177. package/package.json +7 -5
  178. package/styles/createMixins.js +4 -4
  179. package/styles/spacing.js +4 -5
  180. package/test-utils/getClasses.js +29 -5
  181. package/withWidth/index.js +27 -0
  182. package/withWidth/withWidth.js +229 -0
@@ -25,7 +25,7 @@ var _react = _interopRequireDefault(require("react"));
25
25
 
26
26
  var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
 
28
- var _styles = require("@material-ui/core/styles");
28
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
29
29
 
30
30
  var styles = function styles(theme) {
31
31
  return {
@@ -193,6 +193,6 @@ HiSelectMobile.propTypes = process.env.NODE_ENV !== "production" ? {
193
193
  width: _propTypes.default.number
194
194
  } : {};
195
195
 
196
- var _default = (0, _styles.withStyles)(styles)(HiSelectMobile);
196
+ var _default = (0, _withStyles.default)(styles)(HiSelectMobile);
197
197
 
198
198
  exports.default = _default;
@@ -39,7 +39,7 @@ var _HiSelectableList = _interopRequireDefault(require("../HiSelectableList"));
39
39
 
40
40
  var _HiInput = _interopRequireDefault(require("../HiForm/HiInput"));
41
41
 
42
- var _styles = require("@material-ui/core/styles");
42
+ var _styles = require("../styles");
43
43
 
44
44
  var _Popper = _interopRequireDefault(require("@material-ui/core/Popper"));
45
45
 
@@ -31,7 +31,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
31
31
 
32
32
  var _List = _interopRequireDefault(require("@material-ui/core/List"));
33
33
 
34
- var _styles = require("@material-ui/core/styles");
34
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
35
35
 
36
36
  var _HiSelectableListItem = _interopRequireDefault(require("./HiSelectableListItem"));
37
37
 
@@ -381,7 +381,7 @@ HiSelectableList.propTypes = process.env.NODE_ENV !== "production" ? {
381
381
  value: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.array])
382
382
  } : {};
383
383
 
384
- var _default = (0, _styles.withStyles)(styles, {
384
+ var _default = (0, _withStyles.default)(styles, {
385
385
  hiComponent: true,
386
386
  name: 'HmuiHiSelectableList',
387
387
  index: 51
@@ -27,7 +27,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
 
28
28
  var _List = _interopRequireDefault(require("@material-ui/core/List"));
29
29
 
30
- var _styles = require("@material-ui/core/styles");
30
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
31
31
 
32
32
  var _HiSelectableListItem = _interopRequireDefault(require("./HiSelectableListItem"));
33
33
 
@@ -225,7 +225,7 @@ HiSelectableListHierarchic.propTypes = process.env.NODE_ENV !== "production" ? {
225
225
  selectedItemIdList: _propTypes.default.array
226
226
  } : {};
227
227
 
228
- var _default = (0, _styles.withStyles)(styles, {
228
+ var _default = (0, _withStyles.default)(styles, {
229
229
  hiComponent: true,
230
230
  name: 'HmuiHiSelectableListHierarchic'
231
231
  })(HiSelectableListHierarchic);
@@ -41,7 +41,7 @@ var _HiColoredLabel = _interopRequireDefault(require("../HiColoredLabel"));
41
41
 
42
42
  var _HiLoader = _interopRequireDefault(require("../HiLoader"));
43
43
 
44
- var _styles = require("@material-ui/core/styles");
44
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
45
45
 
46
46
  var _helpers = require("../utils/helpers");
47
47
 
@@ -558,7 +558,7 @@ HiSelectableListItem.propTypes = process.env.NODE_ENV !== "production" ? {
558
558
  type: _propTypes.default.string
559
559
  } : {};
560
560
 
561
- var _default = (0, _styles.withStyles)(styles, {
561
+ var _default = (0, _withStyles.default)(styles, {
562
562
  hiComponent: true,
563
563
  name: 'HmuiHiSelectableListItem'
564
564
  })(HiSelectableListItem);
@@ -25,7 +25,7 @@ var _Check = _interopRequireDefault(require("@material-ui/icons/Check"));
25
25
 
26
26
  var _helpers = require("../utils/helpers");
27
27
 
28
- var _styles = require("@material-ui/core/styles");
28
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
29
29
 
30
30
  var styles = function styles(theme) {
31
31
  return {
@@ -229,7 +229,7 @@ HiSwitch.defaultProps = {
229
229
  color: 'inherit'
230
230
  };
231
231
 
232
- var _default = (0, _styles.withStyles)(styles, {
232
+ var _default = (0, _withStyles.default)(styles, {
233
233
  hiComponent: true,
234
234
  name: 'HmuiHiSwitch'
235
235
  })(HiSwitch);
@@ -17,7 +17,7 @@ var _classnames = _interopRequireDefault(require("classnames"));
17
17
 
18
18
  var _HiButton = _interopRequireDefault(require("../HiButton"));
19
19
 
20
- var _styles = require("@material-ui/core/styles");
20
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
21
21
 
22
22
  var _helpers = require("../utils/helpers");
23
23
 
@@ -211,7 +211,7 @@ HiSwitchState.defaultProps = {
211
211
  disabled: false
212
212
  };
213
213
 
214
- var _default = (0, _styles.withStyles)(styles, {
214
+ var _default = (0, _withStyles.default)(styles, {
215
215
  hiComponent: true,
216
216
  name: 'HmuiHiSwitchState'
217
217
  })(HiSwitchState);
@@ -23,7 +23,7 @@ var _react = _interopRequireDefault(require("react"));
23
23
 
24
24
  var _propTypes = _interopRequireDefault(require("prop-types"));
25
25
 
26
- var _styles = require("@material-ui/core/styles");
26
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
27
27
 
28
28
  var _Table = _interopRequireDefault(require("@material-ui/core/Table"));
29
29
 
@@ -147,7 +147,7 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
147
147
  sortable: _propTypes.default.bool
148
148
  } : {};
149
149
 
150
- var _default = (0, _styles.withStyles)(styles, {
150
+ var _default = (0, _withStyles.default)(styles, {
151
151
  hiComponent: true,
152
152
  name: 'HmuiHiTable'
153
153
  })(HiTable);
@@ -23,7 +23,7 @@ var _react = _interopRequireDefault(require("react"));
23
23
 
24
24
  var _propTypes = _interopRequireDefault(require("prop-types"));
25
25
 
26
- var _styles = require("@material-ui/core/styles");
26
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
27
27
 
28
28
  var _TableCell = _interopRequireDefault(require("@material-ui/core/TableCell"));
29
29
 
@@ -116,7 +116,7 @@ function (_React$PureComponent) {
116
116
  key: colId,
117
117
  className: classes.cell,
118
118
  sortDirection: orderBy === colId ? order : false,
119
- align: cst.ALIGN_RIGHT_TYPES.includes(type) || align === 'right' ? 'right' : 'inherit',
119
+ numeric: cst.ALIGN_RIGHT_TYPES.includes(type) || align === 'right',
120
120
  title: headerTooltip
121
121
  }, sortable ? _react.default.createElement(_TableSortLabel.default, {
122
122
  active: orderBy === colId,
@@ -170,7 +170,7 @@ HiTableHeader.propTypes = process.env.NODE_ENV !== "production" ? {
170
170
  sortable: _propTypes.default.bool
171
171
  } : {};
172
172
 
173
- var _default = (0, _styles.withStyles)(styles, {
173
+ var _default = (0, _withStyles.default)(styles, {
174
174
  hiComponent: true,
175
175
  name: 'HmuiHiTableHeader'
176
176
  })(HiTableHeader);
@@ -31,7 +31,7 @@ var _keycode = _interopRequireDefault(require("keycode"));
31
31
 
32
32
  var _classnames = _interopRequireDefault(require("classnames"));
33
33
 
34
- var _styles = require("@material-ui/core/styles");
34
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
35
35
 
36
36
  var _TableRow = _interopRequireDefault(require("@material-ui/core/TableRow"));
37
37
 
@@ -57,8 +57,7 @@ var styles = function styles(theme) {
57
57
  border: 'none',
58
58
  padding: '0px 13px',
59
59
  minHeight: '32px',
60
- maxHeight: '40px',
61
- fontWeight: theme.typography.fontWeightRegular
60
+ maxHeight: '40px'
62
61
  }
63
62
  };
64
63
  };
@@ -167,7 +166,7 @@ HiTableRow.propTypes = process.env.NODE_ENV !== "production" ? {
167
166
  rowdata: _propTypes.default.object.isRequired
168
167
  } : {};
169
168
 
170
- var _default = (0, _styles.withStyles)(styles, {
169
+ var _default = (0, _withStyles.default)(styles, {
171
170
  hiComponent: true,
172
171
  name: 'HmuiHiTableRow'
173
172
  })(HiTableRow);
@@ -8,7 +8,7 @@ import DialogActions from '@material-ui/core/DialogActions';
8
8
  import DialogContent from '@material-ui/core/DialogContent';
9
9
  import DialogContentText from '@material-ui/core/DialogContentText';
10
10
  import DialogTitle from '@material-ui/core/DialogTitle';
11
- import { withStyles } from '@material-ui/core/styles';
11
+ import { withStyles, withTheme } from '../styles';
12
12
  import HiButton from '../HiButton';
13
13
  import HiIcon from '../HiIcon';
14
14
  import { escapeHTML } from '../utils/helpers';
@@ -4,7 +4,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
4
4
  import React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import classNames from 'classnames';
7
- import { withStyles } from '@material-ui/core/styles';
7
+ import { withStyles } from '../styles';
8
8
  import AppBar from '@material-ui/core/AppBar';
9
9
  import Collapse from '@material-ui/core/Collapse';
10
10
  import Toolbar from '@material-ui/core/Toolbar';
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import Badge from '@material-ui/core/Badge';
5
- import { withStyles } from '@material-ui/core/styles';
5
+ import withStyles from '../styles/withStyles';
6
6
  export const styles = theme => ({
7
7
  // Usefull for style overriding
8
8
  root: {},
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { withStyles } from '@material-ui/core/styles';
4
+ import { withStyles } from '../styles';
5
5
  import classNames from 'classnames';
6
6
  import HiStepConnector from './HiStepConnector';
7
7
  import HiStepContent from './HiStepContent';
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
- import { withStyles } from '@material-ui/core/styles';
6
+ import { withStyles } from '../styles';
7
7
  import HiStepContent from './HiStepContent';
8
8
  export const styles = theme => ({
9
9
  root: {
@@ -11,14 +11,14 @@ export const styles = theme => ({
11
11
  flex: '1 1 auto',
12
12
  marginLeft: 13,
13
13
  // half icon
14
- padding: `0 0 ${theme.spacing(2)}px`
14
+ padding: `0 0 ${theme.spacing.unit}px`
15
15
  },
16
16
  line: {
17
17
  display: 'block',
18
18
  borderColor: theme.palette.grey[600],
19
19
  borderLeftStyle: 'solid',
20
20
  borderLeftWidth: 2,
21
- minHeight: theme.spacing(6),
21
+ minHeight: theme.spacing.unit * 3,
22
22
  height: 40
23
23
  },
24
24
  greenLine: {
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import Paper from '@material-ui/core/Paper';
5
- import { withStyles } from '@material-ui/core/styles';
5
+ import { withStyles } from '../styles';
6
6
  export const styles = () => ({
7
7
  root: {
8
8
  display: 'flex',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
- import { withStyles } from '@material-ui/core/styles';
4
+ import { withStyles } from '../styles';
5
5
  export const styles = theme => ({
6
6
  circle: {
7
7
  borderRadius: '50%',
@@ -4,7 +4,7 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread";
4
4
  import React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import classNames from 'classnames';
7
- import { withStyles } from '@material-ui/core/styles';
7
+ import { withStyles } from '../styles';
8
8
  import HiStepIcon from './HiStepIcon';
9
9
  import HiPin from '../HiPin';
10
10
  export const styles = theme => ({
@@ -1,7 +1,7 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
2
  import React from 'react';
3
3
  import PropTypes from 'prop-types';
4
- import { withStyles } from '@material-ui/core/styles';
4
+ import { withStyles } from '../styles';
5
5
  export const styles = () => ({
6
6
  root: {
7
7
  width: '100%'
@@ -4,24 +4,24 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
4
4
  import React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import classNames from 'classnames';
7
- import { makeStyles } from '@material-ui/core/styles';
8
- import { fade } from '@material-ui/core/styles/colorManipulator';
7
+ import { withStyles } from '../styles';
8
+ import { fade } from '../styles/colorManipulator';
9
9
  import Button from '@material-ui/core/Button';
10
- const useStyles = makeStyles(theme => ({
10
+ export const styles = theme => ({
11
11
  root: {
12
- '&$containedDisabled': {
12
+ '&$raisedDisabled': {
13
13
  color: theme.palette.neutral.contrastText,
14
14
  backgroundColor: theme.palette.neutral.main
15
15
  }
16
16
  },
17
- containedDisabled: {},
18
- textNeutral: {
17
+ raisedDisabled: {},
18
+ flatNeutral: {
19
19
  color: theme.palette.neutral.main,
20
20
  '&$disabled': {
21
21
  color: theme.palette.action.disabled
22
22
  }
23
23
  },
24
- textPositive: {
24
+ flatPositive: {
25
25
  color: theme.palette.positive.main,
26
26
  '&:hover': {
27
27
  backgroundColor: fade(theme.palette.positive.main, theme.palette.action.hoverOpacity),
@@ -34,7 +34,7 @@ const useStyles = makeStyles(theme => ({
34
34
  color: theme.palette.action.disabled
35
35
  }
36
36
  },
37
- textNegative: {
37
+ flatNegative: {
38
38
  color: theme.palette.negative.main,
39
39
  '&:hover': {
40
40
  backgroundColor: fade(theme.palette.negative.main, theme.palette.action.hoverOpacity),
@@ -47,7 +47,7 @@ const useStyles = makeStyles(theme => ({
47
47
  color: theme.palette.action.disabled
48
48
  }
49
49
  },
50
- textMiddle: {
50
+ flatMiddle: {
51
51
  color: theme.palette.middle.main,
52
52
  '&:hover': {
53
53
  backgroundColor: fade(theme.palette.middle.main, theme.palette.action.hoverOpacity),
@@ -61,7 +61,7 @@ const useStyles = makeStyles(theme => ({
61
61
  }
62
62
  },
63
63
 
64
- /* Styles applied to the root element if `variant="[contained ]"` and `color="positive"`. */
64
+ /* Styles applied to the root element if `variant="[contained | fab]"` and `color="positive"`. */
65
65
  containedPrimary: {
66
66
  '&$disabled': {
67
67
  color: theme.palette.neutral.contrastText,
@@ -84,7 +84,7 @@ const useStyles = makeStyles(theme => ({
84
84
  }
85
85
  },
86
86
 
87
- /* Styles applied to the root element if `variant="[contained]"` and `color="negative"`. */
87
+ /* Styles applied to the root element if `variant="[contained | fab]"` and `color="negative"`. */
88
88
  containedNegative: {
89
89
  color: theme.palette.negative.contrastText,
90
90
  backgroundColor: theme.palette.negative.main,
@@ -101,7 +101,7 @@ const useStyles = makeStyles(theme => ({
101
101
  }
102
102
  },
103
103
 
104
- /* Styles applied to the root element if `variant="[contained]"` and `color="middle"`. */
104
+ /* Styles applied to the root element if `variant="[contained | fab]"` and `color="middle"`. */
105
105
  containedMiddle: {
106
106
  color: theme.palette.middle.contrastText,
107
107
  backgroundColor: theme.palette.middle.main,
@@ -118,7 +118,7 @@ const useStyles = makeStyles(theme => ({
118
118
  }
119
119
  },
120
120
 
121
- /* Styles applied to the root element if `variant="[contained]"` and `color="neutral"`. */
121
+ /* Styles applied to the root element if `variant="[contained | fab]"` and `color="neutral"`. */
122
122
  containedNeutral: {
123
123
  color: theme.palette.neutral.contrastText,
124
124
  backgroundColor: theme.palette.neutral.main,
@@ -167,49 +167,62 @@ const useStyles = makeStyles(theme => ({
167
167
  }
168
168
  },
169
169
  disabled: {}
170
- }));
171
- const HiButton = React.forwardRef((props, ref) => {
172
- const {
173
- children,
174
- className,
175
- color,
176
- variant,
177
- disabled
178
- } = props,
179
- other = _objectWithoutProperties(props, ["children", "className", "color", "variant", "disabled"]);
180
-
181
- const classes = useStyles();
182
- const hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? 'inherit' : color;
183
- const contained = variant === 'contained';
184
- const buttonClassNames = classNames(classes.root, {
185
- [classes.containedDisabled]: variant === 'contained' && disabled,
186
- [classes.textPositive]: (variant === 'text' || variant === 'outlined') && color === 'positive',
187
- [classes.textNegative]: (variant === 'text' || variant === 'outlined') && color === 'negative',
188
- [classes.textMiddle]: (variant === 'text' || variant === 'outlined') && color === 'middle',
189
- [classes.textNeutral]: (variant === 'text' || variant === 'outlined') && (color === 'default' || color === 'neutral'),
190
- [classes.containedPrimary]: contained && color === 'primary',
191
- [classes.containedPositive]: contained && color === 'positive',
192
- [classes.containedNegative]: contained && color === 'negative',
193
- [classes.containedMiddle]: contained && color === 'middle',
194
- [classes.containedNeutral]: contained && (color === 'default' || color === 'neutral'),
195
- [classes.outlinedPositive]: variant === 'outlined' && color === 'positive',
196
- [classes.outlinedNegative]: variant === 'outlined' && color === 'negative',
197
- [classes.outlinedMiddle]: variant === 'outlined' && color === 'middle',
198
- [classes.outlinedNeutral]: variant === 'outlined' && (color === 'default' || color === 'neutral'),
199
- [classes.disabled]: disabled
200
- });
201
- return React.createElement(Button, _extends({
202
- className: className,
203
- classes: {
204
- root: buttonClassNames
205
- },
206
- color: hcolor,
207
- variant: variant,
208
- disabled: disabled,
209
- buttonRef: ref
210
- }, other), children);
211
170
  });
171
+
172
+ class HiButton extends React.Component {
173
+ render() {
174
+ const _this$props = this.props,
175
+ {
176
+ children,
177
+ classes,
178
+ className,
179
+ color,
180
+ variant,
181
+ disabled,
182
+ buttonRef
183
+ } = _this$props,
184
+ other = _objectWithoutProperties(_this$props, ["children", "classes", "className", "color", "variant", "disabled", "buttonRef"]);
185
+
186
+ const hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? 'inherit' : color;
187
+ const fab = variant === 'fab' || variant === 'extendedFab';
188
+ const contained = variant === 'contained' || variant === 'raised';
189
+ const buttonClassNames = classNames(classes.root, {
190
+ [classes.raisedDisabled]: variant === 'raised' && disabled,
191
+ [classes.flatPositive]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'positive',
192
+ [classes.flatNegative]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'negative',
193
+ [classes.flatMiddle]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && color === 'middle',
194
+ [classes.flatNeutral]: (variant === 'text' || variant === 'flat' || variant === 'outlined') && (color === 'default' || color === 'neutral'),
195
+ [classes.containedPrimary]: (contained || fab) && color === 'primary',
196
+ [classes.containedPositive]: (contained || fab) && color === 'positive',
197
+ [classes.containedNegative]: (contained || fab) && color === 'negative',
198
+ [classes.containedMiddle]: (contained || fab) && color === 'middle',
199
+ [classes.containedNeutral]: (contained || fab) && (color === 'default' || color === 'neutral'),
200
+ [classes.outlinedPositive]: variant === 'outlined' && color === 'positive',
201
+ [classes.outlinedNegative]: variant === 'outlined' && color === 'negative',
202
+ [classes.outlinedMiddle]: variant === 'outlined' && color === 'middle',
203
+ [classes.outlinedNeutral]: variant === 'outlined' && (color === 'default' || color === 'neutral'),
204
+ [classes.disabled]: disabled
205
+ });
206
+ return React.createElement(Button, _extends({
207
+ className: className,
208
+ classes: {
209
+ root: buttonClassNames
210
+ },
211
+ color: hcolor,
212
+ variant: variant,
213
+ disabled: disabled,
214
+ buttonRef: buttonRef
215
+ }, other), children);
216
+ }
217
+
218
+ }
219
+
212
220
  HiButton.propTypes = process.env.NODE_ENV !== "production" ? {
221
+ /**
222
+ * Surcharge des classes
223
+ */
224
+ classes: PropTypes.object,
225
+
213
226
  /**
214
227
  * Surcharge des classes
215
228
  */
@@ -223,10 +236,23 @@ HiButton.propTypes = process.env.NODE_ENV !== "production" ? {
223
236
  /**
224
237
  * The variant to use.
225
238
  */
226
- variant: PropTypes.oneOf(['text', 'outlined', 'contained'])
239
+ variant: PropTypes.oneOf(['text', 'flat', 'outlined', 'contained', 'raised', 'fab', 'extendedFab'])
227
240
  } : {};
228
241
  HiButton.defaultProps = {
229
242
  color: 'neutral',
230
243
  variant: 'text'
231
244
  };
232
- export default HiButton;
245
+
246
+ function forwardRef(props, ref) {
247
+ return React.createElement(HiButton, _extends({}, props, {
248
+ buttonRef: ref
249
+ }));
250
+ }
251
+
252
+ const name = HiButton.displayName || HiButton.name;
253
+ forwardRef.displayName = name;
254
+ const HiButtonForwardRef = React.forwardRef(forwardRef);
255
+ export default withStyles(styles, {
256
+ hiComponent: true,
257
+ name: 'HmuiHiButton'
258
+ })(HiButtonForwardRef);
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { withStyles } from '@material-ui/core/styles';
3
+ import withStyles from '../styles/withStyles';
4
4
  export const styles = () => ({
5
5
  rightEllipsisSpan: {
6
6
  overflow: 'hidden',
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import moment from 'moment';
4
4
  import 'moment/locale/fr';
5
- import { withStyles } from '@material-ui/core/styles';
5
+ import withStyles from '../styles/withStyles';
6
6
  export const styles = {
7
7
  rightEllipsisSpan: {
8
8
  display: 'inline-block',
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { withStyles } from '@material-ui/core/styles';
3
+ import withStyles from '../styles/withStyles';
4
4
  import HiIcon from '../HiIcon';
5
5
  import HiIconButton from '../HiIconButton';
6
6
  export const styles = {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { withStyles } from '@material-ui/core/styles';
3
+ import withStyles from '../styles/withStyles';
4
4
  export const styles = () => ({
5
5
  img: {
6
6
  height: 'auto',
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { withStyles } from '@material-ui/core/styles';
3
+ import withStyles from '../styles/withStyles';
4
4
  import { formatNumber, formatCurrencyAmount } from '../utils/helpers';
5
5
  export const styles = () => ({
6
6
  wrapper: {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { withStyles } from '@material-ui/core/styles';
3
+ import withStyles from '../styles/withStyles';
4
4
  import HiPin from '../HiPin';
5
5
  export const styles = {
6
6
  wrapper: {
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import classNames from 'classnames';
4
4
  import { ArrowBottomRight, ArrowTopRight, Equal } from 'mdi-material-ui';
5
5
  import { formatRate } from '../utils/helpers';
6
- import { withStyles } from '@material-ui/core/styles';
6
+ import withStyles from '../styles/withStyles';
7
7
  export const styles = theme => ({
8
8
  flexContent: {
9
9
  display: 'flex',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import HiColoredLabel from '../HiColoredLabel';
4
- import { withStyles } from '@material-ui/core/styles';
4
+ import withStyles from '../styles/withStyles';
5
5
  export const styles = {
6
6
  flexContent: {
7
7
  display: 'flex',
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import HiColoredLabel from '../HiColoredLabel';
4
- import { withStyles } from '@material-ui/core/styles';
4
+ import withStyles from '../styles/withStyles';
5
5
  export const styles = {
6
6
  flexContent: {
7
7
  display: 'flex',
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import { withStyles } from '@material-ui/core/styles';
3
+ import withStyles from '../styles/withStyles';
4
4
  import HiColoredLabel from '../HiColoredLabel';
5
5
  export const styles = {
6
6
  leftEllipsisSpan: {
@@ -58,7 +58,7 @@ const CellTextStyled = ({
58
58
  onClick: onClick,
59
59
  size: "small",
60
60
  style: styleButton,
61
- variant: "contained"
61
+ variant: "raised"
62
62
  }, valueString);
63
63
  }
64
64
 
@@ -5,7 +5,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
5
5
  import React from 'react';
6
6
  import PropTypes from 'prop-types';
7
7
  import Checkbox from '@material-ui/core/Checkbox';
8
- import { withStyles } from '@material-ui/core/styles';
8
+ import withStyles from '../styles/withStyles';
9
9
  import HiIcon from '../HiIcon';
10
10
  import classNames from 'classnames';
11
11
  export const styles = theme => ({
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
4
4
  import classNames from 'classnames';
5
5
  import keycode from 'keycode';
6
6
  import HiIcon from '../HiIcon';
7
- import { withStyles } from '@material-ui/core/styles';
7
+ import withStyles from '../styles/withStyles';
8
8
  export const styles = theme => ({
9
9
  root: _objectSpread({}, theme.typography.b3, {
10
10
  display: 'inline-flex',