@micromag/element-urbania-author 0.3.133 → 0.3.138

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.
@@ -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-shape-circle .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: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-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{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{padding-left:7.3px;font-size:inherit}.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{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 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}
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-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{margin-left:-7px;padding:6px 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;margin: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{padding-left:7.3px;font-size:inherit}.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{margin-right:-5px;padding:6px 12px 3px 8px;border-top-left-radius:40px;border-bottom-left-radius:40px}.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
@@ -74,6 +74,8 @@ var propTypes = {
74
74
  isSmall: PropTypes$1.bool,
75
75
  linkUnderlineColor: PropTypes$1.string,
76
76
  className: PropTypes$1.string,
77
+ backgroundClassName: PropTypes$1.string,
78
+ collaboratorClassName: PropTypes$1.string,
77
79
  shouldLoad: PropTypes$1.bool
78
80
  };
79
81
  var defaultProps = {
@@ -84,11 +86,13 @@ var defaultProps = {
84
86
  isSmall: false,
85
87
  linkUnderlineColor: null,
86
88
  className: null,
89
+ backgroundClassName: null,
90
+ collaboratorClassName: null,
87
91
  shouldLoad: true
88
92
  };
89
93
 
90
94
  var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
91
- var _ref3;
95
+ var _ref4;
92
96
 
93
97
  var author = _ref.author,
94
98
  withImage = _ref.withImage,
@@ -97,6 +101,8 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
97
101
  isSmall = _ref.isSmall,
98
102
  linkUnderlineColor = _ref.linkUnderlineColor,
99
103
  className = _ref.className,
104
+ backgroundClassName = _ref.backgroundClassName,
105
+ collaboratorClassName = _ref.collaboratorClassName,
100
106
  shouldLoad = _ref.shouldLoad;
101
107
  var intl = useIntl();
102
108
 
@@ -119,7 +125,7 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
119
125
  }]
120
126
  });
121
127
  var authorText = isTextFilled(name) ? /*#__PURE__*/React.createElement(Text, Object.assign({
122
- className: styles.name
128
+ className: classNames([styles.name, _defineProperty({}, backgroundClassName, backgroundClassName)])
123
129
  }, name)) : null;
124
130
  var collaboratorText = isTextFilled(collaborator) ? /*#__PURE__*/React.createElement(Text, Object.assign({
125
131
  className: styles.collaboratorText
@@ -127,9 +133,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
127
133
  inline: true
128
134
  })) : null;
129
135
  return /*#__PURE__*/React.createElement("div", {
130
- className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, styles.isSmall, isSmall), _defineProperty(_ref3, styles.withoutAvatar, withAvatar), _defineProperty(_ref3, styles.withoutImage, !withImage || image === null), _defineProperty(_ref3, className, className !== null), _ref3)])
136
+ 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)])
131
137
  }, !withoutPrefix ? /*#__PURE__*/React.createElement(Text, Object.assign({}, name, {
132
- className: styles.prefix,
138
+ className: classNames([styles.prefix, _defineProperty({}, backgroundClassName, backgroundClassName)]),
133
139
  body: "<span>".concat(prefix, "<span>")
134
140
  })) : null, withAvatar ? /*#__PURE__*/React.createElement(Avatar, {
135
141
  className: styles.image,
@@ -145,7 +151,7 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
145
151
  backgroundImage: linkUnderlineColor !== null ? "linear-gradient(0deg, ".concat(linkUnderlineColor, " 0, ").concat(linkUnderlineColor, ")") : null
146
152
  }
147
153
  }, authorText) : /*#__PURE__*/React.createElement("div", null, authorText), collaboratorText !== null ? /*#__PURE__*/React.createElement("div", {
148
- className: styles.collaborator
154
+ className: classNames([styles.collaborator, _defineProperty({}, collaboratorClassName, collaboratorClassName)])
149
155
  }, collaboratorText !== null ? collaboratorText : null) : null));
150
156
  };
151
157
 
package/lib/index.js CHANGED
@@ -85,6 +85,8 @@ var propTypes = {
85
85
  isSmall: PropTypes__default["default"].bool,
86
86
  linkUnderlineColor: PropTypes__default["default"].string,
87
87
  className: PropTypes__default["default"].string,
88
+ backgroundClassName: PropTypes__default["default"].string,
89
+ collaboratorClassName: PropTypes__default["default"].string,
88
90
  shouldLoad: PropTypes__default["default"].bool
89
91
  };
90
92
  var defaultProps = {
@@ -95,11 +97,13 @@ var defaultProps = {
95
97
  isSmall: false,
96
98
  linkUnderlineColor: null,
97
99
  className: null,
100
+ backgroundClassName: null,
101
+ collaboratorClassName: null,
98
102
  shouldLoad: true
99
103
  };
100
104
 
101
105
  var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
102
- var _ref3;
106
+ var _ref4;
103
107
 
104
108
  var author = _ref.author,
105
109
  withImage = _ref.withImage,
@@ -108,6 +112,8 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
108
112
  isSmall = _ref.isSmall,
109
113
  linkUnderlineColor = _ref.linkUnderlineColor,
110
114
  className = _ref.className,
115
+ backgroundClassName = _ref.backgroundClassName,
116
+ collaboratorClassName = _ref.collaboratorClassName,
111
117
  shouldLoad = _ref.shouldLoad;
112
118
  var intl = reactIntl.useIntl();
113
119
 
@@ -130,7 +136,7 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
130
136
  }]
131
137
  });
132
138
  var authorText = utils.isTextFilled(name) ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({
133
- className: styles.name
139
+ className: classNames__default["default"]([styles.name, _defineProperty__default["default"]({}, backgroundClassName, backgroundClassName)])
134
140
  }, name)) : null;
135
141
  var collaboratorText = utils.isTextFilled(collaborator) ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({
136
142
  className: styles.collaboratorText
@@ -138,9 +144,9 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
138
144
  inline: true
139
145
  })) : null;
140
146
  return /*#__PURE__*/React__default["default"].createElement("div", {
141
- className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, styles.isSmall, isSmall), _defineProperty__default["default"](_ref3, styles.withoutAvatar, withAvatar), _defineProperty__default["default"](_ref3, styles.withoutImage, !withImage || image === null), _defineProperty__default["default"](_ref3, className, className !== null), _ref3)])
147
+ 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)])
142
148
  }, !withoutPrefix ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({}, name, {
143
- className: styles.prefix,
149
+ className: classNames__default["default"]([styles.prefix, _defineProperty__default["default"]({}, backgroundClassName, backgroundClassName)]),
144
150
  body: "<span>".concat(prefix, "<span>")
145
151
  })) : null, withAvatar ? /*#__PURE__*/React__default["default"].createElement(Avatar, {
146
152
  className: styles.image,
@@ -156,7 +162,7 @@ var UrbaniaAuthor = function UrbaniaAuthor(_ref) {
156
162
  backgroundImage: linkUnderlineColor !== null ? "linear-gradient(0deg, ".concat(linkUnderlineColor, " 0, ").concat(linkUnderlineColor, ")") : null
157
163
  }
158
164
  }, authorText) : /*#__PURE__*/React__default["default"].createElement("div", null, authorText), collaboratorText !== null ? /*#__PURE__*/React__default["default"].createElement("div", {
159
- className: styles.collaborator
165
+ className: classNames__default["default"]([styles.collaborator, _defineProperty__default["default"]({}, collaboratorClassName, collaboratorClassName)])
160
166
  }, collaboratorText !== null ? collaboratorText : null) : null));
161
167
  };
162
168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-urbania-author",
3
- "version": "0.3.133",
3
+ "version": "0.3.138",
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.126",
53
- "@micromag/element-button": "^0.3.126",
54
- "@micromag/element-link": "^0.3.126",
55
- "@micromag/element-text": "^0.3.126",
52
+ "@micromag/core": "^0.3.138",
53
+ "@micromag/element-button": "^0.3.138",
54
+ "@micromag/element-link": "^0.3.138",
55
+ "@micromag/element-text": "^0.3.138",
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": "c09ca637ad389fc48b2671eaab3cc747a09d7abd"
65
+ "gitHead": "6460d58f8b915076249a11089a5f662ac11830fa"
66
66
  }