@micromag/element-urbania-author 0.3.178 → 0.3.181
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +7 -3
- package/lib/index.js +8 -3
- package/package.json +6 -6
package/es/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
2
3
|
import classNames from 'classnames';
|
|
3
4
|
import PropTypes$1 from 'prop-types';
|
|
4
5
|
import React from 'react';
|
|
@@ -60,6 +61,7 @@ Avatar.defaultProps = defaultProps$1;
|
|
|
60
61
|
|
|
61
62
|
var styles = {"container":"micromag-element-urbania-author-container","image":"micromag-element-urbania-author-image","link":"micromag-element-urbania-author-link","right":"micromag-element-urbania-author-right","name":"micromag-element-urbania-author-name","prefix":"micromag-element-urbania-author-prefix","collaborator":"micromag-element-urbania-author-collaborator","collaboratorText":"micromag-element-urbania-author-collaboratorText","isSmall":"micromag-element-urbania-author-isSmall","withoutImage":"micromag-element-urbania-author-withoutImage"};
|
|
62
63
|
|
|
64
|
+
var _excluded = ["author", "withImage", "withoutLink", "withoutPrefix", "isSmall", "linkUnderlineColor", "className", "backgroundClassName", "collaboratorClassName", "shouldLoad"];
|
|
63
65
|
var propTypes = {
|
|
64
66
|
author: PropTypes$1.shape({
|
|
65
67
|
slug: PropTypes$1.string,
|
|
@@ -103,7 +105,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
103
105
|
className = _ref.className,
|
|
104
106
|
backgroundClassName = _ref.backgroundClassName,
|
|
105
107
|
collaboratorClassName = _ref.collaboratorClassName,
|
|
106
|
-
shouldLoad = _ref.shouldLoad
|
|
108
|
+
shouldLoad = _ref.shouldLoad,
|
|
109
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
110
|
+
|
|
107
111
|
var intl = useIntl();
|
|
108
112
|
|
|
109
113
|
var _ref2 = author || {},
|
|
@@ -132,9 +136,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
132
136
|
}, collaborator, {
|
|
133
137
|
inline: true
|
|
134
138
|
})) : null;
|
|
135
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
return /*#__PURE__*/React.createElement("div", Object.assign({
|
|
136
140
|
className: classNames([styles.container, (_ref4 = {}, _defineProperty(_ref4, styles.isSmall, isSmall), _defineProperty(_ref4, styles.withoutAvatar, withAvatar), _defineProperty(_ref4, styles.withoutImage, !withImage || image === null), _defineProperty(_ref4, className, className !== null), _ref4)])
|
|
137
|
-
}, !withoutPrefix ? /*#__PURE__*/React.createElement(Text, Object.assign({}, name, {
|
|
141
|
+
}, otherProps), !withoutPrefix ? /*#__PURE__*/React.createElement(Text, Object.assign({}, name, {
|
|
138
142
|
className: classNames([styles.prefix, _defineProperty({}, backgroundClassName, backgroundClassName)]),
|
|
139
143
|
body: "<span>".concat(prefix, "<span>")
|
|
140
144
|
})) : null, withAvatar ? /*#__PURE__*/React.createElement(Avatar, {
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
4
5
|
var classNames = require('classnames');
|
|
5
6
|
var PropTypes = require('prop-types');
|
|
6
7
|
var React = require('react');
|
|
@@ -13,6 +14,7 @@ var Text = require('@micromag/element-text');
|
|
|
13
14
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
15
|
|
|
15
16
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty);
|
|
17
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
16
18
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
17
19
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
18
20
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
@@ -71,6 +73,7 @@ Avatar.defaultProps = defaultProps$1;
|
|
|
71
73
|
|
|
72
74
|
var styles = {"container":"micromag-element-urbania-author-container","image":"micromag-element-urbania-author-image","link":"micromag-element-urbania-author-link","right":"micromag-element-urbania-author-right","name":"micromag-element-urbania-author-name","prefix":"micromag-element-urbania-author-prefix","collaborator":"micromag-element-urbania-author-collaborator","collaboratorText":"micromag-element-urbania-author-collaboratorText","isSmall":"micromag-element-urbania-author-isSmall","withoutImage":"micromag-element-urbania-author-withoutImage"};
|
|
73
75
|
|
|
76
|
+
var _excluded = ["author", "withImage", "withoutLink", "withoutPrefix", "isSmall", "linkUnderlineColor", "className", "backgroundClassName", "collaboratorClassName", "shouldLoad"];
|
|
74
77
|
var propTypes = {
|
|
75
78
|
author: PropTypes__default["default"].shape({
|
|
76
79
|
slug: PropTypes__default["default"].string,
|
|
@@ -114,7 +117,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
114
117
|
className = _ref.className,
|
|
115
118
|
backgroundClassName = _ref.backgroundClassName,
|
|
116
119
|
collaboratorClassName = _ref.collaboratorClassName,
|
|
117
|
-
shouldLoad = _ref.shouldLoad
|
|
120
|
+
shouldLoad = _ref.shouldLoad,
|
|
121
|
+
otherProps = _objectWithoutProperties__default["default"](_ref, _excluded);
|
|
122
|
+
|
|
118
123
|
var intl = reactIntl.useIntl();
|
|
119
124
|
|
|
120
125
|
var _ref2 = author || {},
|
|
@@ -143,9 +148,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
143
148
|
}, collaborator, {
|
|
144
149
|
inline: true
|
|
145
150
|
})) : null;
|
|
146
|
-
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
151
|
+
return /*#__PURE__*/React__default["default"].createElement("div", Object.assign({
|
|
147
152
|
className: classNames__default["default"]([styles.container, (_ref4 = {}, _defineProperty__default["default"](_ref4, styles.isSmall, isSmall), _defineProperty__default["default"](_ref4, styles.withoutAvatar, withAvatar), _defineProperty__default["default"](_ref4, styles.withoutImage, !withImage || image === null), _defineProperty__default["default"](_ref4, className, className !== null), _ref4)])
|
|
148
|
-
}, !withoutPrefix ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, name, {
|
|
153
|
+
}, otherProps), !withoutPrefix ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, name, {
|
|
149
154
|
className: classNames__default["default"]([styles.prefix, _defineProperty__default["default"]({}, backgroundClassName, backgroundClassName)]),
|
|
150
155
|
body: "<span>".concat(prefix, "<span>")
|
|
151
156
|
})) : null, withAvatar ? /*#__PURE__*/React__default["default"].createElement(Avatar, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-urbania-author",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.181",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.3.
|
|
53
|
-
"@micromag/element-button": "^0.3.
|
|
54
|
-
"@micromag/element-link": "^0.3.
|
|
55
|
-
"@micromag/element-text": "^0.3.
|
|
52
|
+
"@micromag/core": "^0.3.181",
|
|
53
|
+
"@micromag/element-button": "^0.3.181",
|
|
54
|
+
"@micromag/element-link": "^0.3.181",
|
|
55
|
+
"@micromag/element-text": "^0.3.181",
|
|
56
56
|
"classnames": "^2.2.6",
|
|
57
57
|
"lodash": "^4.17.21",
|
|
58
58
|
"prop-types": "^15.7.2",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "8eadaa7f17c86bf2f8f80cb13bfdd3f6295d29d5"
|
|
66
66
|
}
|