design-system-govbr-rnp
Version:
## Padrão Digital de Governo - React Biblioteca de componentes React que implementa o [Padrão Visual digital do governo](https://www.gov.br/ds/). O objetivo da biblioteca é facilitar a implementação e promover a padronização das interfaces de sistemas do
30 lines (29 loc) • 4.61 kB
JavaScript
;
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.TitleContainer = exports.CardHeaderContainer = exports.CardContentContainer = exports.CardContainer = exports.CardActionsContainer = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7;
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; }
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var CardContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background: var(--pure-0);\n box-shadow: var(--surface-offset-none) var(--surface-offset-sm)\n var(--surface-blur-lg)\n rgba(var(--rgb-secondary-09), var(--surface-opacity-xs));\n color: var(--gray-80);\n margin-bottom: var(--spacing-scale-2x);\n\n width: ", ";\n max-width: 100%;\n\n ", "\n\n ", "\n"])), function (props) {
return props.width ? props.width + "px" : "auto";
}, function (props) {
return props.disabled && (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n cursor: not-allowed;\n opacity: var(--surface-opacity-md);\n "])));
}, function (props) {
return props.hover && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n &:hover {\n background-image: linear-gradient(\n rgba(var(--rgb-secondary-08), var(--surface-opacity-xs)),\n rgba(var(--rgb-secondary-08), var(--surface-opacity-xs))\n );\n }\n "])));
});
exports.CardContainer = CardContainer;
var CardHeaderContainer = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n padding: var(--spacing-scale-2x) var(--spacing-scale-2x) 0\n var(--spacing-scale-2x);\n align-items: center;\n display: flex;\n"])));
exports.CardHeaderContainer = CardHeaderContainer;
var TitleContainer = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-left: var(--spacing-scale-2x);\n margin-right: auto;\n\n h5 {\n font-size: var(--font-size-scale-up-02);\n margin: 0;\n }\n h6 {\n font-size: var(--font-size-scale-base);\n font-weight: var(--font-weight-regular);\n margin: 0;\n }\n"])));
exports.TitleContainer = TitleContainer;
var CardContentContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n height: ", ";\n padding: var(--spacing-scale-2x);\n overflow: auto;\n"])), function (props) {
return props.height ? props.height + "px" : "auto";
});
exports.CardContentContainer = CardContentContainer;
var CardActionsContainer = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n align-items: center;\n display: flex;\n padding: 0 var(--spacing-scale-2x) var(--spacing-scale-2x);\n"])));
exports.CardActionsContainer = CardActionsContainer;