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
51 lines (50 loc) • 6.42 kB
JavaScript
"use strict";
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.Title = exports.SocialMedia = exports.Logo = exports.Item = exports.Img = exports.ImagesBox = exports.FooterContainer = exports.CenteredParagraph = exports.ButtonsMediaSocial = exports.Button = exports.BoxColumn = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _medias = _interopRequireDefault(require("../../utilities/Grid/medias"));
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
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; }
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
var darkFooterContainer = function darkFooterContainer() {
return (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: var(--blue-warm-vivid-90);\n color: var(--pure-0);\n "])));
};
var darkItem = function darkItem() {
return (0, _styledComponents.css)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: var(--blue-warm-20);\n "])));
};
var darkButton = function darkButton() {
return (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n & button {\n color: var(--pure-0);\n border-color: var(--pure-0);\n }\n\n & button:hover {\n background-image: linear-gradient(\n rgba(var(--blue-warm-20-rgb), var(--surface-opacity-xs)),\n rgba(var(--blue-warm-20-rgb), var(--surface-opacity-xs))\n ) !important;\n }\n "])));
};
var BoxColumn = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n flex-wrap: wrap;\n margin-bottom: var(--spacing-scale-2x);\n"])));
exports.BoxColumn = BoxColumn;
var Item = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n color: var(--blue-warm-vivid-80);\n padding: var(--spacing-scale-2x);\n display: flex;\n\n &:hover {\n background-image: linear-gradient(\n rgba(var(--blue-warm-20-rgb), var(--surface-opacity-xs)),\n rgba(var(--blue-warm-20-rgb), var(--surface-opacity-xs))\n );\n cursor: pointer;\n }\n\n ", "\n"])), function (props) {
return props.dark && darkItem();
});
exports.Item = Item;
var FooterContainer = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n padding: var(--spacing-scale-4x) 180px;\n\n @media (max-width: ", ") {\n padding: var(--spacing-scale-4x) 40px;\n }\n ", "\n"])), _medias.default.breakpointMd, function (props) {
return props.dark && darkFooterContainer();
});
exports.FooterContainer = FooterContainer;
var Logo = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n & img {\n max-height: var(--spacing-scale-6x);\n max-width: 180px;\n margin-bottom: var(--spacing-scale-2x);\n }\n"])));
exports.Logo = Logo;
var SocialMedia = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n & p {\n margin-bottom: var(--spacing-scale-2x);\n }\n"])));
exports.SocialMedia = SocialMedia;
var Button = _styledComponents.default.div(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n margin-right: var(--spacing-scale-base);\n\n ", "\n"])), function (props) {
return props.dark && darkButton();
});
exports.Button = Button;
var ButtonsMediaSocial = _styledComponents.default.div(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n @media (max-width: ", ") {\n margin-bottom: 20px;\n }\n"])), _medias.default.breakpointSm);
exports.ButtonsMediaSocial = ButtonsMediaSocial;
var Img = _styledComponents.default.img(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n margin-right: var(--spacing-scale-base);\n max-height: var(--spacing-scale-6x);\n max-width: 180px;\n\n &:last-child {\n margin-right: 0;\n }\n"])));
exports.Img = Img;
var ImagesBox = _styledComponents.default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n display: flex;\n align-items: flex-end;\n margin-top: 25px;\n"])));
exports.ImagesBox = ImagesBox;
var Title = _styledComponents.default.span(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n font-weight: 700;\n"])));
exports.Title = Title;
var CenteredParagraph = _styledComponents.default.p(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n text-align: center;\n"])));
exports.CenteredParagraph = CenteredParagraph;