@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.
44 lines • 2.46 kB
JavaScript
import styled, { css } from "styled-components";
import mq from "../utils/mediaQuery";
import { right, left } from "../utils/rtl";
import getSpacingToken from "../common/getSpacingToken";
import defaultTheme from "../defaultTheme";
export const StyledLabel = styled.label.withConfig({
displayName: "InputSelectstyled__StyledLabel",
componentId: "sc-x0ly4m-0"
})(["position:relative;margin-bottom:", ";display:block;"], getSpacingToken);
StyledLabel.defaultProps = {
theme: defaultTheme
};
export const StyledModalWrapper = styled.div.withConfig({
displayName: "InputSelectstyled__StyledModalWrapper",
componentId: "sc-x0ly4m-1"
})(["", ";"], ({
theme,
isScrolled
}) => css([".orbit-modal-section{padding-left:0;padding-right:0;}.orbit-input-field-field{margin-top:", ";}.orbit-modal-footer{box-shadow:none;}.orbit-modal-header-container{position:sticky;padding-bottom:", ";box-shadow:", ";top:0px;}.orbit-modal-wrapper-content{height:100%;}"], theme.orbit.spaceXSmall, isScrolled && theme.orbit.spaceMedium, isScrolled && theme.orbit.boxShadowFixed));
StyledModalWrapper.defaultProps = {
theme: defaultTheme
};
export const StyledDropdown = styled.ul.withConfig({
displayName: "InputSelectstyled__StyledDropdown",
componentId: "sc-x0ly4m-2"
})(["", ";"], ({
theme,
$maxHeight,
$maxWidth,
$hasLabel
}) => 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, mq.largeMobile(css(["position:absolute;", ":0;overflow-y:scroll;max-height:", ";max-width:", ";box-shadow:", ";border-radius:", ";top:calc( ", "px + ", "px );"], 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)))));
StyledDropdown.defaultProps = {
theme: defaultTheme
};
export const StyledCloseButton = styled.button.withConfig({
displayName: "InputSelectstyled__StyledCloseButton",
componentId: "sc-x0ly4m-3"
})(["", ";"], ({
theme,
$disabled
}) => css(["border:0;background:transparent;cursor:", ";pointer-events:", ";appearance:none;padding:0;margin-", ":", ";"], $disabled ? "not-allowed" : "pointer", $disabled ? "none" : "auto", right, theme.orbit.spaceXSmall));
StyledCloseButton.defaultProps = {
theme: defaultTheme
};