@micromag/element-urbania-author 0.3.124 → 0.3.126
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 +27 -6
- package/lib/index.js +27 -6
- 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-image{min-width:2.2em;max-width:
|
|
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.2em;max-width:4em}.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-collaborator,.micromag-element-urbania-author-container .micromag-element-urbania-author-name,.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix{display:block;background-color:#efefef;font-family:Agrandir;font-size:10px;letter-spacing:.04em;line-height:1;white-space:nowrap}.micromag-element-urbania-author-container .micromag-element-urbania-author-name{margin-left:-7px;padding:3px 8px 3px 13px;border-top-right-radius:40px;border-bottom-right-radius:40px}.micromag-element-urbania-author-container .micromag-element-urbania-author-name p{display:inline-block;margin:0;padding:3px 0 0;font-size:inherit;font-weight:700;line-height:1;text-transform:uppercase}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator{position:absolute;padding-top:2px;background-color:rgba(0,0,0,0);color:#fff}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator .micromag-element-urbania-author-collaboratorText{font-size:inherit}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator .micromag-element-urbania-author-collaboratorText p{display:inline;font-size:.9em;font-weight:700;line-height:1;text-transform:uppercase}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator .micromag-element-urbania-author-collaboratorPrefix{display:inline-block;padding-right:.3em;padding-left:7px;font-size:.9em}.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix{margin-right:-5px;padding:3px 12px 3px 8px;border-top-left-radius:40px;border-bottom-left-radius:40px}.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix span{display:inline-block;padding:3px 0;font-size:inherit;line-height:1}.micromag-element-urbania-author-container.micromag-element-urbania-author-isSmall{font-size:9px}.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:9px;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}.micromag-element-urbania-author-container.micromag-element-urbania-author-withoutImage .micromag-element-urbania-author-prefix{margin-right:0;padding-right:.4em}
|
package/es/index.js
CHANGED
|
@@ -58,14 +58,15 @@ var Avatar = function Avatar(_ref) {
|
|
|
58
58
|
Avatar.propTypes = propTypes$1;
|
|
59
59
|
Avatar.defaultProps = defaultProps$1;
|
|
60
60
|
|
|
61
|
-
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"};
|
|
61
|
+
var styles = {"container":"micromag-element-urbania-author-container","image":"micromag-element-urbania-author-image","link":"micromag-element-urbania-author-link","collaborator":"micromag-element-urbania-author-collaborator","name":"micromag-element-urbania-author-name","prefix":"micromag-element-urbania-author-prefix","collaboratorText":"micromag-element-urbania-author-collaboratorText","collaboratorPrefix":"micromag-element-urbania-author-collaboratorPrefix","isSmall":"micromag-element-urbania-author-isSmall","withoutImage":"micromag-element-urbania-author-withoutImage"};
|
|
62
62
|
|
|
63
63
|
var propTypes = {
|
|
64
64
|
author: PropTypes$1.shape({
|
|
65
65
|
slug: PropTypes$1.string,
|
|
66
66
|
name: PropTypes.textElement,
|
|
67
67
|
image: PropTypes.imageElement,
|
|
68
|
-
url: PropTypes$1.string
|
|
68
|
+
url: PropTypes$1.string,
|
|
69
|
+
collaborator: PropTypes.textElement
|
|
69
70
|
}),
|
|
70
71
|
withImage: PropTypes$1.bool,
|
|
71
72
|
withoutLink: PropTypes$1.bool,
|
|
@@ -105,7 +106,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
105
106
|
_ref2$image = _ref2.image,
|
|
106
107
|
image = _ref2$image === void 0 ? null : _ref2$image,
|
|
107
108
|
_ref2$url = _ref2.url,
|
|
108
|
-
url = _ref2$url === void 0 ? null : _ref2$url
|
|
109
|
+
url = _ref2$url === void 0 ? null : _ref2$url,
|
|
110
|
+
_ref2$collaborator = _ref2.collaborator,
|
|
111
|
+
collaborator = _ref2$collaborator === void 0 ? null : _ref2$collaborator;
|
|
109
112
|
|
|
110
113
|
var prefix = intl.formatMessage({
|
|
111
114
|
id: "jEK6B8",
|
|
@@ -114,9 +117,21 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
114
117
|
"value": "By"
|
|
115
118
|
}]
|
|
116
119
|
});
|
|
117
|
-
var
|
|
120
|
+
var and = intl.formatMessage({
|
|
121
|
+
id: "iD0t3t",
|
|
122
|
+
defaultMessage: [{
|
|
123
|
+
"type": 0,
|
|
124
|
+
"value": "Et"
|
|
125
|
+
}]
|
|
126
|
+
});
|
|
127
|
+
var authorText = isTextFilled(name) ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
118
128
|
className: styles.name
|
|
119
129
|
}, name)) : null;
|
|
130
|
+
var collaboratorText = isTextFilled(collaborator) ? /*#__PURE__*/React.createElement(Text, Object.assign({
|
|
131
|
+
className: styles.collaboratorText
|
|
132
|
+
}, collaborator, {
|
|
133
|
+
inline: true
|
|
134
|
+
})) : null;
|
|
120
135
|
return /*#__PURE__*/React.createElement("div", {
|
|
121
136
|
className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, styles.isSmall, isSmall), _defineProperty(_ref3, styles.withoutImage, !withImage || image === null), _defineProperty(_ref3, className, className !== null), _ref3)])
|
|
122
137
|
}, !withoutPrefix ? /*#__PURE__*/React.createElement(Text, Object.assign({}, name, {
|
|
@@ -126,14 +141,20 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
126
141
|
className: styles.image,
|
|
127
142
|
image: image,
|
|
128
143
|
shouldLoad: shouldLoad
|
|
129
|
-
}) : null,
|
|
144
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
145
|
+
className: styles.right
|
|
146
|
+
}, url !== null && !withoutLink ? /*#__PURE__*/React.createElement(Link, {
|
|
130
147
|
className: styles.link,
|
|
131
148
|
url: url,
|
|
132
149
|
external: true,
|
|
133
150
|
style: {
|
|
134
151
|
backgroundImage: linkUnderlineColor !== null ? "linear-gradient(0deg, ".concat(linkUnderlineColor, " 0, ").concat(linkUnderlineColor, ")") : null
|
|
135
152
|
}
|
|
136
|
-
},
|
|
153
|
+
}, authorText) : /*#__PURE__*/React.createElement("div", null, authorText), /*#__PURE__*/React.createElement("div", {
|
|
154
|
+
className: styles.collaborator
|
|
155
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
156
|
+
className: styles.collaboratorPrefix
|
|
157
|
+
}, and), collaboratorText !== null ? collaboratorText : null)));
|
|
137
158
|
};
|
|
138
159
|
|
|
139
160
|
UrbaniaAuthor.propTypes = propTypes;
|
package/lib/index.js
CHANGED
|
@@ -69,14 +69,15 @@ var Avatar = function Avatar(_ref) {
|
|
|
69
69
|
Avatar.propTypes = propTypes$1;
|
|
70
70
|
Avatar.defaultProps = defaultProps$1;
|
|
71
71
|
|
|
72
|
-
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"};
|
|
72
|
+
var styles = {"container":"micromag-element-urbania-author-container","image":"micromag-element-urbania-author-image","link":"micromag-element-urbania-author-link","collaborator":"micromag-element-urbania-author-collaborator","name":"micromag-element-urbania-author-name","prefix":"micromag-element-urbania-author-prefix","collaboratorText":"micromag-element-urbania-author-collaboratorText","collaboratorPrefix":"micromag-element-urbania-author-collaboratorPrefix","isSmall":"micromag-element-urbania-author-isSmall","withoutImage":"micromag-element-urbania-author-withoutImage"};
|
|
73
73
|
|
|
74
74
|
var propTypes = {
|
|
75
75
|
author: PropTypes__default["default"].shape({
|
|
76
76
|
slug: PropTypes__default["default"].string,
|
|
77
77
|
name: core.PropTypes.textElement,
|
|
78
78
|
image: core.PropTypes.imageElement,
|
|
79
|
-
url: PropTypes__default["default"].string
|
|
79
|
+
url: PropTypes__default["default"].string,
|
|
80
|
+
collaborator: core.PropTypes.textElement
|
|
80
81
|
}),
|
|
81
82
|
withImage: PropTypes__default["default"].bool,
|
|
82
83
|
withoutLink: PropTypes__default["default"].bool,
|
|
@@ -116,7 +117,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
116
117
|
_ref2$image = _ref2.image,
|
|
117
118
|
image = _ref2$image === void 0 ? null : _ref2$image,
|
|
118
119
|
_ref2$url = _ref2.url,
|
|
119
|
-
url = _ref2$url === void 0 ? null : _ref2$url
|
|
120
|
+
url = _ref2$url === void 0 ? null : _ref2$url,
|
|
121
|
+
_ref2$collaborator = _ref2.collaborator,
|
|
122
|
+
collaborator = _ref2$collaborator === void 0 ? null : _ref2$collaborator;
|
|
120
123
|
|
|
121
124
|
var prefix = intl.formatMessage({
|
|
122
125
|
id: "jEK6B8",
|
|
@@ -125,9 +128,21 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
125
128
|
"value": "By"
|
|
126
129
|
}]
|
|
127
130
|
});
|
|
128
|
-
var
|
|
131
|
+
var and = intl.formatMessage({
|
|
132
|
+
id: "iD0t3t",
|
|
133
|
+
defaultMessage: [{
|
|
134
|
+
"type": 0,
|
|
135
|
+
"value": "Et"
|
|
136
|
+
}]
|
|
137
|
+
});
|
|
138
|
+
var authorText = utils.isTextFilled(name) ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({
|
|
129
139
|
className: styles.name
|
|
130
140
|
}, name)) : null;
|
|
141
|
+
var collaboratorText = utils.isTextFilled(collaborator) ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({
|
|
142
|
+
className: styles.collaboratorText
|
|
143
|
+
}, collaborator, {
|
|
144
|
+
inline: true
|
|
145
|
+
})) : null;
|
|
131
146
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
132
147
|
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)])
|
|
133
148
|
}, !withoutPrefix ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, name, {
|
|
@@ -137,14 +152,20 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
|
|
|
137
152
|
className: styles.image,
|
|
138
153
|
image: image,
|
|
139
154
|
shouldLoad: shouldLoad
|
|
140
|
-
}) : null,
|
|
155
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
156
|
+
className: styles.right
|
|
157
|
+
}, url !== null && !withoutLink ? /*#__PURE__*/React__default["default"].createElement(Link__default["default"], {
|
|
141
158
|
className: styles.link,
|
|
142
159
|
url: url,
|
|
143
160
|
external: true,
|
|
144
161
|
style: {
|
|
145
162
|
backgroundImage: linkUnderlineColor !== null ? "linear-gradient(0deg, ".concat(linkUnderlineColor, " 0, ").concat(linkUnderlineColor, ")") : null
|
|
146
163
|
}
|
|
147
|
-
},
|
|
164
|
+
}, authorText) : /*#__PURE__*/React__default["default"].createElement("div", null, authorText), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
165
|
+
className: styles.collaborator
|
|
166
|
+
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
167
|
+
className: styles.collaboratorPrefix
|
|
168
|
+
}, and), collaboratorText !== null ? collaboratorText : null)));
|
|
148
169
|
};
|
|
149
170
|
|
|
150
171
|
UrbaniaAuthor.propTypes = propTypes;
|
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.126",
|
|
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.126",
|
|
53
|
+
"@micromag/element-button": "^0.3.126",
|
|
54
|
+
"@micromag/element-link": "^0.3.126",
|
|
55
|
+
"@micromag/element-text": "^0.3.126",
|
|
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": "079203c5850c4aa771bc4fa1c567d2db1bc3ee3d"
|
|
66
66
|
}
|