kwikid-components-react
Version:
KwikID's Component Library in React
42 lines (41 loc) • 6.4 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.KwikUIStyleInputSelectWrapper = exports.KwikUIStyleInputSelectMessagesContainer = exports.KwikUIStyleInputSelectLabel = exports.KwikUIStyleInputSelectItemLabelContainer = exports.KwikUIStyleInputSelectItemLabel = exports.KwikUIStyleInputSelectItemContainer = exports.KwikUIStyleInputSelectContainer = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _Input = require("../../../../shared/styles/Input.style");
var _InputSelect = require("./InputSelect.definition");
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject0, _templateObject1, _templateObject10;
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
const KwikUIStyleInputSelectWrapper = exports.KwikUIStyleInputSelectWrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-content: flex-start;\n justify-content: flex-start;\n align-items: flex-start;\n\n & > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
const KwikUIStyleInputSelectLabel = exports.KwikUIStyleInputSelectLabel = _styledComponents.default.label(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n ", "\n\n position: absolute;\n top: 0px;\n margin-left: -0.15rem;\n transform: translate(0px, -50%);\n"])), _Input.KwikUIStyleInputLabel);
const KwikUIStyleInputSelectContainer = exports.KwikUIStyleInputSelectContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n ", "\n\n ", ";\n\n &:hover {\n background-color: var(--kwikui-color-white);\n // box-shadow: 0 0 8px -3px var(--kwikui-color-disabled) !important;\n box-shadow: 0px 2px 12px -3px var(--kwikui-color-disabled-active);\n\n ", ";\n }\n &:focus,\n &:focus-within {\n border-color: var(--kwikui-color-primary);\n background-color: var(--kwikui-color-white);\n box-shadow: 0 0 8px -3px var(--kwikui-color-primary) !important;\n\n ", ";\n }\n ", "\n ", "\n ", "\n ", "\n #prefix {\n ", "\n }\n #postfix {\n ", "\n }\n\n input {\n ", "\n ", "\n ", "\n &::placeholder {\n ", "\n }\n }\n"])), _Input.KwikUIStyleInputContainerBase, _ref => {
let {
variant,
disabled
} = _ref;
switch (variant) {
case _InputSelect.IKwikUIInputSelectVariant.DROPDOWN:
return (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n cursor: ", ";\n border: ", ";\n background-color: ", ";\n color: ", ";\n "])), disabled ? "not-allowed" : "pointer", disabled ? "2px solid var(--kwikui-color-disabled-active) !important" : "2px solid var(--kwikui-color-primary) !important", disabled ? "var(--kwikui-color-disabled) !important" : "var(--kwikui-color-primary) !important", disabled ? "var(--kwikui-color-disabled-text) !important" : "var(--kwikui-color-white) !important");
case _InputSelect.IKwikUIInputSelectVariant.SELECT:
return (0, _styledComponents.css)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n cursor: ", ";\n "])), disabled ? "not-allowed" : "text");
default:
return (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral([""])));
}
}, _ref2 => {
let {
disabled
} = _ref2;
return (0, _styledComponents.css)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n "])), disabled ? "0 0 5px var(--kwikui-color-disabled)" : "0 0 5px rgba(102, 175, 233, 0.6)");
}, _ref3 => {
let {
disabled
} = _ref3;
return (0, _styledComponents.css)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n box-shadow: ", ";\n "])), disabled ? "0 0 5px var(--kwikui-color-disabled)" : "0 0 5px rgba(102, 175, 233, 0.6)");
}, _Input.KwikUIStyleInputStatus, _Input.KwikUIStyleInputContainerDisabled, _Input.KwikUIStyleInputContainerSize, _Input.KwikUIStyleInputContainerShape, _Input.KwikUIStyleInputPrefix, _Input.KwikUIStyleInputPostfix, _Input.KwikUIStyleInputReset, _Input.KwikUIStyleInputBase, _Input.KwikUIStyleInputSize, _Input.KwikUIStyleInputPlaceholder);
const KwikUIStyleInputSelectItemContainer = exports.KwikUIStyleInputSelectItemContainer = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-content: flex-start;\n justify-content: flex-start;\n align-items: flex-start;\n\n & > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
const KwikUIStyleInputSelectItemLabelContainer = exports.KwikUIStyleInputSelectItemLabelContainer = _styledComponents.default.div(_templateObject0 || (_templateObject0 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n align-content: flex-start;\n justify-content: flex-start;\n align-items: stretch;\n\n & > *:not(:last-child) {\n margin-bottom: 0.5rem;\n }\n"])));
const KwikUIStyleInputSelectItemLabel = exports.KwikUIStyleInputSelectItemLabel = _styledComponents.default.div(_templateObject1 || (_templateObject1 = _taggedTemplateLiteral(["\n margin-top: 0.15rem;\n"])));
const KwikUIStyleInputSelectMessagesContainer = exports.KwikUIStyleInputSelectMessagesContainer = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n width: 100%;\n margin-left: 0.25rem;\n font-size: 0.9rem;\n"])));