kepler.gl
Version:
kepler.gl is a webgl based application to visualize large scale location data in the browser
160 lines (133 loc) • 18.3 kB
JavaScript
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = exports.ActionPanelItem = void 0;
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
var _react = _interopRequireWildcard(require("react"));
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _classnames = _interopRequireDefault(require("classnames"));
var _icons = require("./icons");
var _switch = _interopRequireDefault(require("./switch"));
function _templateObject3() {
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: ", ";\n box-shadow: ", ";\n transition: ", ";\n color: ", ";\n\n .action-panel-item {\n ", "\n\n &:last-of-type {\n border-bottom: 0;\n }\n }\n"]);
_templateObject3 = function _templateObject3() {
return data;
};
return data;
}
function _templateObject2() {
var data = (0, _taggedTemplateLiteral2["default"])(["\n label {\n margin-bottom: 0;\n color: ", ";\n padding-left: 20px;\n line-height: 12px;\n\n &:before {\n width: 12px;\n height: 12px;\n background-color: ", ";\n }\n &:hover {\n color: ", ";\n }\n }\n"]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
}
function _templateObject() {
var data = (0, _taggedTemplateLiteral2["default"])(["\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 12px;\n line-height: 14px;\n padding: 8px;\n min-height: ", "px;\n text-transform: capitalize;\n background-color: ", ";\n width: ", "px;\n position: relative;\n ", "\n\n :hover {\n cursor: pointer;\n color: ", ";\n .nested-group {\n display: block;\n }\n }\n\n .label {\n margin-left: 8px;\n }\n\n .label-icon {\n margin-left: auto;\n }\n\n .nested-group {\n width: 110px;\n display: none;\n color: ", ";\n position: absolute;\n left: 110px;\n top: 0px;\n padding-left: 4px;\n }\n"]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
var StyledItem = _styledComponents["default"].div(_templateObject(), function (props) {
return props.theme.actionPanelHeight;
}, function (props) {
return props.theme.dropdownListBgd;
}, function (props) {
return props.theme.actionPanelWidth;
}, function (props) {
return props.color ? "border-left: 3px solid rgb(".concat(props.color, ");") : '';
}, function (props) {
return props.theme.textColorHl;
}, function (props) {
return props.theme.textColor;
});
var StyledCheckedbox = (0, _styledComponents["default"])(_switch["default"])(_templateObject2(), function (props) {
return props.theme.textColor;
}, function (props) {
return props.theme.dropdownListBgd;
}, function (props) {
return props.theme.textColorHl;
});
var renderChildren = function renderChildren(child, index) {
return _react["default"].cloneElement(child, {
onClick: function onClick() {
if (_react["default"].isValidElement(child)) {
if (child.props.onClick) {
child.props.onClick(index);
}
}
},
className: (0, _classnames["default"])('action-panel-item', child.props.className)
});
};
var ActionPanelItem = _react["default"].memo(function (_ref) {
var children = _ref.children,
color = _ref.color,
className = _ref.className,
Icon = _ref.Icon,
label = _ref.label,
onClick = _ref.onClick,
isSelection = _ref.isSelection,
isActive = _ref.isActive,
style = _ref.style;
var onClickCallback = (0, _react.useCallback)(function (event) {
event.preventDefault();
event.stopPropagation();
onClick();
}, [onClick]);
return _react["default"].createElement(StyledItem, {
className: className,
onClick: onClickCallback,
color: color,
style: style
}, Icon ? _react["default"].createElement("div", {
className: "icon"
}, _react["default"].createElement(Icon, {
height: "16px"
})) : null, isSelection ? _react["default"].createElement(StyledCheckedbox, {
type: "checkbox",
checked: Boolean(isActive),
id: "switch-".concat(label),
secondary: true,
label: label
}) : _react["default"].createElement("span", {
className: "label"
}, label), children && children.length ? _react["default"].createElement("div", null, _react["default"].createElement("div", {
className: "label-icon"
}, _react["default"].createElement(_icons.ArrowRight, {
height: "16px"
})), _react["default"].createElement("div", {
className: "nested-group"
}, _react["default"].Children.map(children, renderChildren))) : null);
});
exports.ActionPanelItem = ActionPanelItem;
ActionPanelItem.displayName = 'ActionPanelItem';
var StyledActionPanel = _styledComponents["default"].div(_templateObject3(), function (props) {
return props.direction;
}, function (props) {
return props.theme.dropdownListShadow;
}, function (props) {
return props.theme.transitionSlow;
}, function (props) {
return props.theme.textColor;
}, function (props) {
return props.direction === 'column' ? "border-bottom: 1px solid ".concat(props.theme.panelHeaderIcon) : "border-right: 1px solid ".concat(props.theme.panelHeaderIcon);
}); // React compound element https://medium.com/@Dane_s/react-js-compound-components-a6e54b5c9992
var ActionPanel = function ActionPanel(_ref2) {
var children = _ref2.children,
className = _ref2.className,
_ref2$direction = _ref2.direction,
direction = _ref2$direction === void 0 ? 'column' : _ref2$direction;
return _react["default"].createElement(StyledActionPanel, {
className: className,
direction: direction
}, _react["default"].Children.map(children, renderChildren));
};
ActionPanel.displayName = 'ActionPanel';
var _default = ActionPanel;
exports["default"] = _default;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRzL2NvbW1vbi9hY3Rpb24tcGFuZWwuanMiXSwibmFtZXMiOlsiU3R5bGVkSXRlbSIsInN0eWxlZCIsImRpdiIsInByb3BzIiwidGhlbWUiLCJhY3Rpb25QYW5lbEhlaWdodCIsImRyb3Bkb3duTGlzdEJnZCIsImFjdGlvblBhbmVsV2lkdGgiLCJjb2xvciIsInRleHRDb2xvckhsIiwidGV4dENvbG9yIiwiU3R5bGVkQ2hlY2tlZGJveCIsIkNoZWNrYm94IiwicmVuZGVyQ2hpbGRyZW4iLCJjaGlsZCIsImluZGV4IiwiUmVhY3QiLCJjbG9uZUVsZW1lbnQiLCJvbkNsaWNrIiwiaXNWYWxpZEVsZW1lbnQiLCJjbGFzc05hbWUiLCJBY3Rpb25QYW5lbEl0ZW0iLCJtZW1vIiwiY2hpbGRyZW4iLCJJY29uIiwibGFiZWwiLCJpc1NlbGVjdGlvbiIsImlzQWN0aXZlIiwic3R5bGUiLCJvbkNsaWNrQ2FsbGJhY2siLCJldmVudCIsInByZXZlbnREZWZhdWx0Iiwic3RvcFByb3BhZ2F0aW9uI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