1 | "use strict";
|
2 |
|
3 | exports.__esModule = true;
|
4 | exports["default"] = position;
|
5 | var _directionalProperty = _interopRequireDefault(require("../helpers/directionalProperty"));
|
6 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
7 | function _extends() { _extends = Object.assign ? Object.assign.bind() : 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; }; return _extends.apply(this, arguments); }
|
8 | var positionMap = ['absolute', 'fixed', 'relative', 'static', 'sticky'];
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 | function position(firstValue) {
|
53 | for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
54 | values[_key - 1] = arguments[_key];
|
55 | }
|
56 | if (positionMap.indexOf(firstValue) >= 0 && firstValue) {
|
57 | return _extends({}, _directionalProperty["default"].apply(void 0, [''].concat(values)), {
|
58 | position: firstValue
|
59 | });
|
60 | } else {
|
61 | return _directionalProperty["default"].apply(void 0, ['', firstValue].concat(values));
|
62 | }
|
63 | }
|
64 | module.exports = exports.default; |
\ | No newline at end of file |