@hipay/hipay-material-ui 2.2.0 → 2.3.0-rc.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (193) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/HiAlertModal/HiAlertModal.js +5 -5
  3. package/HiAppBar/HiAppBar.js +4 -4
  4. package/HiBadge/HiBadge.js +2 -2
  5. package/HiBreadcrumb/HiStep.js +1 -1
  6. package/HiBreadcrumb/HiStepConnector.js +6 -6
  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 +41 -92
  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 +5 -5
  22. package/HiCell/CellTextStyled.js +1 -1
  23. package/HiCheckbox/HiCheckbox.js +5 -5
  24. package/HiChip/HiChip.js +3 -3
  25. package/HiChip/HiChipSwitch.js +8 -8
  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 +5 -4
  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/MonthPickerOverlay.js +3 -3
  37. package/HiDatePicker/Overlays/Overlay.js +2 -2
  38. package/HiDatePicker/Overlays/TimePickerOverlay.js +6 -6
  39. package/HiDatePicker/Overlays/YearPickerOverlay.js +3 -3
  40. package/HiDatePicker/stylesheet.js +1 -1
  41. package/HiDotsStepper/HiDot.js +2 -2
  42. package/HiDotsStepper/HiDotsStepper.js +6 -6
  43. package/HiExpansionPanel/HiExpansionPanel.js +36 -12
  44. package/HiForm/HiAddressField.js +7 -7
  45. package/HiForm/HiEmailField.js +3 -3
  46. package/HiForm/HiFormControl.js +8 -8
  47. package/HiForm/HiFormLabel.js +3 -3
  48. package/HiForm/HiInput.js +13 -13
  49. package/HiForm/HiPasswordField.js +9 -8
  50. package/HiForm/HiSearchField.js +5 -5
  51. package/HiForm/HiSlider.js +2 -2
  52. package/HiForm/HiTextField.js +5 -5
  53. package/HiForm/HiUpload.js +2 -2
  54. package/HiForm/HiUploadInput.js +3 -3
  55. package/HiIcon/HiIcon.js +2 -2
  56. package/HiIconButton/HiIconButton.js +2 -2
  57. package/HiLoader/HiLoader.js +2 -2
  58. package/HiMap/HiMap.js +7 -7
  59. package/HiMap/HiMapExpand.js +5 -5
  60. package/HiNotice/HiKPI.js +10 -9
  61. package/HiPaymentMeans/HiPaymentMeans.js +1 -1
  62. package/HiPdfReader/HiPdfReader.js +1 -1
  63. package/HiPin/HiPin.js +2 -2
  64. package/HiRadio/HiRadio.js +1 -1
  65. package/HiSelect/HiDynamicSelect.js +7 -7
  66. package/HiSelect/HiNestedSelect.js +14 -14
  67. package/HiSelect/HiNestedSelectContent.js +9 -9
  68. package/HiSelect/HiSelect.js +9 -9
  69. package/HiSelect/HiSelectContent.js +15 -15
  70. package/HiSelect/HiSelectInput.js +9 -9
  71. package/HiSelect/HiSelectMobile.js +2 -2
  72. package/HiSelect/HiSuggestSelect.js +1 -1
  73. package/HiSelectableList/HiSelectableList.js +2 -2
  74. package/HiSelectableList/HiSelectableListHierarchic.js +2 -2
  75. package/HiSelectableList/HiSelectableListItem.js +6 -6
  76. package/HiSwitch/HiSwitch.js +2 -2
  77. package/HiSwitch/HiSwitchState.js +2 -2
  78. package/HiTable/HiTable.js +5 -5
  79. package/HiTable/HiTableHeader.js +3 -3
  80. package/HiTable/HiTableRow.js +7 -6
  81. package/es/HiAlertModal/HiAlertModal.js +1 -1
  82. package/es/HiAppBar/HiAppBar.js +1 -1
  83. package/es/HiBadge/HiBadge.js +1 -1
  84. package/es/HiBreadcrumb/HiStep.js +1 -1
  85. package/es/HiBreadcrumb/HiStepConnector.js +3 -3
  86. package/es/HiBreadcrumb/HiStepContent.js +1 -1
  87. package/es/HiBreadcrumb/HiStepIcon.js +1 -1
  88. package/es/HiBreadcrumb/HiStepLabel.js +1 -1
  89. package/es/HiBreadcrumb/HiStepper.js +1 -1
  90. package/es/HiButton/HiButton.js +56 -82
  91. package/es/HiCell/CellAddress.js +1 -1
  92. package/es/HiCell/CellDate.js +1 -1
  93. package/es/HiCell/CellIcon.js +1 -1
  94. package/es/HiCell/CellImage.js +1 -1
  95. package/es/HiCell/CellNumeric.js +1 -1
  96. package/es/HiCell/CellPinToAction.js +1 -1
  97. package/es/HiCell/CellRate.js +1 -1
  98. package/es/HiCell/CellSentinel.js +1 -1
  99. package/es/HiCell/CellSentinelScore.js +1 -1
  100. package/es/HiCell/CellText.js +1 -1
  101. package/es/HiCell/CellTextStyled.js +1 -1
  102. package/es/HiCheckbox/HiCheckbox.js +1 -1
  103. package/es/HiChip/HiChip.js +2 -2
  104. package/es/HiChip/HiChipSwitch.js +2 -2
  105. package/es/HiColoredLabel/HiColoredLabel.js +2 -2
  106. package/es/HiDatePicker/Caption.js +1 -1
  107. package/es/HiDatePicker/HiDatePicker.js +1 -1
  108. package/es/HiDatePicker/HiDatePickerMobile.js +1 -1
  109. package/es/HiDatePicker/HiDateRangePicker.js +1 -1
  110. package/es/HiDatePicker/HiDateRangeSelector.js +4 -3
  111. package/es/HiDatePicker/ListPicker.js +1 -1
  112. package/es/HiDatePicker/NavBar.js +1 -1
  113. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +1 -1
  114. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +1 -1
  115. package/es/HiDatePicker/Overlays/Overlay.js +1 -1
  116. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +1 -1
  117. package/es/HiDatePicker/stylesheet.js +1 -1
  118. package/es/HiDotsStepper/HiDot.js +1 -1
  119. package/es/HiDotsStepper/HiDotsStepper.js +1 -1
  120. package/es/HiExpansionPanel/HiExpansionPanel.js +34 -9
  121. package/es/HiForm/HiFormControl.js +1 -1
  122. package/es/HiForm/HiFormLabel.js +2 -2
  123. package/es/HiForm/HiInput.js +1 -1
  124. package/es/HiForm/HiPasswordField.js +5 -4
  125. package/es/HiForm/HiSlider.js +1 -1
  126. package/es/HiForm/HiUpload.js +1 -1
  127. package/es/HiForm/HiUploadInput.js +2 -2
  128. package/es/HiIcon/HiIcon.js +1 -1
  129. package/es/HiIconButton/HiIconButton.js +2 -2
  130. package/es/HiLoader/HiLoader.js +1 -1
  131. package/es/HiMap/HiMap.js +1 -1
  132. package/es/HiMap/HiMapExpand.js +1 -1
  133. package/es/HiNotice/HiKPI.js +7 -6
  134. package/es/HiPaymentMeans/HiPaymentMeans.js +1 -1
  135. package/es/HiPdfReader/HiPdfReader.js +1 -1
  136. package/es/HiPin/HiPin.js +2 -2
  137. package/es/HiRadio/HiRadio.js +1 -1
  138. package/es/HiSelect/HiNestedSelect.js +1 -1
  139. package/es/HiSelect/HiSelect.js +1 -1
  140. package/es/HiSelect/HiSelectContent.js +1 -1
  141. package/es/HiSelect/HiSelectInput.js +1 -1
  142. package/es/HiSelect/HiSelectMobile.js +1 -1
  143. package/es/HiSelect/HiSuggestSelect.js +1 -1
  144. package/es/HiSelectableList/HiSelectableList.js +1 -1
  145. package/es/HiSelectableList/HiSelectableListHierarchic.js +1 -1
  146. package/es/HiSelectableList/HiSelectableListItem.js +1 -1
  147. package/es/HiSwitch/HiSwitch.js +1 -1
  148. package/es/HiSwitch/HiSwitchState.js +1 -1
  149. package/es/HiTable/HiTable.js +1 -1
  150. package/es/HiTable/HiTableHeader.js +2 -2
  151. package/es/HiTable/HiTableRow.js +3 -2
  152. package/es/hi-svg-icons/HiAccount.js +1 -1
  153. package/es/hi-svg-icons/HiActivity.js +1 -1
  154. package/es/hi-svg-icons/HiAll.js +1 -1
  155. package/es/hi-svg-icons/HiBilling.js +1 -1
  156. package/es/hi-svg-icons/HiCatalog.js +1 -1
  157. package/es/hi-svg-icons/HiCustomer.js +1 -1
  158. package/es/hi-svg-icons/HiFinance.js +1 -1
  159. package/es/hi-svg-icons/HiPermission.js +1 -1
  160. package/es/hi-svg-icons/HiRoute.js +1 -1
  161. package/es/hi-svg-icons/HiSettlement.js +1 -1
  162. package/es/hi-svg-icons/HiTransaction.js +1 -1
  163. package/es/hi-svg-icons/HiUser.js +1 -1
  164. package/es/hi-svg-icons/HiWidget.js +1 -1
  165. package/es/index.js +0 -2
  166. package/es/styles/createMixins.js +4 -4
  167. package/es/styles/spacing.js +2 -5
  168. package/es/test-utils/getClasses.js +2 -16
  169. package/es/withMobileDialog/withMobileDialog.js +1 -1
  170. package/hi-svg-icons/HiAccount.js +1 -1
  171. package/hi-svg-icons/HiActivity.js +1 -1
  172. package/hi-svg-icons/HiAll.js +1 -1
  173. package/hi-svg-icons/HiBilling.js +1 -1
  174. package/hi-svg-icons/HiCatalog.js +1 -1
  175. package/hi-svg-icons/HiCustomer.js +1 -1
  176. package/hi-svg-icons/HiFinance.js +1 -1
  177. package/hi-svg-icons/HiPermission.js +1 -1
  178. package/hi-svg-icons/HiRoute.js +1 -1
  179. package/hi-svg-icons/HiSettlement.js +1 -1
  180. package/hi-svg-icons/HiTransaction.js +1 -1
  181. package/hi-svg-icons/HiUser.js +1 -1
  182. package/hi-svg-icons/HiWidget.js +1 -1
  183. package/index.es.js +1 -3
  184. package/index.js +1 -17
  185. package/package.json +4 -5
  186. package/styles/createMixins.js +4 -4
  187. package/styles/spacing.js +5 -4
  188. package/test-utils/getClasses.js +5 -29
  189. package/withMobileDialog/withMobileDialog.js +1 -1
  190. package/es/withWidth/index.js +0 -2
  191. package/es/withWidth/withWidth.js +0 -176
  192. package/withWidth/index.js +0 -27
  193. package/withWidth/withWidth.js +0 -229
@@ -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, withTheme } from '../styles';
11
+ import { withStyles } from '@material-ui/core/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 '../styles';
7
+ import { withStyles } from '@material-ui/core/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 '../styles/withStyles';
5
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles';
4
+ import { withStyles } from '@material-ui/core/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 '../styles';
6
+ import { withStyles } from '@material-ui/core/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.unit}px`
14
+ padding: `0 0 ${theme.spacing(2)}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.unit * 3,
21
+ minHeight: theme.spacing(6),
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 '../styles';
5
+ import { withStyles } from '@material-ui/core/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 '../styles';
4
+ import { withStyles } from '@material-ui/core/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 '../styles';
7
+ import { withStyles } from '@material-ui/core/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 '../styles';
4
+ import { withStyles } from '@material-ui/core/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 { withStyles } from '../styles';
8
- import { fade } from '../styles/colorManipulator';
7
+ import { makeStyles } from '@material-ui/core/styles';
8
+ import { fade } from '@material-ui/core/styles/colorManipulator';
9
9
  import Button from '@material-ui/core/Button';
10
- export const styles = theme => ({
10
+ const useStyles = makeStyles(theme => ({
11
11
  root: {
12
- '&$raisedDisabled': {
12
+ '&$containedDisabled': {
13
13
  color: theme.palette.neutral.contrastText,
14
14
  backgroundColor: theme.palette.neutral.main
15
15
  }
16
16
  },
17
- raisedDisabled: {},
18
- flatNeutral: {
17
+ containedDisabled: {},
18
+ textNeutral: {
19
19
  color: theme.palette.neutral.main,
20
20
  '&$disabled': {
21
21
  color: theme.palette.action.disabled
22
22
  }
23
23
  },
24
- flatPositive: {
24
+ textPositive: {
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 @@ export const styles = theme => ({
34
34
  color: theme.palette.action.disabled
35
35
  }
36
36
  },
37
- flatNegative: {
37
+ textNegative: {
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 @@ export const styles = theme => ({
47
47
  color: theme.palette.action.disabled
48
48
  }
49
49
  },
50
- flatMiddle: {
50
+ textMiddle: {
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 @@ export const styles = theme => ({
61
61
  }
62
62
  },
63
63
 
64
- /* Styles applied to the root element if `variant="[contained | fab]"` and `color="positive"`. */
64
+ /* Styles applied to the root element if `variant="[contained ]"` and `color="positive"`. */
65
65
  containedPrimary: {
66
66
  '&$disabled': {
67
67
  color: theme.palette.neutral.contrastText,
@@ -84,7 +84,7 @@ export const styles = theme => ({
84
84
  }
85
85
  },
86
86
 
87
- /* Styles applied to the root element if `variant="[contained | fab]"` and `color="negative"`. */
87
+ /* Styles applied to the root element if `variant="[contained]"` and `color="negative"`. */
88
88
  containedNegative: {
89
89
  color: theme.palette.negative.contrastText,
90
90
  backgroundColor: theme.palette.negative.main,
@@ -101,7 +101,7 @@ export const styles = theme => ({
101
101
  }
102
102
  },
103
103
 
104
- /* Styles applied to the root element if `variant="[contained | fab]"` and `color="middle"`. */
104
+ /* Styles applied to the root element if `variant="[contained]"` and `color="middle"`. */
105
105
  containedMiddle: {
106
106
  color: theme.palette.middle.contrastText,
107
107
  backgroundColor: theme.palette.middle.main,
@@ -118,7 +118,7 @@ export const styles = theme => ({
118
118
  }
119
119
  },
120
120
 
121
- /* Styles applied to the root element if `variant="[contained | fab]"` and `color="neutral"`. */
121
+ /* Styles applied to the root element if `variant="[contained]"` and `color="neutral"`. */
122
122
  containedNeutral: {
123
123
  color: theme.palette.neutral.contrastText,
124
124
  backgroundColor: theme.palette.neutral.main,
@@ -167,62 +167,49 @@ export const styles = 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);
170
211
  });
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
-
220
212
  HiButton.propTypes = process.env.NODE_ENV !== "production" ? {
221
- /**
222
- * Surcharge des classes
223
- */
224
- classes: PropTypes.object,
225
-
226
213
  /**
227
214
  * Surcharge des classes
228
215
  */
@@ -236,23 +223,10 @@ HiButton.propTypes = process.env.NODE_ENV !== "production" ? {
236
223
  /**
237
224
  * The variant to use.
238
225
  */
239
- variant: PropTypes.oneOf(['text', 'flat', 'outlined', 'contained', 'raised', 'fab', 'extendedFab'])
226
+ variant: PropTypes.oneOf(['text', 'outlined', 'contained'])
240
227
  } : {};
241
228
  HiButton.defaultProps = {
242
229
  color: 'neutral',
243
230
  variant: 'text'
244
231
  };
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);
232
+ export default HiButton;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import withStyles from '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
5
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
6
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
4
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
4
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
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: "raised"
61
+ variant: "contained"
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 '../styles/withStyles';
8
+ import { withStyles } from '@material-ui/core/styles';
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 '../styles/withStyles';
7
+ import { withStyles } from '@material-ui/core/styles';
8
8
  export const styles = theme => ({
9
9
  root: _objectSpread({}, theme.typography.b3, {
10
10
  display: 'inline-flex',
@@ -132,7 +132,7 @@ function HiChip(props) {
132
132
  title: title,
133
133
  onClick: onClick,
134
134
  onKeyDown: onKeyDown,
135
- tabIndex: "0"
135
+ tabIndex: onKeyDown ? "0" : "-1"
136
136
  }, icon && React.createElement(HiIcon, {
137
137
  className: classNames(classes.icon, {
138
138
  [classes.iconClickable]: onIconClick
@@ -5,8 +5,8 @@ import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import keycode from 'keycode/index';
7
7
  import HiIcon from '../HiIcon';
8
- import withStyles from '../styles/withStyles';
9
- import { emphasize } from '../styles/colorManipulator';
8
+ import { withStyles } from '@material-ui/core/styles';
9
+ import { emphasize } from '@material-ui/core/styles/colorManipulator';
10
10
  export const styles = theme => ({
11
11
  root: _objectSpread({}, theme.typography.b3, {
12
12
  display: 'inline-flex',
@@ -4,9 +4,9 @@ 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 '../styles/withStyles';
7
+ import { withStyles } from '@material-ui/core/styles';
8
8
  import { capitalize } from '../utils/helpers';
9
- import { fade } from '../styles/colorManipulator';
9
+ import { fade } from '@material-ui/core/styles/colorManipulator';
10
10
  export const styles = theme => ({
11
11
  root: {
12
12
  display: 'inline-block',
@@ -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 '../styles/withStyles';
4
+ import { withStyles } from '@material-ui/core/styles';
5
5
  import HiButton from '../HiButton';
6
6
  export const styles = theme => ({
7
7
  caption: _objectSpread({
@@ -7,7 +7,7 @@ import moment from 'moment-timezone';
7
7
  import MomentLocaleUtils from 'react-day-picker/moment';
8
8
  import HiLocaleUtils from './hiLocaleUtils';
9
9
  import DayPickerInput from 'react-day-picker/DayPickerInput';
10
- import withStyles from '../styles/withStyles';
10
+ import { withStyles } from '@material-ui/core/styles';
11
11
  import Caption from './Caption';
12
12
  import Overlay from './Overlays/Overlay';
13
13
  import TimePickerOverlay from './Overlays/TimePickerOverlay';
@@ -6,7 +6,7 @@ import HiFormControl from '../HiForm/HiFormControl';
6
6
  import moment from 'moment-timezone';
7
7
  import styles from './stylesheet';
8
8
  import classNames from 'classnames';
9
- import withStyles from '../styles/withStyles';
9
+ import { withStyles } from '@material-ui/core/styles';
10
10
  import HiInput from '../HiForm/HiInput';
11
11
 
12
12
  class HiDatePickerMobile extends React.Component {
@@ -8,7 +8,7 @@ import MomentLocaleUtils from 'react-day-picker/moment';
8
8
  import HiLocaleUtils from './hiLocaleUtils';
9
9
  import DayPickerInput from 'react-day-picker/DayPickerInput';
10
10
  import classNames from 'classnames';
11
- import withStyles from '../styles/withStyles';
11
+ import { withStyles } from '@material-ui/core/styles';
12
12
  import Caption from './Caption';
13
13
  import Overlay from './Overlays/Overlay';
14
14
  import TimePickerOverlay from './Overlays/TimePickerOverlay';
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types';
5
5
  import moment from 'moment-timezone';
6
6
  import { findDOMNode } from 'react-dom';
7
7
  import Grid from '@material-ui/core/Grid';
8
- import withStyles from '../styles/withStyles';
8
+ import { withStyles } from '@material-ui/core/styles';
9
9
  import HiSelectField from '../HiSelect/HiSelectField';
10
10
  import HiDateRangePicker from './HiDateRangePicker';
11
11
  import HiFormControl from '../HiForm/HiFormControl';
@@ -152,7 +152,6 @@ export function buildDateRangeOptionByKey(key, t, format, timezoneName) {
152
152
  export const styles = () => ({
153
153
  root: {
154
154
  maxWidth: 500,
155
- marginLeft: -4,
156
155
  alignItems: 'flex-start'
157
156
  },
158
157
  dateSelect: {
@@ -163,7 +162,9 @@ export const styles = () => ({
163
162
  width: 'calc(100% + 8px)',
164
163
  marginTop: 0
165
164
  },
166
- smSelect: {},
165
+ smSelect: {
166
+ padding: 4
167
+ },
167
168
  smRangePicker: {}
168
169
  });
169
170
 
@@ -4,7 +4,7 @@ import classNames from 'classnames';
4
4
  import { Scrollbars } from 'react-custom-scrollbars';
5
5
  import MenuList from '@material-ui/core/MenuList';
6
6
  import MenuItem from '@material-ui/core/MenuItem';
7
- import withStyles from '../styles/withStyles';
7
+ import { withStyles } from '@material-ui/core/styles';
8
8
  export const styles = theme => ({
9
9
  itemRoot: {
10
10
  '&:hover': {
@@ -5,7 +5,7 @@ import IconButton from '@material-ui/core/IconButton';
5
5
  import ChevronLeftIcon from '@material-ui/icons/ChevronLeft';
6
6
  import ChevronRightIcon from '@material-ui/icons/ChevronRight';
7
7
  import AccessTime from '@material-ui/icons/AccessTime';
8
- import withStyles from '../styles/withStyles';
8
+ import { withStyles } from '@material-ui/core/styles';
9
9
  export const styles = theme => ({
10
10
  root: {
11
11
  width: '100%',
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import Paper from '@material-ui/core/Paper';
7
- import withStyles from '../../styles/withStyles';
7
+ import { withStyles } from '@material-ui/core/styles';
8
8
  export const styles = theme => ({
9
9
  paper: {
10
10
  width: '100%',
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import Paper from '@material-ui/core/Paper';
7
- import withStyles from '../../styles/withStyles';
7
+ import { withStyles } from '@material-ui/core/styles';
8
8
  export const styles = theme => ({
9
9
  paper: {
10
10
  width: '100%',
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
5
  import classNames from 'classnames';
6
6
  import Paper from '@material-ui/core/Paper';
7
- import withStyles from '../../styles/withStyles';
7
+ import { withStyles } from '@material-ui/core/styles';
8
8
  export const styles = () => ({
9
9
  paper: {
10
10
  width: '100%',
@@ -7,7 +7,7 @@ import IconButton from '@material-ui/core/IconButton';
7
7
  import CalendarIcon from 'mdi-material-ui/Calendar';
8
8
  import CustomOverlayLayout from './CustomOverlayLayout';
9
9
  import ListPicker from '../ListPicker';
10
- import withStyles from '../../styles/withStyles';
10
+ import { withStyles } from '@material-ui/core/styles';
11
11
  export const styles = theme => ({
12
12
  paper: {
13
13
  position: 'absolute',
@@ -1,5 +1,5 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread";
2
- import { fade } from '../styles/colorManipulator';
2
+ import { fade } from '@material-ui/core/styles/colorManipulator';
3
3
  export default (theme => ({
4
4
  root: {
5
5
  position: 'relative',
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  import React from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import withStyles from '../styles/withStyles';
5
+ import { withStyles } from '@material-ui/core/styles';
6
6
  import HiIcon from '../HiIcon';
7
7
  import HiIconButton from '../HiIconButton';
8
8
  export const styles = () => ({
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import PropTypes from 'prop-types';
3
- import withStyles from '../styles/withStyles';
3
+ import { withStyles } from '@material-ui/core/styles';
4
4
  import HiDot from './HiDot';
5
5
  export const styles = () => ({
6
6
  dotStepper: {