@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.
- package/HiCheckbox/HiCheckbox.js +2 -2
- package/HiChip/HiChip.js +13 -0
- package/HiForm/HiFormLabel.js +15 -5
- package/HiForm/HiInput.js +7 -0
- package/HiIcon/HiIcon.js +1 -1
- package/HiIconButton/HiIconButton.js +3 -1
- package/HiSelect/SelectInput.js +1 -1
- package/HiSelectNew/HiDynamicSelectField.js +146 -0
- package/HiSelectNew/HiNestedSelect.js +33 -4
- package/HiSelectNew/HiSelect.js +28 -5
- package/HiSelectNew/HiSelectInput.js +1 -1
- package/HiSelectableList/HiSelectableListItem.js +15 -4
- package/es/HiCheckbox/HiCheckbox.js +2 -2
- package/es/HiChip/HiChip.js +13 -0
- package/es/HiForm/HiFormLabel.js +15 -5
- package/es/HiForm/HiInput.js +7 -0
- package/es/HiIcon/HiIcon.js +2 -2
- package/es/HiIconButton/HiIconButton.js +3 -1
- package/es/HiSelect/SelectInput.js +1 -1
- package/es/HiSelectNew/HiDynamicSelectField.js +111 -0
- package/es/HiSelectNew/HiNestedSelect.js +25 -4
- package/es/HiSelectNew/HiSelect.js +28 -5
- package/es/HiSelectNew/HiSelectInput.js +1 -1
- package/es/HiSelectableList/HiSelectableListItem.js +15 -4
- package/es/styles/createPalette.js +2 -2
- package/es/utils/helpers.js +1 -1
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/styles/createPalette.js +2 -2
- package/umd/hipay-material-ui.development.js +61 -18
- package/umd/hipay-material-ui.production.min.js +2 -2
- package/utils/helpers.js +1 -1
@@ -0,0 +1,111 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
+
// @inheritedComponent HiDynamicSelect
|
4
|
+
import React from 'react';
|
5
|
+
import PropTypes from 'prop-types';
|
6
|
+
import HiFormControl from '../HiForm/HiFormControl';
|
7
|
+
import HiDynamicSelect from './HiDynamicSelect';
|
8
|
+
/**
|
9
|
+
* Champs input pour formulaire
|
10
|
+
*/
|
11
|
+
|
12
|
+
class HiDynamicSelectField extends React.PureComponent {
|
13
|
+
render() {
|
14
|
+
const _this$props = this.props,
|
15
|
+
{
|
16
|
+
label,
|
17
|
+
required,
|
18
|
+
disabled,
|
19
|
+
error,
|
20
|
+
errorText,
|
21
|
+
helperText,
|
22
|
+
helperIcon,
|
23
|
+
id,
|
24
|
+
name,
|
25
|
+
value,
|
26
|
+
options,
|
27
|
+
type,
|
28
|
+
multiple,
|
29
|
+
iconAll,
|
30
|
+
checkbox,
|
31
|
+
searchable,
|
32
|
+
translations,
|
33
|
+
className
|
34
|
+
} = _this$props,
|
35
|
+
others = _objectWithoutProperties(_this$props, ["label", "required", "disabled", "error", "errorText", "helperText", "helperIcon", "id", "name", "value", "options", "type", "multiple", "iconAll", "checkbox", "searchable", "translations", "className"]);
|
36
|
+
|
37
|
+
return React.createElement(HiFormControl, {
|
38
|
+
id: id,
|
39
|
+
label: label,
|
40
|
+
required: required,
|
41
|
+
disabled: disabled,
|
42
|
+
error: error,
|
43
|
+
errorText: errorText,
|
44
|
+
helperText: helperText,
|
45
|
+
helperIcon: helperIcon,
|
46
|
+
className: className
|
47
|
+
}, React.createElement(HiDynamicSelect, _extends({
|
48
|
+
id: id,
|
49
|
+
name: name,
|
50
|
+
value: value,
|
51
|
+
options: options,
|
52
|
+
type: type,
|
53
|
+
multiple: multiple,
|
54
|
+
iconAll: iconAll,
|
55
|
+
checkbox: checkbox,
|
56
|
+
searchable: searchable,
|
57
|
+
translations: translations,
|
58
|
+
disabled: disabled,
|
59
|
+
error: error
|
60
|
+
}, others)));
|
61
|
+
}
|
62
|
+
|
63
|
+
}
|
64
|
+
|
65
|
+
HiDynamicSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
66
|
+
/**
|
67
|
+
* Surcharge des styles
|
68
|
+
*/
|
69
|
+
className: PropTypes.string,
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Si `true`, l'input sera inactif.
|
73
|
+
*/
|
74
|
+
disabled: PropTypes.bool,
|
75
|
+
|
76
|
+
/**
|
77
|
+
* Si `true`, le champs sera en erreur.
|
78
|
+
*/
|
79
|
+
error: PropTypes.bool,
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Texte de l'erreur
|
83
|
+
*/
|
84
|
+
errorText: PropTypes.string,
|
85
|
+
|
86
|
+
/**
|
87
|
+
* Si "true", le texte d'aide s'affichera seulement au clic sur l'icône "Information"
|
88
|
+
*/
|
89
|
+
helperIcon: PropTypes.bool,
|
90
|
+
|
91
|
+
/**
|
92
|
+
* Texte de l'aide
|
93
|
+
*/
|
94
|
+
helperText: PropTypes.string,
|
95
|
+
|
96
|
+
/**
|
97
|
+
* id de l'élément input
|
98
|
+
*/
|
99
|
+
id: PropTypes.string.isRequired,
|
100
|
+
|
101
|
+
/**
|
102
|
+
* Label du champs
|
103
|
+
*/
|
104
|
+
label: PropTypes.string,
|
105
|
+
|
106
|
+
/**
|
107
|
+
* true si champs obligatoire
|
108
|
+
*/
|
109
|
+
required: PropTypes.bool
|
110
|
+
} : {};
|
111
|
+
export default HiDynamicSelectField;
|
@@ -6,6 +6,7 @@ import React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
7
7
|
import HiSelect from './HiSelect';
|
8
8
|
import HiIcon from '../HiIcon';
|
9
|
+
import withStyles from "../styles/withStyles";
|
9
10
|
/**
|
10
11
|
* Return array of final item id in nested list (via props chlidren)
|
11
12
|
* @param itemList
|
@@ -109,6 +110,24 @@ function buildFilteredItemList(itemList, selectedItemIdList = [], searchValue =
|
|
109
110
|
v: visibleParent
|
110
111
|
});
|
111
112
|
}
|
113
|
+
|
114
|
+
export const styles = theme => ({
|
115
|
+
root: {
|
116
|
+
backgroundColor: theme.palette.background2,
|
117
|
+
maxWidth: 500,
|
118
|
+
width: '100%',
|
119
|
+
position: 'relative'
|
120
|
+
},
|
121
|
+
popper: {
|
122
|
+
// width: '100%',
|
123
|
+
zIndex: 1200
|
124
|
+
},
|
125
|
+
paper: {
|
126
|
+
borderRadius: '0px 2px',
|
127
|
+
maxHeight: 480,
|
128
|
+
transition: 'none !important'
|
129
|
+
}
|
130
|
+
});
|
112
131
|
/**
|
113
132
|
* HiNestedSelect hérite du composant HiSelect
|
114
133
|
*
|
@@ -122,7 +141,6 @@ function buildFilteredItemList(itemList, selectedItemIdList = [], searchValue =
|
|
122
141
|
* - si aucun enfant n'est sélectionné, le parent est affiché "unselected".
|
123
142
|
*/
|
124
143
|
|
125
|
-
|
126
144
|
class HiNestedSelect extends React.PureComponent {
|
127
145
|
constructor(props) {
|
128
146
|
super(props);
|
@@ -235,9 +253,9 @@ class HiNestedSelect extends React.PureComponent {
|
|
235
253
|
}), selectedItem.label);
|
236
254
|
} else if (selectedItem.type === 'image') {
|
237
255
|
inputValue = React.createElement("span", {
|
238
|
-
className: classes.
|
256
|
+
className: classes.selectImgLabel
|
239
257
|
}, React.createElement("img", {
|
240
|
-
className: classes.
|
258
|
+
className: classes.labelImg,
|
241
259
|
src: selectedItem.img,
|
242
260
|
alt: selectedItem.label
|
243
261
|
}), selectedItem.label);
|
@@ -398,4 +416,7 @@ HiNestedSelect.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
398
416
|
*/
|
399
417
|
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array])
|
400
418
|
} : {};
|
401
|
-
export default
|
419
|
+
export default withStyles(styles, {
|
420
|
+
hiComponent: true,
|
421
|
+
name: 'HmuiHiNestedSelect'
|
422
|
+
})(HiNestedSelect);
|
@@ -23,17 +23,23 @@ export const styles = theme => ({
|
|
23
23
|
position: 'relative'
|
24
24
|
},
|
25
25
|
popper: {
|
26
|
-
|
26
|
+
width: '100%',
|
27
27
|
zIndex: 1200
|
28
28
|
},
|
29
29
|
paper: {
|
30
30
|
borderRadius: '0px 2px',
|
31
|
-
maxHeight:
|
31
|
+
maxHeight: 480,
|
32
32
|
transition: 'none !important'
|
33
33
|
},
|
34
34
|
labelIcon: {
|
35
35
|
marginRight: 10
|
36
36
|
},
|
37
|
+
labelImg: {
|
38
|
+
height: 18,
|
39
|
+
width: 'auto',
|
40
|
+
margin: '0 4px',
|
41
|
+
verticalAlign: 'middle'
|
42
|
+
},
|
37
43
|
selectIconLabel: _objectSpread({
|
38
44
|
whiteSpace: 'nowrap',
|
39
45
|
overflow: 'hidden',
|
@@ -42,6 +48,15 @@ export const styles = theme => ({
|
|
42
48
|
}, theme.typography.b1, {
|
43
49
|
display: 'inline-flex',
|
44
50
|
width: '100%'
|
51
|
+
}),
|
52
|
+
selectImgLabel: _objectSpread({
|
53
|
+
whiteSpace: 'nowrap',
|
54
|
+
overflow: 'hidden',
|
55
|
+
textOverflow: 'ellipsis',
|
56
|
+
paddingRight: 16
|
57
|
+
}, theme.typography.b1, {
|
58
|
+
display: 'inline-flex',
|
59
|
+
width: '100%'
|
45
60
|
})
|
46
61
|
});
|
47
62
|
/**
|
@@ -119,8 +134,10 @@ class HiSelect extends React.PureComponent {
|
|
119
134
|
this.handleKeyDownSearch = event => {
|
120
135
|
const key = keycode(event);
|
121
136
|
|
122
|
-
if (this.overlay && (key === '
|
137
|
+
if (this.overlay && (key === 'down' || key === 'up')) {
|
123
138
|
this.focusOnFirstItem();
|
139
|
+
} else if (this.overlay && key === 'esc') {
|
140
|
+
this.handleClose();
|
124
141
|
}
|
125
142
|
};
|
126
143
|
|
@@ -295,7 +312,7 @@ class HiSelect extends React.PureComponent {
|
|
295
312
|
inputValue = React.createElement("span", {
|
296
313
|
className: classes.selectIconLabel
|
297
314
|
}, React.createElement("img", {
|
298
|
-
className: classes.
|
315
|
+
className: classes.labelImg,
|
299
316
|
src: item.img,
|
300
317
|
alt: item.label
|
301
318
|
}), item.label);
|
@@ -416,7 +433,8 @@ class HiSelect extends React.PureComponent {
|
|
416
433
|
itemList: itemList,
|
417
434
|
onKeyDown: this.handleKeyDown,
|
418
435
|
onSelect: this.handleSelect,
|
419
|
-
selectedItemIdList: selectedItemIdList
|
436
|
+
selectedItemIdList: selectedItemIdList,
|
437
|
+
fallbackImage: this.props.fallbackImage
|
420
438
|
}, hiSelectableListProps))))));
|
421
439
|
return React.createElement("div", {
|
422
440
|
className: classes.root,
|
@@ -500,6 +518,11 @@ HiSelect.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
500
518
|
*/
|
501
519
|
error: PropTypes.bool,
|
502
520
|
|
521
|
+
/**
|
522
|
+
* Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
|
523
|
+
*/
|
524
|
+
fallbackImage: PropTypes.string,
|
525
|
+
|
503
526
|
/**
|
504
527
|
* Affiche l'élément 'All'
|
505
528
|
*/
|
@@ -48,7 +48,8 @@ export const styles = theme => ({
|
|
48
48
|
},
|
49
49
|
disabled: {
|
50
50
|
fontWeight: theme.typography.fontWeightLight,
|
51
|
-
cursor: 'default'
|
51
|
+
cursor: 'default',
|
52
|
+
opacity: 'inherit'
|
52
53
|
},
|
53
54
|
selected: {
|
54
55
|
backgroundColor: theme.palette.action.selected
|
@@ -75,7 +76,6 @@ export const styles = theme => ({
|
|
75
76
|
}, theme.typography.b1, {
|
76
77
|
fontWeight: 'inherit',
|
77
78
|
width: '100%',
|
78
|
-
height: '-webkit-fill-available',
|
79
79
|
padding: '5px 0'
|
80
80
|
}),
|
81
81
|
label: {
|
@@ -103,9 +103,7 @@ export const styles = theme => ({
|
|
103
103
|
color: theme.palette.neutral.main,
|
104
104
|
fontWeight: theme.typography.fontWeightLight,
|
105
105
|
fontSize: 12,
|
106
|
-
width: '-webkit-fill-available',
|
107
106
|
whiteSpace: 'nowrap',
|
108
|
-
overflow: 'hidden',
|
109
107
|
textOverflow: 'ellipsis',
|
110
108
|
textAlign: 'right',
|
111
109
|
margin: '4px 12px 4px 8px',
|
@@ -203,6 +201,7 @@ class HiSelectableListItem extends React.Component {
|
|
203
201
|
classes,
|
204
202
|
selected,
|
205
203
|
disabled,
|
204
|
+
fallbackImage,
|
206
205
|
hideCheckbox,
|
207
206
|
onSelect,
|
208
207
|
indeterminate,
|
@@ -284,6 +283,13 @@ class HiSelectableListItem extends React.Component {
|
|
284
283
|
}), type === 'image' && img && React.createElement("img", {
|
285
284
|
src: img,
|
286
285
|
alt: img,
|
286
|
+
onError: e => {
|
287
|
+
if (fallbackImage) {
|
288
|
+
e.target.src = `${fallbackImage}`;
|
289
|
+
} else {
|
290
|
+
e.target.style.display = 'none';
|
291
|
+
}
|
292
|
+
},
|
287
293
|
className: classes.img
|
288
294
|
}), this.buildItemLabel(), !!secondaryLabel && React.createElement("div", {
|
289
295
|
className: classNames(classes.secondaryLabel, {
|
@@ -336,6 +342,11 @@ HiSelectableListItem.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
336
342
|
*/
|
337
343
|
disabled: PropTypes.bool,
|
338
344
|
|
345
|
+
/**
|
346
|
+
* Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
|
347
|
+
*/
|
348
|
+
fallbackImage: PropTypes.string,
|
349
|
+
|
339
350
|
/**
|
340
351
|
* N'affiche pas de checkboxes
|
341
352
|
*/
|
@@ -21,11 +21,11 @@ export const light = {
|
|
21
21
|
// The colors used to style the text.
|
22
22
|
text: {
|
23
23
|
// The most important text.
|
24
|
-
primary: '
|
24
|
+
primary: '#20272B',
|
25
25
|
// Secondary text.
|
26
26
|
secondary: 'rgba(0, 0, 0, 0.54)',
|
27
27
|
// Disabled text have even lower visual prominence.
|
28
|
-
disabled: '
|
28
|
+
disabled: '#999999',
|
29
29
|
// Text hints.
|
30
30
|
hint: 'rgba(0, 0, 0, 0.38)'
|
31
31
|
},
|
package/es/utils/helpers.js
CHANGED
@@ -28,7 +28,7 @@ export function contains(obj, pred) {
|
|
28
28
|
*/
|
29
29
|
|
30
30
|
export function escapeHTML(unsafeStr) {
|
31
|
-
return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br
|
31
|
+
return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br>');
|
32
32
|
}
|
33
33
|
export function findIndex(arr, pred) {
|
34
34
|
const predType = typeof pred;
|
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.40",
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
7
7
|
"keywords": [
|
8
8
|
"react",
|
@@ -71,4 +71,4 @@
|
|
71
71
|
},
|
72
72
|
"main": "./index.js",
|
73
73
|
"module": "./index.es.js"
|
74
|
-
}
|
74
|
+
}
|
package/styles/createPalette.js
CHANGED
@@ -39,11 +39,11 @@ var light = {
|
|
39
39
|
// The colors used to style the text.
|
40
40
|
text: {
|
41
41
|
// The most important text.
|
42
|
-
primary: '
|
42
|
+
primary: '#20272B',
|
43
43
|
// Secondary text.
|
44
44
|
secondary: 'rgba(0, 0, 0, 0.54)',
|
45
45
|
// Disabled text have even lower visual prominence.
|
46
|
-
disabled: '
|
46
|
+
disabled: '#999999',
|
47
47
|
// Text hints.
|
48
48
|
hint: 'rgba(0, 0, 0, 0.38)'
|
49
49
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/** @license HiPay-Material-UI v2.0.0-beta.
|
1
|
+
/** @license HiPay-Material-UI v2.0.0-beta.4
|
2
2
|
*
|
3
3
|
* This source code is licensed under the MIT license found in the
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
@@ -963,11 +963,11 @@
|
|
963
963
|
// The colors used to style the text.
|
964
964
|
text: {
|
965
965
|
// The most important text.
|
966
|
-
primary: '
|
966
|
+
primary: '#20272B',
|
967
967
|
// Secondary text.
|
968
968
|
secondary: 'rgba(0, 0, 0, 0.54)',
|
969
969
|
// Disabled text have even lower visual prominence.
|
970
|
-
disabled: '
|
970
|
+
disabled: '#999999',
|
971
971
|
// Text hints.
|
972
972
|
hint: 'rgba(0, 0, 0, 0.38)'
|
973
973
|
},
|
@@ -13667,6 +13667,7 @@
|
|
13667
13667
|
|
13668
13668
|
var styles$1 = function styles(theme) {
|
13669
13669
|
return {
|
13670
|
+
label: {},
|
13670
13671
|
positive: {
|
13671
13672
|
color: theme.palette.positive.main,
|
13672
13673
|
'&:hover': {
|
@@ -13724,7 +13725,8 @@
|
|
13724
13725
|
return React__default.createElement(IconButton$2, _extends_1({
|
13725
13726
|
className: className,
|
13726
13727
|
classes: {
|
13727
|
-
root: buttonClassNames
|
13728
|
+
root: buttonClassNames,
|
13729
|
+
label: classes.label
|
13728
13730
|
},
|
13729
13731
|
color: hcolor
|
13730
13732
|
}, other), children);
|
@@ -15006,7 +15008,7 @@
|
|
15006
15008
|
*/
|
15007
15009
|
|
15008
15010
|
function escapeHTML(unsafeStr) {
|
15009
|
-
return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br
|
15011
|
+
return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br>');
|
15010
15012
|
}
|
15011
15013
|
/**
|
15012
15014
|
* Remove duplicate items from array useful after concat arrays
|
@@ -65902,7 +65904,7 @@
|
|
65902
65904
|
|
65903
65905
|
if (iconName.indexOf('fa-') === 0) {
|
65904
65906
|
return React__default.createElement("i", _extends_1({
|
65905
|
-
className: classnames('fa', iconName, classes.root, defineProperty({}, classes["color".concat(capitalize(color))], color !== 'inherit')
|
65907
|
+
className: classnames('fa', iconName, className, classes.root, defineProperty({}, classes["color".concat(capitalize(color))], color !== 'inherit')),
|
65906
65908
|
style: {
|
65907
65909
|
fontSize: size
|
65908
65910
|
}
|
@@ -66113,7 +66115,7 @@
|
|
66113
66115
|
|
66114
66116
|
HiCheckbox.defaultProps = {
|
66115
66117
|
checked: false,
|
66116
|
-
color: '
|
66118
|
+
color: 'inherit',
|
66117
66119
|
size: 20,
|
66118
66120
|
icon: 'check_box_outline_blank'
|
66119
66121
|
};
|
@@ -66136,7 +66138,7 @@
|
|
66136
66138
|
/**
|
66137
66139
|
* The color of the component. It supports those theme colors that make sense for this component.
|
66138
66140
|
*/
|
66139
|
-
color: propTypes.oneOf(['
|
66141
|
+
color: propTypes.oneOf(['inherit', 'primary', 'secondary', 'positive', 'negative', 'middle', 'neutral']),
|
66140
66142
|
|
66141
66143
|
/**
|
66142
66144
|
* icon à afficher quand le composant est non coché.
|
@@ -66259,6 +66261,7 @@
|
|
66259
66261
|
|
66260
66262
|
var label = props.label,
|
66261
66263
|
classes = props.classes,
|
66264
|
+
fallbackImage = props.fallbackImage,
|
66262
66265
|
icon = props.icon,
|
66263
66266
|
_props$iconSize = props.iconSize,
|
66264
66267
|
iconSize = _props$iconSize === void 0 ? 20 : _props$iconSize,
|
@@ -66285,6 +66288,13 @@
|
|
66285
66288
|
className: classes.badge,
|
66286
66289
|
src: img,
|
66287
66290
|
alt: img,
|
66291
|
+
onError: function onError(e) {
|
66292
|
+
if (fallbackImage) {
|
66293
|
+
e.target.src = "".concat(fallbackImage);
|
66294
|
+
} else {
|
66295
|
+
e.target.style.display = 'none';
|
66296
|
+
}
|
66297
|
+
},
|
66288
66298
|
title: titleImg
|
66289
66299
|
}), icon && React__default.createElement(HiIcon$1, {
|
66290
66300
|
className: classnames(classes.icon, defineProperty({}, classes.iconClickable, onIconClick)),
|
@@ -66323,6 +66333,11 @@
|
|
66323
66333
|
*/
|
66324
66334
|
classes: propTypes.object,
|
66325
66335
|
|
66336
|
+
/**
|
66337
|
+
* Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
|
66338
|
+
*/
|
66339
|
+
fallbackImage: propTypes.string,
|
66340
|
+
|
66326
66341
|
/**
|
66327
66342
|
* Icone affiché à gauche
|
66328
66343
|
*/
|
@@ -68604,6 +68619,10 @@
|
|
68604
68619
|
width: 40,
|
68605
68620
|
display: 'inline-block'
|
68606
68621
|
},
|
68622
|
+
eraseButtonLabel: {
|
68623
|
+
position: 'relative',
|
68624
|
+
top: -2
|
68625
|
+
},
|
68607
68626
|
disabled: {
|
68608
68627
|
borderBottom: 'none'
|
68609
68628
|
},
|
@@ -68803,6 +68822,9 @@
|
|
68803
68822
|
|
68804
68823
|
var eraseIcon = !multiline && onReset && focused && !disabled && value.length > 0 && React__default.createElement(HiIconButton$1, {
|
68805
68824
|
className: classes.eraseButton,
|
68825
|
+
classes: {
|
68826
|
+
label: classes.eraseButtonLabel
|
68827
|
+
},
|
68806
68828
|
onClick: this.handleReset,
|
68807
68829
|
onBlur: this.handleBlur
|
68808
68830
|
}, _ref$3);
|
@@ -73424,16 +73446,21 @@
|
|
73424
73446
|
color: theme.palette.neutral.main,
|
73425
73447
|
position: 'inherit',
|
73426
73448
|
transform: 'inherit',
|
73427
|
-
marginBottom: 2
|
73449
|
+
marginBottom: 2,
|
73450
|
+
'&$focused': {
|
73451
|
+
color: theme.palette.primary.main
|
73452
|
+
},
|
73453
|
+
'&$error': {
|
73454
|
+
color: theme.palette.negative.main
|
73455
|
+
}
|
73428
73456
|
}),
|
73429
73457
|
optional: {
|
73430
73458
|
fontSize: 11,
|
73431
73459
|
marginLeft: 4,
|
73432
73460
|
color: theme.palette.neutral.main
|
73433
73461
|
},
|
73434
|
-
focused: {
|
73435
|
-
|
73436
|
-
}
|
73462
|
+
focused: {},
|
73463
|
+
error: {}
|
73437
73464
|
};
|
73438
73465
|
};
|
73439
73466
|
/**
|
@@ -73471,7 +73498,12 @@
|
|
73471
73498
|
htmlFor: htmlFor,
|
73472
73499
|
className: className,
|
73473
73500
|
focused: focused,
|
73474
|
-
required: false
|
73501
|
+
required: false,
|
73502
|
+
FormLabelClasses: {
|
73503
|
+
root: classes.root,
|
73504
|
+
error: classes.error,
|
73505
|
+
focused: classes.focused
|
73506
|
+
}
|
73475
73507
|
}, InputLabelProps, other), label, !required && React__default.createElement("span", {
|
73476
73508
|
className: classes.optional
|
73477
73509
|
}, " ", translations.optional), children);
|
@@ -95538,7 +95570,8 @@
|
|
95538
95570
|
},
|
95539
95571
|
disabled: {
|
95540
95572
|
fontWeight: theme.typography.fontWeightLight,
|
95541
|
-
cursor: 'default'
|
95573
|
+
cursor: 'default',
|
95574
|
+
opacity: 'inherit'
|
95542
95575
|
},
|
95543
95576
|
selected: {
|
95544
95577
|
backgroundColor: theme.palette.action.selected
|
@@ -95565,7 +95598,6 @@
|
|
95565
95598
|
}, theme.typography.b1, {
|
95566
95599
|
fontWeight: 'inherit',
|
95567
95600
|
width: '100%',
|
95568
|
-
height: '-webkit-fill-available',
|
95569
95601
|
padding: '5px 0'
|
95570
95602
|
}),
|
95571
95603
|
label: {
|
@@ -95593,9 +95625,7 @@
|
|
95593
95625
|
color: theme.palette.neutral.main,
|
95594
95626
|
fontWeight: theme.typography.fontWeightLight,
|
95595
95627
|
fontSize: 12,
|
95596
|
-
width: '-webkit-fill-available',
|
95597
95628
|
whiteSpace: 'nowrap',
|
95598
|
-
overflow: 'hidden',
|
95599
95629
|
textOverflow: 'ellipsis',
|
95600
95630
|
textAlign: 'right',
|
95601
95631
|
margin: '4px 12px 4px 8px',
|
@@ -95710,6 +95740,7 @@
|
|
95710
95740
|
classes = _this$props2.classes,
|
95711
95741
|
selected = _this$props2.selected,
|
95712
95742
|
disabled = _this$props2.disabled,
|
95743
|
+
fallbackImage = _this$props2.fallbackImage,
|
95713
95744
|
hideCheckbox = _this$props2.hideCheckbox,
|
95714
95745
|
onSelect = _this$props2.onSelect,
|
95715
95746
|
indeterminate = _this$props2.indeterminate,
|
@@ -95781,6 +95812,13 @@
|
|
95781
95812
|
}), type === 'image' && img && React__default.createElement("img", {
|
95782
95813
|
src: img,
|
95783
95814
|
alt: img,
|
95815
|
+
onError: function onError(e) {
|
95816
|
+
if (fallbackImage) {
|
95817
|
+
e.target.src = "".concat(fallbackImage);
|
95818
|
+
} else {
|
95819
|
+
e.target.style.display = 'none';
|
95820
|
+
}
|
95821
|
+
},
|
95784
95822
|
className: classes.img
|
95785
95823
|
}), this.buildItemLabel(), !!secondaryLabel && React__default.createElement("div", {
|
95786
95824
|
className: classnames(classes.secondaryLabel, defineProperty({}, classes.inline, secondaryInline))
|
@@ -95833,6 +95871,11 @@
|
|
95833
95871
|
*/
|
95834
95872
|
disabled: propTypes.bool,
|
95835
95873
|
|
95874
|
+
/**
|
95875
|
+
* Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
|
95876
|
+
*/
|
95877
|
+
fallbackImage: propTypes.string,
|
95878
|
+
|
95836
95879
|
/**
|
95837
95880
|
* N'affiche pas de checkboxes
|
95838
95881
|
*/
|
@@ -96389,7 +96432,7 @@
|
|
96389
96432
|
}
|
96390
96433
|
},
|
96391
96434
|
disabled: {
|
96392
|
-
color: "".concat(theme.palette.
|
96435
|
+
color: "".concat(theme.palette.text.disabled),
|
96393
96436
|
'&:before': {
|
96394
96437
|
display: 'none'
|
96395
96438
|
}
|