UNPKG

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

45 lines (44 loc) 6.07 kB
"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.Overlay = exports.ModalIconClose = exports.ModalContainer = exports.HeaderModal = exports.FooterModal = exports.ContentModal = exports.Container = exports.ButtonClose = void 0; var _styledComponents = _interopRequireWildcard(require("styled-components")); var _reactFontawesome = require("@fortawesome/react-fontawesome"); var _Types = require("./Types"); var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10; 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 Container = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 97vw;\n height: 95vh;\n display: ", ";\n align-items: center;\n justify-content: center;\n position: absolute;\n"])), function (_ref) { var open = _ref.open; return open ? "flex" : "none"; }); exports.Container = Container; var Overlay = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100vw;\n height: 100vh;\n display: ", ";\n position: fixed;\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: 1;\n"])), function (_ref2) { var open = _ref2.open; return open ? "flex" : "none"; }); exports.Overlay = Overlay; var ModalContainer = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: ", ";\n min-height: 30%;\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 z-index: 4;\n ", "\n"])), function (_ref3) { var width = _ref3.width; return width; }, function (_ref4) { var type = _ref4.type; return type === _Types.MODAL_TIMER && (0, _styledComponents.css)(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 150px;\n min-height: 150px;\n align-items: center;\n justify-content: space-around;\n "]))); }); exports.ModalContainer = ModalContainer; var ModalIconClose = (0, _styledComponents.default)(_reactFontawesome.FontAwesomeIcon)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n font-size: var(--icon-size-base);\n color: var(--blue-warm-vivid-70);\n"]))); exports.ModalIconClose = ModalIconClose; var ButtonClose = _styledComponents.default.button(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border: none;\n background: none;\n border-radius: 50%;\n width: var(--spacing-scale-4x);\n height: var(--spacing-scale-4x);\n display: flex;\n align-items: center;\n justify-content: center;\n cursor: pointer;\n\n &:hover {\n background-image: linear-gradient(\n rgba(var(--rgb-primary-default), var(--surface-opacity-xs)),\n rgba(var(--rgb-primary-default), var(--surface-opacity-xs))\n );\n }\n"]))); exports.ButtonClose = ButtonClose; var HeaderModal = _styledComponents.default.div(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n font-weight: var(--font-weight-bold);\n font-size: var(--font-size-scale-up-01);\n padding-bottom: var(--spacing-scale-3xh);\n display: flex;\n justify-content: space-between;\n"]))); exports.HeaderModal = HeaderModal; var ContentModal = _styledComponents.default.div(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n padding-bottom: var(--spacing-scale-4x);\n ", "\n"])), function (_ref5) { var type = _ref5.type; return type === _Types.MODAL_TERMS && (0, _styledComponents.css)(_templateObject9 || (_templateObject9 = _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(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n justify-content: end;\n\n & button {\n margin-inline: var(--spacing-scale-half);\n }\n"]))); exports.FooterModal = FooterModal;