@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
55 lines (54 loc) • 3.38 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
exports.__esModule = true;
exports.StyledModalWrapper = exports.StyledLabel = exports.StyledDropdown = exports.StyledCloseButton = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _mediaQuery = _interopRequireDefault(require("../utils/mediaQuery"));
var _rtl = require("../utils/rtl");
var _defaultTheme = _interopRequireDefault(require("../defaultTheme"));
var _Modal = require("../Modal");
var _ModalHeader = require("../Modal/ModalHeader");
var _ModalSection = require("../Modal/ModalSection");
var _ModalFooter = require("../Modal/ModalFooter");
var _InputField = require("../InputField");
const StyledLabel = _styledComponents.default.label.withConfig({
displayName: "InputSelectstyled__StyledLabel",
componentId: "sc-x0ly4m-0"
})(["position:relative;"]);
exports.StyledLabel = StyledLabel;
const StyledModalWrapper = _styledComponents.default.div.withConfig({
displayName: "InputSelectstyled__StyledModalWrapper",
componentId: "sc-x0ly4m-1"
})(["", ";"], ({
theme,
isScrolled
}) => (0, _styledComponents.css)(["", "{padding-left:0;padding-right:0;}", "{margin-top:", ";}", "{box-shadow:none;}", "{position:sticky;padding-bottom:", ";box-shadow:", ";top:0px;}", "{height:100%;}"], _ModalSection.StyledModalSection, _InputField.Field, theme.orbit.spaceXSmall, _ModalFooter.StyledModalFooter, _ModalHeader.StyledModalHeader, isScrolled && theme.orbit.spaceMedium, isScrolled && theme.orbit.boxShadowFixed, _Modal.ModalWrapperContent));
exports.StyledModalWrapper = StyledModalWrapper;
StyledModalWrapper.defaultProps = {
theme: _defaultTheme.default
};
const StyledDropdown = _styledComponents.default.ul.withConfig({
displayName: "InputSelectstyled__StyledDropdown",
componentId: "sc-x0ly4m-2"
})(["", ";"], ({
theme,
$maxHeight,
$maxWidth,
$hasLabel
}) => (0, _styledComponents.css)(["display:flex;flex-direction:column;list-style-type:none;margin:0;padding:0;font-family:", ";box-sizing:border-box;width:100%;background:", ";z-index:3;", ""], theme.orbit.fontFamily, theme.orbit.paletteWhite, _mediaQuery.default.largeMobile((0, _styledComponents.css)(["position:absolute;", ":0;overflow-y:scroll;max-height:", ";max-width:", ";box-shadow:", ";border-radius:", ";top:calc( ", "px + ", "px );"], _rtl.left, $maxHeight, $maxWidth, theme.orbit.boxShadowAction, theme.orbit.borderRadiusNormal, parseInt(theme.orbit.heightInputNormal, 10), $hasLabel ? parseInt(theme.orbit.spaceXLarge, 10) : parseInt(theme.orbit.spaceXSmall, 10)))));
exports.StyledDropdown = StyledDropdown;
StyledDropdown.defaultProps = {
theme: _defaultTheme.default
};
const StyledCloseButton = _styledComponents.default.button.withConfig({
displayName: "InputSelectstyled__StyledCloseButton",
componentId: "sc-x0ly4m-3"
})(["", ";"], ({
theme,
$disabled
}) => (0, _styledComponents.css)(["border:0;background:transparent;cursor:", ";pointer-events:", ";appearance:none;padding:0;margin-", ":", ";"], $disabled ? "not-allowed" : "pointer", $disabled ? "none" : "auto", _rtl.right, theme.orbit.spaceXSmall));
exports.StyledCloseButton = StyledCloseButton;
StyledCloseButton.defaultProps = {
theme: _defaultTheme.default
};