@hipay/hipay-material-ui 2.0.0-beta.38 → 2.0.0-beta.40

Sign up to get free protection for your applications and to get access to all the features.
@@ -162,7 +162,7 @@ function (_React$Component) {
162
162
 
163
163
  HiCheckbox.defaultProps = {
164
164
  checked: false,
165
- color: 'default',
165
+ color: 'inherit',
166
166
  size: 20,
167
167
  icon: 'check_box_outline_blank'
168
168
  };
@@ -185,7 +185,7 @@ HiCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
185
185
  /**
186
186
  * The color of the component. It supports those theme colors that make sense for this component.
187
187
  */
188
- color: _propTypes.default.oneOf(['default', 'primary', 'secondary', 'positive', 'negative', 'middle', 'neutral']),
188
+ color: _propTypes.default.oneOf(['inherit', 'primary', 'secondary', 'positive', 'negative', 'middle', 'neutral']),
189
189
 
190
190
  /**
191
191
  * icon à afficher quand le composant est non coché.
package/HiChip/HiChip.js CHANGED
@@ -112,6 +112,7 @@ function HiChip(props) {
112
112
 
113
113
  var label = props.label,
114
114
  classes = props.classes,
115
+ fallbackImage = props.fallbackImage,
115
116
  icon = props.icon,
116
117
  _props$iconSize = props.iconSize,
117
118
  iconSize = _props$iconSize === void 0 ? 20 : _props$iconSize,
@@ -138,6 +139,13 @@ function HiChip(props) {
138
139
  className: classes.badge,
139
140
  src: img,
140
141
  alt: img,
142
+ onError: function onError(e) {
143
+ if (fallbackImage) {
144
+ e.target.src = "".concat(fallbackImage);
145
+ } else {
146
+ e.target.style.display = 'none';
147
+ }
148
+ },
141
149
  title: titleImg
142
150
  }), icon && _react.default.createElement(_HiIcon.default, {
143
151
  className: (0, _classnames.default)(classes.icon, (0, _defineProperty2.default)({}, classes.iconClickable, onIconClick)),
@@ -176,6 +184,11 @@ HiChip.propTypes = process.env.NODE_ENV !== "production" ? {
176
184
  */
177
185
  classes: _propTypes.default.object,
178
186
 
187
+ /**
188
+ * Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
189
+ */
190
+ fallbackImage: _propTypes.default.string,
191
+
179
192
  /**
180
193
  * Icone affiché à gauche
181
194
  */
@@ -39,16 +39,21 @@ var styles = function styles(theme) {
39
39
  color: theme.palette.neutral.main,
40
40
  position: 'inherit',
41
41
  transform: 'inherit',
42
- marginBottom: 2
42
+ marginBottom: 2,
43
+ '&$focused': {
44
+ color: theme.palette.primary.main
45
+ },
46
+ '&$error': {
47
+ color: theme.palette.negative.main
48
+ }
43
49
  }),
44
50
  optional: {
45
51
  fontSize: 11,
46
52
  marginLeft: 4,
47
53
  color: theme.palette.neutral.main
48
54
  },
49
- focused: {
50
- color: theme.palette.primary.main
51
- }
55
+ focused: {},
56
+ error: {}
52
57
  };
53
58
  };
54
59
  /**
@@ -87,7 +92,12 @@ function (_React$PureComponent) {
87
92
  htmlFor: htmlFor,
88
93
  className: className,
89
94
  focused: focused,
90
- required: false
95
+ required: false,
96
+ FormLabelClasses: {
97
+ root: classes.root,
98
+ error: classes.error,
99
+ focused: classes.focused
100
+ }
91
101
  }, InputLabelProps, other), label, !required && _react.default.createElement("span", {
92
102
  className: classes.optional
93
103
  }, " ", translations.optional), children);
package/HiForm/HiInput.js CHANGED
@@ -136,6 +136,10 @@ var styles = function styles(theme) {
136
136
  width: 40,
137
137
  display: 'inline-block'
138
138
  },
139
+ eraseButtonLabel: {
140
+ position: 'relative',
141
+ top: -2
142
+ },
139
143
  disabled: {
140
144
  borderBottom: 'none'
141
145
  },
@@ -334,6 +338,9 @@ function (_React$PureComponent) {
334
338
 
335
339
  var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && _react.default.createElement(_HiIconButton.default, {
336
340
  className: classes.eraseButton,
341
+ classes: {
342
+ label: classes.eraseButtonLabel
343
+ },
337
344
  onClick: this.handleReset,
338
345
  onBlur: this.handleBlur
339
346
  }, _ref);
package/HiIcon/HiIcon.js CHANGED
@@ -89,7 +89,7 @@ function HiIcon(props) {
89
89
 
90
90
  if (iconName.indexOf('fa-') === 0) {
91
91
  return _react.default.createElement("i", (0, _extends2.default)({
92
- className: (0, _classnames.default)('fa', iconName, classes.root, (0, _defineProperty2.default)({}, classes["color".concat((0, _helpers.capitalize)(color))], color !== 'inherit'), className),
92
+ className: (0, _classnames.default)('fa', iconName, className, classes.root, (0, _defineProperty2.default)({}, classes["color".concat((0, _helpers.capitalize)(color))], color !== 'inherit')),
93
93
  style: {
94
94
  fontSize: size
95
95
  }
@@ -28,6 +28,7 @@ var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton")
28
28
  // @inheritedComponent IconButton
29
29
  var styles = function styles(theme) {
30
30
  return {
31
+ label: {},
31
32
  positive: {
32
33
  color: theme.palette.positive.main,
33
34
  '&:hover': {
@@ -86,7 +87,8 @@ function HiIconButton(props) {
86
87
  return _react.default.createElement(_IconButton.default, (0, _extends2.default)({
87
88
  className: className,
88
89
  classes: {
89
- root: buttonClassNames
90
+ root: buttonClassNames,
91
+ label: classes.label
90
92
  },
91
93
  color: hcolor
92
94
  }, other), children);
@@ -109,7 +109,7 @@ var styles = function styles(theme) {
109
109
  }
110
110
  },
111
111
  disabled: {
112
- color: "".concat(theme.palette.action.disabled),
112
+ color: "".concat(theme.palette.text.disabled),
113
113
  '&:before': {
114
114
  display: 'none'
115
115
  }
@@ -0,0 +1,146 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+
12
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
13
+
14
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
15
+
16
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
17
+
18
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
19
+
20
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
21
+
22
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
23
+
24
+ var _react = _interopRequireDefault(require("react"));
25
+
26
+ var _propTypes = _interopRequireDefault(require("prop-types"));
27
+
28
+ var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
29
+
30
+ var _HiDynamicSelect = _interopRequireDefault(require("./HiDynamicSelect"));
31
+
32
+ // @inheritedComponent HiDynamicSelect
33
+
34
+ /**
35
+ * Champs input pour formulaire
36
+ */
37
+ var HiDynamicSelectField =
38
+ /*#__PURE__*/
39
+ function (_React$PureComponent) {
40
+ (0, _inherits2.default)(HiDynamicSelectField, _React$PureComponent);
41
+
42
+ function HiDynamicSelectField() {
43
+ (0, _classCallCheck2.default)(this, HiDynamicSelectField);
44
+ return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(HiDynamicSelectField).apply(this, arguments));
45
+ }
46
+
47
+ (0, _createClass2.default)(HiDynamicSelectField, [{
48
+ key: "render",
49
+ value: function render() {
50
+ var _this$props = this.props,
51
+ label = _this$props.label,
52
+ required = _this$props.required,
53
+ disabled = _this$props.disabled,
54
+ error = _this$props.error,
55
+ errorText = _this$props.errorText,
56
+ helperText = _this$props.helperText,
57
+ helperIcon = _this$props.helperIcon,
58
+ id = _this$props.id,
59
+ name = _this$props.name,
60
+ value = _this$props.value,
61
+ options = _this$props.options,
62
+ type = _this$props.type,
63
+ multiple = _this$props.multiple,
64
+ iconAll = _this$props.iconAll,
65
+ checkbox = _this$props.checkbox,
66
+ searchable = _this$props.searchable,
67
+ translations = _this$props.translations,
68
+ className = _this$props.className,
69
+ others = (0, _objectWithoutProperties2.default)(_this$props, ["label", "required", "disabled", "error", "errorText", "helperText", "helperIcon", "id", "name", "value", "options", "type", "multiple", "iconAll", "checkbox", "searchable", "translations", "className"]);
70
+ return _react.default.createElement(_HiFormControl.default, {
71
+ id: id,
72
+ label: label,
73
+ required: required,
74
+ disabled: disabled,
75
+ error: error,
76
+ errorText: errorText,
77
+ helperText: helperText,
78
+ helperIcon: helperIcon,
79
+ className: className
80
+ }, _react.default.createElement(_HiDynamicSelect.default, (0, _extends2.default)({
81
+ id: id,
82
+ name: name,
83
+ value: value,
84
+ options: options,
85
+ type: type,
86
+ multiple: multiple,
87
+ iconAll: iconAll,
88
+ checkbox: checkbox,
89
+ searchable: searchable,
90
+ translations: translations,
91
+ disabled: disabled,
92
+ error: error
93
+ }, others)));
94
+ }
95
+ }]);
96
+ return HiDynamicSelectField;
97
+ }(_react.default.PureComponent);
98
+
99
+ HiDynamicSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
100
+ /**
101
+ * Surcharge des styles
102
+ */
103
+ className: _propTypes.default.string,
104
+
105
+ /**
106
+ * Si `true`, l'input sera inactif.
107
+ */
108
+ disabled: _propTypes.default.bool,
109
+
110
+ /**
111
+ * Si `true`, le champs sera en erreur.
112
+ */
113
+ error: _propTypes.default.bool,
114
+
115
+ /**
116
+ * Texte de l'erreur
117
+ */
118
+ errorText: _propTypes.default.string,
119
+
120
+ /**
121
+ * Si "true", le texte d'aide s'affichera seulement au clic sur l'icône "Information"
122
+ */
123
+ helperIcon: _propTypes.default.bool,
124
+
125
+ /**
126
+ * Texte de l'aide
127
+ */
128
+ helperText: _propTypes.default.string,
129
+
130
+ /**
131
+ * id de l'élément input
132
+ */
133
+ id: _propTypes.default.string.isRequired,
134
+
135
+ /**
136
+ * Label du champs
137
+ */
138
+ label: _propTypes.default.string,
139
+
140
+ /**
141
+ * true si champs obligatoire
142
+ */
143
+ required: _propTypes.default.bool
144
+ } : {};
145
+ var _default = HiDynamicSelectField;
146
+ exports.default = _default;
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.default = void 0;
8
+ exports.default = exports.styles = void 0;
9
9
 
10
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
11
11
 
@@ -33,6 +33,8 @@ var _HiSelect = _interopRequireDefault(require("./HiSelect"));
33
33
 
34
34
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
35
35
 
36
+ var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
37
+
36
38
  // @inheritedComponent HiSelect
37
39
 
38
40
  /**
@@ -142,6 +144,26 @@ function buildFilteredItemList(itemList) {
142
144
  v: visibleParent
143
145
  });
144
146
  }
147
+
148
+ var styles = function styles(theme) {
149
+ return {
150
+ root: {
151
+ backgroundColor: theme.palette.background2,
152
+ maxWidth: 500,
153
+ width: '100%',
154
+ position: 'relative'
155
+ },
156
+ popper: {
157
+ // width: '100%',
158
+ zIndex: 1200
159
+ },
160
+ paper: {
161
+ borderRadius: '0px 2px',
162
+ maxHeight: 480,
163
+ transition: 'none !important'
164
+ }
165
+ };
166
+ };
145
167
  /**
146
168
  * HiNestedSelect hérite du composant HiSelect
147
169
  *
@@ -156,6 +178,8 @@ function buildFilteredItemList(itemList) {
156
178
  */
157
179
 
158
180
 
181
+ exports.styles = styles;
182
+
159
183
  var HiNestedSelect =
160
184
  /*#__PURE__*/
161
185
  function (_React$PureComponent) {
@@ -284,9 +308,9 @@ function (_React$PureComponent) {
284
308
  }), selectedItem.label);
285
309
  } else if (selectedItem.type === 'image') {
286
310
  inputValue = _react.default.createElement("span", {
287
- className: classes.selectIconLabel
311
+ className: classes.selectImgLabel
288
312
  }, _react.default.createElement("img", {
289
- className: classes.labelIcon,
313
+ className: classes.labelImg,
290
314
  src: selectedItem.img,
291
315
  alt: selectedItem.label
292
316
  }), selectedItem.label);
@@ -449,5 +473,10 @@ HiNestedSelect.propTypes = process.env.NODE_ENV !== "production" ? {
449
473
  */
450
474
  value: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string, _propTypes.default.array])
451
475
  } : {};
452
- var _default = HiNestedSelect;
476
+
477
+ var _default = (0, _withStyles.default)(styles, {
478
+ hiComponent: true,
479
+ name: 'HmuiHiNestedSelect'
480
+ })(HiNestedSelect);
481
+
453
482
  exports.default = _default;
@@ -62,17 +62,23 @@ var styles = function styles(theme) {
62
62
  position: 'relative'
63
63
  },
64
64
  popper: {
65
- // width: '100%',
65
+ width: '100%',
66
66
  zIndex: 1200
67
67
  },
68
68
  paper: {
69
69
  borderRadius: '0px 2px',
70
- maxHeight: 440,
70
+ maxHeight: 480,
71
71
  transition: 'none !important'
72
72
  },
73
73
  labelIcon: {
74
74
  marginRight: 10
75
75
  },
76
+ labelImg: {
77
+ height: 18,
78
+ width: 'auto',
79
+ margin: '0 4px',
80
+ verticalAlign: 'middle'
81
+ },
76
82
  selectIconLabel: (0, _extends2.default)({
77
83
  whiteSpace: 'nowrap',
78
84
  overflow: 'hidden',
@@ -81,6 +87,15 @@ var styles = function styles(theme) {
81
87
  }, theme.typography.b1, {
82
88
  display: 'inline-flex',
83
89
  width: '100%'
90
+ }),
91
+ selectImgLabel: (0, _extends2.default)({
92
+ whiteSpace: 'nowrap',
93
+ overflow: 'hidden',
94
+ textOverflow: 'ellipsis',
95
+ paddingRight: 16
96
+ }, theme.typography.b1, {
97
+ display: 'inline-flex',
98
+ width: '100%'
84
99
  })
85
100
  };
86
101
  };
@@ -176,8 +191,10 @@ function (_React$PureComponent) {
176
191
  _this.handleKeyDownSearch = function (event) {
177
192
  var key = (0, _keycode.default)(event);
178
193
 
179
- if (_this.overlay && (key === 'ArrowDown' || key === 'ArrowUp')) {
194
+ if (_this.overlay && (key === 'down' || key === 'up')) {
180
195
  _this.focusOnFirstItem();
196
+ } else if (_this.overlay && key === 'esc') {
197
+ _this.handleClose();
181
198
  }
182
199
  };
183
200
 
@@ -363,7 +380,7 @@ function (_React$PureComponent) {
363
380
  inputValue = _react.default.createElement("span", {
364
381
  className: classes.selectIconLabel
365
382
  }, _react.default.createElement("img", {
366
- className: classes.labelIcon,
383
+ className: classes.labelImg,
367
384
  src: item.img,
368
385
  alt: item.label
369
386
  }), item.label);
@@ -479,7 +496,8 @@ function (_React$PureComponent) {
479
496
  itemList: itemList,
480
497
  onKeyDown: this.handleKeyDown,
481
498
  onSelect: this.handleSelect,
482
- selectedItemIdList: selectedItemIdList
499
+ selectedItemIdList: selectedItemIdList,
500
+ fallbackImage: this.props.fallbackImage
483
501
  }, hiSelectableListProps))))));
484
502
 
485
503
  return _react.default.createElement("div", {
@@ -576,6 +594,11 @@ HiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
576
594
  */
577
595
  error: _propTypes.default.bool,
578
596
 
597
+ /**
598
+ * Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
599
+ */
600
+ fallbackImage: _propTypes.default.string,
601
+
579
602
  /**
580
603
  * Affiche l'élément 'All'
581
604
  */
@@ -111,7 +111,7 @@ var styles = function styles(theme) {
111
111
  }
112
112
  },
113
113
  disabled: {
114
- color: "".concat(theme.palette.action.disabled),
114
+ color: theme.palette.text.disabled,
115
115
  '&:before': {
116
116
  display: 'none'
117
117
  }
@@ -83,7 +83,8 @@ var styles = function styles(theme) {
83
83
  },
84
84
  disabled: {
85
85
  fontWeight: theme.typography.fontWeightLight,
86
- cursor: 'default'
86
+ cursor: 'default',
87
+ opacity: 'inherit'
87
88
  },
88
89
  selected: {
89
90
  backgroundColor: theme.palette.action.selected
@@ -110,7 +111,6 @@ var styles = function styles(theme) {
110
111
  }, theme.typography.b1, {
111
112
  fontWeight: 'inherit',
112
113
  width: '100%',
113
- height: '-webkit-fill-available',
114
114
  padding: '5px 0'
115
115
  }),
116
116
  label: {
@@ -138,9 +138,7 @@ var styles = function styles(theme) {
138
138
  color: theme.palette.neutral.main,
139
139
  fontWeight: theme.typography.fontWeightLight,
140
140
  fontSize: 12,
141
- width: '-webkit-fill-available',
142
141
  whiteSpace: 'nowrap',
143
- overflow: 'hidden',
144
142
  textOverflow: 'ellipsis',
145
143
  textAlign: 'right',
146
144
  margin: '4px 12px 4px 8px',
@@ -257,6 +255,7 @@ function (_React$Component) {
257
255
  classes = _this$props2.classes,
258
256
  selected = _this$props2.selected,
259
257
  disabled = _this$props2.disabled,
258
+ fallbackImage = _this$props2.fallbackImage,
260
259
  hideCheckbox = _this$props2.hideCheckbox,
261
260
  onSelect = _this$props2.onSelect,
262
261
  indeterminate = _this$props2.indeterminate,
@@ -328,6 +327,13 @@ function (_React$Component) {
328
327
  }), type === 'image' && img && _react.default.createElement("img", {
329
328
  src: img,
330
329
  alt: img,
330
+ onError: function onError(e) {
331
+ if (fallbackImage) {
332
+ e.target.src = "".concat(fallbackImage);
333
+ } else {
334
+ e.target.style.display = 'none';
335
+ }
336
+ },
331
337
  className: classes.img
332
338
  }), this.buildItemLabel(), !!secondaryLabel && _react.default.createElement("div", {
333
339
  className: (0, _classnames.default)(classes.secondaryLabel, (0, _defineProperty2.default)({}, classes.inline, secondaryInline))
@@ -379,6 +385,11 @@ HiSelectableListItem.propTypes = process.env.NODE_ENV !== "production" ? {
379
385
  */
380
386
  disabled: _propTypes.default.bool,
381
387
 
388
+ /**
389
+ * Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
390
+ */
391
+ fallbackImage: _propTypes.default.string,
392
+
382
393
  /**
383
394
  * N'affiche pas de checkboxes
384
395
  */
@@ -125,7 +125,7 @@ class HiCheckbox extends React.Component {
125
125
 
126
126
  HiCheckbox.defaultProps = {
127
127
  checked: false,
128
- color: 'default',
128
+ color: 'inherit',
129
129
  size: 20,
130
130
  icon: 'check_box_outline_blank'
131
131
  };
@@ -148,7 +148,7 @@ HiCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
148
148
  /**
149
149
  * The color of the component. It supports those theme colors that make sense for this component.
150
150
  */
151
- color: PropTypes.oneOf(['default', 'primary', 'secondary', 'positive', 'negative', 'middle', 'neutral']),
151
+ color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'positive', 'negative', 'middle', 'neutral']),
152
152
 
153
153
  /**
154
154
  * icon à afficher quand le composant est non coché.
@@ -90,6 +90,7 @@ function HiChip(props) {
90
90
  const {
91
91
  label,
92
92
  classes,
93
+ fallbackImage,
93
94
  icon,
94
95
  iconSize = 20,
95
96
  id,
@@ -121,6 +122,13 @@ function HiChip(props) {
121
122
  className: classes.badge,
122
123
  src: img,
123
124
  alt: img,
125
+ onError: e => {
126
+ if (fallbackImage) {
127
+ e.target.src = `${fallbackImage}`;
128
+ } else {
129
+ e.target.style.display = 'none';
130
+ }
131
+ },
124
132
  title: titleImg
125
133
  }), icon && React.createElement(HiIcon, {
126
134
  className: classNames(classes.icon, {
@@ -161,6 +169,11 @@ HiChip.propTypes = process.env.NODE_ENV !== "production" ? {
161
169
  */
162
170
  classes: PropTypes.object,
163
171
 
172
+ /**
173
+ * Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
174
+ */
175
+ fallbackImage: PropTypes.string,
176
+
164
177
  /**
165
178
  * Icone affiché à gauche
166
179
  */
@@ -13,16 +13,21 @@ export const styles = theme => ({
13
13
  color: theme.palette.neutral.main,
14
14
  position: 'inherit',
15
15
  transform: 'inherit',
16
- marginBottom: 2
16
+ marginBottom: 2,
17
+ '&$focused': {
18
+ color: theme.palette.primary.main
19
+ },
20
+ '&$error': {
21
+ color: theme.palette.negative.main
22
+ }
17
23
  }),
18
24
  optional: {
19
25
  fontSize: 11,
20
26
  marginLeft: 4,
21
27
  color: theme.palette.neutral.main
22
28
  },
23
- focused: {
24
- color: theme.palette.primary.main
25
- }
29
+ focused: {},
30
+ error: {}
26
31
  });
27
32
  /**
28
33
  * Label pour champs de formulaire
@@ -49,7 +54,12 @@ class HiFormLabel extends React.PureComponent {
49
54
  htmlFor: htmlFor,
50
55
  className: className,
51
56
  focused: focused,
52
- required: false
57
+ required: false,
58
+ FormLabelClasses: {
59
+ root: classes.root,
60
+ error: classes.error,
61
+ focused: classes.focused
62
+ }
53
63
  }, InputLabelProps, other), label, !required && React.createElement("span", {
54
64
  className: classes.optional
55
65
  }, " ", translations.optional), children);
@@ -104,6 +104,10 @@ export const styles = theme => ({
104
104
  width: 40,
105
105
  display: 'inline-block'
106
106
  },
107
+ eraseButtonLabel: {
108
+ position: 'relative',
109
+ top: -2
110
+ },
107
111
  disabled: {
108
112
  borderBottom: 'none'
109
113
  },
@@ -288,6 +292,9 @@ class HiInput extends React.PureComponent {
288
292
 
289
293
  const eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && React.createElement(HiIconButton, {
290
294
  className: classes.eraseButton,
295
+ classes: {
296
+ label: classes.eraseButtonLabel
297
+ },
291
298
  onClick: this.handleReset,
292
299
  onBlur: this.handleBlur
293
300
  }, _ref);
@@ -65,9 +65,9 @@ function HiIcon(props) {
65
65
 
66
66
  if (iconName.indexOf('fa-') === 0) {
67
67
  return React.createElement("i", _extends({
68
- className: classNames('fa', iconName, classes.root, {
68
+ className: classNames('fa', iconName, className, classes.root, {
69
69
  [classes[`color${capitalize(color)}`]]: color !== 'inherit'
70
- }, className),
70
+ }),
71
71
  style: {
72
72
  fontSize: size
73
73
  }
@@ -8,6 +8,7 @@ import { withStyles } from '../styles';
8
8
  import { fade } from '../styles/colorManipulator';
9
9
  import IconButton from '@material-ui/core/IconButton';
10
10
  export const styles = theme => ({
11
+ label: {},
11
12
  positive: {
12
13
  color: theme.palette.positive.main,
13
14
  '&:hover': {
@@ -69,7 +70,8 @@ function HiIconButton(props) {
69
70
  return React.createElement(IconButton, _extends({
70
71
  className: className,
71
72
  classes: {
72
- root: buttonClassNames
73
+ root: buttonClassNames,
74
+ label: classes.label
73
75
  },
74
76
  color: hcolor
75
77
  }, other), children);
@@ -77,7 +77,7 @@ export const styles = theme => ({
77
77
  }
78
78
  },
79
79
  disabled: {
80
- color: `${theme.palette.action.disabled}`,
80
+ color: `${theme.palette.text.disabled}`,
81
81
  '&:before': {
82
82
  display: 'none'
83
83
  }