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
38 lines (37 loc) • 4.42 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.WizardTop = exports.WizardPages = exports.WizardButtons = exports.WizardBottom = exports.ContainerWizard = void 0;
var _styledComponents = _interopRequireWildcard(require("styled-components"));
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
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 position = function position(_position) {
switch (_position) {
case "vertical":
return (0, _styledComponents.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: auto;\n height: 400px;\n padding: 0 var(--spacing-scale-2x);\n align-items: inherit;\n "])));
default:
break;
}
};
var ContainerWizard = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n width: 100%;\n background-color: var(--gray-10);\n display: flex;\n position: relative;\n z-index: 0;\n flex-direction: ", ";\n align-items: center;\n\n ", "\n"])), function (props) {
return props.position !== "vertical" && "column";
}, function (props) {
return position(props.position);
});
exports.ContainerWizard = ContainerWizard;
var WizardTop = _styledComponents.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n width: 100%;\n height: 200px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n & label {\n display: flex;\n align-items: center;\n\n & span::after {\n height: 60px;\n }\n }\n\n ", "\n"])), function (props) {
return position(props.position);
});
exports.WizardTop = WizardTop;
var WizardBottom = _styledComponents.default.div(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n align-items: center;\n height: 300px;\n flex-direction: column;\n justify-content: space-between;\n padding: 0 var(--spacing-scale-2x);\n box-sizing: border-box;\n ", "\n"])), function (props) {
return position(props.position);
});
exports.WizardBottom = WizardBottom;
var WizardPages = _styledComponents.default.div(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n background-color: var(--pure-0);\n width: 100%;\n height: 100%;\n padding: var(--spacing-scale-base) var(--spacing-scale-2x);\n overflow: auto;\n"])));
exports.WizardPages = WizardPages;
var WizardButtons = _styledComponents.default.div(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n width: 100%;\n display: flex;\n justify-content: space-between;\n padding: var(--spacing-scale-2x);\n align-items: center;\n\n & button {\n margin: 0 var(--spacing-scale-base);\n }\n"])));
exports.WizardButtons = WizardButtons;