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

89 lines 3.32 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.LINE_SEPARATOR_STYLES = void 0; // vendors // types const styled_components_1 = require("styled-components"); const lineSeparatorTheme_1 = require("../../../../components/lineSeparator/types/lineSeparatorTheme"); // fundations const borders_1 = require("../../foundations/borders"); const colors_1 = require("../../foundations/colors"); const spacings_1 = require("../../foundations/spacings"); const typography_1 = require("../../foundations/typography"); const variants_1 = require("../text/variants"); const variants_2 = require("./variants"); const lineSeparatorStyledBuild = ({ border_color, border_weight }) => (position) => { const commonCss = (0, styled_components_1.css) ` border-width: ${border_weight}; border-color: ${border_color}; `; switch (position) { case lineSeparatorTheme_1.LineSeparatorPositionType.BOTTOM: return (0, styled_components_1.css) ` border-bottom-style: solid; ${commonCss} `; case lineSeparatorTheme_1.LineSeparatorPositionType.LEFT: return (0, styled_components_1.css) ` border-left-style: solid; ${commonCss} `; case lineSeparatorTheme_1.LineSeparatorPositionType.RIGHT: return (0, styled_components_1.css) ` border-right-style: solid; ${commonCss} `; default: return (0, styled_components_1.css) ` border-top-style: solid; ${commonCss} `; } }; const commonLabelContainer = { display: 'flex', align_items: 'center', width: 'fit-content', position: 'relative', padding: `${spacings_1.SPACINGS.spacing_50} ${spacings_1.SPACINGS.spacing_150}`, }; const commonLabelText = { font_variant: variants_1.TextVariantType.PARAGRAPH_CAPTION_EXTENDED, font_weight: typography_1.FONT_WEIGHT.font_weight_400, text_align: typography_1.TEXT_ALIGN.center, }; exports.LINE_SEPARATOR_STYLES = { [variants_2.LineSeparatorLabelVariantType.LABEL_DEFAULT]: { labelContainer: { ...commonLabelContainer, background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_200, }, label: { ...commonLabelText, color: colors_1.COLORS.NEUTRAL.color_neutral_font_50, }, }, [variants_2.LineSeparatorLabelVariantType.LABEL_INFORMATIVE]: { labelContainer: { ...commonLabelContainer, background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_100, }, label: { ...commonLabelText, color: colors_1.COLORS.NEUTRAL.color_neutral_font_250, }, }, [variants_2.LineSeparatorLineVariantType.LINE_DEFAULT]: { buildLineStyles: lineSeparatorStyledBuild({ border_color: colors_1.COLORS.NEUTRAL.color_neutral_border_200, border_weight: borders_1.BORDERS.border_50, }), }, [variants_2.LineSeparatorLineVariantType.LINE_INFORMATIVE]: { buildLineStyles: lineSeparatorStyledBuild({ border_color: colors_1.COLORS.NEUTRAL.color_neutral_border_150, border_weight: borders_1.BORDERS.border_50, }), }, }; //# sourceMappingURL=styles.js.map