@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
175 lines • 9.78 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getModalStyles = 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 breakpoints_1 = require("../../../../../types/breakpoints/breakpoints");
const wireframe_1 = require("../../../utils/wireframe");
const variants_1 = require("../footer/variants");
const variants_2 = require("../popover/variants");
const variants_3 = require("./variants");
const tableAndMobileRadius = `${borders_1.RADIUS.radius_150} ${borders_1.RADIUS.radius_150} ${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_00}`;
const getModalStyles = (COLORS) => {
return {
[variants_3.ModalVariantType.DEFAULT]: {
popoverVariant: variants_2.PopoverVariantType.MODAL,
footerVariant: variants_1.FooterVariants.EMPTY,
container: {
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
overflow_y: 'unset',
display: 'flex',
align_items: 'center',
flex_flow: 'column nowrap',
box_sizing: 'border-box',
border: `${borders_1.BORDERS.border_50} solid ${COLORS.NEUTRAL.color_neutral_border_50}`,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
min_width: '37.5rem',
min_height: '16.1rem',
max_width: `calc(${spacings_1.SPACINGS.spacing_100_vw} - 40px)`,
max_height: `calc(${spacings_1.SPACINGS.spacing_100_vh} - 40px)`,
...(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),
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
width: `calc(${spacings_1.SPACINGS.spacing_100_vw} - ${spacings_1.SPACINGS.spacing_100})`,
bottom: spacings_1.SPACINGS.spacing_50,
...(0, wireframe_1.transformShadow)(tableAndMobileRadius),
...(0, wireframe_1.shadowAfterStyles)(tableAndMobileRadius, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50),
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
width: `calc(${spacings_1.SPACINGS.spacing_100_vw} - ${spacings_1.SPACINGS.spacing_100})`,
bottom: spacings_1.SPACINGS.spacing_50,
...(0, wireframe_1.transformShadow)(tableAndMobileRadius),
...(0, wireframe_1.shadowAfterStyles)(tableAndMobileRadius, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50),
},
},
headerContainer: {
width: spacings_1.SPACINGS.spacing_100_percent,
padding: spacings_1.SPACINGS.spacing_400,
},
imageContainer: {
display: 'flex',
justify_content: 'center',
margin_bottom: spacings_1.SPACINGS.spacing_300,
},
title: {
font_weight: typography_1.FONT_WEIGHT.font_weight_600,
color: COLORS.NEUTRAL.color_neutral_font_50,
text_align: typography_1.TEXT_ALIGN.center,
},
content: {
margin_top: spacings_1.SPACINGS.spacing_0,
width: spacings_1.SPACINGS.spacing_100_percent,
flex: 'auto',
overflow_y: 'auto',
max_height: spacings_1.SPACINGS.spacing_100_vh,
padding_left: spacings_1.SPACINGS.spacing_450,
padding_right: spacings_1.SPACINGS.spacing_450,
padding_bottom: spacings_1.SPACINGS.spacing_300,
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
padding_left: spacings_1.SPACINGS.spacing_300,
padding_right: spacings_1.SPACINGS.spacing_300,
},
},
closeButtonContainer: {
display: 'flex',
justify_content: 'end',
margin_bottom: spacings_1.SPACINGS.spacing_0,
},
closeButtonIcon: {
color: COLORS.NEUTRAL.color_neutral_icon_50,
width: sizes_1.SIZES.size_250,
height: sizes_1.SIZES.size_250,
},
footer: {
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
padding: `${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_450}`,
width: spacings_1.SPACINGS.spacing_100_percent,
border_radius: `${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_150} ${borders_1.RADIUS.radius_150}`,
border_top: `${borders_1.BORDERS.border_50} solid ${COLORS.NEUTRAL.color_neutral_border_50}`,
},
},
[variants_3.ModalVariantType.DEFAULT_ABSOLUTE]: {
popoverVariant: variants_2.PopoverVariantType.MODAL_ABSOLUTE,
footerVariant: variants_1.FooterVariants.EMPTY,
container: {
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
overflow_y: 'unset',
display: 'flex',
align_items: 'center',
flex_flow: 'column nowrap',
box_sizing: 'border-box',
border: `${borders_1.BORDERS.border_50} solid ${COLORS.NEUTRAL.color_neutral_border_50}`,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
min_width: '37.5rem',
min_height: '16.1rem',
max_width: `calc(${spacings_1.SPACINGS.spacing_100_vw} - 40px)`,
max_height: `calc(${spacings_1.SPACINGS.spacing_100_vh} - 40px)`,
...(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),
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
width: `calc(${spacings_1.SPACINGS.spacing_100_vw} - ${spacings_1.SPACINGS.spacing_100})`,
bottom: spacings_1.SPACINGS.spacing_50,
...(0, wireframe_1.transformShadow)(tableAndMobileRadius),
...(0, wireframe_1.shadowAfterStyles)(tableAndMobileRadius, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50),
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
width: `calc(${spacings_1.SPACINGS.spacing_100_vw} - ${spacings_1.SPACINGS.spacing_100})`,
bottom: spacings_1.SPACINGS.spacing_50,
...(0, wireframe_1.transformShadow)(tableAndMobileRadius),
...(0, wireframe_1.shadowAfterStyles)(tableAndMobileRadius, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50),
},
},
headerContainer: {
width: spacings_1.SPACINGS.spacing_100_percent,
padding: spacings_1.SPACINGS.spacing_400,
},
imageContainer: {
display: 'flex',
justify_content: 'center',
margin_bottom: spacings_1.SPACINGS.spacing_300,
},
title: {
font_weight: typography_1.FONT_WEIGHT.font_weight_600,
color: COLORS.NEUTRAL.color_neutral_font_50,
text_align: typography_1.TEXT_ALIGN.center,
},
content: {
margin_top: spacings_1.SPACINGS.spacing_0,
width: spacings_1.SPACINGS.spacing_100_percent,
flex: 'auto',
overflow_y: 'auto',
max_height: spacings_1.SPACINGS.spacing_100_vh,
padding_left: spacings_1.SPACINGS.spacing_450,
padding_right: spacings_1.SPACINGS.spacing_450,
padding_bottom: spacings_1.SPACINGS.spacing_300,
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
padding_left: spacings_1.SPACINGS.spacing_300,
padding_right: spacings_1.SPACINGS.spacing_300,
},
},
closeButtonContainer: {
display: 'flex',
justify_content: 'end',
margin_bottom: spacings_1.SPACINGS.spacing_0,
},
closeButtonIcon: {
color: COLORS.NEUTRAL.color_neutral_icon_50,
width: sizes_1.SIZES.size_250,
height: sizes_1.SIZES.size_250,
},
footer: {
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
padding: `${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_450}`,
width: spacings_1.SPACINGS.spacing_100_percent,
border_radius: `${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_150} ${borders_1.RADIUS.radius_150}`,
border_top: `${borders_1.BORDERS.border_50} solid ${COLORS.NEUTRAL.color_neutral_border_50}`,
},
},
};
};
exports.getModalStyles = getModalStyles;
//# sourceMappingURL=styles.js.map