@hipay/hipay-material-ui 1.0.0-beta.11 → 1.0.0-beta.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,4 +1,4 @@
1
- /** @license Material-UI v1.0.0-beta.10
1
+ /** @license Material-UI v1.0.0-beta.13
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.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Material-UI v1.0.0-beta.10
1
+ /** @license Material-UI v1.0.0-beta.13
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.
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.11",
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
+ }