@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
267 lines • 12.6 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MODAL_STYLES = void 0;
const breakpoints_1 = require("../../../../types/breakpoints/breakpoints");
const borders_1 = require("../../foundations/borders");
const colors_1 = require("../../foundations/colors");
const sizes_1 = require("../../foundations/sizes");
const spacings_1 = require("../../foundations/spacings");
const typography_1 = require("../../foundations/typography");
const variants_1 = require("../text/variants");
const variants_2 = require("../variants");
const variants_3 = require("./variants");
const commonProps = {
popoverVariant: variants_2.PopoverVariantType.MODAL,
container: {
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_250,
overflow_y: 'auto',
display: 'flex',
align_items: 'center',
flex_flow: 'column nowrap',
box_sizing: 'border-box',
border_radius: borders_1.RADIUS.radius_50,
},
headerContainer: {
width: spacings_1.SPACINGS.spacing_100_percent,
display: 'flex',
flex_direction: 'column',
justify_content: 'space-between',
align_items: 'center',
gap: spacings_1.SPACINGS.spacing_150,
},
title: {
font_weight: typography_1.FONT_WEIGHT.font_weight_600,
color: colors_1.COLORS.NEUTRAL.color_neutral_font_50,
text_align: typography_1.TEXT_ALIGN.center,
font_variant: variants_1.TextVariantType.HEADING_H4_EXPANDED,
},
content: {
margin_top: spacings_1.SPACINGS.spacing_0,
width: spacings_1.SPACINGS.spacing_100_percent,
flex: 'auto',
overflow_y: 'auto',
},
closeButtonContainer: {
display: 'flex',
justify_content: 'end',
width: '100%',
},
closeButtonIcon: {
color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50,
width: sizes_1.SIZES.size_250,
height: sizes_1.SIZES.size_250,
},
};
exports.MODAL_STYLES = {
[variants_3.ModalVariantType.DEFAULT]: {
...commonProps,
footerVariant: variants_2.FooterVariants.DEFAULT,
popoverVariant: variants_2.PopoverVariantType.MODAL,
container: {
...commonProps.container,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
min_width: '37.5rem',
min_height: '15rem',
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
min_width: '48rem',
min_height: '16rem',
},
},
headerContainer: {
...commonProps.headerContainer,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
padding: spacings_1.SPACINGS.spacing_400,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
padding: `${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_400}`,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
padding: `${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_300}`,
},
},
imageContainer: {
display: 'flex',
justify_content: 'center',
margin_bottom: spacings_1.SPACINGS.spacing_300,
},
imageHeader: {
color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50,
height: sizes_1.SIZES.size_modal_icon,
width: sizes_1.SIZES.size_modal_icon,
},
content: {
...commonProps.content,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_450,
padding_right: spacings_1.SPACINGS.spacing_450,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_400,
padding_right: spacings_1.SPACINGS.spacing_400,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_300,
padding_right: spacings_1.SPACINGS.spacing_300,
},
},
footer: {
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_450} + ${spacings_1.SPACINGS.spacing_450}))`,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_400} + ${spacings_1.SPACINGS.spacing_400}))`,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_400} + ${spacings_1.SPACINGS.spacing_400}))`,
},
},
},
[variants_3.ModalVariantType.DEFAULT_ABSOLUTE]: {
...commonProps,
popoverVariant: variants_2.PopoverVariantType.MODAL_ABSOLUTE,
container: {
...commonProps.container,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
min_width: '37.5rem',
min_height: '15rem',
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
min_width: '48rem',
min_height: '16rem',
},
},
headerContainer: {
...commonProps.headerContainer,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
padding: spacings_1.SPACINGS.spacing_400,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
padding: `${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_400}`,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
padding: `${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_300}`,
},
},
imageContainer: {
display: 'flex',
justify_content: 'center',
margin_bottom: spacings_1.SPACINGS.spacing_300,
},
imageHeader: {
color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50,
height: sizes_1.SIZES.size_modal_icon,
width: sizes_1.SIZES.size_modal_icon,
},
content: {
...commonProps.content,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_450,
padding_right: spacings_1.SPACINGS.spacing_450,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_400,
padding_right: spacings_1.SPACINGS.spacing_400,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_300,
padding_right: spacings_1.SPACINGS.spacing_300,
},
},
footer: {
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_450} + ${spacings_1.SPACINGS.spacing_450}))`,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_400} + ${spacings_1.SPACINGS.spacing_400}))`,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_400} + ${spacings_1.SPACINGS.spacing_400}))`,
},
},
},
[variants_3.ModalVariantType.DEFAULT_ABSOLUTE_TINY]: {
...commonProps,
popoverVariant: variants_2.PopoverVariantType.MODAL_ABSOLUTE,
container: {
...commonProps.container,
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_200,
},
headerContainer: {
...commonProps.headerContainer,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
padding: spacings_1.SPACINGS.spacing_400,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
padding: `${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_400}`,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
padding: `${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_300} ${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_300}`,
},
},
imageContainer: {
display: 'flex',
justify_content: 'center',
margin_bottom: spacings_1.SPACINGS.spacing_300,
},
imageHeader: {
color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50,
height: sizes_1.SIZES.size_modal_icon,
width: sizes_1.SIZES.size_modal_icon,
},
content: {
...commonProps.content,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_450,
padding_right: spacings_1.SPACINGS.spacing_450,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_400,
padding_right: spacings_1.SPACINGS.spacing_400,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
margin_bottom: spacings_1.SPACINGS.spacing_400,
padding_left: spacings_1.SPACINGS.spacing_300,
padding_right: spacings_1.SPACINGS.spacing_300,
},
},
footer: {
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_450} + ${spacings_1.SPACINGS.spacing_450}))`,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_400} + ${spacings_1.SPACINGS.spacing_400}))`,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
border_top_width: borders_1.BORDERS.border_50,
border_top_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200,
width: `calc(${spacings_1.SPACINGS.spacing_100_percent} - (${spacings_1.SPACINGS.spacing_400} + ${spacings_1.SPACINGS.spacing_400}))`,
},
},
},
};
//# sourceMappingURL=styles.js.map