suomifi-ui-components
Version:
Suomi.fi UI component library
16 lines (12 loc) • 6.04 kB
JavaScript
'use strict';
var tslib = require('tslib');
var styled = require('styled-components');
var index = require('../../theme/reset/index.js');
var polished = require('polished');
var spacing = require('../../theme/utils/spacing.js');
var baseStyles = function baseStyles(theme, globalMargins, propMargins) {
return styled.css(templateObject_1 || (templateObject_1 = tslib.__makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n max-width: 290px;\n\n & .fi-time-input_character-counter {\n ", ";\n color: ", ";\n font-size: 14px;\n line-height: 20px;\n flex: none;\n margin-top: 4px;\n\n &.fi-time-input_character-counter--error {\n color: ", ";\n ", ";\n font-size: 14px;\n line-height: 20px;\n }\n }\n\n & .fi-time-input_bottom-wrapper {\n display: flex;\n justify-content: space-between;\n }\n\n & .fi-time-input_wrapper {\n width: 100%;\n display: inline-block;\n\n & .fi-time-input_label--visible {\n margin-bottom: ", ";\n }\n\n & .fi-hint-text {\n margin-bottom: ", ";\n }\n\n & .fi-time-input_statusText--has-content {\n margin-top: ", ";\n }\n }\n\n & .fi-time-input_input-element-container {\n width: 60px;\n ", "\n\n &:focus-within {\n position: relative;\n ", "\n\n &::after {\n ", "\n }\n }\n }\n\n & .fi-time-input_input {\n ", "\n ", "\n width: 100%;\n border: 1px solid ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n height: 40px;\n padding: ", ";\n border-color: ", ";\n\n &::placeholder {\n color: ", ";\n opacity: 1;\n text-align: center;\n }\n &::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n &::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n }\n\n &.fi-time-input_with-icon {\n & .fi-time-input_input-element-container {\n position: relative;\n }\n\n & .fi-time-input_input {\n padding-right: ", ";\n }\n\n & .fi-icon {\n position: absolute;\n width: 18px;\n height: 18px;\n top: ", ";\n right: ", ";\n }\n }\n\n &.fi-time-input--error {\n & .fi-time-input_input {\n border: 2px solid ", ";\n padding-left: 9px;\n padding-top: 7px;\n padding-bottom: 7px;\n }\n }\n &.fi-time-input--success {\n & .fi-time-input_input {\n border: 2px solid ", ";\n padding-left: 9px;\n padding-top: 7px;\n padding-bottom: 7px;\n }\n }\n &.fi-time-input--disabled {\n & .fi-time-input_input {\n color: ", ";\n background-color: ", ";\n }\n & .fi-icon-base-fill {\n fill: ", ";\n }\n }\n"], ["\n ", "\n ", "\n ", "\n ", "\n max-width: 290px;\n\n & .fi-time-input_character-counter {\n ", ";\n color: ", ";\n font-size: 14px;\n line-height: 20px;\n flex: none;\n margin-top: 4px;\n\n &.fi-time-input_character-counter--error {\n color: ", ";\n ", ";\n font-size: 14px;\n line-height: 20px;\n }\n }\n\n & .fi-time-input_bottom-wrapper {\n display: flex;\n justify-content: space-between;\n }\n\n & .fi-time-input_wrapper {\n width: 100%;\n display: inline-block;\n\n & .fi-time-input_label--visible {\n margin-bottom: ", ";\n }\n\n & .fi-hint-text {\n margin-bottom: ", ";\n }\n\n & .fi-time-input_statusText--has-content {\n margin-top: ", ";\n }\n }\n\n & .fi-time-input_input-element-container {\n width: 60px;\n ", "\n\n &:focus-within {\n position: relative;\n ", "\n\n &::after {\n ", "\n }\n }\n }\n\n & .fi-time-input_input {\n ", "\n ", "\n width: 100%;\n border: 1px solid ", ";\n border-radius: ", ";\n line-height: 1;\n background-color: ", ";\n height: 40px;\n padding: ", ";\n border-color: ", ";\n\n &::placeholder {\n color: ", ";\n opacity: 1;\n text-align: center;\n }\n &::-ms-clear {\n display: none;\n width: 0;\n height: 0;\n }\n &::-ms-reveal {\n display: none;\n width: 0;\n height: 0;\n }\n }\n\n &.fi-time-input_with-icon {\n & .fi-time-input_input-element-container {\n position: relative;\n }\n\n & .fi-time-input_input {\n padding-right: ", ";\n }\n\n & .fi-icon {\n position: absolute;\n width: 18px;\n height: 18px;\n top: ", ";\n right: ", ";\n }\n }\n\n &.fi-time-input--error {\n & .fi-time-input_input {\n border: 2px solid ", ";\n padding-left: 9px;\n padding-top: 7px;\n padding-bottom: 7px;\n }\n }\n &.fi-time-input--success {\n & .fi-time-input_input {\n border: 2px solid ", ";\n padding-left: 9px;\n padding-top: 7px;\n padding-bottom: 7px;\n }\n }\n &.fi-time-input--disabled {\n & .fi-time-input_input {\n color: ", ";\n background-color: ", ";\n }\n & .fi-icon-base-fill {\n fill: ", ";\n }\n }\n"])), index.font(theme)('bodyText'), spacing.buildSpacingCSS(globalMargins), spacing.buildSpacingCSS(propMargins, true), index.fixInternalMargins(), index.font(theme)('bodyTextSmall'), theme.colors.blackBase, theme.colors.alertBase, index.font(theme)('bodySemiBoldSmall'), theme.spacing.xs, theme.spacing.xs, theme.spacing.xxs, index.containerIEFocus(theme), theme.focuses.highContrastFocus, theme.focuses.absoluteFocus, index.element(theme), index.font(theme)('actionElementInnerText'), theme.colors.depthLight1, theme.radiuses.basic, theme.colors.whiteBase, theme.spacing.insetL, theme.colors.depthDark3, theme.colors.depthDark2, polished.math("".concat(theme.spacing.insetXl, " * 2 + ").concat(theme.spacing.insetM)), theme.spacing.insetL, theme.spacing.insetL, theme.colors.alertBase, theme.colors.successBase, theme.colors.depthBase, theme.colors.depthLight3, theme.colors.depthBase);
};
var templateObject_1;
exports.baseStyles = baseStyles;
//# sourceMappingURL=TimeInput.baseStyles.js.map