@micromag/element-urbania-author 0.3.348 → 0.3.359
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 +4 -3
- package/lib/index.js +3 -2
- package/package.json +6 -6
package/assets/css/styles.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
.micromag-element-urbania-author-avatar-container{display:inline-block;position:relative;width:100%;z-index:1}.micromag-element-urbania-author-avatar-container .micromag-element-urbania-author-avatar-shape{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:cover;-webkit-box-shadow:0 0 4px rgba(0,0,0,.2);box-shadow:0 0 4px rgba(0,0,0,.2);display:block;height:0;padding-bottom:100%;width:100%}
|
|
1
|
+
.micromag-element-urbania-author-avatar-container{display:inline-block;position:relative;width:100%;z-index:1}.micromag-element-urbania-author-avatar-container.micromag-element-urbania-author-avatar-shapeCircle .micromag-element-urbania-author-avatar-shape{background-color:#fff;background-position:top;border-radius:50%;overflow:hidden}.micromag-element-urbania-author-avatar-container .micromag-element-urbania-author-avatar-shape{background-color:#fff;background-position:50%;background-repeat:no-repeat;background-size:cover;-webkit-box-shadow:0 0 4px rgba(0,0,0,.2);box-shadow:0 0 4px rgba(0,0,0,.2);display:block;height:0;padding-bottom:100%;width:100%}
|
|
2
2
|
.micromag-element-urbania-author-container{-ms-flex-align:center;align-items:center;color:#222;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:Agrandir;vertical-align:center}.micromag-element-urbania-author-container .micromag-element-urbania-author-image{max-width:4em;min-width:2.2em}.micromag-element-urbania-author-container .micromag-element-urbania-author-link{color:#222;display:inline-block;text-decoration:none}.micromag-element-urbania-author-container .micromag-element-urbania-author-right{display:block}.micromag-element-urbania-author-container .micromag-element-urbania-author-name,.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix{min-height:20px}.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{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{border-bottom-right-radius:40px;border-top-right-radius:40px;margin-left:-7px;padding:6px 8px 3px 13px}.micromag-element-urbania-author-container .micromag-element-urbania-author-name p{display:inline;font-size:inherit;font-weight:700;line-height:1;margin:0;text-transform:uppercase}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator{background-color:transparent;color:#fff;padding-top:2px;position:absolute}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator .micromag-element-urbania-author-collaboratorText{font-size:inherit;padding-left:7.3px}.micromag-element-urbania-author-container .micromag-element-urbania-author-collaborator .micromag-element-urbania-author-collaboratorText p{display:inline;font-size:.9em;line-height:1}.micromag-element-urbania-author-container .micromag-element-urbania-author-prefix{border-bottom-left-radius:40px;border-top-left-radius:40px;margin-right:-5px;padding:6px 12px 3px 8px}.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
|
@@ -5,11 +5,11 @@ import PropTypes$1 from 'prop-types';
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { useIntl } from 'react-intl';
|
|
7
7
|
import { PropTypes } from '@micromag/core';
|
|
8
|
-
import { getOptimalImageUrl, isTextFilled } from '@micromag/core/utils';
|
|
8
|
+
import { getOptimalImageUrl, pascalCase, isTextFilled } from '@micromag/core/utils';
|
|
9
9
|
import Link from '@micromag/element-link';
|
|
10
10
|
import Text from '@micromag/element-text';
|
|
11
11
|
|
|
12
|
-
var styles$1 = {"container":"micromag-element-urbania-author-avatar-container","
|
|
12
|
+
var styles$1 = {"container":"micromag-element-urbania-author-avatar-container","shapeCircle":"micromag-element-urbania-author-avatar-shapeCircle","shape":"micromag-element-urbania-author-avatar-shape"};
|
|
13
13
|
|
|
14
14
|
var propTypes$1 = {
|
|
15
15
|
image: PropTypes.imageElement,
|
|
@@ -44,8 +44,9 @@ var Avatar = function Avatar(_ref) {
|
|
|
44
44
|
var imageAtSize = getOptimalImageUrl(image, width, height, {
|
|
45
45
|
resolution: resolution
|
|
46
46
|
});
|
|
47
|
+
var finalShape = shape !== null ? pascalCase(shape) : null;
|
|
47
48
|
return /*#__PURE__*/React.createElement("span", {
|
|
48
|
-
className: classNames([styles$1.container, (_ref2 = {}, _defineProperty(_ref2, styles$1["shape
|
|
49
|
+
className: classNames([styles$1.container, (_ref2 = {}, _defineProperty(_ref2, styles$1["shape".concat(finalShape)], finalShape !== null), _defineProperty(_ref2, styles$1.isTag, isTag), _defineProperty(_ref2, className, className !== null), _ref2)])
|
|
49
50
|
}, /*#__PURE__*/React.createElement("span", {
|
|
50
51
|
className: styles$1.shape,
|
|
51
52
|
style: {
|
package/lib/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
21
21
|
var Link__default = /*#__PURE__*/_interopDefaultLegacy(Link);
|
|
22
22
|
var Text__default = /*#__PURE__*/_interopDefaultLegacy(Text);
|
|
23
23
|
|
|
24
|
-
var styles$1 = {"container":"micromag-element-urbania-author-avatar-container","
|
|
24
|
+
var styles$1 = {"container":"micromag-element-urbania-author-avatar-container","shapeCircle":"micromag-element-urbania-author-avatar-shapeCircle","shape":"micromag-element-urbania-author-avatar-shape"};
|
|
25
25
|
|
|
26
26
|
var propTypes$1 = {
|
|
27
27
|
image: core.PropTypes.imageElement,
|
|
@@ -56,8 +56,9 @@ var Avatar = function Avatar(_ref) {
|
|
|
56
56
|
var imageAtSize = utils.getOptimalImageUrl(image, width, height, {
|
|
57
57
|
resolution: resolution
|
|
58
58
|
});
|
|
59
|
+
var finalShape = shape !== null ? utils.pascalCase(shape) : null;
|
|
59
60
|
return /*#__PURE__*/React__default["default"].createElement("span", {
|
|
60
|
-
className: classNames__default["default"]([styles$1.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles$1["shape
|
|
61
|
+
className: classNames__default["default"]([styles$1.container, (_ref2 = {}, _defineProperty__default["default"](_ref2, styles$1["shape".concat(finalShape)], finalShape !== null), _defineProperty__default["default"](_ref2, styles$1.isTag, isTag), _defineProperty__default["default"](_ref2, className, className !== null), _ref2)])
|
|
61
62
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
62
63
|
className: styles$1.shape,
|
|
63
64
|
style: {
|
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.359",
|
|
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.359",
|
|
53
|
+
"@micromag/element-button": "^0.3.359",
|
|
54
|
+
"@micromag/element-link": "^0.3.359",
|
|
55
|
+
"@micromag/element-text": "^0.3.359",
|
|
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": "22eba0d01f18f8971e0405bbb41081b5e2ae80ee"
|
|
66
66
|
}
|