@synerise/ds-avatar 1.0.18 → 1.0.20
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/CHANGELOG.md +16 -0
- package/dist/Avatar.styles.js +4 -23
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.20](https://github.com/synerise/synerise-design/compare/@synerise/ds-avatar@1.0.19...@synerise/ds-avatar@1.0.20) (2025-08-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @synerise/ds-avatar
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.0.19](https://github.com/synerise/synerise-design/compare/@synerise/ds-avatar@1.0.18...@synerise/ds-avatar@1.0.19) (2025-08-20)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @synerise/ds-avatar
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [1.0.18](https://github.com/synerise/synerise-design/compare/@synerise/ds-avatar@1.0.17...@synerise/ds-avatar@1.0.18) (2025-08-14)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @synerise/ds-avatar
|
package/dist/Avatar.styles.js
CHANGED
|
@@ -4,7 +4,6 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
4
4
|
import Avatar from 'antd/lib/avatar';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import styled, { css } from 'styled-components';
|
|
7
|
-
import { IconBadgeIcon } from '@synerise/ds-badge/dist/IconBadge/IconBadge.styles';
|
|
8
7
|
import { macro } from '@synerise/ds-typography';
|
|
9
8
|
export var TooltipGroup = styled.div.withConfig({
|
|
10
9
|
displayName: "Avatarstyles__TooltipGroup",
|
|
@@ -26,41 +25,23 @@ var BADGE_POSITION = {
|
|
|
26
25
|
squarelarge: '3px',
|
|
27
26
|
squareextraLarge: '3px'
|
|
28
27
|
};
|
|
29
|
-
var ICON_BADGE_POSITION = {
|
|
30
|
-
circlesmall: '-10px',
|
|
31
|
-
circlemedium: '-8px',
|
|
32
|
-
circlelarge: '-2px',
|
|
33
|
-
circleextraLarge: '4px',
|
|
34
|
-
squaresmall: '-11px',
|
|
35
|
-
squaremedium: '-11px',
|
|
36
|
-
squarelarge: '-11px',
|
|
37
|
-
squareextraLarge: '-11px'
|
|
38
|
-
};
|
|
39
28
|
var MACRO_MAPPING = {
|
|
40
29
|
small: macro.xsAvatar,
|
|
41
30
|
medium: macro.small,
|
|
42
31
|
large: macro.small,
|
|
43
32
|
extraLarge: macro.xlAvatar
|
|
44
33
|
};
|
|
45
|
-
var
|
|
34
|
+
var applyBadgePosition = function applyBadgePosition(props) {
|
|
46
35
|
var _props$shape = props.shape,
|
|
47
36
|
shape = _props$shape === void 0 ? 'circle' : _props$shape,
|
|
48
37
|
_props$size = props.size,
|
|
49
38
|
size = _props$size === void 0 ? 'medium' : _props$size;
|
|
50
39
|
var badgeKey = "" + shape + size;
|
|
51
|
-
return css(["top:", ";right:", ";"], ICON_BADGE_POSITION[badgeKey] || '0', ICON_BADGE_POSITION[badgeKey] || '0');
|
|
52
|
-
};
|
|
53
|
-
var applyBadgePosition = function applyBadgePosition(props) {
|
|
54
|
-
var _props$shape2 = props.shape,
|
|
55
|
-
shape = _props$shape2 === void 0 ? 'circle' : _props$shape2,
|
|
56
|
-
_props$size2 = props.size,
|
|
57
|
-
size = _props$size2 === void 0 ? 'medium' : _props$size2;
|
|
58
|
-
var badgeKey = "" + shape + size;
|
|
59
40
|
return css(["top:", ";right:", ";"], BADGE_POSITION[badgeKey] || '0', BADGE_POSITION[badgeKey] || '0');
|
|
60
41
|
};
|
|
61
42
|
var applyFontSize = function applyFontSize(props) {
|
|
62
|
-
var _props$
|
|
63
|
-
size = _props$
|
|
43
|
+
var _props$size2 = props.size,
|
|
44
|
+
size = _props$size2 === void 0 ? 'medium' : _props$size2;
|
|
64
45
|
return css(["", ";"], MACRO_MAPPING[size]);
|
|
65
46
|
};
|
|
66
47
|
export default styled(function (_ref) {
|
|
@@ -89,7 +70,7 @@ export default styled(function (_ref) {
|
|
|
89
70
|
}, function (props) {
|
|
90
71
|
return props.onClick ? css(["cursor:pointer;&:active{&::before{opacity:0.1;}}"]) : false;
|
|
91
72
|
}, function (props) {
|
|
92
|
-
return props.hasStatus && css(["& + .ant-badge-dot{display:flex;border:2px solid ", ";box-sizing:border-box;width:10px;height:10px;box-shadow:none;", ";}
|
|
73
|
+
return props.hasStatus && css(["& + .ant-badge-dot{display:flex;border:2px solid ", ";box-sizing:border-box;width:10px;height:10px;box-shadow:none;", ";}"], props.theme.palette.white, applyBadgePosition(props));
|
|
93
74
|
}, function (props) {
|
|
94
75
|
return props.size === 'medium' && css(["width:40px;min-width:40px;height:40px;.ant-avatar-string{line-height:40px;}", ";"], props.icon && css(["&.ant-avatar-icon{", ";", "}"], macro.xlAvatarIcon, macro.flexCentered));
|
|
95
76
|
}, function (props) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synerise/ds-avatar",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"description": "Avatar UI Component for the Synerise Design System",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"repository": "synerise/synerise-design",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
],
|
|
35
35
|
"types": "dist/index.d.ts",
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@synerise/ds-badge": "^1.0.
|
|
38
|
-
"@synerise/ds-icon": "^1.7.
|
|
39
|
-
"@synerise/ds-status": "^1.2.
|
|
40
|
-
"@synerise/ds-tooltip": "^1.1.
|
|
41
|
-
"@synerise/ds-typography": "^1.0.
|
|
42
|
-
"@synerise/ds-utils": "^1.4.
|
|
37
|
+
"@synerise/ds-badge": "^1.0.20",
|
|
38
|
+
"@synerise/ds-icon": "^1.7.1",
|
|
39
|
+
"@synerise/ds-status": "^1.2.13",
|
|
40
|
+
"@synerise/ds-tooltip": "^1.1.17",
|
|
41
|
+
"@synerise/ds-typography": "^1.0.19",
|
|
42
|
+
"@synerise/ds-utils": "^1.4.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@synerise/ds-core": "*",
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"react": ">=16.9.0 <= 18.3.1",
|
|
48
48
|
"styled-components": "^5.3.3"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "5f5d424cf8c7fa89e231c36a45f5ab3e4cfac8e7"
|
|
51
51
|
}
|