apollo-grid 1.0.0.pre.alpha.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/Col/index.js +182 -0
- data/lib/Container/index.js +74 -0
- data/lib/Row/index.js +67 -0
- data/lib/components/Col/index.js +182 -0
- data/lib/components/Container/index.js +74 -0
- data/lib/components/Row/index.js +67 -0
- data/lib/style.css +725 -0
- data/lib/style.scss +48 -0
- data/lib/styles/grid.scss +86 -0
- data/lib/styles/mixins/breakpoints.scss +98 -0
- data/lib/styles/mixins/clearfix.scss +7 -0
- data/lib/styles/mixins/grid-framework.scss +50 -0
- data/lib/styles/mixins/grid.scss +76 -0
- data/lib/styles/variables.scss +11 -0
- metadata +58 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6f3cce6859febcf951cb64bf6cb13ba63500c2cb
|
4
|
+
data.tar.gz: ec3b02d436fb850f9e1379f9ff1b253b79462352
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 41bbfa363ffe4954a5bb7bf2fdee30a86c55d4b8e55660c9593a388f69d5ea43b608ce170dcd10c84141b74983a08036c981fee203fc165e894b111d713a3b04
|
7
|
+
data.tar.gz: 33dada0ef2c6d3ebbb01a5652cf4ebb4756488983dbad513bc41d198b346ad52db35890205b9f1dc7ebe4a0559b905ad0411b21c0c183321182c254f77e3db94
|
data/lib/Col/index.js
ADDED
@@ -0,0 +1,182 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
8
|
+
|
9
|
+
var _classnames = require('classnames');
|
10
|
+
|
11
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
12
|
+
|
13
|
+
var _react = require('react');
|
14
|
+
|
15
|
+
var _react2 = _interopRequireDefault(_react);
|
16
|
+
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
|
+
|
19
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
20
|
+
|
21
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
22
|
+
|
23
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
24
|
+
|
25
|
+
/**
|
26
|
+
* All the grid's available contexts.
|
27
|
+
*
|
28
|
+
* @constant
|
29
|
+
* @type {string[]}
|
30
|
+
*/
|
31
|
+
var contexts = ['xs', 'sm', 'md', 'lg', 'xl'];
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Component representing a column from a layout grid.
|
35
|
+
* In order to work properly it needs to be wrapped inside a <Row/> component.
|
36
|
+
*
|
37
|
+
* @extends Component
|
38
|
+
*/
|
39
|
+
|
40
|
+
var Col = function (_Component) {
|
41
|
+
_inherits(Col, _Component);
|
42
|
+
|
43
|
+
function Col() {
|
44
|
+
var _Object$getPrototypeO;
|
45
|
+
|
46
|
+
var _temp, _this, _ret;
|
47
|
+
|
48
|
+
_classCallCheck(this, Col);
|
49
|
+
|
50
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
51
|
+
args[_key] = arguments[_key];
|
52
|
+
}
|
53
|
+
|
54
|
+
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Col)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.getCols = function () {
|
55
|
+
var classes = [];
|
56
|
+
|
57
|
+
contexts.forEach(function (context) {
|
58
|
+
var _this$props = _this.props;
|
59
|
+
var size = _this$props[context];
|
60
|
+
var offset = _this$props[context + 'Offset'];
|
61
|
+
var hidden = _this$props[context + 'Hidden'];
|
62
|
+
var pull = _this$props[context + 'Pull'];
|
63
|
+
var push = _this$props[context + 'Push'];
|
64
|
+
|
65
|
+
|
66
|
+
size && classes.push('col-' + context + '-' + size);
|
67
|
+
hidden && classes.push('col-' + context + '-hidden-' + hidden);
|
68
|
+
offset && classes.push('col-' + context + '-offset-' + offset);
|
69
|
+
pull && classes.push('col-' + context + '-pull-' + pull);
|
70
|
+
push && classes.push('col-' + context + '-push-' + push);
|
71
|
+
});
|
72
|
+
|
73
|
+
return classes;
|
74
|
+
}, _temp), _possibleConstructorReturn(_this, _ret);
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Builds the column classes based on its properties and the available contexts.
|
79
|
+
*
|
80
|
+
* @method getCols
|
81
|
+
* @return {Array}
|
82
|
+
*/
|
83
|
+
|
84
|
+
|
85
|
+
_createClass(Col, [{
|
86
|
+
key: 'render',
|
87
|
+
value: function render() {
|
88
|
+
var _props = this.props;
|
89
|
+
var children = _props.children;
|
90
|
+
var className = _props.className;
|
91
|
+
|
92
|
+
|
93
|
+
return _react2.default.createElement(
|
94
|
+
'div',
|
95
|
+
{ className: (0, _classnames2.default)(className, this.getCols()) },
|
96
|
+
children
|
97
|
+
);
|
98
|
+
}
|
99
|
+
}]);
|
100
|
+
|
101
|
+
return Col;
|
102
|
+
}(_react.Component);
|
103
|
+
|
104
|
+
Col.propTypes = {
|
105
|
+
|
106
|
+
// Number of columns for extra small devices (<544px).
|
107
|
+
xs: _react.PropTypes.number,
|
108
|
+
|
109
|
+
// Number of columns for small devices (≥544px).
|
110
|
+
sm: _react.PropTypes.number,
|
111
|
+
|
112
|
+
// Number of columns for medium devices (≥768px).
|
113
|
+
md: _react.PropTypes.number,
|
114
|
+
|
115
|
+
// Number of columns for large devices (≥992px).
|
116
|
+
lg: _react.PropTypes.number,
|
117
|
+
|
118
|
+
// Number of columns for extra large devices (≥1200px).
|
119
|
+
xl: _react.PropTypes.number,
|
120
|
+
|
121
|
+
// Move columns to the right for extra small devices (<544px).
|
122
|
+
xsOffset: _react.PropTypes.number,
|
123
|
+
|
124
|
+
// Move columns to the right for small devices (≥544px).
|
125
|
+
smOffset: _react.PropTypes.number,
|
126
|
+
|
127
|
+
// Move columns to the right for medium devices (≥768px).
|
128
|
+
mdOffset: _react.PropTypes.number,
|
129
|
+
|
130
|
+
// Move columns to the right for large devices (≥992px).
|
131
|
+
lgOffset: _react.PropTypes.number,
|
132
|
+
|
133
|
+
// Move columns to the right for extra large devices (≥1200px).
|
134
|
+
xlOffset: _react.PropTypes.number,
|
135
|
+
|
136
|
+
// Hide column on extra small devices (<544px).
|
137
|
+
xsHidden: _react.PropTypes.bool,
|
138
|
+
|
139
|
+
// Hide column on small devices (≥544px).
|
140
|
+
smHidden: _react.PropTypes.bool,
|
141
|
+
|
142
|
+
// Hide column on medium devices (≥768px).
|
143
|
+
mdHidden: _react.PropTypes.bool,
|
144
|
+
|
145
|
+
// Hide column on large devices (≥992px).
|
146
|
+
lgHidden: _react.PropTypes.bool,
|
147
|
+
|
148
|
+
// Hide column on extra large devices (≥1200px).
|
149
|
+
xlHidden: _react.PropTypes.bool,
|
150
|
+
|
151
|
+
// Change the order of grid columns to the left for extra small devices (<544px).
|
152
|
+
xsPull: _react.PropTypes.number,
|
153
|
+
|
154
|
+
// Change the order of grid columns to the left for small devices (≥544px).
|
155
|
+
smPull: _react.PropTypes.number,
|
156
|
+
|
157
|
+
// Change the order of grid columns to the left for medium devices (≥768px).
|
158
|
+
mdPull: _react.PropTypes.number,
|
159
|
+
|
160
|
+
// Change the order of grid columns to the left for large devices (≥992px).
|
161
|
+
lgPull: _react.PropTypes.number,
|
162
|
+
|
163
|
+
// Change the order of grid columns to the left for extra large devices (≥1200px).
|
164
|
+
xlPull: _react.PropTypes.number,
|
165
|
+
|
166
|
+
// Change the order of grid columns to the right for extra small devices (<544px).
|
167
|
+
xsPush: _react.PropTypes.number,
|
168
|
+
|
169
|
+
// Change the order of grid columns to the right for small devices (≥544px).
|
170
|
+
smPush: _react.PropTypes.number,
|
171
|
+
|
172
|
+
// Change the order of grid columns to the right for medium devices (≥768px).
|
173
|
+
mdPush: _react.PropTypes.number,
|
174
|
+
|
175
|
+
// Change the order of grid columns to the right for large devices (≥992px).
|
176
|
+
lgPush: _react.PropTypes.number,
|
177
|
+
|
178
|
+
// Change the order of grid columns to the right for extra large devices (≥1200px).
|
179
|
+
xlPush: _react.PropTypes.number
|
180
|
+
};
|
181
|
+
exports.default = Col;
|
182
|
+
module.exports = exports['default'];
|
@@ -0,0 +1,74 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
8
|
+
|
9
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10
|
+
|
11
|
+
var _classnames = require('classnames');
|
12
|
+
|
13
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
14
|
+
|
15
|
+
var _react = require('react');
|
16
|
+
|
17
|
+
var _react2 = _interopRequireDefault(_react);
|
18
|
+
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
20
|
+
|
21
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
22
|
+
|
23
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24
|
+
|
25
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
26
|
+
|
27
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Component representing a container from a layout grid.
|
31
|
+
*
|
32
|
+
* @extends Component
|
33
|
+
*/
|
34
|
+
|
35
|
+
var Container = function (_Component) {
|
36
|
+
_inherits(Container, _Component);
|
37
|
+
|
38
|
+
function Container() {
|
39
|
+
_classCallCheck(this, Container);
|
40
|
+
|
41
|
+
return _possibleConstructorReturn(this, Object.getPrototypeOf(Container).apply(this, arguments));
|
42
|
+
}
|
43
|
+
|
44
|
+
_createClass(Container, [{
|
45
|
+
key: 'render',
|
46
|
+
value: function render() {
|
47
|
+
var _props = this.props;
|
48
|
+
var children = _props.children;
|
49
|
+
var className = _props.className;
|
50
|
+
var fluid = _props.fluid;
|
51
|
+
|
52
|
+
var rest = _objectWithoutProperties(_props, ['children', 'className', 'fluid']);
|
53
|
+
|
54
|
+
return _react2.default.createElement(
|
55
|
+
'div',
|
56
|
+
_extends({}, rest, { className: (0, _classnames2.default)({
|
57
|
+
'container': !fluid,
|
58
|
+
'container-fluid': fluid
|
59
|
+
}, className) }),
|
60
|
+
children
|
61
|
+
);
|
62
|
+
}
|
63
|
+
}]);
|
64
|
+
|
65
|
+
return Container;
|
66
|
+
}(_react.Component);
|
67
|
+
|
68
|
+
Container.propTypes = {
|
69
|
+
|
70
|
+
// Set the container as fluid.
|
71
|
+
fluid: _react.PropTypes.bool
|
72
|
+
};
|
73
|
+
exports.default = Container;
|
74
|
+
module.exports = exports['default'];
|
data/lib/Row/index.js
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
8
|
+
|
9
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10
|
+
|
11
|
+
var _classnames = require('classnames');
|
12
|
+
|
13
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
14
|
+
|
15
|
+
var _react = require('react');
|
16
|
+
|
17
|
+
var _react2 = _interopRequireDefault(_react);
|
18
|
+
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
20
|
+
|
21
|
+
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
|
22
|
+
|
23
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
24
|
+
|
25
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
26
|
+
|
27
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
28
|
+
|
29
|
+
/**
|
30
|
+
* Component representing a row from a layout grid.
|
31
|
+
* In order to work properly it needs to be wrapped inside a <Container/> component.
|
32
|
+
*
|
33
|
+
* @extends Component
|
34
|
+
*/
|
35
|
+
|
36
|
+
var Row = function (_Component) {
|
37
|
+
_inherits(Row, _Component);
|
38
|
+
|
39
|
+
function Row() {
|
40
|
+
_classCallCheck(this, Row);
|
41
|
+
|
42
|
+
return _possibleConstructorReturn(this, Object.getPrototypeOf(Row).apply(this, arguments));
|
43
|
+
}
|
44
|
+
|
45
|
+
_createClass(Row, [{
|
46
|
+
key: 'render',
|
47
|
+
value: function render() {
|
48
|
+
var _props = this.props;
|
49
|
+
var children = _props.children;
|
50
|
+
var className = _props.className;
|
51
|
+
|
52
|
+
var rest = _objectWithoutProperties(_props, ['children', 'className']);
|
53
|
+
|
54
|
+
return _react2.default.createElement(
|
55
|
+
'div',
|
56
|
+
_extends({ className: (0, _classnames2.default)('row', className)
|
57
|
+
}, rest),
|
58
|
+
children
|
59
|
+
);
|
60
|
+
}
|
61
|
+
}]);
|
62
|
+
|
63
|
+
return Row;
|
64
|
+
}(_react.Component);
|
65
|
+
|
66
|
+
exports.default = Row;
|
67
|
+
module.exports = exports['default'];
|
@@ -0,0 +1,182 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
8
|
+
|
9
|
+
var _classnames = require('classnames');
|
10
|
+
|
11
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
12
|
+
|
13
|
+
var _react = require('react');
|
14
|
+
|
15
|
+
var _react2 = _interopRequireDefault(_react);
|
16
|
+
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
|
+
|
19
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
20
|
+
|
21
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
22
|
+
|
23
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
24
|
+
|
25
|
+
/**
|
26
|
+
* All the grid's available contexts.
|
27
|
+
*
|
28
|
+
* @constant
|
29
|
+
* @type {string[]}
|
30
|
+
*/
|
31
|
+
var contexts = ['xs', 'sm', 'md', 'lg', 'xl'];
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Component representing a column from a layout grid.
|
35
|
+
* In order to work properly it needs to be wrapped inside a <Row/> component.
|
36
|
+
*
|
37
|
+
* @extends Component
|
38
|
+
*/
|
39
|
+
|
40
|
+
var Col = function (_Component) {
|
41
|
+
_inherits(Col, _Component);
|
42
|
+
|
43
|
+
function Col() {
|
44
|
+
var _Object$getPrototypeO;
|
45
|
+
|
46
|
+
var _temp, _this, _ret;
|
47
|
+
|
48
|
+
_classCallCheck(this, Col);
|
49
|
+
|
50
|
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
51
|
+
args[_key] = arguments[_key];
|
52
|
+
}
|
53
|
+
|
54
|
+
return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Col)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.getCols = function () {
|
55
|
+
var classes = [];
|
56
|
+
|
57
|
+
contexts.forEach(function (context) {
|
58
|
+
var _this$props = _this.props;
|
59
|
+
var size = _this$props[context];
|
60
|
+
var offset = _this$props[context + 'Offset'];
|
61
|
+
var hidden = _this$props[context + 'Hidden'];
|
62
|
+
var pull = _this$props[context + 'Pull'];
|
63
|
+
var push = _this$props[context + 'Push'];
|
64
|
+
|
65
|
+
|
66
|
+
size && classes.push('col-' + context + '-' + size);
|
67
|
+
hidden && classes.push('col-' + context + '-hidden-' + hidden);
|
68
|
+
offset && classes.push('col-' + context + '-offset-' + offset);
|
69
|
+
pull && classes.push('col-' + context + '-pull-' + pull);
|
70
|
+
push && classes.push('col-' + context + '-push-' + push);
|
71
|
+
});
|
72
|
+
|
73
|
+
return classes;
|
74
|
+
}, _temp), _possibleConstructorReturn(_this, _ret);
|
75
|
+
}
|
76
|
+
|
77
|
+
/**
|
78
|
+
* Builds the column classes based on its properties and the available contexts.
|
79
|
+
*
|
80
|
+
* @method getCols
|
81
|
+
* @return {Array}
|
82
|
+
*/
|
83
|
+
|
84
|
+
|
85
|
+
_createClass(Col, [{
|
86
|
+
key: 'render',
|
87
|
+
value: function render() {
|
88
|
+
var _props = this.props;
|
89
|
+
var children = _props.children;
|
90
|
+
var className = _props.className;
|
91
|
+
|
92
|
+
|
93
|
+
return _react2.default.createElement(
|
94
|
+
'div',
|
95
|
+
{ className: (0, _classnames2.default)(className, this.getCols()) },
|
96
|
+
children
|
97
|
+
);
|
98
|
+
}
|
99
|
+
}]);
|
100
|
+
|
101
|
+
return Col;
|
102
|
+
}(_react.Component);
|
103
|
+
|
104
|
+
Col.propTypes = {
|
105
|
+
|
106
|
+
// Number of columns for extra small devices (<544px).
|
107
|
+
xs: _react.PropTypes.number,
|
108
|
+
|
109
|
+
// Number of columns for small devices (≥544px).
|
110
|
+
sm: _react.PropTypes.number,
|
111
|
+
|
112
|
+
// Number of columns for medium devices (≥768px).
|
113
|
+
md: _react.PropTypes.number,
|
114
|
+
|
115
|
+
// Number of columns for large devices (≥992px).
|
116
|
+
lg: _react.PropTypes.number,
|
117
|
+
|
118
|
+
// Number of columns for extra large devices (≥1200px).
|
119
|
+
xl: _react.PropTypes.number,
|
120
|
+
|
121
|
+
// Move columns to the right for extra small devices (<544px).
|
122
|
+
xsOffset: _react.PropTypes.number,
|
123
|
+
|
124
|
+
// Move columns to the right for small devices (≥544px).
|
125
|
+
smOffset: _react.PropTypes.number,
|
126
|
+
|
127
|
+
// Move columns to the right for medium devices (≥768px).
|
128
|
+
mdOffset: _react.PropTypes.number,
|
129
|
+
|
130
|
+
// Move columns to the right for large devices (≥992px).
|
131
|
+
lgOffset: _react.PropTypes.number,
|
132
|
+
|
133
|
+
// Move columns to the right for extra large devices (≥1200px).
|
134
|
+
xlOffset: _react.PropTypes.number,
|
135
|
+
|
136
|
+
// Hide column on extra small devices (<544px).
|
137
|
+
xsHidden: _react.PropTypes.bool,
|
138
|
+
|
139
|
+
// Hide column on small devices (≥544px).
|
140
|
+
smHidden: _react.PropTypes.bool,
|
141
|
+
|
142
|
+
// Hide column on medium devices (≥768px).
|
143
|
+
mdHidden: _react.PropTypes.bool,
|
144
|
+
|
145
|
+
// Hide column on large devices (≥992px).
|
146
|
+
lgHidden: _react.PropTypes.bool,
|
147
|
+
|
148
|
+
// Hide column on extra large devices (≥1200px).
|
149
|
+
xlHidden: _react.PropTypes.bool,
|
150
|
+
|
151
|
+
// Change the order of grid columns to the left for extra small devices (<544px).
|
152
|
+
xsPull: _react.PropTypes.number,
|
153
|
+
|
154
|
+
// Change the order of grid columns to the left for small devices (≥544px).
|
155
|
+
smPull: _react.PropTypes.number,
|
156
|
+
|
157
|
+
// Change the order of grid columns to the left for medium devices (≥768px).
|
158
|
+
mdPull: _react.PropTypes.number,
|
159
|
+
|
160
|
+
// Change the order of grid columns to the left for large devices (≥992px).
|
161
|
+
lgPull: _react.PropTypes.number,
|
162
|
+
|
163
|
+
// Change the order of grid columns to the left for extra large devices (≥1200px).
|
164
|
+
xlPull: _react.PropTypes.number,
|
165
|
+
|
166
|
+
// Change the order of grid columns to the right for extra small devices (<544px).
|
167
|
+
xsPush: _react.PropTypes.number,
|
168
|
+
|
169
|
+
// Change the order of grid columns to the right for small devices (≥544px).
|
170
|
+
smPush: _react.PropTypes.number,
|
171
|
+
|
172
|
+
// Change the order of grid columns to the right for medium devices (≥768px).
|
173
|
+
mdPush: _react.PropTypes.number,
|
174
|
+
|
175
|
+
// Change the order of grid columns to the right for large devices (≥992px).
|
176
|
+
lgPush: _react.PropTypes.number,
|
177
|
+
|
178
|
+
// Change the order of grid columns to the right for extra large devices (≥1200px).
|
179
|
+
xlPush: _react.PropTypes.number
|
180
|
+
};
|
181
|
+
exports.default = Col;
|
182
|
+
module.exports = exports['default'];
|