colibri-ui 0.7.146 → 0.7.148

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/Avatar/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var tslib = require('tslib');
5
6
  var React = require('react');
6
7
  var classNames = require('classnames/bind');
7
8
  var constants = require('./constants.js');
@@ -27,21 +28,21 @@ var Avatar = /*#__PURE__*/React.memo(function (props) {
27
28
  size = _a === void 0 ? constants.AvatarSizes.M : _a,
28
29
  className = props.className,
29
30
  bordered = props.bordered,
30
- _b = props.title,
31
- title = _b === void 0 ? "" : _b,
31
+ _b = props.alt,
32
+ alt = _b === void 0 ? "profile image" : _b,
32
33
  _c = props.accountType,
33
34
  accountType = _c === void 0 ? index_props.AccountType.Organization : _c;
34
35
  var stubImageURL = getStubImage(accountType);
35
- return /*#__PURE__*/React__default.default.createElement("img", {
36
- alt: title,
36
+ return /*#__PURE__*/React__default.default.createElement("img", tslib.__assign({
37
+ alt: alt,
37
38
  src: avatarURL || stubImageURL,
38
39
  width: size,
39
40
  height: size,
40
41
  style: style,
41
- className: clx(styles__default.default.avatar, {
42
- avatar_bordered: !!bordered
42
+ className: clx('avatar', {
43
+ 'avatar_bordered': !!bordered
43
44
  }, [className])
44
- });
45
+ }, props));
45
46
  });
46
47
 
47
48
  exports.default = Avatar;
@@ -7,7 +7,7 @@ export declare enum AccountType {
7
7
  export type AvatarProps = {
8
8
  accountType?: AccountType;
9
9
  style?: CSSProperties;
10
- title?: string;
10
+ alt?: string;
11
11
  size?: AvatarSizes | number;
12
12
  avatarURL?: string;
13
13
  bordered?: boolean;
@@ -1,3 +1,4 @@
1
+ import { __assign } from 'tslib';
1
2
  import React__default, { memo } from 'react';
2
3
  import classNames from 'classnames/bind';
3
4
  import { AvatarSizes } from './constants.js';
@@ -17,21 +18,21 @@ var Avatar = /*#__PURE__*/memo(function (props) {
17
18
  size = _a === void 0 ? AvatarSizes.M : _a,
18
19
  className = props.className,
19
20
  bordered = props.bordered,
20
- _b = props.title,
21
- title = _b === void 0 ? "" : _b,
21
+ _b = props.alt,
22
+ alt = _b === void 0 ? "profile image" : _b,
22
23
  _c = props.accountType,
23
24
  accountType = _c === void 0 ? AccountType.Organization : _c;
24
25
  var stubImageURL = getStubImage(accountType);
25
- return /*#__PURE__*/React__default.createElement("img", {
26
- alt: title,
26
+ return /*#__PURE__*/React__default.createElement("img", __assign({
27
+ alt: alt,
27
28
  src: avatarURL || stubImageURL,
28
29
  width: size,
29
30
  height: size,
30
31
  style: style,
31
- className: clx(styles.avatar, {
32
- avatar_bordered: !!bordered
32
+ className: clx('avatar', {
33
+ 'avatar_bordered': !!bordered
33
34
  }, [className])
34
- });
35
+ }, props));
35
36
  });
36
37
 
37
38
  export { Avatar as default };
@@ -7,7 +7,7 @@ export declare enum AccountType {
7
7
  export type AvatarProps = {
8
8
  accountType?: AccountType;
9
9
  style?: CSSProperties;
10
- title?: string;
10
+ alt?: string;
11
11
  size?: AvatarSizes | number;
12
12
  avatarURL?: string;
13
13
  bordered?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "colibri-ui",
3
- "version": "0.7.146",
3
+ "version": "0.7.148",
4
4
  "description": "React UI components library",
5
5
  "main": "index.js",
6
6
  "scripts": {},