@atlaskit/profilecard 22.1.0 → 22.2.2

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dist/cjs/client/getOrgIdForCloudIdFromAGG.js +1 -1
  3. package/dist/cjs/client/getTeamFromAGG.js +1 -1
  4. package/dist/cjs/components/Error/ErrorMessage.js +1 -1
  5. package/dist/cjs/components/Team/TeamForbiddenErrorState.js +1 -1
  6. package/dist/cjs/components/Team/TeamLoadingState.js +2 -2
  7. package/dist/cjs/components/Team/TeamProfileCard.js +8 -7
  8. package/dist/cjs/components/User/ProfileCardTrigger.js +14 -3
  9. package/dist/cjs/styled/Card.js +1 -1
  10. package/dist/cjs/styled/Error.compiled.css +9 -0
  11. package/dist/cjs/styled/Error.js +33 -5
  12. package/dist/cjs/styled/ReportingLines.js +1 -1
  13. package/dist/cjs/styled/TeamCard.compiled.css +40 -0
  14. package/dist/cjs/styled/TeamCard.js +145 -47
  15. package/dist/cjs/util/analytics.js +1 -1
  16. package/dist/es2019/client/getOrgIdForCloudIdFromAGG.js +1 -1
  17. package/dist/es2019/client/getTeamFromAGG.js +1 -1
  18. package/dist/es2019/components/Error/ErrorMessage.js +1 -1
  19. package/dist/es2019/components/Team/TeamForbiddenErrorState.js +1 -1
  20. package/dist/es2019/components/Team/TeamLoadingState.js +2 -2
  21. package/dist/es2019/components/Team/TeamProfileCard.js +6 -5
  22. package/dist/es2019/components/User/ProfileCardTrigger.js +14 -3
  23. package/dist/es2019/styled/Card.js +1 -1
  24. package/dist/es2019/styled/Error.compiled.css +9 -0
  25. package/dist/es2019/styled/Error.js +28 -5
  26. package/dist/es2019/styled/ReportingLines.js +1 -1
  27. package/dist/es2019/styled/TeamCard.compiled.css +40 -0
  28. package/dist/es2019/styled/TeamCard.js +118 -48
  29. package/dist/es2019/util/analytics.js +1 -1
  30. package/dist/esm/client/getOrgIdForCloudIdFromAGG.js +1 -1
  31. package/dist/esm/client/getTeamFromAGG.js +1 -1
  32. package/dist/esm/components/Error/ErrorMessage.js +1 -1
  33. package/dist/esm/components/Team/TeamForbiddenErrorState.js +1 -1
  34. package/dist/esm/components/Team/TeamLoadingState.js +2 -2
  35. package/dist/esm/components/Team/TeamProfileCard.js +6 -5
  36. package/dist/esm/components/User/ProfileCardTrigger.js +14 -3
  37. package/dist/esm/styled/Card.js +1 -1
  38. package/dist/esm/styled/Error.compiled.css +9 -0
  39. package/dist/esm/styled/Error.js +34 -5
  40. package/dist/esm/styled/ReportingLines.js +1 -1
  41. package/dist/esm/styled/TeamCard.compiled.css +40 -0
  42. package/dist/esm/styled/TeamCard.js +146 -48
  43. package/dist/esm/util/analytics.js +1 -1
  44. package/dist/types/components/User/ProfileCardTrigger.d.ts +1 -1
  45. package/dist/types/styled/Error.d.ts +11 -13
  46. package/dist/types/styled/TeamCard.d.ts +47 -62
  47. package/dist/types-ts4.5/components/User/ProfileCardTrigger.d.ts +1 -1
  48. package/dist/types-ts4.5/styled/Error.d.ts +11 -13
  49. package/dist/types-ts4.5/styled/TeamCard.d.ts +47 -62
  50. package/package.json +8 -5
@@ -16,7 +16,7 @@ export default (props => {
16
16
  }));
17
17
  }, [analytics]);
18
18
  return /*#__PURE__*/React.createElement(TeamForbiddenErrorStateWrapper, {
19
- "data-testid": "team-profilecard-forbidden-error-state"
19
+ testId: "team-profilecard-forbidden-error-state"
20
20
  }, /*#__PURE__*/React.createElement(EmptyState, {
21
21
  header: intl.formatMessage(messages.teamForbiddenErrorStateTitle),
22
22
  description: intl.formatMessage(messages.teamForbiddenErrorStateDescription),
@@ -12,10 +12,10 @@ export default (props => {
12
12
  }));
13
13
  }, [analytics]);
14
14
  return /*#__PURE__*/React.createElement(CardWrapper, {
15
- "data-testid": "team-profilecard"
15
+ testId: "team-profilecard"
16
16
  }, /*#__PURE__*/React.createElement(CardHeader, {
17
17
  isLoading: true
18
18
  }), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(LoadingWrapper, {
19
- "data-testid": "team-profilecard-spinner"
19
+ testId: "team-profilecard-spinner"
20
20
  }, /*#__PURE__*/React.createElement(Spinner, null))));
21
21
  });
@@ -10,7 +10,7 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
10
10
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
11
11
  import { fg } from '@atlaskit/platform-feature-flags';
12
12
  import Popup from '@atlaskit/popup';
13
- import { Inline, Text } from '@atlaskit/primitives';
13
+ import { Inline, Text } from '@atlaskit/primitives/compiled';
14
14
  import { layers } from '@atlaskit/theme/constants';
15
15
  import Tooltip from '@atlaskit/tooltip';
16
16
  import messages from '../../messages';
@@ -214,9 +214,10 @@ const TeamProfilecardContent = ({
214
214
  // eslint-disable-next-line react-hooks/exhaustive-deps
215
215
  }, [analytics]);
216
216
  return /*#__PURE__*/React.createElement(CardWrapper, {
217
- "data-testid": "team-profilecard"
217
+ testId: "team-profilecard"
218
218
  }, /*#__PURE__*/React.createElement(CardHeader, {
219
- image: team.largeHeaderImageUrl || team.smallHeaderImageUrl
219
+ image: team.largeHeaderImageUrl || team.smallHeaderImageUrl,
220
+ label: team.displayName
220
221
  }), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Tooltip, {
221
222
  content: team.displayName
222
223
  }, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(TeamName, null, team.displayName), team.isVerified && fg('show_verified_team_icon_in_profile_card') && /*#__PURE__*/React.createElement(VerifiedTeamIcon, null))), /*#__PURE__*/React.createElement(TeamMembers, {
@@ -251,7 +252,7 @@ const ErrorMessage = ({
251
252
  }
252
253
  }, [analytics, clientFetchProfile]);
253
254
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
254
- "data-testid": "team-profilecard-error"
255
+ testId: "team-profilecard-error"
255
256
  }, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
256
257
  as: "p",
257
258
  weight: "semibold"
@@ -278,7 +279,7 @@ const TeamProfileCard = props => {
278
279
  });
279
280
  } else {
280
281
  return /*#__PURE__*/React.createElement(CardWrapper, {
281
- "data-testid": "team-profilecard"
282
+ testId: "team-profilecard"
282
283
  }, /*#__PURE__*/React.createElement(ErrorMessage, {
283
284
  analytics: analytics,
284
285
  clientFetchProfile: clientFetchProfile,
@@ -73,7 +73,8 @@ export default function ProfilecardTriggerNext({
73
73
  viewingUserId,
74
74
  product,
75
75
  agentActions,
76
- ariaHideProfileTrigger = false
76
+ ariaHideProfileTrigger = false,
77
+ isVisible: propsIsVisible
77
78
  }) {
78
79
  const {
79
80
  createAnalyticsEvent
@@ -82,8 +83,8 @@ export default function ProfilecardTriggerNext({
82
83
  formatMessage
83
84
  } = useIntl();
84
85
  const isMounted = useRef(false);
85
- const showDelay = trigger === 'click' ? 0 : DELAY_MS_SHOW;
86
- const hideDelay = trigger === 'click' ? 0 : DELAY_MS_HIDE;
86
+ const showDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_SHOW;
87
+ const hideDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_HIDE;
87
88
  const showTimer = useRef(0);
88
89
  const hideTimer = useRef(0);
89
90
  const [visible, setVisible] = useState(false);
@@ -222,6 +223,16 @@ export default function ProfilecardTriggerNext({
222
223
  const onFocus = useCallback(() => {
223
224
  showProfilecard();
224
225
  }, [showProfilecard]);
226
+ useEffect(() => {
227
+ if (!fg('fix_profilecard_trigger_isvisible')) {
228
+ return;
229
+ }
230
+ if (propsIsVisible) {
231
+ showProfilecard();
232
+ } else {
233
+ hideProfilecard();
234
+ }
235
+ }, [hideProfilecard, propsIsVisible, showProfilecard]);
225
236
  const containerListeners = useMemo(() => trigger === 'hover' ? {
226
237
  onMouseEnter: onMouseEnter,
227
238
  onMouseLeave: hideProfilecard,
@@ -1,4 +1,4 @@
1
- /* Card.tsx generated by @compiled/babel-plugin v0.36.0 */
1
+ /* Card.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  /* eslint-disable @atlaskit/design-system/no-styled-tagged-template-expression -- needs manual remediation */
3
3
  import "./Card.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -0,0 +1,9 @@
1
+ ._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
3
+ ._19pku2gc{margin-top:var(--ds-space-100,8px)}
4
+ ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
5
+ ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
6
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
7
+ ._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
8
+ ._u5f31ejb{padding-right:var(--ds-space-300,24px)}
9
+ ._y3gn1h6o{text-align:center}
@@ -1,26 +1,49 @@
1
+ /* Error.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import "./Error.compiled.css";
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import React from 'react';
6
+
1
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
8
  import styled from '@emotion/styled';
9
+ import { cx } from '@atlaskit/css';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { Box } from '@atlaskit/primitives/compiled';
3
12
  import { N200 } from '@atlaskit/theme/colors';
4
13
  import { errorIconColor, errorTitleColor } from './constants';
5
-
14
+ const styles = {
15
+ errorWrapper: "_y3gn1h6o _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb",
16
+ errorTitle: "_11c81oud _syaz1fxt _19pku2gc",
17
+ teamErrorText: "_syaz1wmz _19pku2gc"
18
+ };
19
+ export const ErrorWrapper = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
20
+ xcss: cx(styles.errorWrapper)
21
+ }, props)) : /*#__PURE__*/React.createElement(ErrorWrapperLegacy, {
22
+ "data-testId": props.testId
23
+ }, props.children);
6
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
7
- export const ErrorWrapper = styled.div({
25
+ const ErrorWrapperLegacy = styled.div({
8
26
  textAlign: 'center',
9
27
  padding: "var(--ds-space-300, 24px)",
10
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
11
29
  color: errorIconColor
12
30
  });
13
-
31
+ export const ErrorTitle = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, {
32
+ xcss: cx(styles.errorTitle)
33
+ }, props.children) : /*#__PURE__*/React.createElement(ErrorTitleLegacy, null, props.children);
14
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
15
- export const ErrorTitle = styled.p({
35
+ const ErrorTitleLegacy = styled.p({
16
36
  font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
17
37
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
18
38
  color: errorTitleColor,
19
39
  margin: `${"var(--ds-space-100, 8px)"} 0`
20
40
  });
41
+ export const TeamErrorText = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, {
42
+ xcss: cx(styles.teamErrorText)
43
+ }, props.children) : /*#__PURE__*/React.createElement(TeamErrorTextLegacy, null, props.children);
21
44
 
22
45
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
23
- export const TeamErrorText = styled.p({
46
+ const TeamErrorTextLegacy = styled.p({
24
47
  color: `var(--ds-text-subtlest, ${N200})`,
25
48
  marginTop: "var(--ds-space-100, 8px)"
26
49
  });
@@ -1,4 +1,4 @@
1
- /* ReportingLines.tsx generated by @compiled/babel-plugin v0.36.0 */
1
+ /* ReportingLines.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import "./ReportingLines.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -0,0 +1,40 @@
1
+ ._11c8o0gd{font:var(--ds-font-heading-medium,normal 500 20px/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._2rkoglpi{border-radius:var(--ds-border-radius,4px)}
3
+ ._12vemgnk{background-repeat:no-repeat}
4
+ ._16jlkb7n{flex-grow:1}
5
+ ._18m915vq{overflow-y:hidden}
6
+ ._18u01i6y{margin-left:var(--ds-space-negative-025,-2px)}
7
+ ._18u0u2gc{margin-left:var(--ds-space-100,8px)}
8
+ ._18u0x0bf{margin-left:var(--ds-space-negative-100,-8px)}
9
+ ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
10
+ ._19pk1b66{margin-top:var(--ds-space-050,4px)}
11
+ ._19pk1ejb{margin-top:var(--ds-space-300,24px)}
12
+ ._19pk1jfw{margin-top:var(--ds-space-500,40px)}
13
+ ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
14
+ ._1bah1yb4{justify-content:space-between}
15
+ ._1bsb1osq{width:100%}
16
+ ._1bsbnklw{width:20pc}
17
+ ._1e0c1kw7{display:inherit}
18
+ ._1e0c1txw{display:flex}
19
+ ._1e0ccj1k{display:-webkit-box}
20
+ ._1lrw1dfr{background-size:cover}
21
+ ._1p1dglyw{text-transform:none}
22
+ ._1reo15vq{overflow-x:hidden}
23
+ ._1tke1l8a{min-height:78pt}
24
+ ._2hwx10v4{margin-right:var(--ds-space-negative-300,-24px)}
25
+ ._2lx21bp4{flex-direction:column}
26
+ ._4cvr1h6o{align-items:center}
27
+ ._4t3i1qr7{height:8pc}
28
+ ._c71l1wqb{max-height:60px}
29
+ ._c71lckbl{max-height:3pc}
30
+ ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
31
+ ._i0dlidpf{flex-basis:0}
32
+ ._kqswh2mm{position:relative}
33
+ ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
34
+ ._otyr1ejb{margin-bottom:var(--ds-space-300,24px)}
35
+ ._otyr1jfw{margin-bottom:var(--ds-space-500,40px)}
36
+ ._otyridpf{margin-bottom:0}
37
+ ._ouxl1ssb{background-position:50%}
38
+ ._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
39
+ ._u5f31ejb{padding-right:var(--ds-space-300,24px)}
40
+ ._y3gn1h6o{text-align:center}
@@ -1,16 +1,53 @@
1
+ /* TeamCard.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import "./TeamCard.compiled.css";
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import React from 'react';
6
+
1
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
8
  import styled from '@emotion/styled';
9
+ import { cx } from '@atlaskit/css';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
+ import { Box, Text } from '@atlaskit/primitives/compiled';
3
12
  import { N20, N200 } from '@atlaskit/theme/colors';
4
13
  import { borderRadius } from '@atlaskit/theme/constants';
5
14
  import { bgColor, teamHeaderBgColor } from './constants';
6
-
15
+ const styles = {
16
+ cardtriggerwrapper: "_1e0c1kw7",
17
+ cardwrapper: "_2rkoglpi _1bsbnklw _kqswh2mm",
18
+ teamforbiddenerrorstatewrapper: "_1bsbnklw _kqswh2mm",
19
+ cardheader: "_12vemgnk _ouxl1ssb _1lrw1dfr _4t3i1qr7",
20
+ cardcontent: "_1e0c1txw _2lx21bp4 _ca0q1ejb _u5f31ejb _n3td1ejb _19bv1ejb _1tke1l8a",
21
+ teamname: "_11c8o0gd _1reo15vq _18m915vq _1p1dglyw _c71lckbl _1e0ccj1k",
22
+ membercount: "_syaz1wmz _19pk1b66",
23
+ avatarsection: "_19pkpxbi _18u01i6y",
24
+ descriptionwrapper: "_19pkpxbi _4cvr1h6o _1e0c1txw",
25
+ description: "_1reo15vq _18m915vq _c71l1wqb _1e0ccj1k",
26
+ actionbuttons: "_1bsb1osq _1e0c1txw _1bah1yb4 _19pk1ejb _2hwx10v4 _otyridpf _18u0x0bf",
27
+ wrappedbutton: "_i0dlidpf _16jlkb7n _18u0u2gc",
28
+ morebutton: "_18u0u2gc",
29
+ loadingwrapper: "_y3gn1h6o _19pk1jfw _otyr1jfw",
30
+ accesslocksvgwrapper: "_otyr1ejb"
31
+ };
32
+ export const CardTriggerWrapper = () => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, {
33
+ xcss: cx(styles.cardtriggerwrapper)
34
+ }) : /*#__PURE__*/React.createElement(CardTriggerWrapperLegacy, null);
7
35
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
8
- export const CardTriggerWrapper = styled.div({
36
+ const CardTriggerWrapperLegacy = styled.div({
9
37
  display: 'inherit'
10
38
  });
11
-
39
+ export const CardWrapper = ({
40
+ testId,
41
+ children
42
+ }) => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, {
43
+ xcss: cx(styles.cardwrapper),
44
+ backgroundColor: "elevation.surface.overlay",
45
+ testId: testId
46
+ }, children) : /*#__PURE__*/React.createElement(CardWrapperLegacy, {
47
+ "data-testid": testId
48
+ }, children);
12
49
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
13
- export const CardWrapper = styled.div({
50
+ const CardWrapperLegacy = styled.div({
14
51
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
15
52
  backgroundColor: bgColor,
16
53
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
@@ -21,16 +58,37 @@ export const CardWrapper = styled.div({
21
58
  WebkitFontSmoothing: 'antialiased',
22
59
  MozOsxFontSmoothing: 'grayscale'
23
60
  });
24
-
61
+ export const TeamForbiddenErrorStateWrapper = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
62
+ xcss: cx(styles.teamforbiddenerrorstatewrapper)
63
+ }, props)) : /*#__PURE__*/React.createElement(TeamForbiddenErrorStateWrapperLegacy, {
64
+ "data-testid": props.testId
65
+ }, props.children);
25
66
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
26
- export const TeamForbiddenErrorStateWrapper = styled.div({
67
+ const TeamForbiddenErrorStateWrapperLegacy = styled.div({
27
68
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
28
69
  width: '320px',
29
70
  position: 'relative'
30
71
  });
72
+ export const CardHeader = ({
73
+ image,
74
+ isLoading,
75
+ label
76
+ }) => fg('compiled-migration-profilecard') ? isLoading || !image ? /*#__PURE__*/React.createElement(Box, {
77
+ xcss: cx(styles.cardheader),
78
+ backgroundColor: "color.background.neutral"
79
+ }) : /*#__PURE__*/React.createElement(Box, {
80
+ as: "img",
81
+ alt: label || '',
82
+ src: image,
83
+ xcss: cx(styles.cardheader),
84
+ backgroundColor: "color.background.neutral"
85
+ }) : /*#__PURE__*/React.createElement(CardHeaderLegacy, {
86
+ image: image,
87
+ isLoading: isLoading
88
+ });
31
89
 
32
90
  // eslint-disable-next-line @atlaskit/design-system/no-styled-tagged-template-expression, @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
33
- export const CardHeader = styled.div`
91
+ const CardHeaderLegacy = styled.div`
34
92
  background-color: ${props => props.isLoading ? `var(--ds-background-neutral, ${N20})` : props.image ? '' : teamHeaderBgColor};
35
93
  background-image: ${props => props.image ? `url(${props.image})` : ''};
36
94
  background-repeat: no-repeat;
@@ -39,18 +97,22 @@ export const CardHeader = styled.div`
39
97
  box-sizing: content-box;
40
98
  height: 128px;
41
99
  `;
42
-
100
+ export const CardContent = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
101
+ xcss: cx(styles.cardcontent)
102
+ }, props)) : /*#__PURE__*/React.createElement(CardContentLegacy, props);
43
103
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
44
- export const CardContent = styled.div({
104
+ const CardContentLegacy = styled.div({
45
105
  display: 'flex',
46
106
  flexDirection: 'column',
47
107
  padding: "var(--ds-space-300, 24px)",
48
108
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
49
109
  minHeight: '104px'
50
110
  });
51
-
111
+ export const TeamName = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
112
+ xcss: cx(styles.teamname)
113
+ }, props)) : /*#__PURE__*/React.createElement(TeamNameLegacy, props);
52
114
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
53
- export const TeamName = styled.h6({
115
+ const TeamNameLegacy = styled.h6({
54
116
  font: "var(--ds-font-heading-medium, normal 500 20px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
55
117
  textTransform: 'none',
56
118
  overflow: 'hidden',
@@ -59,78 +121,86 @@ export const TeamName = styled.h6({
59
121
  WebkitLineClamp: 2,
60
122
  WebkitBoxOrient: 'vertical'
61
123
  });
62
-
124
+ export const MemberCount = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
125
+ xcss: cx(styles.membercount)
126
+ }, props)) : /*#__PURE__*/React.createElement(MemberCountLegacy, props);
63
127
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
64
- export const MemberCount = styled.div({
128
+ const MemberCountLegacy = styled.div({
65
129
  color: `var(--ds-text-subtlest, ${N200})`,
66
130
  marginTop: "var(--ds-space-050, 4px)"
67
131
  });
68
-
69
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
70
- export const AvatarSection = styled.div({
132
+ export const AvatarSection = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
133
+ xcss: cx(styles.avatarsection)
134
+ }, props)) : /*#__PURE__*/React.createElement(AvatarSectionLegacy, props);
135
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/use-primitives -- Ignored via go/DSP-18766
136
+ const AvatarSectionLegacy = styled.div({
71
137
  marginTop: "var(--ds-space-200, 16px)",
72
138
  marginLeft: "var(--ds-space-negative-025, -2px)"
73
139
  });
74
-
140
+ export const DescriptionWrapper = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
141
+ xcss: cx(styles.descriptionwrapper)
142
+ }, props)) : /*#__PURE__*/React.createElement(DescriptionWrapperLegacy, props);
75
143
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
76
- export const DescriptionWrapper = styled.div({
144
+ const DescriptionWrapperLegacy = styled.div({
77
145
  marginTop: "var(--ds-space-200, 16px)",
78
146
  alignItems: 'center',
79
147
  display: 'flex'
80
148
  });
81
-
149
+ export const Description = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, {
150
+ xcss: cx(styles.description)
151
+ }, /*#__PURE__*/React.createElement(Text, _extends({
152
+ maxLines: 3
153
+ }, props))) : /*#__PURE__*/React.createElement(DescriptionLegacy, props);
82
154
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
83
- export const Description = styled.span({
155
+ const DescriptionLegacy = styled.span({
84
156
  overflow: 'hidden',
85
157
  maxHeight: '60px',
86
158
  display: '-webkit-box',
87
159
  WebkitLineClamp: 3,
88
160
  WebkitBoxOrient: 'vertical'
89
161
  });
90
-
162
+ export const ActionButtons = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
163
+ xcss: cx(styles.actionbuttons),
164
+ backgroundColor: "elevation.surface.overlay"
165
+ }, props)) : /*#__PURE__*/React.createElement(ActionButtonsLegacy, props);
91
166
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
92
- export const ActionButtons = styled.div({
167
+ const ActionButtonsLegacy = styled.div({
93
168
  width: 'calc(100% + 8px)',
94
169
  display: 'flex',
95
170
  justifyContent: 'space-between',
96
171
  margin: `${"var(--ds-space-300, 24px)"} ${"var(--ds-space-negative-300, -24px)"} 0 ${"var(--ds-space-negative-100, -8px)"}`,
97
172
  backgroundColor: "var(--ds-surface-overlay, hsla(0, 100%, 100%, 0.2))"
98
173
  });
99
-
174
+ export const WrappedButton = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
175
+ xcss: cx(styles.wrappedbutton)
176
+ }, props)) : /*#__PURE__*/React.createElement(WrappedButtonLegacy, props);
100
177
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
101
- export const WrappedButton = styled.div({
178
+ const WrappedButtonLegacy = styled.div({
102
179
  flexBasis: 0,
103
180
  flexGrow: 1,
104
181
  marginLeft: "var(--ds-space-100, 8px)"
105
182
  });
106
-
107
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
108
- export const MoreButton = styled.div({
183
+ export const MoreButton = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
184
+ xcss: cx(styles.morebutton)
185
+ }, props)) : /*#__PURE__*/React.createElement(MoreButtonLegacy, props);
186
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/use-primitives -- Ignored via go/DSP-18766
187
+ const MoreButtonLegacy = styled.div({
109
188
  marginLeft: "var(--ds-space-100, 8px)"
110
189
  });
111
-
190
+ export const LoadingWrapper = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
191
+ xcss: cx(styles.loadingwrapper)
192
+ }, props)) : /*#__PURE__*/React.createElement(LoadingWrapperLegacy, {
193
+ "data-testid": props.testId
194
+ }, props.children);
112
195
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
113
- export const LoadingWrapper = styled.div({
196
+ const LoadingWrapperLegacy = styled.div({
114
197
  textAlign: 'center',
115
198
  marginTop: "var(--ds-space-500, 40px)"
116
199
  });
117
-
118
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
119
- export const AccessLockSVGWrapper = styled.div({
200
+ export const AccessLockSVGWrapper = props => fg('compiled-migration-profilecard') ? /*#__PURE__*/React.createElement(Box, _extends({
201
+ xcss: cx(styles.accesslocksvgwrapper)
202
+ }, props)) : /*#__PURE__*/React.createElement(AccessLockSVGWrapperLegacy, props);
203
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-styled, @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/use-primitives -- Ignored via go/DSP-18766
204
+ const AccessLockSVGWrapperLegacy = styled.div({
120
205
  marginBottom: "var(--ds-space-300, 24px)"
121
- });
122
-
123
- // export const LoadingTeamName = styled.div`
124
- // width: 175px;
125
- // height: ${gridSize () *3)px;
126
- // border-radius: ${borderRadius}px;
127
- // background-color: #f4f5f7;
128
- // `;
129
-
130
- // export const LoadingMemberCount = styled.div`
131
- // width: 81px;
132
- // height: ${gridSize () *2)px;
133
- // border-radius: 3px;
134
- // background-color: #f4f5f7;
135
- // margin: 4px 0;
136
- // `;
206
+ });
@@ -32,7 +32,7 @@ const createEvent = (eventType, action, actionSubject, actionSubjectId, attribut
32
32
  actionSubjectId,
33
33
  attributes: {
34
34
  packageName: "@atlaskit/profilecard",
35
- packageVersion: "22.1.0",
35
+ packageVersion: "22.2.2",
36
36
  ...attributes,
37
37
  firedAt: Math.round(getPageTime())
38
38
  }
@@ -4,7 +4,7 @@ import { AGGQuery } from './graphqlUtils';
4
4
  var ORG_ID_FROM_CLOUD_ID_QUERY = "query OrgIdFromCloudId($cloudId: ID!) {\n\ttenantContexts(cloudIds: [$cloudId]) {\n\t\torgId\n\t}\n}";
5
5
  var addHeaders = function addHeaders(headers) {
6
6
  headers.append('atl-client-name', "@atlaskit/profilecard");
7
- headers.append('atl-client-version', "22.1.0");
7
+ headers.append('atl-client-version', "22.2.2");
8
8
  return headers;
9
9
  };
10
10
  export function getOrgIdForCloudIdFromAGG(_x, _x2) {
@@ -57,7 +57,7 @@ export var addHeaders = function addHeaders(headers) {
57
57
  headers.append('X-ExperimentalApi', 'teams-beta');
58
58
  headers.append('X-ExperimentalApi', 'team-members-beta');
59
59
  headers.append('atl-client-name', "@atlaskit/profilecard");
60
- headers.append('atl-client-version', "22.1.0");
60
+ headers.append('atl-client-version', "22.2.2");
61
61
  return headers;
62
62
  };
63
63
  export function getTeamFromAGG(_x, _x2, _x3) {
@@ -27,7 +27,7 @@ var ErrorMessage = function ErrorMessage(props) {
27
27
  }, "Try again and we\u2019ll give it another shot"));
28
28
  };
29
29
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
30
- "data-testid": "profilecard-error"
30
+ testId: "profilecard-error"
31
31
  }, /*#__PURE__*/React.createElement(IconError, {
32
32
  label: "icon error",
33
33
  size: "xlarge"
@@ -16,7 +16,7 @@ export default (function (props) {
16
16
  });
17
17
  }, [analytics]);
18
18
  return /*#__PURE__*/React.createElement(TeamForbiddenErrorStateWrapper, {
19
- "data-testid": "team-profilecard-forbidden-error-state"
19
+ testId: "team-profilecard-forbidden-error-state"
20
20
  }, /*#__PURE__*/React.createElement(EmptyState, {
21
21
  header: intl.formatMessage(messages.teamForbiddenErrorStateTitle),
22
22
  description: intl.formatMessage(messages.teamForbiddenErrorStateDescription),
@@ -12,10 +12,10 @@ export default (function (props) {
12
12
  });
13
13
  }, [analytics]);
14
14
  return /*#__PURE__*/React.createElement(CardWrapper, {
15
- "data-testid": "team-profilecard"
15
+ testId: "team-profilecard"
16
16
  }, /*#__PURE__*/React.createElement(CardHeader, {
17
17
  isLoading: true
18
18
  }), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(LoadingWrapper, {
19
- "data-testid": "team-profilecard-spinner"
19
+ testId: "team-profilecard-spinner"
20
20
  }, /*#__PURE__*/React.createElement(Spinner, null))));
21
21
  });
@@ -15,7 +15,7 @@ import { LinkItem, MenuGroup } from '@atlaskit/menu';
15
15
  import { VerifiedTeamIcon } from '@atlaskit/people-teams-ui-public/verified-team-icon';
16
16
  import { fg } from '@atlaskit/platform-feature-flags';
17
17
  import Popup from '@atlaskit/popup';
18
- import { Inline, Text } from '@atlaskit/primitives';
18
+ import { Inline, Text } from '@atlaskit/primitives/compiled';
19
19
  import { layers } from '@atlaskit/theme/constants';
20
20
  import Tooltip from '@atlaskit/tooltip';
21
21
  import messages from '../../messages';
@@ -240,9 +240,10 @@ var TeamProfilecardContent = function TeamProfilecardContent(_ref5) {
240
240
  // eslint-disable-next-line react-hooks/exhaustive-deps
241
241
  }, [analytics]);
242
242
  return /*#__PURE__*/React.createElement(CardWrapper, {
243
- "data-testid": "team-profilecard"
243
+ testId: "team-profilecard"
244
244
  }, /*#__PURE__*/React.createElement(CardHeader, {
245
- image: team.largeHeaderImageUrl || team.smallHeaderImageUrl
245
+ image: team.largeHeaderImageUrl || team.smallHeaderImageUrl,
246
+ label: team.displayName
246
247
  }), /*#__PURE__*/React.createElement(CardContent, null, /*#__PURE__*/React.createElement(Tooltip, {
247
248
  content: team.displayName
248
249
  }, /*#__PURE__*/React.createElement(Inline, null, /*#__PURE__*/React.createElement(TeamName, null, team.displayName), team.isVerified && fg('show_verified_team_icon_in_profile_card') && /*#__PURE__*/React.createElement(VerifiedTeamIcon, null))), /*#__PURE__*/React.createElement(TeamMembers, {
@@ -280,7 +281,7 @@ var ErrorMessage = function ErrorMessage(_ref6) {
280
281
  }
281
282
  }, [analytics, clientFetchProfile]);
282
283
  return /*#__PURE__*/React.createElement(ErrorWrapper, {
283
- "data-testid": "team-profilecard-error"
284
+ testId: "team-profilecard-error"
284
285
  }, /*#__PURE__*/React.createElement(ErrorIllustration, null), /*#__PURE__*/React.createElement(Text, {
285
286
  as: "p",
286
287
  weight: "semibold"
@@ -305,7 +306,7 @@ var TeamProfileCard = function TeamProfileCard(props) {
305
306
  });
306
307
  } else {
307
308
  return /*#__PURE__*/React.createElement(CardWrapper, {
308
- "data-testid": "team-profilecard"
309
+ testId: "team-profilecard"
309
310
  }, /*#__PURE__*/React.createElement(ErrorMessage, {
310
311
  analytics: analytics,
311
312
  clientFetchProfile: clientFetchProfile,
@@ -86,14 +86,15 @@ export default function ProfilecardTriggerNext(_ref2) {
86
86
  product = _ref2.product,
87
87
  agentActions = _ref2.agentActions,
88
88
  _ref2$ariaHideProfile = _ref2.ariaHideProfileTrigger,
89
- ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile;
89
+ ariaHideProfileTrigger = _ref2$ariaHideProfile === void 0 ? false : _ref2$ariaHideProfile,
90
+ propsIsVisible = _ref2.isVisible;
90
91
  var _useAnalyticsEvents = useAnalyticsEvents(),
91
92
  createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
92
93
  var _useIntl = useIntl(),
93
94
  formatMessage = _useIntl.formatMessage;
94
95
  var isMounted = useRef(false);
95
- var showDelay = trigger === 'click' ? 0 : DELAY_MS_SHOW;
96
- var hideDelay = trigger === 'click' ? 0 : DELAY_MS_HIDE;
96
+ var showDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_SHOW;
97
+ var hideDelay = trigger === 'click' || propsIsVisible && fg('fix_profilecard_trigger_isvisible') ? 0 : DELAY_MS_HIDE;
97
98
  var showTimer = useRef(0);
98
99
  var hideTimer = useRef(0);
99
100
  var _useState = useState(false),
@@ -279,6 +280,16 @@ export default function ProfilecardTriggerNext(_ref2) {
279
280
  var onFocus = useCallback(function () {
280
281
  showProfilecard();
281
282
  }, [showProfilecard]);
283
+ useEffect(function () {
284
+ if (!fg('fix_profilecard_trigger_isvisible')) {
285
+ return;
286
+ }
287
+ if (propsIsVisible) {
288
+ showProfilecard();
289
+ } else {
290
+ hideProfilecard();
291
+ }
292
+ }, [hideProfilecard, propsIsVisible, showProfilecard]);
282
293
  var containerListeners = useMemo(function () {
283
294
  return trigger === 'hover' ? {
284
295
  onMouseEnter: onMouseEnter,
@@ -1,4 +1,4 @@
1
- /* Card.tsx generated by @compiled/babel-plugin v0.36.0 */
1
+ /* Card.tsx generated by @compiled/babel-plugin v0.36.1 */
2
2
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20, _templateObject21;
4
4
  import "./Card.compiled.css";
@@ -0,0 +1,9 @@
1
+ ._11c81oud{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,system-ui,"Helvetica Neue",sans-serif)}
2
+ ._19bv1ejb{padding-left:var(--ds-space-300,24px)}
3
+ ._19pku2gc{margin-top:var(--ds-space-100,8px)}
4
+ ._ca0q1ejb{padding-top:var(--ds-space-300,24px)}
5
+ ._n3td1ejb{padding-bottom:var(--ds-space-300,24px)}
6
+ ._syaz1fxt{color:var(--ds-text,#172b4d)}
7
+ ._syaz1wmz{color:var(--ds-text-subtlest,#6b778c)}
8
+ ._u5f31ejb{padding-right:var(--ds-space-300,24px)}
9
+ ._y3gn1h6o{text-align:center}