@hipay/hipay-material-ui 2.0.0-beta.35 → 2.0.0-beta.36
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.
- package/HiCheckbox/HiCheckbox.js +15 -9
- package/HiIcon/HiIcon.js +7 -23
- package/HiSelectableList/HiSelectableListItem.js +12 -8
- package/es/HiCheckbox/HiCheckbox.js +16 -10
- package/es/HiDatePicker/HiDatePicker.js +2 -2
- package/es/HiIcon/HiIcon.js +7 -23
- package/es/HiSelectableList/HiSelectableListItem.js +12 -8
- package/es/styles/createPalette.js +2 -2
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -1
- package/styles/createPalette.js +2 -2
- package/umd/hipay-material-ui.development.js +27 -37
- package/umd/hipay-material-ui.production.min.js +2 -2
package/HiCheckbox/HiCheckbox.js
CHANGED
@@ -41,8 +41,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
41
41
|
var styles = function styles(theme) {
|
42
42
|
return {
|
43
43
|
root: {
|
44
|
-
marginRight:
|
45
|
-
marginLeft:
|
44
|
+
marginRight: 6,
|
45
|
+
marginLeft: 6,
|
46
|
+
padding: 0
|
46
47
|
},
|
47
48
|
checked: {},
|
48
49
|
checkedPrimary: {
|
@@ -117,16 +118,17 @@ function (_React$Component) {
|
|
117
118
|
indeterminateIcon = _this$props.indeterminateIcon,
|
118
119
|
style = _this$props.style,
|
119
120
|
size = _this$props.size,
|
120
|
-
|
121
|
+
className = _this$props.className,
|
122
|
+
other = (0, _objectWithoutProperties2.default)(_this$props, ["classes", "color", "checkedIcon", "icon", "indeterminateIcon", "style", "size", "className"]);
|
121
123
|
var iconStyles = (0, _extends2.default)({
|
122
124
|
width: size,
|
123
125
|
height: size
|
124
126
|
}, style);
|
125
|
-
var hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? '
|
127
|
+
var hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? 'inherit' : color;
|
126
128
|
return _react.default.createElement(_Checkbox.default, (0, _extends2.default)({
|
127
129
|
classes: {
|
128
130
|
root: classes.root,
|
129
|
-
checked: (0, _classnames.default)(classes.checked, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.checkedPrimary, color === 'primary' || color === '
|
131
|
+
checked: (0, _classnames.default)(classes.checked, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.checkedPrimary, color === 'primary' || color === 'inherit'), (0, _defineProperty2.default)(_classNames, classes.checkedSecondary, color === 'secondary'), (0, _defineProperty2.default)(_classNames, classes.checkedPositive, color === 'positive'), (0, _defineProperty2.default)(_classNames, classes.checkedNegative, color === 'negative'), (0, _defineProperty2.default)(_classNames, classes.checkedMiddle, color === 'middle'), (0, _defineProperty2.default)(_classNames, classes.checkedNeutral, color === 'neutral'), _classNames)),
|
130
132
|
disabled: classes.disabled
|
131
133
|
},
|
132
134
|
style: iconStyles,
|
@@ -135,19 +137,22 @@ function (_React$Component) {
|
|
135
137
|
}, icon && {
|
136
138
|
icon: _react.default.createElement(_HiIcon.default, {
|
137
139
|
className: classes.root,
|
138
|
-
icon: icon
|
140
|
+
icon: icon,
|
141
|
+
size: 20
|
139
142
|
})
|
140
143
|
}, checkedIcon && {
|
141
144
|
checkedIcon: _react.default.createElement(_HiIcon.default, {
|
142
145
|
className: classes.root,
|
143
146
|
icon: checkedIcon,
|
144
|
-
color: color
|
147
|
+
color: color,
|
148
|
+
size: 20
|
145
149
|
})
|
146
150
|
}, indeterminateIcon && {
|
147
151
|
indeterminateIcon: _react.default.createElement(_HiIcon.default, {
|
148
152
|
className: classes.root,
|
149
153
|
icon: indeterminateIcon,
|
150
|
-
color: color
|
154
|
+
color: color,
|
155
|
+
size: 20
|
151
156
|
})
|
152
157
|
}, other));
|
153
158
|
}
|
@@ -158,7 +163,8 @@ function (_React$Component) {
|
|
158
163
|
HiCheckbox.defaultProps = {
|
159
164
|
checked: false,
|
160
165
|
color: 'default',
|
161
|
-
size: 20
|
166
|
+
size: 20,
|
167
|
+
icon: 'check_box_outline_blank'
|
162
168
|
};
|
163
169
|
HiCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
|
164
170
|
/**
|
package/HiIcon/HiIcon.js
CHANGED
@@ -38,7 +38,7 @@ var styles = function styles(theme) {
|
|
38
38
|
|
39
39
|
/* Styles applied to the root element. */
|
40
40
|
faIcon: {
|
41
|
-
fontSize:
|
41
|
+
fontSize: 20
|
42
42
|
},
|
43
43
|
|
44
44
|
/* Styles applied to the root element if `color="primary"`. */
|
@@ -80,11 +80,10 @@ function HiIcon(props) {
|
|
80
80
|
classes = props.classes,
|
81
81
|
className = props.className,
|
82
82
|
color = props.color,
|
83
|
-
fontSize = props.fontSize,
|
84
83
|
icon = props.icon,
|
85
84
|
size = props.size,
|
86
85
|
theme = props.theme,
|
87
|
-
other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "color", "
|
86
|
+
other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "color", "icon", "size", "theme"]);
|
88
87
|
var iconName = icon !== null ? icon : children;
|
89
88
|
var isHiColor = ['positive', 'negative', 'middle', 'neutral'].includes(color); // Line Awesome icons
|
90
89
|
|
@@ -92,7 +91,7 @@ function HiIcon(props) {
|
|
92
91
|
return _react.default.createElement("i", (0, _extends2.default)({
|
93
92
|
className: (0, _classnames.default)('fa', iconName, classes.root, (0, _defineProperty2.default)({}, classes["color".concat((0, _helpers.capitalize)(color))], color !== 'inherit'), className),
|
94
93
|
style: {
|
95
|
-
fontSize:
|
94
|
+
fontSize: size
|
96
95
|
}
|
97
96
|
}, other));
|
98
97
|
} // Specific HiPay icons
|
@@ -102,12 +101,9 @@ function HiIcon(props) {
|
|
102
101
|
var IconName = hiSvgIcons[(0, _helpers.capitalize)((0, _helpers.camelize)(iconName))];
|
103
102
|
return _react.default.createElement(IconName, (0, _extends2.default)({
|
104
103
|
className: (0, _classnames.default)(classes.root, className),
|
105
|
-
color: isHiColor || color === 'primary' || color === 'secondary' ? theme.palette[color].main : theme.palette.primary.main
|
106
|
-
}, fontSize === 'default' ? {
|
104
|
+
color: isHiColor || color === 'primary' || color === 'secondary' ? theme.palette[color].main : theme.palette.primary.main,
|
107
105
|
width: size,
|
108
106
|
height: size
|
109
|
-
} : {
|
110
|
-
fontSize: fontSize
|
111
107
|
}, other));
|
112
108
|
} // MDI - Material Design Icons - https://materialdesignicons.com
|
113
109
|
|
@@ -116,26 +112,20 @@ function HiIcon(props) {
|
|
116
112
|
var _IconName = mdi[(0, _helpers.capitalize)((0, _helpers.camelize)(iconName.slice(4)))];
|
117
113
|
return _react.default.createElement(_IconName, (0, _extends2.default)({
|
118
114
|
className: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)({}, classes["color".concat((0, _helpers.capitalize)(color))], isHiColor), className),
|
119
|
-
color: isHiColor ? 'inherit' : color
|
120
|
-
}, fontSize === 'default' ? {
|
115
|
+
color: isHiColor ? 'inherit' : color,
|
121
116
|
style: {
|
122
117
|
fontSize: size
|
123
118
|
}
|
124
|
-
} : {
|
125
|
-
fontSize: fontSize
|
126
119
|
}, other));
|
127
120
|
} // @material-ui/icons
|
128
121
|
|
129
122
|
|
130
123
|
return _react.default.createElement(_Icon.default, (0, _extends2.default)({
|
131
124
|
className: (0, _classnames.default)(classes.root, (0, _defineProperty2.default)({}, classes["color".concat((0, _helpers.capitalize)(color))], isHiColor), className),
|
132
|
-
color: isHiColor ? 'inherit' : color
|
133
|
-
}, fontSize === 'default' ? {
|
125
|
+
color: isHiColor ? 'inherit' : color,
|
134
126
|
style: {
|
135
127
|
fontSize: size
|
136
128
|
}
|
137
|
-
} : {
|
138
|
-
fontSize: fontSize
|
139
129
|
}, other), iconName);
|
140
130
|
}
|
141
131
|
|
@@ -161,11 +151,6 @@ HiIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
161
151
|
*/
|
162
152
|
color: _propTypes.default.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled', 'positive', 'negative', 'middle', 'neutral']),
|
163
153
|
|
164
|
-
/**
|
165
|
-
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
166
|
-
*/
|
167
|
-
fontSize: _propTypes.default.oneOf(['inherit', 'default']),
|
168
|
-
|
169
154
|
/**
|
170
155
|
* Deprecated use (same as children)
|
171
156
|
* The name of the icon font ligature.
|
@@ -179,9 +164,8 @@ HiIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
179
164
|
} : {};
|
180
165
|
HiIcon.defaultProps = {
|
181
166
|
color: 'inherit',
|
182
|
-
fontSize: 'default',
|
183
167
|
icon: null,
|
184
|
-
size:
|
168
|
+
size: 20
|
185
169
|
};
|
186
170
|
HiIcon.muiName = 'HiIcon';
|
187
171
|
|
@@ -50,6 +50,7 @@ var styles = function styles(theme) {
|
|
50
50
|
root: {},
|
51
51
|
listItem: {
|
52
52
|
backgroundColor: theme.palette.background3,
|
53
|
+
color: theme.palette.neutral.dark,
|
53
54
|
padding: '5px 0',
|
54
55
|
fontWeight: theme.typography.fontWeightRegular,
|
55
56
|
maxHeight: 56,
|
@@ -79,7 +80,6 @@ var styles = function styles(theme) {
|
|
79
80
|
width: '100%'
|
80
81
|
},
|
81
82
|
disabled: {
|
82
|
-
color: theme.palette.action.disabled,
|
83
83
|
fontWeight: theme.typography.fontWeightLight,
|
84
84
|
cursor: 'default'
|
85
85
|
},
|
@@ -109,11 +109,11 @@ var styles = function styles(theme) {
|
|
109
109
|
fontWeight: 'inherit',
|
110
110
|
width: '100%',
|
111
111
|
height: '-webkit-fill-available',
|
112
|
-
padding: '
|
112
|
+
padding: '5px 0'
|
113
113
|
}),
|
114
114
|
label: {
|
115
115
|
display: 'inline-block',
|
116
|
-
margin: '1px 0
|
116
|
+
margin: '1px 0'
|
117
117
|
},
|
118
118
|
coloredLabel: {
|
119
119
|
display: 'inline-flex',
|
@@ -147,7 +147,7 @@ var styles = function styles(theme) {
|
|
147
147
|
width: 20,
|
148
148
|
height: 20,
|
149
149
|
fontSize: 20,
|
150
|
-
|
150
|
+
marginTop: 3
|
151
151
|
},
|
152
152
|
img: {
|
153
153
|
width: 24,
|
@@ -303,12 +303,14 @@ function (_React$Component) {
|
|
303
303
|
onMouseLeave: this.setHover(false)
|
304
304
|
}, {
|
305
305
|
style: {
|
306
|
-
paddingLeft: "".concat(
|
306
|
+
paddingLeft: "".concat(level * 32, "px")
|
307
307
|
}
|
308
308
|
}), !hideCheckbox && !pinned && _react.default.createElement(_HiCheckbox.default, {
|
309
309
|
checked: selected,
|
310
310
|
checkedIcon: checkedIcon,
|
311
|
-
|
311
|
+
classes: {
|
312
|
+
root: classes.checkbox
|
313
|
+
},
|
312
314
|
color: "primary" // TODO ?
|
313
315
|
,
|
314
316
|
disabled: disabled,
|
@@ -338,9 +340,11 @@ HiSelectableListItem.defaultProps = {
|
|
338
340
|
centered: false,
|
339
341
|
disabled: false,
|
340
342
|
hideCheckbox: false,
|
343
|
+
hoverIcon: 'check_box_outline_blank',
|
344
|
+
checkedIcon: 'check_box',
|
341
345
|
indeterminate: false,
|
342
346
|
level: 0,
|
343
|
-
paddingLeft:
|
347
|
+
paddingLeft: 0,
|
344
348
|
pinned: false,
|
345
349
|
secondaryInline: true,
|
346
350
|
selected: false,
|
@@ -380,7 +384,7 @@ HiSelectableListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
380
384
|
/**
|
381
385
|
* Icon affiché lorsque l'item n'est pas sélectionné et qu'on le survole
|
382
386
|
*/
|
383
|
-
hoverIcon: _propTypes.default.
|
387
|
+
hoverIcon: _propTypes.default.node,
|
384
388
|
|
385
389
|
/**
|
386
390
|
* Icon affiché lorsque l'item n'est pas sélectionné
|
@@ -10,8 +10,9 @@ import HiIcon from '../HiIcon';
|
|
10
10
|
import classNames from 'classnames';
|
11
11
|
export const styles = theme => ({
|
12
12
|
root: {
|
13
|
-
marginRight:
|
14
|
-
marginLeft:
|
13
|
+
marginRight: 6,
|
14
|
+
marginLeft: 6,
|
15
|
+
padding: 0
|
15
16
|
},
|
16
17
|
checked: {},
|
17
18
|
checkedPrimary: {
|
@@ -70,21 +71,22 @@ class HiCheckbox extends React.Component {
|
|
70
71
|
icon,
|
71
72
|
indeterminateIcon,
|
72
73
|
style,
|
73
|
-
size
|
74
|
+
size,
|
75
|
+
className
|
74
76
|
} = _this$props,
|
75
|
-
other = _objectWithoutProperties(_this$props, ["classes", "color", "checkedIcon", "icon", "indeterminateIcon", "style", "size"]);
|
77
|
+
other = _objectWithoutProperties(_this$props, ["classes", "color", "checkedIcon", "icon", "indeterminateIcon", "style", "size", "className"]);
|
76
78
|
|
77
79
|
const iconStyles = _objectSpread({
|
78
80
|
width: size,
|
79
81
|
height: size
|
80
82
|
}, style);
|
81
83
|
|
82
|
-
const hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? '
|
84
|
+
const hcolor = ['positive', 'negative', 'middle', 'neutral'].includes(color) ? 'inherit' : color;
|
83
85
|
return React.createElement(Checkbox, _extends({
|
84
86
|
classes: {
|
85
87
|
root: classes.root,
|
86
88
|
checked: classNames(classes.checked, {
|
87
|
-
[classes.checkedPrimary]: color === 'primary' || color === '
|
89
|
+
[classes.checkedPrimary]: color === 'primary' || color === 'inherit',
|
88
90
|
[classes.checkedSecondary]: color === 'secondary',
|
89
91
|
[classes.checkedPositive]: color === 'positive',
|
90
92
|
[classes.checkedNegative]: color === 'negative',
|
@@ -99,19 +101,22 @@ class HiCheckbox extends React.Component {
|
|
99
101
|
}, icon && {
|
100
102
|
icon: React.createElement(HiIcon, {
|
101
103
|
className: classes.root,
|
102
|
-
icon: icon
|
104
|
+
icon: icon,
|
105
|
+
size: 20
|
103
106
|
})
|
104
107
|
}, checkedIcon && {
|
105
108
|
checkedIcon: React.createElement(HiIcon, {
|
106
109
|
className: classes.root,
|
107
110
|
icon: checkedIcon,
|
108
|
-
color: color
|
111
|
+
color: color,
|
112
|
+
size: 20
|
109
113
|
})
|
110
114
|
}, indeterminateIcon && {
|
111
115
|
indeterminateIcon: React.createElement(HiIcon, {
|
112
116
|
className: classes.root,
|
113
117
|
icon: indeterminateIcon,
|
114
|
-
color: color
|
118
|
+
color: color,
|
119
|
+
size: 20
|
115
120
|
})
|
116
121
|
}, other));
|
117
122
|
}
|
@@ -121,7 +126,8 @@ class HiCheckbox extends React.Component {
|
|
121
126
|
HiCheckbox.defaultProps = {
|
122
127
|
checked: false,
|
123
128
|
color: 'default',
|
124
|
-
size: 20
|
129
|
+
size: 20,
|
130
|
+
icon: 'check_box_outline_blank'
|
125
131
|
};
|
126
132
|
HiCheckbox.propTypes = process.env.NODE_ENV !== "production" ? {
|
127
133
|
/**
|
@@ -254,8 +254,8 @@ class HiDatePicker extends React.Component {
|
|
254
254
|
inputProps: inputProps,
|
255
255
|
placeholder: '',
|
256
256
|
format: enableTime ? `${format} HH:mm` : format,
|
257
|
-
formatDate:
|
258
|
-
parseDate:
|
257
|
+
formatDate: MomentLocaleUtils.formatDate,
|
258
|
+
parseDate: MomentLocaleUtils.parseDate,
|
259
259
|
onDayChange: this.handleDayChange
|
260
260
|
}));
|
261
261
|
}
|
package/es/HiIcon/HiIcon.js
CHANGED
@@ -14,7 +14,7 @@ export const styles = theme => ({
|
|
14
14
|
|
15
15
|
/* Styles applied to the root element. */
|
16
16
|
faIcon: {
|
17
|
-
fontSize:
|
17
|
+
fontSize: 20
|
18
18
|
},
|
19
19
|
|
20
20
|
/* Styles applied to the root element if `color="primary"`. */
|
@@ -54,12 +54,11 @@ function HiIcon(props) {
|
|
54
54
|
classes,
|
55
55
|
className,
|
56
56
|
color,
|
57
|
-
fontSize,
|
58
57
|
icon,
|
59
58
|
size,
|
60
59
|
theme
|
61
60
|
} = props,
|
62
|
-
other = _objectWithoutProperties(props, ["children", "classes", "className", "color", "
|
61
|
+
other = _objectWithoutProperties(props, ["children", "classes", "className", "color", "icon", "size", "theme"]);
|
63
62
|
|
64
63
|
const iconName = icon !== null ? icon : children;
|
65
64
|
const isHiColor = ['positive', 'negative', 'middle', 'neutral'].includes(color); // Line Awesome icons
|
@@ -70,7 +69,7 @@ function HiIcon(props) {
|
|
70
69
|
[classes[`color${capitalize(color)}`]]: color !== 'inherit'
|
71
70
|
}, className),
|
72
71
|
style: {
|
73
|
-
fontSize:
|
72
|
+
fontSize: size
|
74
73
|
}
|
75
74
|
}, other));
|
76
75
|
} // Specific HiPay icons
|
@@ -80,12 +79,9 @@ function HiIcon(props) {
|
|
80
79
|
const IconName = hiSvgIcons[capitalize(camelize(iconName))];
|
81
80
|
return React.createElement(IconName, _extends({
|
82
81
|
className: classNames(classes.root, className),
|
83
|
-
color: isHiColor || color === 'primary' || color === 'secondary' ? theme.palette[color].main : theme.palette.primary.main
|
84
|
-
}, fontSize === 'default' ? {
|
82
|
+
color: isHiColor || color === 'primary' || color === 'secondary' ? theme.palette[color].main : theme.palette.primary.main,
|
85
83
|
width: size,
|
86
84
|
height: size
|
87
|
-
} : {
|
88
|
-
fontSize
|
89
85
|
}, other));
|
90
86
|
} // MDI - Material Design Icons - https://materialdesignicons.com
|
91
87
|
|
@@ -96,13 +92,10 @@ function HiIcon(props) {
|
|
96
92
|
className: classNames(classes.root, {
|
97
93
|
[classes[`color${capitalize(color)}`]]: isHiColor
|
98
94
|
}, className),
|
99
|
-
color: isHiColor ? 'inherit' : color
|
100
|
-
}, fontSize === 'default' ? {
|
95
|
+
color: isHiColor ? 'inherit' : color,
|
101
96
|
style: {
|
102
97
|
fontSize: size
|
103
98
|
}
|
104
|
-
} : {
|
105
|
-
fontSize
|
106
99
|
}, other));
|
107
100
|
} // @material-ui/icons
|
108
101
|
|
@@ -111,13 +104,10 @@ function HiIcon(props) {
|
|
111
104
|
className: classNames(classes.root, {
|
112
105
|
[classes[`color${capitalize(color)}`]]: isHiColor
|
113
106
|
}, className),
|
114
|
-
color: isHiColor ? 'inherit' : color
|
115
|
-
}, fontSize === 'default' ? {
|
107
|
+
color: isHiColor ? 'inherit' : color,
|
116
108
|
style: {
|
117
109
|
fontSize: size
|
118
110
|
}
|
119
|
-
} : {
|
120
|
-
fontSize
|
121
111
|
}, other), iconName);
|
122
112
|
}
|
123
113
|
|
@@ -143,11 +133,6 @@ HiIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
143
133
|
*/
|
144
134
|
color: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'action', 'error', 'disabled', 'positive', 'negative', 'middle', 'neutral']),
|
145
135
|
|
146
|
-
/**
|
147
|
-
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
148
|
-
*/
|
149
|
-
fontSize: PropTypes.oneOf(['inherit', 'default']),
|
150
|
-
|
151
136
|
/**
|
152
137
|
* Deprecated use (same as children)
|
153
138
|
* The name of the icon font ligature.
|
@@ -161,9 +146,8 @@ HiIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
161
146
|
} : {};
|
162
147
|
HiIcon.defaultProps = {
|
163
148
|
color: 'inherit',
|
164
|
-
fontSize: 'default',
|
165
149
|
icon: null,
|
166
|
-
size:
|
150
|
+
size: 20
|
167
151
|
};
|
168
152
|
HiIcon.muiName = 'HiIcon';
|
169
153
|
export default withStyles(styles, {
|
@@ -15,6 +15,7 @@ export const styles = theme => ({
|
|
15
15
|
root: {},
|
16
16
|
listItem: {
|
17
17
|
backgroundColor: theme.palette.background3,
|
18
|
+
color: theme.palette.neutral.dark,
|
18
19
|
padding: '5px 0',
|
19
20
|
fontWeight: theme.typography.fontWeightRegular,
|
20
21
|
maxHeight: 56,
|
@@ -44,7 +45,6 @@ export const styles = theme => ({
|
|
44
45
|
width: '100%'
|
45
46
|
},
|
46
47
|
disabled: {
|
47
|
-
color: theme.palette.action.disabled,
|
48
48
|
fontWeight: theme.typography.fontWeightLight,
|
49
49
|
cursor: 'default'
|
50
50
|
},
|
@@ -74,11 +74,11 @@ export const styles = theme => ({
|
|
74
74
|
fontWeight: 'inherit',
|
75
75
|
width: '100%',
|
76
76
|
height: '-webkit-fill-available',
|
77
|
-
padding: '
|
77
|
+
padding: '5px 0'
|
78
78
|
}),
|
79
79
|
label: {
|
80
80
|
display: 'inline-block',
|
81
|
-
margin: '1px 0
|
81
|
+
margin: '1px 0'
|
82
82
|
},
|
83
83
|
coloredLabel: {
|
84
84
|
display: 'inline-flex',
|
@@ -112,7 +112,7 @@ export const styles = theme => ({
|
|
112
112
|
width: 20,
|
113
113
|
height: 20,
|
114
114
|
fontSize: 20,
|
115
|
-
|
115
|
+
marginTop: 3
|
116
116
|
},
|
117
117
|
img: {
|
118
118
|
width: 24,
|
@@ -256,12 +256,14 @@ class HiSelectableListItem extends React.Component {
|
|
256
256
|
onMouseLeave: this.setHover(false)
|
257
257
|
}, {
|
258
258
|
style: {
|
259
|
-
paddingLeft: `${
|
259
|
+
paddingLeft: `${level * 32}px`
|
260
260
|
}
|
261
261
|
}), !hideCheckbox && !pinned && React.createElement(HiCheckbox, {
|
262
262
|
checked: selected,
|
263
263
|
checkedIcon: checkedIcon,
|
264
|
-
|
264
|
+
classes: {
|
265
|
+
root: classes.checkbox
|
266
|
+
},
|
265
267
|
color: "primary" // TODO ?
|
266
268
|
,
|
267
269
|
disabled: disabled,
|
@@ -295,9 +297,11 @@ HiSelectableListItem.defaultProps = {
|
|
295
297
|
centered: false,
|
296
298
|
disabled: false,
|
297
299
|
hideCheckbox: false,
|
300
|
+
hoverIcon: 'check_box_outline_blank',
|
301
|
+
checkedIcon: 'check_box',
|
298
302
|
indeterminate: false,
|
299
303
|
level: 0,
|
300
|
-
paddingLeft:
|
304
|
+
paddingLeft: 0,
|
301
305
|
pinned: false,
|
302
306
|
secondaryInline: true,
|
303
307
|
selected: false,
|
@@ -337,7 +341,7 @@ HiSelectableListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
337
341
|
/**
|
338
342
|
* Icon affiché lorsque l'item n'est pas sélectionné et qu'on le survole
|
339
343
|
*/
|
340
|
-
hoverIcon: PropTypes.
|
344
|
+
hoverIcon: PropTypes.node,
|
341
345
|
|
342
346
|
/**
|
343
347
|
* Icon affiché lorsque l'item n'est pas sélectionné
|
@@ -45,9 +45,9 @@ export const light = {
|
|
45
45
|
hover: 'rgba(0, 0, 0, 0.08)',
|
46
46
|
hoverOpacity: 0.08,
|
47
47
|
// The color of a selected action.
|
48
|
-
selected: '
|
48
|
+
selected: '#F8F9FB',
|
49
49
|
// The color of a disabled action.
|
50
|
-
disabled: '
|
50
|
+
disabled: '#E0E0E0',
|
51
51
|
// The background color of a disabled action.
|
52
52
|
disabledBackground: 'rgba(0, 0, 0, 0.12)'
|
53
53
|
},
|
package/index.es.js
CHANGED
package/index.js
CHANGED
package/package.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"name": "@hipay/hipay-material-ui",
|
3
3
|
"private": false,
|
4
4
|
"author": "HiPay PSYCHE Team",
|
5
|
-
"version": "2.0.0-beta.
|
5
|
+
"version": "2.0.0-beta.36",
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
7
7
|
"keywords": [
|
8
8
|
"react",
|
@@ -52,11 +52,13 @@
|
|
52
52
|
"popper.js": "^1.14.1",
|
53
53
|
"prop-types": "^15.6.0",
|
54
54
|
"react-custom-scrollbars": "^4.2.1",
|
55
|
+
"react-day-picker": "^7.2.4",
|
55
56
|
"react-event-listener": "^0.6.2",
|
56
57
|
"react-jss": "^8.1.0",
|
57
58
|
"react-spinners": "^0.4.5",
|
58
59
|
"react-transition-group": "^2.2.1",
|
59
60
|
"recompose": "^0.29.0",
|
61
|
+
"rimraf": "^2.6.2",
|
60
62
|
"validator": "^10.7.1",
|
61
63
|
"warning": "^4.0.1"
|
62
64
|
},
|
package/styles/createPalette.js
CHANGED
@@ -63,9 +63,9 @@ var light = {
|
|
63
63
|
hover: 'rgba(0, 0, 0, 0.08)',
|
64
64
|
hoverOpacity: 0.08,
|
65
65
|
// The color of a selected action.
|
66
|
-
selected: '
|
66
|
+
selected: '#F8F9FB',
|
67
67
|
// The color of a disabled action.
|
68
|
-
disabled: '
|
68
|
+
disabled: '#E0E0E0',
|
69
69
|
// The background color of a disabled action.
|
70
70
|
disabledBackground: 'rgba(0, 0, 0, 0.12)'
|
71
71
|
},
|