@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
127 lines • 5.13 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMessageStyles = void 0;
const borders_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/borders");
const sizes_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/sizes");
const spacings_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/spacings");
const typography_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/typography");
const wireframe_1 = require("../../../../../designSystem/kubitWireframe/utils/wireframe");
const breakpoints_1 = require("../../../../../types/breakpoints/breakpoints");
const variants_1 = require("../text/variants");
const variants_2 = require("./variants");
const commonProps = COLORS => {
return {
container: {
display: 'flex',
flex_direction: 'row',
align_items: 'flex-start',
justify_content: 'flex-start',
gap: spacings_1.SPACINGS.spacing_150,
position: 'relative',
padding: spacings_1.SPACINGS.spacing_300,
border_width: borders_1.BORDERS.border_50,
border_style: 'solid',
border_color: COLORS.SECONDARY.color_secondary_border_50,
...(0, wireframe_1.transformShadow)(borders_1.RADIUS.radius_150),
...(0, wireframe_1.shadowAfterStyles)(borders_1.RADIUS.radius_150, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50),
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
},
headerContainer: {
display: 'flex',
flex_direction: 'column',
align_items: 'flex-start',
gap: spacings_1.SPACINGS.spacing_300,
margin_right: spacings_1.SPACINGS.spacing_450,
},
headerContainerLargeMessage: {
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
flex_direction: 'column',
},
},
title: {
font_variant: variants_1.TextVariantType.PARAGRAPH_MEDIUM_EXTENDED,
color: COLORS.NEUTRAL.color_neutral_font_50,
font_weight: typography_1.FONT_WEIGHT.font_weight_500,
},
contentContainerLargeMessage: {
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
margin_left: spacings_1.SPACINGS.spacing_0,
},
},
description: {
font_variant: variants_1.TextVariantType.PARAGRAPH_SMALL_EXTENDED,
color: COLORS.NEUTRAL.color_neutral_font_150,
font_weight: typography_1.FONT_WEIGHT.font_weight_400,
},
infoIcon: {
width: sizes_1.SIZES.size_250,
height: sizes_1.SIZES.size_250,
},
closeIcon: {
width: sizes_1.SIZES.size_250,
height: sizes_1.SIZES.size_250,
},
closeIconContainer: {
gap: spacings_1.SPACINGS.spacing_150,
right: spacings_1.SPACINGS.spacing_300,
position: 'absolute',
top: spacings_1.SPACINGS.spacing_300,
},
buttonSectionContainer: {
display: 'flex',
flex_direction: 'column',
width: '100%',
align_items: 'flex-start',
},
};
};
const getMessageStyles = (COLORS) => {
return {
[variants_2.MessageVariantType.INFORMATIVE]: {
...commonProps(COLORS),
container: {
...commonProps(COLORS).container,
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
},
infoIcon: {
...commonProps(COLORS).infoIcon,
color: COLORS.FEEDBACK.color_feedbackInfo_border_100,
},
},
[variants_2.MessageVariantType.WARNING]: {
...commonProps(COLORS),
container: {
...commonProps(COLORS).container,
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
},
infoIcon: {
...commonProps(COLORS).infoIcon,
color: COLORS.FEEDBACK.color_feedback_warning_icon_50,
},
},
[variants_2.MessageVariantType.SUCCESS]: {
...commonProps(COLORS),
container: {
...commonProps(COLORS).container,
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
},
infoIcon: {
...commonProps(COLORS).infoIcon,
color: COLORS.FEEDBACK.color_feedbackSuccess_icon_100,
},
},
[variants_2.MessageVariantType.ERROR]: {
...commonProps(COLORS),
container: {
...commonProps(COLORS).container,
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
},
infoIcon: {
...commonProps(COLORS).infoIcon,
color: COLORS.FEEDBACK.color_feedbackError_icon_100,
},
},
};
};
exports.getMessageStyles = getMessageStyles;
//# sourceMappingURL=styles.js.map