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

94 lines 4.33 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getConfirmationMessageStyles = void 0; const borders_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/borders"); 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 variants_1 = require("../../../../kubit/components/text/variants"); const variants_2 = require("../variants"); const variants_3 = require("./variants"); const commonProps = COLORS => { return { container: { 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_300), ...(0, wireframe_1.shadowAfterStyles)(borders_1.RADIUS.radius_300, COLORS.BRAND.color_brand_bg_50, spacings_1.SPACINGS.spacing_50), background_color: COLORS.NEUTRAL.color_neutral_bg_250, }, titleAndDescriptionContainer: { margin: `${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_400} 0 ${spacings_1.SPACINGS.spacing_400}`, }, titleContainer: { margin_bottom: spacings_1.SPACINGS.spacing_400, gap: spacings_1.SPACINGS.spacing_300, }, title: { font_variant: variants_1.TextVariantType.HEADING_H2_EXTENDED, font_weight: typography_1.FONT_WEIGHT.font_weight_500, text_align: typography_1.TEXT_ALIGN.center, color: COLORS.NEUTRAL.color_neutral_font_50, }, descriptionContainer: { gap: spacings_1.SPACINGS.spacing_150, }, description: { font_variant: variants_1.TextVariantType.PARAGRAPH_SMALL_EXTENDED, font_weight: typography_1.FONT_WEIGHT.font_weight_400, text_align: typography_1.TEXT_ALIGN.center, color: COLORS.NEUTRAL.color_neutral_font_50, }, secondaryDescription: { font_variant: variants_1.TextVariantType.PARAGRAPH_SMALL_EXTENDED, font_weight: typography_1.FONT_WEIGHT.font_weight_400, text_align: typography_1.TEXT_ALIGN.center, color: COLORS.NEUTRAL.color_neutral_font_50, }, content: { padding: `${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_400}`, }, footer: { background_color: COLORS.NEUTRAL.color_neutral_bg_250, position: 'sticky', bottom: spacings_1.SPACINGS.spacing_0, border_top: `${borders_1.BORDERS.border_50} solid ${COLORS.NEUTRAL.color_neutral_border_50}`, border_bottom_left_radius: borders_1.RADIUS.radius_300, border_bottom_right_radius: borders_1.RADIUS.radius_300, variant: variants_2.FooterVariants.EMPTY, padding: `${spacings_1.SPACINGS.spacing_400} ${spacings_1.SPACINGS.spacing_450}`, width: spacings_1.SPACINGS.spacing_100_percent, }, }; }; const getConfirmationMessageStyles = (COLORS) => ({ [variants_3.ConfirmationMessageVariantType.DEFAULT]: { [variants_3.ConfirmationMessageStateType.SUCCESS]: { ...commonProps(COLORS), icon: { width: '4rem', height: '4rem', color: COLORS.FEEDBACK.color_feedbackSuccess_icon_100, }, }, [variants_3.ConfirmationMessageStateType.ERROR]: { ...commonProps(COLORS), icon: { width: '4rem', height: '4rem', color: COLORS.FEEDBACK.color_feedbackError_icon_100, }, }, [variants_3.ConfirmationMessageStateType.WARNING]: { ...commonProps(COLORS), icon: { width: '4rem', height: '4rem', color: COLORS.FEEDBACK.color_feedback_warning_icon_50, }, }, }, }); exports.getConfirmationMessageStyles = getConfirmationMessageStyles; //# sourceMappingURL=styles.js.map