kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
53 lines (50 loc) • 6.82 kB
JavaScript
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.media = exports.breakPointValues = void 0;
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
var _styledComponents = require("styled-components");
var _templateObject, _templateObject2, _templateObject3; // SPDX-License-Identifier: MIT
// Copyright contributors to the kepler.gl project
// These are useful for test or when theme doesn't define them
var breakPointValues = exports.breakPointValues = {
palm: 588,
desk: 768
};
/**
* Contains media rules for different device types
* @namespace
* @property {object} media
* @property {string} media.palm - rule for palm devices
* @property {string} media.portable - rule for portable devices
* @property {string} media.desk - rule for desktops
*/
var media = exports.media = {
palm: function palm(first) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return (0, _styledComponents.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n @media (max-width: ", "px) {\n ", ";\n }\n "])), function (props) {
return (props.theme.breakPoints || breakPointValues).palm;
}, _styledComponents.css.apply(void 0, [first].concat(args)));
},
portable: function portable(first) {
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2["default"])(["\n @media (max-width: ", "px) {\n ", ";\n }\n "])), function (props) {
return (props.theme.breakPoints || breakPointValues).desk;
}, _styledComponents.css.apply(void 0, [first].concat(args)));
},
desk: function desk(first) {
for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
args[_key3 - 1] = arguments[_key3];
}
return (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n @media (min-width: ", "px) {\n ", ";\n }\n "])), function (props) {
return (props.theme.breakPoints || breakPointValues).desk + 1;
}, _styledComponents.css.apply(void 0, [first].concat(args)));
}
};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfc3R5bGVkQ29tcG9uZW50cyIsInJlcXVpcmUiLCJfdGVtcGxhdGVPYmplY3QiLCJfdGVtcGxhdGVPYmplY3QyIiwiX3RlbXBsYXRlT2JqZWN0MyIsImJyZWFrUG9pbnRWYWx1ZXMiLCJleHBvcnRzIiwicGFsbSIsImRlc2siLCJtZWRpYSIsImZpcnN0IiwiX2xlbiIsImFyZ3VtZW50cyIsImxlbmd0aCIsImFyZ3MiLCJBcnJheSIsIl9rZXkiLCJjc3MiLCJfdGFnZ2VkVGVtcGxhdGVMaXRlcmFsMiIsInByb3BzIiwidGhlbWUiLCJicmVha1BvaW50cyIsImFwcGx5IiwiY29uY2F0IiwicG9ydGFibGUiLCJfbGVuMiIsIl9rZXkyIiwiX2xlbjMiLCJfa2V5MyJdLCJzb3VyY2VzIjpbIi4uL3NyYy9tZWRpYS1icmVha3BvaW50cy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogTUlUXG4vLyBDb3B5cmlnaHQgY29udHJpYnV0b3JzIHRvIHRoZSBrZXBsZXIuZ2wgcHJvamVjdFxuXG5pbXBvcnQge2Nzc30gZnJvbSAnc3R5bGVkLWNvbXBvbmVudHMnO1xuXG4vLyBUaGVzZSBhcmUgdXNlZnVsIGZvciB0ZXN0IG9yIHdoZW4gdGhlbWUgZG9lc24ndCBkZWZpbmUgdGhlbVxuZXhwb3J0IGNvbnN0IGJyZWFrUG9pbnRWYWx1ZXMgPSB7XG4gIHBhbG06IDU4OCxcbiAgZGVzazogNzY4XG59O1xuXG4vKipcbiAqIENvbnRhaW5zIG1lZGlhIHJ1bGVzIGZvciBk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