UNPKG

@braineet/ui

Version:

Braineet design system

91 lines (90 loc) 5.34 kB
"use strict"; exports.__esModule = true; exports.TextInfo = exports.StyledName = exports.StyledInfoBox = exports.StyledInfo = exports.StyledEmail = exports.StyledDot = exports.StyledBoxRight = exports.StyledBoxLeft = exports.StyledBoxInfo = exports.StyledBox = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _box = _interopRequireDefault(require("../box")); var _heading = _interopRequireDefault(require("../heading")); var _text = _interopRequireDefault(require("../text")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } var StyledBox = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledBox", componentId: "sc-rd3ygl-0" })(["display:flex;justify-content:space-between;align-items:center;background-color:white;padding:", ";border-radius:", ";box-shadow:", ";transition:box-shadow 0.3s ease-in-out;overflow:auto;", ""], function (props) { return props.theme.spaces.md; }, function (props) { return props.theme.borderRadius.sm; }, function (props) { return props.theme.elevations[1]; }, function (props) { return props.hasClickCard && (0, _styledComponents.css)(["&:hover{box-shadow:", ",0px 0px 0px 2px ", " inset;cursor:pointer;}"], props.theme.elevations[3], props.theme.utils.lighten('black', 0.1)); }); exports.StyledBox = StyledBox; var StyledBoxLeft = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledBoxLeft", componentId: "sc-rd3ygl-1" })(["display:flex;", ""], function (p) { return p.ellipsis && (0, _styledComponents.css)(["flex:1 1 auto;min-width:0;"]); }); exports.StyledBoxLeft = StyledBoxLeft; var StyledBoxRight = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledBoxRight", componentId: "sc-rd3ygl-2" })(["display:flex;align-items:center;"]); exports.StyledBoxRight = StyledBoxRight; var StyledBoxInfo = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledBoxInfo", componentId: "sc-rd3ygl-3" })(["margin-left:", ";", ""], function (props) { return props.theme.spaces.md; }, function (p) { return p.ellipsis && (0, _styledComponents.css)(["overflow:hidden;"]); }); exports.StyledBoxInfo = StyledBoxInfo; var StyledName = (0, _styledComponents.default)(_heading.default).withConfig({ displayName: "styles__StyledName", componentId: "sc-rd3ygl-4" })(["", ""], function (p) { return p.ellipsis && (0, _styledComponents.css)(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]); }); exports.StyledName = StyledName; var TextInfo = (0, _styledComponents.default)(_text.default).withConfig({ displayName: "styles__TextInfo", componentId: "sc-rd3ygl-5" })(["", ""], function (p) { return p.ellipsis && (0, _styledComponents.css)(["white-space:nowrap;overflow:hidden;text-overflow:ellipsis;"]); }); exports.TextInfo = TextInfo; var StyledInfoBox = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledInfoBox", componentId: "sc-rd3ygl-6" })(["display:flex;", ""], function (p) { return p.ellipsis && (0, _styledComponents.css)(["overflow:hidden;"]); }); exports.StyledInfoBox = StyledInfoBox; var StyledInfo = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledInfo", componentId: "sc-rd3ygl-7" })(["display:flex;align-items:center;", ""], function (p) { return p.ellipsis && (0, _styledComponents.css)(["overflow:hidden;"]); }); exports.StyledInfo = StyledInfo; var StyledDot = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledDot", componentId: "sc-rd3ygl-8" })(["width:", ";height:", ";background-color:", ";margin:0 ", ";"], function (props) { return props.theme.spaces.sm; }, function (props) { return props.theme.spaces.sm; }, function (props) { return props.theme.utils.lighten('black', 0.1); }, function (props) { return props.theme.spaces.lg; }); exports.StyledDot = StyledDot; var StyledEmail = (0, _styledComponents.default)(_box.default).withConfig({ displayName: "styles__StyledEmail", componentId: "sc-rd3ygl-9" })([""]); exports.StyledEmail = StyledEmail;