@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
57 lines • 2.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInputCounterStyles = void 0;
const inputTheme_1 = require("../../../../../components/input/types/inputTheme");
const spacings_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/spacings");
const typography_1 = require("../../../../../designSystem/kubitWireframe/commons/foundations/typography");
const variants_1 = require("../../../../kubit/components/text/variants");
const variants_2 = require("../textCount/variants");
const variants_3 = require("./variants");
const commonProps = COLORS => ({
inputVariant: variants_3.InputCounterVariant.DEFAULT,
textCountVariant: variants_2.TextCountVariantType.DEFAULT,
textCountTextVariant: variants_1.TextVariantType.PARAGRAPH_SMALL_EXTENDED,
textCountLeftWeight: typography_1.FONT_WEIGHT.font_weight_500,
textCountLeftColor: COLORS.FEEDBACK.color_feedbackSuccess_font_50,
textCountRightWeight: typography_1.FONT_WEIGHT.font_weight_300,
textCountRightColor: COLORS.NEUTRAL.color_neutral_font_100,
textCounterContainer: {
margin_right: spacings_1.SPACINGS.spacing_0,
margin_top: spacings_1.SPACINGS.spacing_150,
},
});
const getInputCounterStyles = (COLORS) => {
return {
[variants_3.InputCounterVariant.DEFAULT]: {
[inputTheme_1.InputState.EMPTY]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ACTIVE]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.FILLED]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ERROR_EMPTY]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ERROR_FILLED]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.ERROR_ACTIVE]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.DISABLED_EMPTY]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.DISABLED_FILLED]: {
...commonProps(COLORS),
},
[inputTheme_1.InputState.DISABLED_FILLED_WITH_INFO]: {
...commonProps(COLORS),
},
},
};
};
exports.getInputCounterStyles = getInputCounterStyles;
//# sourceMappingURL=styles.js.map