@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
212 lines • 8.77 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TABLE_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 commonPropsHeader = {
container: {
display: 'flex',
width: '100%',
flex_direction: 'column',
},
row: {
display: 'flex',
},
rowPaddingWhenDividerShown: spacings_1.SPACINGS.spacing_400,
column: {
display: 'flex',
font_weight: 'bold',
flex: '1 1 0',
align_items: 'center',
padding: `${spacings_1.SPACINGS.spacing_250} ${spacings_1.SPACINGS.spacing_300}`,
},
typography: {
font_weight: typography_1.FONT_WEIGHT.font_weight_600,
font_variant: variants_1.TextVariantType.PARAGRAPH_MEDIUM_EXTENDED,
text_align: typography_1.TEXT_ALIGN.left,
color: colors_1.COLORS.NEUTRAL.color_neutral_font_50,
},
};
const commonPropsBodyContainer = {
display: 'flex',
width: '100%',
flex_direction: 'column',
};
const commonPropsBody = {
row: {
border_width: spacings_1.SPACINGS.spacing_0,
border_bottom_width: '0.031rem',
},
rowPaddingWhenDividerShown: spacings_1.SPACINGS.spacing_400,
column: {
display: 'flex',
flex: '1',
word_break: 'break-word',
gap: spacings_1.SPACINGS.spacing_150,
align_items: 'center',
padding: `${spacings_1.SPACINGS.spacing_250} ${spacings_1.SPACINGS.spacing_300}`,
},
accordionIconContainer: {
min_width: spacings_1.SPACINGS.spacing_400,
min_height: spacings_1.SPACINGS.spacing_400,
cursor: 'pointer',
},
expanded: {
flex: '0 0 100%',
},
};
exports.TABLE_STYLES = {
[variants_3.TableVariantType.DEFAULT]: {
table: {
display: 'flex',
flex_direction: 'column',
width: '100%',
},
header: {
[variants_3.TableHeaderVariantType.PRIMARY]: {
...commonPropsHeader,
container: {
...commonPropsHeader.container,
background_color: colors_1.COLORS.SECONDARY.color_secondary_bg_150,
},
column: {
...commonPropsHeader.column,
//It is used to add color to one single header cell, intead of the whole row
background_color: colors_1.COLORS.SECONDARY.color_secondary_bg_150,
},
},
[variants_3.TableHeaderVariantType.SECONDARY]: {
...commonPropsHeader,
container: {
...commonPropsHeader.container,
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_250,
border_bottom_width: borders_1.BORDERS.border_100,
border_bottom_color: colors_1.COLORS.SECONDARY.color_secondary_border_50,
border_bottom_style: 'solid',
},
column: {
...commonPropsHeader.column,
//It is used to add color to one single header cell, intead of the whole row
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_250,
},
},
[variants_3.TableHeaderVariantType.CUSTOMIZABLE_HEADER]: {
...commonPropsHeader,
container: {
...commonPropsHeader.container,
padding_bottom: spacings_1.SPACINGS.spacing_0,
padding_top: spacings_1.SPACINGS.spacing_0,
},
column: {
...commonPropsHeader.column,
padding_bottom: spacings_1.SPACINGS.spacing_50,
padding_top: spacings_1.SPACINGS.spacing_50,
},
},
},
bodyContainer: commonPropsBodyContainer,
bodyRows: {
[variants_3.TableRowVariantType.DEFAULT]: {
...commonPropsBody,
row: {
...commonPropsBody.row,
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_250,
border_bottom_color: colors_1.COLORS.SECONDARY.color_secondary_border_50,
},
typography: {
font_variant: variants_1.TextVariantType.PARAGRAPH_MEDIUM_EXTENDED,
font_weight: typography_1.FONT_WEIGHT.font_weight_300,
color: colors_1.COLORS.NEUTRAL.color_neutral_font_50,
[breakpoints_1.DeviceBreakpointsType.DESKTOP]: {
font_size: typography_1.PARAGRAPH.MEDIUM[breakpoints_1.DeviceBreakpointsType.DESKTOP].font_size,
},
[breakpoints_1.DeviceBreakpointsType.TABLET]: {
font_size: typography_1.PARAGRAPH.MEDIUM[breakpoints_1.DeviceBreakpointsType.DESKTOP].font_size,
},
[breakpoints_1.DeviceBreakpointsType.MOBILE]: {
font_size: typography_1.PARAGRAPH.MEDIUM[breakpoints_1.DeviceBreakpointsType.DESKTOP].font_size,
},
},
accordionIcon: {
height: sizes_1.SIZES.size_250,
width: sizes_1.SIZES.size_250,
color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50,
},
},
[variants_3.TableRowVariantType.CUSTOMIZABLE_ROW]: {
...commonPropsBody,
row: {
...commonPropsBody.row,
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_250,
border_bottom_color: colors_1.COLORS.SECONDARY.color_secondary_border_50,
},
typography: {
font_variant: variants_1.TextVariantType.PARAGRAPH_MEDIUM_EXTENDED,
font_weight: typography_1.FONT_WEIGHT.font_weight_300,
color: colors_1.COLORS.NEUTRAL.color_neutral_font_50,
font_size: typography_1.PARAGRAPH.MEDIUM[breakpoints_1.DeviceBreakpointsType.DESKTOP].font_size,
},
accordionIcon: {
height: sizes_1.SIZES.size_250,
width: sizes_1.SIZES.size_250,
color: colors_1.COLORS.NEUTRAL.color_neutral_icon_50,
},
},
},
listContainer: {
display: 'flex',
flex_direction: 'column',
justify_content: 'left',
background_color: colors_1.COLORS.NEUTRAL.color_neutral_bg_250,
gap: spacings_1.SPACINGS.spacing_250,
},
listContainerHeaderPriority: {
display: 'flex',
flex_direction: 'column',
justify_content: 'left',
gap: spacings_1.SPACINGS.spacing_250,
},
listContainerSydeBySyde: {
display: 'flex',
flex_direction: 'row',
justify_content: 'space-between',
flex_wrap: 'wrap',
gap: spacings_1.SPACINGS.spacing_250,
},
listRowContainer: {
display: 'flex',
flex_direction: 'column',
justify_content: 'left',
gap: spacings_1.SPACINGS.spacing_250,
},
listRowContainerBorder: true,
listRow: {
display: 'flex',
flex_direction: 'column',
justify_content: 'left',
padding: `${spacings_1.SPACINGS.spacing_250} ${spacings_1.SPACINGS.spacing_300}`,
gap: spacings_1.SPACINGS.spacing_250,
},
listRowSideBySide: {
display: 'flex',
flex_direction: 'row',
justify_content: 'space-between',
flex_wrap: 'wrap',
gap: spacings_1.SPACINGS.spacing_250,
},
divider: {
lineSeparatorLabelVariant: variants_2.LineSeparatorLabelVariantType.LABEL_DEFAULT,
lineSeparatorLineVariant: variants_2.LineSeparatorLineVariantType.LINE_DEFAULT,
dividerVariant: variants_2.DividerVariantType.DEFAULT,
},
footerVariant: variants_2.FooterVariants.DEFAULT_ALTERNATIVE,
},
};
//# sourceMappingURL=styles.js.map