@activecollab/components
Version:
ActiveCollab Components
88 lines (87 loc) • 5.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.StyledTextareaSpan = exports.StyledSpan = exports.StyledMultilineSpan = exports.StyledInput = exports.StyledDiv = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _BoxSizingStyle = require("../BoxSizingStyle");
var _FontStyle = require("../FontStyle");
var _Typography = require("../Typography/Typography");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(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 (var _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); }
var StyledDiv = exports.StyledDiv = _styledComponents.default.div.withConfig({
displayName: "Styles__StyledDiv",
componentId: "sc-1wapx2a-0"
})(["", " ", " ", " ", ""], _FontStyle.FontStyle, _BoxSizingStyle.BoxSizingStyle, {
"position": "relative",
"display": "inline-block",
"maxWidth": "100%"
}, function (_ref) {
var $multiline = _ref.$multiline;
return $multiline && (0, _styledComponents.css)(["position:relative;display:flex;"]);
});
var StyledSpan = exports.StyledSpan = (0, _styledComponents.default)(_Typography.Typography).withConfig({
displayName: "Styles__StyledSpan",
componentId: "sc-1wapx2a-1"
})(["visibility:hidden;display:block;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;position:relative;border:1px solid transparent;border-radius:6px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:pre;font-variant-numeric:tabular-nums;", " ", " &:empty:before{content:\" \";}"], function (_ref2) {
var $disabled = _ref2.$disabled;
return $disabled && (0, _styledComponents.css)(["visibility:visible;cursor:default !important;"]);
}, function (_ref3) {
var invalid = _ref3.invalid;
return invalid && (0, _styledComponents.css)(["border:1px solid var(--red-alert);"]);
});
StyledSpan.displayName = "StyledSpan";
var StyledInput = exports.StyledInput = (0, _styledComponents.default)(_Typography.Typography).withConfig({
displayName: "Styles__StyledInput",
componentId: "sc-1wapx2a-2"
})(["", " background-color:inherit;padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;text-overflow:ellipsis;font-variant-numeric:tabular-nums;&:focus-whitin{text-overflow:clip;}outline-width:0px;outline:none;&:disabled{opacity:0;}", ""], {
"position": "absolute",
"inset": "0px",
"boxSizing": "border-box",
"width": "100%",
"overflow": "hidden",
"whiteSpace": "nowrap",
"borderRadius": "0.375rem",
"borderWidth": "1px",
"borderStyle": "solid",
"borderColor": "transparent",
":focus-within": {
"overflow": "scroll",
"borderColor": "var(--color-theme-700)"
},
":hover": {
"borderColor": "var(--color-theme-700)"
}
}, function (_ref4) {
var invalid = _ref4.invalid;
return invalid && (0, _styledComponents.css)(["border-color:var(--red-alert) !important;"]);
});
StyledInput.displayName = "StyledInput";
var StyledMultilineSpan = exports.StyledMultilineSpan = (0, _styledComponents.default)(StyledSpan).withConfig({
displayName: "Styles__StyledMultilineSpan",
componentId: "sc-1wapx2a-3"
})(["cursor:", ";z-index:2;width:100%;visibility:visible !important;&:hover{border-color:", ";}"], function (_ref5) {
var $disabled = _ref5.$disabled;
return $disabled ? "default" : "text !important";
}, function (_ref6) {
var invalid = _ref6.invalid,
$disabled = _ref6.$disabled;
return invalid ? "var(--red-alert)" : $disabled ? "transparent" : "var(--border-primary)";
});
StyledMultilineSpan.displayName = "StyledMultilineSpan";
var StyledTextareaSpan = exports.StyledTextareaSpan = (0, _styledComponents.default)(_Typography.Typography).withConfig({
displayName: "Styles__StyledTextareaSpan",
componentId: "sc-1wapx2a-4"
})(["", " background-color:var(--input-background-color);border-color:var(--color-theme-500);padding-left:4px;padding-right:4px;padding-top:1px;padding-bottom:1px;font-variant-numeric:tabular-nums;outline-width:0px;outline:none;resize:none;white-space:pre-wrap;overflow-wrap:break-word;height:calc(1.5em * 3 + 2px);min-height:calc(1.5em * 3 + 2px);opacity:0;pointer-events:none;z-index:1;&:focus{opacity:1;pointer-events:auto;background-color:var(--input-background-color);border-color:var(--color-primary);outline:none;z-index:3;}&:disabled{opacity:0;pointer-events:none;}", ""], {
"position": "absolute",
"inset": "0px",
"boxSizing": "border-box",
"width": "100%",
"borderRadius": "0.375rem",
"borderWidth": "1px",
"borderStyle": "solid"
}, function (_ref7) {
var invalid = _ref7.invalid;
return invalid && (0, _styledComponents.css)(["border-color:var(--red-alert) !important;"]);
});
StyledTextareaSpan.displayName = "StyledTextareaSpan";
//# sourceMappingURL=Styles.js.map