@atlaskit/smart-card 26.42.8 → 26.42.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/dist/cjs/constants.js +2 -1
- package/dist/cjs/messages.js +7 -2
- package/dist/cjs/state/helpers.js +4 -1
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +3 -1
- package/dist/cjs/view/BlockCard/views/flexible/styled.js +3 -7
- package/dist/cjs/view/{InlineCard/ResolvingView → BlockCard/views}/styled.js +3 -3
- package/dist/cjs/view/CardWithData/component.js +1 -1
- package/dist/cjs/view/CardWithUrl/component.js +1 -3
- package/dist/cjs/view/EmbedCard/components/styled.js +12 -20
- package/dist/cjs/view/EmbedCard/index.js +4 -1
- package/dist/cjs/view/EmbedCard/views/UnauthorisedView.js +4 -2
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +4 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +7 -16
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +33 -0
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +3 -0
- package/dist/cjs/view/HoverCard/styled.js +2 -3
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/LinkView/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +4 -2
- package/dist/es2019/constants.js +1 -0
- package/dist/es2019/messages.js +7 -2
- package/dist/es2019/state/helpers.js +2 -1
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/es2019/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
- package/dist/es2019/view/BlockCard/views/flexible/styled.js +6 -13
- package/dist/es2019/view/BlockCard/views/styled.js +7 -0
- package/dist/es2019/view/CardWithData/component.js +1 -1
- package/dist/es2019/view/CardWithUrl/component.js +1 -3
- package/dist/es2019/view/EmbedCard/components/styled.js +9 -30
- package/dist/es2019/view/EmbedCard/index.js +5 -2
- package/dist/es2019/view/EmbedCard/views/UnauthorisedView.js +4 -2
- package/dist/es2019/view/EmbedCard/views/unauthorized-view/index.js +3 -1
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +7 -11
- package/dist/es2019/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +21 -0
- package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +3 -0
- package/dist/es2019/view/HoverCard/styled.js +6 -9
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/LinkView/index.js +1 -1
- package/dist/es2019/view/common/UnauthorisedViewContent.js +5 -3
- package/dist/esm/constants.js +1 -0
- package/dist/esm/messages.js +7 -2
- package/dist/esm/state/helpers.js +3 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/BlockCard/views/ResolvedView.js +1 -1
- package/dist/esm/view/BlockCard/views/flexible/FlexibleUnauthorisedView.js +4 -2
- package/dist/esm/view/BlockCard/views/flexible/styled.js +3 -7
- package/dist/esm/view/BlockCard/views/styled.js +5 -0
- package/dist/esm/view/CardWithData/component.js +1 -1
- package/dist/esm/view/CardWithUrl/component.js +1 -3
- package/dist/esm/view/EmbedCard/components/styled.js +12 -20
- package/dist/esm/view/EmbedCard/index.js +5 -2
- package/dist/esm/view/EmbedCard/views/UnauthorisedView.js +4 -2
- package/dist/esm/view/EmbedCard/views/unauthorized-view/index.js +4 -2
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/index.js +7 -13
- package/dist/esm/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.js +25 -0
- package/dist/esm/view/HoverCard/components/HoverCardComponent.js +3 -5
- package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -0
- package/dist/esm/view/HoverCard/styled.js +2 -3
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/LinkView/index.js +1 -1
- package/dist/esm/view/common/UnauthorisedViewContent.js +5 -3
- package/dist/types/constants.d.ts +1 -0
- package/dist/types/extractors/inline/index.d.ts +1 -1
- package/dist/types/messages.d.ts +1 -1
- package/dist/types/state/helpers.d.ts +1 -0
- package/dist/types/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types/view/EmbedCard/views/UnauthorisedView.d.ts +1 -0
- package/dist/types/view/EmbedCard/views/unauthorized-view/types.d.ts +1 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.d.ts +4 -0
- package/dist/types/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/types.d.ts +7 -0
- package/dist/types/view/LinkView/index.d.ts +1 -1
- package/dist/types/view/common/UnauthorisedViewContent.d.ts +6 -1
- package/dist/types-ts4.5/constants.d.ts +1 -0
- package/dist/types-ts4.5/extractors/inline/index.d.ts +1 -1
- package/dist/types-ts4.5/messages.d.ts +1 -1
- package/dist/types-ts4.5/state/helpers.d.ts +1 -0
- package/dist/types-ts4.5/view/BlockCard/views/styled.d.ts +5 -0
- package/dist/types-ts4.5/view/EmbedCard/views/UnauthorisedView.d.ts +1 -0
- package/dist/types-ts4.5/view/EmbedCard/views/unauthorized-view/types.d.ts +1 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/index.d.ts +4 -0
- package/dist/types-ts4.5/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group/types.d.ts +7 -0
- package/dist/types-ts4.5/view/LinkView/index.d.ts +1 -1
- package/dist/types-ts4.5/view/common/UnauthorisedViewContent.d.ts +6 -1
- package/package.json +5 -8
- package/dist/cjs/view/InlineCard/ErroredView/index.js +0 -89
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +0 -128
- package/dist/cjs/view/InlineCard/Frame/index.js +0 -61
- package/dist/cjs/view/InlineCard/Frame/styled.js +0 -66
- package/dist/cjs/view/InlineCard/Icon.js +0 -40
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +0 -150
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/styled.js +0 -47
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +0 -82
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +0 -68
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +0 -110
- package/dist/cjs/view/InlineCard/index.js +0 -182
- package/dist/cjs/view/InlineCard/styled.js +0 -26
- package/dist/es2019/view/InlineCard/ErroredView/index.js +0 -65
- package/dist/es2019/view/InlineCard/ForbiddenView/index.js +0 -107
- package/dist/es2019/view/InlineCard/Frame/index.js +0 -54
- package/dist/es2019/view/InlineCard/Frame/styled.js +0 -93
- package/dist/es2019/view/InlineCard/Icon.js +0 -45
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/index.js +0 -124
- package/dist/es2019/view/InlineCard/IconAndTitleLayout/styled.js +0 -101
- package/dist/es2019/view/InlineCard/ResolvedView/index.js +0 -55
- package/dist/es2019/view/InlineCard/ResolvingView/index.js +0 -44
- package/dist/es2019/view/InlineCard/ResolvingView/styled.js +0 -6
- package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +0 -84
- package/dist/es2019/view/InlineCard/index.js +0 -149
- package/dist/es2019/view/InlineCard/styled.js +0 -35
- package/dist/esm/view/InlineCard/ErroredView/index.js +0 -82
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +0 -121
- package/dist/esm/view/InlineCard/Frame/index.js +0 -52
- package/dist/esm/view/InlineCard/Frame/styled.js +0 -59
- package/dist/esm/view/InlineCard/Icon.js +0 -34
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +0 -143
- package/dist/esm/view/InlineCard/IconAndTitleLayout/styled.js +0 -40
- package/dist/esm/view/InlineCard/ResolvedView/index.js +0 -75
- package/dist/esm/view/InlineCard/ResolvingView/index.js +0 -61
- package/dist/esm/view/InlineCard/ResolvingView/styled.js +0 -5
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +0 -103
- package/dist/esm/view/InlineCard/index.js +0 -146
- package/dist/esm/view/InlineCard/styled.js +0 -19
- package/dist/types/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types/view/InlineCard/ForbiddenView/index.d.ts +0 -28
- package/dist/types/view/InlineCard/Frame/index.d.ts +0 -15
- package/dist/types/view/InlineCard/Frame/styled.d.ts +0 -15
- package/dist/types/view/InlineCard/Icon.d.ts +0 -12
- package/dist/types/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -28
- package/dist/types/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -40
- package/dist/types/view/InlineCard/ResolvedView/index.d.ts +0 -32
- package/dist/types/view/InlineCard/ResolvingView/index.d.ts +0 -17
- package/dist/types/view/InlineCard/ResolvingView/styled.d.ts +0 -9
- package/dist/types/view/InlineCard/UnauthorisedView/index.d.ts +0 -31
- package/dist/types/view/InlineCard/index.d.ts +0 -9
- package/dist/types/view/InlineCard/styled.d.ts +0 -17
- package/dist/types/view/InlineCard/types.d.ts +0 -25
- package/dist/types-ts4.5/view/InlineCard/ErroredView/index.d.ts +0 -21
- package/dist/types-ts4.5/view/InlineCard/ForbiddenView/index.d.ts +0 -28
- package/dist/types-ts4.5/view/InlineCard/Frame/index.d.ts +0 -15
- package/dist/types-ts4.5/view/InlineCard/Frame/styled.d.ts +0 -15
- package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +0 -12
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/index.d.ts +0 -28
- package/dist/types-ts4.5/view/InlineCard/IconAndTitleLayout/styled.d.ts +0 -40
- package/dist/types-ts4.5/view/InlineCard/ResolvedView/index.d.ts +0 -32
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/index.d.ts +0 -17
- package/dist/types-ts4.5/view/InlineCard/ResolvingView/styled.d.ts +0 -9
- package/dist/types-ts4.5/view/InlineCard/UnauthorisedView/index.d.ts +0 -31
- package/dist/types-ts4.5/view/InlineCard/index.d.ts +0 -9
- package/dist/types-ts4.5/view/InlineCard/styled.d.ts +0 -17
- package/dist/types-ts4.5/view/InlineCard/types.d.ts +0 -25
- package/tmp/api-report-tmp.d.ts +0 -1007
- /package/dist/cjs/view/{InlineCard → FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group}/types.js +0 -0
- /package/dist/es2019/view/{InlineCard → FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group}/types.js +0 -0
- /package/dist/esm/view/{InlineCard → FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-items-group}/types.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { JsonLd } from 'json-ld-types';
|
|
3
3
|
import { CardProviderRenderers } from '@atlaskit/link-provider';
|
|
4
|
-
import { InlineCardResolvedViewProps } from '../../view/
|
|
4
|
+
import { InlineCardResolvedViewProps } from '../../view/RedesignedInlineCard/ResolvedView';
|
|
5
5
|
export declare const extractInlineIcon: (jsonLd: JsonLd.Data.BaseData) => import("react").ReactNode;
|
|
6
6
|
export declare const extractInlineProps: (jsonLd: JsonLd.Data.BaseData, renderers?: CardProviderRenderers) => InlineCardResolvedViewProps;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { 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_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
|
|
3
|
-
export type MessageKey = 'assigned_to' | 'cannot_find_link' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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' | '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' | 'preview_improved' | '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' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
3
|
+
export type MessageKey = 'assigned_to' | 'cannot_find_link' | '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' | 'could_not_load_link' | 'download' | 'follow' | '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' | 'preview_improved' | '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' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
|
|
4
4
|
type Messages = {
|
|
5
5
|
[K in MessageKey]: MessageDescriptor;
|
|
6
6
|
};
|
|
@@ -17,3 +17,4 @@ export declare const getStatusDetails: (details?: JsonLd.Response) => string | u
|
|
|
17
17
|
export declare const isFinalState: (status: CardType) => boolean;
|
|
18
18
|
export declare const getDatasources: (details?: JsonLdDatasourceResponse) => DatasourceResolveResponse[] | undefined;
|
|
19
19
|
export declare const getCanBeDatasource: (details?: JsonLdDatasourceResponse) => boolean;
|
|
20
|
+
export declare const hasAuthScopeOverrides: (details?: JsonLd.Response) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const LozengeBlockWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
@@ -11,6 +11,7 @@ export interface EmbedCardUnauthorisedViewProps {
|
|
|
11
11
|
inheritDimensions?: boolean;
|
|
12
12
|
onClick?: (evt: React.MouseEvent) => void;
|
|
13
13
|
extensionKey?: string;
|
|
14
|
+
isProductIntegrationSupported?: boolean;
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* @deprecated {@link https://product-fabric.atlassian.net/browse/EDM-7977 Internal documentation for deprecation (no external access)}\
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { LozengeItem } from '../types';
|
|
2
|
+
import { ThemeAppearance } from '@atlaskit/lozenge';
|
|
3
|
+
export type LozengeActionItemsGroupProps = {
|
|
4
|
+
items: LozengeItem[];
|
|
5
|
+
testId?: string;
|
|
6
|
+
onClick?: (id: string, text: string, appearance?: ThemeAppearance) => Promise<void>;
|
|
7
|
+
};
|
|
@@ -6,6 +6,11 @@ type UnauthorisedViewContentProps = {
|
|
|
6
6
|
* Eg. Google, Microsoft etc
|
|
7
7
|
*/
|
|
8
8
|
providerName?: string;
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, display an alternative message which prompts user to connect all
|
|
11
|
+
* Atlassian products (vs. smart links only) to the 3rd party account.
|
|
12
|
+
*/
|
|
13
|
+
isProductIntegrationSupported?: boolean;
|
|
9
14
|
/**
|
|
10
15
|
* A `testId` prop is provided for specified elements, which is a unique
|
|
11
16
|
* string that appears as a data attribute `data-testid` in the rendered code,
|
|
@@ -22,5 +27,5 @@ type UnauthorisedViewContentProps = {
|
|
|
22
27
|
* This component is used in unauthorized views of a smart link.
|
|
23
28
|
* It represents the main text that provides a user with information on how to connect their account
|
|
24
29
|
*/
|
|
25
|
-
declare const UnauthorisedViewContent: ({ providerName, testId, analytics, }: UnauthorisedViewContentProps) => JSX.Element;
|
|
30
|
+
declare const UnauthorisedViewContent: ({ providerName, isProductIntegrationSupported, testId, analytics, }: UnauthorisedViewContentProps) => JSX.Element;
|
|
26
31
|
export default UnauthorisedViewContent;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.42.
|
|
3
|
+
"version": "26.42.10",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
27
27
|
"@atlaskit/avatar": "^21.4.0",
|
|
28
28
|
"@atlaskit/avatar-group": "^9.4.0",
|
|
29
|
-
"@atlaskit/badge": "^15.
|
|
29
|
+
"@atlaskit/badge": "^15.2.0",
|
|
30
30
|
"@atlaskit/button": "^16.17.0",
|
|
31
31
|
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
32
32
|
"@atlaskit/frontend-utilities": "^2.7.0",
|
|
@@ -41,12 +41,12 @@
|
|
|
41
41
|
"@atlaskit/linking-common": "^4.21.0",
|
|
42
42
|
"@atlaskit/linking-types": "^8.5.0",
|
|
43
43
|
"@atlaskit/logo": "^13.14.0",
|
|
44
|
-
"@atlaskit/lozenge": "^11.
|
|
45
|
-
"@atlaskit/modal-dialog": "^12.
|
|
44
|
+
"@atlaskit/lozenge": "^11.5.0",
|
|
45
|
+
"@atlaskit/modal-dialog": "^12.10.0",
|
|
46
46
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
48
48
|
"@atlaskit/popup": "^1.11.0",
|
|
49
|
-
"@atlaskit/primitives": "^1.
|
|
49
|
+
"@atlaskit/primitives": "^1.13.0",
|
|
50
50
|
"@atlaskit/spinner": "^16.0.0",
|
|
51
51
|
"@atlaskit/theme": "^12.6.0",
|
|
52
52
|
"@atlaskit/tokens": "^1.29.0",
|
|
@@ -141,9 +141,6 @@
|
|
|
141
141
|
"platform.linking-platform.smart-card.follow-button": {
|
|
142
142
|
"type": "boolean"
|
|
143
143
|
},
|
|
144
|
-
"platform.linking-platform.smart-card.show-smart-links-refreshed-design": {
|
|
145
|
-
"type": "boolean"
|
|
146
|
-
},
|
|
147
144
|
"platform.linking-platform.smart-card.fix-is-trusted-pop": {
|
|
148
145
|
"type": "boolean"
|
|
149
146
|
},
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.InlineCardErroredView = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
12
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
13
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var _react = _interopRequireDefault(require("react"));
|
|
16
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
17
|
-
var _error = _interopRequireDefault(require("@atlaskit/icon/glyph/error"));
|
|
18
|
-
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
19
|
-
var _Frame = require("../Frame");
|
|
20
|
-
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
21
|
-
var _Icon = require("../Icon");
|
|
22
|
-
var _messages = require("../../../messages");
|
|
23
|
-
var _reactIntlNext = require("react-intl-next");
|
|
24
|
-
var _styled = require("../styled");
|
|
25
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
26
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
27
|
-
var InlineCardErroredView = exports.InlineCardErroredView = /*#__PURE__*/function (_React$Component) {
|
|
28
|
-
(0, _inherits2.default)(InlineCardErroredView, _React$Component);
|
|
29
|
-
var _super = _createSuper(InlineCardErroredView);
|
|
30
|
-
function InlineCardErroredView() {
|
|
31
|
-
var _this;
|
|
32
|
-
(0, _classCallCheck2.default)(this, InlineCardErroredView);
|
|
33
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
|
-
args[_key] = arguments[_key];
|
|
35
|
-
}
|
|
36
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
37
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleRetry", function (event) {
|
|
38
|
-
var onRetry = _this.props.onRetry;
|
|
39
|
-
if (onRetry) {
|
|
40
|
-
event.preventDefault();
|
|
41
|
-
event.stopPropagation();
|
|
42
|
-
onRetry();
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderRightSide", function () {
|
|
46
|
-
var _this$props = _this.props,
|
|
47
|
-
onRetry = _this$props.onRetry,
|
|
48
|
-
message = _this$props.message;
|
|
49
|
-
return !onRetry ? message : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, message, ', ', /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
50
|
-
spacing: "none",
|
|
51
|
-
appearance: "subtle-link",
|
|
52
|
-
component: _styled.IconStyledButton,
|
|
53
|
-
onClick: _this.handleRetry,
|
|
54
|
-
role: "button"
|
|
55
|
-
}, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.try_again, function (formattedMessage) {
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(_styled.LowercaseAppearance, null, formattedMessage);
|
|
57
|
-
})));
|
|
58
|
-
});
|
|
59
|
-
return _this;
|
|
60
|
-
}
|
|
61
|
-
(0, _createClass2.default)(InlineCardErroredView, [{
|
|
62
|
-
key: "render",
|
|
63
|
-
value: function render() {
|
|
64
|
-
var _this$props2 = this.props,
|
|
65
|
-
url = _this$props2.url,
|
|
66
|
-
onClick = _this$props2.onClick,
|
|
67
|
-
isSelected = _this$props2.isSelected,
|
|
68
|
-
_this$props2$testId = _this$props2.testId,
|
|
69
|
-
testId = _this$props2$testId === void 0 ? 'inline-card-errored-view' : _this$props2$testId,
|
|
70
|
-
icon = _this$props2.icon;
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
|
|
72
|
-
testId: testId,
|
|
73
|
-
isSelected: isSelected
|
|
74
|
-
}, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
|
|
75
|
-
icon: icon || /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_error.default, {
|
|
76
|
-
label: "error",
|
|
77
|
-
size: "small",
|
|
78
|
-
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R300, ")"),
|
|
79
|
-
testId: "errored-view-default-icon"
|
|
80
|
-
})),
|
|
81
|
-
link: url,
|
|
82
|
-
title: url,
|
|
83
|
-
onClick: onClick,
|
|
84
|
-
rightSide: this.renderRightSide()
|
|
85
|
-
}));
|
|
86
|
-
}
|
|
87
|
-
}]);
|
|
88
|
-
return InlineCardErroredView;
|
|
89
|
-
}(_react.default.Component);
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.InlineCardForbiddenView = void 0;
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
12
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
13
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
14
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
15
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
|
-
var _react = _interopRequireDefault(require("react"));
|
|
17
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
18
|
-
var _lockFilled = _interopRequireDefault(require("@atlaskit/icon/glyph/lock-filled"));
|
|
19
|
-
var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
|
|
20
|
-
var _Frame = require("../Frame");
|
|
21
|
-
var _IconAndTitleLayout = require("../IconAndTitleLayout");
|
|
22
|
-
var _Icon = require("../Icon");
|
|
23
|
-
var _messages = require("../../../messages");
|
|
24
|
-
var _reactIntlNext = require("react-intl-next");
|
|
25
|
-
var _styled = require("../styled");
|
|
26
|
-
var _lozenge = _interopRequireDefault(require("@atlaskit/lozenge"));
|
|
27
|
-
var _styled2 = require("../IconAndTitleLayout/styled");
|
|
28
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
29
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
30
|
-
var FallbackForbiddenIcon = /*#__PURE__*/_react.default.createElement(_Icon.AKIconWrapper, null, /*#__PURE__*/_react.default.createElement(_lockFilled.default, {
|
|
31
|
-
label: "error",
|
|
32
|
-
size: "small",
|
|
33
|
-
primaryColor: "var(--ds-icon-danger, ".concat(_colors.R400, ")"),
|
|
34
|
-
testId: "forbidden-view-fallback-icon"
|
|
35
|
-
}));
|
|
36
|
-
var InlineCardForbiddenView = exports.InlineCardForbiddenView = /*#__PURE__*/function (_React$Component) {
|
|
37
|
-
(0, _inherits2.default)(InlineCardForbiddenView, _React$Component);
|
|
38
|
-
var _super = _createSuper(InlineCardForbiddenView);
|
|
39
|
-
function InlineCardForbiddenView() {
|
|
40
|
-
var _this$props;
|
|
41
|
-
var _this;
|
|
42
|
-
(0, _classCallCheck2.default)(this, InlineCardForbiddenView);
|
|
43
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
44
|
-
args[_key] = arguments[_key];
|
|
45
|
-
}
|
|
46
|
-
_this = _super.call.apply(_super, [this].concat(args));
|
|
47
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "state", {
|
|
48
|
-
hasRequestAccessContextMessage: !!((_this$props = _this.props) !== null && _this$props !== void 0 && (_this$props = _this$props.requestAccessContext) !== null && _this$props !== void 0 && _this$props.callToActionMessageKey)
|
|
49
|
-
});
|
|
50
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleRetry", function (event) {
|
|
51
|
-
var onAuthorise = _this.props.onAuthorise;
|
|
52
|
-
event.preventDefault();
|
|
53
|
-
event.stopPropagation();
|
|
54
|
-
if (onAuthorise) {
|
|
55
|
-
onAuthorise();
|
|
56
|
-
} else {
|
|
57
|
-
var _this$props2;
|
|
58
|
-
(_this$props2 = _this.props) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.requestAccessContext) === null || _this$props2 === void 0 || (_this$props2 = _this$props2.action) === null || _this$props2 === void 0 || _this$props2.promise();
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderForbiddenAccessMessage", function () {
|
|
62
|
-
var _this$props3;
|
|
63
|
-
if ((_this$props3 = _this.props) !== null && _this$props3 !== void 0 && (_this$props3 = _this$props3.requestAccessContext) !== null && _this$props3 !== void 0 && _this$props3.callToActionMessageKey) {
|
|
64
|
-
var callToActionMessageKey = _this.props.requestAccessContext.callToActionMessageKey;
|
|
65
|
-
return /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, (0, _extends2.default)({}, _messages.messages[callToActionMessageKey], {
|
|
66
|
-
values: {
|
|
67
|
-
context: _this.props.context
|
|
68
|
-
}
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_reactIntlNext.FormattedMessage, _messages.messages.invalid_permissions, function (formattedMessage) {
|
|
72
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, formattedMessage);
|
|
73
|
-
}));
|
|
74
|
-
});
|
|
75
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "renderRightSide", function () {
|
|
76
|
-
var onAuthorise = _this.props.onAuthorise;
|
|
77
|
-
if (_this.state.hasRequestAccessContextMessage) {
|
|
78
|
-
return /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
79
|
-
spacing: "none",
|
|
80
|
-
appearance: "subtle-link",
|
|
81
|
-
onClick: _this.handleRetry,
|
|
82
|
-
component: _styled.IconStyledButton,
|
|
83
|
-
testId: "button-connect-other-account",
|
|
84
|
-
role: "button"
|
|
85
|
-
}, _this.renderForbiddenAccessMessage());
|
|
86
|
-
}
|
|
87
|
-
if (onAuthorise) {
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement(_styled2.LozengeBlockWrapper, null, /*#__PURE__*/_react.default.createElement(_customThemeButton.default, {
|
|
89
|
-
spacing: "none",
|
|
90
|
-
appearance: "subtle-link",
|
|
91
|
-
onClick: _this.handleRetry,
|
|
92
|
-
component: _styled.IconStyledButton,
|
|
93
|
-
testId: "button-connect-other-account",
|
|
94
|
-
role: "button"
|
|
95
|
-
}, /*#__PURE__*/_react.default.createElement(_styled2.LozengeWrapper, null, /*#__PURE__*/_react.default.createElement(_lozenge.default, {
|
|
96
|
-
appearance: 'moved'
|
|
97
|
-
}, _this.renderForbiddenAccessMessage()))));
|
|
98
|
-
}
|
|
99
|
-
return null;
|
|
100
|
-
});
|
|
101
|
-
return _this;
|
|
102
|
-
}
|
|
103
|
-
(0, _createClass2.default)(InlineCardForbiddenView, [{
|
|
104
|
-
key: "render",
|
|
105
|
-
value: function render() {
|
|
106
|
-
var _this$props4 = this.props,
|
|
107
|
-
url = _this$props4.url,
|
|
108
|
-
icon = _this$props4.icon,
|
|
109
|
-
onClick = _this$props4.onClick,
|
|
110
|
-
isSelected = _this$props4.isSelected,
|
|
111
|
-
_this$props4$testId = _this$props4.testId,
|
|
112
|
-
testId = _this$props4$testId === void 0 ? 'inline-card-forbidden-view' : _this$props4$testId;
|
|
113
|
-
return /*#__PURE__*/_react.default.createElement(_Frame.Frame, {
|
|
114
|
-
testId: testId,
|
|
115
|
-
isSelected: isSelected
|
|
116
|
-
}, /*#__PURE__*/_react.default.createElement(_IconAndTitleLayout.IconAndTitleLayout, {
|
|
117
|
-
icon: icon ? icon : FallbackForbiddenIcon,
|
|
118
|
-
link: url,
|
|
119
|
-
title: url,
|
|
120
|
-
onClick: onClick,
|
|
121
|
-
titleColor: "var(--ds-text-subtle, ".concat(_colors.N500, ")"),
|
|
122
|
-
rightSide: this.renderRightSide(),
|
|
123
|
-
rightSideSpacer: this.state.hasRequestAccessContextMessage
|
|
124
|
-
}));
|
|
125
|
-
}
|
|
126
|
-
}]);
|
|
127
|
-
return InlineCardForbiddenView;
|
|
128
|
-
}(_react.default.Component);
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Frame = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _components = require("@atlaskit/theme/components");
|
|
10
|
-
var _styled = require("./styled");
|
|
11
|
-
var _useLinkClicked = require("../../../state/analytics/useLinkClicked");
|
|
12
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
-
var Frame = exports.Frame = function Frame(props) {
|
|
15
|
-
var isSelected = props.isSelected,
|
|
16
|
-
children = props.children,
|
|
17
|
-
onClick = props.onClick,
|
|
18
|
-
link = props.link,
|
|
19
|
-
withoutBackground = props.withoutBackground,
|
|
20
|
-
testId = props.testId,
|
|
21
|
-
className = props.className;
|
|
22
|
-
var handleClick = (0, _react.useCallback)(function (event) {
|
|
23
|
-
if (onClick) {
|
|
24
|
-
event.preventDefault();
|
|
25
|
-
event.stopPropagation();
|
|
26
|
-
onClick(event);
|
|
27
|
-
}
|
|
28
|
-
}, [onClick]);
|
|
29
|
-
var handleKeyPress = (0, _react.useCallback)(function (event) {
|
|
30
|
-
if (event.key !== ' ' && event.key !== 'Enter') {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
if (onClick) {
|
|
34
|
-
event.preventDefault();
|
|
35
|
-
event.stopPropagation();
|
|
36
|
-
onClick(event);
|
|
37
|
-
}
|
|
38
|
-
}, [onClick]);
|
|
39
|
-
var handleMouseDown = (0, _useLinkClicked.useMouseDownEvent)();
|
|
40
|
-
var isInteractive = Boolean(onClick);
|
|
41
|
-
|
|
42
|
-
// Depending on whenever Frame was given onClick or link itself we display span or anchor elements
|
|
43
|
-
var Wrapper = link || onClick ? _styled.WrapperAnchor : _styled.WrapperSpan;
|
|
44
|
-
|
|
45
|
-
// TODO Theming doesn't work right now in editor. Required React context does not trickle down atm.
|
|
46
|
-
// It will be worked as part of https://product-fabric.atlassian.net/jira/servicedesk/projects/DTR/queues/issue/DTR-154
|
|
47
|
-
return /*#__PURE__*/_react.default.createElement(Wrapper, {
|
|
48
|
-
theme: (0, _components.useGlobalTheme)(),
|
|
49
|
-
href: link,
|
|
50
|
-
withoutBackground: withoutBackground,
|
|
51
|
-
isSelected: isSelected,
|
|
52
|
-
isInteractive: isInteractive,
|
|
53
|
-
tabIndex: isInteractive ? 0 : undefined,
|
|
54
|
-
role: isInteractive ? 'button' : undefined,
|
|
55
|
-
onClick: handleClick,
|
|
56
|
-
onMouseDown: handleMouseDown,
|
|
57
|
-
onKeyPress: handleKeyPress,
|
|
58
|
-
"data-testid": testId,
|
|
59
|
-
className: className
|
|
60
|
-
}, children);
|
|
61
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.WrapperSpan = exports.WrapperAnchor = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
11
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
12
|
-
var _components = require("@atlaskit/theme/components");
|
|
13
|
-
var _templateObject, _templateObject2;
|
|
14
|
-
var BACKGROUND_COLOR_DARK = '#262B31';
|
|
15
|
-
var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat("var(--ds-border-selected, ".concat(_colors.B100, ")"), ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
|
|
16
|
-
var isInteractive = function isInteractive(_ref) {
|
|
17
|
-
var isInteractive = _ref.isInteractive;
|
|
18
|
-
if (isInteractive) {
|
|
19
|
-
return "\n :hover {\n background-color: ".concat((0, _components.themed)({
|
|
20
|
-
light: "var(--ds-background-neutral-subtle-hovered, ".concat(_colors.N20, ")"),
|
|
21
|
-
dark: "var(--ds-background-neutral-subtle-hovered, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
22
|
-
}), ";\n }\n :active {\n background-color: ").concat((0, _components.themed)({
|
|
23
|
-
light: "var(--ds-background-selected, ".concat(_colors.B50, ")"),
|
|
24
|
-
dark: "var(--ds-background-selected, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
25
|
-
}), ";\n }\n :focus {\n ").concat(selected, "\n }\n ");
|
|
26
|
-
} else {
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
var isSelected = function isSelected(_ref2) {
|
|
31
|
-
var isSelected = _ref2.isSelected;
|
|
32
|
-
if (isSelected) {
|
|
33
|
-
return selected;
|
|
34
|
-
} else {
|
|
35
|
-
return 'user-select: text';
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/*
|
|
40
|
-
Inline smart cards should have the following layout:
|
|
41
|
-
------------------------------------
|
|
42
|
-
| icon | title | action OR lozenge |
|
|
43
|
-
------------------------------------
|
|
44
|
-
The aim is to ensure (1) all children are
|
|
45
|
-
in line with each other, (2) are vertically
|
|
46
|
-
centered.
|
|
47
|
-
*/
|
|
48
|
-
// NB: `padding` consistent with @mentions.
|
|
49
|
-
// NB: `display: inline` required for `box-decoration-break` to work.
|
|
50
|
-
// NB: `box-decoration-break` required for retaining properties (border-radius) on wrap.
|
|
51
|
-
var baseWrapperStyle = function baseWrapperStyle(props) {
|
|
52
|
-
return "\n line-height: 16px;\n padding: 1px 0.24em 2px 0.24em;\n ".concat(props.withoutBackground ? "padding-left: 0; margin-left:-2px;" : '', "\n display: inline;\n box-decoration-break: clone;\n border-radius: ").concat((0, _constants.borderRadius)(), "px;\n color: ").concat((0, _components.themed)({
|
|
53
|
-
light: "var(--ds-link, ".concat(_colors.B400, ")"),
|
|
54
|
-
dark: "var(--ds-link, #4794FF)"
|
|
55
|
-
})(props), ";\n background-color: ").concat(props.withoutBackground ? '' : (0, _components.themed)({
|
|
56
|
-
light: "var(--ds-surface-raised, white)",
|
|
57
|
-
dark: "var(--ds-surface-raised, ".concat(BACKGROUND_COLOR_DARK, ")")
|
|
58
|
-
})(props), ";\n ").concat(props.withoutBackground ? '' : (0, _components.themed)({
|
|
59
|
-
light: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(_colors.N50A, ", 0 0 1px 1px ").concat(_colors.N40A), ")"), ";"),
|
|
60
|
-
dark: "box-shadow: ".concat("var(--ds-shadow-raised, ".concat("0 1px 1px ".concat(_colors.DN50A, ", 0 0 1px 1px ").concat(_colors.DN40A), ")"), ";")
|
|
61
|
-
})(props), "\n ").concat(isSelected(props), ";\n transition: 0.1s all ease-in-out;\n -moz-user-select: none;\n");
|
|
62
|
-
};
|
|
63
|
-
var WrapperAnchor = exports.WrapperAnchor = _styled.default.a(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n ", "\n ", "\n"])), baseWrapperStyle, isInteractive);
|
|
64
|
-
WrapperAnchor.displayName = 'WrapperAnchor';
|
|
65
|
-
var WrapperSpan = exports.WrapperSpan = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), baseWrapperStyle);
|
|
66
|
-
WrapperSpan.displayName = 'WrapperSpan';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.Shimmer = exports.Icon = exports.AKIconWrapper = void 0;
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
10
|
-
var _linkingCommon = require("@atlaskit/linking-common");
|
|
11
|
-
var _react = _interopRequireDefault(require("react"));
|
|
12
|
-
var _templateObject, _templateObject2;
|
|
13
|
-
// TODO: Figure out a more scalable/responsive solution
|
|
14
|
-
// for vertical alignment.
|
|
15
|
-
// Current rationale: vertically positioned at the top of
|
|
16
|
-
// the smart card container (when set to 0). Offset this
|
|
17
|
-
// to position it with appropriate whitespace from the top.
|
|
18
|
-
var Icon = exports.Icon = _styled.default.img(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n height: 14px;\n width: 14px;\n margin-right: ", ";\n border-radius: 2px;\n user-select: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n"])), "var(--ds-space-050, 4px)");
|
|
19
|
-
|
|
20
|
-
// Used for 'untrue' icons which claim to be 16x16 but
|
|
21
|
-
// are less than that in height/width.
|
|
22
|
-
// TODO: Replace this override with proper AtlasKit solution.
|
|
23
|
-
var AKIconWrapper = exports.AKIconWrapper = _styled.default.span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n"])), "var(--ds-space-negative-025, -2px)");
|
|
24
|
-
var Shimmer = exports.Shimmer = function Shimmer(_ref) {
|
|
25
|
-
var testId = _ref.testId;
|
|
26
|
-
var skeletonCustomStyles = {
|
|
27
|
-
position: 'absolute',
|
|
28
|
-
top: '50%',
|
|
29
|
-
left: '50%',
|
|
30
|
-
transform: 'translate(-50%, -50%)',
|
|
31
|
-
marginRight: "var(--ds-space-050, 4px)"
|
|
32
|
-
};
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement(_linkingCommon.Skeleton, {
|
|
34
|
-
width: 14,
|
|
35
|
-
height: 14,
|
|
36
|
-
borderRadius: 2,
|
|
37
|
-
testId: testId,
|
|
38
|
-
style: skeletonCustomStyles
|
|
39
|
-
});
|
|
40
|
-
};
|