@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
85 lines • 3.79 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInputCurrencyStyles = void 0;
const inputTheme_1 = require("../../../../../components/input/types/inputTheme");
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 commonProps = COLORS => ({
currencyNameContainer: {
gap: spacings_1.SPACINGS.spacing_150,
width: spacings_1.SPACINGS.spacing_550,
height: spacings_1.SPACINGS.spacing_550,
border_radius: borders_1.RADIUS.radius_300,
border_width: borders_1.BORDERS.border_50,
border_color: COLORS.NEUTRAL.color_neutral_border_50,
border_style: 'solid',
background_color: COLORS.NEUTRAL.color_neutral_bg_250,
marginLeftOrRightByIsOutAndPosition: spacings_1.SPACINGS.spacing_150,
...(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),
},
currencyNameContainerPosition: inputTheme_1.InputContentPosition.OUT,
currencyName: {
font_variant: variants_1.TextVariantType.PARAGRAPH_MEDIUM_EXTENDED,
font_weight: typography_1.FONT_WEIGHT.font_weight_500,
color: COLORS.NEUTRAL.color_neutral_font_50,
},
helpMessage: {
position: inputTheme_1.InputHelpMessagePosition.BOTTOM,
},
inputVariant: variants_2.InputCurrencyVariant.DEFAULT,
});
const getInputCurrencyStyles = (COLORS) => {
return {
[variants_2.InputCurrencyVariant.DEFAULT]: {
[inputTheme_1.InputState.EMPTY]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.FILLED]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ACTIVE]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.DISABLED_EMPTY]: {
...commonProps(COLORS),
currencyName: {
...commonProps(COLORS).currencyName,
color: COLORS.DISABLED.color_accentDisabled_font_50,
},
},
[inputTheme_1.InputState.DISABLED_FILLED]: {
...commonProps(COLORS),
currencyName: {
...commonProps(COLORS).currencyName,
color: COLORS.DISABLED.color_accentDisabled_font_50,
},
},
[inputTheme_1.InputState.DISABLED_FILLED_WITH_INFO]: {
...commonProps(COLORS),
currencyName: {
...commonProps(COLORS).currencyName,
color: COLORS.DISABLED.color_accentDisabled_font_50,
},
},
[inputTheme_1.InputState.ERROR_EMPTY]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ERROR_FILLED]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ERROR_ACTIVE]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ERROR_FILLED_WITH_INFO]: {
...commonProps(COLORS),
},
},
};
};
exports.getInputCurrencyStyles = getInputCurrencyStyles;
//# sourceMappingURL=styles.js.map