@atlaskit/smart-card 43.30.1 → 43.31.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.
Files changed (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +3 -0
  3. package/dist/cjs/messages.js +60 -0
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/HoverCard/components/ContentContainer.compiled.css +2 -1
  6. package/dist/cjs/view/HoverCard/components/ContentContainer.js +11 -9
  7. package/dist/cjs/view/HoverCard/components/CustomPopupContainer.js +4 -1
  8. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -1
  9. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +206 -73
  10. package/dist/cjs/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.compiled.css +16 -0
  11. package/dist/cjs/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.js +135 -0
  12. package/dist/cjs/view/LinkUrl/index.js +1 -1
  13. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +3 -0
  14. package/dist/es2019/messages.js +60 -0
  15. package/dist/es2019/utils/analytics/analytics.js +1 -1
  16. package/dist/es2019/view/HoverCard/components/ContentContainer.compiled.css +1 -0
  17. package/dist/es2019/view/HoverCard/components/ContentContainer.js +8 -2
  18. package/dist/es2019/view/HoverCard/components/CustomPopupContainer.js +4 -1
  19. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +2 -1
  20. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +188 -64
  21. package/dist/es2019/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.compiled.css +16 -0
  22. package/dist/es2019/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.js +125 -0
  23. package/dist/es2019/view/LinkUrl/index.js +1 -1
  24. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-true.png +3 -0
  25. package/dist/esm/messages.js +60 -0
  26. package/dist/esm/utils/analytics/analytics.js +1 -1
  27. package/dist/esm/view/HoverCard/components/ContentContainer.compiled.css +2 -1
  28. package/dist/esm/view/HoverCard/components/ContentContainer.js +11 -9
  29. package/dist/esm/view/HoverCard/components/CustomPopupContainer.js +4 -1
  30. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +2 -1
  31. package/dist/esm/view/HoverCard/components/HoverCardContent.js +207 -74
  32. package/dist/esm/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.compiled.css +16 -0
  33. package/dist/esm/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.js +126 -0
  34. package/dist/esm/view/LinkUrl/index.js +1 -1
  35. package/dist/types/messages.d.ts +1 -1
  36. package/dist/types/view/HoverCard/components/ContentContainer.d.ts +1 -1
  37. package/dist/types/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.d.ts +3 -0
  38. package/dist/types/view/HoverCard/components/views/unauthorised/types.d.ts +4 -0
  39. package/dist/types/view/HoverCard/types.d.ts +9 -0
  40. package/dist/types-ts4.5/messages.d.ts +1 -1
  41. package/dist/types-ts4.5/view/HoverCard/components/ContentContainer.d.ts +1 -1
  42. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/RovoUnauthorisedView.d.ts +3 -0
  43. package/dist/types-ts4.5/view/HoverCard/components/views/unauthorised/types.d.ts +4 -0
  44. package/dist/types-ts4.5/view/HoverCard/types.d.ts +9 -0
  45. package/package.json +7 -4
  46. /package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-unauthorised--default.png → hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png} +0 -0
  47. /package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-unauthorised--default.png → hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png} +0 -0
  48. /package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/{hover-card-unauthorised--default.png → hover-card-unauthorised--default--platform-sl-3p-preauth-better-hovercard-false.png} +0 -0
@@ -0,0 +1,16 @@
1
+
2
+ ._zulputpp{gap:var(--ds-space-150,9pt)}._13li1mok{border-top-left-radius:var(--ds-radius-large,8px)}
3
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
4
+ ._19pkpxbi{margin-top:var(--ds-space-200,1pc)}
5
+ ._1bahesu3{justify-content:flex-end}
6
+ ._1e0c1txw{display:flex}
7
+ ._1n261g80{flex-wrap:wrap}
8
+ ._4cvr1h6o{align-items:center}
9
+ ._bfhkomb0{background-color:var(--ds-background-brand-bold,#0052cc)}
10
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
11
+ ._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
12
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
13
+ ._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
14
+ ._qrwq1mok{border-top-right-radius:var(--ds-radius-large,8px)}
15
+ ._syaz15cr{color:var(--ds-text-inverse,#fff)}
16
+ ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
@@ -0,0 +1,126 @@
1
+ /* RovoUnauthorisedView.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import "./RovoUnauthorisedView.compiled.css";
4
+ import * as React from 'react';
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ import { useCallback, useMemo } from 'react';
7
+ import { FormattedMessage } from 'react-intl-next';
8
+ import Button from '@atlaskit/button/new';
9
+ import { IconTile } from '@atlaskit/icon';
10
+ import AiSparkleIcon from '@atlaskit/icon/core/ai-sparkle';
11
+ import AppSwitcherIcon from '@atlaskit/icon/core/app-switcher';
12
+ import GlobeIcon from '@atlaskit/icon/core/globe';
13
+ import SearchIcon from '@atlaskit/icon/core/search';
14
+ import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
15
+ import { Box, Inline, Stack, Text } from '@atlaskit/primitives/compiled';
16
+ import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
17
+ import { CardDisplay } from '../../../../../constants';
18
+ import { messages } from '../../../../../messages';
19
+ import { useSmartCardActions } from '../../../../../state/actions';
20
+ var ROVO_FEATURES = [{
21
+ icon: GlobeIcon,
22
+ appearance: 'blue',
23
+ titleMessage: messages.rovo_unauthorised_feature_document_summaries_title,
24
+ descMessage: messages.rovo_unauthorised_feature_document_summaries_desc,
25
+ testIdSuffix: 'document-summaries'
26
+ }, {
27
+ icon: SearchIcon,
28
+ appearance: 'purple',
29
+ titleMessage: messages.rovo_unauthorised_feature_related_content_title,
30
+ descMessage: messages.rovo_unauthorised_feature_related_content_desc,
31
+ testIdSuffix: 'related-content'
32
+ }, {
33
+ icon: AiSparkleIcon,
34
+ appearance: 'orange',
35
+ titleMessage: messages.rovo_unauthorised_feature_smart_suggestions_title,
36
+ descMessage: messages.rovo_unauthorised_feature_smart_suggestions_desc,
37
+ testIdSuffix: 'smart-suggestions'
38
+ }, {
39
+ icon: AppSwitcherIcon,
40
+ appearance: 'teal',
41
+ titleMessage: messages.rovo_unauthorised_feature_cross_reference_title,
42
+ descMessage: messages.rovo_unauthorised_feature_cross_reference_desc,
43
+ testIdSuffix: 'cross-reference'
44
+ }];
45
+ var layoutStyles = {
46
+ header: "_bfhkomb0 _syaz15cr _ca0qutpp _u5f3pxbi _n3tdutpp _19bvpxbi _13li1mok _qrwq1mok",
47
+ body: "_ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi",
48
+ footer: "_19pkpxbi _ca0qutpp",
49
+ footerActions: "_zulputpp _1e0c1txw _4cvr1h6o _1bahesu3 _1n261g80"
50
+ };
51
+ var RovoUnauthorisedView = function RovoUnauthorisedView(_ref) {
52
+ var _ref$id = _ref.id,
53
+ id = _ref$id === void 0 ? '' : _ref$id,
54
+ flexibleCardProps = _ref.flexibleCardProps,
55
+ onDismiss = _ref.onDismiss,
56
+ _ref$testId = _ref.testId,
57
+ testId = _ref$testId === void 0 ? 'hover-card-rovo-unauthorised-view' : _ref$testId,
58
+ url = _ref.url;
59
+ var providerName = useMemo(function () {
60
+ var _extractSmartLinkProv;
61
+ return (_extractSmartLinkProv = extractSmartLinkProvider(flexibleCardProps.cardState.details)) === null || _extractSmartLinkProv === void 0 ? void 0 : _extractSmartLinkProv.text;
62
+ }, [flexibleCardProps.cardState.details]);
63
+ var _useSmartCardActions = useSmartCardActions(id, url),
64
+ authorize = _useSmartCardActions.authorize;
65
+ var _useAnalyticsEvents = useAnalyticsEvents(),
66
+ fireEvent = _useAnalyticsEvents.fireEvent;
67
+ var handleAuthorize = useCallback(function () {
68
+ if (authorize) {
69
+ fireEvent('track.applicationAccount.authStarted', {});
70
+ authorize(CardDisplay.HoverCardPreview);
71
+ }
72
+ }, [authorize, fireEvent]);
73
+ return /*#__PURE__*/React.createElement(Box, {
74
+ testId: testId
75
+ }, /*#__PURE__*/React.createElement(Box, {
76
+ xcss: layoutStyles.header
77
+ }, /*#__PURE__*/React.createElement(Text, {
78
+ weight: "bold",
79
+ size: "medium",
80
+ color: "color.text.inverse"
81
+ }, providerName ? /*#__PURE__*/React.createElement(FormattedMessage, _extends({}, messages.rovo_unauthorised_title, {
82
+ values: {
83
+ context: providerName
84
+ }
85
+ })) : /*#__PURE__*/React.createElement(FormattedMessage, messages.rovo_unauthorised_title_no_provider))), /*#__PURE__*/React.createElement(Box, {
86
+ xcss: layoutStyles.body
87
+ }, /*#__PURE__*/React.createElement(Stack, {
88
+ space: "space.050"
89
+ }, /*#__PURE__*/React.createElement(Stack, {
90
+ space: "space.200"
91
+ }, ROVO_FEATURES.map(function (feature) {
92
+ return /*#__PURE__*/React.createElement(Inline, {
93
+ key: feature.testIdSuffix,
94
+ space: "space.100",
95
+ alignBlock: "center",
96
+ testId: "".concat(testId, "-feature-row-").concat(feature.testIdSuffix)
97
+ }, /*#__PURE__*/React.createElement(IconTile, {
98
+ icon: feature.icon,
99
+ label: '',
100
+ appearance: feature.appearance,
101
+ size: "medium",
102
+ testId: "".concat(testId, "-feature-").concat(feature.testIdSuffix)
103
+ }), /*#__PURE__*/React.createElement(Stack, {
104
+ space: "space.025"
105
+ }, /*#__PURE__*/React.createElement(Text, {
106
+ size: "small",
107
+ weight: "bold"
108
+ }, /*#__PURE__*/React.createElement(FormattedMessage, feature.titleMessage)), /*#__PURE__*/React.createElement(Text, {
109
+ size: "small",
110
+ color: "color.text.subtlest"
111
+ }, /*#__PURE__*/React.createElement(FormattedMessage, feature.descMessage))));
112
+ })), /*#__PURE__*/React.createElement(Box, {
113
+ xcss: layoutStyles.footer
114
+ }, /*#__PURE__*/React.createElement(Box, {
115
+ xcss: layoutStyles.footerActions
116
+ }, /*#__PURE__*/React.createElement(Button, {
117
+ appearance: "subtle",
118
+ onClick: onDismiss,
119
+ testId: "".concat(testId, "-not-now")
120
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.rovo_unauthorised_not_now)), /*#__PURE__*/React.createElement(Button, {
121
+ appearance: "primary",
122
+ onClick: handleAuthorize,
123
+ testId: "".concat(testId, "-connect-account")
124
+ }, /*#__PURE__*/React.createElement(FormattedMessage, messages.rovo_unauthorised_connect_account)))))));
125
+ };
126
+ export default RovoUnauthorisedView;
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "43.30.0",
18
+ packageVersion: "43.30.1",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -1,7 +1,7 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
3
  export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement';
4
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | RovoChatActionMessageKey;
4
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_document_summaries_title' | 'rovo_unauthorised_feature_document_summaries_desc' | 'rovo_unauthorised_feature_smart_suggestions_title' | 'rovo_unauthorised_feature_smart_suggestions_desc' | 'rovo_unauthorised_feature_cross_reference_title' | 'rovo_unauthorised_feature_cross_reference_desc' | 'rovo_unauthorised_feature_related_content_title' | 'rovo_unauthorised_feature_related_content_desc' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | RovoChatActionMessageKey;
5
5
  type Messages = {
6
6
  [K in MessageKey]: MessageDescriptor;
7
7
  };
@@ -1,3 +1,3 @@
1
1
  import type { ContentContainerProps } from '../types';
2
- declare const ContentContainer: ({ children, isAIEnabled, testId, url, ...props }: ContentContainerProps) => JSX.Element;
2
+ declare const ContentContainer: ({ children, widthAppearance, isAIEnabled, testId, url, ...props }: ContentContainerProps) => JSX.Element;
3
3
  export default ContentContainer;
@@ -0,0 +1,3 @@
1
+ import { type HoverCardUnauthorisedProps } from './types';
2
+ declare const RovoUnauthorisedView: ({ id, flexibleCardProps, onDismiss, testId, url, }: HoverCardUnauthorisedProps) => JSX.Element;
3
+ export default RovoUnauthorisedView;
@@ -12,6 +12,10 @@ export type HoverCardUnauthorisedProps = {
12
12
  * A unique ID for a Smart Link.
13
13
  */
14
14
  id?: string;
15
+ /**
16
+ * Dismisses the hover card (e.g. "Maybe later").
17
+ */
18
+ onDismiss?: () => void;
15
19
  /**
16
20
  * A `testId` prop is provided for specified elements, which is a unique
17
21
  * string that appears as a data attribute `data-testid` in the rendered code,
@@ -95,6 +95,10 @@ export type HoverCardContentProps = {
95
95
  hoverPreviewOptions?: HoverPreviewOptions;
96
96
  id?: string;
97
97
  onActionClick: (actionId: string | ActionName) => void;
98
+ /**
99
+ * Closes the hover card popup (e.g. secondary actions like "Maybe later").
100
+ */
101
+ onDismiss?: () => void;
98
102
  onMouseEnter?: MouseEventHandler;
99
103
  onMouseLeave?: MouseEventHandler;
100
104
  onResolve: () => void;
@@ -102,10 +106,15 @@ export type HoverCardContentProps = {
102
106
  showRovoResolvedView?: boolean;
103
107
  url: string;
104
108
  };
109
+ export type ContentContainerWidthAppearance = 'default' | 'slim';
105
110
  export type ContentContainerProps = React.HTMLAttributes<HTMLDivElement> & {
106
111
  isAIEnabled?: boolean;
107
112
  testId?: string;
108
113
  url: string;
114
+ /**
115
+ * Visual width preset for the hover card shell. Omit or `undefined` uses `'default'`.
116
+ */
117
+ widthAppearance?: ContentContainerWidthAppearance;
109
118
  };
110
119
  export type ImagePreviewProps = {
111
120
  fallbackElementHeight: number;
@@ -1,7 +1,7 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
3
  export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement';
4
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | RovoChatActionMessageKey;
4
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_document_summaries_title' | 'rovo_unauthorised_feature_document_summaries_desc' | 'rovo_unauthorised_feature_smart_suggestions_title' | 'rovo_unauthorised_feature_smart_suggestions_desc' | 'rovo_unauthorised_feature_cross_reference_title' | 'rovo_unauthorised_feature_cross_reference_desc' | 'rovo_unauthorised_feature_related_content_title' | 'rovo_unauthorised_feature_related_content_desc' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | RovoChatActionMessageKey;
5
5
  type Messages = {
6
6
  [K in MessageKey]: MessageDescriptor;
7
7
  };
@@ -1,3 +1,3 @@
1
1
  import type { ContentContainerProps } from '../types';
2
- declare const ContentContainer: ({ children, isAIEnabled, testId, url, ...props }: ContentContainerProps) => JSX.Element;
2
+ declare const ContentContainer: ({ children, widthAppearance, isAIEnabled, testId, url, ...props }: ContentContainerProps) => JSX.Element;
3
3
  export default ContentContainer;
@@ -0,0 +1,3 @@
1
+ import { type HoverCardUnauthorisedProps } from './types';
2
+ declare const RovoUnauthorisedView: ({ id, flexibleCardProps, onDismiss, testId, url, }: HoverCardUnauthorisedProps) => JSX.Element;
3
+ export default RovoUnauthorisedView;
@@ -12,6 +12,10 @@ export type HoverCardUnauthorisedProps = {
12
12
  * A unique ID for a Smart Link.
13
13
  */
14
14
  id?: string;
15
+ /**
16
+ * Dismisses the hover card (e.g. "Maybe later").
17
+ */
18
+ onDismiss?: () => void;
15
19
  /**
16
20
  * A `testId` prop is provided for specified elements, which is a unique
17
21
  * string that appears as a data attribute `data-testid` in the rendered code,
@@ -95,6 +95,10 @@ export type HoverCardContentProps = {
95
95
  hoverPreviewOptions?: HoverPreviewOptions;
96
96
  id?: string;
97
97
  onActionClick: (actionId: string | ActionName) => void;
98
+ /**
99
+ * Closes the hover card popup (e.g. secondary actions like "Maybe later").
100
+ */
101
+ onDismiss?: () => void;
98
102
  onMouseEnter?: MouseEventHandler;
99
103
  onMouseLeave?: MouseEventHandler;
100
104
  onResolve: () => void;
@@ -102,10 +106,15 @@ export type HoverCardContentProps = {
102
106
  showRovoResolvedView?: boolean;
103
107
  url: string;
104
108
  };
109
+ export type ContentContainerWidthAppearance = 'default' | 'slim';
105
110
  export type ContentContainerProps = React.HTMLAttributes<HTMLDivElement> & {
106
111
  isAIEnabled?: boolean;
107
112
  testId?: string;
108
113
  url: string;
114
+ /**
115
+ * Visual width preset for the hover card shell. Omit or `undefined` uses `'default'`.
116
+ */
117
+ widthAppearance?: ContentContainerWidthAppearance;
109
118
  };
110
119
  export type ImagePreviewProps = {
111
120
  fallbackElementHeight: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.30.1",
3
+ "version": "43.31.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,7 +46,7 @@
46
46
  "@atlaskit/heading": "^5.3.0",
47
47
  "@atlaskit/icon": "^34.0.0",
48
48
  "@atlaskit/icon-file-type": "^7.0.0",
49
- "@atlaskit/icon-lab": "^6.3.0",
49
+ "@atlaskit/icon-lab": "^6.4.0",
50
50
  "@atlaskit/icon-object": "^7.5.0",
51
51
  "@atlaskit/image": "^3.0.0",
52
52
  "@atlaskit/json-ld-types": "^1.4.0",
@@ -67,7 +67,7 @@
67
67
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
68
68
  "@atlaskit/popup": "^4.16.0",
69
69
  "@atlaskit/primitives": "^18.1.0",
70
- "@atlaskit/react-ufo": "^5.10.0",
70
+ "@atlaskit/react-ufo": "^5.11.0",
71
71
  "@atlaskit/rovo-triggers": "^5.34.0",
72
72
  "@atlaskit/section-message": "^8.12.0",
73
73
  "@atlaskit/select": "^21.10.0",
@@ -77,7 +77,7 @@
77
77
  "@atlaskit/textfield": "^8.2.0",
78
78
  "@atlaskit/theme": "^22.0.0",
79
79
  "@atlaskit/tile": "^1.0.0",
80
- "@atlaskit/tmp-editor-statsig": "^54.3.0",
80
+ "@atlaskit/tmp-editor-statsig": "^54.4.0",
81
81
  "@atlaskit/tokens": "^11.4.0",
82
82
  "@atlaskit/tooltip": "^21.1.0",
83
83
  "@atlaskit/ufo": "^0.4.0",
@@ -230,6 +230,9 @@
230
230
  "fix_hover_card_on_focus_a11y": {
231
231
  "type": "boolean"
232
232
  },
233
+ "platform_sl_3p_preauth_better_hovercard_killswitch": {
234
+ "type": "boolean"
235
+ },
233
236
  "platform_navx_smart_link_icon_label_a11y": {
234
237
  "type": "boolean"
235
238
  },