diff --git a/index.js b/index.js
index c9f811e2f..0473c259b 100644
--- a/index.js
+++ b/index.js
@@ -2,14 +2,16 @@
Object.defineProperty(exports, '__esModule', { value: true });
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var classnames = _interopDefault(require('classnames'));
-var PropTypes = _interopDefault(require('prop-types'));
+var classnames = require('classnames');
+var PropTypes = require('prop-types');
var React = require('react');
-var React__default = _interopDefault(React);
var lodash = require('lodash');
-var html2json = require('html2json');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
+var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
+var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
function _defineProperty(obj, key, value) {
if (key in obj) {
@@ -44,39 +46,44 @@ function _extends() {
return _extends.apply(this, arguments);
}
-function ownKeys(object, enumerableOnly) {
- var keys = Object.keys(object);
-
- if (Object.getOwnPropertySymbols) {
- var symbols = Object.getOwnPropertySymbols(object);
- if (enumerableOnly) symbols = symbols.filter(function (sym) {
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
- });
- keys.push.apply(keys, symbols);
- }
-
- return keys;
-}
-
-function _objectSpread2(target) {
- for (var i = 1; i < arguments.length; i++) {
- var source = arguments[i] != null ? arguments[i] : {};
-
- if (i % 2) {
- ownKeys(Object(source), true).forEach(function (key) {
- _defineProperty(target, key, source[key]);
- });
- } else if (Object.getOwnPropertyDescriptors) {
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
- } else {
- ownKeys(Object(source)).forEach(function (key) {
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
- });
- }
- }
-
- return target;
-}
+var colors = [
+ "primary-1",
+ "primary-2",
+ "primary-3",
+ "secondary-1",
+ "secondary-2",
+ "secondary-3",
+ "product-1",
+ "product-2",
+ "product-3",
+ "product-4",
+ "product-5",
+ "editorial-1",
+ "editorial-2",
+ "editorial-3",
+ "editorial-4",
+ "editorial-5",
+ "black",
+ "neutral-1",
+ "neutral-2",
+ "neutral-3",
+ "neutral-4",
+ "neutral-5",
+ "neutral-6",
+ "neutral-7",
+ "neutral-8",
+ "neutral-9",
+ "neutral-10",
+ "neutral-11",
+ "white",
+ "ads",
+ "success-1",
+ "success-2",
+ "success-3",
+ "error-1",
+ "error-2",
+ "error-3"
+];
var Block = function Block(props) {
var children = props.children,
@@ -95,7 +102,7 @@ var Block = function Block(props) {
};
var direction = props && props.align && (props.align.indexOf('row') > -1 ? 'row' : 'col');
- return classnames((_classnames = {}, _defineProperty(_classnames, "fx-col".concat(prefix), direction === 'col'), _defineProperty(_classnames, "fx-row".concat(prefix), direction === 'row'), _defineProperty(_classnames, "".concat(direction, "-between").concat(prefix), checkAttr(props, 'between')), _defineProperty(_classnames, "".concat(direction, "-bottom").concat(prefix), checkAttr(props, 'bottom')), _defineProperty(_classnames, "".concat(direction, "-center").concat(prefix), checkAttr(props, 'center')), _defineProperty(_classnames, "".concat(direction, "-evenly").concat(prefix), checkAttr(props, 'evenly')), _defineProperty(_classnames, "".concat(direction, "-left").concat(prefix), checkAttr(props, 'left')), _defineProperty(_classnames, "".concat(direction, "-middle").concat(prefix), checkAttr(props, 'middle')), _defineProperty(_classnames, "".concat(direction, "-right").concat(prefix), checkAttr(props, 'right')), _defineProperty(_classnames, "".concat(direction, "-top").concat(prefix), checkAttr(props, 'top')), _defineProperty(_classnames, "".concat(direction, "-wrap").concat(prefix), checkAttr(props, 'wrap')), _defineProperty(_classnames, "bg-".concat(props.bg).concat(prefix), props.bg), _defineProperty(_classnames, "cursor-".concat(props.cursor).concat(prefix), props.cursor), _defineProperty(_classnames, "fc-".concat(props.fc).concat(prefix), props.fc), _defineProperty(_classnames, "h-".concat(props.h).concat(prefix), props.h), _defineProperty(_classnames, "m-".concat(props.m).concat(prefix), props.m), _defineProperty(_classnames, "mt-".concat(props.mt).concat(prefix), props.mt), _defineProperty(_classnames, "mr-".concat(props.mr).concat(prefix), props.mr), _defineProperty(_classnames, "mb-".concat(props.mb).concat(prefix), props.mb), _defineProperty(_classnames, "ml-".concat(props.ml).concat(prefix), props.ml), _defineProperty(_classnames, "p-".concat(props.p).concat(prefix), props.p), _defineProperty(_classnames, "pt-".concat(props.pt).concat(prefix), props.pt), _defineProperty(_classnames, "pr-".concat(props.pr).concat(prefix), props.pr), _defineProperty(_classnames, "pb-".concat(props.pb).concat(prefix), props.pb), _defineProperty(_classnames, "pl-".concat(props.pl).concat(prefix), props.pl), _defineProperty(_classnames, "w-".concat(props.w).concat(prefix), props.w), _defineProperty(_classnames, "".concat(props.custom), props.custom), _classnames));
+ return classnames__default['default']((_classnames = {}, _defineProperty(_classnames, "fx-col".concat(prefix), direction === 'col'), _defineProperty(_classnames, "fx-row".concat(prefix), direction === 'row'), _defineProperty(_classnames, "".concat(direction, "-between").concat(prefix), checkAttr(props, 'between')), _defineProperty(_classnames, "".concat(direction, "-bottom").concat(prefix), checkAttr(props, 'bottom')), _defineProperty(_classnames, "".concat(direction, "-center").concat(prefix), checkAttr(props, 'center')), _defineProperty(_classnames, "".concat(direction, "-evenly").concat(prefix), checkAttr(props, 'evenly')), _defineProperty(_classnames, "".concat(direction, "-left").concat(prefix), checkAttr(props, 'left')), _defineProperty(_classnames, "".concat(direction, "-middle").concat(prefix), checkAttr(props, 'middle')), _defineProperty(_classnames, "".concat(direction, "-right").concat(prefix), checkAttr(props, 'right')), _defineProperty(_classnames, "".concat(direction, "-top").concat(prefix), checkAttr(props, 'top')), _defineProperty(_classnames, "".concat(direction, "-wrap").concat(prefix), checkAttr(props, 'wrap')), _defineProperty(_classnames, "bg-".concat(props.bg).concat(prefix), props.bg), _defineProperty(_classnames, "cursor-".concat(props.cursor).concat(prefix), props.cursor), _defineProperty(_classnames, "fc-".concat(props.fc).concat(prefix), props.fc), _defineProperty(_classnames, "h-".concat(props.h).concat(prefix), props.h), _defineProperty(_classnames, "m-".concat(props.m).concat(prefix), props.m), _defineProperty(_classnames, "mt-".concat(props.mt).concat(prefix), props.mt), _defineProperty(_classnames, "mr-".concat(props.mr).concat(prefix), props.mr), _defineProperty(_classnames, "mb-".concat(props.mb).concat(prefix), props.mb), _defineProperty(_classnames, "ml-".concat(props.ml).concat(prefix), props.ml), _defineProperty(_classnames, "p-".concat(props.p).concat(prefix), props.p), _defineProperty(_classnames, "pt-".concat(props.pt).concat(prefix), props.pt), _defineProperty(_classnames, "pr-".concat(props.pr).concat(prefix), props.pr), _defineProperty(_classnames, "pb-".concat(props.pb).concat(prefix), props.pb), _defineProperty(_classnames, "pl-".concat(props.pl).concat(prefix), props.pl), _defineProperty(_classnames, "w-".concat(props.w).concat(prefix), props.w), _defineProperty(_classnames, "".concat(props.custom), props.custom), _classnames));
};
var dProps = defProps('', props);
@@ -105,730 +112,534 @@ var Block = function Block(props) {
var lgProps = lg && defProps('--lg', lg);
var xlProps = xl && defProps('--xl', xl);
var classProps = {
- className: classnames(dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
+ className: classnames__default['default'](dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
children: children,
onClick: onClick
};
- return /*#__PURE__*/React__default.createElement("div", classProps);
+ return /*#__PURE__*/React__default['default'].createElement("div", classProps);
};
var propTypesSizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
-var colorTokens = ['color-white', 'color-black', 'color-primary-1', 'color-primary-2', 'color-primary-3', 'color-secondary-1', 'color-secondary-2', 'color-secondary-3', 'color-neutral-1', 'color-neutral-2', 'color-neutral-3', 'color-neutral-4', 'color-neutral-5', 'color-neutral-6', 'color-neutral-7', 'color-neutral-8', 'color-neutral-9', 'color-neutral-10', 'color-neutral-11'];
Block.propTypes = {
- align: PropTypes.string,
- bg: PropTypes.oneOf(colorTokens),
- fc: PropTypes.oneOf(colorTokens),
- cursor: PropTypes.string,
- m: PropTypes.oneOf([].concat(propTypesSizes)),
- mt: PropTypes.oneOf([].concat(propTypesSizes)),
- mr: PropTypes.oneOf([].concat(propTypesSizes)),
- mb: PropTypes.oneOf([].concat(propTypesSizes)),
- ml: PropTypes.oneOf([].concat(propTypesSizes)),
- p: PropTypes.oneOf([].concat(propTypesSizes)),
- pt: PropTypes.oneOf([].concat(propTypesSizes)),
- pr: PropTypes.oneOf([].concat(propTypesSizes)),
- pb: PropTypes.oneOf([].concat(propTypesSizes)),
- pl: PropTypes.oneOf([].concat(propTypesSizes)),
- xs: PropTypes.object,
- sm: PropTypes.object,
- md: PropTypes.object,
- lg: PropTypes.object,
- xl: PropTypes.object,
- children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.node]),
- custom: PropTypes.string,
- onClick: PropTypes.func,
- w: PropTypes.string,
- h: PropTypes.string
-};
-Block.defaultProps = {};
-
-var Button = function Button(props) {
+ align: PropTypes__default['default'].string,
+ bg: PropTypes__default['default'].oneOf(colors),
+ fc: PropTypes__default['default'].oneOf(colors),
+ cursor: PropTypes__default['default'].string,
+ m: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mt: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mr: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mb: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ ml: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ p: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pt: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pr: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pb: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pl: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ xs: PropTypes__default['default'].object,
+ sm: PropTypes__default['default'].object,
+ md: PropTypes__default['default'].object,
+ lg: PropTypes__default['default'].object,
+ xl: PropTypes__default['default'].object,
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].array, PropTypes__default['default'].object, PropTypes__default['default'].node]),
+ custom: PropTypes__default['default'].string,
+ onClick: PropTypes__default['default'].func,
+ w: PropTypes__default['default'].string,
+ h: PropTypes__default['default'].string
+};
+
+var weights = [
+ "thin",
+ "light",
+ "regular",
+ "medium",
+ "bold",
+ "italic"
+];
+
+var SubjectTypography = function SubjectTypography(props) {
var _classnames;
- var getClass = classnames((_classnames = {
- 'Prensa-Button-root': true
- }, _defineProperty(_classnames, "".concat(props.variant), true), _defineProperty(_classnames, "".concat(props.color), true), _defineProperty(_classnames, 'disabled', props.disabled), _defineProperty(_classnames, 'fullWidth', props.fullWidth), _defineProperty(_classnames, "".concat(props.className), props.className), _classnames));
- return /*#__PURE__*/React__default.createElement("button", {
- className: getClass,
- disabled: props.disabled,
- onClick: !props.disabled && props.onClick,
- style: props.style
- }, props.children);
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Subject-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-
-Button.propTypes = {
- /**
- * Permite a estilização do componente
- */
- className: PropTypes.string,
- children: PropTypes.node,
- disabled: PropTypes.bool,
- fullWidth: PropTypes.bool,
- onClick: PropTypes.func,
- variant: PropTypes.oneOf(['filled', 'outlined']),
- color: PropTypes.oneOf(['primary', 'secondary']),
- style: PropTypes.string
+SubjectTypography.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-Button.defaultProps = {
- disabled: false,
- variant: 'filled',
- color: 'primary'
+SubjectTypography.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var pathToImage = function pathToImage(derivative, domain, policy_id, width) {
- if (!policy_id) return null;
- var w = width || 1000;
- var r = domain || 'https://costanorte.com.br';
- var d = derivative || '2x1';
- var id = policy_id.split('.');
- var string = id.length > 2 ? "".concat(policy_id, ":").concat(id[2]) : "".concat(policy_id);
- var path = "".concat(r, "/image/policy:").concat(string, "/image.jpg?f=").concat(d, "&w=").concat(w);
- return path;
+var NewsTitle = function NewsTitle(props) {
+ var _classnames;
+
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight,
+ disableHover = props.disableHover;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-NewsTitle-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, 'has-hover', !disableHover), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h2", {
+ className: classes,
+ style: style
+ }, children);
+};
+NewsTitle.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular',
+ disableHover: false
+};
+NewsTitle.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ disableHover: PropTypes__default['default'].bool,
+ size: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var Image = function Image(_ref) {
- var children = _ref.children,
- content = _ref.content,
- custom = _ref.custom,
- domain = _ref.domain,
- height = _ref.height,
- lazy = _ref.lazy,
- placeholder = _ref.placeholder;
- var img_placeholder = placeholder || null;
+var Subtitle = function Subtitle(props) {
+ var _classnames;
- if (content['image-contentId']) {
- var policy_id = content['image-contentId'];
- var derivative = '2x1';
- var width = 1000;
- content['image-path'] = pathToImage(derivative, domain, policy_id, width);
- img_placeholder = img_placeholder || pathToImage(derivative, domain, policy_id, 10);
- }
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Subtitle-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h3", {
+ className: classes,
+ style: style
+ }, children);
+};
+Subtitle.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
+};
+Subtitle.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
+};
- var content_path = content['image-path'];
- var image_style;
+var Date$1 = function Date(props) {
+ var _classnames;
- if (lazy) {
- image_style = {
- backgroundImage: "url(".concat(lazy(content_path, img_placeholder), ")")
- };
- } else {
- image_style = {
- backgroundImage: "url(".concat(content_path, ")")
- };
- }
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Date-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
+};
+Date$1.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
+};
+Date$1.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
+};
- if (height) {
- image_style.height = height;
- }
+var Author = function Author(props) {
+ var _classnames;
- return /*#__PURE__*/React__default.createElement("div", {
- className: "image-background ".concat(custom || ''),
- style: image_style
- }, children && children);
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Author-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-
-Image.propTypes = {
- children: PropTypes.node,
- content: PropTypes.object.isRequired,
- custom: PropTypes.string,
- domain: PropTypes.string,
- height: PropTypes.string,
- lazy: PropTypes.func,
- placeholder: PropTypes.string
+Author.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-Image.defaultProps = {
- content: {}
+Author.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var ColumnHeader = function ColumnHeader(_ref) {
- var domain = _ref.domain,
- item = _ref.item;
- if (!item) return null;
- var path = '';
- var image = item['column-image'] && item['column-image']['image-contentId'] && item['column-image'];
- var column_name = item['column-name'];
- var column_description = item['column-desc'];
- return /*#__PURE__*/React__default.createElement(Block, {
- align: "row",
- custom: "column-header",
- mb: "3",
- p: "3",
- w: "100p-6"
- }, /*#__PURE__*/React__default.createElement(Block, null, /*#__PURE__*/React__default.createElement("a", {
- className: "teaser-aria",
- href: path,
- "aria-label": "Imagem do colunista ".concat(column_name)
- }, /*#__PURE__*/React__default.createElement(Image, {
- domain: domain,
- content: image
- }))), /*#__PURE__*/React__default.createElement(Block, {
- align: "middle",
- ml: "2"
- }, /*#__PURE__*/React__default.createElement(Block, {
- custom: "title"
- }, column_name), /*#__PURE__*/React__default.createElement(Block, {
- custom: "subtitle"
- }, column_description)));
-};
+var Paragraph = function Paragraph(props) {
+ var _classnames;
-ColumnHeader.propTypes = {
- domain: PropTypes.string,
- item: PropTypes.object
+ var className = props.className,
+ color = props.color,
+ gutter = props.gutter,
+ style = props.style,
+ size = props.size,
+ weight = props.weight,
+ maxWidth = props.maxWidth,
+ setInnerHtml = props.setInnerHtml;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Paragraph-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " ").concat(maxWidth), true), _defineProperty(_classnames, "gutter-".concat(gutter), gutter), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("p", {
+ className: classes,
+ style: style,
+ gutter: gutter,
+ dangerouslySetInnerHTML: {
+ __html: setInnerHtml
+ }
+ });
};
-ColumnHeader.defaultProps = {
- item: []
+Paragraph.defaultProps = {
+ color: 'black',
+ size: 1,
+ weight: 'regular',
+ maxWidth: 'md'
+};
+Paragraph.propTypes = {
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights),
+ maxWidth: PropTypes__default['default'].oneOf(['sm', 'md', 'lg']),
+ setInnerHtml: PropTypes__default['default'].string
};
-var Input = function Input(_ref) {
- var autoFocus = _ref.autoFocus,
- disabled = _ref.disabled,
- invalid = _ref.invalid,
- label = _ref.label,
- onEnter = _ref.onEnter,
- setValue = _ref.setValue,
- type = _ref.type,
- value = _ref.value,
- warning = _ref.warning;
+var Byline = function Byline(props) {
+ var _classnames;
- var KeyDown = function KeyDown(_ref2) {
- var key = _ref2.key;
- return key === 'Enter' && onEnter && onEnter();
- };
-
- var Label = function Label() {
- return /*#__PURE__*/React__default.createElement("p", {
- className: 'label'
- }, label && label);
- };
-
- var Warning = function Warning() {
- return /*#__PURE__*/React__default.createElement("p", {
- className: 'warning'
- }, warning && invalid ? warning : ' ');
- };
-
- var props = {
- autoFocus: autoFocus,
- defaultValue: value,
- disabled: disabled,
- onChange: function onChange(_ref3) {
- var target = _ref3.target;
- return setValue(target.value);
- },
- onKeyDown: KeyDown,
- type: type
- };
- return /*#__PURE__*/React__default.createElement("div", {
- className: "form-field ".concat(invalid ? 'invalid' : '', " ").concat(type)
- }, /*#__PURE__*/React__default.createElement(Label, null), type === 'textarea' && /*#__PURE__*/React__default.createElement("textarea", props), type !== 'textarea' && /*#__PURE__*/React__default.createElement("input", props), /*#__PURE__*/React__default.createElement(Warning, null));
-};
-
-Input.propTypes = {
- autoFocus: PropTypes.bool,
- disabled: PropTypes.bool,
- invalid: PropTypes.bool,
- label: PropTypes.string,
- onEnter: PropTypes.func,
- setValue: PropTypes.func.isRequired,
- type: PropTypes.string,
- value: PropTypes.string.isRequired,
- warning: PropTypes.string
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Byline-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-Input.defaultProps = {
- autofocus: false,
- disabled: 'disabled',
- invalid: false,
- type: 'text'
+Byline.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-var index = {
- Input: Input
+Byline.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var Image$1 = function Image(_ref) {
- var content = _ref.content,
- custom = _ref.custom,
- domain = _ref.domain,
- lazy = _ref.lazy,
- placeholder = _ref.placeholder;
- var img_placeholder = placeholder || null;
-
- if (content['image-contentId']) {
- var policy_id = content['image-contentId'];
- var derivative = '2x1';
- var width = 1000;
- content['image-path'] = pathToImage(derivative, domain, policy_id, width);
- img_placeholder = img_placeholder || pathToImage(derivative, domain, policy_id, 10);
- }
-
- if (content['image-legacy']) {
- content['image-path'] = content['image-legacy'];
- content['image-subtitle'] = 'Imagem importada do sistema legado / Reprodução';
- img_placeholder = '';
- }
-
- if (content['image-path']) {
- var content_path = content['image-path'];
-
- if (lazy) {
- content_path = lazy(content_path, img_placeholder);
- }
-
- var byline = !content['image-byline'] || content['image-byline'] == 'undefined' ? null : content['image-byline'];
- var caption_byline = content['image-subtitle'] ? "".concat(content['image-subtitle']).concat(byline ? " (".concat(byline, ")") : '') : "".concat(content['image-subtitle-original']).concat(byline ? " (".concat(byline, ")") : '');
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "image-box ".concat(custom),
- w: "100p"
- }, /*#__PURE__*/React__default.createElement("img", {
- alt: caption_byline ? '$Legenda da imagem: {caption_byline}' : 'Legenda da imagem: Reprodução',
- src: content_path
- }), /*#__PURE__*/React__default.createElement(Block, {
- custom: "label"
- }, caption_byline));
- }
-
- return /*#__PURE__*/React__default.createElement("pre", null, "no-image");
-};
+var InterTitle = function InterTitle(props) {
+ var _classnames;
-Image$1.propTypes = {
- content: PropTypes.object.isRequired,
- custom: PropTypes.string,
- domain: PropTypes.string,
- lazy: PropTypes.func,
- placeholder: PropTypes.string
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-InterTitle-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-Image$1.defaultProps = {
- content: {}
+InterTitle.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-
-function SvgIcArrowBack(props) {
- return /*#__PURE__*/React.createElement("svg", _extends({
- height: 32,
- viewBox: "0 0 24 24",
- width: 32
- }, props), /*#__PURE__*/React.createElement("path", {
- d: "M0 0h24v24H0z",
- fill: "none"
- }), /*#__PURE__*/React.createElement("path", {
- d: "M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"
- }));
-}
-
-function SvgIcArrowForward(props) {
- return /*#__PURE__*/React.createElement("svg", _extends({
- height: 32,
- viewBox: "0 0 24 24",
- width: 32
- }, props), /*#__PURE__*/React.createElement("path", {
- d: "M0 0h24v24H0z",
- fill: "none"
- }), /*#__PURE__*/React.createElement("path", {
- d: "M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"
- }));
-}
-
-var RenderItem = function RenderItem(_ref) {
- var linkurl = _ref.linkurl,
- name = _ref.name,
- lead = _ref.lead,
- selected = _ref.selected,
- on = _ref.on;
- var propsGallerySelected = {
- custom: 'gallery-selected',
- w: '100p',
- mb: '2'
- };
- var propsGalleryItem = {
- custom: 'gallery-item',
- mr: '2',
- onClick: function onClick() {
- return on({
- linkurl: linkurl,
- name: name,
- lead: lead
- });
- }
- };
- var propsGallery = selected ? propsGallerySelected : propsGalleryItem;
- return /*#__PURE__*/React__default.createElement(Block, propsGallery, /*#__PURE__*/React__default.createElement("img", {
- className: "image-file",
- src: linkurl,
- alt: "".concat(name)
- }), /*#__PURE__*/React__default.createElement(Block, {
- custom: "image-name"
- }, name), /*#__PURE__*/React__default.createElement(Block, {
- custom: "image-lead"
- }, lead));
+InterTitle.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var ImageGallery = function ImageGallery(_ref2) {
- var items = _ref2.items,
- selected = _ref2.selected,
- on = _ref2.on;
- if (!items || items.length === 0) return false;
- var item_selected = selected ? selected : items[0];
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "article-image-gallery",
- w: "100p"
- }, /*#__PURE__*/React__default.createElement(Block, {
- align: "row",
- custom: "image-selected",
- w: "100p"
- }, /*#__PURE__*/React__default.createElement(RenderItem, _extends({}, item_selected, {
- selected: true,
- on: on
- }))), items.length > 1 && /*#__PURE__*/React__default.createElement(Block, {
- align: "row",
- custom: "box-list",
- w: "100p"
- }, /*#__PURE__*/React__default.createElement(Block, {
- align: "row center middle",
- custom: "arrow-left"
- }, /*#__PURE__*/React__default.createElement(SvgIcArrowBack, null)), /*#__PURE__*/React__default.createElement(Block, {
- align: "row",
- custom: "image-list",
- w: "100p"
- }, lodash.map(items, function (item, key) {
- return /*#__PURE__*/React__default.createElement(RenderItem, _extends({}, item, {
- key: key,
- on: on
- }));
- })), /*#__PURE__*/React__default.createElement(Block, {
- align: "row center middle",
- custom: "arrow-right"
- }, /*#__PURE__*/React__default.createElement(SvgIcArrowForward, null))));
-};
+var Citation = function Citation(props) {
+ var _classnames;
-ImageGallery.propTypes = {
- items: PropTypes.array,
- selected: PropTypes.shape({
- lead: PropTypes.string,
- linkUrl: PropTypes.string,
- name: PropTypes.string
- }),
- on: PropTypes.func
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Citation-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-RenderItem.propTypes = {
- linkurl: PropTypes.string,
- name: PropTypes.string,
- lead: PropTypes.string,
- selected: PropTypes.bool,
- on: PropTypes.func.isRequired
+Citation.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-ImageGallery.defaultProps = {
- selected: false,
- items: []
+Citation.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var SearchForm = function SearchForm(_ref) {
- var functions = _ref.functions,
- state = _ref.state;
- var fieldValue = state.fieldValue,
- setFieldValue = state.setFieldValue;
-
- var handleSubmit = function handleSubmit() {
- var string = fieldValue;
- string = string.normalize('NFD').replace(/([\u0300-\u036f]|[^0-9a-zA-Z\s])/g, '');
- functions.onSubmit(string);
- };
+var UrlLink = function UrlLink(props) {
+ var _classnames;
- var fieldController = {
- type: 'text',
- className: 'search-field',
- placeholder: 'O que você está procurando?',
- onChange: function onChange(event) {
- return setFieldValue(event.target.value);
- },
- onKeyPress: function onKeyPress(event) {
- return event.key === 'Enter' && handleSubmit();
- }
- };
- return /*#__PURE__*/React__default.createElement(Block, {
- align: "right",
- custom: 'search-form'
- }, /*#__PURE__*/React__default.createElement("input", fieldController), /*#__PURE__*/React__default.createElement(Button, {
- disabled: false,
- onClick: function onClick() {
- return handleSubmit();
- }
- }, "Buscar"));
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-UrlLink-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("a", {
+ className: classes,
+ style: style
+ }, children);
};
-
-SearchForm.propTypes = {
- content: PropTypes.object.isRequired,
- functions: PropTypes.shape({
- onSubmit: PropTypes.func
- }),
- state: PropTypes.shape({
- fieldValue: PropTypes.string,
- setFieldValue: PropTypes.func
- })
+UrlLink.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-SearchForm.defaultProps = {
- content: {},
- functions: {
- onSubmit: function onSubmit() {
- return null;
- }
- },
- state: {
- fieldValue: '',
- setFieldValue: function setFieldValue() {
- return null;
- }
- }
+UrlLink.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var SearchMenu = function SearchMenu(_ref) {
- var children = _ref.children,
- functions = _ref.functions,
- status = _ref.status;
- var menuIsOpen = status.opened ? 'opened' : 'closed';
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "menu-modal ".concat(menuIsOpen)
- }, /*#__PURE__*/React__default.createElement(Block, {
- custom: "menu-opacity",
- onClick: functions.onCloseModal
- }), /*#__PURE__*/React__default.createElement(Block, {
- bg: "color-neutral-10",
- custom: "menu-right",
- p: "4"
- }, children && children));
-};
+var TagTypography = function TagTypography(props) {
+ var _classnames;
-SearchMenu.propTypes = {
- children: PropTypes.node,
- content: PropTypes.object.isRequired,
- functions: PropTypes.shape({
- onCloseModal: PropTypes.func
- }),
- status: PropTypes.shape({
- opened: PropTypes.bool
- })
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Tag-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("p", {
+ className: classes,
+ style: style
+ }, children);
};
-SearchMenu.defaultProps = {
- content: {},
- functions: {
- onCloseModal: function onCloseModal() {
- return null;
- }
- },
- status: {
- opened: false
- }
+TagTypography.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-
-var SideMenu = function SideMenu(_ref) {
- var children = _ref.children,
- functions = _ref.functions,
- status = _ref.status;
- var menuIsOpen = status.opened ? 'opened' : 'closed';
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "menu-modal ".concat(menuIsOpen)
- }, /*#__PURE__*/React__default.createElement(Block, {
- custom: "menu-opacity",
- onClick: functions.onCloseModal
- }), /*#__PURE__*/React__default.createElement(Block, {
- bg: "color-white",
- custom: "menu-left",
- p: "4"
- }, children && children));
+TagTypography.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-SideMenu.propTypes = {
- children: PropTypes.node,
- content: PropTypes.object.isRequired,
- functions: PropTypes.shape({
- onCloseModal: PropTypes.func
- }),
- status: PropTypes.shape({
- opened: PropTypes.bool
- })
+var SectionTitle = function SectionTitle(_ref) {
+ var _classnames;
+
+ var className = _ref.className,
+ children = _ref.children,
+ color = _ref.color,
+ gutter = _ref.gutter,
+ style = _ref.style,
+ size = _ref.size,
+ uppercase = _ref.uppercase,
+ weight = _ref.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-SectionTitle-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " mb-").concat(gutter), true), _defineProperty(_classnames, 'uppercase', uppercase), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h1", {
+ className: classes,
+ style: style
+ }, children);
};
-SideMenu.defaultProps = {
- content: {},
- functions: {
- onCloseModal: function onCloseModal() {
- return null;
- }
- },
- status: {
- opened: false
- }
+SectionTitle.defaultProps = {
+ color: 'primary-1',
+ gutter: 1,
+ size: 1,
+ weight: 'regular',
+ uppercase: true
+};
+SectionTitle.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ uppercase: PropTypes__default['default'].bool,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-function SvgIcArrowMenu(props) {
- return /*#__PURE__*/React.createElement("svg", _extends({
- height: 24,
- width: 24
- }, props), /*#__PURE__*/React.createElement("path", {
- d: "M0 0h24v24H0V0z",
- fill: "none"
- }), /*#__PURE__*/React.createElement("path", {
- d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
- }));
-}
-
-var SideMenuItems = function SideMenuItems(_ref) {
- var content = _ref.content,
- functions = _ref.functions;
-
- var Item = function Item(_ref2) {
- var item = _ref2.item;
- var hasSubitems = item.subitems.length > 0;
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "sidemenu-group",
- mb: "3"
- }, /*#__PURE__*/React__default.createElement(Block, {
- custom: "sidemenu-group-item",
- pb: "2",
- align: "row between middle",
- onClick: function onClick() {
- return functions.onMenuItem(item);
- }
- }, !hasSubitems ? /*#__PURE__*/React__default.createElement("a", {
- href: item.path
- }, item.name) : /*#__PURE__*/React__default.createElement("span", {
- href: item.path
- }, item.name), /*#__PURE__*/React__default.createElement(SvgIcArrowMenu, null)));
- };
+var EditorialTitle = function EditorialTitle(props) {
+ var _classnames;
- Item.propTypes = {
- item: PropTypes.object
- };
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "sidemenu-items"
- }, lodash.map(content.items, function (item, key) {
- return /*#__PURE__*/React__default.createElement(Item, {
- item: item,
- key: key
- });
- }));
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-EditorialTitle-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-
-SideMenuItems.propTypes = {
- content: PropTypes.object,
- functions: PropTypes.shape({
- onMenuItem: PropTypes.func
- })
+EditorialTitle.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-SideMenuItems.defaultProps = {
- content: {}
+EditorialTitle.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var SocialMedias = function SocialMedias(props) {
- var content = props.content;
- if (!content) return null;
- var propsSocialMedia = {
- align: 'row evenly'
- };
- var propsSocialCirlce = {
- mr: '1',
- custom: 'social-circle',
- 'md': {
- mr: '0',
- ml: '1'
- }
- };
- return /*#__PURE__*/React__default.createElement(Block, propsSocialMedia, lodash.map(content, function (item, k) {
- return /*#__PURE__*/React__default.createElement("a", {
- href: item.path,
- key: k
- }, /*#__PURE__*/React__default.createElement(Block, propsSocialCirlce, item.icon));
- }));
-};
+var ButtonTypography = function ButtonTypography(props) {
+ var _classnames;
-SocialMedias.propTypes = {
- content: PropTypes.array.isRequired
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-Button-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("p", {
+ className: classes,
+ style: style
+ }, children);
};
-
-var Topbar = function Topbar(_ref) {
- var content = _ref.content,
- functions = _ref.functions;
- var LeftContent = content.LeftContent,
- CenterContent = content.CenterContent,
- RightContent = content.RightContent;
- return /*#__PURE__*/React__default.createElement(Block, {
- align: "row center",
- bg: "color-primary-1",
- fc: "color-white",
- custom: "topbar",
- w: "100p"
- }, /*#__PURE__*/React__default.createElement(Block, {
- align: "row middle between",
- custom: "wrap",
- w: "100p"
- }, /*#__PURE__*/React__default.createElement(Block, {
- custom: "left"
- }, LeftContent && /*#__PURE__*/React__default.createElement(LeftContent, {
- functions: functions
- })), /*#__PURE__*/React__default.createElement(Block, null, CenterContent && /*#__PURE__*/React__default.createElement(CenterContent, null)), /*#__PURE__*/React__default.createElement(Block, {
- custom: "right"
- }, RightContent && /*#__PURE__*/React__default.createElement(RightContent, null))));
+ButtonTypography.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-
-var LeftMenuIcon = function LeftMenuIcon(_ref2) {
- var functions = _ref2.functions;
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "menu-left-icon",
- cursor: "pointer",
- fc: "color-neutral-8",
- pl: "4",
- onClick: functions.handleMenuClick
- }, "MENU");
+ButtonTypography.propTypes = {
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].object, PropTypes__default['default'].array]),
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-LeftMenuIcon.propTypes = {
- functions: PropTypes.shape({
- handleMenuClick: PropTypes.func
- })
+var MostReadNumber = function MostReadNumber(props) {
+ var _classnames;
+
+ var className = props.className,
+ children = props.children,
+ color = props.color,
+ style = props.style,
+ size = props.size,
+ weight = props.weight;
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-MostReadNumber-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("span", {
+ className: classes,
+ style: style
+ }, children);
};
-Topbar.propTypes = {
- content: PropTypes.object.isRequired,
- functions: PropTypes.shape({
- handleMenuClick: PropTypes.func
- })
+MostReadNumber.defaultProps = {
+ color: 'primary-1',
+ size: 1,
+ weight: 'regular'
};
-Topbar.defaultProps = {
- content: {
- LeftContent: LeftMenuIcon
- }
+MostReadNumber.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var colors = [
- "primary-1",
- "primary-2",
- "primary-3",
- "secondary-1",
- "secondary-2",
- "secondary-3",
- "editorial-1",
- "editorial-2",
- "editorial-3",
- "editorial-4",
- "editorial-5",
- "black:",
- "neutral-1",
- "neutral-2",
- "neutral-3",
- "neutral-4",
- "neutral-5",
- "neutral-6",
- "neutral-7",
- "neutral-8",
- "neutral-9",
- "neutral-10",
- "neutral-11",
- "white:",
- "ads",
- "success-1",
- "success-2",
- "success-3",
- "error-1",
- "error-2",
- "error-3"
-];
-
-var SubjectTypography = function SubjectTypography(props) {
+var MenuSideTitle = function MenuSideTitle(props) {
var _classnames;
var className = props.className,
@@ -837,29 +648,29 @@ var SubjectTypography = function SubjectTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Subject-root': true
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-MenuSideTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
};
-SubjectTypography.defaultProps = {
+MenuSideTitle.defaultProps = {
color: 'primary-1',
size: 1,
weight: 'regular'
};
-SubjectTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+MenuSideTitle.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var NewsTitle = function NewsTitle(props) {
+var MenuSideItem = function MenuSideItem(props) {
var _classnames;
var className = props.className,
@@ -868,29 +679,29 @@ var NewsTitle = function NewsTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-NewsTitle-root': true
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-MenuSideItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("h2", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
};
-NewsTitle.defaultProps = {
+MenuSideItem.defaultProps = {
color: 'primary-1',
size: 1,
weight: 'regular'
};
-NewsTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+MenuSideItem.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var Subtitle = function Subtitle(props) {
+var MenuTopItem = function MenuTopItem(props) {
var _classnames;
var className = props.className,
@@ -899,485 +710,715 @@ var Subtitle = function Subtitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Subtitle-root': true
+ var classes = classnames__default['default']((_classnames = {
+ 'Typography-MenuTopItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("h3", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
};
-Subtitle.defaultProps = {
+MenuTopItem.defaultProps = {
color: 'primary-1',
size: 1,
weight: 'regular'
};
-Subtitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+MenuTopItem.propTypes = {
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
+};
+
+var Button = function Button(_ref) {
+ var _classnames;
+
+ var children = _ref.children,
+ className = _ref.className,
+ color = _ref.color,
+ disabled = _ref.disabled,
+ fontColor = _ref.fontColor,
+ fullWidth = _ref.fullWidth,
+ leftIcon = _ref.leftIcon,
+ onClick = _ref.onClick,
+ radius = _ref.radius,
+ rightIcon = _ref.rightIcon,
+ size = _ref.size,
+ style = _ref.style,
+ variant = _ref.variant,
+ weight = _ref.weight;
+ var getClass = classnames__default['default']((_classnames = {
+ 'Prensa-Button-root': true
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(variant, " color-").concat(color, " radius-").concat(radius), true), _defineProperty(_classnames, 'disabled', disabled), _defineProperty(_classnames, 'fullWidth', fullWidth), _defineProperty(_classnames, 'has-leftIcon', leftIcon), _defineProperty(_classnames, 'has-rightIcon', rightIcon), _defineProperty(_classnames, "".concat(className), className), _classnames));
+
+ var getFontColor = function getFontColor() {
+ if (fontColor) return fontColor;
+
+ if (variant === 'outlined') {
+ if (disabled) return 'neutral-8';
+ return color;
+ }
+
+ return 'white';
+ };
+
+ return /*#__PURE__*/React__default['default'].createElement("button", {
+ className: getClass,
+ disabled: disabled,
+ onClick: !disabled && onClick,
+ style: style
+ }, /*#__PURE__*/React__default['default'].createElement(ButtonTypography, {
+ color: getFontColor(),
+ weight: weight
+ }, leftIcon && leftIcon, children, rightIcon && rightIcon));
+};
+
+Button.propTypes = {
+ /**
+ * Permite a estilização do componente
+ */
+ className: PropTypes__default['default'].string,
+ children: PropTypes__default['default'].node,
+ disabled: PropTypes__default['default'].bool,
+ fullWidth: PropTypes__default['default'].bool,
+ leftIcon: PropTypes__default['default'].oneOfType([PropTypes__default['default'].object, PropTypes__default['default'].element]),
+ onClick: PropTypes__default['default'].func,
+ variant: PropTypes__default['default'].oneOf(['filled', 'outlined']),
+ color: PropTypes__default['default'].oneOf(colors),
+ fontColor: PropTypes__default['default'].oneOf(colors),
+ radius: PropTypes__default['default'].oneOf([false, 'default', 'alternative']),
+ rightIcon: PropTypes__default['default'].oneOf([PropTypes__default['default'].object, PropTypes__default['default'].element]),
+ size: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
+};
+Button.defaultProps = {
+ disabled: false,
+ variant: 'filled',
+ color: 'primary-1',
+ radius: 'default',
+ size: 1,
+ weight: 'regular'
+};
+
+var pathToImage = function pathToImage(derivative, domain, policy_id, width) {
+ if (!policy_id) return null;
+ var w = width || 1000;
+ var r = domain || 'https://costanorte.com.br';
+ var d = derivative || '2x1';
+ var id = policy_id.split('.');
+ var string = id.length > 2 ? "".concat(policy_id, ":").concat(id[2]) : "".concat(policy_id);
+ var path = "".concat(r, "/image/policy:").concat(string, "/image.jpg?f=").concat(d, "&w=").concat(w);
+ return path;
+};
+
+var Image = function Image(_ref) {
+ var children = _ref.children,
+ content = _ref.content,
+ custom = _ref.custom,
+ domain = _ref.domain,
+ height = _ref.height,
+ lazy = _ref.lazy,
+ placeholder = _ref.placeholder;
+ var img_placeholder = placeholder || null;
+
+ if (content['image-contentId']) {
+ var policy_id = content['image-contentId'];
+ var derivative = '2x1';
+ var width = 1000;
+ content['image-path'] = pathToImage(derivative, domain, policy_id, width);
+ img_placeholder = img_placeholder || pathToImage(derivative, domain, policy_id, 10);
+ }
+
+ var content_path = content['image-path'];
+ var image_style;
+
+ if (lazy) {
+ image_style = {
+ backgroundImage: "url(".concat(lazy(content_path, img_placeholder), ")")
+ };
+ } else {
+ image_style = {
+ backgroundImage: "url(".concat(content_path, ")")
+ };
+ }
+
+ if (height) {
+ image_style.height = height;
+ }
+
+ return /*#__PURE__*/React__default['default'].createElement("div", {
+ className: "image-background ".concat(custom || ''),
+ style: image_style
+ }, children && children);
+};
+
+Image.propTypes = {
+ children: PropTypes__default['default'].node,
+ content: PropTypes__default['default'].object.isRequired,
+ custom: PropTypes__default['default'].string,
+ domain: PropTypes__default['default'].string,
+ height: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ placeholder: PropTypes__default['default'].string
+};
+Image.defaultProps = {
+ content: {}
+};
+
+var ColumnHeader = function ColumnHeader(_ref) {
+ var domain = _ref.domain,
+ item = _ref.item;
+ if (!item) return null;
+ var path = '';
+ var image = item['column-image'] && item['column-image']['image-contentId'] && item['column-image'];
+ var column_name = item['column-name'];
+ var column_description = item['column-desc'];
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row",
+ custom: "column-header",
+ mb: "3",
+ p: "3",
+ w: "100p-6"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, null, /*#__PURE__*/React__default['default'].createElement("a", {
+ className: "teaser-aria",
+ href: path,
+ "aria-label": "Imagem do colunista ".concat(column_name)
+ }, /*#__PURE__*/React__default['default'].createElement(Image, {
+ domain: domain,
+ content: image
+ }))), /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "middle",
+ ml: "2"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "title"
+ }, column_name), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "subtitle"
+ }, column_description)));
};
-var Date$1 = function Date(props) {
- var _classnames;
-
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Date-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
-};
-Date$1.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+ColumnHeader.propTypes = {
+ domain: PropTypes__default['default'].string,
+ item: PropTypes__default['default'].object
};
-Date$1.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ColumnHeader.defaultProps = {
+ item: []
};
-var Author = function Author(props) {
- var _classnames;
+var Input = function Input(_ref) {
+ var autoFocus = _ref.autoFocus,
+ disabled = _ref.disabled,
+ invalid = _ref.invalid,
+ label = _ref.label,
+ onEnter = _ref.onEnter,
+ setValue = _ref.setValue,
+ type = _ref.type,
+ value = _ref.value,
+ warning = _ref.warning;
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Author-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
-};
-Author.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
-};
-Author.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
-};
+ var KeyDown = function KeyDown(_ref2) {
+ var key = _ref2.key;
+ return key === 'Enter' && onEnter && onEnter();
+ };
-var Paragraph = function Paragraph(props) {
- var _classnames;
+ var Label = function Label() {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
+ className: 'label'
+ }, label && label);
+ };
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
- 'Typography-Paragraph-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("p", {
- className: classes,
- style: style
- }, children);
-};
-Paragraph.defaultProps = {
- color: 'black',
- size: 1
-};
-Paragraph.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
-};
+ var Warning = function Warning() {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
+ className: 'warning'
+ }, warning && invalid ? warning : ' ');
+ };
-var Byline = function Byline(props) {
- var _classnames;
+ var props = {
+ autoFocus: autoFocus,
+ defaultValue: value,
+ disabled: disabled,
+ onChange: function onChange(_ref3) {
+ var target = _ref3.target;
+ return setValue(target.value);
+ },
+ onKeyDown: KeyDown,
+ type: type
+ };
+ return /*#__PURE__*/React__default['default'].createElement("div", {
+ className: "form-field ".concat(invalid ? 'invalid' : '', " ").concat(type)
+ }, /*#__PURE__*/React__default['default'].createElement(Label, null), type === 'textarea' && /*#__PURE__*/React__default['default'].createElement("textarea", props), type !== 'textarea' && /*#__PURE__*/React__default['default'].createElement("input", props), /*#__PURE__*/React__default['default'].createElement(Warning, null));
+};
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Byline-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
+Input.propTypes = {
+ autoFocus: PropTypes__default['default'].bool,
+ disabled: PropTypes__default['default'].bool,
+ invalid: PropTypes__default['default'].bool,
+ label: PropTypes__default['default'].string,
+ onEnter: PropTypes__default['default'].func,
+ setValue: PropTypes__default['default'].func.isRequired,
+ type: PropTypes__default['default'].string,
+ value: PropTypes__default['default'].string.isRequired,
+ warning: PropTypes__default['default'].string
};
-Byline.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+Input.defaultProps = {
+ autofocus: false,
+ disabled: 'disabled',
+ invalid: false,
+ type: 'text'
};
-Byline.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+var index = {
+ Input: Input
};
-var InterTitle = function InterTitle(props) {
- var _classnames;
+var Image$1 = function Image(_ref) {
+ var content = _ref.content,
+ custom = _ref.custom,
+ domain = _ref.domain,
+ lazy = _ref.lazy,
+ placeholder = _ref.placeholder;
+ var img_placeholder = placeholder || null;
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-InterTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
+ if (content['image-contentId']) {
+ var policy_id = content['image-contentId'];
+ var derivative = '2x1';
+ var width = 1000;
+ content['image-path'] = pathToImage(derivative, domain, policy_id, width);
+ img_placeholder = img_placeholder || pathToImage(derivative, domain, policy_id, 10);
+ }
+
+ if (content['image-legacy']) {
+ content['image-path'] = content['image-legacy'];
+ content['image-subtitle'] = 'Imagem importada do sistema legado / Reprodução';
+ img_placeholder = '';
+ }
+
+ if (content['image-path']) {
+ var content_path = content['image-path'];
+
+ if (lazy) {
+ content_path = lazy(content_path, img_placeholder);
+ }
+
+ var byline = !content['image-byline'] || content['image-byline'] == 'undefined' ? null : content['image-byline'];
+ var caption_byline = content['image-subtitle'] ? "".concat(content['image-subtitle']).concat(byline ? " (".concat(byline, ")") : '') : "".concat(content['image-subtitle-original']).concat(byline ? " (".concat(byline, ")") : '');
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "image-box ".concat(custom),
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement("img", {
+ alt: caption_byline ? '$Legenda da imagem: {caption_byline}' : 'Legenda da imagem: Reprodução',
+ src: content_path
+ }), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "label"
+ }, caption_byline));
+ }
+
+ return /*#__PURE__*/React__default['default'].createElement("pre", null, "no-image");
};
-InterTitle.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+
+Image$1.propTypes = {
+ content: PropTypes__default['default'].object.isRequired,
+ custom: PropTypes__default['default'].string,
+ domain: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ placeholder: PropTypes__default['default'].string
};
-InterTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+Image$1.defaultProps = {
+ content: {}
};
-var Citation = function Citation(props) {
- var _classnames;
+function SvgIcArrowBack(props) {
+ return /*#__PURE__*/React.createElement("svg", _extends({
+ height: 32,
+ viewBox: "0 0 24 24",
+ width: 32
+ }, props), /*#__PURE__*/React.createElement("path", {
+ d: "M0 0h24v24H0z",
+ fill: "none"
+ }), /*#__PURE__*/React.createElement("path", {
+ d: "M11.67 3.87L9.9 2.1 0 12l9.9 9.9 1.77-1.77L3.54 12z"
+ }));
+}
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Citation-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
-};
-Citation.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
-};
-Citation.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+function SvgIcArrowForward(props) {
+ return /*#__PURE__*/React.createElement("svg", _extends({
+ height: 32,
+ viewBox: "0 0 24 24",
+ width: 32
+ }, props), /*#__PURE__*/React.createElement("path", {
+ d: "M0 0h24v24H0z",
+ fill: "none"
+ }), /*#__PURE__*/React.createElement("path", {
+ d: "M5.88 4.12L13.76 12l-7.88 7.88L8 22l10-10L8 2z"
+ }));
+}
+
+var RenderItem = function RenderItem(_ref) {
+ var linkurl = _ref.linkurl,
+ name = _ref.name,
+ lead = _ref.lead,
+ selected = _ref.selected,
+ on = _ref.on;
+ var propsGallerySelected = {
+ custom: 'gallery-selected',
+ w: '100p',
+ mb: '2'
+ };
+ var propsGalleryItem = {
+ custom: 'gallery-item',
+ mr: '2',
+ onClick: function onClick() {
+ return on({
+ linkurl: linkurl,
+ name: name,
+ lead: lead
+ });
+ }
+ };
+ var propsGallery = selected ? propsGallerySelected : propsGalleryItem;
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsGallery, /*#__PURE__*/React__default['default'].createElement("img", {
+ className: "image-file",
+ src: linkurl,
+ alt: "".concat(name)
+ }), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "image-name"
+ }, name), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "image-lead"
+ }, lead));
};
-var UrlLink = function UrlLink(props) {
- var _classnames;
-
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-UrlLink-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("a", {
- className: classes,
- style: style
- }, children);
-};
-UrlLink.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
-};
-UrlLink.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+var ImageGallery = function ImageGallery(_ref2) {
+ var items = _ref2.items,
+ selected = _ref2.selected,
+ on = _ref2.on;
+ if (!items || items.length === 0) return false;
+ var item_selected = selected ? selected : items[0];
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "article-image-gallery",
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row",
+ custom: "image-selected",
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement(RenderItem, _extends({}, item_selected, {
+ selected: true,
+ on: on
+ }))), items.length > 1 && /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row",
+ custom: "box-list",
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row center middle",
+ custom: "arrow-left"
+ }, /*#__PURE__*/React__default['default'].createElement(SvgIcArrowBack, null)), /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row",
+ custom: "image-list",
+ w: "100p"
+ }, lodash.map(items, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(RenderItem, _extends({}, item, {
+ key: key,
+ on: on
+ }));
+ })), /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row center middle",
+ custom: "arrow-right"
+ }, /*#__PURE__*/React__default['default'].createElement(SvgIcArrowForward, null))));
};
-var TagTypography = function TagTypography(props) {
- var _classnames;
-
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Tag-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("p", {
- className: classes,
- style: style
- }, children);
+ImageGallery.propTypes = {
+ items: PropTypes__default['default'].array,
+ selected: PropTypes__default['default'].shape({
+ lead: PropTypes__default['default'].string,
+ linkUrl: PropTypes__default['default'].string,
+ name: PropTypes__default['default'].string
+ }),
+ on: PropTypes__default['default'].func
};
-TagTypography.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+RenderItem.propTypes = {
+ linkurl: PropTypes__default['default'].string,
+ name: PropTypes__default['default'].string,
+ lead: PropTypes__default['default'].string,
+ selected: PropTypes__default['default'].bool,
+ on: PropTypes__default['default'].func.isRequired
};
-TagTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ImageGallery.defaultProps = {
+ selected: false,
+ items: []
};
-var SectionTitle = function SectionTitle(props) {
- var _classnames;
-
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
- 'Typography-SectionTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
-};
-SectionTitle.defaultProps = {
- color: 'primary-1',
- size: 1
-};
-SectionTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
-};
+var SearchForm = function SearchForm(_ref) {
+ var functions = _ref.functions,
+ state = _ref.state,
+ buttonSize = _ref.buttonSize,
+ buttonWeight = _ref.buttonWeight,
+ buttonColor = _ref.buttonColor;
+ var fieldValue = state.fieldValue,
+ setFieldValue = state.setFieldValue;
-var EditorialTitle = function EditorialTitle(props) {
- var _classnames;
+ var handleSubmit = function handleSubmit() {
+ var string = fieldValue;
+ string = string.normalize('NFD').replace(/([\u0300-\u036f]|[^0-9a-zA-Z\s])/g, '');
+ functions.onSubmit(string);
+ };
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-EditorialTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
+ var fieldController = {
+ type: 'text',
+ className: 'search-field',
+ placeholder: 'O que você está procurando?',
+ onChange: function onChange(event) {
+ return setFieldValue(event.target.value);
+ },
+ onKeyPress: function onKeyPress(event) {
+ return event.key === 'Enter' && handleSubmit();
+ }
+ };
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "right",
+ custom: 'search-form'
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ mb: "1",
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement("input", fieldController)), /*#__PURE__*/React__default['default'].createElement(Button, {
+ disabled: false,
+ size: buttonSize,
+ weight: buttonWeight,
+ color: buttonColor,
+ onClick: function onClick() {
+ return handleSubmit();
+ }
+ }, "Buscar"));
};
-EditorialTitle.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+
+SearchForm.propTypes = {
+ buttonSize: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5]),
+ buttonWeight: PropTypes__default['default'].oneOf(weights),
+ buttonColor: PropTypes__default['default'].oneOf(colors),
+ content: PropTypes__default['default'].object.isRequired,
+ functions: PropTypes__default['default'].shape({
+ onSubmit: PropTypes__default['default'].func
+ }),
+ state: PropTypes__default['default'].shape({
+ fieldValue: PropTypes__default['default'].string,
+ setFieldValue: PropTypes__default['default'].func
+ })
};
-EditorialTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+SearchForm.defaultProps = {
+ content: {},
+ functions: {
+ onSubmit: function onSubmit() {
+ return null;
+ }
+ },
+ state: {
+ fieldValue: '',
+ setFieldValue: function setFieldValue() {
+ return null;
+ }
+ }
};
-var ButtonTypography = function ButtonTypography(props) {
- var _classnames;
-
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-Button-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("p", {
- className: classes,
- style: style
- }, children);
+var SearchMenu = function SearchMenu(_ref) {
+ var children = _ref.children,
+ functions = _ref.functions,
+ status = _ref.status;
+ var menuIsOpen = status.opened ? 'opened' : 'closed';
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "menu-modal ".concat(menuIsOpen)
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "menu-opacity",
+ onClick: functions.onCloseModal
+ }), /*#__PURE__*/React__default['default'].createElement(Block, {
+ bg: "neutral-10",
+ custom: "menu-right",
+ p: "4"
+ }, children && children));
};
-ButtonTypography.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+
+SearchMenu.propTypes = {
+ children: PropTypes__default['default'].node,
+ content: PropTypes__default['default'].object.isRequired,
+ functions: PropTypes__default['default'].shape({
+ onCloseModal: PropTypes__default['default'].func
+ }),
+ status: PropTypes__default['default'].shape({
+ opened: PropTypes__default['default'].bool
+ })
};
-ButtonTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+SearchMenu.defaultProps = {
+ content: {},
+ functions: {
+ onCloseModal: function onCloseModal() {
+ return null;
+ }
+ },
+ status: {
+ opened: false
+ }
};
-var MostReadNumber = function MostReadNumber(props) {
- var _classnames;
-
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-MostReadNumber-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
+var SideMenu = function SideMenu(_ref) {
+ var children = _ref.children,
+ functions = _ref.functions,
+ status = _ref.status;
+ var menuIsOpen = status.opened ? 'opened' : 'closed';
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "menu-modal ".concat(menuIsOpen)
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "menu-opacity",
+ onClick: functions.onCloseModal
+ }), /*#__PURE__*/React__default['default'].createElement(Block, {
+ bg: "white",
+ custom: "menu-left",
+ p: "4"
+ }, children && children));
};
-MostReadNumber.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+
+SideMenu.propTypes = {
+ children: PropTypes__default['default'].node,
+ content: PropTypes__default['default'].object.isRequired,
+ functions: PropTypes__default['default'].shape({
+ onCloseModal: PropTypes__default['default'].func
+ }),
+ status: PropTypes__default['default'].shape({
+ opened: PropTypes__default['default'].bool
+ })
};
-MostReadNumber.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+SideMenu.defaultProps = {
+ content: {},
+ functions: {
+ onCloseModal: function onCloseModal() {
+ return null;
+ }
+ },
+ status: {
+ opened: false
+ }
};
-var MenuSideTitle = function MenuSideTitle(props) {
- var _classnames;
+function SvgIcArrowMenu(props) {
+ return /*#__PURE__*/React.createElement("svg", _extends({
+ height: 24,
+ width: 24
+ }, props), /*#__PURE__*/React.createElement("path", {
+ d: "M0 0h24v24H0V0z",
+ fill: "none"
+ }), /*#__PURE__*/React.createElement("path", {
+ d: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z"
+ }));
+}
+
+var SideMenuItems = function SideMenuItems(_ref) {
+ var content = _ref.content,
+ functions = _ref.functions;
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-MenuSideTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
-};
-MenuSideTitle.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
-};
-MenuSideTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
-};
+ var Item = function Item(_ref2) {
+ var item = _ref2.item;
+ var hasSubitems = item.subitems.length > 0;
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "sidemenu-group",
+ mb: "3"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "sidemenu-group-item",
+ pb: "2",
+ align: "row between middle",
+ onClick: function onClick() {
+ return functions.onMenuItem(item);
+ }
+ }, !hasSubitems ? /*#__PURE__*/React__default['default'].createElement("a", {
+ href: item.path
+ }, item.name) : /*#__PURE__*/React__default['default'].createElement("span", {
+ href: item.path
+ }, item.name), /*#__PURE__*/React__default['default'].createElement(SvgIcArrowMenu, null)));
+ };
-var MenuSideItem = function MenuSideItem(props) {
- var _classnames;
+ Item.propTypes = {
+ item: PropTypes__default['default'].object
+ };
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "sidemenu-items"
+ }, lodash.map(content.items, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(Item, {
+ item: item,
+ key: key
+ });
+ }));
+};
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-MenuSideItem-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
+SideMenuItems.propTypes = {
+ content: PropTypes__default['default'].object,
+ functions: PropTypes__default['default'].shape({
+ onMenuItem: PropTypes__default['default'].func
+ })
};
-MenuSideItem.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+SideMenuItems.defaultProps = {
+ content: {}
};
-MenuSideItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+
+var SocialMedias = function SocialMedias(props) {
+ var content = props.content;
+ if (!content) return null;
+ var propsSocialMedia = {
+ align: 'row evenly'
+ };
+ var propsSocialCirlce = {
+ mr: '1',
+ custom: 'social-circle',
+ 'md': {
+ mr: '0',
+ ml: '1'
+ }
+ };
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsSocialMedia, lodash.map(content, function (item, k) {
+ return /*#__PURE__*/React__default['default'].createElement("a", {
+ href: item.path,
+ key: k
+ }, /*#__PURE__*/React__default['default'].createElement(Block, propsSocialCirlce, item.icon));
+ }));
};
-var MenuTopItem = function MenuTopItem(props) {
- var _classnames;
+SocialMedias.propTypes = {
+ content: PropTypes__default['default'].array.isRequired
+};
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
- 'Typography-MenuTopItem-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React__default.createElement("span", {
- className: classes,
- style: style
- }, children);
+var Topbar = function Topbar(_ref) {
+ var content = _ref.content,
+ theme = _ref.theme;
+ var leftContent = content.leftContent,
+ centerContent = content.centerContent,
+ rightContent = content.rightContent;
+ var color = theme.color;
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row center",
+ bg: color,
+ fc: "white",
+ custom: "Topbar-Prensa-root",
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ align: "row middle between",
+ custom: "wrap",
+ w: "100p"
+ }, /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "left"
+ }, leftContent && leftContent), /*#__PURE__*/React__default['default'].createElement(Block, null, centerContent && centerContent), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "right"
+ }, rightContent && rightContent)));
};
-MenuTopItem.defaultProps = {
- color: 'primary-1',
- size: 1,
- weight: 'regular'
+
+Topbar.propTypes = {
+ content: PropTypes__default['default'].shape({
+ leftContent: PropTypes__default['default'].object,
+ centerContent: PropTypes__default['default'].object,
+ rightContent: PropTypes__default['default'].object
+ }),
+ theme: PropTypes__default['default'].shape({
+ color: PropTypes__default['default'].oneOf(colors)
+ })
};
-MenuTopItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+Topbar.defaultProps = {
+ theme: {
+ color: 'primary-1'
+ }
};
var Subject = function Subject(props) {
@@ -1388,18 +1429,20 @@ var Subject = function Subject(props) {
className = props.className,
style = props.style,
size = props.size,
- filled = props.filled;
+ filled = props.filled,
+ weight = props.weight;
if (!children) return null;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Prensa-Subject-root': true,
'filled': filled
}, _defineProperty(_classnames, "color-".concat(color), true), _defineProperty(_classnames, "".concat(className), className), _classnames));
- return /*#__PURE__*/React__default.createElement("div", {
+ return /*#__PURE__*/React__default['default'].createElement("div", {
className: classes,
style: style
- }, /*#__PURE__*/React__default.createElement(SubjectTypography, {
+ }, /*#__PURE__*/React__default['default'].createElement(SubjectTypography, {
size: size,
- color: filled ? 'color-white' : color
+ color: filled ? 'white' : color,
+ weight: weight
}, children));
};
@@ -1409,334 +1452,13 @@ Subject.defaultProps = {
size: 1
};
Subject.propTypes = {
- children: PropTypes.string.isRequired,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- filled: PropTypes.bool,
- style: PropTypes.object,
- size: PropTypes.oneOf([1, 2, 3])
-};
-
-var Tags = function Tags(props) {
- var custom = props.custom,
- content = props.content,
- _onClick = props.onClick;
-
- var renderTag = function renderTag(tag, k) {
- return /*#__PURE__*/React__default.createElement("div", {
- key: k,
- className: "tag",
- onClick: function onClick() {
- return _onClick(tag);
- }
- }, /*#__PURE__*/React__default.createElement(TagTypography, {
- color: "primary-1"
- }, tag));
- };
-
- var propsWrap = _objectSpread2({
- align: 'row wrap',
- w: '100p'
- }, custom);
-
- return /*#__PURE__*/React__default.createElement(Block, propsWrap, lodash.map(content, function (item, k) {
- return renderTag(item, k);
- }));
-};
-
-Tags.propTypes = {
- custom: PropTypes.string,
- content: PropTypes.array.isRequired,
- onClick: PropTypes.func.isRequired
-};
-
-var parseBody = function parseBody(content) {
- var bodyItems = [];
- var tagItems = [];
-
- var renderChildValue = function renderChildValue(child) {
- return child && child.length > 0 && child[0].text;
- };
-
- var switchNode = function switchNode(obj) {
- var attr = obj.attr,
- child = obj.child,
- node = obj.node,
- tag = obj.tag,
- text = obj.text;
-
- if (tag === 'p' || tag === 'br') {
- tagItems.push({
- 'type': 'p',
- 'value': ''
- });
- } // if(tag === 'span') {}
-
-
- if (tag === 'strong') {
- tagItems.push({
- 'type': 'text',
- 'value': "".concat(renderChildValue(child), "")
- });
- return true;
- }
-
- if (tag === 'em') {
- tagItems.push({
- 'type': 'text',
- 'value': "".concat(renderChildValue(child), "")
- });
- return true;
- }
-
- if (node === 'text') {
- if (text && text != '') {
- tagItems.push({
- 'type': 'text',
- 'value': text
- });
- }
- } // render image
-
-
- if (tag === 'a' && attr["class"] && attr["class"] === 'p-smartembed') {
- var childImage = lodash.find(child, {
- tag: 'img'
- });
-
- if (childImage) {
- var subtitle = childImage && childImage.attr && childImage.attr['alt'] ? childImage.attr['alt'].toString() : '';
- subtitle = subtitle && subtitle !== undefined && subtitle !== 'undefined' ? subtitle : 'Reprodução';
- var propsImage = {
- 'image-contentId': attr['data-onecms-id'].replace('policy:', ''),
- 'image-subtitle': subtitle,
- 'image-byline': ''
- };
- tagItems.push({
- type: 'Image',
- value: propsImage
- });
- return true;
- } // embeds
-
- } else if (tag === 'img' && attr && attr.src && attr.src.startsWith('/legacy/image')) {
- // let source = attr.src.startsWith('/legacy/image')
- // if(source) {
- tagItems.push({
- type: 'ImageLegacy',
- value: {
- 'image-legacy': attr.src
- }
- });
- return true; // }
- } else if (tag === 'a' && attr.href && !attr["class"] && attr.href !== '') {
- if (attr['href'].indexOf('facebook.com') > -1) {
- tagItems.push({
- type: 'Facebook',
- value: attr['href']
- });
- return true;
- } else if (attr['href'].indexOf('docs.google.com/forms') > -1) {
- tagItems.push({
- type: 'GoogleForm',
- value: attr['href']
- });
- return true;
- } else if (attr['href'].indexOf('instagram.com') > -1) {
- tagItems.push({
- type: 'Instagram',
- value: attr['href']
- });
- return true;
- } else if (attr['href'].indexOf('twitter.com') > -1) {
- tagItems.push({
- type: 'Tweet',
- value: attr['href']
- });
- return true;
- } else if (attr['href'].indexOf('youtube.com') > -1) {
- tagItems.push({
- type: 'Youtube',
- value: attr['href']
- });
- return true;
- } else {
- var child_string = renderChildValue(child) || attr.href;
- tagItems.push({
- 'type': 'text',
- 'value': "").concat(child_string, "")
- });
- return true;
- }
- }
-
- var child_len = child && child.length;
-
- if (child && child_len > 0) {
- lodash.map(child, function (item) {
- switchNode(item);
- });
- }
- }; // convert html
-
-
- var parsed = html2json.html2json(content);
- var elements = lodash.filter(parsed.child, {
- node: 'element'
- }); // parse elements
-
- lodash.map(elements, function (item) {
- return switchNode(item);
- });
- var p_text = '';
- lodash.map(tagItems, function (_ref) {
- var type = _ref.type,
- value = _ref.value;
-
- switch (type) {
- case 'p':
- // insert if exist and clean
- if (p_text && p_text !== '') {
- bodyItems.push({
- type: 'Paragraph',
- value: p_text
- });
- p_text = '';
- }
-
- break;
-
- case 'text':
- p_text = "".concat(p_text).concat(value);
- break;
-
- default:
- bodyItems.push({
- type: type,
- value: value
- });
- break;
- }
- });
-
- if (p_text && p_text !== '') {
- bodyItems.push({
- type: 'Paragraph',
- value: p_text
- });
- p_text = '';
- }
-
- return bodyItems;
-};
-
-var TextBody = function TextBody(_ref) {
- var AdComponent = _ref.AdComponent,
- adsblocks = _ref.adsblocks,
- content = _ref.content,
- domain = _ref.domain,
- embeds = _ref.embeds,
- lazy = _ref.lazy;
- if (!content) return null;
- var bodyItems = parseBody(content);
- var ads_p = 0;
- var ads_t = adsblocks.length;
- var count_p = 0;
-
- var RenderAds = function RenderAds() {
- ads_p++;
- if (ads_p > ads_t) return false;
- return /*#__PURE__*/React__default.createElement(AdComponent, {
- content: adsblocks[ads_p - 1]
- });
- };
-
- var RenderImage = function RenderImage(_ref2) {
- var value = _ref2.value;
- return /*#__PURE__*/React__default.createElement(Block, {
- custom: "article-image-embed",
- mb: "3"
- }, /*#__PURE__*/React__default.createElement(Image$1, {
- custom: "image-article",
- content: value,
- domain: domain,
- lazy: lazy
- }));
- };
-
- var RenderParagraph = function RenderParagraph(_ref3) {
- var value = _ref3.value;
- var has_ads = false;
- count_p++;
-
- if (count_p === 2) {
- count_p = 0;
- has_ads = true;
- }
-
- return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(Paragraph, null, value), has_ads && /*#__PURE__*/React__default.createElement(RenderAds, null));
- };
-
- return lodash.map(bodyItems, function (_ref4, key) {
- var type = _ref4.type,
- value = _ref4.value;
-
- switch (type) {
- case 'Paragraph':
- return /*#__PURE__*/React__default.createElement(RenderParagraph, {
- key: key,
- value: value
- });
-
- case 'Facebook':
- return embeds && embeds.Facebook && /*#__PURE__*/React__default.createElement(embeds.Facebook, {
- key: key,
- value: value
- });
-
- case 'GoogleForm':
- return embeds && embeds.GoogleForm && /*#__PURE__*/React__default.createElement(embeds.GoogleForm, {
- key: key,
- value: value
- });
-
- case 'Image':
- case 'ImageLegacy':
- return /*#__PURE__*/React__default.createElement(RenderImage, {
- key: key,
- value: value
- });
-
- case 'Instagram':
- return embeds && embeds.Instagram && /*#__PURE__*/React__default.createElement(embeds.Instagram, {
- key: key,
- value: value
- });
-
- case 'Tweet':
- return embeds && embeds.Tweet && /*#__PURE__*/React__default.createElement(embeds.Tweet, {
- key: key,
- value: value
- });
-
- case 'Youtube':
- return embeds && embeds.Youtube && /*#__PURE__*/React__default.createElement(embeds.Youtube, {
- key: key,
- value: value
- });
- }
- });
-};
-
-TextBody.propTypes = {
- AdComponent: PropTypes.func,
- adsblocks: PropTypes.array,
- content: PropTypes.string.isRequired,
- domain: PropTypes.string,
- embeds: PropTypes.object
-};
-TextBody.defaultProps = {
- content: {}
+ children: PropTypes__default['default'].string.isRequired,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ filled: PropTypes__default['default'].bool,
+ style: PropTypes__default['default'].object,
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ weight: PropTypes__default['default'].oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
};
function requiredArgs(required, args) {
@@ -4987,6 +4709,190 @@ var utils = {
datePtBrFull: datePtBrFull
};
+var _PropTypes$shape;
+
+var Teaser = function Teaser(_ref) {
+ var content = _ref.content,
+ datePublished = _ref.datePublished,
+ domain = _ref.domain,
+ hasImageTop = _ref.hasImageTop,
+ hasSubjectFilled = _ref.hasSubjectFilled,
+ hasSubtitle = _ref.hasSubtitle,
+ hasDate = _ref.hasDate,
+ lazy = _ref.lazy,
+ subjectColor = _ref.subjectColor,
+ subjectSize = _ref.subjectSize,
+ titleSize = _ref.titleSize,
+ subtitleSize = _ref.subtitleSize,
+ dateSize = _ref.dateSize,
+ titleColor = _ref.titleColor,
+ subtitleColor = _ref.subtitleColor,
+ dateColor = _ref.dateColor,
+ titleWeight = _ref.titleWeight,
+ subtitleWeight = _ref.subtitleWeight,
+ dateWeight = _ref.dateWeight;
+ var image = content.image,
+ name = content.name,
+ path = content.path,
+ subject = content.subject,
+ subtitle = content.subtitle;
+ var propsTeaser = {
+ align: hasImageTop ? 'col' : 'row left',
+ custom: 'teaser-default',
+ mb: '2'
+ };
+ var propsImage = {
+ align: 'row',
+ custom: "teaser-image ".concat(hasImageTop ? 'image-top' : 'image-left')
+ };
+ var propsContent = {
+ custom: 'teaser-content',
+ align: 'col',
+ mb: '3',
+ ml: '2',
+ mr: '2',
+ mt: '3',
+ w: '100p-4'
+ };
+ var propsSubTitle = {
+ mb: '2',
+ lg: {
+ mb: '8'
+ }
+ };
+ var propsDateContainer = {
+ h: '100p',
+ align: 'bottom'
+ };
+ var propsDate = {
+ custom: 'teaser-date',
+ w: '100p'
+ };
+ var propsSubject = {
+ custom: 'teaser-subject',
+ mb: '1'
+ };
+ var propsTitle = {
+ custom: 'teaser-title'
+ };
+ if (!content['time-published']) return false;
+ var dateValue = !datePublished && content['time-modifiedDate'] ? utils.dateDistance(content['time-modifiedDate'], 2880) : utils.datePtBrFull(content['time-published']);
+ dateValue = datePublished ? "Publicado em ".concat(dateValue) : dateValue.startsWith('Há') ? dateValue.replace('Há', 'Atualizado há') : "Atualizado em ".concat(dateValue);
+ var path_split = path.split(':8080');
+ var url_rewrite = path_split.length > 1 ? "".concat(domain).concat(path_split[1]) : path;
+
+ var TeaserImage = function TeaserImage() {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsImage, /*#__PURE__*/React__default['default'].createElement("a", {
+ className: "teaser-aria",
+ href: url_rewrite,
+ "aria-label": "Imagem da mat\xE9ria ".concat(name)
+ }, /*#__PURE__*/React__default['default'].createElement(Image, {
+ domain: domain,
+ content: image,
+ lazy: lazy
+ })));
+ };
+
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsTeaser, /*#__PURE__*/React__default['default'].createElement(TeaserImage, null), /*#__PURE__*/React__default['default'].createElement(Block, propsContent, /*#__PURE__*/React__default['default'].createElement(Block, null, subject && /*#__PURE__*/React__default['default'].createElement(Block, propsSubject, /*#__PURE__*/React__default['default'].createElement(Subject, {
+ size: subjectSize,
+ color: subjectColor,
+ filled: hasSubjectFilled,
+ weight: "bold"
+ }, subject))), /*#__PURE__*/React__default['default'].createElement(Block, null, /*#__PURE__*/React__default['default'].createElement(Block, propsTitle, /*#__PURE__*/React__default['default'].createElement("a", {
+ className: "teaser-aria",
+ href: url_rewrite,
+ "aria-label": "Abrir mat\xE9ria ".concat(name)
+ }, /*#__PURE__*/React__default['default'].createElement(NewsTitle, {
+ size: titleSize,
+ color: titleColor,
+ weight: titleWeight
+ }, name))), subtitle && hasSubtitle && /*#__PURE__*/React__default['default'].createElement(Block, propsSubTitle, /*#__PURE__*/React__default['default'].createElement(Subtitle, {
+ size: subtitleSize,
+ color: subtitleColor,
+ weight: subtitleWeight
+ }, subtitle))), /*#__PURE__*/React__default['default'].createElement(Block, propsDateContainer, dateValue && hasDate && /*#__PURE__*/React__default['default'].createElement(Block, propsDate, /*#__PURE__*/React__default['default'].createElement(Date$1, {
+ size: dateSize,
+ color: dateColor,
+ weight: dateWeight
+ }, dateValue)))));
+};
+
+Teaser.propTypes = {
+ content: PropTypes__default['default'].shape((_PropTypes$shape = {
+ image: PropTypes__default['default'].object,
+ name: PropTypes__default['default'].string,
+ path: PropTypes__default['default'].string,
+ subtitle: PropTypes__default['default'].string,
+ subject: PropTypes__default['default'].string
+ }, _defineProperty(_PropTypes$shape, 'time-published', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape, 'time-modified', PropTypes__default['default'].string), _PropTypes$shape)),
+ datePublished: PropTypes__default['default'].bool,
+ domain: PropTypes__default['default'].string,
+ hasImageTop: PropTypes__default['default'].bool,
+ hasSubtitle: PropTypes__default['default'].bool,
+ hasDate: PropTypes__default['default'].bool,
+ hasSubjectFilled: PropTypes__default['default'].bool,
+ lazy: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].shape({
+ loading: PropTypes__default['default'].bool,
+ error: PropTypes__default['default'].bool
+ }),
+ subjectColor: PropTypes__default['default'].oneOf(colors),
+ subjectSize: PropTypes__default['default'].oneOf([1, 2, 3]),
+ titleSize: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ subtitleSize: PropTypes__default['default'].oneOf([1]),
+ dateSize: PropTypes__default['default'].oneOf([1]),
+ titleColor: PropTypes__default['default'].oneOf(colors),
+ subtitleColor: PropTypes__default['default'].oneOf(colors),
+ dateColor: PropTypes__default['default'].oneOf(colors),
+ titleWeight: PropTypes__default['default'].oneOf(weights),
+ subtitleWeight: PropTypes__default['default'].oneOf(weights),
+ dateWeight: PropTypes__default['default'].oneOf(weights)
+};
+Teaser.defaultProps = {
+ hasSubjectFilled: false,
+ hasImageTop: false,
+ hasSubtitle: false,
+ hasDate: true,
+ subjectSize: 1,
+ subjectColor: 'primary-1'
+};
+
+var Tag = function Tag(_ref) {
+ var content = _ref.content,
+ color = _ref.color,
+ onClick = _ref.onClick,
+ radius = _ref.radius,
+ weight = _ref.weight;
+ var classes = classnames__default['default'](_defineProperty({
+ 'Prensa-Tag-root': true
+ }, "color-".concat(color, " radius-").concat(radius, " ").concat(weight), true));
+
+ var handleClick = function handleClick() {
+ onClick(content);
+ };
+
+ return /*#__PURE__*/React__default['default'].createElement("div", {
+ className: classes,
+ onClick: handleClick
+ }, /*#__PURE__*/React__default['default'].createElement(TagTypography, {
+ weight: weight,
+ color: color
+ }, content));
+};
+
+Tag.defaultProps = {
+ color: 'primary-1',
+ weight: 'regular',
+ radius: 'default'
+};
+Tag.propTypes = {
+ content: PropTypes__default['default'].string.isRequired,
+ color: PropTypes__default['default'].oneOf(colors),
+ onClick: PropTypes__default['default'].func.isRequired,
+ radius: PropTypes__default['default'].oneOf([false, 'default', 'alternative']),
+ weight: PropTypes__default['default'].oneOf(weights)
+};
+
exports.Block = Block;
exports.Button = Button;
exports.ColumnHeader = ColumnHeader;
@@ -5000,7 +4906,7 @@ exports.SideMenu = SideMenu;
exports.SideMenuItems = SideMenuItems;
exports.SocialMedias = SocialMedias;
exports.Subject = Subject;
-exports.Tags = Tags;
-exports.TextBody = TextBody;
+exports.Tag = Tag;
+exports.Teaser = Teaser;
exports.Topbar = Topbar;
exports.utils = utils;
diff --git a/teasers.js b/teasers.js
index 424f4b730..08cb051d8 100644
--- a/teasers.js
+++ b/teasers.js
@@ -1,12 +1,16 @@
'use strict';
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
-var PropTypes = _interopDefault(require('prop-types'));
-var React = _interopDefault(require('react'));
-var classnames = _interopDefault(require('classnames'));
+var PropTypes = require('prop-types');
+var React = require('react');
+var classnames = require('classnames');
var lodash = require('lodash');
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
+var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
+var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
+
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
@@ -22,6 +26,45 @@ function _defineProperty(obj, key, value) {
return obj;
}
+var colors = [
+ "primary-1",
+ "primary-2",
+ "primary-3",
+ "secondary-1",
+ "secondary-2",
+ "secondary-3",
+ "product-1",
+ "product-2",
+ "product-3",
+ "product-4",
+ "product-5",
+ "editorial-1",
+ "editorial-2",
+ "editorial-3",
+ "editorial-4",
+ "editorial-5",
+ "black",
+ "neutral-1",
+ "neutral-2",
+ "neutral-3",
+ "neutral-4",
+ "neutral-5",
+ "neutral-6",
+ "neutral-7",
+ "neutral-8",
+ "neutral-9",
+ "neutral-10",
+ "neutral-11",
+ "white",
+ "ads",
+ "success-1",
+ "success-2",
+ "success-3",
+ "error-1",
+ "error-2",
+ "error-3"
+];
+
var Block = function Block(props) {
var children = props.children,
xs = props.xs,
@@ -39,7 +82,7 @@ var Block = function Block(props) {
};
var direction = props && props.align && (props.align.indexOf('row') > -1 ? 'row' : 'col');
- return classnames((_classnames = {}, _defineProperty(_classnames, "fx-col".concat(prefix), direction === 'col'), _defineProperty(_classnames, "fx-row".concat(prefix), direction === 'row'), _defineProperty(_classnames, "".concat(direction, "-between").concat(prefix), checkAttr(props, 'between')), _defineProperty(_classnames, "".concat(direction, "-bottom").concat(prefix), checkAttr(props, 'bottom')), _defineProperty(_classnames, "".concat(direction, "-center").concat(prefix), checkAttr(props, 'center')), _defineProperty(_classnames, "".concat(direction, "-evenly").concat(prefix), checkAttr(props, 'evenly')), _defineProperty(_classnames, "".concat(direction, "-left").concat(prefix), checkAttr(props, 'left')), _defineProperty(_classnames, "".concat(direction, "-middle").concat(prefix), checkAttr(props, 'middle')), _defineProperty(_classnames, "".concat(direction, "-right").concat(prefix), checkAttr(props, 'right')), _defineProperty(_classnames, "".concat(direction, "-top").concat(prefix), checkAttr(props, 'top')), _defineProperty(_classnames, "".concat(direction, "-wrap").concat(prefix), checkAttr(props, 'wrap')), _defineProperty(_classnames, "bg-".concat(props.bg).concat(prefix), props.bg), _defineProperty(_classnames, "cursor-".concat(props.cursor).concat(prefix), props.cursor), _defineProperty(_classnames, "fc-".concat(props.fc).concat(prefix), props.fc), _defineProperty(_classnames, "h-".concat(props.h).concat(prefix), props.h), _defineProperty(_classnames, "m-".concat(props.m).concat(prefix), props.m), _defineProperty(_classnames, "mt-".concat(props.mt).concat(prefix), props.mt), _defineProperty(_classnames, "mr-".concat(props.mr).concat(prefix), props.mr), _defineProperty(_classnames, "mb-".concat(props.mb).concat(prefix), props.mb), _defineProperty(_classnames, "ml-".concat(props.ml).concat(prefix), props.ml), _defineProperty(_classnames, "p-".concat(props.p).concat(prefix), props.p), _defineProperty(_classnames, "pt-".concat(props.pt).concat(prefix), props.pt), _defineProperty(_classnames, "pr-".concat(props.pr).concat(prefix), props.pr), _defineProperty(_classnames, "pb-".concat(props.pb).concat(prefix), props.pb), _defineProperty(_classnames, "pl-".concat(props.pl).concat(prefix), props.pl), _defineProperty(_classnames, "w-".concat(props.w).concat(prefix), props.w), _defineProperty(_classnames, "".concat(props.custom), props.custom), _classnames));
+ return classnames__default['default']((_classnames = {}, _defineProperty(_classnames, "fx-col".concat(prefix), direction === 'col'), _defineProperty(_classnames, "fx-row".concat(prefix), direction === 'row'), _defineProperty(_classnames, "".concat(direction, "-between").concat(prefix), checkAttr(props, 'between')), _defineProperty(_classnames, "".concat(direction, "-bottom").concat(prefix), checkAttr(props, 'bottom')), _defineProperty(_classnames, "".concat(direction, "-center").concat(prefix), checkAttr(props, 'center')), _defineProperty(_classnames, "".concat(direction, "-evenly").concat(prefix), checkAttr(props, 'evenly')), _defineProperty(_classnames, "".concat(direction, "-left").concat(prefix), checkAttr(props, 'left')), _defineProperty(_classnames, "".concat(direction, "-middle").concat(prefix), checkAttr(props, 'middle')), _defineProperty(_classnames, "".concat(direction, "-right").concat(prefix), checkAttr(props, 'right')), _defineProperty(_classnames, "".concat(direction, "-top").concat(prefix), checkAttr(props, 'top')), _defineProperty(_classnames, "".concat(direction, "-wrap").concat(prefix), checkAttr(props, 'wrap')), _defineProperty(_classnames, "bg-".concat(props.bg).concat(prefix), props.bg), _defineProperty(_classnames, "cursor-".concat(props.cursor).concat(prefix), props.cursor), _defineProperty(_classnames, "fc-".concat(props.fc).concat(prefix), props.fc), _defineProperty(_classnames, "h-".concat(props.h).concat(prefix), props.h), _defineProperty(_classnames, "m-".concat(props.m).concat(prefix), props.m), _defineProperty(_classnames, "mt-".concat(props.mt).concat(prefix), props.mt), _defineProperty(_classnames, "mr-".concat(props.mr).concat(prefix), props.mr), _defineProperty(_classnames, "mb-".concat(props.mb).concat(prefix), props.mb), _defineProperty(_classnames, "ml-".concat(props.ml).concat(prefix), props.ml), _defineProperty(_classnames, "p-".concat(props.p).concat(prefix), props.p), _defineProperty(_classnames, "pt-".concat(props.pt).concat(prefix), props.pt), _defineProperty(_classnames, "pr-".concat(props.pr).concat(prefix), props.pr), _defineProperty(_classnames, "pb-".concat(props.pb).concat(prefix), props.pb), _defineProperty(_classnames, "pl-".concat(props.pl).concat(prefix), props.pl), _defineProperty(_classnames, "w-".concat(props.w).concat(prefix), props.w), _defineProperty(_classnames, "".concat(props.custom), props.custom), _classnames));
};
var dProps = defProps('', props);
@@ -49,42 +92,40 @@ var Block = function Block(props) {
var lgProps = lg && defProps('--lg', lg);
var xlProps = xl && defProps('--xl', xl);
var classProps = {
- className: classnames(dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
+ className: classnames__default['default'](dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
children: children,
onClick: onClick
};
- return /*#__PURE__*/React.createElement("div", classProps);
+ return /*#__PURE__*/React__default['default'].createElement("div", classProps);
};
var propTypesSizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
-var colorTokens = ['color-white', 'color-black', 'color-primary-1', 'color-primary-2', 'color-primary-3', 'color-secondary-1', 'color-secondary-2', 'color-secondary-3', 'color-neutral-1', 'color-neutral-2', 'color-neutral-3', 'color-neutral-4', 'color-neutral-5', 'color-neutral-6', 'color-neutral-7', 'color-neutral-8', 'color-neutral-9', 'color-neutral-10', 'color-neutral-11'];
Block.propTypes = {
- align: PropTypes.string,
- bg: PropTypes.oneOf(colorTokens),
- fc: PropTypes.oneOf(colorTokens),
- cursor: PropTypes.string,
- m: PropTypes.oneOf([].concat(propTypesSizes)),
- mt: PropTypes.oneOf([].concat(propTypesSizes)),
- mr: PropTypes.oneOf([].concat(propTypesSizes)),
- mb: PropTypes.oneOf([].concat(propTypesSizes)),
- ml: PropTypes.oneOf([].concat(propTypesSizes)),
- p: PropTypes.oneOf([].concat(propTypesSizes)),
- pt: PropTypes.oneOf([].concat(propTypesSizes)),
- pr: PropTypes.oneOf([].concat(propTypesSizes)),
- pb: PropTypes.oneOf([].concat(propTypesSizes)),
- pl: PropTypes.oneOf([].concat(propTypesSizes)),
- xs: PropTypes.object,
- sm: PropTypes.object,
- md: PropTypes.object,
- lg: PropTypes.object,
- xl: PropTypes.object,
- children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.node]),
- custom: PropTypes.string,
- onClick: PropTypes.func,
- w: PropTypes.string,
- h: PropTypes.string
+ align: PropTypes__default['default'].string,
+ bg: PropTypes__default['default'].oneOf(colors),
+ fc: PropTypes__default['default'].oneOf(colors),
+ cursor: PropTypes__default['default'].string,
+ m: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mt: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mr: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mb: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ ml: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ p: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pt: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pr: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pb: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pl: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ xs: PropTypes__default['default'].object,
+ sm: PropTypes__default['default'].object,
+ md: PropTypes__default['default'].object,
+ lg: PropTypes__default['default'].object,
+ xl: PropTypes__default['default'].object,
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].array, PropTypes__default['default'].object, PropTypes__default['default'].node]),
+ custom: PropTypes__default['default'].string,
+ onClick: PropTypes__default['default'].func,
+ w: PropTypes__default['default'].string,
+ h: PropTypes__default['default'].string
};
-Block.defaultProps = {};
var pathToImage = function pathToImage(derivative, domain, policy_id, width) {
if (!policy_id) return null;
@@ -132,57 +173,32 @@ var Image = function Image(_ref) {
image_style.height = height;
}
- return /*#__PURE__*/React.createElement("div", {
+ return /*#__PURE__*/React__default['default'].createElement("div", {
className: "image-background ".concat(custom || ''),
style: image_style
}, children && children);
};
Image.propTypes = {
- children: PropTypes.node,
- content: PropTypes.object.isRequired,
- custom: PropTypes.string,
- domain: PropTypes.string,
- height: PropTypes.string,
- lazy: PropTypes.func,
- placeholder: PropTypes.string
+ children: PropTypes__default['default'].node,
+ content: PropTypes__default['default'].object.isRequired,
+ custom: PropTypes__default['default'].string,
+ domain: PropTypes__default['default'].string,
+ height: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ placeholder: PropTypes__default['default'].string
};
Image.defaultProps = {
content: {}
};
-var colors = [
- "primary-1",
- "primary-2",
- "primary-3",
- "secondary-1",
- "secondary-2",
- "secondary-3",
- "editorial-1",
- "editorial-2",
- "editorial-3",
- "editorial-4",
- "editorial-5",
- "black:",
- "neutral-1",
- "neutral-2",
- "neutral-3",
- "neutral-4",
- "neutral-5",
- "neutral-6",
- "neutral-7",
- "neutral-8",
- "neutral-9",
- "neutral-10",
- "neutral-11",
- "white:",
- "ads",
- "success-1",
- "success-2",
- "success-3",
- "error-1",
- "error-2",
- "error-3"
+var weight = [
+ "thin",
+ "light",
+ "regular",
+ "medium",
+ "bold",
+ "italic"
];
var SubjectTypography = function SubjectTypography(props) {
@@ -194,10 +210,10 @@ var SubjectTypography = function SubjectTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Subject-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -208,12 +224,12 @@ SubjectTypography.defaultProps = {
weight: 'regular'
};
SubjectTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var NewsTitle = function NewsTitle(props) {
@@ -224,11 +240,12 @@ var NewsTitle = function NewsTitle(props) {
color = props.color,
style = props.style,
size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
+ weight = props.weight,
+ disableHover = props.disableHover;
+ var classes = classnames__default['default']((_classnames = {
'Typography-NewsTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("h2", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, 'has-hover', !disableHover), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h2", {
className: classes,
style: style
}, children);
@@ -236,15 +253,17 @@ var NewsTitle = function NewsTitle(props) {
NewsTitle.defaultProps = {
color: 'primary-1',
size: 1,
- weight: 'regular'
+ weight: 'regular',
+ disableHover: false
};
NewsTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ disableHover: PropTypes__default['default'].bool,
+ size: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Subtitle = function Subtitle(props) {
@@ -256,10 +275,10 @@ var Subtitle = function Subtitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Subtitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("h3", {
+ return /*#__PURE__*/React__default['default'].createElement("h3", {
className: classes,
style: style
}, children);
@@ -270,12 +289,12 @@ Subtitle.defaultProps = {
weight: 'regular'
};
Subtitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Date$1 = function Date(props) {
@@ -287,10 +306,10 @@ var Date$1 = function Date(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Date-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -301,12 +320,12 @@ Date$1.defaultProps = {
weight: 'regular'
};
Date$1.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Author = function Author(props) {
@@ -318,10 +337,10 @@ var Author = function Author(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Author-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -332,40 +351,52 @@ Author.defaultProps = {
weight: 'regular'
};
Author.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Paragraph = function Paragraph(props) {
var _classnames;
var className = props.className,
- children = props.children,
color = props.color,
+ gutter = props.gutter,
style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
+ size = props.size,
+ weight = props.weight,
+ maxWidth = props.maxWidth,
+ setInnerHtml = props.setInnerHtml;
+ var classes = classnames__default['default']((_classnames = {
'Typography-Paragraph-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " ").concat(maxWidth), true), _defineProperty(_classnames, "gutter-".concat(gutter), gutter), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
- style: style
- }, children);
+ style: style,
+ gutter: gutter,
+ dangerouslySetInnerHTML: {
+ __html: setInnerHtml
+ }
+ });
};
Paragraph.defaultProps = {
color: 'black',
- size: 1
+ size: 1,
+ weight: 'regular',
+ maxWidth: 'md'
};
Paragraph.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight),
+ maxWidth: PropTypes__default['default'].oneOf(['sm', 'md', 'lg']),
+ setInnerHtml: PropTypes__default['default'].string
};
var Byline = function Byline(props) {
@@ -377,10 +408,10 @@ var Byline = function Byline(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Byline-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -391,12 +422,12 @@ Byline.defaultProps = {
weight: 'regular'
};
Byline.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var InterTitle = function InterTitle(props) {
@@ -408,10 +439,10 @@ var InterTitle = function InterTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-InterTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -422,12 +453,12 @@ InterTitle.defaultProps = {
weight: 'regular'
};
InterTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Citation = function Citation(props) {
@@ -439,10 +470,10 @@ var Citation = function Citation(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Citation-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -453,12 +484,12 @@ Citation.defaultProps = {
weight: 'regular'
};
Citation.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var UrlLink = function UrlLink(props) {
@@ -470,10 +501,10 @@ var UrlLink = function UrlLink(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-UrlLink-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("a", {
+ return /*#__PURE__*/React__default['default'].createElement("a", {
className: classes,
style: style
}, children);
@@ -484,12 +515,12 @@ UrlLink.defaultProps = {
weight: 'regular'
};
UrlLink.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var TagTypography = function TagTypography(props) {
@@ -501,10 +532,10 @@ var TagTypography = function TagTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Tag-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
style: style
}, children);
@@ -515,40 +546,49 @@ TagTypography.defaultProps = {
weight: 'regular'
};
TagTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
-var SectionTitle = function SectionTitle(props) {
+var SectionTitle = function SectionTitle(_ref) {
var _classnames;
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
+ var className = _ref.className,
+ children = _ref.children,
+ color = _ref.color,
+ gutter = _ref.gutter,
+ style = _ref.style,
+ size = _ref.size,
+ uppercase = _ref.uppercase,
+ weight = _ref.weight;
+ var classes = classnames__default['default']((_classnames = {
'Typography-SectionTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " mb-").concat(gutter), true), _defineProperty(_classnames, 'uppercase', uppercase), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h1", {
className: classes,
style: style
}, children);
};
SectionTitle.defaultProps = {
color: 'primary-1',
- size: 1
+ gutter: 1,
+ size: 1,
+ weight: 'regular',
+ uppercase: true
};
SectionTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ uppercase: PropTypes__default['default'].bool,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var EditorialTitle = function EditorialTitle(props) {
@@ -560,10 +600,10 @@ var EditorialTitle = function EditorialTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-EditorialTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -574,12 +614,12 @@ EditorialTitle.defaultProps = {
weight: 'regular'
};
EditorialTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var ButtonTypography = function ButtonTypography(props) {
@@ -591,10 +631,10 @@ var ButtonTypography = function ButtonTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Button-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
style: style
}, children);
@@ -605,12 +645,12 @@ ButtonTypography.defaultProps = {
weight: 'regular'
};
ButtonTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].object, PropTypes__default['default'].array]),
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MostReadNumber = function MostReadNumber(props) {
@@ -622,10 +662,10 @@ var MostReadNumber = function MostReadNumber(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MostReadNumber-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -636,12 +676,12 @@ MostReadNumber.defaultProps = {
weight: 'regular'
};
MostReadNumber.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MenuSideTitle = function MenuSideTitle(props) {
@@ -653,10 +693,10 @@ var MenuSideTitle = function MenuSideTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuSideTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -667,12 +707,12 @@ MenuSideTitle.defaultProps = {
weight: 'regular'
};
MenuSideTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MenuSideItem = function MenuSideItem(props) {
@@ -684,10 +724,10 @@ var MenuSideItem = function MenuSideItem(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuSideItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -698,12 +738,12 @@ MenuSideItem.defaultProps = {
weight: 'regular'
};
MenuSideItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MenuTopItem = function MenuTopItem(props) {
@@ -715,10 +755,10 @@ var MenuTopItem = function MenuTopItem(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuTopItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -729,12 +769,12 @@ MenuTopItem.defaultProps = {
weight: 'regular'
};
MenuTopItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Subject = function Subject(props) {
@@ -745,18 +785,20 @@ var Subject = function Subject(props) {
className = props.className,
style = props.style,
size = props.size,
- filled = props.filled;
+ filled = props.filled,
+ weight = props.weight;
if (!children) return null;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Prensa-Subject-root': true,
'filled': filled
}, _defineProperty(_classnames, "color-".concat(color), true), _defineProperty(_classnames, "".concat(className), className), _classnames));
- return /*#__PURE__*/React.createElement("div", {
+ return /*#__PURE__*/React__default['default'].createElement("div", {
className: classes,
style: style
- }, /*#__PURE__*/React.createElement(SubjectTypography, {
+ }, /*#__PURE__*/React__default['default'].createElement(SubjectTypography, {
size: size,
- color: filled ? 'color-white' : color
+ color: filled ? 'white' : color,
+ weight: weight
}, children));
};
@@ -766,12 +808,13 @@ Subject.defaultProps = {
size: 1
};
Subject.propTypes = {
- children: PropTypes.string.isRequired,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- filled: PropTypes.bool,
- style: PropTypes.object,
- size: PropTypes.oneOf([1, 2, 3])
+ children: PropTypes__default['default'].string.isRequired,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ filled: PropTypes__default['default'].bool,
+ style: PropTypes__default['default'].object,
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ weight: PropTypes__default['default'].oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
};
function requiredArgs(required, args) {
@@ -4034,7 +4077,16 @@ var Teaser = function Teaser(_ref) {
hasDate = _ref.hasDate,
lazy = _ref.lazy,
subjectColor = _ref.subjectColor,
- subjectSize = _ref.subjectSize;
+ subjectSize = _ref.subjectSize,
+ titleSize = _ref.titleSize,
+ subtitleSize = _ref.subtitleSize,
+ dateSize = _ref.dateSize,
+ titleColor = _ref.titleColor,
+ subtitleColor = _ref.subtitleColor,
+ dateColor = _ref.dateColor,
+ titleWeight = _ref.titleWeight,
+ subtitleWeight = _ref.subtitleWeight,
+ dateWeight = _ref.dateWeight;
var image = content.image,
name = content.name,
path = content.path,
@@ -4086,55 +4138,71 @@ var Teaser = function Teaser(_ref) {
var url_rewrite = path_split.length > 1 ? "".concat(domain).concat(path_split[1]) : path;
var TeaserImage = function TeaserImage() {
- return /*#__PURE__*/React.createElement(Block, propsImage, /*#__PURE__*/React.createElement("a", {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsImage, /*#__PURE__*/React__default['default'].createElement("a", {
className: "teaser-aria",
href: url_rewrite,
"aria-label": "Imagem da mat\xE9ria ".concat(name)
- }, /*#__PURE__*/React.createElement(Image, {
+ }, /*#__PURE__*/React__default['default'].createElement(Image, {
domain: domain,
content: image,
lazy: lazy
})));
};
- return /*#__PURE__*/React.createElement(Block, propsTeaser, /*#__PURE__*/React.createElement(TeaserImage, null), /*#__PURE__*/React.createElement(Block, propsContent, /*#__PURE__*/React.createElement(Block, null, subject && /*#__PURE__*/React.createElement(Block, propsSubject, /*#__PURE__*/React.createElement(Subject, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsTeaser, /*#__PURE__*/React__default['default'].createElement(TeaserImage, null), /*#__PURE__*/React__default['default'].createElement(Block, propsContent, /*#__PURE__*/React__default['default'].createElement(Block, null, subject && /*#__PURE__*/React__default['default'].createElement(Block, propsSubject, /*#__PURE__*/React__default['default'].createElement(Subject, {
size: subjectSize,
color: subjectColor,
- filled: hasSubjectFilled
- }, subject))), /*#__PURE__*/React.createElement(Block, null, /*#__PURE__*/React.createElement(Block, propsTitle, /*#__PURE__*/React.createElement("a", {
+ filled: hasSubjectFilled,
+ weight: "bold"
+ }, subject))), /*#__PURE__*/React__default['default'].createElement(Block, null, /*#__PURE__*/React__default['default'].createElement(Block, propsTitle, /*#__PURE__*/React__default['default'].createElement("a", {
className: "teaser-aria",
href: url_rewrite,
"aria-label": "Abrir mat\xE9ria ".concat(name)
- }, /*#__PURE__*/React.createElement(NewsTitle, {
- custom: "teaser-title"
- }, name))), subtitle && hasSubtitle && /*#__PURE__*/React.createElement(Block, propsSubTitle, /*#__PURE__*/React.createElement(Subtitle, {
- custom: "teaser-subtitle"
- }, subtitle))), /*#__PURE__*/React.createElement(Block, propsDateContainer, dateValue && hasDate && /*#__PURE__*/React.createElement(Block, propsDate, /*#__PURE__*/React.createElement(Date$1, {
- custom: "teaser-datetime"
+ }, /*#__PURE__*/React__default['default'].createElement(NewsTitle, {
+ size: titleSize,
+ color: titleColor,
+ weight: titleWeight
+ }, name))), subtitle && hasSubtitle && /*#__PURE__*/React__default['default'].createElement(Block, propsSubTitle, /*#__PURE__*/React__default['default'].createElement(Subtitle, {
+ size: subtitleSize,
+ color: subtitleColor,
+ weight: subtitleWeight
+ }, subtitle))), /*#__PURE__*/React__default['default'].createElement(Block, propsDateContainer, dateValue && hasDate && /*#__PURE__*/React__default['default'].createElement(Block, propsDate, /*#__PURE__*/React__default['default'].createElement(Date$1, {
+ size: dateSize,
+ color: dateColor,
+ weight: dateWeight
}, dateValue)))));
};
Teaser.propTypes = {
- content: PropTypes.shape((_PropTypes$shape = {
- image: PropTypes.object,
- name: PropTypes.string,
- path: PropTypes.string,
- subtitle: PropTypes.string,
- subject: PropTypes.string
- }, _defineProperty(_PropTypes$shape, 'time-published', PropTypes.string), _defineProperty(_PropTypes$shape, 'time-modified', PropTypes.string), _PropTypes$shape)),
- datePublished: PropTypes.bool,
- domain: PropTypes.string,
- hasImageTop: PropTypes.bool,
- hasSubtitle: PropTypes.bool,
- hasDate: PropTypes.bool,
- hasSubjectFilled: PropTypes.bool,
- lazy: PropTypes.func,
- status: PropTypes.shape({
- loading: PropTypes.bool,
- error: PropTypes.bool
+ content: PropTypes__default['default'].shape((_PropTypes$shape = {
+ image: PropTypes__default['default'].object,
+ name: PropTypes__default['default'].string,
+ path: PropTypes__default['default'].string,
+ subtitle: PropTypes__default['default'].string,
+ subject: PropTypes__default['default'].string
+ }, _defineProperty(_PropTypes$shape, 'time-published', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape, 'time-modified', PropTypes__default['default'].string), _PropTypes$shape)),
+ datePublished: PropTypes__default['default'].bool,
+ domain: PropTypes__default['default'].string,
+ hasImageTop: PropTypes__default['default'].bool,
+ hasSubtitle: PropTypes__default['default'].bool,
+ hasDate: PropTypes__default['default'].bool,
+ hasSubjectFilled: PropTypes__default['default'].bool,
+ lazy: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].shape({
+ loading: PropTypes__default['default'].bool,
+ error: PropTypes__default['default'].bool
}),
- subjectColor: PropTypes.oneOf(colors),
- subjectSize: PropTypes.oneOf([1, 2, 3])
+ subjectColor: PropTypes__default['default'].oneOf(colors),
+ subjectSize: PropTypes__default['default'].oneOf([1, 2, 3]),
+ titleSize: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ subtitleSize: PropTypes__default['default'].oneOf([1]),
+ dateSize: PropTypes__default['default'].oneOf([1]),
+ titleColor: PropTypes__default['default'].oneOf(colors),
+ subtitleColor: PropTypes__default['default'].oneOf(colors),
+ dateColor: PropTypes__default['default'].oneOf(colors),
+ titleWeight: PropTypes__default['default'].oneOf(weight),
+ subtitleWeight: PropTypes__default['default'].oneOf(weight),
+ dateWeight: PropTypes__default['default'].oneOf(weight)
};
Teaser.defaultProps = {
hasSubjectFilled: false,
diff --git a/templates.js b/templates.js
index 656ae309d..c8990df34 100644
--- a/templates.js
+++ b/templates.js
@@ -2,12 +2,16 @@
Object.defineProperty(exports, '__esModule', { value: true });
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
-
var lodash = require('lodash');
-var PropTypes = _interopDefault(require('prop-types'));
-var React = _interopDefault(require('react'));
-var classnames = _interopDefault(require('classnames'));
+var PropTypes = require('prop-types');
+var React = require('react');
+var classnames = require('classnames');
+
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
+var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
+var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
function _defineProperty(obj, key, value) {
if (key in obj) {
@@ -42,6 +46,45 @@ function _extends() {
return _extends.apply(this, arguments);
}
+var colors = [
+ "primary-1",
+ "primary-2",
+ "primary-3",
+ "secondary-1",
+ "secondary-2",
+ "secondary-3",
+ "product-1",
+ "product-2",
+ "product-3",
+ "product-4",
+ "product-5",
+ "editorial-1",
+ "editorial-2",
+ "editorial-3",
+ "editorial-4",
+ "editorial-5",
+ "black",
+ "neutral-1",
+ "neutral-2",
+ "neutral-3",
+ "neutral-4",
+ "neutral-5",
+ "neutral-6",
+ "neutral-7",
+ "neutral-8",
+ "neutral-9",
+ "neutral-10",
+ "neutral-11",
+ "white",
+ "ads",
+ "success-1",
+ "success-2",
+ "success-3",
+ "error-1",
+ "error-2",
+ "error-3"
+];
+
var Block = function Block(props) {
var children = props.children,
xs = props.xs,
@@ -59,7 +102,7 @@ var Block = function Block(props) {
};
var direction = props && props.align && (props.align.indexOf('row') > -1 ? 'row' : 'col');
- return classnames((_classnames = {}, _defineProperty(_classnames, "fx-col".concat(prefix), direction === 'col'), _defineProperty(_classnames, "fx-row".concat(prefix), direction === 'row'), _defineProperty(_classnames, "".concat(direction, "-between").concat(prefix), checkAttr(props, 'between')), _defineProperty(_classnames, "".concat(direction, "-bottom").concat(prefix), checkAttr(props, 'bottom')), _defineProperty(_classnames, "".concat(direction, "-center").concat(prefix), checkAttr(props, 'center')), _defineProperty(_classnames, "".concat(direction, "-evenly").concat(prefix), checkAttr(props, 'evenly')), _defineProperty(_classnames, "".concat(direction, "-left").concat(prefix), checkAttr(props, 'left')), _defineProperty(_classnames, "".concat(direction, "-middle").concat(prefix), checkAttr(props, 'middle')), _defineProperty(_classnames, "".concat(direction, "-right").concat(prefix), checkAttr(props, 'right')), _defineProperty(_classnames, "".concat(direction, "-top").concat(prefix), checkAttr(props, 'top')), _defineProperty(_classnames, "".concat(direction, "-wrap").concat(prefix), checkAttr(props, 'wrap')), _defineProperty(_classnames, "bg-".concat(props.bg).concat(prefix), props.bg), _defineProperty(_classnames, "cursor-".concat(props.cursor).concat(prefix), props.cursor), _defineProperty(_classnames, "fc-".concat(props.fc).concat(prefix), props.fc), _defineProperty(_classnames, "h-".concat(props.h).concat(prefix), props.h), _defineProperty(_classnames, "m-".concat(props.m).concat(prefix), props.m), _defineProperty(_classnames, "mt-".concat(props.mt).concat(prefix), props.mt), _defineProperty(_classnames, "mr-".concat(props.mr).concat(prefix), props.mr), _defineProperty(_classnames, "mb-".concat(props.mb).concat(prefix), props.mb), _defineProperty(_classnames, "ml-".concat(props.ml).concat(prefix), props.ml), _defineProperty(_classnames, "p-".concat(props.p).concat(prefix), props.p), _defineProperty(_classnames, "pt-".concat(props.pt).concat(prefix), props.pt), _defineProperty(_classnames, "pr-".concat(props.pr).concat(prefix), props.pr), _defineProperty(_classnames, "pb-".concat(props.pb).concat(prefix), props.pb), _defineProperty(_classnames, "pl-".concat(props.pl).concat(prefix), props.pl), _defineProperty(_classnames, "w-".concat(props.w).concat(prefix), props.w), _defineProperty(_classnames, "".concat(props.custom), props.custom), _classnames));
+ return classnames__default['default']((_classnames = {}, _defineProperty(_classnames, "fx-col".concat(prefix), direction === 'col'), _defineProperty(_classnames, "fx-row".concat(prefix), direction === 'row'), _defineProperty(_classnames, "".concat(direction, "-between").concat(prefix), checkAttr(props, 'between')), _defineProperty(_classnames, "".concat(direction, "-bottom").concat(prefix), checkAttr(props, 'bottom')), _defineProperty(_classnames, "".concat(direction, "-center").concat(prefix), checkAttr(props, 'center')), _defineProperty(_classnames, "".concat(direction, "-evenly").concat(prefix), checkAttr(props, 'evenly')), _defineProperty(_classnames, "".concat(direction, "-left").concat(prefix), checkAttr(props, 'left')), _defineProperty(_classnames, "".concat(direction, "-middle").concat(prefix), checkAttr(props, 'middle')), _defineProperty(_classnames, "".concat(direction, "-right").concat(prefix), checkAttr(props, 'right')), _defineProperty(_classnames, "".concat(direction, "-top").concat(prefix), checkAttr(props, 'top')), _defineProperty(_classnames, "".concat(direction, "-wrap").concat(prefix), checkAttr(props, 'wrap')), _defineProperty(_classnames, "bg-".concat(props.bg).concat(prefix), props.bg), _defineProperty(_classnames, "cursor-".concat(props.cursor).concat(prefix), props.cursor), _defineProperty(_classnames, "fc-".concat(props.fc).concat(prefix), props.fc), _defineProperty(_classnames, "h-".concat(props.h).concat(prefix), props.h), _defineProperty(_classnames, "m-".concat(props.m).concat(prefix), props.m), _defineProperty(_classnames, "mt-".concat(props.mt).concat(prefix), props.mt), _defineProperty(_classnames, "mr-".concat(props.mr).concat(prefix), props.mr), _defineProperty(_classnames, "mb-".concat(props.mb).concat(prefix), props.mb), _defineProperty(_classnames, "ml-".concat(props.ml).concat(prefix), props.ml), _defineProperty(_classnames, "p-".concat(props.p).concat(prefix), props.p), _defineProperty(_classnames, "pt-".concat(props.pt).concat(prefix), props.pt), _defineProperty(_classnames, "pr-".concat(props.pr).concat(prefix), props.pr), _defineProperty(_classnames, "pb-".concat(props.pb).concat(prefix), props.pb), _defineProperty(_classnames, "pl-".concat(props.pl).concat(prefix), props.pl), _defineProperty(_classnames, "w-".concat(props.w).concat(prefix), props.w), _defineProperty(_classnames, "".concat(props.custom), props.custom), _classnames));
};
var dProps = defProps('', props);
@@ -69,75 +112,113 @@ var Block = function Block(props) {
var lgProps = lg && defProps('--lg', lg);
var xlProps = xl && defProps('--xl', xl);
var classProps = {
- className: classnames(dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
+ className: classnames__default['default'](dProps, xsProps, smProps, mdProps, lgProps, xlProps) || 'block',
children: children,
onClick: onClick
};
- return /*#__PURE__*/React.createElement("div", classProps);
+ return /*#__PURE__*/React__default['default'].createElement("div", classProps);
};
var propTypesSizes = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10'];
-var colorTokens = ['color-white', 'color-black', 'color-primary-1', 'color-primary-2', 'color-primary-3', 'color-secondary-1', 'color-secondary-2', 'color-secondary-3', 'color-neutral-1', 'color-neutral-2', 'color-neutral-3', 'color-neutral-4', 'color-neutral-5', 'color-neutral-6', 'color-neutral-7', 'color-neutral-8', 'color-neutral-9', 'color-neutral-10', 'color-neutral-11'];
Block.propTypes = {
- align: PropTypes.string,
- bg: PropTypes.oneOf(colorTokens),
- fc: PropTypes.oneOf(colorTokens),
- cursor: PropTypes.string,
- m: PropTypes.oneOf([].concat(propTypesSizes)),
- mt: PropTypes.oneOf([].concat(propTypesSizes)),
- mr: PropTypes.oneOf([].concat(propTypesSizes)),
- mb: PropTypes.oneOf([].concat(propTypesSizes)),
- ml: PropTypes.oneOf([].concat(propTypesSizes)),
- p: PropTypes.oneOf([].concat(propTypesSizes)),
- pt: PropTypes.oneOf([].concat(propTypesSizes)),
- pr: PropTypes.oneOf([].concat(propTypesSizes)),
- pb: PropTypes.oneOf([].concat(propTypesSizes)),
- pl: PropTypes.oneOf([].concat(propTypesSizes)),
- xs: PropTypes.object,
- sm: PropTypes.object,
- md: PropTypes.object,
- lg: PropTypes.object,
- xl: PropTypes.object,
- children: PropTypes.oneOfType([PropTypes.array, PropTypes.object, PropTypes.node]),
- custom: PropTypes.string,
- onClick: PropTypes.func,
- w: PropTypes.string,
- h: PropTypes.string
-};
-Block.defaultProps = {};
+ align: PropTypes__default['default'].string,
+ bg: PropTypes__default['default'].oneOf(colors),
+ fc: PropTypes__default['default'].oneOf(colors),
+ cursor: PropTypes__default['default'].string,
+ m: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mt: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mr: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ mb: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ ml: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ p: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pt: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pr: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pb: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ pl: PropTypes__default['default'].oneOf([].concat(propTypesSizes)),
+ xs: PropTypes__default['default'].object,
+ sm: PropTypes__default['default'].object,
+ md: PropTypes__default['default'].object,
+ lg: PropTypes__default['default'].object,
+ xl: PropTypes__default['default'].object,
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].array, PropTypes__default['default'].object, PropTypes__default['default'].node]),
+ custom: PropTypes__default['default'].string,
+ onClick: PropTypes__default['default'].func,
+ w: PropTypes__default['default'].string,
+ h: PropTypes__default['default'].string
+};
-var colors = [
- "primary-1",
- "primary-2",
- "primary-3",
- "secondary-1",
- "secondary-2",
- "secondary-3",
- "editorial-1",
- "editorial-2",
- "editorial-3",
- "editorial-4",
- "editorial-5",
- "black:",
- "neutral-1",
- "neutral-2",
- "neutral-3",
- "neutral-4",
- "neutral-5",
- "neutral-6",
- "neutral-7",
- "neutral-8",
- "neutral-9",
- "neutral-10",
- "neutral-11",
- "white:",
- "ads",
- "success-1",
- "success-2",
- "success-3",
- "error-1",
- "error-2",
- "error-3"
+var pathToImage = function pathToImage(derivative, domain, policy_id, width) {
+ if (!policy_id) return null;
+ var w = width || 1000;
+ var r = domain || 'https://costanorte.com.br';
+ var d = derivative || '2x1';
+ var id = policy_id.split('.');
+ var string = id.length > 2 ? "".concat(policy_id, ":").concat(id[2]) : "".concat(policy_id);
+ var path = "".concat(r, "/image/policy:").concat(string, "/image.jpg?f=").concat(d, "&w=").concat(w);
+ return path;
+};
+
+var Image = function Image(_ref) {
+ var children = _ref.children,
+ content = _ref.content,
+ custom = _ref.custom,
+ domain = _ref.domain,
+ height = _ref.height,
+ lazy = _ref.lazy,
+ placeholder = _ref.placeholder;
+ var img_placeholder = placeholder || null;
+
+ if (content['image-contentId']) {
+ var policy_id = content['image-contentId'];
+ var derivative = '2x1';
+ var width = 1000;
+ content['image-path'] = pathToImage(derivative, domain, policy_id, width);
+ img_placeholder = img_placeholder || pathToImage(derivative, domain, policy_id, 10);
+ }
+
+ var content_path = content['image-path'];
+ var image_style;
+
+ if (lazy) {
+ image_style = {
+ backgroundImage: "url(".concat(lazy(content_path, img_placeholder), ")")
+ };
+ } else {
+ image_style = {
+ backgroundImage: "url(".concat(content_path, ")")
+ };
+ }
+
+ if (height) {
+ image_style.height = height;
+ }
+
+ return /*#__PURE__*/React__default['default'].createElement("div", {
+ className: "image-background ".concat(custom || ''),
+ style: image_style
+ }, children && children);
+};
+
+Image.propTypes = {
+ children: PropTypes__default['default'].node,
+ content: PropTypes__default['default'].object.isRequired,
+ custom: PropTypes__default['default'].string,
+ domain: PropTypes__default['default'].string,
+ height: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ placeholder: PropTypes__default['default'].string
+};
+Image.defaultProps = {
+ content: {}
+};
+
+var weights = [
+ "thin",
+ "light",
+ "regular",
+ "medium",
+ "bold",
+ "italic"
];
var SubjectTypography = function SubjectTypography(props) {
@@ -149,10 +230,10 @@ var SubjectTypography = function SubjectTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Subject-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -163,12 +244,12 @@ SubjectTypography.defaultProps = {
weight: 'regular'
};
SubjectTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var NewsTitle = function NewsTitle(props) {
@@ -179,11 +260,12 @@ var NewsTitle = function NewsTitle(props) {
color = props.color,
style = props.style,
size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
+ weight = props.weight,
+ disableHover = props.disableHover;
+ var classes = classnames__default['default']((_classnames = {
'Typography-NewsTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("h2", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, 'has-hover', !disableHover), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h2", {
className: classes,
style: style
}, children);
@@ -191,15 +273,17 @@ var NewsTitle = function NewsTitle(props) {
NewsTitle.defaultProps = {
color: 'primary-1',
size: 1,
- weight: 'regular'
+ weight: 'regular',
+ disableHover: false
};
NewsTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ disableHover: PropTypes__default['default'].bool,
+ size: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var Subtitle = function Subtitle(props) {
@@ -211,10 +295,10 @@ var Subtitle = function Subtitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Subtitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("h3", {
+ return /*#__PURE__*/React__default['default'].createElement("h3", {
className: classes,
style: style
}, children);
@@ -225,12 +309,12 @@ Subtitle.defaultProps = {
weight: 'regular'
};
Subtitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var Date$1 = function Date(props) {
@@ -242,10 +326,10 @@ var Date$1 = function Date(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Date-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -256,12 +340,12 @@ Date$1.defaultProps = {
weight: 'regular'
};
Date$1.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var Author = function Author(props) {
@@ -273,10 +357,10 @@ var Author = function Author(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Author-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -287,40 +371,52 @@ Author.defaultProps = {
weight: 'regular'
};
Author.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var Paragraph = function Paragraph(props) {
var _classnames;
var className = props.className,
- children = props.children,
color = props.color,
+ gutter = props.gutter,
style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
+ size = props.size,
+ weight = props.weight,
+ maxWidth = props.maxWidth,
+ setInnerHtml = props.setInnerHtml;
+ var classes = classnames__default['default']((_classnames = {
'Typography-Paragraph-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " ").concat(maxWidth), true), _defineProperty(_classnames, "gutter-".concat(gutter), gutter), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
- style: style
- }, children);
+ style: style,
+ gutter: gutter,
+ dangerouslySetInnerHTML: {
+ __html: setInnerHtml
+ }
+ });
};
Paragraph.defaultProps = {
color: 'black',
- size: 1
+ size: 1,
+ weight: 'regular',
+ maxWidth: 'md'
};
Paragraph.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights),
+ maxWidth: PropTypes__default['default'].oneOf(['sm', 'md', 'lg']),
+ setInnerHtml: PropTypes__default['default'].string
};
var Byline = function Byline(props) {
@@ -332,10 +428,10 @@ var Byline = function Byline(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Byline-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -346,12 +442,12 @@ Byline.defaultProps = {
weight: 'regular'
};
Byline.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var InterTitle = function InterTitle(props) {
@@ -363,10 +459,10 @@ var InterTitle = function InterTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-InterTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -377,12 +473,12 @@ InterTitle.defaultProps = {
weight: 'regular'
};
InterTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var Citation = function Citation(props) {
@@ -394,10 +490,10 @@ var Citation = function Citation(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Citation-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -408,12 +504,12 @@ Citation.defaultProps = {
weight: 'regular'
};
Citation.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var UrlLink = function UrlLink(props) {
@@ -425,10 +521,10 @@ var UrlLink = function UrlLink(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-UrlLink-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("a", {
+ return /*#__PURE__*/React__default['default'].createElement("a", {
className: classes,
style: style
}, children);
@@ -439,12 +535,12 @@ UrlLink.defaultProps = {
weight: 'regular'
};
UrlLink.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var TagTypography = function TagTypography(props) {
@@ -456,10 +552,10 @@ var TagTypography = function TagTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Tag-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
style: style
}, children);
@@ -470,40 +566,49 @@ TagTypography.defaultProps = {
weight: 'regular'
};
TagTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
-var SectionTitle = function SectionTitle(props) {
+var SectionTitle = function SectionTitle(_ref) {
var _classnames;
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
+ var className = _ref.className,
+ children = _ref.children,
+ color = _ref.color,
+ gutter = _ref.gutter,
+ style = _ref.style,
+ size = _ref.size,
+ uppercase = _ref.uppercase,
+ weight = _ref.weight;
+ var classes = classnames__default['default']((_classnames = {
'Typography-SectionTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " mb-").concat(gutter), true), _defineProperty(_classnames, 'uppercase', uppercase), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h1", {
className: classes,
style: style
}, children);
};
SectionTitle.defaultProps = {
color: 'primary-1',
- size: 1
+ gutter: 1,
+ size: 1,
+ weight: 'regular',
+ uppercase: true
};
SectionTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ uppercase: PropTypes__default['default'].bool,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var EditorialTitle = function EditorialTitle(props) {
@@ -515,10 +620,10 @@ var EditorialTitle = function EditorialTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-EditorialTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -529,12 +634,12 @@ EditorialTitle.defaultProps = {
weight: 'regular'
};
EditorialTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var ButtonTypography = function ButtonTypography(props) {
@@ -546,10 +651,10 @@ var ButtonTypography = function ButtonTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Button-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
style: style
}, children);
@@ -560,12 +665,12 @@ ButtonTypography.defaultProps = {
weight: 'regular'
};
ButtonTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].object, PropTypes__default['default'].array]),
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var MostReadNumber = function MostReadNumber(props) {
@@ -577,10 +682,10 @@ var MostReadNumber = function MostReadNumber(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MostReadNumber-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -591,12 +696,12 @@ MostReadNumber.defaultProps = {
weight: 'regular'
};
MostReadNumber.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var MenuSideTitle = function MenuSideTitle(props) {
@@ -608,10 +713,10 @@ var MenuSideTitle = function MenuSideTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuSideTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -622,12 +727,12 @@ MenuSideTitle.defaultProps = {
weight: 'regular'
};
MenuSideTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var MenuSideItem = function MenuSideItem(props) {
@@ -639,10 +744,10 @@ var MenuSideItem = function MenuSideItem(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuSideItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -653,12 +758,12 @@ MenuSideItem.defaultProps = {
weight: 'regular'
};
MenuSideItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var MenuTopItem = function MenuTopItem(props) {
@@ -670,10 +775,10 @@ var MenuTopItem = function MenuTopItem(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuTopItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -684,77 +789,12 @@ MenuTopItem.defaultProps = {
weight: 'regular'
};
MenuTopItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
-};
-
-var pathToImage = function pathToImage(derivative, domain, policy_id, width) {
- if (!policy_id) return null;
- var w = width || 1000;
- var r = domain || 'https://costanorte.com.br';
- var d = derivative || '2x1';
- var id = policy_id.split('.');
- var string = id.length > 2 ? "".concat(policy_id, ":").concat(id[2]) : "".concat(policy_id);
- var path = "".concat(r, "/image/policy:").concat(string, "/image.jpg?f=").concat(d, "&w=").concat(w);
- return path;
-};
-
-var Image = function Image(_ref) {
- var children = _ref.children,
- content = _ref.content,
- custom = _ref.custom,
- domain = _ref.domain,
- height = _ref.height,
- lazy = _ref.lazy,
- placeholder = _ref.placeholder;
- var img_placeholder = placeholder || null;
-
- if (content['image-contentId']) {
- var policy_id = content['image-contentId'];
- var derivative = '2x1';
- var width = 1000;
- content['image-path'] = pathToImage(derivative, domain, policy_id, width);
- img_placeholder = img_placeholder || pathToImage(derivative, domain, policy_id, 10);
- }
-
- var content_path = content['image-path'];
- var image_style;
-
- if (lazy) {
- image_style = {
- backgroundImage: "url(".concat(lazy(content_path, img_placeholder), ")")
- };
- } else {
- image_style = {
- backgroundImage: "url(".concat(content_path, ")")
- };
- }
-
- if (height) {
- image_style.height = height;
- }
-
- return /*#__PURE__*/React.createElement("div", {
- className: "image-background ".concat(custom || ''),
- style: image_style
- }, children && children);
-};
-
-Image.propTypes = {
- children: PropTypes.node,
- content: PropTypes.object.isRequired,
- custom: PropTypes.string,
- domain: PropTypes.string,
- height: PropTypes.string,
- lazy: PropTypes.func,
- placeholder: PropTypes.string
-};
-Image.defaultProps = {
- content: {}
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weights)
};
var Subject = function Subject(props) {
@@ -765,18 +805,20 @@ var Subject = function Subject(props) {
className = props.className,
style = props.style,
size = props.size,
- filled = props.filled;
+ filled = props.filled,
+ weight = props.weight;
if (!children) return null;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Prensa-Subject-root': true,
'filled': filled
}, _defineProperty(_classnames, "color-".concat(color), true), _defineProperty(_classnames, "".concat(className), className), _classnames));
- return /*#__PURE__*/React.createElement("div", {
+ return /*#__PURE__*/React__default['default'].createElement("div", {
className: classes,
style: style
- }, /*#__PURE__*/React.createElement(SubjectTypography, {
+ }, /*#__PURE__*/React__default['default'].createElement(SubjectTypography, {
size: size,
- color: filled ? 'color-white' : color
+ color: filled ? 'white' : color,
+ weight: weight
}, children));
};
@@ -786,12 +828,13 @@ Subject.defaultProps = {
size: 1
};
Subject.propTypes = {
- children: PropTypes.string.isRequired,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- filled: PropTypes.bool,
- style: PropTypes.object,
- size: PropTypes.oneOf([1, 2, 3])
+ children: PropTypes__default['default'].string.isRequired,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ filled: PropTypes__default['default'].bool,
+ style: PropTypes__default['default'].object,
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ weight: PropTypes__default['default'].oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
};
function requiredArgs(required, args) {
@@ -4054,7 +4097,16 @@ var Teaser = function Teaser(_ref) {
hasDate = _ref.hasDate,
lazy = _ref.lazy,
subjectColor = _ref.subjectColor,
- subjectSize = _ref.subjectSize;
+ subjectSize = _ref.subjectSize,
+ titleSize = _ref.titleSize,
+ subtitleSize = _ref.subtitleSize,
+ dateSize = _ref.dateSize,
+ titleColor = _ref.titleColor,
+ subtitleColor = _ref.subtitleColor,
+ dateColor = _ref.dateColor,
+ titleWeight = _ref.titleWeight,
+ subtitleWeight = _ref.subtitleWeight,
+ dateWeight = _ref.dateWeight;
var image = content.image,
name = content.name,
path = content.path,
@@ -4106,55 +4158,71 @@ var Teaser = function Teaser(_ref) {
var url_rewrite = path_split.length > 1 ? "".concat(domain).concat(path_split[1]) : path;
var TeaserImage = function TeaserImage() {
- return /*#__PURE__*/React.createElement(Block, propsImage, /*#__PURE__*/React.createElement("a", {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsImage, /*#__PURE__*/React__default['default'].createElement("a", {
className: "teaser-aria",
href: url_rewrite,
"aria-label": "Imagem da mat\xE9ria ".concat(name)
- }, /*#__PURE__*/React.createElement(Image, {
+ }, /*#__PURE__*/React__default['default'].createElement(Image, {
domain: domain,
content: image,
lazy: lazy
})));
};
- return /*#__PURE__*/React.createElement(Block, propsTeaser, /*#__PURE__*/React.createElement(TeaserImage, null), /*#__PURE__*/React.createElement(Block, propsContent, /*#__PURE__*/React.createElement(Block, null, subject && /*#__PURE__*/React.createElement(Block, propsSubject, /*#__PURE__*/React.createElement(Subject, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsTeaser, /*#__PURE__*/React__default['default'].createElement(TeaserImage, null), /*#__PURE__*/React__default['default'].createElement(Block, propsContent, /*#__PURE__*/React__default['default'].createElement(Block, null, subject && /*#__PURE__*/React__default['default'].createElement(Block, propsSubject, /*#__PURE__*/React__default['default'].createElement(Subject, {
size: subjectSize,
color: subjectColor,
- filled: hasSubjectFilled
- }, subject))), /*#__PURE__*/React.createElement(Block, null, /*#__PURE__*/React.createElement(Block, propsTitle, /*#__PURE__*/React.createElement("a", {
+ filled: hasSubjectFilled,
+ weight: "bold"
+ }, subject))), /*#__PURE__*/React__default['default'].createElement(Block, null, /*#__PURE__*/React__default['default'].createElement(Block, propsTitle, /*#__PURE__*/React__default['default'].createElement("a", {
className: "teaser-aria",
href: url_rewrite,
"aria-label": "Abrir mat\xE9ria ".concat(name)
- }, /*#__PURE__*/React.createElement(NewsTitle, {
- custom: "teaser-title"
- }, name))), subtitle && hasSubtitle && /*#__PURE__*/React.createElement(Block, propsSubTitle, /*#__PURE__*/React.createElement(Subtitle, {
- custom: "teaser-subtitle"
- }, subtitle))), /*#__PURE__*/React.createElement(Block, propsDateContainer, dateValue && hasDate && /*#__PURE__*/React.createElement(Block, propsDate, /*#__PURE__*/React.createElement(Date$1, {
- custom: "teaser-datetime"
+ }, /*#__PURE__*/React__default['default'].createElement(NewsTitle, {
+ size: titleSize,
+ color: titleColor,
+ weight: titleWeight
+ }, name))), subtitle && hasSubtitle && /*#__PURE__*/React__default['default'].createElement(Block, propsSubTitle, /*#__PURE__*/React__default['default'].createElement(Subtitle, {
+ size: subtitleSize,
+ color: subtitleColor,
+ weight: subtitleWeight
+ }, subtitle))), /*#__PURE__*/React__default['default'].createElement(Block, propsDateContainer, dateValue && hasDate && /*#__PURE__*/React__default['default'].createElement(Block, propsDate, /*#__PURE__*/React__default['default'].createElement(Date$1, {
+ size: dateSize,
+ color: dateColor,
+ weight: dateWeight
}, dateValue)))));
};
Teaser.propTypes = {
- content: PropTypes.shape((_PropTypes$shape = {
- image: PropTypes.object,
- name: PropTypes.string,
- path: PropTypes.string,
- subtitle: PropTypes.string,
- subject: PropTypes.string
- }, _defineProperty(_PropTypes$shape, 'time-published', PropTypes.string), _defineProperty(_PropTypes$shape, 'time-modified', PropTypes.string), _PropTypes$shape)),
- datePublished: PropTypes.bool,
- domain: PropTypes.string,
- hasImageTop: PropTypes.bool,
- hasSubtitle: PropTypes.bool,
- hasDate: PropTypes.bool,
- hasSubjectFilled: PropTypes.bool,
- lazy: PropTypes.func,
- status: PropTypes.shape({
- loading: PropTypes.bool,
- error: PropTypes.bool
+ content: PropTypes__default['default'].shape((_PropTypes$shape = {
+ image: PropTypes__default['default'].object,
+ name: PropTypes__default['default'].string,
+ path: PropTypes__default['default'].string,
+ subtitle: PropTypes__default['default'].string,
+ subject: PropTypes__default['default'].string
+ }, _defineProperty(_PropTypes$shape, 'time-published', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape, 'time-modified', PropTypes__default['default'].string), _PropTypes$shape)),
+ datePublished: PropTypes__default['default'].bool,
+ domain: PropTypes__default['default'].string,
+ hasImageTop: PropTypes__default['default'].bool,
+ hasSubtitle: PropTypes__default['default'].bool,
+ hasDate: PropTypes__default['default'].bool,
+ hasSubjectFilled: PropTypes__default['default'].bool,
+ lazy: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].shape({
+ loading: PropTypes__default['default'].bool,
+ error: PropTypes__default['default'].bool
}),
- subjectColor: PropTypes.oneOf(colors),
- subjectSize: PropTypes.oneOf([1, 2, 3])
+ subjectColor: PropTypes__default['default'].oneOf(colors),
+ subjectSize: PropTypes__default['default'].oneOf([1, 2, 3]),
+ titleSize: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ subtitleSize: PropTypes__default['default'].oneOf([1]),
+ dateSize: PropTypes__default['default'].oneOf([1]),
+ titleColor: PropTypes__default['default'].oneOf(colors),
+ subtitleColor: PropTypes__default['default'].oneOf(colors),
+ dateColor: PropTypes__default['default'].oneOf(colors),
+ titleWeight: PropTypes__default['default'].oneOf(weights),
+ subtitleWeight: PropTypes__default['default'].oneOf(weights),
+ dateWeight: PropTypes__default['default'].oneOf(weights)
};
Teaser.defaultProps = {
hasSubjectFilled: false,
@@ -4165,13 +4233,14 @@ Teaser.defaultProps = {
subjectColor: 'primary-1'
};
-var Columnists = function Columnists(props) {
- var content = props.content,
- domain = props.domain,
- lazy = props.lazy,
- status = props.status;
- var title = content.title,
- color = content.color;
+var Columnists = function Columnists(_ref) {
+ var content = _ref.content,
+ domain = _ref.domain,
+ lazy = _ref.lazy,
+ status = _ref.status,
+ theme = _ref.theme;
+ var title = content.title;
+ var color = theme.color;
var propsTemplate = {
custom: 'templates-columnists',
mb: '6',
@@ -4180,46 +4249,64 @@ var Columnists = function Columnists(props) {
mb: '3'
}
};
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && title !== '' && /*#__PURE__*/React.createElement(SectionTitle, {
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, title && title !== '' && /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
color: color
- }, title), /*#__PURE__*/React.createElement(Block, propsTemplate, lodash.map(content['items'], function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ }, title), /*#__PURE__*/React__default['default'].createElement(Block, propsTemplate, lodash.map(content['items'], function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
key: key,
lazy: lazy,
- status: status
+ status: status,
+ subjectSize: 2,
+ titleSize: 2,
+ titleWeight: "bold",
+ titleColor: "neutral-2",
+ dateColor: "neutral-4",
+ subjectColor: color
});
})));
};
Columnists.propTypes = {
- content: PropTypes.shape({
- title: PropTypes.string,
- color: PropTypes.string
+ content: PropTypes__default['default'].shape({
+ title: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].string,
+ items: PropTypes__default['default'].array
}),
- domain: PropTypes.string,
- lazy: PropTypes.func,
- status: PropTypes.object
+ domain: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].object,
+ theme: PropTypes__default['default'].shape({
+ color: PropTypes__default['default'].oneOf(colors)
+ })
};
-var Featured = function Featured(props) {
- var content = props.content,
- domain = props.domain,
- lazy = props.lazy,
- status = props.status;
+var Featured = function Featured(_ref) {
+ var content = _ref.content,
+ domain = _ref.domain,
+ lazy = _ref.lazy,
+ status = _ref.status,
+ theme = _ref.theme;
+ var color = theme.color;
var items = content.items;
if (items.length === 1) {
- return /*#__PURE__*/React.createElement(Block, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, {
custom: "templates-featured one"
- }, /*#__PURE__*/React.createElement(Teaser, {
+ }, /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: items[0],
domain: domain,
hasSubjectFilled: true,
hasSubtitle: true,
lazy: lazy,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: 4,
+ titleWeight: "bold"
}));
}
@@ -4232,27 +4319,48 @@ var Featured = function Featured(props) {
mb: '5'
}
};
- return /*#__PURE__*/React.createElement(Block, propsTemplate, /*#__PURE__*/React.createElement(Block, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsTemplate, /*#__PURE__*/React__default['default'].createElement(Block, {
custom: "block-left"
- }, /*#__PURE__*/React.createElement(Teaser, {
+ }, /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: items[0],
domain: domain,
hasSubjectFilled: true,
hasSubtitle: true,
lazy: lazy,
- status: status
- })), /*#__PURE__*/React.createElement(Block, {
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: 4,
+ titleColor: "neutral-2",
+ subtitleColor: "neutral-4",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
+ })), /*#__PURE__*/React__default['default'].createElement(Block, {
custom: "block-right"
- }, /*#__PURE__*/React.createElement(Teaser, {
+ }, /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: items[1],
domain: domain,
lazy: lazy,
- status: status
- }), /*#__PURE__*/React.createElement(Teaser, {
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: 3,
+ titleColor: "neutral-2",
+ subtitleColor: "neutral-4",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
+ }), /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: items[2],
domain: domain,
lazy: lazy,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: 3,
+ titleColor: "neutral-2",
+ subtitleColor: "neutral-4",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
})));
}
@@ -4260,20 +4368,26 @@ var Featured = function Featured(props) {
};
Featured.propTypes = {
- content: PropTypes.object,
- domain: PropTypes.string,
- lazy: PropTypes.func,
- status: PropTypes.object
+ content: PropTypes__default['default'].object,
+ domain: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].object,
+ theme: PropTypes__default['default'].shape({
+ color: PropTypes__default['default'].oneOf(colors)
+ })
};
-var GridNews = function GridNews(props) {
- var content = props.content,
- domain = props.domain,
- lazy = props.lazy,
- status = props.status;
+var GridNews = function GridNews(_ref) {
+ var content = _ref.content,
+ domain = _ref.domain,
+ lazy = _ref.lazy,
+ status = _ref.status,
+ theme = _ref.theme;
+ var color = theme.color;
var items = content.items,
- title = content.title,
- color = content.color;
+ title = content.title;
+ var items_pqueue = content['items-pqueue'];
+ var items_list = items_pqueue && items_pqueue.length > 0 ? items_pqueue : items;
var propsTemplate = {
align: 'between',
custom: 'templates-newsgrid',
@@ -4283,47 +4397,72 @@ var GridNews = function GridNews(props) {
mb: '5'
}
};
+ var titleSize;
- if (items.length === 2) {
+ if (items_list.length === 2) {
propsTemplate.custom = 'templates-newsgrid two';
+ titleSize = 3;
}
- if (items.length === 3) {
+ if (items_list.length === 3) {
propsTemplate.custom = 'templates-newsgrid three';
+ titleSize = 3;
}
- if (items.length === 4) {
+ if (items_list.length === 4) {
propsTemplate.custom = 'templates-newsgrid four';
+ titleSize = 3;
}
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && title !== '' && /*#__PURE__*/React.createElement(SectionTitle, {
+ if (items_list.length === 5) {
+ propsTemplate.custom = 'templates-newsgrid five';
+ }
+
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, title && title !== '' && /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
color: color
- }, title), /*#__PURE__*/React.createElement(Block, propsTemplate, lodash.map(items, function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ }, title), /*#__PURE__*/React__default['default'].createElement(Block, propsTemplate, lodash.map(items_list, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
key: key,
content: item,
domain: domain,
hasImageTop: true,
lazy: lazy,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: titleSize,
+ titleColor: "neutral-2",
+ subtitleColor: "neutral-4",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
});
})));
};
GridNews.propTypes = {
- content: PropTypes.shape({
- items: PropTypes.array,
- title: PropTypes.string,
- color: PropTypes.string
+ content: PropTypes__default['default'].shape({
+ items: PropTypes__default['default'].array,
+ title: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].string
}),
- domain: PropTypes.string,
- lazy: PropTypes.func,
- status: PropTypes.object
+ domain: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].object,
+ theme: PropTypes__default['default'].shape({
+ color: PropTypes__default['default'].oneOf(colors)
+ })
};
-var MostReadItem = function MostReadItem(_ref) {
+var TeaserMostRead = function TeaserMostRead(_ref) {
var content = _ref.content,
- number = _ref.number;
+ number = _ref.number,
+ titleSize = _ref.titleSize,
+ titleColor = _ref.titleColor,
+ titleWeight = _ref.titleWeight,
+ numberColor = _ref.numberColor,
+ circleColor = _ref.circleColor;
var name = content.name,
path = content.path;
var propsMostItem = {
@@ -4340,7 +4479,8 @@ var MostReadItem = function MostReadItem(_ref) {
w: '100p-3'
};
var propsNumber = {
- custom: 'most-read-number'
+ custom: 'most-read-number',
+ bg: "color-".concat(circleColor)
};
var propsTitle = {
custom: 'most-read-title',
@@ -4349,49 +4489,77 @@ var MostReadItem = function MostReadItem(_ref) {
align: 'middle'
};
var position = number + 1;
- return /*#__PURE__*/React.createElement(Block, propsMostItem, /*#__PURE__*/React.createElement(Block, _extends({}, propsContent, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsMostItem, /*#__PURE__*/React__default['default'].createElement(Block, _extends({}, propsContent, {
align: "row"
- }), /*#__PURE__*/React.createElement(Block, _extends({}, propsNumber, {
+ }), /*#__PURE__*/React__default['default'].createElement(Block, _extends({}, propsNumber, {
align: "row center middle"
- }), position), /*#__PURE__*/React.createElement(Block, propsTitle, /*#__PURE__*/React.createElement("a", {
+ }), /*#__PURE__*/React__default['default'].createElement(MostReadNumber, {
+ color: numberColor,
+ weight: titleWeight
+ }, position)), /*#__PURE__*/React__default['default'].createElement(Block, propsTitle, /*#__PURE__*/React__default['default'].createElement("a", {
className: "teaser-aria",
href: path,
"aria-label": "Abrir mat\xE9ria ".concat(name)
- }, /*#__PURE__*/React.createElement(MostReadNumber, {
- custom: "teaser-title"
+ }, /*#__PURE__*/React__default['default'].createElement(NewsTitle, {
+ color: titleColor,
+ size: titleSize,
+ weight: titleWeight
}, name)))));
};
-MostReadItem.propTypes = {
- content: PropTypes.shape({
- name: PropTypes.string,
- path: PropTypes.string
+TeaserMostRead.propTypes = {
+ content: PropTypes__default['default'].shape({
+ name: PropTypes__default['default'].string,
+ path: PropTypes__default['default'].string
}),
- number: PropTypes.number
+ circleColor: PropTypes__default['default'].oneOf(colors),
+ number: PropTypes__default['default'].number,
+ titleSize: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ titleColor: PropTypes__default['default'].oneOf(colors),
+ titleWeight: PropTypes__default['default'].oneOf(weights),
+ numberColor: PropTypes__default['default'].oneOf(colors)
};
-var MostRead = function MostRead(props) {
- var content = props.content,
- domain = props.domain,
- status = props.status;
+var MostRead = function MostRead(_ref) {
+ var content = _ref.content,
+ domain = _ref.domain,
+ status = _ref.status,
+ titleSize = _ref.titleSize,
+ titleColor = _ref.titleColor,
+ titleWeight = _ref.titleWeight,
+ numberColor = _ref.numberColor,
+ circleColor = _ref.circleColor;
var propsTemplate = {
custom: 'templates-most-read'
};
- return /*#__PURE__*/React.createElement(Block, propsTemplate, lodash.map(content, function (item, key) {
- return /*#__PURE__*/React.createElement(MostReadItem, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsTemplate, lodash.map(content, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(TeaserMostRead, {
content: item,
domain: domain,
key: key,
status: status,
- number: key
+ number: key,
+ titleSize: titleSize,
+ titleColor: titleColor,
+ titleWeight: titleWeight,
+ numberColor: numberColor,
+ circleColor: circleColor
});
}));
};
+MostRead.defaultProps = {
+ numberColor: 'white'
+};
MostRead.propTypes = {
- content: PropTypes.array,
- domain: PropTypes.string,
- status: PropTypes.object
+ content: PropTypes__default['default'].array,
+ circleColor: PropTypes__default['default'].oneOf(colors),
+ domain: PropTypes__default['default'].string,
+ status: PropTypes__default['default'].object,
+ titleSize: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ titleColor: PropTypes__default['default'].oneOf(colors),
+ titleWeight: PropTypes__default['default'].oneOf(weights),
+ numberColor: PropTypes__default['default'].oneOf(colors)
};
var Latest = function Latest(_ref) {
@@ -4400,7 +4568,9 @@ var Latest = function Latest(_ref) {
lazy = _ref.lazy,
ReadMore = _ref.ReadMore,
Title = _ref.Title,
- status = _ref.status;
+ status = _ref.status,
+ theme = _ref.theme;
+ var color = theme.color;
var propsContainer = {
custom: 'templates-latest-news',
align: 'col left',
@@ -4416,10 +4586,10 @@ var Latest = function Latest(_ref) {
var propsPageRight = {
custom: 'page-right'
};
- return /*#__PURE__*/React.createElement(Block, propsContainer, /*#__PURE__*/React.createElement(Block, propsPageLeft, Title && /*#__PURE__*/React.createElement(Title, null), /*#__PURE__*/React.createElement(Block, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsContainer, /*#__PURE__*/React__default['default'].createElement(Block, propsPageLeft, Title && /*#__PURE__*/React__default['default'].createElement(Title, null), /*#__PURE__*/React__default['default'].createElement(Block, {
custom: "latest-news"
}, lodash.map(content['items-latest'], function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
datePublished: true,
domain: domain,
@@ -4427,22 +4597,40 @@ var Latest = function Latest(_ref) {
hasImageTop: true,
key: key,
lazy: lazy,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: 3,
+ titleColor: "neutral-2",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
});
- })), ReadMore && /*#__PURE__*/React.createElement(ReadMore, null)), /*#__PURE__*/React.createElement(Block, propsPageRight, /*#__PURE__*/React.createElement(SectionTitle, null, "MAIS LIDAS"), /*#__PURE__*/React.createElement(MostRead, {
+ })), ReadMore && /*#__PURE__*/React__default['default'].createElement(ReadMore, null)), /*#__PURE__*/React__default['default'].createElement(Block, propsPageRight, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
+ color: color
+ }, "MAIS LIDAS"), /*#__PURE__*/React__default['default'].createElement(MostRead, {
content: content['items-mostread'],
- status: status
+ status: status,
+ titleSize: 2,
+ titleColor: "neutral-2",
+ titleWeight: "bold",
+ circleColor: color
})));
};
Latest.propTypes = {
- content: PropTypes.object,
- lazy: PropTypes.func,
- ReadMore: PropTypes.func,
- Title: PropTypes.func,
- status: PropTypes.shape({
- error: PropTypes.bool,
- loading: PropTypes.bool
+ content: PropTypes__default['default'].object,
+ domain: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ ReadMore: PropTypes__default['default'].func,
+ Title: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].shape({
+ error: PropTypes__default['default'].bool,
+ loading: PropTypes__default['default'].bool
+ }),
+ theme: PropTypes__default['default'].shape({
+ color: PropTypes__default['default'].oneOf(colors)
})
};
@@ -4451,93 +4639,155 @@ var Related = function Related(_ref) {
domain = _ref.domain,
lazy = _ref.lazy,
ReadMore = _ref.ReadMore,
- status = _ref.status;
+ status = _ref.status,
+ theme = _ref.theme;
+ var color = theme.color;
var propsContainer = {
custom: 'templates-related-news',
align: 'col left',
w: '100p'
};
- return /*#__PURE__*/React.createElement(Block, propsContainer, /*#__PURE__*/React.createElement(Block, {
+ return /*#__PURE__*/React__default['default'].createElement(Block, propsContainer, /*#__PURE__*/React__default['default'].createElement(Block, {
custom: "related-news",
w: "100p"
}, lodash.map(items, function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
hasSubjectFilled: true,
hasImageTop: false,
key: key,
lazy: lazy,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: color,
+ titleSize: 3,
+ titleColor: "neutral-2",
+ dateColor: "neutral-2",
+ titleWeight: "bold"
});
- })), ReadMore && /*#__PURE__*/React.createElement(ReadMore, null));
+ })), ReadMore && /*#__PURE__*/React__default['default'].createElement(ReadMore, null));
};
Related.propTypes = {
- domain: PropTypes.string,
- items: PropTypes.array,
- lazy: PropTypes.func,
- ReadMore: PropTypes.func,
- status: PropTypes.shape({
- error: PropTypes.bool,
- loading: PropTypes.bool
+ domain: PropTypes__default['default'].string,
+ items: PropTypes__default['default'].array,
+ lazy: PropTypes__default['default'].func,
+ ReadMore: PropTypes__default['default'].func,
+ status: PropTypes__default['default'].shape({
+ error: PropTypes__default['default'].bool,
+ loading: PropTypes__default['default'].bool
+ }),
+ theme: PropTypes__default['default'].shape({
+ color: PropTypes__default['default'].oneOf(colors)
})
};
-var Subjects = function Subjects(props) {
- var content = props.content,
- domain = props.domain,
- lazy = props.lazy,
- ReadMore = props.ReadMore,
- status = props.status;
+var _PropTypes$shape$1;
+
+var Subjects = function Subjects(_ref) {
+ var content = _ref.content,
+ domain = _ref.domain,
+ lazy = _ref.lazy,
+ readMoreButton = _ref.readMoreButton,
+ status = _ref.status;
var title = content.title;
+ var leftColor = content['style-left'];
+ var centerColor = content['style-center'];
+ var rightColor = content['style-right'];
+ var titleLeft = content['title-left'];
+ var titleCenter = content['title-center'];
+ var titleRight = content['title-right'];
var propsTemplate = {
custom: 'templates-subjects',
lg: {
align: 'row between'
}
};
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && title !== '' && /*#__PURE__*/React.createElement(SectionTitle, {
+ var pqueue_left = content['items-left-pqueue'];
+ var pqueue_center = content['items-center-pqueue'];
+ var pqueue_right = content['items-right-pqueue'];
+ var items_left = pqueue_left && pqueue_left.length > 0 ? pqueue_left : content['items-left'];
+ var items_center = pqueue_center && pqueue_center.length > 0 ? pqueue_center : content['items-center'];
+ var items_right = pqueue_right && pqueue_right.length > 0 ? pqueue_right : content['items-right'];
+ return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, title && title !== '' && /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
name: title
- }), /*#__PURE__*/React.createElement(Block, propsTemplate, /*#__PURE__*/React.createElement(Block, {
- custom: "col left ".concat(content['style-left'])
- }, /*#__PURE__*/React.createElement(SectionTitle, null, content['title-left']), lodash.map(content['items-left'], function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ }), /*#__PURE__*/React__default['default'].createElement(Block, propsTemplate, /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "col left"
+ }, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
+ color: leftColor
+ }, titleLeft), lodash.map(items_left, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
lazy: lazy,
key: key,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: leftColor,
+ titleSize: 2,
+ titleColor: "neutral-2",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
});
- }), ReadMore && /*#__PURE__*/React.createElement(ReadMore, null)), /*#__PURE__*/React.createElement(Block, {
- custom: "col center ".concat(content['style-center'])
- }, /*#__PURE__*/React.createElement(SectionTitle, null, content['title-center']), lodash.map(content['items-center'], function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ }), readMoreButton && readMoreButton), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "col center"
+ }, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
+ color: centerColor
+ }, titleCenter), lodash.map(items_center, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
lazy: lazy,
key: key,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: centerColor,
+ titleSize: 2,
+ titleColor: "neutral-2",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
});
- }), ReadMore && /*#__PURE__*/React.createElement(ReadMore, null)), /*#__PURE__*/React.createElement(Block, {
- custom: "col right ".concat(content['style-right'])
- }, /*#__PURE__*/React.createElement(SectionTitle, null, content['title-right']), lodash.map(content['items-right'], function (item, key) {
- return /*#__PURE__*/React.createElement(Teaser, {
+ }), readMoreButton && readMoreButton), /*#__PURE__*/React__default['default'].createElement(Block, {
+ custom: "col right"
+ }, /*#__PURE__*/React__default['default'].createElement(SectionTitle, {
+ weight: "bold",
+ gutter: 3,
+ color: rightColor
+ }, titleRight), lodash.map(items_right, function (item, key) {
+ return /*#__PURE__*/React__default['default'].createElement(Teaser, {
content: item,
domain: domain,
lazy: lazy,
key: key,
- status: status
+ status: status,
+ subjectSize: 2,
+ subjectColor: rightColor,
+ titleSize: 2,
+ titleColor: "neutral-2",
+ dateColor: "neutral-4",
+ titleWeight: "bold"
});
- }), ReadMore && /*#__PURE__*/React.createElement(ReadMore, null))));
+ }), readMoreButton && readMoreButton)));
};
Subjects.propTypes = {
- content: PropTypes.object,
- domain: PropTypes.string,
- lazy: PropTypes.func,
- ReadMore: PropTypes.func,
- status: PropTypes.object
+ content: PropTypes__default['default'].shape((_PropTypes$shape$1 = {
+ contentId: PropTypes__default['default'].string,
+ name: PropTypes__default['default'].string,
+ template: PropTypes__default['default'].string,
+ title: PropTypes__default['default'].string
+ }, _defineProperty(_PropTypes$shape$1, 'input-template', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape$1, 'items-center', PropTypes__default['default'].object), _defineProperty(_PropTypes$shape$1, 'items-center-pqueue', PropTypes__default['default'].object), _defineProperty(_PropTypes$shape$1, 'items-left', PropTypes__default['default'].object), _defineProperty(_PropTypes$shape$1, 'items-left-pqueue', PropTypes__default['default'].object), _defineProperty(_PropTypes$shape$1, 'items-right', PropTypes__default['default'].object), _defineProperty(_PropTypes$shape$1, 'items-right-pqueue', PropTypes__default['default'].object), _defineProperty(_PropTypes$shape$1, 'style-center', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape$1, 'style-left', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape$1, 'style-right', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape$1, 'title-center', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape$1, 'title-left', PropTypes__default['default'].string), _defineProperty(_PropTypes$shape$1, 'title-right', PropTypes__default['default'].string), _PropTypes$shape$1)),
+ domain: PropTypes__default['default'].string,
+ lazy: PropTypes__default['default'].func,
+ readMoreButton: PropTypes__default['default'].oneOf([PropTypes__default['default'].object, PropTypes__default['default'].element]),
+ status: PropTypes__default['default'].object
};
exports.Columnists = Columnists;
diff --git a/typography.js b/typography.js
index 5f8df53d7..3bd1855ab 100644
--- a/typography.js
+++ b/typography.js
@@ -2,11 +2,15 @@
Object.defineProperty(exports, '__esModule', { value: true });
-function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
+var classnames = require('classnames');
+var PropTypes = require('prop-types');
+var React = require('react');
-var classnames = _interopDefault(require('classnames'));
-var PropTypes = _interopDefault(require('prop-types'));
-var React = _interopDefault(require('react'));
+function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
+
+var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
+var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
+var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
function _defineProperty(obj, key, value) {
if (key in obj) {
@@ -30,12 +34,17 @@ var colors = [
"secondary-1",
"secondary-2",
"secondary-3",
+ "product-1",
+ "product-2",
+ "product-3",
+ "product-4",
+ "product-5",
"editorial-1",
"editorial-2",
"editorial-3",
"editorial-4",
"editorial-5",
- "black:",
+ "black",
"neutral-1",
"neutral-2",
"neutral-3",
@@ -47,7 +56,7 @@ var colors = [
"neutral-9",
"neutral-10",
"neutral-11",
- "white:",
+ "white",
"ads",
"success-1",
"success-2",
@@ -57,6 +66,15 @@ var colors = [
"error-3"
];
+var weight = [
+ "thin",
+ "light",
+ "regular",
+ "medium",
+ "bold",
+ "italic"
+];
+
var SubjectTypography = function SubjectTypography(props) {
var _classnames;
@@ -66,10 +84,10 @@ var SubjectTypography = function SubjectTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Subject-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -80,12 +98,12 @@ SubjectTypography.defaultProps = {
weight: 'regular'
};
SubjectTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1, 2, 3]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var NewsTitle = function NewsTitle(props) {
@@ -96,11 +114,12 @@ var NewsTitle = function NewsTitle(props) {
color = props.color,
style = props.style,
size = props.size,
- weight = props.weight;
- var classes = classnames((_classnames = {
+ weight = props.weight,
+ disableHover = props.disableHover;
+ var classes = classnames__default['default']((_classnames = {
'Typography-NewsTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("h2", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, 'has-hover', !disableHover), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h2", {
className: classes,
style: style
}, children);
@@ -108,15 +127,17 @@ var NewsTitle = function NewsTitle(props) {
NewsTitle.defaultProps = {
color: 'primary-1',
size: 1,
- weight: 'regular'
+ weight: 'regular',
+ disableHover: false
};
NewsTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1, 2, 3, 4, 5, 6, 7]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ disableHover: PropTypes__default['default'].bool,
+ size: PropTypes__default['default'].oneOf([1, 2, 3, 4, 5, 6, 7]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Subtitle = function Subtitle(props) {
@@ -128,10 +149,10 @@ var Subtitle = function Subtitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Subtitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("h3", {
+ return /*#__PURE__*/React__default['default'].createElement("h3", {
className: classes,
style: style
}, children);
@@ -142,12 +163,12 @@ Subtitle.defaultProps = {
weight: 'regular'
};
Subtitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Date = function Date(props) {
@@ -159,10 +180,10 @@ var Date = function Date(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Date-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -173,12 +194,12 @@ Date.defaultProps = {
weight: 'regular'
};
Date.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Author = function Author(props) {
@@ -190,10 +211,10 @@ var Author = function Author(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Author-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -204,40 +225,52 @@ Author.defaultProps = {
weight: 'regular'
};
Author.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Paragraph = function Paragraph(props) {
var _classnames;
var className = props.className,
- children = props.children,
color = props.color,
+ gutter = props.gutter,
style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
+ size = props.size,
+ weight = props.weight,
+ maxWidth = props.maxWidth,
+ setInnerHtml = props.setInnerHtml;
+ var classes = classnames__default['default']((_classnames = {
'Typography-Paragraph-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " ").concat(maxWidth), true), _defineProperty(_classnames, "gutter-".concat(gutter), gutter), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
- style: style
- }, children);
+ style: style,
+ gutter: gutter,
+ dangerouslySetInnerHTML: {
+ __html: setInnerHtml
+ }
+ });
};
Paragraph.defaultProps = {
color: 'black',
- size: 1
+ size: 1,
+ weight: 'regular',
+ maxWidth: 'md'
};
Paragraph.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight),
+ maxWidth: PropTypes__default['default'].oneOf(['sm', 'md', 'lg']),
+ setInnerHtml: PropTypes__default['default'].string
};
var Byline = function Byline(props) {
@@ -249,10 +282,10 @@ var Byline = function Byline(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Byline-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -263,12 +296,12 @@ Byline.defaultProps = {
weight: 'regular'
};
Byline.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var InterTitle = function InterTitle(props) {
@@ -280,10 +313,10 @@ var InterTitle = function InterTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-InterTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -294,12 +327,12 @@ InterTitle.defaultProps = {
weight: 'regular'
};
InterTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var Citation = function Citation(props) {
@@ -311,10 +344,10 @@ var Citation = function Citation(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Citation-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -325,12 +358,12 @@ Citation.defaultProps = {
weight: 'regular'
};
Citation.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var UrlLink = function UrlLink(props) {
@@ -342,10 +375,10 @@ var UrlLink = function UrlLink(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-UrlLink-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("a", {
+ return /*#__PURE__*/React__default['default'].createElement("a", {
className: classes,
style: style
}, children);
@@ -356,12 +389,12 @@ UrlLink.defaultProps = {
weight: 'regular'
};
UrlLink.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var TagTypography = function TagTypography(props) {
@@ -373,10 +406,10 @@ var TagTypography = function TagTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Tag-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
style: style
}, children);
@@ -387,40 +420,49 @@ TagTypography.defaultProps = {
weight: 'regular'
};
TagTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
-var SectionTitle = function SectionTitle(props) {
+var SectionTitle = function SectionTitle(_ref) {
var _classnames;
- var className = props.className,
- children = props.children,
- color = props.color,
- style = props.style,
- size = props.size;
- var classes = classnames((_classnames = {
+ var className = _ref.className,
+ children = _ref.children,
+ color = _ref.color,
+ gutter = _ref.gutter,
+ style = _ref.style,
+ size = _ref.size,
+ uppercase = _ref.uppercase,
+ weight = _ref.weight;
+ var classes = classnames__default['default']((_classnames = {
'Typography-SectionTitle-root': true
- }, _defineProperty(_classnames, "size-".concat(size, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ }, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color, " mb-").concat(gutter), true), _defineProperty(_classnames, 'uppercase', uppercase), _defineProperty(_classnames, className, className), _classnames));
+ return /*#__PURE__*/React__default['default'].createElement("h1", {
className: classes,
style: style
}, children);
};
SectionTitle.defaultProps = {
color: 'primary-1',
- size: 1
+ gutter: 1,
+ size: 1,
+ weight: 'regular',
+ uppercase: true
};
SectionTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ gutter: PropTypes__default['default'].oneOf([1, 2, 3]),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ uppercase: PropTypes__default['default'].bool,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var EditorialTitle = function EditorialTitle(props) {
@@ -432,10 +474,10 @@ var EditorialTitle = function EditorialTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-EditorialTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -446,12 +488,12 @@ EditorialTitle.defaultProps = {
weight: 'regular'
};
EditorialTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var ButtonTypography = function ButtonTypography(props) {
@@ -463,10 +505,10 @@ var ButtonTypography = function ButtonTypography(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-Button-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("p", {
+ return /*#__PURE__*/React__default['default'].createElement("p", {
className: classes,
style: style
}, children);
@@ -477,12 +519,12 @@ ButtonTypography.defaultProps = {
weight: 'regular'
};
ButtonTypography.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].oneOfType([PropTypes__default['default'].string, PropTypes__default['default'].object, PropTypes__default['default'].array]),
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MostReadNumber = function MostReadNumber(props) {
@@ -494,10 +536,10 @@ var MostReadNumber = function MostReadNumber(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MostReadNumber-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -508,12 +550,12 @@ MostReadNumber.defaultProps = {
weight: 'regular'
};
MostReadNumber.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MenuSideTitle = function MenuSideTitle(props) {
@@ -525,10 +567,10 @@ var MenuSideTitle = function MenuSideTitle(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuSideTitle-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -539,12 +581,12 @@ MenuSideTitle.defaultProps = {
weight: 'regular'
};
MenuSideTitle.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MenuSideItem = function MenuSideItem(props) {
@@ -556,10 +598,10 @@ var MenuSideItem = function MenuSideItem(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuSideItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -570,12 +612,12 @@ MenuSideItem.defaultProps = {
weight: 'regular'
};
MenuSideItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
var MenuTopItem = function MenuTopItem(props) {
@@ -587,10 +629,10 @@ var MenuTopItem = function MenuTopItem(props) {
style = props.style,
size = props.size,
weight = props.weight;
- var classes = classnames((_classnames = {
+ var classes = classnames__default['default']((_classnames = {
'Typography-MenuTopItem-root': true
}, _defineProperty(_classnames, "size-".concat(size, " ").concat(weight, " color-").concat(color), true), _defineProperty(_classnames, className, className), _classnames));
- return /*#__PURE__*/React.createElement("span", {
+ return /*#__PURE__*/React__default['default'].createElement("span", {
className: classes,
style: style
}, children);
@@ -601,12 +643,12 @@ MenuTopItem.defaultProps = {
weight: 'regular'
};
MenuTopItem.propTypes = {
- children: PropTypes.string,
- className: PropTypes.string,
- color: PropTypes.oneOf(colors),
- size: PropTypes.oneOf([1]),
- style: PropTypes.object,
- weight: PropTypes.oneOf(['thin', 'light', 'regular', 'medium', 'bold', 'italic'])
+ children: PropTypes__default['default'].string,
+ className: PropTypes__default['default'].string,
+ color: PropTypes__default['default'].oneOf(colors),
+ size: PropTypes__default['default'].oneOf([1]),
+ style: PropTypes__default['default'].object,
+ weight: PropTypes__default['default'].oneOf(weight)
};
exports.Author = Author;