UNPKG

@chayns-components/core

Version:

A set of beautiful React components for developing your own applications with chayns.

62 lines (57 loc) 2.8 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledSearchInputPseudoElement = exports.StyledSearchInput = exports.StyledMotionSearchInputIconWrapperContent = exports.StyledMotionSearchInputIconWrapper = exports.StyledMotionSearchInputContentWrapper = void 0; var _react = require("motion/react"); var _styledComponents = _interopRequireWildcard(require("styled-components")); 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); } const StyledSearchInput = exports.StyledSearchInput = _styledComponents.default.div` display: flex; align-items: center; height: ${({ $size }) => $size === 'medium' ? '42px' : '32px'}; ${({ $shouldUseAbsolutePositioning, theme }) => $shouldUseAbsolutePositioning ? (0, _styledComponents.css)` justify-content: center; aspect-ratio: 1; border-radius: 3px; position: relative; cursor: pointer; @media (pointer: fine) { &:hover { background-color: ${theme[201]}; } } ` : (0, _styledComponents.css)` gap: 8px; justify-content: flex-end; width: 100%; `} `; const StyledSearchInputPseudoElement = exports.StyledSearchInputPseudoElement = _styledComponents.default.div` position: absolute; right: 0; left: 0; `; const StyledMotionSearchInputContentWrapper = exports.StyledMotionSearchInputContentWrapper = (0, _styledComponents.default)(_react.motion.div)` ${({ $shouldUseAbsolutePositioning }) => $shouldUseAbsolutePositioning && (0, _styledComponents.css)` position: absolute; top: 0; right: 0; `} overflow: hidden; `; const StyledMotionSearchInputIconWrapperContent = exports.StyledMotionSearchInputIconWrapperContent = (0, _styledComponents.default)(_react.motion.div)` display: flex; cursor: pointer; `; const StyledMotionSearchInputIconWrapper = exports.StyledMotionSearchInputIconWrapper = _styledComponents.default.div` width: 18px; `; //# sourceMappingURL=SearchInput.styles.js.map