@micromag/element-urbania-author 0.3.74 → 0.3.78
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/assets/css/styles.css +1 -1
- package/es/index.js +11 -11
- package/lib/index.js +11 -11
- package/package.json +6 -6
package/assets/css/styles.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
.micromag-element-urbania-author-avatar-container{display:inline-block;position:relative;z-index:1;width:100%}.micromag-element-urbania-author-avatar-container .micromag-element-urbania-author-avatar-shape{display:block;width:100%;height:0;padding-bottom:100%;background-color:#222;background-repeat:no-repeat;background-position:50%;background-size:cover;-webkit-box-shadow:0 0 4px rgba(0,0,0,.2);box-shadow:0 0 4px rgba(0,0,0,.2)}.micromag-element-urbania-author-avatar-container.micromag-element-urbania-author-avatar-shapeCircle .micromag-element-urbania-author-avatar-shape{overflow:hidden;border-radius:50%;background-color:rgba(0,0,0,0);background-position:top}
|
|
2
|
-
.micromag-element-urbania-author-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#222;font-family:Agrandir;vertical-align:center}.micromag-element-urbania-author-container .micromag-element-urbania-author-
|
|
2
|
+
.micromag-element-urbania-author-container{display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-ms-flex-align:center;align-items:center;color:#222;font-family:Agrandir;vertical-align:center}.micromag-element-urbania-author-container .micromag-element-urbania-author-image{min-width:2.5em;max-width:35px}.micromag-element-urbania-author-container .micromag-element-urbania-author-link{display:inline-block;color:#222;text-decoration:none}.micromag-element-urbania-author-container .micromag-element-urbania-author-name{margin-left:-7px;padding:6px 8px 6px 13px;border-top-right-radius:10px;border-bottom-right-radius:10px;font-weight:700;text-transform:uppercase}.micromag-element-urbania-author-container .micromag-element-urbania-author-name p{display:inline;margin:0;padding:0;font-size:inherit;line-height:1}.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix{margin-right:-5px;padding:6px 13px 6px 8px;border-top-left-radius:10px;border-bottom-left-radius:10px}.micromag-element-urbania-author-container .micromag-element-urbania-author-name,.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix{display:block;background-color:#e9e9e9;font-size:12px;line-height:1;white-space:nowrap}.micromag-element-urbania-author-container.micromag-element-urbania-author-isSmall{font-size:10px}.micromag-element-urbania-author-container.micromag-element-urbania-author-isSmall .micromag-element-urbania-author-name,.micromag-element-urbania-author-container.micromag-element-urbania-author-isSmall .micromag-element-urbania-author-prefix{font-size:10px;white-space:normal}.micromag-element-urbania-author-container.micromag-element-urbania-author-isSmall .micromag-element-urbania-author-image{max-width:30px}.micromag-element-urbania-author-container.micromag-element-urbania-author-withoutImage .micromag-element-urbania-author-name{margin-left:0;padding-left:0}
|
package/es/index.js
CHANGED
|
@@ -55,16 +55,16 @@ var Avatar = function Avatar(_ref) {
|
|
|
55
55
|
Avatar.propTypes = propTypes$1;
|
|
56
56
|
Avatar.defaultProps = defaultProps$1;
|
|
57
57
|
|
|
58
|
-
var styles = {"container":"micromag-element-urbania-author-container","
|
|
58
|
+
var styles = {"container":"micromag-element-urbania-author-container","image":"micromag-element-urbania-author-image","link":"micromag-element-urbania-author-link","name":"micromag-element-urbania-author-name","prefix":"micromag-element-urbania-author-prefix","isSmall":"micromag-element-urbania-author-isSmall","withoutImage":"micromag-element-urbania-author-withoutImage"};
|
|
59
59
|
|
|
60
60
|
var propTypes = {
|
|
61
61
|
author: PropTypes$1.shape({
|
|
62
62
|
slug: PropTypes$1.string,
|
|
63
63
|
name: PropTypes.textElement,
|
|
64
|
-
|
|
64
|
+
image: PropTypes.imageElement,
|
|
65
65
|
url: PropTypes$1.string
|
|
66
66
|
}),
|
|
67
|
-
|
|
67
|
+
withImage: PropTypes$1.bool,
|
|
68
68
|
withoutLink: PropTypes$1.bool,
|
|
69
69
|
withoutPrefix: PropTypes$1.bool,
|
|
70
70
|
isSmall: PropTypes$1.bool,
|
|
@@ -73,7 +73,7 @@ var propTypes = {
|
|
|
73
73
|
};
|
|
74
74
|
var defaultProps = {
|
|
75
75
|
author: null,
|
|
76
|
-
|
|
76
|
+
withImage: true,
|
|
77
77
|
withoutLink: false,
|
|
78
78
|
withoutPrefix: false,
|
|
79
79
|
isSmall: false,
|
|
@@ -85,7 +85,7 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
85
85
|
var _ref3;
|
|
86
86
|
|
|
87
87
|
var author = _ref.author,
|
|
88
|
-
|
|
88
|
+
withImage = _ref.withImage,
|
|
89
89
|
withoutLink = _ref.withoutLink,
|
|
90
90
|
withoutPrefix = _ref.withoutPrefix,
|
|
91
91
|
isSmall = _ref.isSmall,
|
|
@@ -96,8 +96,8 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
96
96
|
var _ref2 = author || {},
|
|
97
97
|
_ref2$name = _ref2.name,
|
|
98
98
|
name = _ref2$name === void 0 ? null : _ref2$name,
|
|
99
|
-
_ref2$
|
|
100
|
-
|
|
99
|
+
_ref2$image = _ref2.image,
|
|
100
|
+
image = _ref2$image === void 0 ? null : _ref2$image,
|
|
101
101
|
_ref2$url = _ref2.url,
|
|
102
102
|
url = _ref2$url === void 0 ? null : _ref2$url;
|
|
103
103
|
|
|
@@ -112,13 +112,13 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
112
112
|
className: styles.name
|
|
113
113
|
}, name)) : null;
|
|
114
114
|
return /*#__PURE__*/React.createElement("div", {
|
|
115
|
-
className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, styles.isSmall, isSmall), _defineProperty(_ref3, styles.
|
|
115
|
+
className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, styles.isSmall, isSmall), _defineProperty(_ref3, styles.withoutImage, !withImage || image === null), _defineProperty(_ref3, className, className !== null), _ref3)])
|
|
116
116
|
}, !withoutPrefix ? /*#__PURE__*/React.createElement(Text, Object.assign({}, name, {
|
|
117
117
|
className: styles.prefix,
|
|
118
118
|
body: prefix
|
|
119
|
-
})) : null,
|
|
120
|
-
className: styles.
|
|
121
|
-
image:
|
|
119
|
+
})) : null, withImage && image !== null ? /*#__PURE__*/React.createElement(Avatar, {
|
|
120
|
+
className: styles.image,
|
|
121
|
+
image: image
|
|
122
122
|
}) : null, url !== null && !withoutLink ? /*#__PURE__*/React.createElement(Link, {
|
|
123
123
|
className: styles.link,
|
|
124
124
|
url: url,
|
package/lib/index.js
CHANGED
|
@@ -66,16 +66,16 @@ var Avatar = function Avatar(_ref) {
|
|
|
66
66
|
Avatar.propTypes = propTypes$1;
|
|
67
67
|
Avatar.defaultProps = defaultProps$1;
|
|
68
68
|
|
|
69
|
-
var styles = {"container":"micromag-element-urbania-author-container","
|
|
69
|
+
var styles = {"container":"micromag-element-urbania-author-container","image":"micromag-element-urbania-author-image","link":"micromag-element-urbania-author-link","name":"micromag-element-urbania-author-name","prefix":"micromag-element-urbania-author-prefix","isSmall":"micromag-element-urbania-author-isSmall","withoutImage":"micromag-element-urbania-author-withoutImage"};
|
|
70
70
|
|
|
71
71
|
var propTypes = {
|
|
72
72
|
author: PropTypes__default["default"].shape({
|
|
73
73
|
slug: PropTypes__default["default"].string,
|
|
74
74
|
name: core.PropTypes.textElement,
|
|
75
|
-
|
|
75
|
+
image: core.PropTypes.imageElement,
|
|
76
76
|
url: PropTypes__default["default"].string
|
|
77
77
|
}),
|
|
78
|
-
|
|
78
|
+
withImage: PropTypes__default["default"].bool,
|
|
79
79
|
withoutLink: PropTypes__default["default"].bool,
|
|
80
80
|
withoutPrefix: PropTypes__default["default"].bool,
|
|
81
81
|
isSmall: PropTypes__default["default"].bool,
|
|
@@ -84,7 +84,7 @@ var propTypes = {
|
|
|
84
84
|
};
|
|
85
85
|
var defaultProps = {
|
|
86
86
|
author: null,
|
|
87
|
-
|
|
87
|
+
withImage: true,
|
|
88
88
|
withoutLink: false,
|
|
89
89
|
withoutPrefix: false,
|
|
90
90
|
isSmall: false,
|
|
@@ -96,7 +96,7 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
96
96
|
var _ref3;
|
|
97
97
|
|
|
98
98
|
var author = _ref.author,
|
|
99
|
-
|
|
99
|
+
withImage = _ref.withImage,
|
|
100
100
|
withoutLink = _ref.withoutLink,
|
|
101
101
|
withoutPrefix = _ref.withoutPrefix,
|
|
102
102
|
isSmall = _ref.isSmall,
|
|
@@ -107,8 +107,8 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
107
107
|
var _ref2 = author || {},
|
|
108
108
|
_ref2$name = _ref2.name,
|
|
109
109
|
name = _ref2$name === void 0 ? null : _ref2$name,
|
|
110
|
-
_ref2$
|
|
111
|
-
|
|
110
|
+
_ref2$image = _ref2.image,
|
|
111
|
+
image = _ref2$image === void 0 ? null : _ref2$image,
|
|
112
112
|
_ref2$url = _ref2.url,
|
|
113
113
|
url = _ref2$url === void 0 ? null : _ref2$url;
|
|
114
114
|
|
|
@@ -123,13 +123,13 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
123
123
|
className: styles.name
|
|
124
124
|
}, name)) : null;
|
|
125
125
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
126
|
-
className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles.isSmall, isSmall), _defineProperty__default["default"](_ref3, styles.
|
|
126
|
+
className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles.isSmall, isSmall), _defineProperty__default["default"](_ref3, styles.withoutImage, !withImage || image === null), _defineProperty__default["default"](_ref3, className, className !== null), _ref3)])
|
|
127
127
|
}, !withoutPrefix ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, name, {
|
|
128
128
|
className: styles.prefix,
|
|
129
129
|
body: prefix
|
|
130
|
-
})) : null,
|
|
131
|
-
className: styles.
|
|
132
|
-
image:
|
|
130
|
+
})) : null, withImage && image !== null ? /*#__PURE__*/React__default["default"].createElement(Avatar, {
|
|
131
|
+
className: styles.image,
|
|
132
|
+
image: image
|
|
133
133
|
}) : null, url !== null && !withoutLink ? /*#__PURE__*/React__default["default"].createElement(Link__default["default"], {
|
|
134
134
|
className: styles.link,
|
|
135
135
|
url: url,
|
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.78",
|
|
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.78",
|
|
53
|
+
"@micromag/element-button": "^0.3.78",
|
|
54
|
+
"@micromag/element-link": "^0.3.78",
|
|
55
|
+
"@micromag/element-text": "^0.3.78",
|
|
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": "68be4e95203a5c15cefe58e423fe43eb374f3a7f"
|
|
66
66
|
}
|