avlmap
Version:
Avail Map by Avail Labs
467 lines (348 loc) • 16 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledMapContainer = exports.StyledModalContent = exports.Table = exports.DatasetSquare = exports.ButtonGroup = exports.StyledPanelDropdown = exports.StyledPanelHeader = exports.InlineInput = exports.InputLight = exports.Input = exports.Button = exports.Tooltip = exports.SidePanelDivider = exports.SidePanelSection = exports.PanelContent = exports.PanelHeaderContent = exports.PanelHeaderTitle = exports.PanelLabelBold = exports.PanelLabelWrapper = exports.PanelLabel = exports.CenterFlexbox = exports.IconRoundSmall = exports.SelectTextBold = exports.SelectText = void 0;
var _styledComponents = _interopRequireDefault(require("styled-components"));
var _reactTooltip = _interopRequireDefault(require("react-tooltip"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
function _templateObject24() {
var data = _taggedTemplateLiteral(["\n .mapboxgl-map .mapboxgl-missing-css {\n display: none;\n }\n"]);
_templateObject24 = function _templateObject24() {
return data;
};
return data;
}
function _templateObject23() {
var data = _taggedTemplateLiteral(["\n background: ", ";\n color: ", ";\n display: flex;\n flex-direction: row;\n font-size: 10px;\n margin: 0 -96px;\n padding: 30px 96px;\n justify-content: space-between;\n"]);
_templateObject23 = function _templateObject23() {
return data;
};
return data;
}
function _templateObject22() {
var data = _taggedTemplateLiteral(["\n width: 100%;\n border-spacing: 0;\n\n thead {\n tr th {\n background: ", ";\n color: ", ";\n padding: 18px 12px;\n text-align: start;\n }\n }\n\n tbody {\n tr td {\n border-bottom: ", ";\n padding: 12px;\n }\n }\n"]);
_templateObject22 = function _templateObject22() {
return data;
};
return data;
}
function _templateObject21() {
var data = _taggedTemplateLiteral(["\n display: inline-block;\n width: 8px;\n height: 8px;\n background-color: rgb(", ");\n margin-right: 12px\n"]);
_templateObject21 = function _templateObject21() {
return data;
};
return data;
}
function _templateObject20() {
var data = _taggedTemplateLiteral(["\n display: flex;\n .button {\n border-radius: 0;\n margin-left: 2px;\n }\n .button:first-child {\n border-bottom-left-radius: ", ";\n border-top-left-radius: ", ";\n margin-left: 0;\n }\n .button:last-child {\n border-bottom-right-radius: ", ";\n border-top-right-radius: ", ";\n }\n"]);
_templateObject20 = function _templateObject20() {
return data;
};
return data;
}
function _templateObject19() {
var data = _taggedTemplateLiteral(["\n ", "\n background-color: ", ";\n overflow-y: auto;\n box-shadow: ", ";\n border-radius: ", ";\n margin-top: 2px;\n max-height: 500px;\n"]);
_templateObject19 = function _templateObject19() {
return data;
};
return data;
}
function _templateObject18() {
var data = _taggedTemplateLiteral(["\n background-color: ", ";\n border-left: 3px solid\n rgb(\n ", "\n );\n padding: 0 10px 0 0;\n height: ", "px;\n display: flex;\n justify-content: space-between;\n align-items: center;\n transition: ", ";\n"]);
_templateObject18 = function _templateObject18() {
return data;
};
return data;
}
function _templateObject17() {
var data = _taggedTemplateLiteral(["\n ", ";\n"]);
_templateObject17 = function _templateObject17() {
return data;
};
return data;
}
function _templateObject16() {
var data = _taggedTemplateLiteral(["\n ", "\n"]);
_templateObject16 = function _templateObject16() {
return data;
};
return data;
}
function _templateObject15() {
var data = _taggedTemplateLiteral(["\n ", ";\n"]);
_templateObject15 = function _templateObject15() {
return data;
};
return data;
}
function _templateObject14() {
var data = _taggedTemplateLiteral(["\n align-items: center;\n background-color: ", ";\n border-radius: ", ";\n color: ", ";\n cursor: pointer;\n display: inline-flex;\n font-size: ", ";\n font-weight: 500;\n justify-content: center;\n letter-spacing: 0.3px;\n line-height: 14px;\n outline: 0;\n padding: ", ";\n text-align: center;\n transition: ", ";\n vertical-align: middle;\n width: ", ";\n opacity: ", ";\n pointer-events: ", ";\n\n :hover,\n :focus,\n :active,\n &.active {\n background-color: ", ";\n color: ", ";\n }\n\n svg {\n margin-right: 8px;\n }\n"]);
_templateObject14 = function _templateObject14() {
return data;
};
return data;
}
function _templateObject13() {
var data = _taggedTemplateLiteral(["\n &.__react_component_tooltip {\n font-size: 9.5px;\n font-weight: 500;\n padding: 7px 18px;\n\n &.type-dark {\n background-color: ", ";\n color: ", ";\n &.place-bottom {\n :after {\n border-bottom-color: ", ";\n }\n }\n\n &.place-top {\n :after {\n border-top-color: ", ";\n }\n }\n\n &.place-right {\n :after {\n border-right-color: ", ";\n }\n }\n\n &.place-left {\n :after {\n border-left-color: ", ";\n }\n }\n }\n }\n"]);
_templateObject13 = function _templateObject13() {
return data;
};
return data;
}
function _templateObject12() {
var data = _taggedTemplateLiteral(["\n border-bottom: 1px solid ", ";\n height: 12px;\n margin-bottom: 12px;\n"]);
_templateObject12 = function _templateObject12() {
return data;
};
return data;
}
function _templateObject11() {
var data = _taggedTemplateLiteral(["\n margin-bottom: 12px;\n opacity: ", ";\n pointer-events: ", ";\n"]);
_templateObject11 = function _templateObject11() {
return data;
};
return data;
}
function _templateObject10() {
var data = _taggedTemplateLiteral(["\n background-color: ", ";\n padding: 12px;\n"]);
_templateObject10 = function _templateObject10() {
return data;
};
return data;
}
function _templateObject9() {
var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: ", ";\n padding-left: 12px;\n\n .icon {\n color: ", ";\n display: flex;\n align-items: center;\n margin-right: 12px;\n }\n"]);
_templateObject9 = function _templateObject9() {
return data;
};
return data;
}
function _templateObject8() {
var data = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 13px;\n letter-spacing: 0.43px;\n text-transform: capitalize;\n"]);
_templateObject8 = function _templateObject8() {
return data;
};
return data;
}
function _templateObject7() {
var data = _taggedTemplateLiteral(["\n font-weight: 500;\n"]);
_templateObject7 = function _templateObject7() {
return data;
};
return data;
}
function _templateObject6() {
var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: self-start;\n"]);
_templateObject6 = function _templateObject6() {
return data;
};
return data;
}
function _templateObject5() {
var data = _taggedTemplateLiteral(["\n color: ", ";\n display: inline-block;\n font-size: 11px;\n font-weight: 400;\n margin-bottom: 4px;\n text-transform: capitalize;\n"]);
_templateObject5 = function _templateObject5() {
return data;
};
return data;
}
function _templateObject4() {
var data = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n"]);
_templateObject4 = function _templateObject4() {
return data;
};
return data;
}
function _templateObject3() {
var data = _taggedTemplateLiteral(["\n display: flex;\n width: 18px;\n height: 18px;\n border-radius: 9px;\n background-color: ", "; // updated after checking sketch file\n color: ", ";\n align-items: center;\n justify-content: center;\n\n :hover {\n cursor: pointer;\n background-color: ", ";\n }\n"]);
_templateObject3 = function _templateObject3() {
return data;
};
return data;
}
function _templateObject2() {
var data = _taggedTemplateLiteral(["\n color: ", ";\n font-weight: 500;\n"]);
_templateObject2 = function _templateObject2() {
return data;
};
return data;
}
function _templateObject() {
var data = _taggedTemplateLiteral(["\n color: ", ";\n font-size: ", ";\n font-weight: 400;\n\n i {\n font-size: 13px;\n margin-right: 6px;\n }\n"]);
_templateObject = function _templateObject() {
return data;
};
return data;
}
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var SelectText = _styledComponents["default"].span(_templateObject(), function (props) {
return props.theme.labelColor;
}, function (props) {
return props.theme.selectFontSize;
});
exports.SelectText = SelectText;
var SelectTextBold = (0, _styledComponents["default"])(SelectText)(_templateObject2(), function (props) {
return props.theme.textColor;
});
exports.SelectTextBold = SelectTextBold;
var IconRoundSmall = _styledComponents["default"].div(_templateObject3(), function (props) {
return props.theme.secondaryBtnBgdHover;
}, function (props) {
return props.theme.secondaryBtnColor;
}, function (props) {
return props.theme.secondaryBtnBgdHover;
});
exports.IconRoundSmall = IconRoundSmall;
var CenterFlexbox = _styledComponents["default"].div(_templateObject4());
exports.CenterFlexbox = CenterFlexbox;
var PanelLabel = _styledComponents["default"].label.attrs({
className: 'side-panel-panel__label'
})(_templateObject5(), function (props) {
return props.theme.labelColor;
});
exports.PanelLabel = PanelLabel;
var PanelLabelWrapper = _styledComponents["default"].div.attrs({
className: 'side-panel-panel__label-wrapper'
})(_templateObject6());
exports.PanelLabelWrapper = PanelLabelWrapper;
var PanelLabelBold = (0, _styledComponents["default"])(PanelLabel)(_templateObject7());
exports.PanelLabelBold = PanelLabelBold;
var PanelHeaderTitle = _styledComponents["default"].span.attrs({
className: 'side-panel-panel__header__title'
})(_templateObject8(), function (props) {
return props.theme.textColor;
});
exports.PanelHeaderTitle = PanelHeaderTitle;
var PanelHeaderContent = _styledComponents["default"].div(_templateObject9(), function (props) {
return props.theme.textColor;
}, function (props) {
return props.theme.labelColor;
});
exports.PanelHeaderContent = PanelHeaderContent;
var PanelContent = _styledComponents["default"].div.attrs({
className: 'side-panel-panel__content'
})(_templateObject10(), function (props) {
return props.theme.panelBackground;
});
exports.PanelContent = PanelContent;
var SidePanelSection = _styledComponents["default"].div.attrs({
className: 'side-panel-section'
})(_templateObject11(), function (props) {
return props.disabled ? 0.4 : 1;
}, function (props) {
return props.disabled ? 'none' : 'all';
});
exports.SidePanelSection = SidePanelSection;
var SidePanelDivider = _styledComponents["default"].div.attrs({
className: 'side-panel-divider'
})(_templateObject12(), function (props) {
return props.theme.panelBorderColor;
});
exports.SidePanelDivider = SidePanelDivider;
var Tooltip = (0, _styledComponents["default"])(_reactTooltip["default"])(_templateObject13(), function (props) {
return props.theme.tooltipBg;
}, function (props) {
return props.theme.tooltipColor;
}, function (props) {
return props.theme.tooltipBg;
}, function (props) {
return props.theme.tooltipBg;
}, function (props) {
return props.theme.tooltipBg;
}, function (props) {
return props.theme.tooltipBg;
});
exports.Tooltip = Tooltip;
var Button = _styledComponents["default"].div.attrs({
className: 'button'
})(_templateObject14(), function (props) {
return props.negative ? props.theme.negativeBtnBgd : props.secondary ? props.theme.secondaryBtnBgd : props.link ? props.theme.linkBtnBgd : props.theme.primaryBtnBgd;
}, function (props) {
return props.theme.primaryBtnRadius;
}, function (props) {
return props.negative ? props.theme.negativeBtnColor : props.secondary ? props.theme.secondaryBtnColor : props.link ? props.theme.linkBtnColor : props.theme.primaryBtnColor;
}, function (props) {
return props.large ? '14px' : props.small ? '10px' : '11px';
}, function (props) {
return props.large ? '14px 32px' : props.small ? '6px 9px' : '9px 12px';
}, function (props) {
return props.theme.transition;
}, function (props) {
return props.width || 'auto';
}, function (props) {
return props.disabled ? 0.4 : 1;
}, function (props) {
return props.disabled ? 'none' : 'all';
}, function (props) {
return props.negative ? props.theme.negativeBtnBgdHover : props.secondary ? props.theme.secondaryBtnBgdHover : props.link ? props.theme.linkBtnActBgdHover : props.theme.primaryBtnBgdHover;
}, function (props) {
return props.negative ? props.theme.negativeBtnActColor : props.secondary ? props.theme.secondaryBtnActColor : props.link ? props.theme.linkBtnActColor : props.theme.primaryBtnActColor;
});
exports.Button = Button;
var Input = _styledComponents["default"].input(_templateObject15(), function (props) {
return props.secondary ? props.theme.secondaryInput : props.theme.input;
});
exports.Input = Input;
var InputLight = _styledComponents["default"].input(_templateObject16(), function (props) {
return props.theme.inputLT;
});
exports.InputLight = InputLight;
var InlineInput = (0, _styledComponents["default"])(Input)(_templateObject17(), function (props) {
return props.theme.inlineInput;
});
exports.InlineInput = InlineInput;
var StyledPanelHeader = _styledComponents["default"].div(_templateObject18(), function (props) {
return props.active ? props.theme.panelBackgroundHover : props.theme.panelBackground;
}, function (props) {
return props.labelRCGColorValues ? props.labelRCGColorValues.join(',') : 'transparent';
}, function (props) {
return props.theme.panelHeaderHeight;
}, function (props) {
return props.theme.transition;
});
exports.StyledPanelHeader = StyledPanelHeader;
var StyledPanelDropdown = _styledComponents["default"].div(_templateObject19(), function (props) {
return props.theme.panelDropdownScrollBar;
}, function (props) {
return props.theme.panelBackground;
}, function (props) {
return props.theme.panelBoxShadow;
}, function (props) {
return props.theme.panelBorderRadius;
});
exports.StyledPanelDropdown = StyledPanelDropdown;
var ButtonGroup = _styledComponents["default"].div(_templateObject20(), function (props) {
return props.theme.primaryBtnRadius;
}, function (props) {
return props.theme.primaryBtnRadius;
}, function (props) {
return props.theme.primaryBtnRadius;
}, function (props) {
return props.theme.primaryBtnRadius;
});
exports.ButtonGroup = ButtonGroup;
var DatasetSquare = _styledComponents["default"].div(_templateObject21(), function (props) {
return props.color.join(',');
});
exports.DatasetSquare = DatasetSquare;
var Table = _styledComponents["default"].table(_templateObject22(), function (props) {
return props.theme.panelBackgroundLT;
}, function (props) {
return props.theme.titleColorLT;
}, function (props) {
return props.theme.panelBorderLT;
});
exports.Table = Table;
var StyledModalContent = _styledComponents["default"].div(_templateObject23(), function (props) {
return props.theme.panelBackgroundLT;
}, function (props) {
return props.theme.textColorLT;
});
/**
* Newer versions of mapbox.gl display an error message banner on top of the map by default
* which will cause the map to display points in the wrong locations
* This workaround will hide the error banner.
*/
exports.StyledModalContent = StyledModalContent;
var StyledMapContainer = _styledComponents["default"].div(_templateObject24());
exports.StyledMapContainer = StyledMapContainer;