@hipay/hipay-material-ui 2.0.0-beta.53 → 2.0.0-beta.55
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/HiCell/CellImage.js +16 -4
- package/HiCell/CellNumeric.js +1 -2
- package/HiCell/CellSentinel.js +33 -109
- package/HiCell/CellSentinelScore.js +100 -0
- package/HiCell/CellTextStyled.js +71 -0
- package/HiCell/index.js +9 -1
- package/HiChip/HiChip.js +2 -1
- package/HiColoredLabel/HiColoredLabel.js +14 -4
- package/HiDatePicker/HiDatePicker.js +1 -1
- package/HiDatePicker/HiDateRangePicker.js +349 -420
- package/HiDatePicker/HiDateRangeSelector.js +80 -62
- package/HiDatePicker/NavBar.js +2 -1
- package/HiDatePicker/Overlays/TimePickerOverlay.js +1 -1
- package/HiDatePicker/Overlays/YearPickerOverlay.js +3 -3
- package/HiForm/HiFormControl.js +5 -4
- package/HiSelect/HiSuggestSelect.js +16 -2
- package/HiSelectNew/HiSelect.js +4 -1
- package/HiSelectableList/HiSelectableListItem.js +3 -1
- package/HiSwitch/HiSwitch.js +2 -1
- package/HiTable/HiCellBuilder.js +31 -27
- package/HiTable/HiTableHeader.js +21 -13
- package/HiTable/constants.js +7 -5
- package/es/HiCell/CellImage.js +13 -2
- package/es/HiCell/CellNumeric.js +1 -2
- package/es/HiCell/CellSentinel.js +32 -108
- package/es/HiCell/CellSentinelScore.js +60 -0
- package/es/HiCell/CellTextStyled.js +57 -0
- package/es/HiCell/index.js +2 -1
- package/es/HiChip/HiChip.js +2 -1
- package/es/HiColoredLabel/HiColoredLabel.js +14 -3
- package/es/HiDatePicker/HiDatePicker.js +1 -1
- package/es/HiDatePicker/HiDateRangePicker.js +312 -363
- package/es/HiDatePicker/HiDateRangeSelector.js +70 -56
- package/es/HiDatePicker/NavBar.js +2 -1
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +1 -1
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +3 -3
- package/es/HiForm/HiFormControl.js +5 -4
- package/es/HiSelect/HiSuggestSelect.js +16 -3
- package/es/HiSelectNew/HiSelect.js +4 -1
- package/es/HiSelectableList/HiSelectableListItem.js +3 -1
- package/es/HiSwitch/HiSwitch.js +2 -1
- package/es/HiTable/HiCellBuilder.js +30 -27
- package/es/HiTable/HiTableHeader.js +20 -14
- package/es/HiTable/constants.js +8 -1
- package/es/styles/createPalette.js +3 -3
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/styles/createPalette.js +3 -3
- package/umd/hipay-material-ui.development.js +9843 -6197
- package/umd/hipay-material-ui.production.min.js +2 -2
- package/yarn-error.log +0 -110
package/HiCell/CellImage.js
CHANGED
@@ -41,6 +41,18 @@ var styles = function styles() {
|
|
41
41
|
}
|
42
42
|
};
|
43
43
|
};
|
44
|
+
|
45
|
+
exports.styles = styles;
|
46
|
+
|
47
|
+
var handleError = function handleError(fallbackImage) {
|
48
|
+
return function (e) {
|
49
|
+
if (fallbackImage) {
|
50
|
+
e.target.src = "".concat(fallbackImage);
|
51
|
+
} else {
|
52
|
+
e.target.style.display = 'none';
|
53
|
+
}
|
54
|
+
};
|
55
|
+
};
|
44
56
|
/**
|
45
57
|
* Cette cellule permet d'afficher une image/logo (24px largeur) et un label (optionnel).
|
46
58
|
* En vue large, aucun tooltip n'est affiché
|
@@ -48,8 +60,6 @@ var styles = function styles() {
|
|
48
60
|
*/
|
49
61
|
|
50
62
|
|
51
|
-
exports.styles = styles;
|
52
|
-
|
53
63
|
var CellImage =
|
54
64
|
/*#__PURE__*/
|
55
65
|
function (_React$PureComponent) {
|
@@ -69,7 +79,8 @@ function (_React$PureComponent) {
|
|
69
79
|
label = _this$props.label,
|
70
80
|
shortLabel = _this$props.shortLabel,
|
71
81
|
view = _this$props.view,
|
72
|
-
size = _this$props.size
|
82
|
+
size = _this$props.size,
|
83
|
+
fallbackImage = _this$props.fallbackImage;
|
73
84
|
if (!path || path === '') return '';
|
74
85
|
return _react.default.createElement("div", {
|
75
86
|
className: classes.wrapper,
|
@@ -78,7 +89,8 @@ function (_React$PureComponent) {
|
|
78
89
|
src: path,
|
79
90
|
alt: label,
|
80
91
|
className: classes.img,
|
81
|
-
width: size
|
92
|
+
width: size,
|
93
|
+
onError: handleError(fallbackImage)
|
82
94
|
}), shortLabel && view === 'm' && _react.default.createElement("span", {
|
83
95
|
className: classes.label
|
84
96
|
}, shortLabel), label && (view === 'l' || view === 'm' && !shortLabel) && _react.default.createElement("span", {
|
package/HiCell/CellNumeric.js
CHANGED
package/HiCell/CellSentinel.js
CHANGED
@@ -26,59 +26,17 @@ var _HiColoredLabel = _interopRequireDefault(require("../HiColoredLabel"));
|
|
26
26
|
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
27
27
|
|
28
28
|
var styles = {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
minWidth: 18
|
29
|
+
flexContent: {
|
30
|
+
display: 'flex',
|
31
|
+
justifyContent: 'flex-end'
|
33
32
|
},
|
34
|
-
label: {
|
35
|
-
marginLeft: 2
|
36
|
-
},
|
37
|
-
nowrap: {
|
38
|
-
whiteSpace: 'nowrap'
|
39
|
-
}
|
33
|
+
label: {}
|
40
34
|
};
|
41
|
-
/**
|
42
|
-
* Get Theme color from fraudResult
|
43
|
-
* @param fraudResult
|
44
|
-
* @returns {*}
|
45
|
-
*/
|
46
|
-
|
47
|
-
exports.styles = styles;
|
48
|
-
|
49
|
-
function getColorFromFraudResult(fraudResult) {
|
50
|
-
var color;
|
51
|
-
|
52
|
-
switch (fraudResult.toUpperCase()) {
|
53
|
-
case 'ACCEPTED':
|
54
|
-
color = 'positive';
|
55
|
-
break;
|
56
|
-
|
57
|
-
case 'BLOCKED':
|
58
|
-
color = 'negative';
|
59
|
-
break;
|
60
|
-
|
61
|
-
case 'CHALLENGED':
|
62
|
-
color = 'middle';
|
63
|
-
break;
|
64
|
-
|
65
|
-
case 'PENDING':
|
66
|
-
color = 'primary';
|
67
|
-
break;
|
68
|
-
|
69
|
-
case 'FORCE_AUTHENTICATE':
|
70
|
-
case 'ASK_AUTHENTICATE':
|
71
|
-
default:
|
72
|
-
color = 'neutral';
|
73
|
-
break;
|
74
|
-
}
|
75
|
-
|
76
|
-
return color;
|
77
|
-
}
|
78
35
|
/**
|
79
36
|
* Cette cellule permet d'afficher le résultat de Sentinel (score & fraudResult & smartDecision)
|
80
37
|
*/
|
81
38
|
|
39
|
+
exports.styles = styles;
|
82
40
|
|
83
41
|
var CellSentinel =
|
84
42
|
/*#__PURE__*/
|
@@ -94,83 +52,49 @@ function (_React$PureComponent) {
|
|
94
52
|
key: "render",
|
95
53
|
value: function render() {
|
96
54
|
var _this$props = this.props,
|
55
|
+
active = _this$props.active,
|
97
56
|
classes = _this$props.classes,
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
57
|
+
color = _this$props.color,
|
58
|
+
label = _this$props.label,
|
59
|
+
letter = _this$props.letter,
|
60
|
+
outlined = _this$props.outlined,
|
61
|
+
reviewer = _this$props.reviewer,
|
62
|
+
value = _this$props.value;
|
63
|
+
|
64
|
+
var _label = label ? label : value;
|
65
|
+
|
66
|
+
var _letter = letter ? letter : _label[0];
|
67
|
+
|
105
68
|
return _react.default.createElement("div", {
|
106
|
-
|
107
|
-
|
108
|
-
minWidth: '100px'
|
109
|
-
}
|
69
|
+
className: classes.flexContent,
|
70
|
+
title: reviewer ? "".concat(_label, "\n").concat(reviewer) : _label
|
110
71
|
}, _react.default.createElement(_HiColoredLabel.default, {
|
111
|
-
|
112
|
-
color: getColorFromFraudResult(fraudResult),
|
72
|
+
active: active,
|
113
73
|
classes: {
|
114
74
|
root: classes.label
|
115
75
|
},
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
classes: {
|
121
|
-
root: classes.label
|
122
|
-
},
|
123
|
-
active: pendingManualAction
|
124
|
-
}), !!smartDecision && _react.default.createElement("div", {
|
125
|
-
className: classes.smartDecision
|
126
|
-
}, automaticFraudReviewResult && _react.default.createElement(_HiColoredLabel.default, {
|
127
|
-
label: automaticFraudReviewResult.toUpperCase().substr(0, 1),
|
128
|
-
color: getColorFromFraudResult(automaticFraudReviewResult),
|
129
|
-
active: pendingManualAction
|
130
|
-
})));
|
76
|
+
color: color,
|
77
|
+
label: _letter,
|
78
|
+
outlined: outlined
|
79
|
+
}));
|
131
80
|
}
|
132
81
|
}]);
|
133
82
|
return CellSentinel;
|
134
83
|
}(_react.default.PureComponent);
|
135
84
|
|
136
85
|
CellSentinel.defaultProps = {
|
137
|
-
|
86
|
+
active: false,
|
87
|
+
outlined: false
|
138
88
|
};
|
139
89
|
CellSentinel.propTypes = process.env.NODE_ENV !== "production" ? {
|
140
|
-
/**
|
141
|
-
* Résultat de l'automaticFraudReview si la transaction est passée par SmartDecision
|
142
|
-
*/
|
143
|
-
automaticFraudReviewResult: _propTypes.default.string,
|
144
|
-
|
145
|
-
/**
|
146
|
-
* Useful to extend the style applied to components.
|
147
|
-
*/
|
148
90
|
classes: _propTypes.default.object,
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
* Si true le fraudResult ne sera pas affiché
|
157
|
-
*/
|
158
|
-
hideFraudResult: _propTypes.default.bool,
|
159
|
-
|
160
|
-
/**
|
161
|
-
* Signal qu'il attend une réponse manuelle
|
162
|
-
*/
|
163
|
-
pendingManualAction: _propTypes.default.bool,
|
164
|
-
|
165
|
-
/**
|
166
|
-
* Score de la fraude
|
167
|
-
*/
|
168
|
-
score: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number]).isRequired,
|
169
|
-
|
170
|
-
/**
|
171
|
-
* Active le SmartDecision (ajoute l'indicateur ou blanc)
|
172
|
-
*/
|
173
|
-
smartDecision: _propTypes.default.bool
|
91
|
+
value: _propTypes.default.string,
|
92
|
+
color: _propTypes.default.string,
|
93
|
+
label: _propTypes.default.string,
|
94
|
+
letter: _propTypes.default.string,
|
95
|
+
active: _propTypes.default.bool,
|
96
|
+
reviewer: _propTypes.default.string,
|
97
|
+
outlined: _propTypes.default.bool
|
174
98
|
} : {};
|
175
99
|
|
176
100
|
var _default = (0, _withStyles.default)(styles, {
|
@@ -0,0 +1,100 @@
|
|
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 = exports.sentinelColorById = exports.styles = void 0;
|
9
|
+
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
11
|
+
|
12
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
13
|
+
|
14
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
15
|
+
|
16
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
17
|
+
|
18
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
19
|
+
|
20
|
+
var _react = _interopRequireDefault(require("react"));
|
21
|
+
|
22
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
23
|
+
|
24
|
+
var _HiColoredLabel = _interopRequireDefault(require("../HiColoredLabel"));
|
25
|
+
|
26
|
+
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
|
27
|
+
|
28
|
+
var styles = {
|
29
|
+
flexContent: {
|
30
|
+
display: 'flex',
|
31
|
+
justifyContent: 'flex-end'
|
32
|
+
},
|
33
|
+
label: {}
|
34
|
+
};
|
35
|
+
exports.styles = styles;
|
36
|
+
var sentinelColorById = {
|
37
|
+
NOT_LAUNCHED: '#737373',
|
38
|
+
ACCEPTED: '#00AF01',
|
39
|
+
AUTHENTICATE: '#484A4B',
|
40
|
+
FORCE_AUTHENTICATE: '#20272B',
|
41
|
+
PENDING: '#3987AD',
|
42
|
+
CHALLENGED: '#FF8F01',
|
43
|
+
BLOCKED: '#D50000',
|
44
|
+
ALLOWED: '#00AF01',
|
45
|
+
DENIED: '#D50000'
|
46
|
+
};
|
47
|
+
/**
|
48
|
+
* Cette cellule permet d'afficher le résultat de Sentinel (score & fraudResult & smartDecision)
|
49
|
+
*/
|
50
|
+
|
51
|
+
exports.sentinelColorById = sentinelColorById;
|
52
|
+
|
53
|
+
var CellSentinelScore =
|
54
|
+
/*#__PURE__*/
|
55
|
+
function (_React$PureComponent) {
|
56
|
+
(0, _inherits2.default)(CellSentinelScore, _React$PureComponent);
|
57
|
+
|
58
|
+
function CellSentinelScore() {
|
59
|
+
(0, _classCallCheck2.default)(this, CellSentinelScore);
|
60
|
+
return (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(CellSentinelScore).apply(this, arguments));
|
61
|
+
}
|
62
|
+
|
63
|
+
(0, _createClass2.default)(CellSentinelScore, [{
|
64
|
+
key: "render",
|
65
|
+
value: function render() {
|
66
|
+
var _this$props = this.props,
|
67
|
+
active = _this$props.active,
|
68
|
+
classes = _this$props.classes,
|
69
|
+
result = _this$props.result,
|
70
|
+
value = _this$props.value;
|
71
|
+
return _react.default.createElement("div", {
|
72
|
+
className: classes.flexContent
|
73
|
+
}, _react.default.createElement(_HiColoredLabel.default, {
|
74
|
+
active: active,
|
75
|
+
classes: {
|
76
|
+
root: classes.label
|
77
|
+
},
|
78
|
+
color: sentinelColorById[result],
|
79
|
+
label: value > 0 ? "+".concat(value) : "".concat(value)
|
80
|
+
}));
|
81
|
+
}
|
82
|
+
}]);
|
83
|
+
return CellSentinelScore;
|
84
|
+
}(_react.default.PureComponent);
|
85
|
+
|
86
|
+
CellSentinelScore.defaultProps = {
|
87
|
+
active: false
|
88
|
+
};
|
89
|
+
CellSentinelScore.propTypes = process.env.NODE_ENV !== "production" ? {
|
90
|
+
active: _propTypes.default.bool,
|
91
|
+
classes: _propTypes.default.object,
|
92
|
+
result: _propTypes.default.string,
|
93
|
+
value: _propTypes.default.number
|
94
|
+
} : {};
|
95
|
+
|
96
|
+
var _default = (0, _withStyles.default)(styles, {
|
97
|
+
name: 'HmuiCellSentinelScore'
|
98
|
+
})(CellSentinelScore);
|
99
|
+
|
100
|
+
exports.default = _default;
|
@@ -0,0 +1,71 @@
|
|
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 _react = _interopRequireDefault(require("react"));
|
11
|
+
|
12
|
+
var _HiColoredLabel = _interopRequireDefault(require("../HiColoredLabel"));
|
13
|
+
|
14
|
+
var styleRoot = {
|
15
|
+
width: '100%',
|
16
|
+
height: 19,
|
17
|
+
margin: 'auto 0',
|
18
|
+
display: 'flex',
|
19
|
+
lineHeight: '15px'
|
20
|
+
};
|
21
|
+
var styleColorLabel = {
|
22
|
+
display: 'inline-block',
|
23
|
+
overflow: 'hidden',
|
24
|
+
textOverflow: 'ellipsis',
|
25
|
+
whiteSpace: 'pre'
|
26
|
+
};
|
27
|
+
var styleLabel = {
|
28
|
+
display: 'inline-block',
|
29
|
+
overflow: 'hidden',
|
30
|
+
textOverflow: 'ellipsis',
|
31
|
+
whiteSpace: 'pre',
|
32
|
+
width: '100%'
|
33
|
+
};
|
34
|
+
/**
|
35
|
+
* CellText functional component
|
36
|
+
* (don't includes complex ellipsis: middle, after-first-word...)
|
37
|
+
*
|
38
|
+
* @param label
|
39
|
+
* @param color
|
40
|
+
* @param value
|
41
|
+
* @param active
|
42
|
+
* @param title
|
43
|
+
* @returns {*}
|
44
|
+
* @constructor
|
45
|
+
*/
|
46
|
+
|
47
|
+
var CellTextStyled = function CellTextStyled(_ref) {
|
48
|
+
var label = _ref.label,
|
49
|
+
color = _ref.color,
|
50
|
+
_ref$value = _ref.value,
|
51
|
+
value = _ref$value === void 0 ? '' : _ref$value,
|
52
|
+
_ref$active = _ref.active,
|
53
|
+
active = _ref$active === void 0 ? false : _ref$active,
|
54
|
+
_ref$title = _ref.title,
|
55
|
+
title = _ref$title === void 0 ? '' : _ref$title;
|
56
|
+
var valueString = label ? label.toString() : value.toString();
|
57
|
+
return _react.default.createElement("div", {
|
58
|
+
style: styleRoot,
|
59
|
+
title: title ? title : valueString
|
60
|
+
}, color ? _react.default.createElement(_HiColoredLabel.default, {
|
61
|
+
style: styleColorLabel,
|
62
|
+
label: valueString,
|
63
|
+
color: color,
|
64
|
+
active: active
|
65
|
+
}) : _react.default.createElement("div", {
|
66
|
+
style: styleLabel
|
67
|
+
}, valueString));
|
68
|
+
};
|
69
|
+
|
70
|
+
var _default = CellTextStyled;
|
71
|
+
exports.default = _default;
|
package/HiCell/index.js
CHANGED
@@ -53,6 +53,12 @@ Object.defineProperty(exports, "CellText", {
|
|
53
53
|
return _CellText.default;
|
54
54
|
}
|
55
55
|
});
|
56
|
+
Object.defineProperty(exports, "CellTextStyled", {
|
57
|
+
enumerable: true,
|
58
|
+
get: function get() {
|
59
|
+
return _CellTextStyled.default;
|
60
|
+
}
|
61
|
+
});
|
56
62
|
|
57
63
|
var _CellAddress = _interopRequireDefault(require("./CellAddress"));
|
58
64
|
|
@@ -68,4 +74,6 @@ var _CellRate = _interopRequireDefault(require("./CellRate"));
|
|
68
74
|
|
69
75
|
var _CellSentinel = _interopRequireDefault(require("./CellSentinel"));
|
70
76
|
|
71
|
-
var _CellText = _interopRequireDefault(require("./CellText"));
|
77
|
+
var _CellText = _interopRequireDefault(require("./CellText"));
|
78
|
+
|
79
|
+
var _CellTextStyled = _interopRequireDefault(require("./CellTextStyled"));
|
package/HiChip/HiChip.js
CHANGED
@@ -71,7 +71,7 @@ var styles = function styles(theme) {
|
|
71
71
|
position: 'relative',
|
72
72
|
cursor: 'pointer',
|
73
73
|
'&:hover, &:focus': {
|
74
|
-
color: theme.palette.
|
74
|
+
color: theme.palette.neutral.dark
|
75
75
|
}
|
76
76
|
},
|
77
77
|
label: {
|
@@ -82,6 +82,7 @@ var styles = function styles(theme) {
|
|
82
82
|
textOverflow: 'ellipsis'
|
83
83
|
},
|
84
84
|
prefix: {
|
85
|
+
whiteSpace: 'nowrap',
|
85
86
|
color: theme.palette.neutral.dark,
|
86
87
|
paddingRight: 4
|
87
88
|
},
|
@@ -115,6 +115,9 @@ var styles = function styles(theme) {
|
|
115
115
|
activeColorNeutral: {
|
116
116
|
color: theme.palette.neutral.contrastText,
|
117
117
|
backgroundColor: theme.palette.neutral.main
|
118
|
+
},
|
119
|
+
outlined: {
|
120
|
+
border: '1px solid'
|
118
121
|
}
|
119
122
|
};
|
120
123
|
};
|
@@ -135,14 +138,15 @@ function HiColoredLabel(props) {
|
|
135
138
|
label = props.label,
|
136
139
|
color = props.color,
|
137
140
|
active = props.active,
|
141
|
+
outlined = props.outlined,
|
138
142
|
fontWeight = props.fontWeight,
|
139
143
|
style = props.style,
|
140
144
|
theme = props.theme,
|
141
|
-
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "label", "color", "active", "fontWeight", "style", "theme"]);
|
145
|
+
other = (0, _objectWithoutProperties2.default)(props, ["classes", "className", "label", "color", "active", "outlined", "fontWeight", "style", "theme"]);
|
142
146
|
var isHiColor = ['primary', 'secondary', 'positive', 'negative', 'middle', 'neutral'].includes(color);
|
143
147
|
var isHexColor = !isHiColor && /(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(color);
|
144
148
|
return _react.default.createElement("div", (0, _extends2.default)({
|
145
|
-
className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.color, !active), (0, _defineProperty2.default)(_classNames, classes.activeColor, active), (0, _defineProperty2.default)(_classNames, classes["activeColor".concat((0, _helpers.capitalize)(color))], active && isHiColor), (0, _defineProperty2.default)(_classNames, classes["color".concat((0, _helpers.capitalize)(color))], !active && isHiColor), _classNames), className),
|
149
|
+
className: (0, _classnames.default)(classes.root, (_classNames = {}, (0, _defineProperty2.default)(_classNames, classes.color, !active), (0, _defineProperty2.default)(_classNames, classes.activeColor, active), (0, _defineProperty2.default)(_classNames, classes.outlined, outlined), (0, _defineProperty2.default)(_classNames, classes["activeColor".concat((0, _helpers.capitalize)(color))], active && isHiColor), (0, _defineProperty2.default)(_classNames, classes["color".concat((0, _helpers.capitalize)(color))], !active && isHiColor), _classNames), className),
|
146
150
|
style: (0, _extends2.default)({}, style, isHexColor && {
|
147
151
|
backgroundColor: active ? color : (0, _colorManipulator.fade)(color, 0.08),
|
148
152
|
color: active ? theme.palette.getContrastText(color) : color
|
@@ -182,11 +186,17 @@ HiColoredLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
182
186
|
/**
|
183
187
|
* Label à afficher
|
184
188
|
*/
|
185
|
-
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.node]).isRequired
|
189
|
+
label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.number, _propTypes.default.node]).isRequired,
|
190
|
+
|
191
|
+
/**
|
192
|
+
* Ajoute une bordure
|
193
|
+
*/
|
194
|
+
outlined: _propTypes.default.bool
|
186
195
|
} : {};
|
187
196
|
HiColoredLabel.defaultProps = {
|
188
197
|
active: false,
|
189
|
-
color: 'primary'
|
198
|
+
color: 'primary',
|
199
|
+
outlined: false
|
190
200
|
};
|
191
201
|
|
192
202
|
var _default = (0, _withStyles.default)(styles, {
|
@@ -270,7 +270,7 @@ function (_React$Component) {
|
|
270
270
|
todayButton: translations.today,
|
271
271
|
onTodayButtonClick: this.handleCurrentMonthChange,
|
272
272
|
weekdayElement: _Weekday.default,
|
273
|
-
|
273
|
+
navbarElement: function navbarElement(props2) {
|
274
274
|
return _react.default.createElement(_NavBar.default, (0, _extends2.default)({
|
275
275
|
showClockButton: enableTime,
|
276
276
|
onClockClick: _this2.handleClockClick
|