@hipay/hipay-material-ui 1.0.0-beta.11 → 1.0.0-beta.13
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/HiTable/BodyCellBuilder.js +10 -8
- package/HiTable/BodyCells/CellImage.js +5 -1
- package/HiTable/HiTable.js +38 -4
- package/HiTable/HiTableBody.js +12 -4
- package/HiTable/HiTableFooter.js +131 -0
- package/es/HiTable/BodyCellBuilder.js +11 -9
- package/es/HiTable/BodyCells/CellImage.js +5 -1
- package/es/HiTable/HiTable.js +36 -5
- package/es/HiTable/HiTableBody.js +12 -4
- package/es/HiTable/HiTableFooter.js +74 -0
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/umd/hipay-material-ui.development.js +7086 -6959
- package/umd/hipay-material-ui.production.min.js +5 -5
@@ -0,0 +1,74 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { TableCell, TableFooter, TableRow } from 'material-ui/Table';
|
3
|
+
import { withStyles } from '../styles';
|
4
|
+
import PropTypes from 'prop-types';
|
5
|
+
import * as cst from "./constants";
|
6
|
+
|
7
|
+
export const styles = theme => ({
|
8
|
+
tfoot: {
|
9
|
+
zIndex: 13
|
10
|
+
},
|
11
|
+
tfootCell: {
|
12
|
+
borderTop: '1px solid',
|
13
|
+
borderTopColor: theme.palette.line.stepper
|
14
|
+
},
|
15
|
+
patchDiv: {
|
16
|
+
position: 'relative',
|
17
|
+
border: 'none',
|
18
|
+
width: 0,
|
19
|
+
paddingRight: 0,
|
20
|
+
paddingTop: 0,
|
21
|
+
paddingBottom: 0,
|
22
|
+
height: '100%',
|
23
|
+
zIndex: 12,
|
24
|
+
backgroundColor: 'inherit'
|
25
|
+
}
|
26
|
+
});
|
27
|
+
|
28
|
+
class HiTableFooter extends React.Component {
|
29
|
+
|
30
|
+
render() {
|
31
|
+
const { classes, nbColumnsDisplayed, view } = this.props;
|
32
|
+
|
33
|
+
return React.createElement(
|
34
|
+
TableFooter,
|
35
|
+
{ className: classes.tfoot },
|
36
|
+
React.createElement(
|
37
|
+
TableRow,
|
38
|
+
null,
|
39
|
+
React.createElement(TableCell, {
|
40
|
+
style: {
|
41
|
+
paddingLeft: cst.DEFAULT_PADDING[view]
|
42
|
+
},
|
43
|
+
key: `footer-left-cell`,
|
44
|
+
className: classes.patchDiv
|
45
|
+
}),
|
46
|
+
React.createElement(
|
47
|
+
TableCell,
|
48
|
+
{ colSpan: nbColumnsDisplayed, classes: { root: classes.tfootCell } },
|
49
|
+
this.props.children
|
50
|
+
),
|
51
|
+
React.createElement(TableCell, {
|
52
|
+
style: {
|
53
|
+
paddingLeft: cst.DEFAULT_PADDING[view]
|
54
|
+
},
|
55
|
+
key: `footer-right-cell`,
|
56
|
+
className: classes.patchDiv
|
57
|
+
})
|
58
|
+
)
|
59
|
+
);
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
HiTableFooter.propTypes = process.env.NODE_ENV !== "production" ? {
|
64
|
+
/**
|
65
|
+
* Nombre de colonnes affichées
|
66
|
+
*/
|
67
|
+
nbColumnsDisplayed: PropTypes.number.isRequired,
|
68
|
+
/**
|
69
|
+
* Taille du tableau (L/M/S),
|
70
|
+
* définit l'espace entre les cellules et leurs tailles par default
|
71
|
+
*/
|
72
|
+
view: PropTypes.oneOf(['l', 'm', 's'])
|
73
|
+
} : {};
|
74
|
+
export default withStyles(styles, { name: 'HmuiHiTableFooter' })(HiTableFooter);
|
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.13",
|
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": {
|
@@ -75,4 +75,4 @@
|
|
75
75
|
},
|
76
76
|
"license": "ISC",
|
77
77
|
"module": "./index.es.js"
|
78
|
-
}
|
78
|
+
}
|