armtek-uikit-react 1.0.42 → 1.0.43

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.
@@ -20,7 +20,11 @@
20
20
  @include flex(center);
21
21
  }
22
22
  .avatar__innerText{
23
-
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ width: 100%;
27
+ height: 100%;
24
28
  }
25
29
  .avatar_medium{
26
30
  width: 40px;
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"armtek-uikit-react","version":"1.0.42","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","clsx":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
1
+ {"name":"armtek-uikit-react","version":"1.0.43","description":"Armtek UIKit for React","repository":{"type":"git","url":"ssh://git@gl.corp:10022/int/uikit/uikit_react.git"},"author":"","license":"ISC","dependencies":{"rc-slider":"^10.2.1","react":"*","react-datepicker":"^4.16.0","react-dom":"*","clsx":"^2.0.0"},"peerDependencies":{"react":"*","react-dom":"*"},"scripts":{"pub":"npm version patch && npm publish"}}
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes } from 'react';
1
+ import { ComponentPropsWithoutRef, HTMLAttributes } from 'react';
2
2
  import { ColorStatusType, SizeType } from '../../types/theme';
3
3
  export type AvatarProps = {
4
4
  photo?: string;
@@ -8,7 +8,7 @@ export type AvatarProps = {
8
8
  icon?: string;
9
9
  size?: Exclude<SizeType, 'extraLarge'>;
10
10
  status?: Exclude<ColorStatusType, 'info'>;
11
- };
11
+ } & ComponentPropsWithoutRef<'div'>;
12
12
  export declare const getLetters: (name: string) => string;
13
13
  declare const Avatar: (props: AvatarProps) => import("react/jsx-runtime").JSX.Element;
14
14
  export default Avatar;
@@ -12,10 +12,21 @@ export const getLetters = name => {
12
12
  return nameParts[0].split('')[0] + (nameParts[1] ? nameParts[1].split('')[0] : '');
13
13
  };
14
14
  const Avatar = props => {
15
- let icon = props.icon;
16
- if (!props.icon && !props.name && !props.photo) icon = 'person';
17
- let content = props.photo ? /*#__PURE__*/_jsx("img", {
18
- src: props.photo,
15
+ const {
16
+ photo,
17
+ name,
18
+ href,
19
+ linkProps,
20
+ icon,
21
+ size,
22
+ status,
23
+ className,
24
+ ...divProps
25
+ } = props;
26
+ let displayIcon = icon;
27
+ if (!props.icon && !props.name && !photo) displayIcon = 'person';
28
+ let content = photo ? /*#__PURE__*/_jsx("img", {
29
+ src: photo,
19
30
  className: css.avatar__img,
20
31
  alt: props.name,
21
32
  title: props.name
@@ -24,26 +35,27 @@ const Avatar = props => {
24
35
  children: getLetters(props.name)
25
36
  }) : /*#__PURE__*/_jsx("span", {
26
37
  className: clsx(css.avatar__icon, 'material_icon_solid'),
27
- children: icon
38
+ children: displayIcon
28
39
  });
29
40
  return /*#__PURE__*/_jsx(_Fragment, {
30
41
  children: /*#__PURE__*/_jsxs("div", {
31
- className: clsx('Arm-avatar', {
32
- [css.avatar__photo]: !!props.photo
33
- }, css.avatar, css['avatar_' + props.size]),
42
+ ...divProps,
43
+ className: clsx('Arm-avatar', className, {
44
+ [css.avatar__photo]: !!photo
45
+ }, css.avatar, css['avatar_' + size]),
34
46
  children: [/*#__PURE__*/_jsx("div", {
35
47
  className: css.avatar__inner,
36
- children: props.href ? /*#__PURE__*/_jsx("a", {
37
- href: props.href,
38
- ...props.linkProps,
48
+ children: href ? /*#__PURE__*/_jsx("a", {
49
+ href: href,
50
+ ...linkProps,
39
51
  className: css.avatar__innerText,
40
52
  children: content
41
53
  }) : /*#__PURE__*/_jsx("span", {
42
54
  className: css.avatar__innerText,
43
55
  children: content
44
56
  })
45
- }), props.status && /*#__PURE__*/_jsx("span", {
46
- className: clsx(css.avatar__status, css['avatar__status_' + props.status])
57
+ }), status && /*#__PURE__*/_jsx("span", {
58
+ className: clsx(css.avatar__status, css['avatar__status_' + status])
47
59
  })]
48
60
  })
49
61
  });
package/ui/Chip/Chip.js CHANGED
@@ -22,7 +22,6 @@ function Chip(props) {
22
22
  disabled
23
23
  } = props;
24
24
  let Component = as || 'span';
25
- console.log(onClose);
26
25
  return /*#__PURE__*/_jsx(_Fragment, {
27
26
  children: /*#__PURE__*/_jsx(Component, {
28
27
  className: clsx('Arm-chip', className, {