@hipay/hipay-material-ui 1.0.0-beta.20 → 1.0.0-beta.21
Sign up to get free protection for your applications and to get access to all the features.
- package/HiSelect/HiSelect.js +41 -11
- package/HiSelect/HiSuggestSelect.js +35 -5
- package/HiSelectableList/HiSelectableListItem.js +30 -37
- package/HiTopBar/HiTopBar.js +10 -3
- package/es/HiSelect/HiSelect.js +35 -9
- package/es/HiSelect/HiSuggestSelect.js +33 -5
- package/es/HiSelectableList/HiSelectableListItem.js +30 -37
- package/es/HiTopBar/HiTopBar.js +11 -4
- package/es/utils/hiHelpers.js +3 -3
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +13771 -56579
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/hiHelpers.js +3 -3
package/es/HiTopBar/HiTopBar.js
CHANGED
@@ -5,7 +5,7 @@ import AppBar from 'material-ui/AppBar';
|
|
5
5
|
import Toolbar from 'material-ui/Toolbar';
|
6
6
|
import IconButton from 'material-ui/IconButton';
|
7
7
|
import Collapse from 'material-ui/transitions/Collapse';
|
8
|
-
import {
|
8
|
+
import { ChevronUp, ChevronDown, Menu as MenuIcon, ArrowLeft, DotsVertical } from 'mdi-material-ui';
|
9
9
|
import classNames from 'classnames';
|
10
10
|
import Menu, { MenuItem } from 'material-ui/Menu';
|
11
11
|
import withStyles from '../styles/withStyles';
|
@@ -109,7 +109,7 @@ var _ref = React.createElement(HiIconBuilder, { icon: 'fa-bell-o', size: 25 });
|
|
109
109
|
|
110
110
|
var _ref2 = React.createElement(ArrowLeft, null);
|
111
111
|
|
112
|
-
var _ref3 = React.createElement(
|
112
|
+
var _ref3 = React.createElement(ChevronDown, null);
|
113
113
|
|
114
114
|
var _ref4 = React.createElement(ArrowLeft, null);
|
115
115
|
|
@@ -148,6 +148,9 @@ class HiTopBar extends React.Component {
|
|
148
148
|
}
|
149
149
|
|
150
150
|
handleCollapse() {
|
151
|
+
if (this.props.onCollapse) {
|
152
|
+
this.props.onCollapse(!this.state.collapsed);
|
153
|
+
}
|
151
154
|
this.setState({ collapsed: !this.state.collapsed });
|
152
155
|
}
|
153
156
|
|
@@ -275,7 +278,7 @@ class HiTopBar extends React.Component {
|
|
275
278
|
(hideable || hasSettings) && React.createElement(
|
276
279
|
IconButton,
|
277
280
|
{ color: 'inherit', className: classes.iconButton },
|
278
|
-
hideable && React.createElement(
|
281
|
+
hideable && React.createElement(ChevronUp, { onClick: this.handleCollapse }),
|
279
282
|
hasSettings && React.createElement(HiIconBuilder, {
|
280
283
|
onClick: this.props.onClickSettings,
|
281
284
|
icon: 'fa-gear',
|
@@ -405,7 +408,7 @@ HiTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
405
408
|
*/
|
406
409
|
hasSettings: PropTypes.bool,
|
407
410
|
/**
|
408
|
-
* La TopBar peut être cachée vie le bouton
|
411
|
+
* La TopBar peut être cachée vie le bouton chevron
|
409
412
|
*/
|
410
413
|
hideable: PropTypes.bool,
|
411
414
|
/**
|
@@ -432,6 +435,10 @@ HiTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
432
435
|
* Fonction de callback au click sur le bouton "Settings" du menu
|
433
436
|
*/
|
434
437
|
onClickSettings: PropTypes.func,
|
438
|
+
/**
|
439
|
+
* Fonction de callback au click sur le bouton chevron
|
440
|
+
*/
|
441
|
+
onCollapse: PropTypes.func,
|
435
442
|
/**
|
436
443
|
* Positionement de la topBar. The behavior of the different options is described
|
437
444
|
* [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
package/es/utils/hiHelpers.js
CHANGED
@@ -39,7 +39,7 @@ export function formatNumber(number, size = 'l', locale = 'en-EN', precision) {
|
|
39
39
|
useGrouping: true
|
40
40
|
};
|
41
41
|
|
42
|
-
return number.toLocaleString(locale, options);
|
42
|
+
return number.toLocaleString(locale.replace(/_/g, '-'), options);
|
43
43
|
}
|
44
44
|
|
45
45
|
/**
|
@@ -91,7 +91,7 @@ export function formatCurrencyAmount(amount, size = 'l', locale = 'en-EN', curre
|
|
91
91
|
currencyDisplay: 'symbol'
|
92
92
|
};
|
93
93
|
|
94
|
-
let returnValue = value.toLocaleString(locale, options);
|
94
|
+
let returnValue = value.toLocaleString(locale.replace(/_/g, '-'), options);
|
95
95
|
|
96
96
|
// Place unit (k, M) after number (don't move currency symbol !)
|
97
97
|
if (unit !== '') {
|
@@ -119,7 +119,7 @@ export function formatRate(rate, size = 'l', locale = 'en-EN') {
|
|
119
119
|
style: 'percent'
|
120
120
|
};
|
121
121
|
|
122
|
-
return rate.toLocaleString(locale, options);
|
122
|
+
return rate.toLocaleString(locale.replace(/_/g, '-'), options);
|
123
123
|
}
|
124
124
|
|
125
125
|
/**
|
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.21",
|
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": {
|