@atlaskit/avatar 24.0.0 → 25.0.0
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 +25 -0
- package/dist/cjs/avatar-content.compiled.css +71 -0
- package/dist/cjs/avatar-content.js +32 -155
- package/dist/cjs/avatar-item.compiled.css +56 -0
- package/dist/cjs/avatar-item.js +27 -89
- package/dist/cjs/avatar.compiled.css +5 -0
- package/dist/cjs/avatar.js +20 -21
- package/dist/cjs/internal/avatar-image.compiled.css +25 -0
- package/dist/cjs/internal/avatar-image.js +48 -64
- package/dist/cjs/internal/icon-wrapper.compiled.css +13 -0
- package/dist/cjs/internal/icon-wrapper.js +18 -25
- package/dist/cjs/presence.compiled.css +18 -0
- package/dist/cjs/presence.js +32 -24
- package/dist/cjs/skeleton.compiled.css +24 -0
- package/dist/cjs/skeleton.js +36 -54
- package/dist/cjs/status.compiled.css +15 -0
- package/dist/cjs/status.js +31 -22
- package/dist/cjs/utilities.js +1 -14
- package/dist/es2019/avatar-content.compiled.css +71 -0
- package/dist/es2019/avatar-content.js +28 -153
- package/dist/es2019/avatar-item.compiled.css +56 -0
- package/dist/es2019/avatar-item.js +23 -87
- package/dist/es2019/avatar.compiled.css +5 -0
- package/dist/es2019/avatar.js +15 -22
- package/dist/es2019/internal/avatar-image.compiled.css +25 -0
- package/dist/es2019/internal/avatar-image.js +37 -54
- package/dist/es2019/internal/icon-wrapper.compiled.css +13 -0
- package/dist/es2019/internal/icon-wrapper.js +15 -24
- package/dist/es2019/presence.compiled.css +18 -0
- package/dist/es2019/presence.js +23 -15
- package/dist/es2019/skeleton.compiled.css +24 -0
- package/dist/es2019/skeleton.js +29 -51
- package/dist/es2019/status.compiled.css +15 -0
- package/dist/es2019/status.js +22 -13
- package/dist/es2019/utilities.js +0 -9
- package/dist/esm/avatar-content.compiled.css +71 -0
- package/dist/esm/avatar-content.js +28 -153
- package/dist/esm/avatar-item.compiled.css +56 -0
- package/dist/esm/avatar-item.js +23 -87
- package/dist/esm/avatar.compiled.css +5 -0
- package/dist/esm/avatar.js +15 -22
- package/dist/esm/internal/avatar-image.compiled.css +25 -0
- package/dist/esm/internal/avatar-image.js +44 -64
- package/dist/esm/internal/icon-wrapper.compiled.css +13 -0
- package/dist/esm/internal/icon-wrapper.js +15 -25
- package/dist/esm/presence.compiled.css +18 -0
- package/dist/esm/presence.js +23 -15
- package/dist/esm/skeleton.compiled.css +24 -0
- package/dist/esm/skeleton.js +33 -56
- package/dist/esm/status.compiled.css +15 -0
- package/dist/esm/status.js +22 -13
- package/dist/esm/utilities.js +0 -13
- package/dist/types/presence.d.ts +4 -0
- package/dist/types/status.d.ts +4 -0
- package/dist/types/utilities.d.ts +0 -9
- package/dist/types-ts4.5/presence.d.ts +4 -0
- package/dist/types-ts4.5/status.d.ts +4 -0
- package/dist/types-ts4.5/utilities.d.ts +0 -9
- package/package.json +14 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/avatar
|
|
2
2
|
|
|
3
|
+
## 25.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#122909](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/122909)
|
|
8
|
+
[`5330c20b7c5fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5330c20b7c5fd) -
|
|
9
|
+
Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
|
|
10
|
+
the rest of the Atlaskit techstack, and support React 18 Streaming SSR. Please note, in order to
|
|
11
|
+
use this version of `@atlaskit/avatar`, you will need to ensure that your bundler is configured to
|
|
12
|
+
handle `.css` imports correctly.
|
|
13
|
+
|
|
14
|
+
Most bundlers come with built-in support for `.css` imports, so you may not need to do anything.
|
|
15
|
+
If you are using a different bundler, please refer to the documentation for that bundler to
|
|
16
|
+
understand how to handle `.css` imports.
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
22
|
+
## 24.0.1
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 24.0.0
|
|
4
29
|
|
|
5
30
|
### Major Changes
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
|
|
2
|
+
._14mj1crf:after{border-radius:9pt}
|
|
3
|
+
._14mj1l7b:after{border-radius:3px}
|
|
4
|
+
._14mj1q5u:after{border-radius:var(--ds-border-radius-circle,50%)}
|
|
5
|
+
._14mji2wt:after{border-radius:6px}
|
|
6
|
+
._14mjyh40:after{border-radius:2px}
|
|
7
|
+
._19itglyw{border:none}
|
|
8
|
+
._2rko1crf{border-radius:9pt}
|
|
9
|
+
._2rko1l7b{border-radius:3px}
|
|
10
|
+
._2rko1q5u{border-radius:var(--ds-border-radius-circle,50%)}
|
|
11
|
+
._2rkoi2wt{border-radius:6px}
|
|
12
|
+
._2rkoyh40{border-radius:2px}
|
|
13
|
+
._9v7aze3t:after{inset:var(--ds-space-0,0)}
|
|
14
|
+
._qc5o1p41:after{transition:opacity .2s}
|
|
15
|
+
._v564ieh6{transition:transform .2s,opacity .2s}._11fnglyw:after{pointer-events:none}
|
|
16
|
+
._12ji1r31{outline-color:currentColor}
|
|
17
|
+
._12l2v77o{margin-inline-end:var(--ds-space-025,2px)}
|
|
18
|
+
._12y31o36{outline-width:medium}
|
|
19
|
+
._16qs1nhn{box-shadow:var(--avatar-box-shadow)}
|
|
20
|
+
._18m915vq{overflow-y:hidden}
|
|
21
|
+
._18postnw:after{position:absolute}
|
|
22
|
+
._1bah1h6o{justify-content:center}
|
|
23
|
+
._1bsb16xz{width:6pc}
|
|
24
|
+
._1bsb1qr7{width:8pc}
|
|
25
|
+
._1bsb1tcg{width:24px}
|
|
26
|
+
._1bsb1ylp{width:40px}
|
|
27
|
+
._1bsb7vkz{width:1pc}
|
|
28
|
+
._1bsbzwfg{width:2pc}
|
|
29
|
+
._1e0c1txw{display:flex}
|
|
30
|
+
._1hfk1j28:after{background-color:transparent}
|
|
31
|
+
._1hfkvuon:after{background-color:var(--ds-surface,#fff)}
|
|
32
|
+
._1peqidpf:after{opacity:0}
|
|
33
|
+
._1peqs237:after{opacity:var(--ds-opacity-disabled,.7)}
|
|
34
|
+
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
35
|
+
._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
|
|
36
|
+
._1qu2glyw{outline-style:none}
|
|
37
|
+
._1reo15vq{overflow-x:hidden}
|
|
38
|
+
._2lx21bp4{flex-direction:column}
|
|
39
|
+
._4cvr1fhb{align-items:stretch}
|
|
40
|
+
._4t3i16xz{height:6pc}
|
|
41
|
+
._4t3i1qr7{height:8pc}
|
|
42
|
+
._4t3i1tcg{height:24px}
|
|
43
|
+
._4t3i1ylp{height:40px}
|
|
44
|
+
._4t3i7vkz{height:1pc}
|
|
45
|
+
._4t3izwfg{height:2pc}
|
|
46
|
+
._4tpu1g4v:hover:after{background-color:var(--ds-interaction-hovered,rgba(9,30,66,.36))}
|
|
47
|
+
._6rthv77o{margin-block-end:var(--ds-space-025,2px)}
|
|
48
|
+
._80om13gf{cursor:not-allowed}
|
|
49
|
+
._80om1kw7{cursor:inherit}
|
|
50
|
+
._80omtlke{cursor:pointer}
|
|
51
|
+
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
52
|
+
._aetrf705:after{content:" "}
|
|
53
|
+
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
54
|
+
._bfhkcxp3{background-color:var(--avatar-bg-color)}
|
|
55
|
+
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
56
|
+
._eeh8kb7n:active:after{opacity:1}
|
|
57
|
+
._ez1ykb7n:hover:after{opacity:1}
|
|
58
|
+
._gcm1182g:active:after{background-color:var(--ds-interaction-pressed,rgba(9,30,66,.36))}
|
|
59
|
+
._kqswh2mm{position:relative}
|
|
60
|
+
._kqswpfqs{position:static}
|
|
61
|
+
._t9ec1aqe{transform:translateZ(0)}
|
|
62
|
+
._vchh1ntv{box-sizing:content-box}
|
|
63
|
+
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
64
|
+
._z0ai1osq:after{width:100%}
|
|
65
|
+
._128m1bk5:focus-visible{outline-width:var(--ds-border-width-outline,2px)}
|
|
66
|
+
._1ah3v77o:focus-visible{outline-offset:var(--ds-space-025,2px)}
|
|
67
|
+
._1ejjglyw:focus-visible{box-shadow:none}
|
|
68
|
+
._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
|
|
69
|
+
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
70
|
+
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}}
|
|
71
|
+
@media screen and (forced-colors:active){._jlxit94y:focus-visible{outline-width:1px}}
|
|
@@ -1,173 +1,49 @@
|
|
|
1
|
+
/* avatar-content.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.AvatarContent = void 0;
|
|
10
|
+
require("./avatar-content.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
14
17
|
var _context = require("./context");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* @jsx jsx
|
|
18
|
-
* @jsxFrag
|
|
19
|
-
*/
|
|
20
|
-
|
|
18
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
19
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
20
|
var boxShadowCssVar = '--avatar-box-shadow';
|
|
22
21
|
var bgColorCssVar = '--avatar-bg-color';
|
|
23
22
|
var styles = {
|
|
24
|
-
root:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
border: 'none',
|
|
33
|
-
boxShadow: "var(".concat(boxShadowCssVar, ")"),
|
|
34
|
-
cursor: 'inherit',
|
|
35
|
-
marginBlockEnd: "var(--ds-space-025, 2px)",
|
|
36
|
-
marginBlockStart: "var(--ds-space-025, 2px)",
|
|
37
|
-
marginInlineEnd: "var(--ds-space-025, 2px)",
|
|
38
|
-
marginInlineStart: "var(--ds-space-025, 2px)",
|
|
39
|
-
outline: 'none',
|
|
40
|
-
overflow: 'hidden',
|
|
41
|
-
paddingBlockEnd: "var(--ds-space-0, 0px)",
|
|
42
|
-
paddingBlockStart: "var(--ds-space-0, 0px)",
|
|
43
|
-
paddingInlineEnd: "var(--ds-space-0, 0px)",
|
|
44
|
-
paddingInlineStart: "var(--ds-space-0, 0px)",
|
|
45
|
-
transform: 'translateZ(0)',
|
|
46
|
-
transition: 'transform 200ms, opacity 200ms',
|
|
47
|
-
'&::after': {
|
|
48
|
-
width: '100%',
|
|
49
|
-
position: 'absolute',
|
|
50
|
-
inset: "var(--ds-space-0, 0px)",
|
|
51
|
-
backgroundColor: 'transparent',
|
|
52
|
-
content: "' '",
|
|
53
|
-
opacity: 0,
|
|
54
|
-
pointerEvents: 'none',
|
|
55
|
-
transition: 'opacity 200ms'
|
|
56
|
-
},
|
|
57
|
-
'&:focus-visible': {
|
|
58
|
-
boxShadow: 'none',
|
|
59
|
-
outlineColor: "var(--ds-border-focused, #2684FF)",
|
|
60
|
-
outlineOffset: "var(--ds-border-width-outline, 2px)",
|
|
61
|
-
outlineStyle: 'solid',
|
|
62
|
-
outlineWidth: "var(--ds-border-width-outline, 2px)"
|
|
63
|
-
},
|
|
64
|
-
'@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)': {
|
|
65
|
-
'&:focus-visible': {
|
|
66
|
-
outlineWidth: "var(--ds-border-width, 1px)"
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}),
|
|
70
|
-
circle: (0, _react2.css)({
|
|
71
|
-
borderRadius: "var(--ds-border-radius-circle, 50%)",
|
|
72
|
-
'&::after': {
|
|
73
|
-
borderRadius: "var(--ds-border-radius-circle, 50%)"
|
|
74
|
-
}
|
|
75
|
-
}),
|
|
76
|
-
positionRelative: (0, _react2.css)({
|
|
77
|
-
position: 'relative'
|
|
78
|
-
}),
|
|
79
|
-
interactive: (0, _react2.css)({
|
|
80
|
-
cursor: 'pointer',
|
|
81
|
-
'&:hover': {
|
|
82
|
-
'&::after': {
|
|
83
|
-
backgroundColor: "var(--ds-interaction-hovered, ".concat(_colors.N70A, ")"),
|
|
84
|
-
opacity: 1
|
|
85
|
-
}
|
|
86
|
-
},
|
|
87
|
-
'&:active': {
|
|
88
|
-
transform: "scale(0.9)",
|
|
89
|
-
'&::after': {
|
|
90
|
-
backgroundColor: "var(--ds-interaction-pressed, ".concat(_colors.N70A, ")"),
|
|
91
|
-
opacity: 1
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
'@media screen and (forced-colors: active)': {
|
|
95
|
-
'&:focus-visible': {
|
|
96
|
-
outlineWidth: 1
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}),
|
|
100
|
-
disabled: (0, _react2.css)({
|
|
101
|
-
cursor: 'not-allowed',
|
|
102
|
-
'&::after': {
|
|
103
|
-
backgroundColor: "var(--ds-surface, ".concat(_colors.N0, ")"),
|
|
104
|
-
opacity: "var(--ds-opacity-disabled, 0.7)"
|
|
105
|
-
}
|
|
106
|
-
})
|
|
23
|
+
root: "_19itglyw _12ji1r31 _1qu2glyw _12y31o36 _1reo15vq _18m915vq _v564ieh6 _1e0c1txw _kqswpfqs _4cvr1fhb _1bah1h6o _2lx21bp4 _80om1kw7 _6rthv77o _1pfhv77o _12l2v77o _ahbqv77o _85i5ze3t _1q51ze3t _y4tize3t _bozgze3t _t9ec1aqe _9v7aze3t _qc5o1p41 _z0ai1osq _18postnw _1hfk1j28 _aetrf705 _1peqidpf _11fnglyw _1ejjglyw _mizu194a _1ah3v77o _ra3xnqa1 _128m1bk5 _4dave4h9",
|
|
24
|
+
circle: "_2rko1q5u _14mj1q5u",
|
|
25
|
+
positionRelative: "_kqswh2mm",
|
|
26
|
+
disabled: "_80om13gf _1hfkvuon _1peqs237"
|
|
27
|
+
};
|
|
28
|
+
var unboundStyles = {
|
|
29
|
+
root: "_vchh1ntv _bfhkcxp3 _16qs1nhn",
|
|
30
|
+
interactive: "_80omtlke _4tpu1g4v _ez1ykb7n _gcm1182g _eeh8kb7n _jlxit94y"
|
|
107
31
|
};
|
|
108
32
|
var widthHeightMap = {
|
|
109
|
-
xsmall:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
height: '24px'
|
|
116
|
-
}),
|
|
117
|
-
medium: (0, _react2.css)({
|
|
118
|
-
width: '32px',
|
|
119
|
-
height: '32px'
|
|
120
|
-
}),
|
|
121
|
-
large: (0, _react2.css)({
|
|
122
|
-
width: '40px',
|
|
123
|
-
height: '40px'
|
|
124
|
-
}),
|
|
125
|
-
xlarge: (0, _react2.css)({
|
|
126
|
-
width: '96px',
|
|
127
|
-
height: '96px'
|
|
128
|
-
}),
|
|
129
|
-
xxlarge: (0, _react2.css)({
|
|
130
|
-
width: '128px',
|
|
131
|
-
height: '128px'
|
|
132
|
-
})
|
|
33
|
+
xsmall: "_1bsb7vkz _4t3i7vkz",
|
|
34
|
+
small: "_1bsb1tcg _4t3i1tcg",
|
|
35
|
+
medium: "_1bsbzwfg _4t3izwfg",
|
|
36
|
+
large: "_1bsb1ylp _4t3i1ylp",
|
|
37
|
+
xlarge: "_1bsb16xz _4t3i16xz",
|
|
38
|
+
xxlarge: "_1bsb1qr7 _4t3i1qr7"
|
|
133
39
|
};
|
|
134
40
|
var borderRadiusMap = {
|
|
135
|
-
xsmall:
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
small: (0, _react2.css)({
|
|
142
|
-
borderRadius: '2px',
|
|
143
|
-
'&::after': {
|
|
144
|
-
borderRadius: '2px'
|
|
145
|
-
}
|
|
146
|
-
}),
|
|
147
|
-
medium: (0, _react2.css)({
|
|
148
|
-
borderRadius: '3px',
|
|
149
|
-
'&::after': {
|
|
150
|
-
borderRadius: '3px'
|
|
151
|
-
}
|
|
152
|
-
}),
|
|
153
|
-
large: (0, _react2.css)({
|
|
154
|
-
borderRadius: '3px',
|
|
155
|
-
'&::after': {
|
|
156
|
-
borderRadius: '3px'
|
|
157
|
-
}
|
|
158
|
-
}),
|
|
159
|
-
xlarge: (0, _react2.css)({
|
|
160
|
-
borderRadius: '6px',
|
|
161
|
-
'&::after': {
|
|
162
|
-
borderRadius: '6px'
|
|
163
|
-
}
|
|
164
|
-
}),
|
|
165
|
-
xxlarge: (0, _react2.css)({
|
|
166
|
-
borderRadius: '12px',
|
|
167
|
-
'&::after': {
|
|
168
|
-
borderRadius: '12px'
|
|
169
|
-
}
|
|
170
|
-
})
|
|
41
|
+
xsmall: "_2rkoyh40 _14mjyh40",
|
|
42
|
+
small: "_2rkoyh40 _14mjyh40",
|
|
43
|
+
medium: "_2rko1l7b _14mj1l7b",
|
|
44
|
+
large: "_2rko1l7b _14mj1l7b",
|
|
45
|
+
xlarge: "_2rkoi2wt _14mji2wt",
|
|
46
|
+
xxlarge: "_2rko1crf _14mj1crf"
|
|
171
47
|
};
|
|
172
48
|
/**
|
|
173
49
|
* __Avatar content__
|
|
@@ -187,7 +63,7 @@ var AvatarContent = exports.AvatarContent = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
187
63
|
appearance = _useAvatarContent.appearance,
|
|
188
64
|
avatarImage = _useAvatarContent.avatarImage,
|
|
189
65
|
_useAvatarContent$bor = _useAvatarContent.borderColor,
|
|
190
|
-
borderColor = _useAvatarContent$bor === void 0 ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-surface-overlay,
|
|
66
|
+
borderColor = _useAvatarContent$bor === void 0 ? (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ? "var(--ds-surface, #FFFFFF)" : "var(--ds-surface-overlay, #FFFFFF)" : _useAvatarContent$bor,
|
|
191
67
|
href = _useAvatarContent.href,
|
|
192
68
|
isDisabled = _useAvatarContent.isDisabled,
|
|
193
69
|
label = _useAvatarContent.label,
|
|
@@ -199,8 +75,7 @@ var AvatarContent = exports.AvatarContent = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
199
75
|
size = _useAvatarContent.size,
|
|
200
76
|
stackIndex = _useAvatarContent.stackIndex;
|
|
201
77
|
var isInteractive = Boolean(onClick || href || isDisabled);
|
|
202
|
-
return
|
|
203
|
-
css: [styles.root, borderRadiusMap[size], appearance === 'circle' && styles.circle, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && styles.interactive, isDisabled && styles.disabled],
|
|
78
|
+
return /*#__PURE__*/React.createElement(Container, (0, _extends2.default)({
|
|
204
79
|
style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, bgColorCssVar, borderColor), boxShadowCssVar, "0 0 0 2px ".concat(borderColor)),
|
|
205
80
|
ref: ref || contextRef,
|
|
206
81
|
"aria-label": isInteractive ? label : undefined,
|
|
@@ -213,5 +88,7 @@ var AvatarContent = exports.AvatarContent = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
213
88
|
href: href,
|
|
214
89
|
target: target,
|
|
215
90
|
rel: target === '_blank' ? 'noopener noreferrer' : undefined
|
|
91
|
+
}, {
|
|
92
|
+
className: (0, _runtime.ax)([unboundStyles.root, styles.root, borderRadiusMap[size], appearance === 'circle' && styles.circle, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
216
93
|
}), children || avatarImage);
|
|
217
94
|
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
._2rko1l7b{border-radius:3px}
|
|
3
|
+
._189e1bk5{border-width:var(--ds-border-width-outline,2px)}
|
|
4
|
+
._1dqonqa1{border-style:solid}
|
|
5
|
+
._1h6d1j28{border-color:transparent}._12ji1r31{outline-color:currentColor}
|
|
6
|
+
._12l2ze3t{margin-inline-end:var(--ds-space-0,0)}
|
|
7
|
+
._12y31o36{outline-width:medium}
|
|
8
|
+
._16jlkb7n{flex-grow:1}
|
|
9
|
+
._1bsb1osq{width:100%}
|
|
10
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
11
|
+
._1e0c1txw{display:flex}
|
|
12
|
+
._1e0c1ule{display:block}
|
|
13
|
+
._1hmsglyw{text-decoration-line:none}
|
|
14
|
+
._1o9zkb7n{flex-shrink:1}
|
|
15
|
+
._1pfhze3t{margin-block-start:var(--ds-space-0,0)}
|
|
16
|
+
._1q511b66{padding-block-start:var(--ds-space-050,4px)}
|
|
17
|
+
._1qu2glyw{outline-style:none}
|
|
18
|
+
._1reo15vq{overflow-x:hidden}
|
|
19
|
+
._1ul9idpf{min-width:0}
|
|
20
|
+
._1wyb181o{font-size:.85em}
|
|
21
|
+
._1wyb1kw7{font-size:inherit}
|
|
22
|
+
._4bfu1r31{text-decoration-color:currentColor}
|
|
23
|
+
._4cvr1h6o{align-items:center}
|
|
24
|
+
._6rthze3t{margin-block-end:var(--ds-space-0,0)}
|
|
25
|
+
._80om13gf{cursor:not-allowed}
|
|
26
|
+
._85i51b66{padding-block-end:var(--ds-space-050,4px)}
|
|
27
|
+
._ahbqze3t{margin-inline-start:var(--ds-space-0,0)}
|
|
28
|
+
._ajmmnqa1{text-decoration-style:solid}
|
|
29
|
+
._bfhk1g13{background-color:var(--avatar-item-bg-color)}
|
|
30
|
+
._bozg1b66{padding-inline-start:var(--ds-space-050,4px)}
|
|
31
|
+
._bozgu2gc{padding-inline-start:var(--ds-space-100,8px)}
|
|
32
|
+
._i0dl1osq{flex-basis:100%}
|
|
33
|
+
._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
|
|
34
|
+
._lcxvglyw{pointer-events:none}
|
|
35
|
+
._o5721q9c{white-space:nowrap}
|
|
36
|
+
._p12f1osq{max-width:100%}
|
|
37
|
+
._syaz131l{color:var(--ds-text-subtlest,#626f86)}
|
|
38
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
39
|
+
._syaz1kw7{color:inherit}
|
|
40
|
+
._tzy41e4z{opacity:var(--ds-opacity-disabled,.5)}
|
|
41
|
+
._vchhusvi{box-sizing:border-box}
|
|
42
|
+
._vwz419ii{line-height:1.4}
|
|
43
|
+
._vwz4kb7n{line-height:1}
|
|
44
|
+
._y3gn1e5h{text-align:left}
|
|
45
|
+
._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
|
|
46
|
+
._zg8l4jg8{font-style:normal}
|
|
47
|
+
._858u194a:focus{border-color:var(--ds-border-focused,#2684ff)}
|
|
48
|
+
._1hvw1o36:focus{outline-width:medium}
|
|
49
|
+
._49pcglyw:focus{outline-style:none}
|
|
50
|
+
._nt751r31:focus{outline-color:currentColor}
|
|
51
|
+
._1bnxglyw:hover{text-decoration-line:none}
|
|
52
|
+
._9oik1r31:hover{text-decoration-color:currentColor}
|
|
53
|
+
._d0altlke:hover{cursor:pointer}
|
|
54
|
+
._irr314ae:hover{background-color:var(--ds-background-neutral-subtle-hovered,#ebecf0)}
|
|
55
|
+
._jf4cnqa1:hover{text-decoration-style:solid}
|
|
56
|
+
._1di61l7b:active{background-color:var(--ds-background-neutral-subtle-pressed,#deebff)}
|
package/dist/cjs/avatar-item.js
CHANGED
|
@@ -1,95 +1,32 @@
|
|
|
1
|
+
/* avatar-item.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./avatar-item.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _react = require("react");
|
|
11
|
-
var _react2 = require("@emotion/react");
|
|
12
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var
|
|
14
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
17
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
18
|
var _utilities = require("./utilities");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* @jsx jsx
|
|
19
|
-
*/
|
|
20
|
-
|
|
19
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
20
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
21
21
|
var bgColorCssVar = '--avatar-item-bg-color';
|
|
22
22
|
var styles = {
|
|
23
|
-
root:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
borderRadius: '3px',
|
|
31
|
-
borderStyle: 'solid',
|
|
32
|
-
borderWidth: "var(--ds-border-width-outline, 2px)",
|
|
33
|
-
color: 'inherit',
|
|
34
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
35
|
-
fontSize: 'inherit',
|
|
36
|
-
fontStyle: 'normal',
|
|
37
|
-
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
38
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
39
|
-
lineHeight: '1',
|
|
40
|
-
marginBlockEnd: "var(--ds-space-0, 0px)",
|
|
41
|
-
marginBlockStart: "var(--ds-space-0, 0px)",
|
|
42
|
-
marginInlineEnd: "var(--ds-space-0, 0px)",
|
|
43
|
-
marginInlineStart: "var(--ds-space-0, 0px)",
|
|
44
|
-
outline: 'none',
|
|
45
|
-
paddingBlockEnd: "var(--ds-space-050, 4px)",
|
|
46
|
-
paddingBlockStart: "var(--ds-space-050, 4px)",
|
|
47
|
-
paddingInlineEnd: "var(--ds-space-050, 4px)",
|
|
48
|
-
paddingInlineStart: "var(--ds-space-050, 4px)",
|
|
49
|
-
textAlign: 'left',
|
|
50
|
-
textDecoration: 'none'
|
|
51
|
-
}),
|
|
52
|
-
rootDisabled: (0, _react2.css)({
|
|
53
|
-
cursor: 'not-allowed',
|
|
54
|
-
opacity: "var(--ds-opacity-disabled, 0.5)",
|
|
55
|
-
pointerEvents: 'none'
|
|
56
|
-
}),
|
|
57
|
-
rootInteractive: (0, _react2.css)({
|
|
58
|
-
'&:hover': {
|
|
59
|
-
backgroundColor: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N30, ")"),
|
|
60
|
-
cursor: 'pointer',
|
|
61
|
-
textDecoration: 'none'
|
|
62
|
-
},
|
|
63
|
-
'&:focus': {
|
|
64
|
-
borderColor: "var(--ds-border-focused, ".concat(_colors.B200, ")"),
|
|
65
|
-
outline: 'none'
|
|
66
|
-
},
|
|
67
|
-
'&:active': {
|
|
68
|
-
backgroundColor: "var(--ds-background-neutral-subtle-pressed, ".concat(_colors.B50, ")")
|
|
69
|
-
}
|
|
70
|
-
}),
|
|
71
|
-
avatarItem: (0, _react2.css)({
|
|
72
|
-
minWidth: 0,
|
|
73
|
-
maxWidth: '100%',
|
|
74
|
-
flex: '1 1 100%',
|
|
75
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
76
|
-
lineHeight: '1.4',
|
|
77
|
-
paddingInlineStart: "var(--ds-space-100, 8px)"
|
|
78
|
-
}),
|
|
79
|
-
baseText: (0, _react2.css)({
|
|
80
|
-
display: 'block',
|
|
81
|
-
color: "var(--ds-text, #172B4D)"
|
|
82
|
-
}),
|
|
83
|
-
truncation: (0, _react2.css)({
|
|
84
|
-
overflowX: 'hidden',
|
|
85
|
-
textOverflow: 'ellipsis',
|
|
86
|
-
whiteSpace: 'nowrap'
|
|
87
|
-
}),
|
|
88
|
-
secondaryTextLegacy: (0, _react2.css)({
|
|
89
|
-
color: "var(--ds-text-subtlest, #626F86)",
|
|
90
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
91
|
-
fontSize: '0.85em'
|
|
92
|
-
})
|
|
23
|
+
root: "_2rko1l7b _12ji1r31 _1qu2glyw _12y31o36 _4bfu1r31 _1hmsglyw _ajmmnqa1 _1h6d1j28 _1dqonqa1 _189e1bk5 _1e0c1txw _vchhusvi _1bsb1osq _4cvr1h6o _bfhk1g13 _syaz1kw7 _1wyb1kw7 _zg8l4jg8 _k48pi7a9 _vwz4kb7n _6rthze3t _1pfhze3t _12l2ze3t _ahbqze3t _85i51b66 _1q511b66 _y4ti1b66 _bozg1b66 _y3gn1e5h",
|
|
24
|
+
rootDisabled: "_80om13gf _tzy41e4z _lcxvglyw",
|
|
25
|
+
rootInteractive: "_nt751r31 _49pcglyw _1hvw1o36 _858u194a _9oik1r31 _1bnxglyw _jf4cnqa1 _irr314ae _d0altlke _1di61l7b",
|
|
26
|
+
avatarItem: "_16jlkb7n _1o9zkb7n _i0dl1osq _1ul9idpf _p12f1osq _vwz419ii _bozgu2gc",
|
|
27
|
+
baseText: "_1e0c1ule _syaz1fxt",
|
|
28
|
+
truncation: "_1reo15vq _1bto1l2s _o5721q9c",
|
|
29
|
+
secondaryTextLegacy: "_syaz131l _1wyb181o"
|
|
93
30
|
};
|
|
94
31
|
/**
|
|
95
32
|
* __Avatar item__
|
|
@@ -114,8 +51,7 @@ var AvatarItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
114
51
|
label = _ref.label;
|
|
115
52
|
var Container = (0, _utilities.getCustomElement)(isDisabled, href, onClick);
|
|
116
53
|
var isInteractive = Boolean(onClick || href);
|
|
117
|
-
return
|
|
118
|
-
css: [styles.root, isInteractive && styles.rootInteractive, isDisabled && styles.rootDisabled],
|
|
54
|
+
return /*#__PURE__*/React.createElement(Container, (0, _extends2.default)({
|
|
119
55
|
style: (0, _defineProperty2.default)({}, bgColorCssVar, backgroundColor),
|
|
120
56
|
ref: ref,
|
|
121
57
|
"aria-label": isInteractive ? label : undefined,
|
|
@@ -127,18 +63,20 @@ var AvatarItem = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
127
63
|
href: href,
|
|
128
64
|
target: target,
|
|
129
65
|
rel: target === '_blank' ? 'noopener noreferrer' : undefined
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
},
|
|
66
|
+
}, {
|
|
67
|
+
className: (0, _runtime.ax)([styles.root, isInteractive && styles.rootInteractive, isDisabled && styles.rootDisabled])
|
|
68
|
+
}), avatar, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: (0, _runtime.ax)([styles.avatarItem])
|
|
70
|
+
}, (0, _platformFeatureFlags.fg)('platform.design-system-team.avatar-item-font-size_830x6') ? /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
133
71
|
maxLines: isTruncationDisabled ? undefined : 1
|
|
134
|
-
}, primaryText),
|
|
72
|
+
}, primaryText), /*#__PURE__*/React.createElement(_compiled.Text, {
|
|
135
73
|
color: "color.text.subtlest",
|
|
136
74
|
maxLines: isTruncationDisabled ? undefined : 1,
|
|
137
75
|
size: "UNSAFE_small"
|
|
138
|
-
}, secondaryText)) :
|
|
139
|
-
|
|
140
|
-
}, primaryText),
|
|
141
|
-
|
|
76
|
+
}, secondaryText)) : /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
className: (0, _runtime.ax)([styles.baseText, !isTruncationDisabled && styles.truncation])
|
|
78
|
+
}, primaryText), /*#__PURE__*/React.createElement("span", {
|
|
79
|
+
className: (0, _runtime.ax)([styles.baseText, styles.secondaryTextLegacy, !isTruncationDisabled && styles.truncation])
|
|
142
80
|
}, secondaryText))));
|
|
143
81
|
});
|
|
144
82
|
AvatarItem.displayName = 'AvatarItem';
|
package/dist/cjs/avatar.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
/* avatar.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
1
2
|
"use strict";
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
6
|
Object.defineProperty(exports, "__esModule", {
|
|
5
7
|
value: true
|
|
6
8
|
});
|
|
7
9
|
exports.default = void 0;
|
|
10
|
+
require("./avatar.compiled.css");
|
|
11
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
12
|
+
var React = _react;
|
|
13
|
+
var _runtime = require("@compiled/react/runtime");
|
|
8
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
-
var _react = require("react");
|
|
10
|
-
var _react2 = require("@emotion/react");
|
|
11
15
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
12
16
|
var _useId = require("@atlaskit/ds-lib/use-id");
|
|
13
17
|
var _avatarContent = require("./avatar-content");
|
|
@@ -16,18 +20,13 @@ var _avatarImage = _interopRequireDefault(require("./internal/avatar-image"));
|
|
|
16
20
|
var _presence = require("./presence");
|
|
17
21
|
var _status = require("./status");
|
|
18
22
|
var _utilities = require("./utilities");
|
|
23
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
24
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
25
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
20
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
21
|
-
* @jsxRuntime classic
|
|
22
|
-
* @jsx jsx
|
|
23
|
-
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
27
|
var packageName = "@atlaskit/avatar";
|
|
25
|
-
var packageVersion = "
|
|
26
|
-
var containerStyles =
|
|
27
|
-
display: 'inline-block',
|
|
28
|
-
position: 'relative',
|
|
29
|
-
outline: 0
|
|
30
|
-
});
|
|
28
|
+
var packageVersion = "25.0.0";
|
|
29
|
+
var containerStyles = null;
|
|
31
30
|
|
|
32
31
|
// eslint-disable-next-line @repo/internal/react/consistent-types-definitions
|
|
33
32
|
|
|
@@ -114,17 +113,17 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
114
113
|
var defaultLabel = [name, isStatus && !customStatusNode && "(".concat(status, ")"), isPresence && !customPresenceNode && "(".concat(presence, ")")].filter(Boolean).join(' ');
|
|
115
114
|
var isInteractive = onClick || href || isDisabled;
|
|
116
115
|
var containerShouldBeImage = Boolean(!isInteractive && defaultLabel);
|
|
117
|
-
return
|
|
116
|
+
return /*#__PURE__*/React.createElement(_context.EnsureIsInsideAvatarContext.Provider, {
|
|
118
117
|
value: true
|
|
119
|
-
},
|
|
118
|
+
}, /*#__PURE__*/React.createElement(AvatarContainer, {
|
|
120
119
|
"data-testid": testId,
|
|
121
120
|
role: containerShouldBeImage ? 'img' : undefined,
|
|
122
121
|
"aria-labelledby": containerShouldBeImage ? labelId : undefined,
|
|
123
|
-
css: containerStyles,
|
|
124
122
|
style: {
|
|
125
123
|
zIndex: stackIndex
|
|
126
|
-
}
|
|
127
|
-
|
|
124
|
+
},
|
|
125
|
+
className: (0, _runtime.ax)(["_12ji1r31 _1qu2glyw _12y3idpf _1e0c1o8l _kqswh2mm"])
|
|
126
|
+
}, /*#__PURE__*/React.createElement(_context.AvatarContentContext.Provider, {
|
|
128
127
|
value: {
|
|
129
128
|
as: (0, _utilities.getCustomElement)(isDisabled, href, onClick),
|
|
130
129
|
appearance: appearance,
|
|
@@ -138,7 +137,7 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
138
137
|
stackIndex: stackIndex,
|
|
139
138
|
target: target,
|
|
140
139
|
testId: testId ? "".concat(testId, "--inner") : undefined,
|
|
141
|
-
avatarImage:
|
|
140
|
+
avatarImage: /*#__PURE__*/React.createElement(_avatarImage.default, {
|
|
142
141
|
alt: !containerShouldBeImage && src ? name : undefined,
|
|
143
142
|
src: src,
|
|
144
143
|
appearance: appearance,
|
|
@@ -146,18 +145,18 @@ var Avatar = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
146
145
|
testId: testId
|
|
147
146
|
})
|
|
148
147
|
}
|
|
149
|
-
}, children ||
|
|
148
|
+
}, children || /*#__PURE__*/React.createElement(_avatarContent.AvatarContent, null)), isPresence && /*#__PURE__*/React.createElement(_presence.PresenceWrapper, {
|
|
150
149
|
appearance: appearance,
|
|
151
150
|
size: size,
|
|
152
151
|
presence: typeof presence === 'string' ? presence : undefined,
|
|
153
152
|
testId: testId
|
|
154
|
-
}, customPresenceNode), isStatus &&
|
|
153
|
+
}, customPresenceNode), isStatus && /*#__PURE__*/React.createElement(_status.StatusWrapper, {
|
|
155
154
|
appearance: appearance,
|
|
156
155
|
size: size,
|
|
157
156
|
borderColor: borderColor,
|
|
158
157
|
status: typeof status === 'string' ? status : undefined,
|
|
159
158
|
testId: testId
|
|
160
|
-
}, customStatusNode), containerShouldBeImage ?
|
|
159
|
+
}, customStatusNode), containerShouldBeImage ? /*#__PURE__*/React.createElement("span", {
|
|
161
160
|
"data-testid": testId && "".concat(testId, "--label"),
|
|
162
161
|
id: labelId,
|
|
163
162
|
hidden: true
|