UNPKG

@activecollab/components

Version:

ActiveCollab Components

40 lines (39 loc) 2.79 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.StyledBadge = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _FontStyle = require("../FontStyle"); function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); } function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } var StyledBadge = exports.StyledBadge = _styledComponents.default.div.withConfig({ displayName: "Styles__StyledBadge", componentId: "sc-6o8do5-0" })(["", " align-items:center;background-color:", ";border:", ";block-size:", ";border-radius:100%;color:var(--color-theme-100);display:flex;font-size:10px;font-weight:500;inline-size:", ";justify-content:center;padding:", ";pointer-events:none;position:absolute;z-index:1;", " ", " ", " ", " ", ""], _FontStyle.FontStyle, function (props) { return !props.backgroundColor ? "var(--color-primary)" : props.backgroundColor; }, function (props) { return props.isStandalone ? "none" : "2px solid var(--page-paper-main)"; }, function (props) { return props.dimension + "px"; }, function (props) { return props.dimension + "px"; }, function (props) { return props.value && (props.value > 99 ? "4px" : props.value < 100 && "2px"); }, function (_ref) { var isStandalone = _ref.isStandalone; return isStandalone && (0, _styledComponents.css)(["position:static;z-index:0;"]); }, function (_ref2) { var position = _ref2.position; return position === "top-left" && (0, _styledComponents.css)(["inset-block-start:0;inset-inline-start:0;"]); }, function (_ref3) { var position = _ref3.position; return position === "top-right" && (0, _styledComponents.css)(["inset-block-start:0;inset-inline-end:0;"]); }, function (_ref4) { var position = _ref4.position; return position === "bottom-right" && (0, _styledComponents.css)(["inset-block-end:0;inset-inline-end:0;"]); }, function (_ref5) { var position = _ref5.position; return position === "bottom-left" && (0, _styledComponents.css)(["inset-block-end:0;inset-inline-start:0;"]); }); //# sourceMappingURL=Styles.js.map