1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.propKey = propKey;
|
7 | exports.intersection = intersection;
|
8 | exports.createRuleSet = createRuleSet;
|
9 | exports.createClassName = createClassName;
|
10 |
|
11 | function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
|
12 |
|
13 | function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
|
14 |
|
15 | function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
|
16 |
|
17 | function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
|
18 |
|
19 |
|
20 |
|
21 |
|
22 | function propKey(breakpointProps) {
|
23 | return Object.keys(breakpointProps)[0];
|
24 | }
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 | function intersection(a1, a2) {
|
31 | return a2 ? a1.filter(function (element) {
|
32 | return a2.indexOf(element) >= 0;
|
33 | }) : _toConsumableArray(a1);
|
34 | }
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 | function createRuleSet(className, query) {
|
42 | return "@media ".concat(query, "{.").concat(className, "{display:none!important;}}");
|
43 | }
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | function createClassName() {
|
50 | for (var _len = arguments.length, components = new Array(_len), _key = 0; _key < _len; _key++) {
|
51 | components[_key] = arguments[_key];
|
52 | }
|
53 |
|
54 | return ["fresnel"].concat(_toConsumableArray(components.reduce(function (acc, breakpoint) {
|
55 | return Array.isArray(breakpoint) ? _toConsumableArray(acc).concat(_toConsumableArray(breakpoint)) : _toConsumableArray(acc).concat([breakpoint]);
|
56 | }, []))).join("-");
|
57 | }
|
58 |
|
\ | No newline at end of file |