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

119 lines 6.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getTooltipStyles = 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 zIndex_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/zIndex"); const wireframe_1 = require("../../../../../designSystem/kubitWireframe/utils/wireframe"); const breakpoints_1 = require("../../../../../types/breakpoints/breakpoints"); const variants_1 = require("../../../../kubit/components/text/variants"); const variants_2 = require("../variants"); const variants_3 = require("./variants"); const getTooltipStyles = (COLORS) => { return { [variants_3.TooltipVariantType.DEFAULT]: { headerContainer: { flex_direction: 'row-reverse', [breakpoints_1.DeviceBreakpointsType.TABLET]: { flex_direction: 'column', }, [breakpoints_1.DeviceBreakpointsType.MOBILE]: { flex_direction: 'column', }, }, title: { font_weight: typography_1.FONT_WEIGHT.font_weight_400, text_align: typography_1.TEXT_ALIGN.left, font_variant: variants_1.TextVariantType.PARAGRAPH_SMALL_EXPANDED, color: COLORS.NEUTRAL.color_neutral_font_50, }, paragraph: { font_weight: typography_1.FONT_WEIGHT.font_weight_400, text_align: typography_1.TEXT_ALIGN.left, font_variant: variants_1.TextVariantType.PARAGRAPH_SMALL_EXPANDED, color: COLORS.NEUTRAL.color_neutral_font_50, }, closeButtonContainer: { altVariant: true, }, closeButtonIcon: { color: COLORS.NEUTRAL.color_neutral_font_50, height: sizes_1.SIZES.size_300, width: sizes_1.SIZES.size_300, }, divider: { border_top_color: '', border_top_width: '', border_style: '', padding_top: '', }, arrowContainer: { padding: spacings_1.SPACINGS.spacing_250, z_index: zIndex_1.Z_INDEX.OVERLAY, display: 'none', box_sizing: 'border-box', position: 'relative', arrow_size: '10px', arrow_position: '10px', background_color: COLORS.NEUTRAL.color_neutral_bg_250, ...(0, wireframe_1.transformShadow)(borders_1.RADIUS.radius_300), ...(0, wireframe_1.shadowAfterStyles)(borders_1.RADIUS.radius_300, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50), [breakpoints_1.DeviceBreakpointsType.TABLET]: { display: 'none', }, [breakpoints_1.DeviceBreakpointsType.MOBILE]: { display: 'none', }, }, tooltipExternalContainer: { [breakpoints_1.DeviceBreakpointsType.DESKTOP]: { padding: spacings_1.SPACINGS.spacing_250, z_index: zIndex_1.Z_INDEX.OVERLAY, display: 'none', position: 'fixed', box_sizing: 'border-box', }, }, tooltipInternalContainer: { max_width: '20rem', max_height: '30rem', display: 'flex', flex_direction: 'column', width: 'max-content', border_width: borders_1.BORDERS.border_50, border_style: 'solid', border_color: COLORS.SECONDARY.color_secondary_border_50, background_color: COLORS.NEUTRAL.color_neutral_bg_250, padding: spacings_1.SPACINGS.spacing_300, border_radius: borders_1.RADIUS.radius_300, ...(0, wireframe_1.transformShadow)(borders_1.RADIUS.radius_300), ...(0, wireframe_1.shadowAfterStyles)(borders_1.RADIUS.radius_300, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50), [breakpoints_1.DeviceBreakpointsType.TABLET]: { background_color: COLORS.NEUTRAL.color_neutral_bg_150, border_radius: `${borders_1.RADIUS.radius_50} ${borders_1.RADIUS.radius_50} ${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_00}`, padding: spacings_1.SPACINGS.spacing_400, width: spacings_1.SPACINGS.spacing_100_percent, max_width: 'none', max_height: '100vh', }, [breakpoints_1.DeviceBreakpointsType.MOBILE]: { background_color: COLORS.NEUTRAL.color_neutral_bg_150, border_radius: `${borders_1.RADIUS.radius_50} ${borders_1.RADIUS.radius_50} ${borders_1.RADIUS.radius_00} ${borders_1.RADIUS.radius_00}`, padding: spacings_1.SPACINGS.spacing_400, width: spacings_1.SPACINGS.spacing_100_percent, max_width: 'none', max_height: '100vh', }, }, tooltipAsModal: true, popoverVariant: { [breakpoints_1.DeviceBreakpointsType.TABLET]: variants_2.PopoverVariantType.TOOLTIP, [breakpoints_1.DeviceBreakpointsType.MOBILE]: variants_2.PopoverVariantType.TOOLTIP, }, }, }; }; exports.getTooltipStyles = getTooltipStyles; //# sourceMappingURL=styles.js.map