@hipay/hipay-material-ui 1.0.0-beta.19 → 1.0.0-beta.20
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/HiChip/HiChip.js +12 -2
- package/HiDatePicker/HiDateRangePicker.js +1 -1
- package/HiDatePicker/HiDateRangeSelector.js +5 -4
- package/HiDatePicker/stylesheet.js +4 -0
- package/HiForm/HiAddressField.js +32 -49
- package/HiForm/HiInput.js +11 -6
- package/HiForm/HiUpload.js +280 -0
- package/HiForm/HiUploadField.js +456 -0
- package/HiForm/index.js +18 -0
- package/HiMap/HiMap.js +367 -0
- package/HiMap/HiMapExpand.js +217 -0
- package/HiMap/index.js +25 -0
- package/HiSelect/HiSelect.js +1 -1
- package/HiTable/BodyCellBuilder.js +1 -1
- package/HiTable/BodyCells/CellCountry.js +1 -1
- package/HiTable/BodyCells/CellImage.js +6 -6
- package/HiTable/BodyCells/CellLayout.js +1 -1
- package/HiTable/HeaderCell.js +5 -4
- package/HiTable/HiTableFooter.js +2 -1
- package/HiTopBar/HiTopBar.js +6 -4
- package/es/HiChip/HiChip.js +11 -2
- package/es/HiDatePicker/HiDateRangePicker.js +1 -1
- package/es/HiDatePicker/HiDateRangeSelector.js +5 -4
- package/es/HiDatePicker/stylesheet.js +4 -0
- package/es/HiForm/HiAddressField.js +30 -45
- package/es/HiForm/HiInput.js +10 -5
- package/es/HiForm/HiUpload.js +194 -0
- package/es/HiForm/HiUploadField.js +368 -0
- package/es/HiForm/index.js +2 -0
- package/es/HiMap/HiMap.js +285 -0
- package/es/HiMap/HiMapExpand.js +145 -0
- package/es/HiMap/index.js +2 -0
- package/es/HiSelect/HiSelect.js +1 -1
- package/es/HiTable/BodyCellBuilder.js +1 -1
- package/es/HiTable/BodyCells/CellCountry.js +1 -1
- package/es/HiTable/BodyCells/CellImage.js +6 -6
- package/es/HiTable/BodyCells/CellLayout.js +1 -1
- package/es/HiTable/HeaderCell.js +5 -3
- package/es/HiTable/HiTableFooter.js +2 -1
- package/es/HiTopBar/HiTopBar.js +6 -4
- package/es/styles/createHiMuiTheme.js +2 -0
- package/hmu/images/map_marker.svg +8 -0
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +44 -42
- package/styles/createHiMuiTheme.js +2 -0
- package/umd/hipay-material-ui.development.js +58049 -14511
- package/umd/hipay-material-ui.production.min.js +5 -5
@@ -0,0 +1,145 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import classNames from 'classnames';
|
4
|
+
import ExpansionPanel, { ExpansionPanelSummary, ExpansionPanelDetails } from 'material-ui/ExpansionPanel';
|
5
|
+
import Typography from 'material-ui/Typography';
|
6
|
+
import { withStyles } from '../styles';
|
7
|
+
import HiMap from '../HiMap';
|
8
|
+
import HiIconBuilder from '../utils/HiIconBuilder';
|
9
|
+
|
10
|
+
const styles = theme => ({
|
11
|
+
column: {
|
12
|
+
flexBasis: '33.33%'
|
13
|
+
},
|
14
|
+
root: {
|
15
|
+
flexGrow: 1,
|
16
|
+
boxShadow: 'none'
|
17
|
+
},
|
18
|
+
imgListItem: {
|
19
|
+
width: 24,
|
20
|
+
height: 'auto',
|
21
|
+
marginRight: 8,
|
22
|
+
verticalAlign: 'middle'
|
23
|
+
},
|
24
|
+
expandMoreIcon: {
|
25
|
+
margin: 0,
|
26
|
+
fontSize: 18,
|
27
|
+
width: 20
|
28
|
+
},
|
29
|
+
disabledIcon: {
|
30
|
+
color: theme.palette.action.disabled
|
31
|
+
},
|
32
|
+
panelSummaryExpanded: {
|
33
|
+
minHeight: 0
|
34
|
+
},
|
35
|
+
expandIconExpanded: {
|
36
|
+
transform: 'translateY(-50%) rotate(0)',
|
37
|
+
color: theme.palette.business.primary.light
|
38
|
+
},
|
39
|
+
panelSummary: {
|
40
|
+
'&>div:first-child': {
|
41
|
+
margin: '12px 0'
|
42
|
+
}
|
43
|
+
}
|
44
|
+
});
|
45
|
+
|
46
|
+
class HiMapExpand extends React.PureComponent {
|
47
|
+
|
48
|
+
constructor(props) {
|
49
|
+
super(props);
|
50
|
+
this.state = {
|
51
|
+
addressNotFound: false,
|
52
|
+
expanded: false
|
53
|
+
};
|
54
|
+
this.handleAddressNotFound = this.handleAddressNotFound.bind(this);
|
55
|
+
this.handleExpand = this.handleExpand.bind(this);
|
56
|
+
}
|
57
|
+
|
58
|
+
handleExpand() {
|
59
|
+
this.setState({ expanded: !this.state.addressNotFound && !this.state.expanded });
|
60
|
+
}
|
61
|
+
|
62
|
+
handleAddressNotFound() {
|
63
|
+
this.setState({ addressNotFound: true });
|
64
|
+
}
|
65
|
+
|
66
|
+
render() {
|
67
|
+
const { classes, address, countryFlagPath } = this.props;
|
68
|
+
|
69
|
+
const { addressNotFound, expanded } = this.state;
|
70
|
+
|
71
|
+
const flag = countryFlagPath ? React.createElement('img', { src: countryFlagPath, className: classes.imgListItem, alt: 'country flag' }) : '';
|
72
|
+
|
73
|
+
return React.createElement(
|
74
|
+
ExpansionPanel,
|
75
|
+
{
|
76
|
+
className: classes.root,
|
77
|
+
defaultExpanded: false,
|
78
|
+
expanded: expanded,
|
79
|
+
onChange: this.handleExpand
|
80
|
+
},
|
81
|
+
React.createElement(
|
82
|
+
ExpansionPanelSummary,
|
83
|
+
{
|
84
|
+
classes: {
|
85
|
+
root: classes.panelSummary,
|
86
|
+
expanded: classes.panelSummaryExpanded,
|
87
|
+
expandIconExpanded: classes.expandIconExpanded
|
88
|
+
},
|
89
|
+
expandIcon: React.createElement(HiIconBuilder, {
|
90
|
+
icon: 'map_marker',
|
91
|
+
style: { position: 'relative', top: 2, marginRight: 5 },
|
92
|
+
className: classNames({
|
93
|
+
root: classes.expandMoreIcon,
|
94
|
+
[classes.disabledIcon]: addressNotFound
|
95
|
+
})
|
96
|
+
})
|
97
|
+
},
|
98
|
+
React.createElement(
|
99
|
+
'div',
|
100
|
+
{ className: classes.column },
|
101
|
+
React.createElement(
|
102
|
+
Typography,
|
103
|
+
{ className: classes.heading },
|
104
|
+
'Adresse'
|
105
|
+
)
|
106
|
+
),
|
107
|
+
React.createElement(
|
108
|
+
'div',
|
109
|
+
null,
|
110
|
+
React.createElement(
|
111
|
+
Typography,
|
112
|
+
{ className: classes.secondaryHeading },
|
113
|
+
flag,
|
114
|
+
address
|
115
|
+
)
|
116
|
+
)
|
117
|
+
),
|
118
|
+
React.createElement(
|
119
|
+
ExpansionPanelDetails,
|
120
|
+
{ style: { padding: 0 } },
|
121
|
+
React.createElement(HiMap, { address: address, onAddressNotFound: this.handleAddressNotFound })
|
122
|
+
)
|
123
|
+
);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
HiMapExpand.defaultProps = {
|
128
|
+
countryFlagPath: ''
|
129
|
+
};
|
130
|
+
HiMapExpand.propTypes = process.env.NODE_ENV !== "production" ? {
|
131
|
+
/**
|
132
|
+
* The address to see in the Map component.
|
133
|
+
*/
|
134
|
+
address: PropTypes.string.isRequired,
|
135
|
+
/**
|
136
|
+
* Useful to extend the style applied to components.
|
137
|
+
*/
|
138
|
+
classes: PropTypes.object.isRequired,
|
139
|
+
/**
|
140
|
+
* The path to the country flag image.
|
141
|
+
*/
|
142
|
+
countryFlagPath: PropTypes.string
|
143
|
+
} : {};
|
144
|
+
|
145
|
+
export default withStyles(styles, { name: 'HmuiHiMapExpand' })(HiMapExpand);
|
package/es/HiSelect/HiSelect.js
CHANGED
@@ -351,5 +351,5 @@ BodyCellBuilder.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
351
351
|
/**
|
352
352
|
* Largeur de la cellule (hors padding), est déduit de view par défaut
|
353
353
|
*/
|
354
|
-
width: PropTypes.number
|
354
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
355
355
|
} : {};
|
@@ -13,7 +13,10 @@ export const styles = theme => ({
|
|
13
13
|
height: 'auto'
|
14
14
|
},
|
15
15
|
label: {
|
16
|
-
marginLeft: 5
|
16
|
+
marginLeft: 5,
|
17
|
+
whiteSpace: 'nowrap',
|
18
|
+
overflow: 'hidden',
|
19
|
+
textOverflow: 'ellipsis'
|
17
20
|
},
|
18
21
|
tooltipImg: {
|
19
22
|
width: 24,
|
@@ -26,10 +29,7 @@ export const styles = theme => ({
|
|
26
29
|
},
|
27
30
|
wrapper: {
|
28
31
|
display: 'flex',
|
29
|
-
alignItems: 'center'
|
30
|
-
whiteSpace: 'nowrap',
|
31
|
-
overflow: 'hidden',
|
32
|
-
textOverflow: 'ellipsis'
|
32
|
+
alignItems: 'center'
|
33
33
|
},
|
34
34
|
center: {
|
35
35
|
textAlign: 'center'
|
@@ -125,7 +125,7 @@ CellImage.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
125
125
|
/**
|
126
126
|
* Value
|
127
127
|
*/
|
128
|
-
value: PropTypes.string
|
128
|
+
value: PropTypes.string,
|
129
129
|
/**
|
130
130
|
* View (L/M/S)
|
131
131
|
*/
|
@@ -187,7 +187,7 @@ CellLayout.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
187
187
|
/**
|
188
188
|
* Largeur de la cellule (hors padding), est déduit de view par défaut
|
189
189
|
*/
|
190
|
-
width: PropTypes.number,
|
190
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
191
191
|
/**
|
192
192
|
* Fixe la taille des colonnes selon le type de vue
|
193
193
|
* Sinon les colonnes s'adaptent à l'espace disponible
|
package/es/HiTable/HeaderCell.js
CHANGED
@@ -141,7 +141,7 @@ class HeaderCell extends React.PureComponent {
|
|
141
141
|
filterSource,
|
142
142
|
view,
|
143
143
|
dense,
|
144
|
-
width
|
144
|
+
width,
|
145
145
|
fixedColumnWidth,
|
146
146
|
align = cst.ALIGN_RIGHT_TYPES.includes(type) ? 'right' : 'left',
|
147
147
|
sticky,
|
@@ -154,7 +154,7 @@ class HeaderCell extends React.PureComponent {
|
|
154
154
|
let offset = selectable ? dense ? 32 : 40 : padding;
|
155
155
|
|
156
156
|
// Inclue le padding et/ou la checkbox dans la largeur de la cellule
|
157
|
-
let _width = width + offset + padding;
|
157
|
+
let _width = (width || cst.DEFAULT_WIDTHS[type][view]) + offset + padding;
|
158
158
|
// N'affiche pas le tri si il est désactivé.
|
159
159
|
let _sorted = sortable && sorted;
|
160
160
|
// N'active pas le filtre si il n'y a pas de jeu de donnée sur lesquelles filtrées.
|
@@ -190,6 +190,8 @@ class HeaderCell extends React.PureComponent {
|
|
190
190
|
cellStyle.maxWidth = _width;
|
191
191
|
cellStyle.minWidth = _width;
|
192
192
|
cellStyle.width = _width;
|
193
|
+
} else if (width) {
|
194
|
+
cellStyle.width = width;
|
193
195
|
}
|
194
196
|
|
195
197
|
return React.createElement(
|
@@ -359,7 +361,7 @@ HeaderCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
359
361
|
/**
|
360
362
|
* Largeur de la cellule (hors padding), est déduit de view par défaut
|
361
363
|
*/
|
362
|
-
width: PropTypes.number,
|
364
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
363
365
|
/**
|
364
366
|
* La largeur de la cellule est fixé (toutes les colonnes sauf une)
|
365
367
|
*/
|
package/es/HiTopBar/HiTopBar.js
CHANGED
@@ -194,7 +194,8 @@ class HiTopBar extends React.Component {
|
|
194
194
|
AppBar,
|
195
195
|
{
|
196
196
|
classes: { root: classes.root, colorPrimary: colorPrimaryClass },
|
197
|
-
position: this.props.position
|
197
|
+
position: this.props.position,
|
198
|
+
id: 'top-bar'
|
198
199
|
},
|
199
200
|
React.createElement(
|
200
201
|
Hidden,
|
@@ -215,7 +216,7 @@ class HiTopBar extends React.Component {
|
|
215
216
|
{ className: classes.toolbar },
|
216
217
|
React.createElement(
|
217
218
|
'div',
|
218
|
-
{ ref: refButtons },
|
219
|
+
{ ref: refButtons, id: 'menu-button-container' },
|
219
220
|
searchFocus ? React.createElement(
|
220
221
|
HiButton,
|
221
222
|
{
|
@@ -246,7 +247,7 @@ class HiTopBar extends React.Component {
|
|
246
247
|
),
|
247
248
|
React.createElement(
|
248
249
|
'div',
|
249
|
-
{ className: classes.flex },
|
250
|
+
{ id: 'quick-search-input', className: classes.flex },
|
250
251
|
searchInput
|
251
252
|
),
|
252
253
|
notificationButton,
|
@@ -258,7 +259,8 @@ class HiTopBar extends React.Component {
|
|
258
259
|
classes: {
|
259
260
|
label: classes.accountSelectorButtonLabel
|
260
261
|
},
|
261
|
-
onClick: this.props.onClickAccountSelector
|
262
|
+
onClick: this.props.onClickAccountSelector,
|
263
|
+
id: 'account-selector-button'
|
262
264
|
},
|
263
265
|
accountSelectorContent
|
264
266
|
),
|
@@ -41,6 +41,7 @@ const light = {
|
|
41
41
|
selected: '#F8F9FB',
|
42
42
|
placeholder: '#999999',
|
43
43
|
disable: '#E0E0E0',
|
44
|
+
border: 'rgba(224, 224, 224, 1)',
|
44
45
|
positive: {
|
45
46
|
light: '#66CF66',
|
46
47
|
normal: '#00AF00',
|
@@ -111,6 +112,7 @@ const dark = {
|
|
111
112
|
selected: '#303030',
|
112
113
|
placeholder: '#999999',
|
113
114
|
disable: '#E0E0E0',
|
115
|
+
border: 'rgba(224, 224, 224, 1)',
|
114
116
|
positive: {
|
115
117
|
light: '#66CF66',
|
116
118
|
normal: '#00AF00',
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!-- Generator: Adobe Illustrator 18.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">
|
5
|
+
<g>
|
6
|
+
<path fill="#00AEEF" d="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9 C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8 c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>
|
7
|
+
</g>
|
8
|
+
</svg>
|
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": "1.0.0-beta.
|
5
|
+
"version": "1.0.0-beta.20",
|
6
6
|
"description": "HiPay Material-UI Style Guide - React components that implement Google's Material Design from Material-UI.",
|
7
7
|
"main": "./index.js",
|
8
8
|
"repository": {
|
@@ -15,51 +15,53 @@
|
|
15
15
|
"homepage": "http://material-ui.com/",
|
16
16
|
"peerDependencies": {
|
17
17
|
"react": "16.2.0",
|
18
|
-
"react-dom": "15.3.0 || 16.0.0"
|
18
|
+
"react-dom": "^15.3.0 || ^16.0.0"
|
19
19
|
},
|
20
20
|
"dependencies": {
|
21
|
-
"@types/jss": "9.3.0",
|
22
|
-
"@types/react-transition-group": "2.0.6",
|
23
|
-
"babel-runtime": "6.26.0",
|
24
|
-
"brcast": "3.0.1",
|
25
|
-
"classnames": "2.2.5",
|
26
|
-
"deepmerge": "2.0.1",
|
27
|
-
"dom-helpers": "3.2.1",
|
28
|
-
"hoist-non-react-statics": "2.5.0",
|
29
|
-
"jss": "9.3.3",
|
30
|
-
"jss-camel-case": "6.0.0",
|
31
|
-
"jss-default-unit": "8.0.2",
|
32
|
-
"jss-global": "3.0.0",
|
33
|
-
"jss-nested": "6.0.1",
|
34
|
-
"jss-props-sort": "6.0.0",
|
35
|
-
"jss-vendor-prefixer": "7.0.0",
|
36
|
-
"keycode": "2.1.9",
|
37
|
-
"
|
38
|
-
"
|
21
|
+
"@types/jss": "^9.3.0",
|
22
|
+
"@types/react-transition-group": "^2.0.6",
|
23
|
+
"babel-runtime": "^6.26.0",
|
24
|
+
"brcast": "^3.0.1",
|
25
|
+
"classnames": "^2.2.5",
|
26
|
+
"deepmerge": "^2.0.1",
|
27
|
+
"dom-helpers": "^3.2.1",
|
28
|
+
"hoist-non-react-statics": "^2.5.0",
|
29
|
+
"jss": "^9.3.3",
|
30
|
+
"jss-camel-case": "^6.0.0",
|
31
|
+
"jss-default-unit": "^8.0.2",
|
32
|
+
"jss-global": "^3.0.0",
|
33
|
+
"jss-nested": "^6.0.1",
|
34
|
+
"jss-props-sort": "^6.0.0",
|
35
|
+
"jss-vendor-prefixer": "^7.0.0",
|
36
|
+
"keycode": "^2.1.9",
|
37
|
+
"leaflet": "^1.3.1",
|
38
|
+
"lodash": "^4.2.0",
|
39
|
+
"lz-string": "^1.4.4",
|
39
40
|
"material-ui": "1.0.0-beta.36",
|
40
|
-
"mdi-material-ui": "2.0.0",
|
41
|
-
"moment": "2.
|
42
|
-
"moment-timezone": "0.5.14",
|
43
|
-
"normalize-scroll-left": "0.1.2",
|
44
|
-
"prop-types": "15.6.
|
45
|
-
"react-addons-update": "15.6.2",
|
46
|
-
"react-contextmenu": "2.9.2",
|
47
|
-
"react-custom-scrollbars": "4.2.1",
|
41
|
+
"mdi-material-ui": "^2.0.0",
|
42
|
+
"moment": "^2.19.1",
|
43
|
+
"moment-timezone": "^0.5.14",
|
44
|
+
"normalize-scroll-left": "^0.1.2",
|
45
|
+
"prop-types": "^15.6.1",
|
46
|
+
"react-addons-update": "^15.6.2",
|
47
|
+
"react-contextmenu": "^2.9.2",
|
48
|
+
"react-custom-scrollbars": "^4.2.1",
|
48
49
|
"react-day-picker": "7.1.9",
|
49
|
-
"react-event-listener": "0.5.
|
50
|
-
"react-jss": "8.
|
51
|
-
"react-
|
52
|
-
"react-
|
53
|
-
"react-
|
54
|
-
"react-
|
55
|
-
"react-
|
56
|
-
"react-
|
57
|
-
"react-
|
58
|
-
"react-
|
59
|
-
"
|
60
|
-
"
|
61
|
-
"
|
62
|
-
"
|
50
|
+
"react-event-listener": "^0.5.1",
|
51
|
+
"react-jss": "^8.1.0",
|
52
|
+
"react-leaflet": "^1.9.1",
|
53
|
+
"react-lifecycles-compat": "^1.0.2",
|
54
|
+
"react-pdf": "^3.0.4",
|
55
|
+
"react-popper": "^0.8.0",
|
56
|
+
"react-proptype-conditional-require": "^1.0.4",
|
57
|
+
"react-scrollbar-size": "^2.0.2",
|
58
|
+
"react-sortable-hoc": "^0.6.8",
|
59
|
+
"react-spinners": "^0.2.5",
|
60
|
+
"react-transition-group": "^2.2.1",
|
61
|
+
"recompose": "^0.26.0",
|
62
|
+
"scroll": "^2.0.3",
|
63
|
+
"validator": "^9.4.0",
|
64
|
+
"warning": "^3.0.0"
|
63
65
|
},
|
64
66
|
"resolutions": {
|
65
67
|
"@types/react": "16.0.38"
|
@@ -69,6 +69,7 @@ var light = {
|
|
69
69
|
selected: '#F8F9FB',
|
70
70
|
placeholder: '#999999',
|
71
71
|
disable: '#E0E0E0',
|
72
|
+
border: 'rgba(224, 224, 224, 1)',
|
72
73
|
positive: {
|
73
74
|
light: '#66CF66',
|
74
75
|
normal: '#00AF00',
|
@@ -139,6 +140,7 @@ var dark = {
|
|
139
140
|
selected: '#303030',
|
140
141
|
placeholder: '#999999',
|
141
142
|
disable: '#E0E0E0',
|
143
|
+
border: 'rgba(224, 224, 224, 1)',
|
142
144
|
positive: {
|
143
145
|
light: '#66CF66',
|
144
146
|
normal: '#00AF00',
|