UNPKG

infinity-forge

Version:
14 lines 5.09 kB
"use strict"; var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) { if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } return cooked; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.InputControl = void 0; var styled_components_1 = __importDefault(require("styled-components")); exports.InputControl = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n margin-bottom: 10px;\n position: relative;\n\n .input-content {\n position: relative;\n }\n\n .eye .icon svg {\n fill: ", ";\n }\n\n .button-clear-input {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n right: 5px;\n top: 50%;\n transform: translateY(-50%);\n background-color: transparent;\n border: 0;\n padding: 0;\n width: 14px;\n height: auto;\n\n svg {\n width: 100%;\n height: auto;\n }\n }\n\n &:has(.button-clear-input) input {\n padding-right: 25px;\n }\n\n .input-icon {\n position: absolute;\n z-index: 2;\n left: ", ";\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n\n svg {\n width: 100%;\n height: auto;\n max-width: ", ";\n }\n }\n\n input,\n select,\n textarea {\n border: 0;\n background-color: #fff;\n color: ", ";\n padding: 0 10px;\n width: -webkit-fill-available;\n position: relative;\n display: flex;\n font-weight: 400;\n border: 1px solid ", ";\n border-radius: 4px;\n font-size: 14px;\n outline: transparent;\n\n &::placeholder {\n font-weight: 400;\n color: ", ";\n }\n }\n\n input,\n select {\n height: 42px;\n }\n\n .input-icon + .input-wrapper {\n input,\n select,\n textarea {\n padding-left: ", ";\n padding-right: ", ";\n }\n }\n\n textarea {\n /* height: 120px; */\n padding-top: 20px;\n padding-bottom: 20px;\n }\n\n input::placeholder {\n color: ", ";\n }\n\n textarea::placeholder {\n color: ", ";\n }\n\n input:read-only,\n select:read-only,\n textarea:read-only {\n opacity: 0.6;\n background-color: #ccc;\n }\n"], ["\n width: 100%;\n margin-bottom: 10px;\n position: relative;\n\n .input-content {\n position: relative;\n }\n\n .eye .icon svg {\n fill: ", ";\n }\n\n .button-clear-input {\n display: flex;\n align-items: center;\n justify-content: center;\n position: absolute;\n right: 5px;\n top: 50%;\n transform: translateY(-50%);\n background-color: transparent;\n border: 0;\n padding: 0;\n width: 14px;\n height: auto;\n\n svg {\n width: 100%;\n height: auto;\n }\n }\n\n &:has(.button-clear-input) input {\n padding-right: 25px;\n }\n\n .input-icon {\n position: absolute;\n z-index: 2;\n left: ", ";\n right: ", ";\n top: 50%;\n transform: translateY(-50%);\n\n svg {\n width: 100%;\n height: auto;\n max-width: ", ";\n }\n }\n\n input,\n select,\n textarea {\n border: 0;\n background-color: #fff;\n color: ", ";\n padding: 0 10px;\n width: -webkit-fill-available;\n position: relative;\n display: flex;\n font-weight: 400;\n border: 1px solid ", ";\n border-radius: 4px;\n font-size: 14px;\n outline: transparent;\n\n &::placeholder {\n font-weight: 400;\n color: ", ";\n }\n }\n\n input,\n select {\n height: 42px;\n }\n\n .input-icon + .input-wrapper {\n input,\n select,\n textarea {\n padding-left: ", ";\n padding-right: ", ";\n }\n }\n\n textarea {\n /* height: 120px; */\n padding-top: 20px;\n padding-bottom: 20px;\n }\n\n input::placeholder {\n color: ", ";\n }\n\n textarea::placeholder {\n color: ", ";\n }\n\n input:read-only,\n select:read-only,\n textarea:read-only {\n opacity: 0.6;\n background-color: #ccc;\n }\n"])), function (props) { return (props.$error ? 'red !important' : '#526484'); }, function (props) { return (props.$inputIconDirection === 'left' ? '10px' : 'unset'); }, function (props) { return (props.$inputIconDirection === 'right' ? '10px' : 'unset'); }, function (props) { return props.$inputIconSize + 'px'; }, function (props) { return (props.$error ? 'red' : '#111'); }, function (props) { return (props.$error ? 'red' : '#ccc'); }, function (props) { return (props.$error ? 'red' : '#828282'); }, function (props) { return (props.$inputIconDirection === 'left' ? props.$inputIconSize + 20 + 'px' : '16px'); }, function (props) { return (props.$inputIconDirection === 'right' ? props.$inputIconSize + 20 + 'px' : '16px'); }, function (props) { return props.theme['grey-dark']; }, function (props) { return props.theme['grey-dark']; }); var templateObject_1; //# sourceMappingURL=styles.js.map