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

251 lines 11.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MODAL_STYLES_V2 = 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("../footer/variants"); const variants_2 = require("../popover/variants"); const variants_3 = require("../text/variants"); const variants_4 = require("./variants"); const commonTokens = { 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', gap: spacings_1.SPACINGS.spacing_150, }, headerContentContainer: { display: 'flex', flex_direction: 'row-reverse', align_items: 'center', }, dragIconContainer: { display: 'flex', align_items: 'center', justify_content: 'center', }, 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_3.TextVariantType.HEADING_H4_EXPANDED, }, titleContainer: { // styles for centering the title in the header position: 'absolute', left: '50%', transform: 'translateX(-50%)', }, closeButtonIcon: { color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50, width: sizes_1.SIZES.size_250, height: sizes_1.SIZES.size_250, }, closeButtonContainer: { display: 'flex', justify_content: 'end', width: '100%', }, content: { margin_top: spacings_1.SPACINGS.spacing_0, width: spacings_1.SPACINGS.spacing_100_percent, flex: 'auto', overflow_y: 'auto', }, }; exports.MODAL_STYLES_V2 = { [variants_4.ModalVariantTypeV2.DEFAULT]: { ...commonTokens, footerVariant: variants_1.FooterVariants.DEFAULT, container: { ...commonTokens.container, [breakpoints_1.DeviceBreakpointsType.DESKTOP]: { min_width: '37.5rem', min_height: '15rem', }, [breakpoints_1.DeviceBreakpointsType.TABLET]: { min_width: '48rem', min_height: '16rem', }, }, headerContainer: { ...commonTokens.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}`, }, }, content: { ...commonTokens.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_4.ModalVariantTypeV2.DEFAULT_ABSOLUTE]: { ...commonTokens, popoverVariant: variants_2.PopoverVariantType.MODAL_ABSOLUTE, container: { ...commonTokens.container, [breakpoints_1.DeviceBreakpointsType.DESKTOP]: { min_width: '37.5rem', min_height: '15rem', }, [breakpoints_1.DeviceBreakpointsType.TABLET]: { min_width: '48rem', min_height: '16rem', }, }, headerContainer: { ...commonTokens.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}`, }, }, content: { ...commonTokens.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_4.ModalVariantTypeV2.DEFAULT_ABSOLUTE_TINY]: { ...commonTokens, popoverVariant: variants_2.PopoverVariantType.MODAL_ABSOLUTE, container: { ...commonTokens.container, background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_200, }, headerContainer: { ...commonTokens.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}`, }, }, content: { ...commonTokens.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