@atlaskit/avatar 25.3.2 → 25.4.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 +10 -0
- package/dist/cjs/avatar-content.compiled.css +23 -4
- package/dist/cjs/avatar-content.js +27 -4
- package/dist/cjs/internal/avatar-image.compiled.css +1 -0
- package/dist/cjs/internal/avatar-image.js +35 -15
- package/dist/cjs/presence.compiled.css +5 -0
- package/dist/cjs/presence.js +11 -3
- package/dist/cjs/skeleton.compiled.css +2 -1
- package/dist/cjs/skeleton.js +4 -3
- package/dist/cjs/status.compiled.css +13 -7
- package/dist/cjs/status.js +15 -7
- package/dist/es2019/avatar-content.compiled.css +23 -4
- package/dist/es2019/avatar-content.js +30 -4
- package/dist/es2019/internal/avatar-image.compiled.css +1 -0
- package/dist/es2019/internal/avatar-image.js +35 -15
- package/dist/es2019/presence.compiled.css +5 -0
- package/dist/es2019/presence.js +11 -3
- package/dist/es2019/skeleton.compiled.css +2 -1
- package/dist/es2019/skeleton.js +4 -3
- package/dist/es2019/status.compiled.css +13 -7
- package/dist/es2019/status.js +15 -7
- package/dist/esm/avatar-content.compiled.css +23 -4
- package/dist/esm/avatar-content.js +27 -4
- package/dist/esm/internal/avatar-image.compiled.css +1 -0
- package/dist/esm/internal/avatar-image.js +35 -15
- package/dist/esm/presence.compiled.css +5 -0
- package/dist/esm/presence.js +11 -3
- package/dist/esm/skeleton.compiled.css +2 -1
- package/dist/esm/skeleton.js +4 -3
- package/dist/esm/status.compiled.css +13 -7
- package/dist/esm/status.js +15 -7
- package/dist/types/types.d.ts +1 -1
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/offerings.json +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/avatar
|
|
2
2
|
|
|
3
|
+
## 25.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`a37090c1d91de`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a37090c1d91de) -
|
|
8
|
+
Adds a new hexagon appearance (`<Avatar appearance="hexagon">`) as well as a
|
|
9
|
+
`<Skeleton appearance="hexagon">` and internal Image default loader for this. The intent with this
|
|
10
|
+
appearance is documented as displaying AI agents: `circle` for users, `square` for app entities
|
|
11
|
+
(teams, projects, spaces), and`hexagon` for agent entities.
|
|
12
|
+
|
|
3
13
|
## 25.3.2
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
._14mj12b0:after{border-radius:var(--ds-radius-small,4px)}
|
|
2
3
|
._14mj1qi0:after{border-radius:var(--ds-radius-medium,6px)}
|
|
3
4
|
._14mj1qll:after{border-radius:var(--ds-radius-full,50%)}
|
|
4
|
-
.
|
|
5
|
+
._14mjidpf:after{border-radius:0}
|
|
5
6
|
._14mjlb4i:after{border-radius:var(--ds-radius-xsmall,2px)}
|
|
6
7
|
._14mjpb1k:after{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
7
8
|
._19itglyw{border:none}
|
|
9
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
8
10
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
9
11
|
._2rko1qll{border-radius:var(--ds-radius-full,50%)}
|
|
10
|
-
.
|
|
12
|
+
._2rkoidpf{border-radius:0}
|
|
11
13
|
._2rkol0p1{border-radius:var(--ds-radius-tile,25%)}
|
|
12
14
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
13
15
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
14
16
|
._9v7aze3t:after{inset:var(--ds-space-0,0)}
|
|
15
17
|
._qc5o1p41:after{transition:opacity .2s}
|
|
16
|
-
._v564ieh6{transition:transform .2s,opacity .2s}
|
|
18
|
+
._v564ieh6{transition:transform .2s,opacity .2s}
|
|
19
|
+
._18zr1dm9{padding-inline:var(--ds-border-width-selected,2px)}
|
|
20
|
+
._18zruxly{padding-inline:calc(var(--ds-border-width-selected, 2px)*.4)}
|
|
21
|
+
._195g1ukp{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 8px)}
|
|
22
|
+
._195g8ocb{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 4px)}
|
|
23
|
+
._195gcwjc{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 1px)}
|
|
24
|
+
._195gs7t4{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 2px)}
|
|
25
|
+
._1moult7l{margin-block:calc(var(--ds-border-width-selected, 2px)*1.22*-1)}
|
|
26
|
+
._1rjcf6hp{padding-block:calc(var(--ds-border-width-selected, 2px)*.5)}
|
|
27
|
+
._1rjcyvr3{padding-block:calc(var(--ds-border-width-selected, 2px)*1.22)}._11fnglyw:after{pointer-events:none}
|
|
17
28
|
._12ji1r31{outline-color:currentColor}
|
|
18
29
|
._12l2v77o{margin-inline-end:var(--ds-space-025,2px)}
|
|
19
30
|
._12y31o36{outline-width:medium}
|
|
20
31
|
._16qs1nhn{box-shadow:var(--avatar-box-shadow)}
|
|
32
|
+
._16qsn7od{box-shadow:unset}
|
|
21
33
|
._18m915vq{overflow-y:hidden}
|
|
22
34
|
._18postnw:after{position:absolute}
|
|
23
35
|
._1bah1h6o{justify-content:center}
|
|
@@ -30,6 +42,8 @@
|
|
|
30
42
|
._1e0c1txw{display:flex}
|
|
31
43
|
._1hfk1j28:after{background-color:transparent}
|
|
32
44
|
._1hfkvuon:after{background-color:var(--ds-surface,#fff)}
|
|
45
|
+
._1o9o1p6i:has(:focus-visible){background-color:var(--ds-border-focused,#388bff)}
|
|
46
|
+
._1o9ovuon:has(:focus-visible){background-color:var(--ds-surface,#fff)}
|
|
33
47
|
._1peqidpf:after{opacity:0}
|
|
34
48
|
._1peqs237:after{opacity:var(--ds-opacity-disabled,.7)}
|
|
35
49
|
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
@@ -52,6 +66,7 @@
|
|
|
52
66
|
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
53
67
|
._aetrf705:after{content:" "}
|
|
54
68
|
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
69
|
+
._bfhk1j28{background-color:transparent}
|
|
55
70
|
._bfhkcxp3{background-color:var(--avatar-bg-color)}
|
|
56
71
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
57
72
|
._eeh8kb7n:active:after{opacity:1}
|
|
@@ -59,14 +74,18 @@
|
|
|
59
74
|
._gcm1182g:active:after{background-color:var(--ds-interaction-pressed,rgba(9,30,66,.36))}
|
|
60
75
|
._kqswh2mm{position:relative}
|
|
61
76
|
._kqswpfqs{position:static}
|
|
77
|
+
._mkrz1kw7{clip-path:inherit}
|
|
78
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
62
79
|
._t9ec1aqe{transform:translateZ(0)}
|
|
63
80
|
._vchh1ntv{box-sizing:content-box}
|
|
64
81
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
65
82
|
._z0ai1osq:after{width:100%}
|
|
66
83
|
._128mdkaa:focus-visible{outline-width:var(--ds-border-width-focused,2px)}
|
|
84
|
+
._128midpf:focus-visible{outline-width:0}
|
|
67
85
|
._1ah3v77o:focus-visible{outline-offset:var(--ds-space-025,2px)}
|
|
68
86
|
._1ejjglyw:focus-visible{box-shadow:none}
|
|
87
|
+
._1ejjn7od:focus-visible{box-shadow:unset}
|
|
69
88
|
._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
|
|
70
89
|
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
71
|
-
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}}
|
|
90
|
+
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}._4davidpf:focus-visible{outline-width:0}}
|
|
72
91
|
@media screen and (forced-colors:active){._jlxit94y:focus-visible{outline-width:1px}}
|
|
@@ -27,6 +27,9 @@ var styles = {
|
|
|
27
27
|
};
|
|
28
28
|
var unboundStyles = {
|
|
29
29
|
root: "_vchh1ntv _bfhkcxp3 _16qs1nhn",
|
|
30
|
+
hexagonFocusContainer: "_1rjcyvr3 _18zr1dm9 _1moult7l _bfhk1j28 _mkrz1nd3 _1o9o1p6i",
|
|
31
|
+
hexagonBorderContainer: "_1rjcf6hp _18zruxly _bfhkcxp3 _mkrz1kw7 _1o9ovuon",
|
|
32
|
+
hexagon: "_2rkoidpf _mkrz1kw7 _16qsn7od _14mjidpf _1ejjn7od _128midpf _4davidpf",
|
|
30
33
|
interactive: "_80omtlke _4tpu1g4v _ez1ykb7n _gcm1182g _eeh8kb7n _jlxit94y"
|
|
31
34
|
};
|
|
32
35
|
var widthHeightMap = {
|
|
@@ -37,11 +40,19 @@ var widthHeightMap = {
|
|
|
37
40
|
xlarge: "_1bsb16xz _4t3i16xz",
|
|
38
41
|
xxlarge: "_1bsb1qr7 _4t3i1qr7"
|
|
39
42
|
};
|
|
43
|
+
var marginAdjustmentMap = {
|
|
44
|
+
xsmall: "_195gcwjc",
|
|
45
|
+
small: "_195gcwjc",
|
|
46
|
+
medium: "_195gs7t4",
|
|
47
|
+
large: "_195gs7t4",
|
|
48
|
+
xlarge: "_195g8ocb",
|
|
49
|
+
xxlarge: "_195g1ukp"
|
|
50
|
+
};
|
|
40
51
|
var borderRadiusMap = {
|
|
41
52
|
xsmall: "_2rkolb4i _14mjlb4i",
|
|
42
53
|
small: "_2rkolb4i _14mjlb4i",
|
|
43
|
-
medium: "
|
|
44
|
-
large: "
|
|
54
|
+
medium: "_2rko12b0 _14mj12b0",
|
|
55
|
+
large: "_2rko12b0 _14mj12b0",
|
|
45
56
|
xlarge: "_2rko1qi0 _14mj1qi0",
|
|
46
57
|
xxlarge: "_2rkopb1k _14mjpb1k"
|
|
47
58
|
};
|
|
@@ -75,7 +86,7 @@ var AvatarContent = exports.AvatarContent = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
75
86
|
size = _useAvatarContent.size,
|
|
76
87
|
stackIndex = _useAvatarContent.stackIndex;
|
|
77
88
|
var isInteractive = Boolean(onClick || href || isDisabled);
|
|
78
|
-
|
|
89
|
+
var renderedContent = /*#__PURE__*/React.createElement(Container, (0, _extends2.default)({
|
|
79
90
|
style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, bgColorCssVar, borderColor), boxShadowCssVar, "0 0 0 2px ".concat(borderColor)),
|
|
80
91
|
ref: ref || contextRef,
|
|
81
92
|
"aria-label": isInteractive ? label : undefined,
|
|
@@ -89,6 +100,18 @@ var AvatarContent = exports.AvatarContent = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
89
100
|
target: target,
|
|
90
101
|
rel: target === '_blank' ? 'noopener noreferrer' : undefined
|
|
91
102
|
}, {
|
|
92
|
-
className: (0, _runtime.ax)([unboundStyles.root, styles.root, !(0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && borderRadiusMap[size], appearance === 'square' && (0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && styles.square, appearance === 'circle' && styles.circle, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
103
|
+
className: (0, _runtime.ax)([unboundStyles.root, styles.root, !(0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && borderRadiusMap[size], appearance === 'square' && (0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && styles.square, appearance === 'circle' && styles.circle, appearance === 'hexagon' && unboundStyles.hexagon, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
93
104
|
}), children || avatarImage);
|
|
105
|
+
if (appearance !== 'hexagon') {
|
|
106
|
+
return renderedContent;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// For a Hexagon Avatar in order to have hexagonal "border" and "outline", we have to
|
|
110
|
+
// layer multiple elements and use their background colors to create the different layers.
|
|
111
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
style: (0, _defineProperty2.default)((0, _defineProperty2.default)({}, bgColorCssVar, borderColor), boxShadowCssVar, "0 0 0 2px ".concat(borderColor)),
|
|
113
|
+
className: (0, _runtime.ax)([unboundStyles.hexagonFocusContainer, marginAdjustmentMap[size]])
|
|
114
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
115
|
+
className: (0, _runtime.ax)([unboundStyles.hexagonBorderContainer])
|
|
116
|
+
}, renderedContent));
|
|
94
117
|
});
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
._4t3i1osq{height:100%}
|
|
17
17
|
._bfhk1v33{background-color:var(--ds-background-accent-gray-subtler,#dcdfe4)}
|
|
18
18
|
._i0dl1osq{flex-basis:100%}
|
|
19
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
19
20
|
._w8l516xz svg{width:6pc}
|
|
20
21
|
._w8l51qr7 svg{width:8pc}
|
|
21
22
|
._w8l51tcg svg{width:24px}
|
|
@@ -12,13 +12,15 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var React = _react;
|
|
13
13
|
var _runtime = require("@compiled/react/runtime");
|
|
14
14
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
var _aiAgent = _interopRequireDefault(require("@atlaskit/icon/core/ai-agent"));
|
|
15
16
|
var _person = _interopRequireDefault(require("@atlaskit/icon/core/migration/person"));
|
|
16
17
|
var _releaseShip = _interopRequireDefault(require("@atlaskit/icon/core/migration/release--ship"));
|
|
17
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
19
|
var styles = {
|
|
19
20
|
image: "_16jlkb7n _1o9zkb7n _i0dl1osq _1e0c1txw _1bsb1osq _4t3i1osq",
|
|
20
21
|
icon: "_1e0c1txw _1bsb1osq _4t3i1osq _bfhk1v33",
|
|
21
|
-
circle: "_2rko1rr0"
|
|
22
|
+
circle: "_2rko1rr0",
|
|
23
|
+
hexagon: "_mkrz1nd3"
|
|
22
24
|
};
|
|
23
25
|
var borderRadiusMap = {
|
|
24
26
|
xsmall: "_2rkolb4i",
|
|
@@ -60,21 +62,39 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
60
62
|
setHasImageErrored(false);
|
|
61
63
|
}, [src]);
|
|
62
64
|
if (!src || hasImageErrored) {
|
|
65
|
+
var renderedIcon;
|
|
66
|
+
switch (appearance) {
|
|
67
|
+
case 'circle':
|
|
68
|
+
renderedIcon = /*#__PURE__*/React.createElement(_person.default, {
|
|
69
|
+
label: alt,
|
|
70
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
71
|
+
testId: testId && "".concat(testId, "--person"),
|
|
72
|
+
spacing: "spacious",
|
|
73
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
74
|
+
});
|
|
75
|
+
break;
|
|
76
|
+
case 'hexagon':
|
|
77
|
+
renderedIcon = /*#__PURE__*/React.createElement(_aiAgent.default, {
|
|
78
|
+
label: alt,
|
|
79
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
80
|
+
testId: testId && "".concat(testId, "--agent"),
|
|
81
|
+
spacing: "spacious"
|
|
82
|
+
});
|
|
83
|
+
break;
|
|
84
|
+
default: // historical default for safety
|
|
85
|
+
case 'square':
|
|
86
|
+
renderedIcon = /*#__PURE__*/React.createElement(_releaseShip.default, {
|
|
87
|
+
label: alt,
|
|
88
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
89
|
+
testId: testId && "".concat(testId, "--ship"),
|
|
90
|
+
spacing: "spacious",
|
|
91
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
92
|
+
});
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
63
95
|
return /*#__PURE__*/React.createElement("span", {
|
|
64
96
|
className: (0, _runtime.ax)([styles.icon, nestedSvgStylesMap[size]])
|
|
65
|
-
},
|
|
66
|
-
label: alt,
|
|
67
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
68
|
-
testId: testId && "".concat(testId, "--person"),
|
|
69
|
-
spacing: "spacious",
|
|
70
|
-
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
71
|
-
}) : /*#__PURE__*/React.createElement(_releaseShip.default, {
|
|
72
|
-
label: alt,
|
|
73
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
74
|
-
testId: testId && "".concat(testId, "--ship"),
|
|
75
|
-
spacing: "spacious",
|
|
76
|
-
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
77
|
-
}));
|
|
97
|
+
}, renderedIcon);
|
|
78
98
|
}
|
|
79
99
|
return /*#__PURE__*/React.createElement("img", {
|
|
80
100
|
loading: imgLoading,
|
|
@@ -87,7 +107,7 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
87
107
|
"aria-hidden": !alt ? true : undefined,
|
|
88
108
|
"data-vc": testId ? "".concat(testId, "--image") : 'avatar-image',
|
|
89
109
|
"data-ssr-placeholder-ignored": true,
|
|
90
|
-
className: (0, _runtime.ax)([styles.image, borderRadiusMap[size], appearance === 'circle' && styles.circle])
|
|
110
|
+
className: (0, _runtime.ax)([styles.image, borderRadiusMap[size], appearance === 'circle' && styles.circle, appearance === 'hexagon' && styles.hexagon])
|
|
91
111
|
});
|
|
92
112
|
};
|
|
93
113
|
var _default = exports.default = AvatarImage;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
._1bsbdlk8{width:14px}
|
|
3
3
|
._1bsbf6fq{width:18px}
|
|
4
4
|
._1bsbo7ao{width:15px}
|
|
5
|
+
._1xi21lpd{right:-5px}
|
|
6
|
+
._1xi21n1a{right:-1px}
|
|
5
7
|
._1xi21v6z{right:7px}
|
|
6
8
|
._1xi2idpf{right:0}
|
|
7
9
|
._1xi2myb0{right:-4px}
|
|
@@ -10,8 +12,11 @@
|
|
|
10
12
|
._4t3idlk8{height:14px}
|
|
11
13
|
._4t3if6fq{height:18px}
|
|
12
14
|
._4t3io7ao{height:15px}
|
|
15
|
+
._94n51n1a{bottom:-1px}
|
|
13
16
|
._94n51v6z{bottom:7px}
|
|
17
|
+
._94n51y44{bottom:4px}
|
|
14
18
|
._94n5idpf{bottom:0}
|
|
19
|
+
._94n5l52n{bottom:17px}
|
|
15
20
|
._94n5myb0{bottom:-4px}
|
|
16
21
|
._94n5t94y{bottom:1px}
|
|
17
22
|
._kqswstnw{position:absolute}
|
package/dist/cjs/presence.js
CHANGED
|
@@ -86,13 +86,21 @@ var iconSizeMap = {
|
|
|
86
86
|
large: "_4t3io7ao _1bsbo7ao",
|
|
87
87
|
xlarge: "_4t3if6fq _1bsbf6fq"
|
|
88
88
|
};
|
|
89
|
-
var
|
|
90
|
-
square: "_94n5myb0 _1xi2myb0",
|
|
89
|
+
var circleIconOffsetMap = {
|
|
91
90
|
small: "_94n5idpf _1xi2idpf",
|
|
92
91
|
medium: "_94n5idpf _1xi2idpf",
|
|
93
92
|
large: "_94n5t94y _1xi2t94y",
|
|
94
93
|
xlarge: "_94n51v6z _1xi21v6z"
|
|
95
94
|
};
|
|
95
|
+
var squareIconOffsetMap = {
|
|
96
|
+
root: "_94n5myb0 _1xi2myb0"
|
|
97
|
+
};
|
|
98
|
+
var hexagonIconOffsetMap = {
|
|
99
|
+
small: "_94n51n1a _1xi21n1a",
|
|
100
|
+
medium: "_94n51n1a _1xi21n1a",
|
|
101
|
+
large: "_94n51y44 _1xi2myb0",
|
|
102
|
+
xlarge: "_94n5l52n _1xi21lpd"
|
|
103
|
+
};
|
|
96
104
|
|
|
97
105
|
/**
|
|
98
106
|
* __Presence wrapper__
|
|
@@ -109,7 +117,7 @@ var PresenceWrapper = exports.PresenceWrapper = function PresenceWrapper(_ref2)
|
|
|
109
117
|
return /*#__PURE__*/React.createElement("span", {
|
|
110
118
|
"aria-hidden": "true",
|
|
111
119
|
"data-testid": testId && "".concat(testId, "--presence"),
|
|
112
|
-
className: (0, _runtime.ax)([styles.root, iconSizeMap[size],
|
|
120
|
+
className: (0, _runtime.ax)([styles.root, iconSizeMap[size], circleIconOffsetMap[size], appearance === 'square' && squareIconOffsetMap.root, appearance === 'hexagon' && hexagonIconOffsetMap[size]])
|
|
113
121
|
}, /*#__PURE__*/React.createElement(AvatarPresence, {
|
|
114
122
|
borderColor: borderColor,
|
|
115
123
|
presence: !children ? presence : undefined
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
3
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
3
4
|
._2rko1qll{border-radius:var(--ds-radius-full,50%)}
|
|
4
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
5
5
|
._2rkol0p1{border-radius:var(--ds-radius-tile,25%)}
|
|
6
6
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
7
7
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
@@ -21,5 +21,6 @@
|
|
|
21
21
|
._4t3i7vkz{height:1pc}
|
|
22
22
|
._4t3izwfg{height:2pc}
|
|
23
23
|
._bfhk1r8p{background-color:var(--avatar-skeleton-background-color)}
|
|
24
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
24
25
|
._tzy4clii{opacity:.3}
|
|
25
26
|
._tzy4nh7s{opacity:.15}
|
package/dist/cjs/skeleton.js
CHANGED
|
@@ -17,6 +17,7 @@ var bgColorCssVar = '--avatar-skeleton-background-color';
|
|
|
17
17
|
var styles = {
|
|
18
18
|
root: "_2rko1qll _189e1dm9 _1dqonqa1 _1h6d1j28 _1e0c1o8l _bfhk1r8p _tzy4nh7s",
|
|
19
19
|
square: "_2rkol0p1",
|
|
20
|
+
hexagon: "_mkrz1nd3",
|
|
20
21
|
strongOpacity: "_tzy4clii"
|
|
21
22
|
};
|
|
22
23
|
var sizeStyles = {
|
|
@@ -30,8 +31,8 @@ var sizeStyles = {
|
|
|
30
31
|
var borderRadiusMap = {
|
|
31
32
|
xsmall: "_2rkolb4i",
|
|
32
33
|
small: "_2rkolb4i",
|
|
33
|
-
medium: "
|
|
34
|
-
large: "
|
|
34
|
+
medium: "_2rko12b0",
|
|
35
|
+
large: "_2rko12b0",
|
|
35
36
|
xlarge: "_2rko1qi0",
|
|
36
37
|
xxlarge: "_2rkopb1k"
|
|
37
38
|
};
|
|
@@ -51,7 +52,7 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
51
52
|
weight = _ref.weight;
|
|
52
53
|
return /*#__PURE__*/React.createElement("div", {
|
|
53
54
|
style: (0, _defineProperty2.default)({}, bgColorCssVar, color !== null && color !== void 0 ? color : 'currentColor'),
|
|
54
|
-
className: (0, _runtime.ax)([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && !(0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && borderRadiusMap[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && (0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && styles.square, weight === 'strong' && styles.strongOpacity])
|
|
55
|
+
className: (0, _runtime.ax)([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && !(0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && borderRadiusMap[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && (0, _platformFeatureFlags.fg)('platform_dst_avatar_tile') && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
|
|
55
56
|
});
|
|
56
57
|
};
|
|
57
58
|
var _default = exports.default = Skeleton;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
1
|
+
._152t1n1a{inset-block-start:-1px}
|
|
2
|
+
._152t1v6z{inset-block-start:7px}
|
|
3
|
+
._152t1y44{inset-block-start:4px}
|
|
4
|
+
._152tidpf{inset-block-start:0}
|
|
5
|
+
._152tl52n{inset-block-start:17px}
|
|
6
|
+
._152tt94y{inset-block-start:1px}
|
|
4
7
|
._1bsb1crf{width:9pt}
|
|
5
8
|
._1bsbdlk8{width:14px}
|
|
6
9
|
._1bsbf6fq{width:18px}
|
|
7
10
|
._1bsbo7ao{width:15px}
|
|
8
|
-
._1xi21v6z{right:7px}
|
|
9
|
-
._1xi2idpf{right:0}
|
|
10
|
-
._1xi2t94y{right:1px}
|
|
11
11
|
._4t3i1crf{height:9pt}
|
|
12
12
|
._4t3idlk8{height:14px}
|
|
13
13
|
._4t3if6fq{height:18px}
|
|
14
14
|
._4t3io7ao{height:15px}
|
|
15
|
-
._kqswstnw{position:absolute}
|
|
15
|
+
._kqswstnw{position:absolute}
|
|
16
|
+
._rjxp1lpd{inset-inline-end:-5px}
|
|
17
|
+
._rjxp1n1a{inset-inline-end:-1px}
|
|
18
|
+
._rjxp1v6z{inset-inline-end:7px}
|
|
19
|
+
._rjxpidpf{inset-inline-end:0}
|
|
20
|
+
._rjxpmyb0{inset-inline-end:-4px}
|
|
21
|
+
._rjxpt94y{inset-inline-end:1px}
|
package/dist/cjs/status.js
CHANGED
|
@@ -23,12 +23,20 @@ var iconSizeMap = {
|
|
|
23
23
|
large: "_4t3io7ao _1bsbo7ao",
|
|
24
24
|
xlarge: "_4t3if6fq _1bsbf6fq"
|
|
25
25
|
};
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
var circleIconOffsetMap = {
|
|
27
|
+
small: "_rjxpidpf _152tidpf",
|
|
28
|
+
medium: "_rjxpidpf _152tidpf",
|
|
29
|
+
large: "_rjxpt94y _152tt94y",
|
|
30
|
+
xlarge: "_rjxp1v6z _152t1v6z"
|
|
31
|
+
};
|
|
32
|
+
var squareIconOffsetMap = {
|
|
33
|
+
root: "_rjxpidpf _152tidpf"
|
|
34
|
+
};
|
|
35
|
+
var hexagonIconOffsetMap = {
|
|
36
|
+
small: "_rjxp1n1a _152t1n1a",
|
|
37
|
+
medium: "_rjxp1n1a _152t1n1a",
|
|
38
|
+
large: "_rjxpmyb0 _152t1y44",
|
|
39
|
+
xlarge: "_rjxp1lpd _152tl52n"
|
|
32
40
|
};
|
|
33
41
|
var ApprovedIndicator = /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement("circle", {
|
|
34
42
|
fill: "var(--ds-icon-success, ".concat(_colors.G400, ")"),
|
|
@@ -106,7 +114,7 @@ var StatusWrapper = exports.StatusWrapper = function StatusWrapper(_ref2) {
|
|
|
106
114
|
return /*#__PURE__*/React.createElement("span", {
|
|
107
115
|
"aria-hidden": "true",
|
|
108
116
|
"data-testid": testId && "".concat(testId, "--status"),
|
|
109
|
-
className: (0, _runtime.ax)([styles.root, iconSizeMap[size],
|
|
117
|
+
className: (0, _runtime.ax)([styles.root, iconSizeMap[size], circleIconOffsetMap[size], appearance === 'square' && squareIconOffsetMap.root, appearance === 'hexagon' && hexagonIconOffsetMap[size]])
|
|
110
118
|
}, /*#__PURE__*/React.createElement(AvatarStatus, {
|
|
111
119
|
borderColor: borderColor,
|
|
112
120
|
status: !children ? status : undefined
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
._14mj12b0:after{border-radius:var(--ds-radius-small,4px)}
|
|
2
3
|
._14mj1qi0:after{border-radius:var(--ds-radius-medium,6px)}
|
|
3
4
|
._14mj1qll:after{border-radius:var(--ds-radius-full,50%)}
|
|
4
|
-
.
|
|
5
|
+
._14mjidpf:after{border-radius:0}
|
|
5
6
|
._14mjlb4i:after{border-radius:var(--ds-radius-xsmall,2px)}
|
|
6
7
|
._14mjpb1k:after{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
7
8
|
._19itglyw{border:none}
|
|
9
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
8
10
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
9
11
|
._2rko1qll{border-radius:var(--ds-radius-full,50%)}
|
|
10
|
-
.
|
|
12
|
+
._2rkoidpf{border-radius:0}
|
|
11
13
|
._2rkol0p1{border-radius:var(--ds-radius-tile,25%)}
|
|
12
14
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
13
15
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
14
16
|
._9v7aze3t:after{inset:var(--ds-space-0,0)}
|
|
15
17
|
._qc5o1p41:after{transition:opacity .2s}
|
|
16
|
-
._v564ieh6{transition:transform .2s,opacity .2s}
|
|
18
|
+
._v564ieh6{transition:transform .2s,opacity .2s}
|
|
19
|
+
._18zr1dm9{padding-inline:var(--ds-border-width-selected,2px)}
|
|
20
|
+
._18zruxly{padding-inline:calc(var(--ds-border-width-selected, 2px)*.4)}
|
|
21
|
+
._195g1ukp{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 8px)}
|
|
22
|
+
._195g8ocb{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 4px)}
|
|
23
|
+
._195gcwjc{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 1px)}
|
|
24
|
+
._195gs7t4{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 2px)}
|
|
25
|
+
._1moult7l{margin-block:calc(var(--ds-border-width-selected, 2px)*1.22*-1)}
|
|
26
|
+
._1rjcf6hp{padding-block:calc(var(--ds-border-width-selected, 2px)*.5)}
|
|
27
|
+
._1rjcyvr3{padding-block:calc(var(--ds-border-width-selected, 2px)*1.22)}._11fnglyw:after{pointer-events:none}
|
|
17
28
|
._12ji1r31{outline-color:currentColor}
|
|
18
29
|
._12l2v77o{margin-inline-end:var(--ds-space-025,2px)}
|
|
19
30
|
._12y31o36{outline-width:medium}
|
|
20
31
|
._16qs1nhn{box-shadow:var(--avatar-box-shadow)}
|
|
32
|
+
._16qsn7od{box-shadow:unset}
|
|
21
33
|
._18m915vq{overflow-y:hidden}
|
|
22
34
|
._18postnw:after{position:absolute}
|
|
23
35
|
._1bah1h6o{justify-content:center}
|
|
@@ -30,6 +42,8 @@
|
|
|
30
42
|
._1e0c1txw{display:flex}
|
|
31
43
|
._1hfk1j28:after{background-color:transparent}
|
|
32
44
|
._1hfkvuon:after{background-color:var(--ds-surface,#fff)}
|
|
45
|
+
._1o9o1p6i:has(:focus-visible){background-color:var(--ds-border-focused,#388bff)}
|
|
46
|
+
._1o9ovuon:has(:focus-visible){background-color:var(--ds-surface,#fff)}
|
|
33
47
|
._1peqidpf:after{opacity:0}
|
|
34
48
|
._1peqs237:after{opacity:var(--ds-opacity-disabled,.7)}
|
|
35
49
|
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
@@ -52,6 +66,7 @@
|
|
|
52
66
|
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
53
67
|
._aetrf705:after{content:" "}
|
|
54
68
|
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
69
|
+
._bfhk1j28{background-color:transparent}
|
|
55
70
|
._bfhkcxp3{background-color:var(--avatar-bg-color)}
|
|
56
71
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
57
72
|
._eeh8kb7n:active:after{opacity:1}
|
|
@@ -59,14 +74,18 @@
|
|
|
59
74
|
._gcm1182g:active:after{background-color:var(--ds-interaction-pressed,rgba(9,30,66,.36))}
|
|
60
75
|
._kqswh2mm{position:relative}
|
|
61
76
|
._kqswpfqs{position:static}
|
|
77
|
+
._mkrz1kw7{clip-path:inherit}
|
|
78
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
62
79
|
._t9ec1aqe{transform:translateZ(0)}
|
|
63
80
|
._vchh1ntv{box-sizing:content-box}
|
|
64
81
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
65
82
|
._z0ai1osq:after{width:100%}
|
|
66
83
|
._128mdkaa:focus-visible{outline-width:var(--ds-border-width-focused,2px)}
|
|
84
|
+
._128midpf:focus-visible{outline-width:0}
|
|
67
85
|
._1ah3v77o:focus-visible{outline-offset:var(--ds-space-025,2px)}
|
|
68
86
|
._1ejjglyw:focus-visible{box-shadow:none}
|
|
87
|
+
._1ejjn7od:focus-visible{box-shadow:unset}
|
|
69
88
|
._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
|
|
70
89
|
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
71
|
-
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}}
|
|
90
|
+
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}._4davidpf:focus-visible{outline-width:0}}
|
|
72
91
|
@media screen and (forced-colors:active){._jlxit94y:focus-visible{outline-width:1px}}
|
|
@@ -17,6 +17,9 @@ const styles = {
|
|
|
17
17
|
};
|
|
18
18
|
const unboundStyles = {
|
|
19
19
|
root: "_vchh1ntv _bfhkcxp3 _16qs1nhn",
|
|
20
|
+
hexagonFocusContainer: "_1rjcyvr3 _18zr1dm9 _1moult7l _bfhk1j28 _mkrz1nd3 _1o9o1p6i",
|
|
21
|
+
hexagonBorderContainer: "_1rjcf6hp _18zruxly _bfhkcxp3 _mkrz1kw7 _1o9ovuon",
|
|
22
|
+
hexagon: "_2rkoidpf _mkrz1kw7 _16qsn7od _14mjidpf _1ejjn7od _128midpf _4davidpf",
|
|
20
23
|
interactive: "_80omtlke _4tpu1g4v _ez1ykb7n _gcm1182g _eeh8kb7n _jlxit94y"
|
|
21
24
|
};
|
|
22
25
|
const widthHeightMap = {
|
|
@@ -27,11 +30,19 @@ const widthHeightMap = {
|
|
|
27
30
|
xlarge: "_1bsb16xz _4t3i16xz",
|
|
28
31
|
xxlarge: "_1bsb1qr7 _4t3i1qr7"
|
|
29
32
|
};
|
|
33
|
+
const marginAdjustmentMap = {
|
|
34
|
+
xsmall: "_195gcwjc",
|
|
35
|
+
small: "_195gcwjc",
|
|
36
|
+
medium: "_195gs7t4",
|
|
37
|
+
large: "_195gs7t4",
|
|
38
|
+
xlarge: "_195g8ocb",
|
|
39
|
+
xxlarge: "_195g1ukp"
|
|
40
|
+
};
|
|
30
41
|
const borderRadiusMap = {
|
|
31
42
|
xsmall: "_2rkolb4i _14mjlb4i",
|
|
32
43
|
small: "_2rkolb4i _14mjlb4i",
|
|
33
|
-
medium: "
|
|
34
|
-
large: "
|
|
44
|
+
medium: "_2rko12b0 _14mj12b0",
|
|
45
|
+
large: "_2rko12b0 _14mj12b0",
|
|
35
46
|
xlarge: "_2rko1qi0 _14mj1qi0",
|
|
36
47
|
xxlarge: "_2rkopb1k _14mjpb1k"
|
|
37
48
|
};
|
|
@@ -66,7 +77,7 @@ export const AvatarContent = /*#__PURE__*/forwardRef(({
|
|
|
66
77
|
stackIndex
|
|
67
78
|
} = useAvatarContent();
|
|
68
79
|
const isInteractive = Boolean(onClick || href || isDisabled);
|
|
69
|
-
|
|
80
|
+
const renderedContent = /*#__PURE__*/React.createElement(Container, _extends({
|
|
70
81
|
style: {
|
|
71
82
|
[bgColorCssVar]: borderColor,
|
|
72
83
|
[boxShadowCssVar]: `0 0 0 2px ${borderColor}`
|
|
@@ -83,6 +94,21 @@ export const AvatarContent = /*#__PURE__*/forwardRef(({
|
|
|
83
94
|
target,
|
|
84
95
|
rel: target === '_blank' ? 'noopener noreferrer' : undefined
|
|
85
96
|
}, {
|
|
86
|
-
className: ax([unboundStyles.root, styles.root, !fg('platform_dst_avatar_tile') && borderRadiusMap[size], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, appearance === 'circle' && styles.circle, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
97
|
+
className: ax([unboundStyles.root, styles.root, !fg('platform_dst_avatar_tile') && borderRadiusMap[size], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, appearance === 'circle' && styles.circle, appearance === 'hexagon' && unboundStyles.hexagon, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
87
98
|
}), children || avatarImage);
|
|
99
|
+
if (appearance !== 'hexagon') {
|
|
100
|
+
return renderedContent;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// For a Hexagon Avatar in order to have hexagonal "border" and "outline", we have to
|
|
104
|
+
// layer multiple elements and use their background colors to create the different layers.
|
|
105
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
style: {
|
|
107
|
+
[bgColorCssVar]: borderColor,
|
|
108
|
+
[boxShadowCssVar]: `0 0 0 2px ${borderColor}`
|
|
109
|
+
},
|
|
110
|
+
className: ax([unboundStyles.hexagonFocusContainer, marginAdjustmentMap[size]])
|
|
111
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
112
|
+
className: ax([unboundStyles.hexagonBorderContainer])
|
|
113
|
+
}, renderedContent));
|
|
88
114
|
});
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
._4t3i1osq{height:100%}
|
|
17
17
|
._bfhk1v33{background-color:var(--ds-background-accent-gray-subtler,#dcdfe4)}
|
|
18
18
|
._i0dl1osq{flex-basis:100%}
|
|
19
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
19
20
|
._w8l516xz svg{width:6pc}
|
|
20
21
|
._w8l51qr7 svg{width:8pc}
|
|
21
22
|
._w8l51tcg svg{width:24px}
|
|
@@ -3,12 +3,14 @@ import "./avatar-image.compiled.css";
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { useEffect, useState } from 'react';
|
|
6
|
+
import AiAgentIcon from '@atlaskit/icon/core/ai-agent';
|
|
6
7
|
import PersonIcon from '@atlaskit/icon/core/migration/person';
|
|
7
8
|
import ReleaseIcon from '@atlaskit/icon/core/migration/release--ship';
|
|
8
9
|
const styles = {
|
|
9
10
|
image: "_16jlkb7n _1o9zkb7n _i0dl1osq _1e0c1txw _1bsb1osq _4t3i1osq",
|
|
10
11
|
icon: "_1e0c1txw _1bsb1osq _4t3i1osq _bfhk1v33",
|
|
11
|
-
circle: "_2rko1rr0"
|
|
12
|
+
circle: "_2rko1rr0",
|
|
13
|
+
hexagon: "_mkrz1nd3"
|
|
12
14
|
};
|
|
13
15
|
const borderRadiusMap = {
|
|
14
16
|
xsmall: "_2rkolb4i",
|
|
@@ -47,21 +49,39 @@ const AvatarImage = ({
|
|
|
47
49
|
setHasImageErrored(false);
|
|
48
50
|
}, [src]);
|
|
49
51
|
if (!src || hasImageErrored) {
|
|
52
|
+
let renderedIcon;
|
|
53
|
+
switch (appearance) {
|
|
54
|
+
case 'circle':
|
|
55
|
+
renderedIcon = /*#__PURE__*/React.createElement(PersonIcon, {
|
|
56
|
+
label: alt,
|
|
57
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
58
|
+
testId: testId && `${testId}--person`,
|
|
59
|
+
spacing: "spacious",
|
|
60
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
61
|
+
});
|
|
62
|
+
break;
|
|
63
|
+
case 'hexagon':
|
|
64
|
+
renderedIcon = /*#__PURE__*/React.createElement(AiAgentIcon, {
|
|
65
|
+
label: alt,
|
|
66
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
67
|
+
testId: testId && `${testId}--agent`,
|
|
68
|
+
spacing: "spacious"
|
|
69
|
+
});
|
|
70
|
+
break;
|
|
71
|
+
default: // historical default for safety
|
|
72
|
+
case 'square':
|
|
73
|
+
renderedIcon = /*#__PURE__*/React.createElement(ReleaseIcon, {
|
|
74
|
+
label: alt,
|
|
75
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
76
|
+
testId: testId && `${testId}--ship`,
|
|
77
|
+
spacing: "spacious",
|
|
78
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
79
|
+
});
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
50
82
|
return /*#__PURE__*/React.createElement("span", {
|
|
51
83
|
className: ax([styles.icon, nestedSvgStylesMap[size]])
|
|
52
|
-
},
|
|
53
|
-
label: alt,
|
|
54
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
55
|
-
testId: testId && `${testId}--person`,
|
|
56
|
-
spacing: "spacious",
|
|
57
|
-
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
58
|
-
}) : /*#__PURE__*/React.createElement(ReleaseIcon, {
|
|
59
|
-
label: alt,
|
|
60
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
61
|
-
testId: testId && `${testId}--ship`,
|
|
62
|
-
spacing: "spacious",
|
|
63
|
-
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
64
|
-
}));
|
|
84
|
+
}, renderedIcon);
|
|
65
85
|
}
|
|
66
86
|
return /*#__PURE__*/React.createElement("img", {
|
|
67
87
|
loading: imgLoading,
|
|
@@ -72,7 +92,7 @@ const AvatarImage = ({
|
|
|
72
92
|
"aria-hidden": !alt ? true : undefined,
|
|
73
93
|
"data-vc": testId ? `${testId}--image` : 'avatar-image',
|
|
74
94
|
"data-ssr-placeholder-ignored": true,
|
|
75
|
-
className: ax([styles.image, borderRadiusMap[size], appearance === 'circle' && styles.circle])
|
|
95
|
+
className: ax([styles.image, borderRadiusMap[size], appearance === 'circle' && styles.circle, appearance === 'hexagon' && styles.hexagon])
|
|
76
96
|
});
|
|
77
97
|
};
|
|
78
98
|
export default AvatarImage;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
._1bsbdlk8{width:14px}
|
|
3
3
|
._1bsbf6fq{width:18px}
|
|
4
4
|
._1bsbo7ao{width:15px}
|
|
5
|
+
._1xi21lpd{right:-5px}
|
|
6
|
+
._1xi21n1a{right:-1px}
|
|
5
7
|
._1xi21v6z{right:7px}
|
|
6
8
|
._1xi2idpf{right:0}
|
|
7
9
|
._1xi2myb0{right:-4px}
|
|
@@ -10,8 +12,11 @@
|
|
|
10
12
|
._4t3idlk8{height:14px}
|
|
11
13
|
._4t3if6fq{height:18px}
|
|
12
14
|
._4t3io7ao{height:15px}
|
|
15
|
+
._94n51n1a{bottom:-1px}
|
|
13
16
|
._94n51v6z{bottom:7px}
|
|
17
|
+
._94n51y44{bottom:4px}
|
|
14
18
|
._94n5idpf{bottom:0}
|
|
19
|
+
._94n5l52n{bottom:17px}
|
|
15
20
|
._94n5myb0{bottom:-4px}
|
|
16
21
|
._94n5t94y{bottom:1px}
|
|
17
22
|
._kqswstnw{position:absolute}
|
package/dist/es2019/presence.js
CHANGED
|
@@ -76,13 +76,21 @@ const iconSizeMap = {
|
|
|
76
76
|
large: "_4t3io7ao _1bsbo7ao",
|
|
77
77
|
xlarge: "_4t3if6fq _1bsbf6fq"
|
|
78
78
|
};
|
|
79
|
-
const
|
|
80
|
-
square: "_94n5myb0 _1xi2myb0",
|
|
79
|
+
const circleIconOffsetMap = {
|
|
81
80
|
small: "_94n5idpf _1xi2idpf",
|
|
82
81
|
medium: "_94n5idpf _1xi2idpf",
|
|
83
82
|
large: "_94n5t94y _1xi2t94y",
|
|
84
83
|
xlarge: "_94n51v6z _1xi21v6z"
|
|
85
84
|
};
|
|
85
|
+
const squareIconOffsetMap = {
|
|
86
|
+
root: "_94n5myb0 _1xi2myb0"
|
|
87
|
+
};
|
|
88
|
+
const hexagonIconOffsetMap = {
|
|
89
|
+
small: "_94n51n1a _1xi21n1a",
|
|
90
|
+
medium: "_94n51n1a _1xi21n1a",
|
|
91
|
+
large: "_94n51y44 _1xi2myb0",
|
|
92
|
+
xlarge: "_94n5l52n _1xi21lpd"
|
|
93
|
+
};
|
|
86
94
|
|
|
87
95
|
/**
|
|
88
96
|
* __Presence wrapper__
|
|
@@ -100,7 +108,7 @@ export const PresenceWrapper = ({
|
|
|
100
108
|
return /*#__PURE__*/React.createElement("span", {
|
|
101
109
|
"aria-hidden": "true",
|
|
102
110
|
"data-testid": testId && `${testId}--presence`,
|
|
103
|
-
className: ax([styles.root, iconSizeMap[size],
|
|
111
|
+
className: ax([styles.root, iconSizeMap[size], circleIconOffsetMap[size], appearance === 'square' && squareIconOffsetMap.root, appearance === 'hexagon' && hexagonIconOffsetMap[size]])
|
|
104
112
|
}, /*#__PURE__*/React.createElement(AvatarPresence, {
|
|
105
113
|
borderColor: borderColor,
|
|
106
114
|
presence: !children ? presence : undefined
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
3
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
3
4
|
._2rko1qll{border-radius:var(--ds-radius-full,50%)}
|
|
4
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
5
5
|
._2rkol0p1{border-radius:var(--ds-radius-tile,25%)}
|
|
6
6
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
7
7
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
@@ -21,5 +21,6 @@
|
|
|
21
21
|
._4t3i7vkz{height:1pc}
|
|
22
22
|
._4t3izwfg{height:2pc}
|
|
23
23
|
._bfhk1r8p{background-color:var(--avatar-skeleton-background-color)}
|
|
24
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
24
25
|
._tzy4clii{opacity:.3}
|
|
25
26
|
._tzy4nh7s{opacity:.15}
|
package/dist/es2019/skeleton.js
CHANGED
|
@@ -7,6 +7,7 @@ const bgColorCssVar = '--avatar-skeleton-background-color';
|
|
|
7
7
|
const styles = {
|
|
8
8
|
root: "_2rko1qll _189e1dm9 _1dqonqa1 _1h6d1j28 _1e0c1o8l _bfhk1r8p _tzy4nh7s",
|
|
9
9
|
square: "_2rkol0p1",
|
|
10
|
+
hexagon: "_mkrz1nd3",
|
|
10
11
|
strongOpacity: "_tzy4clii"
|
|
11
12
|
};
|
|
12
13
|
const sizeStyles = {
|
|
@@ -20,8 +21,8 @@ const sizeStyles = {
|
|
|
20
21
|
const borderRadiusMap = {
|
|
21
22
|
xsmall: "_2rkolb4i",
|
|
22
23
|
small: "_2rkolb4i",
|
|
23
|
-
medium: "
|
|
24
|
-
large: "
|
|
24
|
+
medium: "_2rko12b0",
|
|
25
|
+
large: "_2rko12b0",
|
|
25
26
|
xlarge: "_2rko1qi0",
|
|
26
27
|
xxlarge: "_2rkopb1k"
|
|
27
28
|
};
|
|
@@ -43,6 +44,6 @@ const Skeleton = ({
|
|
|
43
44
|
style: {
|
|
44
45
|
[bgColorCssVar]: color !== null && color !== void 0 ? color : 'currentColor'
|
|
45
46
|
},
|
|
46
|
-
className: ax([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && !fg('platform_dst_avatar_tile') && borderRadiusMap[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, weight === 'strong' && styles.strongOpacity])
|
|
47
|
+
className: ax([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && !fg('platform_dst_avatar_tile') && borderRadiusMap[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
|
|
47
48
|
});
|
|
48
49
|
export default Skeleton;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
1
|
+
._152t1n1a{inset-block-start:-1px}
|
|
2
|
+
._152t1v6z{inset-block-start:7px}
|
|
3
|
+
._152t1y44{inset-block-start:4px}
|
|
4
|
+
._152tidpf{inset-block-start:0}
|
|
5
|
+
._152tl52n{inset-block-start:17px}
|
|
6
|
+
._152tt94y{inset-block-start:1px}
|
|
4
7
|
._1bsb1crf{width:9pt}
|
|
5
8
|
._1bsbdlk8{width:14px}
|
|
6
9
|
._1bsbf6fq{width:18px}
|
|
7
10
|
._1bsbo7ao{width:15px}
|
|
8
|
-
._1xi21v6z{right:7px}
|
|
9
|
-
._1xi2idpf{right:0}
|
|
10
|
-
._1xi2t94y{right:1px}
|
|
11
11
|
._4t3i1crf{height:9pt}
|
|
12
12
|
._4t3idlk8{height:14px}
|
|
13
13
|
._4t3if6fq{height:18px}
|
|
14
14
|
._4t3io7ao{height:15px}
|
|
15
|
-
._kqswstnw{position:absolute}
|
|
15
|
+
._kqswstnw{position:absolute}
|
|
16
|
+
._rjxp1lpd{inset-inline-end:-5px}
|
|
17
|
+
._rjxp1n1a{inset-inline-end:-1px}
|
|
18
|
+
._rjxp1v6z{inset-inline-end:7px}
|
|
19
|
+
._rjxpidpf{inset-inline-end:0}
|
|
20
|
+
._rjxpmyb0{inset-inline-end:-4px}
|
|
21
|
+
._rjxpt94y{inset-inline-end:1px}
|
package/dist/es2019/status.js
CHANGED
|
@@ -14,12 +14,20 @@ const iconSizeMap = {
|
|
|
14
14
|
large: "_4t3io7ao _1bsbo7ao",
|
|
15
15
|
xlarge: "_4t3if6fq _1bsbf6fq"
|
|
16
16
|
};
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
const circleIconOffsetMap = {
|
|
18
|
+
small: "_rjxpidpf _152tidpf",
|
|
19
|
+
medium: "_rjxpidpf _152tidpf",
|
|
20
|
+
large: "_rjxpt94y _152tt94y",
|
|
21
|
+
xlarge: "_rjxp1v6z _152t1v6z"
|
|
22
|
+
};
|
|
23
|
+
const squareIconOffsetMap = {
|
|
24
|
+
root: "_rjxpidpf _152tidpf"
|
|
25
|
+
};
|
|
26
|
+
const hexagonIconOffsetMap = {
|
|
27
|
+
small: "_rjxp1n1a _152t1n1a",
|
|
28
|
+
medium: "_rjxp1n1a _152t1n1a",
|
|
29
|
+
large: "_rjxpmyb0 _152t1y44",
|
|
30
|
+
xlarge: "_rjxp1lpd _152tl52n"
|
|
23
31
|
};
|
|
24
32
|
const ApprovedIndicator = /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("circle", {
|
|
25
33
|
fill: `var(--ds-icon-success, ${G400})`,
|
|
@@ -97,7 +105,7 @@ export const StatusWrapper = ({
|
|
|
97
105
|
return /*#__PURE__*/React.createElement("span", {
|
|
98
106
|
"aria-hidden": "true",
|
|
99
107
|
"data-testid": testId && `${testId}--status`,
|
|
100
|
-
className: ax([styles.root, iconSizeMap[size],
|
|
108
|
+
className: ax([styles.root, iconSizeMap[size], circleIconOffsetMap[size], appearance === 'square' && squareIconOffsetMap.root, appearance === 'hexagon' && hexagonIconOffsetMap[size]])
|
|
101
109
|
}, /*#__PURE__*/React.createElement(AvatarStatus, {
|
|
102
110
|
borderColor: borderColor,
|
|
103
111
|
status: !children ? status : undefined
|
|
@@ -1,23 +1,35 @@
|
|
|
1
1
|
|
|
2
|
+
._14mj12b0:after{border-radius:var(--ds-radius-small,4px)}
|
|
2
3
|
._14mj1qi0:after{border-radius:var(--ds-radius-medium,6px)}
|
|
3
4
|
._14mj1qll:after{border-radius:var(--ds-radius-full,50%)}
|
|
4
|
-
.
|
|
5
|
+
._14mjidpf:after{border-radius:0}
|
|
5
6
|
._14mjlb4i:after{border-radius:var(--ds-radius-xsmall,2px)}
|
|
6
7
|
._14mjpb1k:after{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
7
8
|
._19itglyw{border:none}
|
|
9
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
8
10
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
9
11
|
._2rko1qll{border-radius:var(--ds-radius-full,50%)}
|
|
10
|
-
.
|
|
12
|
+
._2rkoidpf{border-radius:0}
|
|
11
13
|
._2rkol0p1{border-radius:var(--ds-radius-tile,25%)}
|
|
12
14
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
13
15
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}
|
|
14
16
|
._9v7aze3t:after{inset:var(--ds-space-0,0)}
|
|
15
17
|
._qc5o1p41:after{transition:opacity .2s}
|
|
16
|
-
._v564ieh6{transition:transform .2s,opacity .2s}
|
|
18
|
+
._v564ieh6{transition:transform .2s,opacity .2s}
|
|
19
|
+
._18zr1dm9{padding-inline:var(--ds-border-width-selected,2px)}
|
|
20
|
+
._18zruxly{padding-inline:calc(var(--ds-border-width-selected, 2px)*.4)}
|
|
21
|
+
._195g1ukp{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 8px)}
|
|
22
|
+
._195g8ocb{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 4px)}
|
|
23
|
+
._195gcwjc{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 1px)}
|
|
24
|
+
._195gs7t4{margin-inline:calc(var(--ds-border-width-selected, 2px)*-1 - 2px)}
|
|
25
|
+
._1moult7l{margin-block:calc(var(--ds-border-width-selected, 2px)*1.22*-1)}
|
|
26
|
+
._1rjcf6hp{padding-block:calc(var(--ds-border-width-selected, 2px)*.5)}
|
|
27
|
+
._1rjcyvr3{padding-block:calc(var(--ds-border-width-selected, 2px)*1.22)}._11fnglyw:after{pointer-events:none}
|
|
17
28
|
._12ji1r31{outline-color:currentColor}
|
|
18
29
|
._12l2v77o{margin-inline-end:var(--ds-space-025,2px)}
|
|
19
30
|
._12y31o36{outline-width:medium}
|
|
20
31
|
._16qs1nhn{box-shadow:var(--avatar-box-shadow)}
|
|
32
|
+
._16qsn7od{box-shadow:unset}
|
|
21
33
|
._18m915vq{overflow-y:hidden}
|
|
22
34
|
._18postnw:after{position:absolute}
|
|
23
35
|
._1bah1h6o{justify-content:center}
|
|
@@ -30,6 +42,8 @@
|
|
|
30
42
|
._1e0c1txw{display:flex}
|
|
31
43
|
._1hfk1j28:after{background-color:transparent}
|
|
32
44
|
._1hfkvuon:after{background-color:var(--ds-surface,#fff)}
|
|
45
|
+
._1o9o1p6i:has(:focus-visible){background-color:var(--ds-border-focused,#388bff)}
|
|
46
|
+
._1o9ovuon:has(:focus-visible){background-color:var(--ds-surface,#fff)}
|
|
33
47
|
._1peqidpf:after{opacity:0}
|
|
34
48
|
._1peqs237:after{opacity:var(--ds-opacity-disabled,.7)}
|
|
35
49
|
._1pfhv77o{margin-block-start:var(--ds-space-025,2px)}
|
|
@@ -52,6 +66,7 @@
|
|
|
52
66
|
._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
|
|
53
67
|
._aetrf705:after{content:" "}
|
|
54
68
|
._ahbqv77o{margin-inline-start:var(--ds-space-025,2px)}
|
|
69
|
+
._bfhk1j28{background-color:transparent}
|
|
55
70
|
._bfhkcxp3{background-color:var(--avatar-bg-color)}
|
|
56
71
|
._bozgze3t{padding-inline-start:var(--ds-space-0,0)}
|
|
57
72
|
._eeh8kb7n:active:after{opacity:1}
|
|
@@ -59,14 +74,18 @@
|
|
|
59
74
|
._gcm1182g:active:after{background-color:var(--ds-interaction-pressed,rgba(9,30,66,.36))}
|
|
60
75
|
._kqswh2mm{position:relative}
|
|
61
76
|
._kqswpfqs{position:static}
|
|
77
|
+
._mkrz1kw7{clip-path:inherit}
|
|
78
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
62
79
|
._t9ec1aqe{transform:translateZ(0)}
|
|
63
80
|
._vchh1ntv{box-sizing:content-box}
|
|
64
81
|
._y4tize3t{padding-inline-end:var(--ds-space-0,0)}
|
|
65
82
|
._z0ai1osq:after{width:100%}
|
|
66
83
|
._128mdkaa:focus-visible{outline-width:var(--ds-border-width-focused,2px)}
|
|
84
|
+
._128midpf:focus-visible{outline-width:0}
|
|
67
85
|
._1ah3v77o:focus-visible{outline-offset:var(--ds-space-025,2px)}
|
|
68
86
|
._1ejjglyw:focus-visible{box-shadow:none}
|
|
87
|
+
._1ejjn7od:focus-visible{box-shadow:unset}
|
|
69
88
|
._mizu194a:focus-visible{outline-color:var(--ds-border-focused,#2684ff)}
|
|
70
89
|
._ra3xnqa1:focus-visible{outline-style:solid}
|
|
71
|
-
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}}
|
|
90
|
+
@media screen and (-ms-high-contrast:active),screen and (forced-colors:active){._4dave4h9:focus-visible{outline-width:var(--ds-border-width,1px)}._4davidpf:focus-visible{outline-width:0}}
|
|
72
91
|
@media screen and (forced-colors:active){._jlxit94y:focus-visible{outline-width:1px}}
|
|
@@ -18,6 +18,9 @@ var styles = {
|
|
|
18
18
|
};
|
|
19
19
|
var unboundStyles = {
|
|
20
20
|
root: "_vchh1ntv _bfhkcxp3 _16qs1nhn",
|
|
21
|
+
hexagonFocusContainer: "_1rjcyvr3 _18zr1dm9 _1moult7l _bfhk1j28 _mkrz1nd3 _1o9o1p6i",
|
|
22
|
+
hexagonBorderContainer: "_1rjcf6hp _18zruxly _bfhkcxp3 _mkrz1kw7 _1o9ovuon",
|
|
23
|
+
hexagon: "_2rkoidpf _mkrz1kw7 _16qsn7od _14mjidpf _1ejjn7od _128midpf _4davidpf",
|
|
21
24
|
interactive: "_80omtlke _4tpu1g4v _ez1ykb7n _gcm1182g _eeh8kb7n _jlxit94y"
|
|
22
25
|
};
|
|
23
26
|
var widthHeightMap = {
|
|
@@ -28,11 +31,19 @@ var widthHeightMap = {
|
|
|
28
31
|
xlarge: "_1bsb16xz _4t3i16xz",
|
|
29
32
|
xxlarge: "_1bsb1qr7 _4t3i1qr7"
|
|
30
33
|
};
|
|
34
|
+
var marginAdjustmentMap = {
|
|
35
|
+
xsmall: "_195gcwjc",
|
|
36
|
+
small: "_195gcwjc",
|
|
37
|
+
medium: "_195gs7t4",
|
|
38
|
+
large: "_195gs7t4",
|
|
39
|
+
xlarge: "_195g8ocb",
|
|
40
|
+
xxlarge: "_195g1ukp"
|
|
41
|
+
};
|
|
31
42
|
var borderRadiusMap = {
|
|
32
43
|
xsmall: "_2rkolb4i _14mjlb4i",
|
|
33
44
|
small: "_2rkolb4i _14mjlb4i",
|
|
34
|
-
medium: "
|
|
35
|
-
large: "
|
|
45
|
+
medium: "_2rko12b0 _14mj12b0",
|
|
46
|
+
large: "_2rko12b0 _14mj12b0",
|
|
36
47
|
xlarge: "_2rko1qi0 _14mj1qi0",
|
|
37
48
|
xxlarge: "_2rkopb1k _14mjpb1k"
|
|
38
49
|
};
|
|
@@ -66,7 +77,7 @@ export var AvatarContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
66
77
|
size = _useAvatarContent.size,
|
|
67
78
|
stackIndex = _useAvatarContent.stackIndex;
|
|
68
79
|
var isInteractive = Boolean(onClick || href || isDisabled);
|
|
69
|
-
|
|
80
|
+
var renderedContent = /*#__PURE__*/React.createElement(Container, _extends({
|
|
70
81
|
style: _defineProperty(_defineProperty({}, bgColorCssVar, borderColor), boxShadowCssVar, "0 0 0 2px ".concat(borderColor)),
|
|
71
82
|
ref: ref || contextRef,
|
|
72
83
|
"aria-label": isInteractive ? label : undefined,
|
|
@@ -80,6 +91,18 @@ export var AvatarContent = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
80
91
|
target: target,
|
|
81
92
|
rel: target === '_blank' ? 'noopener noreferrer' : undefined
|
|
82
93
|
}, {
|
|
83
|
-
className: ax([unboundStyles.root, styles.root, !fg('platform_dst_avatar_tile') && borderRadiusMap[size], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, appearance === 'circle' && styles.circle, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
94
|
+
className: ax([unboundStyles.root, styles.root, !fg('platform_dst_avatar_tile') && borderRadiusMap[size], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, appearance === 'circle' && styles.circle, appearance === 'hexagon' && unboundStyles.hexagon, widthHeightMap[size], stackIndex !== undefined && styles.positionRelative, isInteractive && !isDisabled && unboundStyles.interactive, isDisabled && styles.disabled])
|
|
84
95
|
}), children || avatarImage);
|
|
96
|
+
if (appearance !== 'hexagon') {
|
|
97
|
+
return renderedContent;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// For a Hexagon Avatar in order to have hexagonal "border" and "outline", we have to
|
|
101
|
+
// layer multiple elements and use their background colors to create the different layers.
|
|
102
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
103
|
+
style: _defineProperty(_defineProperty({}, bgColorCssVar, borderColor), boxShadowCssVar, "0 0 0 2px ".concat(borderColor)),
|
|
104
|
+
className: ax([unboundStyles.hexagonFocusContainer, marginAdjustmentMap[size]])
|
|
105
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
className: ax([unboundStyles.hexagonBorderContainer])
|
|
107
|
+
}, renderedContent));
|
|
85
108
|
});
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
._4t3i1osq{height:100%}
|
|
17
17
|
._bfhk1v33{background-color:var(--ds-background-accent-gray-subtler,#dcdfe4)}
|
|
18
18
|
._i0dl1osq{flex-basis:100%}
|
|
19
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
19
20
|
._w8l516xz svg{width:6pc}
|
|
20
21
|
._w8l51qr7 svg{width:8pc}
|
|
21
22
|
._w8l51tcg svg{width:24px}
|
|
@@ -4,12 +4,14 @@ import "./avatar-image.compiled.css";
|
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ax, ix } from "@compiled/react/runtime";
|
|
6
6
|
import { useEffect, useState } from 'react';
|
|
7
|
+
import AiAgentIcon from '@atlaskit/icon/core/ai-agent';
|
|
7
8
|
import PersonIcon from '@atlaskit/icon/core/migration/person';
|
|
8
9
|
import ReleaseIcon from '@atlaskit/icon/core/migration/release--ship';
|
|
9
10
|
var styles = {
|
|
10
11
|
image: "_16jlkb7n _1o9zkb7n _i0dl1osq _1e0c1txw _1bsb1osq _4t3i1osq",
|
|
11
12
|
icon: "_1e0c1txw _1bsb1osq _4t3i1osq _bfhk1v33",
|
|
12
|
-
circle: "_2rko1rr0"
|
|
13
|
+
circle: "_2rko1rr0",
|
|
14
|
+
hexagon: "_mkrz1nd3"
|
|
13
15
|
};
|
|
14
16
|
var borderRadiusMap = {
|
|
15
17
|
xsmall: "_2rkolb4i",
|
|
@@ -51,21 +53,39 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
51
53
|
setHasImageErrored(false);
|
|
52
54
|
}, [src]);
|
|
53
55
|
if (!src || hasImageErrored) {
|
|
56
|
+
var renderedIcon;
|
|
57
|
+
switch (appearance) {
|
|
58
|
+
case 'circle':
|
|
59
|
+
renderedIcon = /*#__PURE__*/React.createElement(PersonIcon, {
|
|
60
|
+
label: alt,
|
|
61
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
62
|
+
testId: testId && "".concat(testId, "--person"),
|
|
63
|
+
spacing: "spacious",
|
|
64
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
65
|
+
});
|
|
66
|
+
break;
|
|
67
|
+
case 'hexagon':
|
|
68
|
+
renderedIcon = /*#__PURE__*/React.createElement(AiAgentIcon, {
|
|
69
|
+
label: alt,
|
|
70
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
71
|
+
testId: testId && "".concat(testId, "--agent"),
|
|
72
|
+
spacing: "spacious"
|
|
73
|
+
});
|
|
74
|
+
break;
|
|
75
|
+
default: // historical default for safety
|
|
76
|
+
case 'square':
|
|
77
|
+
renderedIcon = /*#__PURE__*/React.createElement(ReleaseIcon, {
|
|
78
|
+
label: alt,
|
|
79
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
80
|
+
testId: testId && "".concat(testId, "--ship"),
|
|
81
|
+
spacing: "spacious",
|
|
82
|
+
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
83
|
+
});
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
54
86
|
return /*#__PURE__*/React.createElement("span", {
|
|
55
87
|
className: ax([styles.icon, nestedSvgStylesMap[size]])
|
|
56
|
-
},
|
|
57
|
-
label: alt,
|
|
58
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
59
|
-
testId: testId && "".concat(testId, "--person"),
|
|
60
|
-
spacing: "spacious",
|
|
61
|
-
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
62
|
-
}) : /*#__PURE__*/React.createElement(ReleaseIcon, {
|
|
63
|
-
label: alt,
|
|
64
|
-
color: "var(--ds-icon-subtle, #626F86)",
|
|
65
|
-
testId: testId && "".concat(testId, "--ship"),
|
|
66
|
-
spacing: "spacious",
|
|
67
|
-
LEGACY_secondaryColor: "var(--ds-icon-subtle, #626F86)"
|
|
68
|
-
}));
|
|
88
|
+
}, renderedIcon);
|
|
69
89
|
}
|
|
70
90
|
return /*#__PURE__*/React.createElement("img", {
|
|
71
91
|
loading: imgLoading,
|
|
@@ -78,7 +98,7 @@ var AvatarImage = function AvatarImage(_ref) {
|
|
|
78
98
|
"aria-hidden": !alt ? true : undefined,
|
|
79
99
|
"data-vc": testId ? "".concat(testId, "--image") : 'avatar-image',
|
|
80
100
|
"data-ssr-placeholder-ignored": true,
|
|
81
|
-
className: ax([styles.image, borderRadiusMap[size], appearance === 'circle' && styles.circle])
|
|
101
|
+
className: ax([styles.image, borderRadiusMap[size], appearance === 'circle' && styles.circle, appearance === 'hexagon' && styles.hexagon])
|
|
82
102
|
});
|
|
83
103
|
};
|
|
84
104
|
export default AvatarImage;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
._1bsbdlk8{width:14px}
|
|
3
3
|
._1bsbf6fq{width:18px}
|
|
4
4
|
._1bsbo7ao{width:15px}
|
|
5
|
+
._1xi21lpd{right:-5px}
|
|
6
|
+
._1xi21n1a{right:-1px}
|
|
5
7
|
._1xi21v6z{right:7px}
|
|
6
8
|
._1xi2idpf{right:0}
|
|
7
9
|
._1xi2myb0{right:-4px}
|
|
@@ -10,8 +12,11 @@
|
|
|
10
12
|
._4t3idlk8{height:14px}
|
|
11
13
|
._4t3if6fq{height:18px}
|
|
12
14
|
._4t3io7ao{height:15px}
|
|
15
|
+
._94n51n1a{bottom:-1px}
|
|
13
16
|
._94n51v6z{bottom:7px}
|
|
17
|
+
._94n51y44{bottom:4px}
|
|
14
18
|
._94n5idpf{bottom:0}
|
|
19
|
+
._94n5l52n{bottom:17px}
|
|
15
20
|
._94n5myb0{bottom:-4px}
|
|
16
21
|
._94n5t94y{bottom:1px}
|
|
17
22
|
._kqswstnw{position:absolute}
|
package/dist/esm/presence.js
CHANGED
|
@@ -77,13 +77,21 @@ var iconSizeMap = {
|
|
|
77
77
|
large: "_4t3io7ao _1bsbo7ao",
|
|
78
78
|
xlarge: "_4t3if6fq _1bsbf6fq"
|
|
79
79
|
};
|
|
80
|
-
var
|
|
81
|
-
square: "_94n5myb0 _1xi2myb0",
|
|
80
|
+
var circleIconOffsetMap = {
|
|
82
81
|
small: "_94n5idpf _1xi2idpf",
|
|
83
82
|
medium: "_94n5idpf _1xi2idpf",
|
|
84
83
|
large: "_94n5t94y _1xi2t94y",
|
|
85
84
|
xlarge: "_94n51v6z _1xi21v6z"
|
|
86
85
|
};
|
|
86
|
+
var squareIconOffsetMap = {
|
|
87
|
+
root: "_94n5myb0 _1xi2myb0"
|
|
88
|
+
};
|
|
89
|
+
var hexagonIconOffsetMap = {
|
|
90
|
+
small: "_94n51n1a _1xi21n1a",
|
|
91
|
+
medium: "_94n51n1a _1xi21n1a",
|
|
92
|
+
large: "_94n51y44 _1xi2myb0",
|
|
93
|
+
xlarge: "_94n5l52n _1xi21lpd"
|
|
94
|
+
};
|
|
87
95
|
|
|
88
96
|
/**
|
|
89
97
|
* __Presence wrapper__
|
|
@@ -100,7 +108,7 @@ export var PresenceWrapper = function PresenceWrapper(_ref2) {
|
|
|
100
108
|
return /*#__PURE__*/React.createElement("span", {
|
|
101
109
|
"aria-hidden": "true",
|
|
102
110
|
"data-testid": testId && "".concat(testId, "--presence"),
|
|
103
|
-
className: ax([styles.root, iconSizeMap[size],
|
|
111
|
+
className: ax([styles.root, iconSizeMap[size], circleIconOffsetMap[size], appearance === 'square' && squareIconOffsetMap.root, appearance === 'hexagon' && hexagonIconOffsetMap[size]])
|
|
104
112
|
}, /*#__PURE__*/React.createElement(AvatarPresence, {
|
|
105
113
|
borderColor: borderColor,
|
|
106
114
|
presence: !children ? presence : undefined
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
+
._2rko12b0{border-radius:var(--ds-radius-small,4px)}
|
|
2
3
|
._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
|
|
3
4
|
._2rko1qll{border-radius:var(--ds-radius-full,50%)}
|
|
4
|
-
._2rkofajl{border-radius:var(--ds-radius-small,3px)}
|
|
5
5
|
._2rkol0p1{border-radius:var(--ds-radius-tile,25%)}
|
|
6
6
|
._2rkolb4i{border-radius:var(--ds-radius-xsmall,2px)}
|
|
7
7
|
._2rkopb1k{border-radius:var(--ds-radius-xlarge,9pt)}._189e1dm9{border-width:var(--ds-border-width-selected,2px)}
|
|
@@ -21,5 +21,6 @@
|
|
|
21
21
|
._4t3i7vkz{height:1pc}
|
|
22
22
|
._4t3izwfg{height:2pc}
|
|
23
23
|
._bfhk1r8p{background-color:var(--avatar-skeleton-background-color)}
|
|
24
|
+
._mkrz1nd3{clip-path:polygon(45% 1.33975%,46.5798% .60307%,48.26352% .15192%,50% 0,51.73648% .15192%,53.4202% .60307%,55% 1.33975%,92.64102% 21.33975%,94.06889% 22.33956%,95.30146% 23.57212%,96.30127% 25%,97.03794% 26.5798%,97.48909% 28.26352%,97.64102% 30%,97.64102% 70%,97.48909% 71.73648%,97.03794% 73.4202%,96.30127% 75%,95.30146% 76.42788%,94.06889% 77.66044%,92.64102% 78.66025%,55% 98.66025%,53.4202% 99.39693%,51.73648% 99.84808%,50% 100%,48.26352% 99.84808%,46.5798% 99.39693%,45% 98.66025%,7.35898% 78.66025%,5.93111% 77.66044%,4.69854% 76.42788%,3.69873% 75%,2.96206% 73.4202%,2.51091% 71.73648%,2.35898% 70%,2.35898% 30%,2.51091% 28.26352%,2.96206% 26.5798%,3.69873% 25%,4.69854% 23.57212%,5.93111% 22.33956%,7.35898% 21.33975%)}
|
|
24
25
|
._tzy4clii{opacity:.3}
|
|
25
26
|
._tzy4nh7s{opacity:.15}
|
package/dist/esm/skeleton.js
CHANGED
|
@@ -8,6 +8,7 @@ var bgColorCssVar = '--avatar-skeleton-background-color';
|
|
|
8
8
|
var styles = {
|
|
9
9
|
root: "_2rko1qll _189e1dm9 _1dqonqa1 _1h6d1j28 _1e0c1o8l _bfhk1r8p _tzy4nh7s",
|
|
10
10
|
square: "_2rkol0p1",
|
|
11
|
+
hexagon: "_mkrz1nd3",
|
|
11
12
|
strongOpacity: "_tzy4clii"
|
|
12
13
|
};
|
|
13
14
|
var sizeStyles = {
|
|
@@ -21,8 +22,8 @@ var sizeStyles = {
|
|
|
21
22
|
var borderRadiusMap = {
|
|
22
23
|
xsmall: "_2rkolb4i",
|
|
23
24
|
small: "_2rkolb4i",
|
|
24
|
-
medium: "
|
|
25
|
-
large: "
|
|
25
|
+
medium: "_2rko12b0",
|
|
26
|
+
large: "_2rko12b0",
|
|
26
27
|
xlarge: "_2rko1qi0",
|
|
27
28
|
xxlarge: "_2rkopb1k"
|
|
28
29
|
};
|
|
@@ -42,7 +43,7 @@ var Skeleton = function Skeleton(_ref) {
|
|
|
42
43
|
weight = _ref.weight;
|
|
43
44
|
return /*#__PURE__*/React.createElement("div", {
|
|
44
45
|
style: _defineProperty({}, bgColorCssVar, color !== null && color !== void 0 ? color : 'currentColor'),
|
|
45
|
-
className: ax([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && !fg('platform_dst_avatar_tile') && borderRadiusMap[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, weight === 'strong' && styles.strongOpacity])
|
|
46
|
+
className: ax([styles.root, sizeStyles[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && !fg('platform_dst_avatar_tile') && borderRadiusMap[size !== null && size !== void 0 ? size : 'medium'], appearance === 'square' && fg('platform_dst_avatar_tile') && styles.square, appearance === 'hexagon' && styles.hexagon, weight === 'strong' && styles.strongOpacity])
|
|
46
47
|
});
|
|
47
48
|
};
|
|
48
49
|
export default Skeleton;
|
|
@@ -1,15 +1,21 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
1
|
+
._152t1n1a{inset-block-start:-1px}
|
|
2
|
+
._152t1v6z{inset-block-start:7px}
|
|
3
|
+
._152t1y44{inset-block-start:4px}
|
|
4
|
+
._152tidpf{inset-block-start:0}
|
|
5
|
+
._152tl52n{inset-block-start:17px}
|
|
6
|
+
._152tt94y{inset-block-start:1px}
|
|
4
7
|
._1bsb1crf{width:9pt}
|
|
5
8
|
._1bsbdlk8{width:14px}
|
|
6
9
|
._1bsbf6fq{width:18px}
|
|
7
10
|
._1bsbo7ao{width:15px}
|
|
8
|
-
._1xi21v6z{right:7px}
|
|
9
|
-
._1xi2idpf{right:0}
|
|
10
|
-
._1xi2t94y{right:1px}
|
|
11
11
|
._4t3i1crf{height:9pt}
|
|
12
12
|
._4t3idlk8{height:14px}
|
|
13
13
|
._4t3if6fq{height:18px}
|
|
14
14
|
._4t3io7ao{height:15px}
|
|
15
|
-
._kqswstnw{position:absolute}
|
|
15
|
+
._kqswstnw{position:absolute}
|
|
16
|
+
._rjxp1lpd{inset-inline-end:-5px}
|
|
17
|
+
._rjxp1n1a{inset-inline-end:-1px}
|
|
18
|
+
._rjxp1v6z{inset-inline-end:7px}
|
|
19
|
+
._rjxpidpf{inset-inline-end:0}
|
|
20
|
+
._rjxpmyb0{inset-inline-end:-4px}
|
|
21
|
+
._rjxpt94y{inset-inline-end:1px}
|
package/dist/esm/status.js
CHANGED
|
@@ -14,12 +14,20 @@ var iconSizeMap = {
|
|
|
14
14
|
large: "_4t3io7ao _1bsbo7ao",
|
|
15
15
|
xlarge: "_4t3if6fq _1bsbf6fq"
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
var circleIconOffsetMap = {
|
|
18
|
+
small: "_rjxpidpf _152tidpf",
|
|
19
|
+
medium: "_rjxpidpf _152tidpf",
|
|
20
|
+
large: "_rjxpt94y _152tt94y",
|
|
21
|
+
xlarge: "_rjxp1v6z _152t1v6z"
|
|
22
|
+
};
|
|
23
|
+
var squareIconOffsetMap = {
|
|
24
|
+
root: "_rjxpidpf _152tidpf"
|
|
25
|
+
};
|
|
26
|
+
var hexagonIconOffsetMap = {
|
|
27
|
+
small: "_rjxp1n1a _152t1n1a",
|
|
28
|
+
medium: "_rjxp1n1a _152t1n1a",
|
|
29
|
+
large: "_rjxpmyb0 _152t1y44",
|
|
30
|
+
xlarge: "_rjxp1lpd _152tl52n"
|
|
23
31
|
};
|
|
24
32
|
var ApprovedIndicator = /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("circle", {
|
|
25
33
|
fill: "var(--ds-icon-success, ".concat(G400, ")"),
|
|
@@ -97,7 +105,7 @@ export var StatusWrapper = function StatusWrapper(_ref2) {
|
|
|
97
105
|
return /*#__PURE__*/React.createElement("span", {
|
|
98
106
|
"aria-hidden": "true",
|
|
99
107
|
"data-testid": testId && "".concat(testId, "--status"),
|
|
100
|
-
className: ax([styles.root, iconSizeMap[size],
|
|
108
|
+
className: ax([styles.root, iconSizeMap[size], circleIconOffsetMap[size], appearance === 'square' && squareIconOffsetMap.root, appearance === 'hexagon' && hexagonIconOffsetMap[size]])
|
|
101
109
|
}, /*#__PURE__*/React.createElement(AvatarStatus, {
|
|
102
110
|
borderColor: borderColor,
|
|
103
111
|
status: !children ? status : undefined
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
export type AvatarSizeMap = Record<SizeType, number>;
|
|
3
|
-
export type AppearanceType = 'circle' | 'square';
|
|
3
|
+
export type AppearanceType = 'circle' | 'square' | 'hexagon';
|
|
4
4
|
export type SizeType = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
5
5
|
export type IndicatorSizeType = 'small' | 'medium' | 'large' | 'xlarge';
|
|
6
6
|
export type AvatarClickEventHandler = (event: React.MouseEvent, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
export type AvatarSizeMap = Record<SizeType, number>;
|
|
3
|
-
export type AppearanceType = 'circle' | 'square';
|
|
3
|
+
export type AppearanceType = 'circle' | 'square' | 'hexagon';
|
|
4
4
|
export type SizeType = 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge';
|
|
5
5
|
export type IndicatorSizeType = 'small' | 'medium' | 'large' | 'xlarge';
|
|
6
6
|
export type AvatarClickEventHandler = (event: React.MouseEvent, analyticsEvent?: UIAnalyticsEvent) => void;
|
package/offerings.json
CHANGED
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
"Use status indicators for approval/permission states",
|
|
20
20
|
"Provide fallback initials when images fail to load",
|
|
21
21
|
"Use avatars to represent users, teams, projects, or any other entity that needs visual identification",
|
|
22
|
-
"Always provide meaningful names for accessibility"
|
|
22
|
+
"Always provide meaningful names for accessibility",
|
|
23
|
+
"Use the `name` prop to include alternative text for screen readers",
|
|
24
|
+
"For decorative images, remove the `name` prop or leave it empty so it will be ignored by assistive technologies",
|
|
25
|
+
"Don't use a tooltip with an avatar when it's non-interactive or disabled. The tooltip won't work for keyboard users and screen readers"
|
|
23
26
|
],
|
|
24
27
|
"contentGuidelines": [
|
|
25
28
|
"Use full names when possible for better recognition",
|