UNPKG

@kubit-ui-web/react-components

Version:

Kubit React Components is a customizable, accessible library of React web components, designed to enhance your application's user experience

95 lines 3.87 kB
import { InputState } from '../../../../../components/input/types/inputTheme'; import { BORDERS, RADIUS } from '../../../../../designSystem/kubitWireframe/commons/foundations/borders'; import { SPACINGS } from '../../../../../designSystem/kubitWireframe/commons/foundations/spacings'; import { FONT_WEIGHT } from '../../../../../designSystem/kubitWireframe/commons/foundations/typography'; import { shadowAfterStyles, transformShadow } from '../../../../../designSystem/kubitWireframe/utils/wireframe'; import { DeviceBreakpointsType } from '../../../../../types/breakpoints/breakpoints'; import { InputVariantType } from '../input/variants'; import { PopoverVariantType } from '../popover/variants'; import { ListOptionsVariantType, OptionVariantType, TextVariantType } from '../variants'; import { InputSearchVariant } from './variants'; const commonProps = COLORS => ({ inputVariant: InputVariantType.DEFAULT, label: { font_weight: FONT_WEIGHT.font_weight_600, font_variant: TextVariantType.PARAGRAPH_SMALL_EXTENDED, }, labelContainer: { margin_bottom: SPACINGS.spacing_100, }, popoverVariant: { [DeviceBreakpointsType.DESKTOP]: PopoverVariantType.INPUT_SEARCH, [DeviceBreakpointsType.TABLET]: PopoverVariantType.INPUT_SEARCH, [DeviceBreakpointsType.MOBILE]: PopoverVariantType.INPUT_SEARCH, }, useActionBottomSheet: { [DeviceBreakpointsType.DESKTOP]: false, [DeviceBreakpointsType.TABLET]: false, [DeviceBreakpointsType.MOBILE]: false, }, searchListContainer: { margin_top: SPACINGS.spacing_100, background_color: COLORS.NEUTRAL.color_neutral_bg_250, border: `${BORDERS.border_50} solid ${COLORS.NEUTRAL.color_neutral_border_50}`, border_radius: RADIUS.radius_150, height: '100%', ...transformShadow(RADIUS.radius_150), ...shadowAfterStyles(RADIUS.radius_150, COLORS.BRAND.color_brand_bg_50, '2px'), [DeviceBreakpointsType.DESKTOP]: { margin_top: `${SPACINGS.spacing_150}`, padding_bottom: SPACINGS.spacing_150, }, [DeviceBreakpointsType.TABLET]: { margin_top: `${SPACINGS.spacing_150}`, padding_bottom: SPACINGS.spacing_150, }, [DeviceBreakpointsType.MOBILE]: { margin_top: `${SPACINGS.spacing_150}`, padding_bottom: SPACINGS.spacing_150, }, }, searchListSubContainer: { border_radius: RADIUS.radius_150, margin_top: SPACINGS.spacing_150, padding_bottom: SPACINGS.spacing_150, }, }); export const getInputSearchStyles = (COLORS) => { return { [InputSearchVariant.DEFAULT]: { [InputState.EMPTY]: { ...commonProps(COLORS), }, [InputState.FILLED]: { ...commonProps(COLORS), }, [InputState.ACTIVE]: { ...commonProps(COLORS), }, [InputState.DISABLED_EMPTY]: { ...commonProps(COLORS), }, [InputState.DISABLED_FILLED]: { ...commonProps(COLORS), }, [InputState.DISABLED_FILLED_WITH_INFO]: { ...commonProps(COLORS), }, [InputState.ERROR_EMPTY]: { ...commonProps(COLORS), }, [InputState.ERROR_FILLED]: { ...commonProps(COLORS), }, [InputState.ERROR_ACTIVE]: { ...commonProps(COLORS), }, listOptions: { variant: ListOptionsVariantType.INPUT, optionVariant: OptionVariantType.INPUT, hightlightedOptionVariant: OptionVariantType.INPUT_HIGHTLIGHTED, }, }, }; }; //# sourceMappingURL=styles.js.map