@atlaskit/smart-card 44.3.21 → 44.3.23

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 (56) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +2 -2
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +2 -2
  4. package/dist/cjs/messages.js +20 -0
  5. package/dist/cjs/state/hooks/use-rovo-chat/index.js +1 -1
  6. package/dist/cjs/utils/analytics/analytics.js +1 -1
  7. package/dist/cjs/view/FlexibleCard/assets/rovo-hex-logo.js +64 -0
  8. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +11 -0
  9. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +24 -5
  10. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +69 -2
  11. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +15 -0
  12. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +44 -0
  13. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.compiled.css +4 -1
  14. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +30 -5
  15. package/dist/cjs/view/LinkUrl/index.js +1 -1
  16. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +2 -2
  17. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +2 -2
  18. package/dist/es2019/messages.js +20 -0
  19. package/dist/es2019/state/hooks/use-rovo-chat/index.js +1 -1
  20. package/dist/es2019/utils/analytics/analytics.js +1 -1
  21. package/dist/es2019/view/FlexibleCard/assets/rovo-hex-logo.js +52 -0
  22. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +11 -0
  23. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +24 -5
  24. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +69 -2
  25. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +15 -0
  26. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +36 -0
  27. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.compiled.css +4 -1
  28. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +30 -5
  29. package/dist/es2019/view/LinkUrl/index.js +1 -1
  30. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-generic-3p-rovo-chat-action--default.png +2 -2
  31. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default--rovogrowth-640-inline-action-nudge-exp-true.png +2 -2
  32. package/dist/esm/messages.js +20 -0
  33. package/dist/esm/state/hooks/use-rovo-chat/index.js +1 -1
  34. package/dist/esm/utils/analytics/analytics.js +1 -1
  35. package/dist/esm/view/FlexibleCard/assets/rovo-hex-logo.js +57 -0
  36. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +11 -0
  37. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +24 -5
  38. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +69 -2
  39. package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.compiled.css +15 -0
  40. package/dist/esm/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.js +35 -0
  41. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.compiled.css +4 -1
  42. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +30 -5
  43. package/dist/esm/view/LinkUrl/index.js +1 -1
  44. package/dist/types/common/ui/icons/blog-icon.d.ts +5 -2
  45. package/dist/types/common/ui/icons/live-document-icon.d.ts +5 -2
  46. package/dist/types/messages.d.ts +1 -1
  47. package/dist/types/view/FlexibleCard/assets/rovo-hex-logo.d.ts +6 -0
  48. package/dist/types/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +4 -1
  49. package/dist/types/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts +12 -0
  50. package/dist/types-ts4.5/common/ui/icons/blog-icon.d.ts +5 -2
  51. package/dist/types-ts4.5/common/ui/icons/live-document-icon.d.ts +5 -2
  52. package/dist/types-ts4.5/messages.d.ts +1 -1
  53. package/dist/types-ts4.5/view/FlexibleCard/assets/rovo-hex-logo.d.ts +6 -0
  54. package/dist/types-ts4.5/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +4 -1
  55. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/action-block/ask-rovo-section-header.d.ts +12 -0
  56. package/package.json +4 -4
@@ -0,0 +1,52 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import React from 'react';
3
+ const RovoHexLogo = ({
4
+ width = 16,
5
+ height = 16,
6
+ ...props
7
+ }) => /*#__PURE__*/React.createElement("svg", _extends({
8
+ width: width,
9
+ height: height,
10
+ viewBox: "0 0 16 16",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg",
13
+ "aria-hidden": "true",
14
+ focusable: "false"
15
+ }, props), /*#__PURE__*/React.createElement("path", {
16
+ d: "M7.32082 0.180234C7.74137 -0.0600783 8.25764 -0.0600779 8.67819 0.180234L14.4919 3.50235C14.9181 3.7459 15.1811 4.19916 15.1811 4.69005V11.31C15.1811 11.8008 14.9181 12.2541 14.4919 12.4976L8.67819 15.8198C8.25764 16.0601 7.74137 16.0601 7.32082 15.8198L1.50712 12.4976C1.08091 12.2541 0.817871 11.8008 0.817871 11.31V4.69005C0.817871 4.19916 1.08091 3.7459 1.50712 3.50235L7.32082 0.180234Z",
17
+ fill: "#BF63F3"
18
+ }), /*#__PURE__*/React.createElement("mask", {
19
+ id: "rovo-hex-logo-mask"
20
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
21
+ ,
22
+ style: {
23
+ maskType: 'alpha'
24
+ },
25
+ maskUnits: "userSpaceOnUse",
26
+ x: "0",
27
+ y: "0",
28
+ width: "16",
29
+ height: "16"
30
+ }, /*#__PURE__*/React.createElement("path", {
31
+ d: "M7.32131 0.180234C7.74186 -0.0600783 8.25813 -0.0600779 8.67868 0.180234L14.4924 3.50235C14.9186 3.7459 15.1816 4.19916 15.1816 4.69005V11.31C15.1816 11.8008 14.9186 12.2541 14.4924 12.4976L8.67868 15.8198C8.25813 16.0601 7.74186 16.0601 7.32131 15.8198L1.50761 12.4976C1.08139 12.2541 0.818359 11.8008 0.818359 11.31V4.69005C0.818359 4.19916 1.08139 3.7459 1.50761 3.50235L7.32131 0.180234Z",
32
+ fill: "#BF63F3"
33
+ })), /*#__PURE__*/React.createElement("g", {
34
+ mask: "url(#rovo-hex-logo-mask)"
35
+ }, /*#__PURE__*/React.createElement("path", {
36
+ d: "M1.55034 23.7263C2.51722 21.8759 3.92904 20.4254 5.78825 19.4378C7.64746 18.4502 9.80649 18.0272 11.9924 18.2787L0.232859 -3.40716C-1.71715 -3.05431 -3.61315 -2.40324 -5.43793 -1.43392C-7.26271 -0.464597 -8.83182 0.695804 -10.1944 2.06176L1.55525 23.7295L1.55034 23.7263Z",
37
+ fill: "#82B536"
38
+ }), /*#__PURE__*/React.createElement("path", {
39
+ d: "M8.32996 10.6048C5.08544 11.9472 2.60753 14.1646 2.50661 17.2335C2.50661 17.2335 2.50834 17.2492 2.5067 17.2569C2.50006 17.4849 2.50431 17.7155 2.52528 17.9508C2.52613 17.9528 2.52697 17.9548 2.52782 17.9568C2.54755 18.195 2.58193 18.4389 2.63013 18.6865C2.64247 18.7448 2.66068 18.8053 2.67303 18.8635C2.71727 19.0611 2.76151 19.2587 2.82541 19.4622C2.91006 19.7323 3.0085 20.006 3.12662 20.2856C3.34515 20.803 3.60149 21.2648 3.87811 21.6759C4.24638 22.2229 4.65025 22.6799 5.05256 23.0579C5.15366 23.1522 5.25307 23.2424 5.35496 23.327C5.82852 23.6473 6.52024 24.0721 7.67929 24.611C8.43636 24.9641 9.39801 25.3664 10.6295 25.8214C11.6142 24.3227 13.4162 23.1571 15.1026 21.8515C16.434 20.8196 17.6899 19.7016 18.4057 18.2626C19.0622 16.9444 19.0793 15.3018 18.3596 13.5979C16.5583 9.33325 12.571 8.84764 8.33329 10.6011L8.32996 10.6048Z",
40
+ fill: "#FCA700"
41
+ }), /*#__PURE__*/React.createElement("path", {
42
+ d: "M15.5504 -10.1487L-3.75363 -6.70421C-3.75363 -6.70421 -1.76588 2.02941 -6.08056 9.9801C-5.48977 10.025 -4.8921 10.052 -4.28777 10.0436C6.82615 9.88862 15.707 0.847682 15.5504 -10.1523L15.5504 -10.1487Z",
43
+ fill: "#1868DB"
44
+ })), /*#__PURE__*/React.createElement("path", {
45
+ d: "M7.56286 3.61843C7.87582 3.44569 8.2578 3.44886 8.56822 3.62795L11.5883 5.37155C11.9043 5.5539 12.1 5.89221 12.1 6.25667V9.74392C12.1 10.1098 11.9055 10.4466 11.5885 10.6289L9.31833 11.9396C9.3233 11.9256 9.32804 11.9115 9.33255 11.8974C9.37469 11.7667 9.39702 11.6287 9.39702 11.4875V8.00029C9.39702 7.52122 9.14221 7.07944 8.7266 6.84045L7.03432 5.86386V4.51304C7.03432 4.4066 7.05078 4.30262 7.08192 4.20419C7.15847 3.96597 7.3213 3.75973 7.54405 3.63099L7.54473 3.6306C7.55112 3.62692 7.55719 3.62283 7.56286 3.61843Z",
46
+ fill: "white"
47
+ }), /*#__PURE__*/React.createElement("path", {
48
+ d: "M6.79433 4.06439L4.52416 5.37506C4.20715 5.55732 4.0127 5.89413 4.0127 6.26003V9.74729C4.0127 10.1117 4.20829 10.45 4.52436 10.6324L7.54444 12.376C7.85486 12.5551 8.23686 12.5583 8.5498 12.3855C8.55547 12.3811 8.5615 12.3771 8.56789 12.3734C8.79089 12.2447 8.95396 12.0384 9.03064 11.8001C9.06185 11.7016 9.07834 11.5975 9.07834 11.4909V10.1401L7.38617 9.16356C6.97063 8.92455 6.71564 8.48268 6.71564 8.00366V4.5164C6.71564 4.37548 6.73791 4.2376 6.77994 4.1071C6.7845 4.09277 6.7893 4.07853 6.79433 4.06439Z",
49
+ fill: "white"
50
+ }));
51
+ RovoHexLogo.displayName = 'RovoHexLogo';
52
+ export default RovoHexLogo;
@@ -1,16 +1,27 @@
1
1
  ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
+ ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
3
+ ._189ee4h9{border-width:var(--ds-border-width,1px)}
4
+ ._1dqonqa1{border-style:solid}
5
+ ._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
2
6
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
7
+ ._19bvv77o{padding-left:var(--ds-space-025,2px)}
3
8
  ._1bah1h6o{justify-content:center}
9
+ ._1bsb1ns9{width:-moz-fit-content;width:fit-content}
4
10
  ._1bsb1osq{width:100%}
5
11
  ._1bsb1tcg{width:24px}
6
12
  ._1e0c116y{display:inline-flex}
13
+ ._1o9zidpf{flex-shrink:0}
7
14
  ._4cvr1h6o{align-items:center}
8
15
  ._4t3i1tcg{height:24px}
9
16
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
10
17
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
18
+ ._kqswh2mm{position:relative}
11
19
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
20
+ ._o5721q9c{white-space:nowrap}
12
21
  ._syazi7uo{color:var(--ds-text,#292a2e)}
13
22
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
23
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
14
24
  ._1ah31i6y:focus-visible{outline-offset:var(--ds-space-negative-025,-2px)}
25
+ ._4cvx1v1w:hover{border-color:var(--ds-border-focused,#4688ec)}
15
26
  ._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
16
27
  ._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
@@ -9,13 +9,18 @@ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
10
10
  import Spinner from '@atlaskit/spinner';
11
11
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
12
+ import { ActionName } from '../../../../../../constants';
13
+ import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
12
14
  import { getPrimitivesInlineSpaceBySize } from '../../../utils';
13
15
  import ActionIcon from '../action-icon';
14
16
  const styles = {
15
17
  button: "_bfhksm61 _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
18
+ pillButton: "_2rko1qi0 _189ee4h9 _1dqonqa1 _1h6d1l7x _kqswh2mm _bfhksm61 _u5f3u2gc _19bvv77o _1bsb1ns9 _1ah31i6y _4cvx1v1w _irr31dpa _1di6fcek",
16
19
  content: "_11c8wadc _syazi7uo",
20
+ pillContent: "_11c8wadc _syazi7uo _o5721q9c",
17
21
  spinner: "_1bsb1tcg _4t3i1tcg _1e0c116y _4cvr1h6o _1bah1h6o"
18
22
  };
23
+ const pillIconWrapperStyles = null;
19
24
  const ActionButton = ({
20
25
  content,
21
26
  icon: iconOption,
@@ -29,6 +34,7 @@ const ActionButton = ({
29
34
  style,
30
35
  ariaLabel
31
36
  }) => {
37
+ var _flexibleUiContext$ac;
32
38
  const space = spaceOption !== null && spaceOption !== void 0 ? spaceOption : getPrimitivesInlineSpaceBySize(size);
33
39
  const onClick = useCallback(() => {
34
40
  if (!isDisabled && !isLoading && onClickCallback) {
@@ -40,6 +46,17 @@ const ActionButton = ({
40
46
  fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
41
47
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
42
48
  fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
49
+
50
+ /**
51
+ * NOTE: We only apply the pill variant when there's text label
52
+ * (textual `content`). Icon-only stack-item buttons (e.g. the link/expand
53
+ * icons in the hover card footer) are also rendered with `as="stack-item"`
54
+ * but pass `content=""` and should keep their original borderless styling.
55
+ */
56
+ const hasTextualContent = typeof content === 'string' ? content.trim().length > 0 : Boolean(content);
57
+ const flexibleUiContext = useFlexibleUiContext();
58
+ const isInRovoActionStack = !!(flexibleUiContext !== null && flexibleUiContext !== void 0 && (_flexibleUiContext$ac = flexibleUiContext.actions) !== null && _flexibleUiContext$ac !== void 0 && _flexibleUiContext$ac[ActionName.RovoChatAction]);
59
+ const isInlineActionNudgeExperiment = hasTextualContent && isInRovoActionStack && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
43
60
  const icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
44
61
  icon: is3pExperimentEnabled ? /*#__PURE__*/React.createElement(Box, {
45
62
  xcss: styles.spinner
@@ -51,7 +68,7 @@ const ActionButton = ({
51
68
  })
52
69
  }) : iconOption;
53
70
  return /*#__PURE__*/React.createElement(Pressable, _extends({
54
- xcss: cx(styles.button)
71
+ xcss: cx(isInlineActionNudgeExperiment ? styles.pillButton : styles.button)
55
72
  }, tooltipProps, {
56
73
  onClick: onClick,
57
74
  testId: testId
@@ -62,10 +79,12 @@ const ActionButton = ({
62
79
  'aria-label': ariaLabel
63
80
  } : {}), /*#__PURE__*/React.createElement(Inline, {
64
81
  alignBlock: "center",
65
- grow: "fill",
66
- space: space
67
- }, icon, /*#__PURE__*/React.createElement(Box, {
68
- xcss: cx(styles.content)
82
+ grow: isInlineActionNudgeExperiment ? 'hug' : 'fill',
83
+ space: isInlineActionNudgeExperiment ? 'space.050' : space
84
+ }, isInlineActionNudgeExperiment ? /*#__PURE__*/React.createElement("span", {
85
+ className: ax(["_1e0c116y _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _1o9zidpf"])
86
+ }, icon) : icon, /*#__PURE__*/React.createElement(Box, {
87
+ xcss: cx(isInlineActionNudgeExperiment ? styles.pillContent : styles.content)
69
88
  }, content)));
70
89
  };
71
90
  export default ActionButton;
@@ -2,6 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useMemo } from 'react';
3
3
  import { useIntl } from 'react-intl';
4
4
  import AiGenerativeTextIcon from '@atlaskit/icon-lab/core/ai-generative-text';
5
+ import AiSearchIcon from '@atlaskit/icon-lab/core/ai-search';
6
+ import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
7
+ import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
5
8
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
6
9
  import { ActionName } from '../../../../../constants';
7
10
  import { messages } from '../../../../../messages';
@@ -24,12 +27,15 @@ export let RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
24
27
  RovoChatPromptKey["IDENTIFY_KEY_TRENDS"] = "identify-key-trends";
25
28
  RovoChatPromptKey["FIND_OPEN_QUESTIONS"] = "find-open-questions";
26
29
  RovoChatPromptKey["HIGHLIGHT_RELEVANT_CONTENT"] = "highlight-relevant-content";
30
+ RovoChatPromptKey["SUMMARIZE_THIS_FOR_ME"] = "summarize-this-for-me";
31
+ RovoChatPromptKey["ASK_A_SPECIFIC_QUESTION"] = "ask-a-specific-question";
32
+ RovoChatPromptKey["SHOW_ME_WHATS_RELEVANT"] = "show-me-whats-relevant";
27
33
  return RovoChatPromptKey;
28
34
  }({});
29
35
  const GOOGLE_PROMPTS = [RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, RovoChatPromptKey.SHOW_OTHER_MENTIONS, RovoChatPromptKey.SUGGEST_IMPROVEMENT];
30
36
  const GENERIC_3P_PROMPTS = [
31
- // For rovogrowth-640-inline-action-nudge-exp only. Applies to all RovoActions eligible providers, except Google
32
- RovoChatPromptKey.SUMMARIZE_LINK, RovoChatPromptKey.KEY_HIGHLIGHTS, RovoChatPromptKey.ASK_ROVO_ANYTHING];
37
+ // For rovogrowth-640-inline-action-nudge-exp only
38
+ RovoChatPromptKey.SHOW_ME_WHATS_RELEVANT, RovoChatPromptKey.SUMMARIZE_THIS_FOR_ME, RovoChatPromptKey.ASK_A_SPECIFIC_QUESTION];
33
39
  const DEFAULT_PROMPTS = GOOGLE_PROMPTS;
34
40
  const getContext = (intl, product) => {
35
41
  switch (product) {
@@ -134,6 +140,28 @@ const getPromptAction = (promptKey, intl, url = '', product) => {
134
140
  }
135
141
  }
136
142
  };
143
+ case RovoChatPromptKey.SUMMARIZE_THIS_FOR_ME:
144
+ const label_summarize_this_for_me = intl.formatMessage(messages.rovo_prompt_button_summarize_this);
145
+ const html_summarize_this_for_me = intl.formatMessage(messages.rovo_prompt_message_summarize, {
146
+ url
147
+ }, {
148
+ ignoreTag: true
149
+ });
150
+ return {
151
+ icon: /*#__PURE__*/React.createElement(AiGenerativeTextSummaryIcon, {
152
+ label: label_summarize_this_for_me
153
+ }),
154
+ content: label_summarize_this_for_me,
155
+ tooltipMessage: label_summarize_this_for_me,
156
+ data: {
157
+ name: label_summarize_this_for_me,
158
+ dialogues: [],
159
+ prompt: htmlToAdf(html_summarize_this_for_me),
160
+ mode: {
161
+ fastModeEnabled: true
162
+ }
163
+ }
164
+ };
137
165
  case RovoChatPromptKey.KEY_HIGHLIGHTS:
138
166
  const label_key_highlights = intl.formatMessage(messages.rovo_prompt_button_highlight_relevant_content);
139
167
  const html_key_highlights = intl.formatMessage(messages.rovo_prompt_message_highlight_relevant_content, {
@@ -172,6 +200,25 @@ const getPromptAction = (promptKey, intl, url = '', product) => {
172
200
  placeholderType: 'generic'
173
201
  }
174
202
  };
203
+ case RovoChatPromptKey.ASK_A_SPECIFIC_QUESTION:
204
+ const label_ask_a_specific_question = intl.formatMessage(messages.rovo_prompt_button_ask_a_specific_question);
205
+ const prompt_ask_a_specific_question = intl.formatMessage(messages.rovo_prompt_message_ask_rovo_anything, {
206
+ url
207
+ });
208
+ return {
209
+ icon: /*#__PURE__*/React.createElement(RovoChatIcon, {
210
+ label: label_ask_a_specific_question
211
+ }),
212
+ content: label_ask_a_specific_question,
213
+ tooltipMessage: label_ask_a_specific_question,
214
+ data: {
215
+ name: label_ask_a_specific_question,
216
+ dialogues: [],
217
+ prompt: prompt_ask_a_specific_question,
218
+ isPromptPlaceholder: true,
219
+ placeholderType: 'generic'
220
+ }
221
+ };
175
222
  case RovoChatPromptKey.HIGHLIGHT_RELEVANT_CONTENT:
176
223
  const label_highlight_relevant_content = intl.formatMessage(messages.rovo_prompt_button_highlight_relevant_content);
177
224
  const html_highlight_relevant_content = intl.formatMessage(messages.rovo_prompt_message_highlight_relevant_content, {
@@ -192,6 +239,26 @@ const getPromptAction = (promptKey, intl, url = '', product) => {
192
239
  prompt: htmlToAdf(html_highlight_relevant_content)
193
240
  }
194
241
  };
242
+ case RovoChatPromptKey.SHOW_ME_WHATS_RELEVANT:
243
+ const label_show_me_whats_relevant = intl.formatMessage(messages.rovo_prompt_button_show_me_whats_relevant);
244
+ const html_show_me_whats_relevant = intl.formatMessage(messages.rovo_prompt_message_highlight_relevant_content, {
245
+ context: contextLong,
246
+ url
247
+ }, {
248
+ ignoreTag: true
249
+ });
250
+ return {
251
+ icon: /*#__PURE__*/React.createElement(AiSearchIcon, {
252
+ label: label_show_me_whats_relevant
253
+ }),
254
+ content: label_show_me_whats_relevant,
255
+ tooltipMessage: label_show_me_whats_relevant,
256
+ data: {
257
+ name: label_show_me_whats_relevant,
258
+ dialogues: [],
259
+ prompt: htmlToAdf(html_show_me_whats_relevant)
260
+ }
261
+ };
195
262
  case RovoChatPromptKey.IDENTIFY_KEY_TRENDS:
196
263
  const label_identify_key_trends = intl.formatMessage(messages.rovo_prompt_button_identify_key_trends);
197
264
  const html_identify_key_trends = intl.formatMessage(messages.rovo_prompt_message_identify_key_trends, {
@@ -0,0 +1,15 @@
1
+ ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
+ ._zulp1b66{gap:var(--ds-space-050,4px)}
3
+ ._zulputpp{gap:var(--ds-space-150,9pt)}
4
+ ._18u0v77o{margin-left:var(--ds-space-025,2px)}
5
+ ._19bv1b66{padding-left:var(--ds-space-050,4px)}
6
+ ._1bsb1osq{width:100%}
7
+ ._1e0c1txw{display:flex}
8
+ ._1wpz1fhb{align-self:stretch}
9
+ ._2lx21bp4{flex-direction:column}
10
+ ._4cvr1h6o{align-items:center}
11
+ ._4t3it94y{height:1px}
12
+ ._bfhk1l7x{background-color:var(--ds-border,#0b120e24)}
13
+ ._k48p1wq8{font-weight:var(--ds-font-weight-medium,500)}
14
+ ._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
15
+ ._syazazsu{color:var(--ds-text-subtle,#505258)}
@@ -0,0 +1,36 @@
1
+ /* ask-rovo-section-header.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import "./ask-rovo-section-header.compiled.css";
3
+ import * as React from 'react';
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import { useIntl } from 'react-intl';
6
+ import { messages } from '../../../../../messages';
7
+ import RovoHexLogo from '../../../assets/rovo-hex-logo';
8
+ const sectionHeaderStyles = null;
9
+ const sectionHeaderDividerStyles = null;
10
+ const sectionHeaderRowStyles = null;
11
+ const sectionHeaderLabelStyles = null;
12
+ /**
13
+ * "Ask Rovo" section header rendered above the prompt action pill buttons in
14
+ * the rovogrowth-640-inline-action-nudge-exp pill variant.
15
+ *
16
+ * Renders a full-width 1px divider followed by a row containing the colourful
17
+ * Rovo hex logo and the "Ask Rovo" label.
18
+ */
19
+ const AskRovoSectionHeader = ({
20
+ testId
21
+ }) => {
22
+ const intl = useIntl();
23
+ return /*#__PURE__*/React.createElement("div", {
24
+ "data-testid": testId,
25
+ className: ax(["_zulputpp _1e0c1txw _2lx21bp4 _otyru2gc _18u0v77o _1bsb1osq _1wpz1fhb"])
26
+ }, /*#__PURE__*/React.createElement("div", {
27
+ role: "separator",
28
+ "aria-orientation": "horizontal",
29
+ className: ax(["_4t3it94y _1bsb1osq _bfhk1l7x"])
30
+ }), /*#__PURE__*/React.createElement("div", {
31
+ className: ax(["_zulp1b66 _1e0c1txw _4cvr1h6o _19bv1b66"])
32
+ }, /*#__PURE__*/React.createElement(RovoHexLogo, null), /*#__PURE__*/React.createElement("span", {
33
+ className: ax(["_11c8wadc _syazazsu _k48p1wq8"])
34
+ }, intl.formatMessage(messages.rovo_chat_action_section_header))));
35
+ };
36
+ export default AskRovoSectionHeader;
@@ -1,7 +1,10 @@
1
- ._16jlkb7n{flex-grow:1}
1
+
2
+ ._zulp12x7{gap:var(--ds-space-075,6px)}._16jlkb7n{flex-grow:1}
2
3
  ._18u01ivi{margin-left:calc(var(--container-gap-left)*-1)}
3
4
  ._1bsb129b{width:calc(100% + var(--container-gap-left) + var(--container-gap-right))}
5
+ ._1bsb1osq{width:100%}
4
6
  ._1e0c1txw{display:flex}
5
7
  ._2hwxc10g{margin-right:calc(var(--container-gap-right)*-1)}
6
8
  ._2lx21bp4{flex-direction:column}
9
+ ._4cvr1y6m{align-items:flex-start}
7
10
  ._vchhusvi{box-sizing:border-box}
@@ -5,11 +5,15 @@ import { ax, ix } from "@compiled/react/runtime";
5
5
  import { useCallback, useMemo, useState } from 'react';
6
6
  import { di } from 'react-magnetic-di';
7
7
  import { fg } from '@atlaskit/platform-feature-flags';
8
+ import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
8
9
  import { ActionName, SmartLinkSize } from '../../../../../constants';
9
10
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
10
11
  import * as Actions from '../../actions';
11
12
  import { ActionFooter } from './action-footer';
13
+ import AskRovoSectionHeader from './ask-rovo-section-header';
12
14
  const ignoreContainerPaddingStyles = null;
15
+ const inlineActionNudgePillWrapperStyles = null;
16
+ const inlineActionNudgeColumnStyles = null;
13
17
  const DEFAULT_SORT_ORDER = ['PreviewAction', 'CopyLinkAction', 'AISummaryAction'];
14
18
  const sort = (a, b) => {
15
19
  let idxA = DEFAULT_SORT_ORDER.indexOf(a);
@@ -53,6 +57,9 @@ const ActionBlock = ({
53
57
  const context = useFlexibleUiContext();
54
58
  const ui = useFlexibleUiOptionContext();
55
59
  const isRovoChatActionAvailable = (fg('platform_sl_3p_auth_rovo_action_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg')) && isAny3pRovoActionsExperimentOn ? (context === null || context === void 0 ? void 0 : (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[ActionName.RovoChatAction]) !== undefined : undefined;
60
+
61
+ // eslint-disable-next-line @atlaskit/platform/no-preconditioning
62
+ const isInlineActionNudgeExperiment = fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
56
63
  const [message, setMessage] = useState();
57
64
  const [isLoading, setIsLoading] = useState(false);
58
65
  const onLoadingChange = useCallback(isLoading => {
@@ -87,15 +94,33 @@ const ActionBlock = ({
87
94
  size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
88
95
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
89
96
  ,
90
- style: padding && {
97
+ style: !(isInlineActionNudgeExperiment && isRovoChatActionAvailable) && padding ? {
91
98
  paddingInline: padding
92
- },
99
+ } : undefined,
93
100
  hideTooltip: isLoading
94
101
  });
95
102
  };
96
103
  return arr.map(name => renderAction(name));
97
- }, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, onClick]);
98
- return actions ? /*#__PURE__*/React.createElement("div", {
104
+ }, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, onClick, isInlineActionNudgeExperiment]);
105
+ const showRovoSectionHeader = isInlineActionNudgeExperiment && isRovoChatActionAvailable;
106
+ if (!actions) {
107
+ return null;
108
+ }
109
+ if (isInlineActionNudgeExperiment && isRovoChatActionAvailable) {
110
+ return /*#__PURE__*/React.createElement("div", {
111
+ ref: blockRef,
112
+ "data-testid": testId,
113
+ className: ax(["_1e0c1txw _2lx21bp4 _vchhusvi _1bsb1osq"])
114
+ }, showRovoSectionHeader && /*#__PURE__*/React.createElement(AskRovoSectionHeader, {
115
+ testId: testId ? `${testId}-rovo-section-header` : undefined
116
+ }), /*#__PURE__*/React.createElement("div", {
117
+ className: ax(["_zulp12x7 _1e0c1txw _2lx21bp4 _4cvr1y6m"])
118
+ }, actions), /*#__PURE__*/React.createElement(ActionFooter, {
119
+ message: message,
120
+ testId: testId
121
+ }));
122
+ }
123
+ return /*#__PURE__*/React.createElement("div", {
99
124
  ref: blockRef,
100
125
  "data-testid": testId
101
126
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
@@ -104,6 +129,6 @@ const ActionBlock = ({
104
129
  }, actions, /*#__PURE__*/React.createElement(ActionFooter, {
105
130
  message: message,
106
131
  testId: testId
107
- })) : null;
132
+ }));
108
133
  };
109
134
  export default ActionBlock;
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "44.3.20",
15
+ packageVersion: "44.3.22",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:4df239590aaac389efc3ed9d6e8087725b77a70c5bd5f9047993671379a33b25
3
- size 33107
2
+ oid sha256:64a45081f856f48de6a315f9b12747d543b2b83106d1faa7b36089de8c7f04c1
3
+ size 36891
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:43fbdc9bbdc8153019286429b71a36b4709b3f6c40e63478482d08f8d204a234
3
- size 25329
2
+ oid sha256:f16d2f260c508d20c49ca84a31b73ef9232cf7ae4b4ac0a8b5e3abaf946888eb
3
+ size 29353
@@ -1000,5 +1000,25 @@ export var messages = defineMessages({
1000
1000
  id: 'fabric.linking.rovo_prompt_message_find_open_questions.non-final',
1001
1001
  defaultMessage: '<p>Look at this <a>{url}</a> and list any open questions, unresolved decisions, or asks that still need follow‑up. Group them by owner if possible and keep it concise.</p>',
1002
1002
  description: 'The prompt message to send to Rovo Chat. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
1003
+ },
1004
+ rovo_chat_action_section_header: {
1005
+ id: 'fabric.linking.rovo_chat_action_section_header.non-final',
1006
+ defaultMessage: 'Ask Rovo',
1007
+ description: 'Heading shown above the Rovo prompt action buttons in the smart link hover card, alongside the Rovo logo, to introduce the AI prompt suggestions.'
1008
+ },
1009
+ rovo_prompt_button_summarize_this: {
1010
+ id: 'fabric.linking.rovo_prompt_button_summarize_this.non-final',
1011
+ defaultMessage: 'Summarize this for me',
1012
+ description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
1013
+ },
1014
+ rovo_prompt_button_ask_a_specific_question: {
1015
+ id: 'fabric.linking.rovo_prompt_button_ask_a_specific_question.non-final',
1016
+ defaultMessage: 'Ask a specific question',
1017
+ description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
1018
+ },
1019
+ rovo_prompt_button_show_me_whats_relevant: {
1020
+ id: 'fabric.linking.rovo_prompt_button_show_me_whats_relevant.non-final',
1021
+ defaultMessage: "Show me what's relevant",
1022
+ description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
1003
1023
  }
1004
1024
  });
@@ -28,7 +28,7 @@ var useRovoChat = function useRovoChat() {
28
28
  agentId: undefined
29
29
  }),
30
30
  openChat: true,
31
- openChatMode: product && jiraProducts.includes(product) && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') ? 'mini-modal' : 'sidebar'
31
+ openChatMode: product && jiraProducts.includes(product) && fg('platform_sl_3p_auth_rovo_block_jira_kill_switch') || fg('rovogrowth-640-inline-action-nudge-fg') ? 'mini-modal' : 'sidebar'
32
32
  },
33
33
  onAcknowledgeTimeout: function onAcknowledgeTimeout() {
34
34
  // NAVX-3599: Add analytics event
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "44.3.20" || ''
7
+ packageVersion: "44.3.22" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,57 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["width", "height"];
4
+ import React from 'react';
5
+ var RovoHexLogo = function RovoHexLogo(_ref) {
6
+ var _ref$width = _ref.width,
7
+ width = _ref$width === void 0 ? 16 : _ref$width,
8
+ _ref$height = _ref.height,
9
+ height = _ref$height === void 0 ? 16 : _ref$height,
10
+ props = _objectWithoutProperties(_ref, _excluded);
11
+ return /*#__PURE__*/React.createElement("svg", _extends({
12
+ width: width,
13
+ height: height,
14
+ viewBox: "0 0 16 16",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ "aria-hidden": "true",
18
+ focusable: "false"
19
+ }, props), /*#__PURE__*/React.createElement("path", {
20
+ d: "M7.32082 0.180234C7.74137 -0.0600783 8.25764 -0.0600779 8.67819 0.180234L14.4919 3.50235C14.9181 3.7459 15.1811 4.19916 15.1811 4.69005V11.31C15.1811 11.8008 14.9181 12.2541 14.4919 12.4976L8.67819 15.8198C8.25764 16.0601 7.74137 16.0601 7.32082 15.8198L1.50712 12.4976C1.08091 12.2541 0.817871 11.8008 0.817871 11.31V4.69005C0.817871 4.19916 1.08091 3.7459 1.50712 3.50235L7.32082 0.180234Z",
21
+ fill: "#BF63F3"
22
+ }), /*#__PURE__*/React.createElement("mask", {
23
+ id: "rovo-hex-logo-mask"
24
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
25
+ ,
26
+ style: {
27
+ maskType: 'alpha'
28
+ },
29
+ maskUnits: "userSpaceOnUse",
30
+ x: "0",
31
+ y: "0",
32
+ width: "16",
33
+ height: "16"
34
+ }, /*#__PURE__*/React.createElement("path", {
35
+ d: "M7.32131 0.180234C7.74186 -0.0600783 8.25813 -0.0600779 8.67868 0.180234L14.4924 3.50235C14.9186 3.7459 15.1816 4.19916 15.1816 4.69005V11.31C15.1816 11.8008 14.9186 12.2541 14.4924 12.4976L8.67868 15.8198C8.25813 16.0601 7.74186 16.0601 7.32131 15.8198L1.50761 12.4976C1.08139 12.2541 0.818359 11.8008 0.818359 11.31V4.69005C0.818359 4.19916 1.08139 3.7459 1.50761 3.50235L7.32131 0.180234Z",
36
+ fill: "#BF63F3"
37
+ })), /*#__PURE__*/React.createElement("g", {
38
+ mask: "url(#rovo-hex-logo-mask)"
39
+ }, /*#__PURE__*/React.createElement("path", {
40
+ d: "M1.55034 23.7263C2.51722 21.8759 3.92904 20.4254 5.78825 19.4378C7.64746 18.4502 9.80649 18.0272 11.9924 18.2787L0.232859 -3.40716C-1.71715 -3.05431 -3.61315 -2.40324 -5.43793 -1.43392C-7.26271 -0.464597 -8.83182 0.695804 -10.1944 2.06176L1.55525 23.7295L1.55034 23.7263Z",
41
+ fill: "#82B536"
42
+ }), /*#__PURE__*/React.createElement("path", {
43
+ d: "M8.32996 10.6048C5.08544 11.9472 2.60753 14.1646 2.50661 17.2335C2.50661 17.2335 2.50834 17.2492 2.5067 17.2569C2.50006 17.4849 2.50431 17.7155 2.52528 17.9508C2.52613 17.9528 2.52697 17.9548 2.52782 17.9568C2.54755 18.195 2.58193 18.4389 2.63013 18.6865C2.64247 18.7448 2.66068 18.8053 2.67303 18.8635C2.71727 19.0611 2.76151 19.2587 2.82541 19.4622C2.91006 19.7323 3.0085 20.006 3.12662 20.2856C3.34515 20.803 3.60149 21.2648 3.87811 21.6759C4.24638 22.2229 4.65025 22.6799 5.05256 23.0579C5.15366 23.1522 5.25307 23.2424 5.35496 23.327C5.82852 23.6473 6.52024 24.0721 7.67929 24.611C8.43636 24.9641 9.39801 25.3664 10.6295 25.8214C11.6142 24.3227 13.4162 23.1571 15.1026 21.8515C16.434 20.8196 17.6899 19.7016 18.4057 18.2626C19.0622 16.9444 19.0793 15.3018 18.3596 13.5979C16.5583 9.33325 12.571 8.84764 8.33329 10.6011L8.32996 10.6048Z",
44
+ fill: "#FCA700"
45
+ }), /*#__PURE__*/React.createElement("path", {
46
+ d: "M15.5504 -10.1487L-3.75363 -6.70421C-3.75363 -6.70421 -1.76588 2.02941 -6.08056 9.9801C-5.48977 10.025 -4.8921 10.052 -4.28777 10.0436C6.82615 9.88862 15.707 0.847682 15.5504 -10.1523L15.5504 -10.1487Z",
47
+ fill: "#1868DB"
48
+ })), /*#__PURE__*/React.createElement("path", {
49
+ d: "M7.56286 3.61843C7.87582 3.44569 8.2578 3.44886 8.56822 3.62795L11.5883 5.37155C11.9043 5.5539 12.1 5.89221 12.1 6.25667V9.74392C12.1 10.1098 11.9055 10.4466 11.5885 10.6289L9.31833 11.9396C9.3233 11.9256 9.32804 11.9115 9.33255 11.8974C9.37469 11.7667 9.39702 11.6287 9.39702 11.4875V8.00029C9.39702 7.52122 9.14221 7.07944 8.7266 6.84045L7.03432 5.86386V4.51304C7.03432 4.4066 7.05078 4.30262 7.08192 4.20419C7.15847 3.96597 7.3213 3.75973 7.54405 3.63099L7.54473 3.6306C7.55112 3.62692 7.55719 3.62283 7.56286 3.61843Z",
50
+ fill: "white"
51
+ }), /*#__PURE__*/React.createElement("path", {
52
+ d: "M6.79433 4.06439L4.52416 5.37506C4.20715 5.55732 4.0127 5.89413 4.0127 6.26003V9.74729C4.0127 10.1117 4.20829 10.45 4.52436 10.6324L7.54444 12.376C7.85486 12.5551 8.23686 12.5583 8.5498 12.3855C8.55547 12.3811 8.5615 12.3771 8.56789 12.3734C8.79089 12.2447 8.95396 12.0384 9.03064 11.8001C9.06185 11.7016 9.07834 11.5975 9.07834 11.4909V10.1401L7.38617 9.16356C6.97063 8.92455 6.71564 8.48268 6.71564 8.00366V4.5164C6.71564 4.37548 6.73791 4.2376 6.77994 4.1071C6.7845 4.09277 6.7893 4.07853 6.79433 4.06439Z",
53
+ fill: "white"
54
+ }));
55
+ };
56
+ RovoHexLogo.displayName = 'RovoHexLogo';
57
+ export default RovoHexLogo;
@@ -1,16 +1,27 @@
1
1
  ._11c8wadc{font:var(--ds-font-body-small,normal 400 9pt/1pc "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
+ ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
3
+ ._189ee4h9{border-width:var(--ds-border-width,1px)}
4
+ ._1dqonqa1{border-style:solid}
5
+ ._1h6d1l7x{border-color:var(--ds-border,#0b120e24)}
2
6
  ._19bv1b66{padding-left:var(--ds-space-050,4px)}
7
+ ._19bvv77o{padding-left:var(--ds-space-025,2px)}
3
8
  ._1bah1h6o{justify-content:center}
9
+ ._1bsb1ns9{width:-moz-fit-content;width:fit-content}
4
10
  ._1bsb1osq{width:100%}
5
11
  ._1bsb1tcg{width:24px}
6
12
  ._1e0c116y{display:inline-flex}
13
+ ._1o9zidpf{flex-shrink:0}
7
14
  ._4cvr1h6o{align-items:center}
8
15
  ._4t3i1tcg{height:24px}
9
16
  ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
10
17
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
18
+ ._kqswh2mm{position:relative}
11
19
  ._n3td1b66{padding-bottom:var(--ds-space-050,4px)}
20
+ ._o5721q9c{white-space:nowrap}
12
21
  ._syazi7uo{color:var(--ds-text,#292a2e)}
13
22
  ._u5f31b66{padding-right:var(--ds-space-050,4px)}
23
+ ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
14
24
  ._1ah31i6y:focus-visible{outline-offset:var(--ds-space-negative-025,-2px)}
25
+ ._4cvx1v1w:hover{border-color:var(--ds-border-focused,#4688ec)}
15
26
  ._irr31dpa:hover{background-color:var(--ds-background-neutral-subtle-hovered,#0515240f)}
16
27
  ._1di6fcek:active{background-color:var(--ds-background-neutral-subtle-pressed,#0b120e24)}
@@ -9,14 +9,20 @@ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { Box, Inline, Pressable } from '@atlaskit/primitives/compiled';
10
10
  import Spinner from '@atlaskit/spinner';
11
11
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
12
+ import { ActionName } from '../../../../../../constants';
13
+ import { useFlexibleUiContext } from '../../../../../../state/flexible-ui-context';
12
14
  import { getPrimitivesInlineSpaceBySize } from '../../../utils';
13
15
  import ActionIcon from '../action-icon';
14
16
  var styles = {
15
17
  button: "_bfhksm61 _ca0q1b66 _u5f31b66 _n3td1b66 _19bv1b66 _1bsb1osq _1ah31i6y _irr31dpa _1di6fcek",
18
+ pillButton: "_2rko1qi0 _189ee4h9 _1dqonqa1 _1h6d1l7x _kqswh2mm _bfhksm61 _u5f3u2gc _19bvv77o _1bsb1ns9 _1ah31i6y _4cvx1v1w _irr31dpa _1di6fcek",
16
19
  content: "_11c8wadc _syazi7uo",
20
+ pillContent: "_11c8wadc _syazi7uo _o5721q9c",
17
21
  spinner: "_1bsb1tcg _4t3i1tcg _1e0c116y _4cvr1h6o _1bah1h6o"
18
22
  };
23
+ var pillIconWrapperStyles = null;
19
24
  var ActionButton = function ActionButton(_ref) {
25
+ var _flexibleUiContext$ac;
20
26
  var content = _ref.content,
21
27
  iconOption = _ref.icon,
22
28
  isDisabled = _ref.isDisabled,
@@ -39,6 +45,17 @@ var ActionButton = function ActionButton(_ref) {
39
45
  fg('platform_sl_3p_auth_rovo_action_kill_switch') && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true) ||
40
46
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
41
47
  fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
48
+
49
+ /**
50
+ * NOTE: We only apply the pill variant when there's text label
51
+ * (textual `content`). Icon-only stack-item buttons (e.g. the link/expand
52
+ * icons in the hover card footer) are also rendered with `as="stack-item"`
53
+ * but pass `content=""` and should keep their original borderless styling.
54
+ */
55
+ var hasTextualContent = typeof content === 'string' ? content.trim().length > 0 : Boolean(content);
56
+ var flexibleUiContext = useFlexibleUiContext();
57
+ var isInRovoActionStack = !!(flexibleUiContext !== null && flexibleUiContext !== void 0 && (_flexibleUiContext$ac = flexibleUiContext.actions) !== null && _flexibleUiContext$ac !== void 0 && _flexibleUiContext$ac[ActionName.RovoChatAction]);
58
+ var isInlineActionNudgeExperiment = hasTextualContent && isInRovoActionStack && fg('rovogrowth-640-inline-action-nudge-fg') && expValEqualsNoExposure('rovogrowth-640-inline-action-nudge-exp', 'isEnabled', true);
42
59
  var icon = iconOption && isLoading ? /*#__PURE__*/React.createElement(ActionIcon, {
43
60
  icon: is3pExperimentEnabled ? /*#__PURE__*/React.createElement(Box, {
44
61
  xcss: styles.spinner
@@ -50,7 +67,7 @@ var ActionButton = function ActionButton(_ref) {
50
67
  })
51
68
  }) : iconOption;
52
69
  return /*#__PURE__*/React.createElement(Pressable, _extends({
53
- xcss: cx(styles.button)
70
+ xcss: cx(isInlineActionNudgeExperiment ? styles.pillButton : styles.button)
54
71
  }, tooltipProps, {
55
72
  onClick: onClick,
56
73
  testId: testId
@@ -61,10 +78,12 @@ var ActionButton = function ActionButton(_ref) {
61
78
  'aria-label': ariaLabel
62
79
  } : {}), /*#__PURE__*/React.createElement(Inline, {
63
80
  alignBlock: "center",
64
- grow: "fill",
65
- space: space
66
- }, icon, /*#__PURE__*/React.createElement(Box, {
67
- xcss: cx(styles.content)
81
+ grow: isInlineActionNudgeExperiment ? 'hug' : 'fill',
82
+ space: isInlineActionNudgeExperiment ? 'space.050' : space
83
+ }, isInlineActionNudgeExperiment ? /*#__PURE__*/React.createElement("span", {
84
+ className: ax(["_1e0c116y _4cvr1h6o _1bah1h6o _1bsb1tcg _4t3i1tcg _1o9zidpf"])
85
+ }, icon) : icon, /*#__PURE__*/React.createElement(Box, {
86
+ xcss: cx(isInlineActionNudgeExperiment ? styles.pillContent : styles.content)
68
87
  }, content)));
69
88
  };
70
89
  export default ActionButton;