UNPKG

@chayns-components/core

Version:

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

45 lines (43 loc) 2.13 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledHighlightSliderItemProgress = exports.StyledHighlightSliderItemBackground = exports.StyledHighlightSliderItem = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _react = require("motion/react"); var _keyboardFocusHighlighting = require("../../../utils/keyboardFocusHighlighting.styles"); 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 StyledHighlightSliderItem = exports.StyledHighlightSliderItem = _styledComponents.default.div` overflow: hidden; position: relative; width: 100%; height: 4px; border-radius: 4px; cursor: pointer; ${({ $shouldShowKeyboardHighlighting }) => $shouldShowKeyboardHighlighting && (0, _styledComponents.css)` &:focus-visible { ${_keyboardFocusHighlighting.keyboardFocusHighlightingRingCss} } `} `; const StyledHighlightSliderItemProgress = exports.StyledHighlightSliderItemProgress = (0, _styledComponents.default)(_react.motion.div)` height: 4px; position: absolute; top: 0; left: 0; z-index: 2; background-color: ${({ $backgroundColor }) => $backgroundColor}; `; const StyledHighlightSliderItemBackground = exports.StyledHighlightSliderItemBackground = (0, _styledComponents.default)(_react.motion.div)` height: 4px; width: 100%; border-radius: 2px; background-color: ${({ $backgroundColor }) => $backgroundColor}; `; //# sourceMappingURL=HighlightSliderItem.styles.js.map