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
29 lines (28 loc) • 4.57 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.Overlay = exports.ModalContainer = exports.HeaderModal = exports.FooterModal = exports.ContentModal = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _Types = require("./Types");
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 Overlay = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n align-items: center;\n width: 100vw;\n height: 100vh;\n top: 0;\n left: 0;\n position: absolute;\n justify-content: center;\n display: flex;\n background-image: linear-gradient(\n rgba(var(--rgb-secondary-09), 0.3),\n rgba(var(--rgb-secondary-09), 0.3)\n );\n z-index: 10;\n"])));
exports.Overlay = Overlay;
var ModalContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 500px;\n min-height: 100px;\n padding: var(--spacing-scale-2xh);\n box-shadow: var(--surface-blur-none) var(--surface-offset-md)\n var(--surface-blur-lg)\n rgba(var(--surface-shadow-color), var(--surface-opacity-xs));\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n position: fixed;\n background-color: var(--pure-0);\n ", "\n"])), function (_ref) {
var type = _ref.type;
return type === _Types.MODAL_TIMER && (0, _styledComponents.css)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 150px;\n min-height: 150px;\n align-items: center;\n justify-content: space-around;\n "])));
});
exports.ModalContainer = ModalContainer;
var HeaderModal = _styledComponents.default.h1(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n font-size: var(--font-size-scale-up-06);\n padding-bottom: var(--spacing-scale-baseh);\n display: flex;\n justify-content: space-between;\n"])));
exports.HeaderModal = HeaderModal;
var ContentModal = _styledComponents.default.p(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n padding-bottom: var(--spacing-scale-2xh);\n\n ", "\n"])), function (_ref2) {
var type = _ref2.type;
return type === _Types.MODAL_TERMS && (0, _styledComponents.css)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n box-shadow: var(--surface-shadow-sm-inset),\n var(--surface-shadow-sm-inset-up);\n padding: var(--spacing-scale-2x);\n margin-bottom: var(--spacing-scale-3xh);\n "])));
});
exports.ContentModal = ContentModal;
var FooterModal = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n align-items: center;\n\n & button {\n margin-inline: var(--spacing-scale-half);\n }\n"])));
exports.FooterModal = FooterModal;