@atlaskit/help 7.1.23 → 7.1.25
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 +12 -0
- package/dist/cjs/analytics.js +0 -6
- package/dist/cjs/assets/ErrorImage.js +0 -4
- package/dist/cjs/assets/NotFoundImage.js +0 -4
- package/dist/cjs/assets/SomethingWrongImage.js +0 -4
- package/dist/cjs/assets/WhatsNewIcoExperiment.js +0 -4
- package/dist/cjs/assets/WhatsNewIconFix.js +0 -4
- package/dist/cjs/assets/WhatsNewIconImprovement.js +0 -4
- package/dist/cjs/assets/WhatsNewIconNew.js +0 -4
- package/dist/cjs/assets/WhatsNewIconRemoved.js +0 -4
- package/dist/cjs/components/Article/ArticleContent/index.js +2 -16
- package/dist/cjs/components/Article/ArticleLoadingFail/index.js +2 -20
- package/dist/cjs/components/Article/ArticleLoadingFail/styled.js +0 -9
- package/dist/cjs/components/Article/HelpArticle/Loading/index.js +0 -9
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +4 -21
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +4 -21
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +27 -81
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/styled.js +1 -18
- package/dist/cjs/components/Article/HelpArticle/index.js +9 -39
- package/dist/cjs/components/Article/WhatsNewArticle/Loading/index.js +0 -10
- package/dist/cjs/components/Article/WhatsNewArticle/index.js +2 -28
- package/dist/cjs/components/Article/WhatsNewArticle/styled.js +3 -26
- package/dist/cjs/components/Article/index.js +16 -46
- package/dist/cjs/components/Article/styled.js +1 -10
- package/dist/cjs/components/ArticlesList/ArticlesList.js +9 -22
- package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +8 -32
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +8 -31
- package/dist/cjs/components/ArticlesList/index.js +8 -28
- package/dist/cjs/components/ArticlesList/styled.js +0 -12
- package/dist/cjs/components/Help.js +5 -36
- package/dist/cjs/components/HelpContent.js +14 -47
- package/dist/cjs/components/HelpContentButton/index.js +10 -28
- package/dist/cjs/components/HelpContentButton/styled.js +1 -22
- package/dist/cjs/components/RelatedArticles/RelatedArticlesLoading.js +0 -9
- package/dist/cjs/components/RelatedArticles/index.js +17 -57
- package/dist/cjs/components/RelatedArticles/styled.js +1 -24
- package/dist/cjs/components/Search/SearchInput/index.js +6 -40
- package/dist/cjs/components/Search/SearchInput/styled.js +0 -11
- package/dist/cjs/components/Search/SearchResults/SearchExternalSite.js +5 -27
- package/dist/cjs/components/Search/SearchResults/SearchResults.js +2 -7
- package/dist/cjs/components/Search/SearchResults/SearchResultsEmpty.js +5 -28
- package/dist/cjs/components/Search/SearchResults/SearchResultsError.js +1 -12
- package/dist/cjs/components/Search/SearchResults/index.js +9 -33
- package/dist/cjs/components/Search/SearchResults/styled.js +3 -24
- package/dist/cjs/components/ShowMoreButton/index.js +7 -18
- package/dist/cjs/components/WhatsNew/WhatsNewButton/index.js +5 -32
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/index.js +2 -16
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +1 -16
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/index.js +1 -12
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +1 -16
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +6 -27
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +6 -25
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +8 -30
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/index.js +8 -25
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +1 -23
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/index.js +0 -12
- package/dist/cjs/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +0 -9
- package/dist/cjs/components/WhatsNew/WhatsNewResults/index.js +9 -49
- package/dist/cjs/components/WhatsNew/WhatsNewResults/styled.js +1 -16
- package/dist/cjs/components/constants.js +0 -4
- package/dist/cjs/components/contexts/headerContext.js +5 -13
- package/dist/cjs/components/contexts/helpArticleContext.js +8 -18
- package/dist/cjs/components/contexts/homeContext.js +5 -13
- package/dist/cjs/components/contexts/navigationContext.js +48 -132
- package/dist/cjs/components/contexts/relatedArticlesContext.js +8 -16
- package/dist/cjs/components/contexts/searchContext.js +23 -57
- package/dist/cjs/components/contexts/whatsNewArticleContext.js +26 -58
- package/dist/cjs/components/styled.js +0 -11
- package/dist/cjs/i18n/index.js +0 -25
- package/dist/cjs/index.js +0 -9
- package/dist/cjs/messages.js +0 -2
- package/dist/cjs/model/Article.js +0 -1
- package/dist/cjs/model/Help.js +0 -3
- package/dist/cjs/model/Requests.js +0 -1
- package/dist/cjs/model/WhatsNew.js +0 -1
- package/dist/cjs/util/hooks/cancellablePromise.js +2 -7
- package/dist/cjs/util/hooks/ctx.js +0 -6
- package/dist/cjs/util/hooks/previous.js +3 -4
- package/dist/cjs/util/i18n-util.js +1 -7
- package/dist/cjs/util/index.js +0 -21
- package/dist/cjs/util/styled.js +11 -38
- package/dist/cjs/util/testing/mock.js +2 -18
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/Article/ArticleContent/index.js +0 -4
- package/dist/es2019/components/Article/ArticleLoadingFail/index.js +0 -4
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +0 -4
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +0 -4
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/index.js +3 -19
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -2
- package/dist/es2019/components/Article/HelpArticle/index.js +0 -10
- package/dist/es2019/components/Article/WhatsNewArticle/index.js +0 -4
- package/dist/es2019/components/Article/WhatsNewArticle/styled.js +3 -4
- package/dist/es2019/components/Article/index.js +2 -7
- package/dist/es2019/components/Article/styled.js +2 -2
- package/dist/es2019/components/ArticlesList/ArticlesList.js +1 -6
- package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +2 -8
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +8 -9
- package/dist/es2019/components/ArticlesList/index.js +0 -9
- package/dist/es2019/components/ArticlesList/styled.js +1 -0
- package/dist/es2019/components/Help.js +0 -3
- package/dist/es2019/components/HelpContent.js +0 -3
- package/dist/es2019/components/HelpContentButton/index.js +0 -2
- package/dist/es2019/components/HelpContentButton/styled.js +6 -6
- package/dist/es2019/components/RelatedArticles/RelatedArticlesLoading.js +0 -2
- package/dist/es2019/components/RelatedArticles/index.js +0 -4
- package/dist/es2019/components/RelatedArticles/styled.js +3 -5
- package/dist/es2019/components/Search/SearchInput/index.js +0 -8
- package/dist/es2019/components/Search/SearchResults/SearchExternalSite.js +2 -5
- package/dist/es2019/components/Search/SearchResults/SearchResultsEmpty.js +2 -5
- package/dist/es2019/components/Search/SearchResults/index.js +2 -1
- package/dist/es2019/components/Search/SearchResults/styled.js +3 -4
- package/dist/es2019/components/WhatsNew/WhatsNewButton/index.js +1 -5
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/index.js +0 -2
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +1 -2
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +1 -2
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +0 -5
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +6 -7
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +1 -6
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/index.js +0 -5
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +2 -2
- package/dist/es2019/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +1 -1
- package/dist/es2019/components/WhatsNew/WhatsNewResults/index.js +2 -7
- package/dist/es2019/components/WhatsNew/WhatsNewResults/styled.js +1 -2
- package/dist/es2019/components/constants.js +2 -3
- package/dist/es2019/components/contexts/navigationContext.js +19 -44
- package/dist/es2019/components/contexts/searchContext.js +0 -6
- package/dist/es2019/components/contexts/whatsNewArticleContext.js +2 -4
- package/dist/es2019/components/styled.js +1 -0
- package/dist/es2019/model/Article.js +0 -1
- package/dist/es2019/model/Help.js +0 -1
- package/dist/es2019/model/Requests.js +0 -1
- package/dist/es2019/model/WhatsNew.js +0 -1
- package/dist/es2019/util/hooks/cancellablePromise.js +2 -6
- package/dist/es2019/util/hooks/ctx.js +0 -4
- package/dist/es2019/util/hooks/previous.js +5 -3
- package/dist/es2019/util/i18n-util.js +1 -4
- package/dist/es2019/util/index.js +0 -9
- package/dist/es2019/util/styled.js +19 -21
- package/dist/es2019/util/testing/mock.js +2 -5
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/Article/ArticleContent/index.js +2 -7
- package/dist/esm/components/Article/ArticleLoadingFail/index.js +2 -7
- package/dist/esm/components/Article/ArticleLoadingFail/styled.js +0 -2
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulNoButton.js +4 -10
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/WasHelpfulYesButton.js +4 -10
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/index.js +28 -54
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/styled.js +2 -4
- package/dist/esm/components/Article/HelpArticle/index.js +9 -23
- package/dist/esm/components/Article/WhatsNewArticle/index.js +2 -7
- package/dist/esm/components/Article/WhatsNewArticle/styled.js +3 -6
- package/dist/esm/components/Article/index.js +16 -31
- package/dist/esm/components/Article/styled.js +2 -4
- package/dist/esm/components/ArticlesList/ArticlesList.js +9 -14
- package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +8 -16
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +8 -11
- package/dist/esm/components/ArticlesList/index.js +8 -18
- package/dist/esm/components/ArticlesList/styled.js +1 -2
- package/dist/esm/components/Help.js +5 -16
- package/dist/esm/components/HelpContent.js +14 -24
- package/dist/esm/components/HelpContentButton/index.js +10 -14
- package/dist/esm/components/HelpContentButton/styled.js +2 -4
- package/dist/esm/components/RelatedArticles/RelatedArticlesLoading.js +0 -2
- package/dist/esm/components/RelatedArticles/index.js +17 -33
- package/dist/esm/components/RelatedArticles/styled.js +3 -7
- package/dist/esm/components/Search/SearchInput/index.js +6 -18
- package/dist/esm/components/Search/SearchInput/styled.js +0 -2
- package/dist/esm/components/Search/SearchResults/SearchExternalSite.js +5 -10
- package/dist/esm/components/Search/SearchResults/SearchResults.js +2 -2
- package/dist/esm/components/Search/SearchResults/SearchResultsEmpty.js +5 -10
- package/dist/esm/components/Search/SearchResults/SearchResultsError.js +1 -1
- package/dist/esm/components/Search/SearchResults/index.js +9 -14
- package/dist/esm/components/Search/SearchResults/styled.js +3 -6
- package/dist/esm/components/ShowMoreButton/index.js +7 -7
- package/dist/esm/components/WhatsNew/WhatsNewButton/index.js +5 -12
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/index.js +2 -5
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsEmpty/styled.js +1 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/index.js +1 -1
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsError/styled.js +1 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/index.js +6 -14
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultItem/styled.js +6 -9
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/WhatsNewResultsList.js +8 -15
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/index.js +8 -14
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsList/styled.js +2 -4
- package/dist/esm/components/WhatsNew/WhatsNewResults/WhatsNewResultsLoading/styled.js +1 -3
- package/dist/esm/components/WhatsNew/WhatsNewResults/index.js +9 -23
- package/dist/esm/components/WhatsNew/WhatsNewResults/styled.js +1 -4
- package/dist/esm/components/constants.js +2 -3
- package/dist/esm/components/contexts/headerContext.js +5 -7
- package/dist/esm/components/contexts/helpArticleContext.js +8 -10
- package/dist/esm/components/contexts/homeContext.js +5 -7
- package/dist/esm/components/contexts/navigationContext.js +48 -112
- package/dist/esm/components/contexts/relatedArticlesContext.js +8 -10
- package/dist/esm/components/contexts/searchContext.js +23 -43
- package/dist/esm/components/contexts/whatsNewArticleContext.js +26 -44
- package/dist/esm/components/styled.js +1 -2
- package/dist/esm/model/Article.js +0 -1
- package/dist/esm/model/Help.js +0 -1
- package/dist/esm/model/Requests.js +0 -1
- package/dist/esm/model/WhatsNew.js +0 -1
- package/dist/esm/util/hooks/cancellablePromise.js +2 -4
- package/dist/esm/util/hooks/ctx.js +0 -4
- package/dist/esm/util/hooks/previous.js +5 -3
- package/dist/esm/util/i18n-util.js +1 -4
- package/dist/esm/util/index.js +0 -9
- package/dist/esm/util/styled.js +13 -18
- package/dist/esm/util/testing/mock.js +2 -5
- package/dist/esm/version.json +1 -1
- package/package.json +2 -2
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
3
3
|
import { N30 } from '@atlaskit/theme/colors';
|
|
4
|
-
import { token } from '@atlaskit/tokens';
|
|
5
4
|
import AnimateHeight from 'react-animate-height';
|
|
6
5
|
import ArticlesListItem from './ArticlesListItem';
|
|
7
6
|
import { MIN_ITEMS_TO_DISPLAY, ANIMATE_HEIGHT_TRANSITION_DURATION_MS } from './constants';
|
|
8
|
-
|
|
9
7
|
const getStyles = style => {
|
|
10
8
|
if (style === 'secondary') {
|
|
11
9
|
return {
|
|
12
|
-
border: `2px solid ${
|
|
10
|
+
border: `2px solid ${`var(--ds-border, ${N30})`}`,
|
|
13
11
|
padding: `${gridSize() * 2}px`,
|
|
14
12
|
marginBottom: `${gridSize() * 1.5}px`
|
|
15
13
|
};
|
|
16
14
|
}
|
|
17
|
-
|
|
18
15
|
return {
|
|
19
16
|
border: 0,
|
|
20
17
|
padding: `${gridSize()}px`,
|
|
21
18
|
marginBottom: 0
|
|
22
19
|
};
|
|
23
20
|
};
|
|
24
|
-
|
|
25
21
|
const articlesList = ({
|
|
26
22
|
style = 'primary',
|
|
27
23
|
articles = [],
|
|
@@ -59,5 +55,4 @@ const articlesList = ({
|
|
|
59
55
|
key: article.id,
|
|
60
56
|
href: article.href
|
|
61
57
|
}))));
|
|
62
|
-
|
|
63
58
|
export default articlesList;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import * as colors from '@atlaskit/theme/colors';
|
|
3
3
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
4
|
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { injectIntl } from 'react-intl-next';
|
|
7
6
|
import { name as packageName, version as packageVersion } from '../../../version.json';
|
|
8
7
|
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon } from './styled';
|
|
@@ -21,10 +20,8 @@ export const ArticlesListItem = ({
|
|
|
21
20
|
const {
|
|
22
21
|
createAnalyticsEvent
|
|
23
22
|
} = useAnalyticsEvents();
|
|
24
|
-
|
|
25
23
|
const handleOnClick = event => {
|
|
26
24
|
event.preventDefault();
|
|
27
|
-
|
|
28
25
|
if (onClick) {
|
|
29
26
|
const analyticsEvent = createAnalyticsEvent({
|
|
30
27
|
action: 'clicked'
|
|
@@ -32,7 +29,6 @@ export const ArticlesListItem = ({
|
|
|
32
29
|
onClick(event, analyticsEvent);
|
|
33
30
|
}
|
|
34
31
|
};
|
|
35
|
-
|
|
36
32
|
return /*#__PURE__*/React.createElement(ArticlesListItemWrapper, {
|
|
37
33
|
styles: styles,
|
|
38
34
|
"aria-disabled": "false",
|
|
@@ -42,15 +38,13 @@ export const ArticlesListItem = ({
|
|
|
42
38
|
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title, href && /*#__PURE__*/React.createElement(ArticlesListItemLinkIcon, null, /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
43
39
|
size: "small",
|
|
44
40
|
label: "",
|
|
45
|
-
primaryColor:
|
|
46
|
-
secondaryColor:
|
|
41
|
+
primaryColor: `var(--ds-icon-subtle, ${colors.N90})`,
|
|
42
|
+
secondaryColor: `var(--ds-icon-subtle, ${colors.N90})`
|
|
47
43
|
})))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, description));
|
|
48
44
|
};
|
|
49
|
-
|
|
50
45
|
const ArticlesListItemWithContext = props => {
|
|
51
46
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
52
47
|
data: ANALYTICS_CONTEXT_DATA
|
|
53
48
|
}, /*#__PURE__*/React.createElement(ArticlesListItem, props));
|
|
54
49
|
};
|
|
55
|
-
|
|
56
50
|
export default injectIntl(ArticlesListItemWithContext);
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { fontSize, gridSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
export const ArticlesListItemWrapper = styled.a({
|
|
7
6
|
position: `relative`,
|
|
8
7
|
boxSizing: `border-box`,
|
|
@@ -10,22 +9,22 @@ export const ArticlesListItemWrapper = styled.a({
|
|
|
10
9
|
display: `block`,
|
|
11
10
|
textDecoration: `none`,
|
|
12
11
|
cursor: `pointer`,
|
|
13
|
-
color: `${
|
|
12
|
+
color: `${`var(--ds-text-subtlest, ${colors.N200})`}`,
|
|
14
13
|
borderRadius: `3px`,
|
|
15
|
-
backgroundColor: `${
|
|
14
|
+
backgroundColor: `${"var(--ds-background-neutral-subtle, transparent)"}`,
|
|
16
15
|
'&:hover, &:focus, &:visited, &:active': {
|
|
17
16
|
textDecoration: `none`,
|
|
18
17
|
outline: `none`,
|
|
19
18
|
outlineOffset: `none`
|
|
20
19
|
},
|
|
21
20
|
'&:focus': {
|
|
22
|
-
boxShadow: `${
|
|
21
|
+
boxShadow: `${`var(--ds-border-focused, ${colors.B100})`} 0px 0px 0px 2px inset`
|
|
23
22
|
},
|
|
24
23
|
'&:hover': {
|
|
25
|
-
backgroundColor: `${
|
|
24
|
+
backgroundColor: `${`var(--ds-background-neutral-subtle-hovered, ${colors.N30})`}`
|
|
26
25
|
},
|
|
27
26
|
'&:active': {
|
|
28
|
-
backgroundColor: `${
|
|
27
|
+
backgroundColor: `${`var(--ds-background-neutral-subtle-pressed, ${colors.B50})`}`
|
|
29
28
|
}
|
|
30
29
|
}, props => props.styles);
|
|
31
30
|
export const ArticlesListItemContainer = styled.div`
|
|
@@ -36,7 +35,7 @@ export const ArticlesListItemTypeTitle = styled.div`
|
|
|
36
35
|
font-weight: bold;
|
|
37
36
|
font-size: 11px;
|
|
38
37
|
line-height: ${gridSize() * 2}px;
|
|
39
|
-
color: ${
|
|
38
|
+
color: ${`var(--ds-text-subtlest, ${colors.N200})`};
|
|
40
39
|
padding-bottom: ${gridSize() / 2}px;
|
|
41
40
|
`;
|
|
42
41
|
export const ArticlesListItemLinkIcon = styled.span`
|
|
@@ -46,7 +45,7 @@ export const ArticlesListItemLinkIcon = styled.span`
|
|
|
46
45
|
`;
|
|
47
46
|
export const ArticlesListItemTitleText = styled.span`
|
|
48
47
|
text-decoration: none;
|
|
49
|
-
color: ${
|
|
48
|
+
color: ${`var(--ds-text, ${colors.N800})`};
|
|
50
49
|
font-size: ${fontSize()}px;
|
|
51
50
|
font-weight: 600;
|
|
52
51
|
display: inline-block;
|
|
@@ -58,6 +57,6 @@ export const ArticlesListItemTitleText = styled.span`
|
|
|
58
57
|
export const ArticlesListItemDescription = styled.p`
|
|
59
58
|
display: block;
|
|
60
59
|
line-height: ${gridSize() * 2.5}px;
|
|
61
|
-
color: ${
|
|
60
|
+
color: ${`var(--ds-text-subtle, ${colors.N400})`};
|
|
62
61
|
margin: 0;
|
|
63
62
|
`;
|
|
@@ -3,7 +3,6 @@ import ArticlesList from './ArticlesList';
|
|
|
3
3
|
import ShowMoreButton from '../ShowMoreButton';
|
|
4
4
|
import { ArticlesListContainer } from './styled';
|
|
5
5
|
import { MIN_ITEMS_TO_DISPLAY } from './constants';
|
|
6
|
-
|
|
7
6
|
const ArticleList = ({
|
|
8
7
|
style,
|
|
9
8
|
articles,
|
|
@@ -13,31 +12,24 @@ const ArticleList = ({
|
|
|
13
12
|
onToggleArticlesList
|
|
14
13
|
}) => {
|
|
15
14
|
const [showMoreToggled, setShowMoreToggled] = useState(true);
|
|
16
|
-
|
|
17
15
|
const getMinItemsToDisplay = () => {
|
|
18
16
|
return minItemsToDisplay ? minItemsToDisplay : MIN_ITEMS_TO_DISPLAY;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
18
|
const getMaxItemsToDisplay = () => {
|
|
22
19
|
if (articles) {
|
|
23
20
|
return maxItemsToDisplay ? maxItemsToDisplay : articles.length;
|
|
24
21
|
}
|
|
25
|
-
|
|
26
22
|
return 0;
|
|
27
23
|
};
|
|
28
|
-
|
|
29
24
|
const getNumberOfArticlesToDisplay = showMoreToggeled => {
|
|
30
25
|
return showMoreToggeled ? getMinItemsToDisplay() : getMaxItemsToDisplay();
|
|
31
26
|
};
|
|
32
|
-
|
|
33
27
|
const toggleArticlesList = (event, analyticsEvent) => {
|
|
34
28
|
setShowMoreToggled(!showMoreToggled);
|
|
35
|
-
|
|
36
29
|
if (onToggleArticlesList) {
|
|
37
30
|
onToggleArticlesList(event, analyticsEvent, !showMoreToggled);
|
|
38
31
|
}
|
|
39
32
|
};
|
|
40
|
-
|
|
41
33
|
return articles && articles.length > 0 ? /*#__PURE__*/React.createElement(ArticlesListContainer, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ArticlesList, {
|
|
42
34
|
style: style,
|
|
43
35
|
onArticlesListItemClick: onArticlesListItemClick,
|
|
@@ -51,5 +43,4 @@ const ArticleList = ({
|
|
|
51
43
|
itemsType: "articles"
|
|
52
44
|
}))) : null;
|
|
53
45
|
};
|
|
54
|
-
|
|
55
46
|
export default ArticleList;
|
|
@@ -11,7 +11,6 @@ import { RelatedArticlesContextProvider } from './contexts/relatedArticlesContex
|
|
|
11
11
|
import { SearchContextProvider } from './contexts/searchContext';
|
|
12
12
|
import { WhatsNewArticleProvider } from './contexts/whatsNewArticleContext';
|
|
13
13
|
import HelpContent from './HelpContent';
|
|
14
|
-
|
|
15
14
|
const LocaleIntlProvider = ({
|
|
16
15
|
locale = 'en',
|
|
17
16
|
children
|
|
@@ -19,7 +18,6 @@ const LocaleIntlProvider = ({
|
|
|
19
18
|
key: locale,
|
|
20
19
|
locale: locale
|
|
21
20
|
}, children);
|
|
22
|
-
|
|
23
21
|
export class Help extends React.PureComponent {
|
|
24
22
|
render() {
|
|
25
23
|
const {
|
|
@@ -33,6 +31,5 @@ export class Help extends React.PureComponent {
|
|
|
33
31
|
footer: footer
|
|
34
32
|
})))))))));
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
}
|
|
38
35
|
export default withAnalyticsContext(defaultAnalyticsAttributes)(withAnalyticsEvents()(Help));
|
|
@@ -43,14 +43,12 @@ export const HelpContent = ({
|
|
|
43
43
|
if (onBackButtonClick) {
|
|
44
44
|
onBackButtonClick(event, analyticsEvent);
|
|
45
45
|
}
|
|
46
|
-
|
|
47
46
|
if (navigateBack) {
|
|
48
47
|
navigateBack();
|
|
49
48
|
}
|
|
50
49
|
}, [navigateBack, onBackButtonClick]);
|
|
51
50
|
useEffect(() => {
|
|
52
51
|
let handler;
|
|
53
|
-
|
|
54
52
|
if (isOverlayVisible) {
|
|
55
53
|
handler = setTimeout(() => {
|
|
56
54
|
setIsOverlayFullyVisible(isOverlayVisible);
|
|
@@ -58,7 +56,6 @@ export const HelpContent = ({
|
|
|
58
56
|
} else {
|
|
59
57
|
setIsOverlayFullyVisible(isOverlayVisible);
|
|
60
58
|
}
|
|
61
|
-
|
|
62
59
|
return () => {
|
|
63
60
|
if (handler) {
|
|
64
61
|
clearTimeout(handler);
|
|
@@ -10,7 +10,6 @@ const analitycsContextData = {
|
|
|
10
10
|
packageName,
|
|
11
11
|
packageVersion
|
|
12
12
|
};
|
|
13
|
-
|
|
14
13
|
const HelpContentButton = ({
|
|
15
14
|
id = '',
|
|
16
15
|
href,
|
|
@@ -54,5 +53,4 @@ const HelpContentButton = ({
|
|
|
54
53
|
position: "left"
|
|
55
54
|
}, buttonContent) : /*#__PURE__*/React.createElement(React.Fragment, null, buttonContent)));
|
|
56
55
|
};
|
|
57
|
-
|
|
58
56
|
export default HelpContentButton;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import styled from 'styled-components';
|
|
3
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
5
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
6
|
export const HelpContentButtonContainer = styled.a`
|
|
7
7
|
display: block;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
width: calc(100% - ${gridSize() * 2}px);
|
|
10
|
-
color: ${
|
|
10
|
+
color: ${`var(--ds-text-subtle, ${colors.N600})`};
|
|
11
11
|
padding: ${gridSize}px;
|
|
12
12
|
border-radius: 3px;
|
|
13
13
|
|
|
@@ -18,19 +18,19 @@ export const HelpContentButtonContainer = styled.a`
|
|
|
18
18
|
text-decoration: none;
|
|
19
19
|
outline: none;
|
|
20
20
|
outline-offset: none;
|
|
21
|
-
color: ${
|
|
21
|
+
color: ${`var(--ds-text-subtle, ${colors.N600})`};
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
&:focus {
|
|
25
|
-
box-shadow: ${
|
|
25
|
+
box-shadow: ${`var(--ds-border-focused, ${colors.B100})`} 0 0 0 2px inset;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
&:hover {
|
|
29
|
-
background-color: ${
|
|
29
|
+
background-color: ${`var(--ds-background-neutral-subtle-hovered, ${colors.N30})`};
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
&:active {
|
|
33
|
-
background-color: ${
|
|
33
|
+
background-color: ${`var(--ds-background-neutral-subtle-pressed, ${colors.B50})`};
|
|
34
34
|
}
|
|
35
35
|
`;
|
|
36
36
|
export const HelpContentButtonIcon = styled.div`
|
|
@@ -3,7 +3,6 @@ import { injectIntl } from 'react-intl-next';
|
|
|
3
3
|
import { messages } from '../../messages';
|
|
4
4
|
import { DividerLine, LoadingRectangle } from '../../util/styled';
|
|
5
5
|
import { LoadignRelatedArticleList, LoadignRelatedArticleListItem } from './styled';
|
|
6
|
-
|
|
7
6
|
const RelatedArticlesLoading = ({
|
|
8
7
|
intl: {
|
|
9
8
|
formatMessage
|
|
@@ -62,5 +61,4 @@ const RelatedArticlesLoading = ({
|
|
|
62
61
|
marginTop: "4px"
|
|
63
62
|
})), /*#__PURE__*/React.createElement(DividerLine, null)));
|
|
64
63
|
};
|
|
65
|
-
|
|
66
64
|
export default injectIntl(RelatedArticlesLoading);
|
|
@@ -30,19 +30,16 @@ export const RelatedArticles = ({
|
|
|
30
30
|
const [hasError, setHasError] = useState(false);
|
|
31
31
|
const prevRouteGroup = usePrevious(routeGroup);
|
|
32
32
|
const prevRouteName = usePrevious(routeName);
|
|
33
|
-
|
|
34
33
|
const handleOnRelatedArticlesShowMoreClick = (event, analyticsEvent, isCollapsed) => {
|
|
35
34
|
analyticsEvent.payload.attributes = {
|
|
36
35
|
componentName: 'RelatedArticles',
|
|
37
36
|
packageName,
|
|
38
37
|
packageVersion
|
|
39
38
|
};
|
|
40
|
-
|
|
41
39
|
if (onRelatedArticlesShowMoreClick) {
|
|
42
40
|
onRelatedArticlesShowMoreClick(event, analyticsEvent, isCollapsed);
|
|
43
41
|
}
|
|
44
42
|
};
|
|
45
|
-
|
|
46
43
|
const updateRelatedArticles = useCallback(async () => {
|
|
47
44
|
if (onGetRelatedArticles) {
|
|
48
45
|
try {
|
|
@@ -63,7 +60,6 @@ export const RelatedArticles = ({
|
|
|
63
60
|
updateRelatedArticles();
|
|
64
61
|
}
|
|
65
62
|
}, [prevRouteGroup, prevRouteName, routeGroup, routeName, updateRelatedArticles]);
|
|
66
|
-
|
|
67
63
|
if (hasError) {
|
|
68
64
|
return /*#__PURE__*/React.createElement(SectionMessage, {
|
|
69
65
|
appearance: "warning"
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
+
|
|
2
3
|
import { css } from '@emotion/core';
|
|
3
4
|
import styled from '@emotion/styled';
|
|
4
5
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
6
|
import { gridSize, fontSize } from '@atlaskit/theme/constants';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
|
-
|
|
8
7
|
const baseHeading = (size, lineHeight) => `
|
|
9
8
|
font-size: ${size / fontSize()}em;
|
|
10
9
|
font-style: inherit;
|
|
11
10
|
line-height: ${lineHeight / size};
|
|
12
11
|
`;
|
|
13
|
-
|
|
14
12
|
export const truncate = (width = '100%') => css`
|
|
15
13
|
overflow-x: hidden;
|
|
16
14
|
text-overflow: ellipsis;
|
|
@@ -19,15 +17,15 @@ export const truncate = (width = '100%') => css`
|
|
|
19
17
|
`;
|
|
20
18
|
export const RelatedArticlesTitle = styled.div`
|
|
21
19
|
${baseHeading(16, 20)}
|
|
22
|
-
color: ${
|
|
20
|
+
color: ${`var(--ds-text, ${colors.N800})`};
|
|
23
21
|
font-weight: 600;
|
|
24
22
|
letter-spacing: -0.006em;
|
|
25
23
|
padding: ${gridSize() * 2}px 0;
|
|
26
24
|
`;
|
|
25
|
+
|
|
27
26
|
/**
|
|
28
27
|
* Loading styled-components
|
|
29
28
|
*/
|
|
30
|
-
|
|
31
29
|
export const LoadignRelatedArticleSection = styled.div`
|
|
32
30
|
margin-top: ${gridSize()}px;
|
|
33
31
|
`;
|
|
@@ -37,7 +37,6 @@ export const SearchInput = ({
|
|
|
37
37
|
if (onSearch) {
|
|
38
38
|
const value = event.target.value;
|
|
39
39
|
onSearch(value);
|
|
40
|
-
|
|
41
40
|
if (onSearchInputChanged) {
|
|
42
41
|
const analyticsEvent = createAnalyticsEvent({
|
|
43
42
|
action: 'inputChanged',
|
|
@@ -49,20 +48,17 @@ export const SearchInput = ({
|
|
|
49
48
|
}
|
|
50
49
|
}
|
|
51
50
|
}, [createAnalyticsEvent, onSearch, onSearchInputChanged]);
|
|
52
|
-
|
|
53
51
|
const handleOnKeyPress = event => {
|
|
54
52
|
if (event.key === 'Enter') {
|
|
55
53
|
handleOnInputChange(event);
|
|
56
54
|
}
|
|
57
55
|
};
|
|
58
|
-
|
|
59
56
|
const handleOnClearButtonClick = useCallback(event => {
|
|
60
57
|
if (onSearch) {
|
|
61
58
|
if (inputRef && inputRef.current) {
|
|
62
59
|
inputRef.current.value = '';
|
|
63
60
|
onSearch('');
|
|
64
61
|
}
|
|
65
|
-
|
|
66
62
|
if (onSearchInputCleared) {
|
|
67
63
|
const analyticsEvent = createAnalyticsEvent({
|
|
68
64
|
action: 'clicked'
|
|
@@ -71,11 +67,9 @@ export const SearchInput = ({
|
|
|
71
67
|
}
|
|
72
68
|
}
|
|
73
69
|
}, [createAnalyticsEvent, onSearch, onSearchInputCleared]);
|
|
74
|
-
|
|
75
70
|
if (inputRef && inputRef.current) {
|
|
76
71
|
inputRef.current.value = searchValue;
|
|
77
72
|
}
|
|
78
|
-
|
|
79
73
|
return /*#__PURE__*/React.createElement(SearchInputContainer, null, /*#__PURE__*/React.createElement(Textfield, {
|
|
80
74
|
title: "Help articles search input",
|
|
81
75
|
autoComplete: "off",
|
|
@@ -103,11 +97,9 @@ export const SearchInput = ({
|
|
|
103
97
|
value: searchValue
|
|
104
98
|
}));
|
|
105
99
|
};
|
|
106
|
-
|
|
107
100
|
const SearchInputWithContext = props => {
|
|
108
101
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
109
102
|
data: ANALYTICS_CONTEXT_DATA
|
|
110
103
|
}, /*#__PURE__*/React.createElement(SearchInput, props));
|
|
111
104
|
};
|
|
112
|
-
|
|
113
105
|
export default injectIntl(SearchInputWithContext);
|
|
@@ -6,7 +6,6 @@ import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { messages } from '../../../messages';
|
|
8
8
|
import { SearchResultSearchExternalSiteContainer } from './styled';
|
|
9
|
-
import { token } from '@atlaskit/tokens';
|
|
10
9
|
export const SearchExternalSite = ({
|
|
11
10
|
searchExternalUrl,
|
|
12
11
|
onSearchExternalUrlClick,
|
|
@@ -17,7 +16,6 @@ export const SearchExternalSite = ({
|
|
|
17
16
|
const {
|
|
18
17
|
createAnalyticsEvent
|
|
19
18
|
} = useAnalyticsEvents();
|
|
20
|
-
|
|
21
19
|
const handleExternalUrlClick = event => {
|
|
22
20
|
if (onSearchExternalUrlClick) {
|
|
23
21
|
const analyticsEvent = createAnalyticsEvent({
|
|
@@ -26,7 +24,6 @@ export const SearchExternalSite = ({
|
|
|
26
24
|
onSearchExternalUrlClick(event, analyticsEvent);
|
|
27
25
|
}
|
|
28
26
|
};
|
|
29
|
-
|
|
30
27
|
return searchExternalUrl ? /*#__PURE__*/React.createElement(SearchResultSearchExternalSiteContainer, null, /*#__PURE__*/React.createElement("p", null, formatMessage(messages.help_search_results_search_external_site), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
31
28
|
data: {
|
|
32
29
|
componentName: 'searchExternalUrl'
|
|
@@ -36,8 +33,8 @@ export const SearchExternalSite = ({
|
|
|
36
33
|
iconAfter: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
37
34
|
size: "small",
|
|
38
35
|
label: "",
|
|
39
|
-
primaryColor:
|
|
40
|
-
secondaryColor:
|
|
36
|
+
primaryColor: `var(--ds-icon-subtle, ${colors.N90})`,
|
|
37
|
+
secondaryColor: `var(--ds-icon-subtle, ${colors.N90})`
|
|
41
38
|
}),
|
|
42
39
|
spacing: "compact",
|
|
43
40
|
href: searchExternalUrl,
|
|
@@ -3,7 +3,6 @@ import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
5
5
|
import ShortcutIcon from '@atlaskit/icon/glyph/shortcut';
|
|
6
|
-
import { token } from '@atlaskit/tokens';
|
|
7
6
|
import { injectIntl } from 'react-intl-next';
|
|
8
7
|
import NotFoundImage from '../../../assets/NotFoundImage';
|
|
9
8
|
import { messages } from '../../../messages';
|
|
@@ -18,7 +17,6 @@ export const SearchResultsEmpty = ({
|
|
|
18
17
|
const {
|
|
19
18
|
createAnalyticsEvent
|
|
20
19
|
} = useAnalyticsEvents();
|
|
21
|
-
|
|
22
20
|
const handleExternalUrlClick = event => {
|
|
23
21
|
if (onSearchExternalUrlClick) {
|
|
24
22
|
const analyticsEvent = createAnalyticsEvent({
|
|
@@ -27,7 +25,6 @@ export const SearchResultsEmpty = ({
|
|
|
27
25
|
onSearchExternalUrlClick(event, analyticsEvent);
|
|
28
26
|
}
|
|
29
27
|
};
|
|
30
|
-
|
|
31
28
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchResultEmptyMessageImage, null, /*#__PURE__*/React.createElement(NotFoundImage, null)), /*#__PURE__*/React.createElement(SearchResultEmptyMessageText, null, /*#__PURE__*/React.createElement("strong", null, formatMessage(messages.help_search_results_no_results))), searchExternalUrl && /*#__PURE__*/React.createElement(SearchResultEmptyMessageText, null, /*#__PURE__*/React.createElement("p", null, formatMessage(messages.help_search_results_no_results_line_two), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
32
29
|
data: {
|
|
33
30
|
componentName: 'searchExternalUrl'
|
|
@@ -37,8 +34,8 @@ export const SearchResultsEmpty = ({
|
|
|
37
34
|
iconAfter: /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
38
35
|
size: "small",
|
|
39
36
|
label: "",
|
|
40
|
-
primaryColor:
|
|
41
|
-
secondaryColor:
|
|
37
|
+
primaryColor: `var(--ds-icon-subtle, ${colors.N90})`,
|
|
38
|
+
secondaryColor: `var(--ds-icon-subtle, ${colors.N90})`
|
|
42
39
|
}),
|
|
43
40
|
spacing: "compact",
|
|
44
41
|
href: searchExternalUrl,
|
|
@@ -58,7 +58,8 @@ export const SearchResults = () => {
|
|
|
58
58
|
in: view === VIEW.SEARCH && isSearchResultVisible,
|
|
59
59
|
timeout: FADEIN_OVERLAY_TRANSITION_DURATION_MS
|
|
60
60
|
}, state => /*#__PURE__*/React.createElement(SearchResultsContainer, {
|
|
61
|
-
style: {
|
|
61
|
+
style: {
|
|
62
|
+
...defaultStyle,
|
|
62
63
|
...transitionStyles[state]
|
|
63
64
|
}
|
|
64
65
|
}, searchState !== REQUEST_STATE.error && searchResult !== null && searchResult.length > 0 && state !== 'exited' && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SearchResultsList, {
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
export const SearchResultsContainer = styled.div`
|
|
7
6
|
position: absolute;
|
|
8
7
|
height: 100%;
|
|
9
8
|
width: 100%;
|
|
10
9
|
top: 0;
|
|
11
|
-
background-color: ${
|
|
10
|
+
background-color: ${"var(--ds-surface, #FFFFFF)"};
|
|
12
11
|
flex: 1;
|
|
13
12
|
flex-direction: column;
|
|
14
13
|
box-sizing: border-box;
|
|
@@ -30,7 +29,7 @@ export const SearchResultEmptyMessageText = styled.div`
|
|
|
30
29
|
text-align: center;
|
|
31
30
|
|
|
32
31
|
p {
|
|
33
|
-
color: ${
|
|
32
|
+
color: ${`var(--ds-text-subtlest, ${colors.N200})`};
|
|
34
33
|
}
|
|
35
34
|
`;
|
|
36
35
|
export const SearchResultSearchExternalSiteContainer = styled.div`
|
|
@@ -38,6 +37,6 @@ export const SearchResultSearchExternalSiteContainer = styled.div`
|
|
|
38
37
|
text-align: center;
|
|
39
38
|
|
|
40
39
|
p {
|
|
41
|
-
color: ${
|
|
40
|
+
color: ${`var(--ds-text-subtlest, ${colors.N200})`};
|
|
42
41
|
}
|
|
43
42
|
`;
|
|
@@ -2,7 +2,6 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import LightbulbIcon from '@atlaskit/icon/glyph/lightbulb';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
import { injectIntl } from 'react-intl-next';
|
|
7
6
|
import { name as packageName, version as packageVersion } from '../../../version.json';
|
|
8
7
|
import { useWhatsNewArticleContext } from '../../contexts/whatsNewArticleContext';
|
|
@@ -32,7 +31,6 @@ export const WhatsNewButton = ({
|
|
|
32
31
|
if (onWhatsNewButtonClick) {
|
|
33
32
|
onWhatsNewButtonClick(event, analytics);
|
|
34
33
|
}
|
|
35
|
-
|
|
36
34
|
openArticle({
|
|
37
35
|
id: '',
|
|
38
36
|
type: ARTICLE_TYPE.WHATS_NEW
|
|
@@ -48,17 +46,15 @@ export const WhatsNewButton = ({
|
|
|
48
46
|
productName
|
|
49
47
|
}) : formatMessage(messages.help_whats_new_button_label_without_product_name),
|
|
50
48
|
icon: /*#__PURE__*/React.createElement(LightbulbIcon, {
|
|
51
|
-
primaryColor:
|
|
49
|
+
primaryColor: `var(--ds-icon-subtle, ${colors.N600})`,
|
|
52
50
|
size: "medium",
|
|
53
51
|
label: ""
|
|
54
52
|
})
|
|
55
53
|
});
|
|
56
54
|
};
|
|
57
|
-
|
|
58
55
|
const WhatsNewButtonWithContext = props => {
|
|
59
56
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
60
57
|
data: ANALYTICS_CONTEXT_DATA
|
|
61
58
|
}, /*#__PURE__*/React.createElement(WhatsNewButton, props));
|
|
62
59
|
};
|
|
63
|
-
|
|
64
60
|
export default injectIntl(WhatsNewButtonWithContext);
|
|
@@ -13,7 +13,6 @@ export const WhatsNewResultsEmpty = ({
|
|
|
13
13
|
const {
|
|
14
14
|
createAnalyticsEvent
|
|
15
15
|
} = useAnalyticsEvents();
|
|
16
|
-
|
|
17
16
|
const handleClearFilterLinkClick = event => {
|
|
18
17
|
event.preventDefault();
|
|
19
18
|
const analyticsEvent = createAnalyticsEvent({
|
|
@@ -22,7 +21,6 @@ export const WhatsNewResultsEmpty = ({
|
|
|
22
21
|
analyticsEvent.fire();
|
|
23
22
|
onClearFilter();
|
|
24
23
|
};
|
|
25
|
-
|
|
26
24
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(WhatsNewResultsEmptyMessageImage, null, /*#__PURE__*/React.createElement(NotFoundImage, null)), /*#__PURE__*/React.createElement(WhatsNewResultsEmptyMessageText, null, /*#__PURE__*/React.createElement("strong", null, formatMessage(messages.help_whats_new_no_results))), /*#__PURE__*/React.createElement(WhatsNewResultsEmptyMessageText, null, /*#__PURE__*/React.createElement("p", null, formatMessage(messages.help_whats_new_no_results_info), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
27
25
|
data: {
|
|
28
26
|
componentName: 'WhatsNewResultsEmpty'
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
export const WhatsNewResultsEmptyMessageImage = styled.div`
|
|
7
6
|
padding: ${3 * gridSize()}px ${3 * gridSize()}px 0 ${3 * gridSize()}px;
|
|
8
7
|
text-align: center;
|
|
@@ -12,6 +11,6 @@ export const WhatsNewResultsEmptyMessageText = styled.div`
|
|
|
12
11
|
text-align: center;
|
|
13
12
|
|
|
14
13
|
p {
|
|
15
|
-
color: ${
|
|
14
|
+
color: ${`var(--ds-text-subtlest, ${colors.N200})`};
|
|
16
15
|
}
|
|
17
16
|
`;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
3
|
import { gridSize } from '@atlaskit/theme/constants';
|
|
4
4
|
import * as colors from '@atlaskit/theme/colors';
|
|
5
|
-
import { token } from '@atlaskit/tokens';
|
|
6
5
|
export const SearchResultEmptyMessageImage = styled.div`
|
|
7
6
|
padding: ${3 * gridSize()}px ${3 * gridSize()}px 0 ${3 * gridSize()}px;
|
|
8
7
|
text-align: center;
|
|
@@ -12,6 +11,6 @@ export const SearchResultEmptyMessageText = styled.div`
|
|
|
12
11
|
text-align: center;
|
|
13
12
|
|
|
14
13
|
p {
|
|
15
|
-
color: ${
|
|
14
|
+
color: ${`var(--ds-text-subtlest, ${colors.N200})`};
|
|
16
15
|
}
|
|
17
16
|
`;
|
|
@@ -24,10 +24,8 @@ export const WhatsNewResultListItem = ({
|
|
|
24
24
|
createAnalyticsEvent
|
|
25
25
|
} = useAnalyticsEvents();
|
|
26
26
|
const typeTitle = type ? formatMessage(getTypeTitle(type)) : '';
|
|
27
|
-
|
|
28
27
|
const handleOnClick = event => {
|
|
29
28
|
event.preventDefault();
|
|
30
|
-
|
|
31
29
|
if (onClick) {
|
|
32
30
|
const analyticsEvent = createAnalyticsEvent({
|
|
33
31
|
action: 'clicked'
|
|
@@ -35,7 +33,6 @@ export const WhatsNewResultListItem = ({
|
|
|
35
33
|
onClick(event, analyticsEvent);
|
|
36
34
|
}
|
|
37
35
|
};
|
|
38
|
-
|
|
39
36
|
return /*#__PURE__*/React.createElement(WhatsNewResultListItemWrapper, {
|
|
40
37
|
styles: styles,
|
|
41
38
|
"aria-disabled": "false",
|
|
@@ -45,11 +42,9 @@ export const WhatsNewResultListItem = ({
|
|
|
45
42
|
type: type
|
|
46
43
|
}, getTypeIcon(type)), /*#__PURE__*/React.createElement(WhatsNewResultListItemTitleText, null, typeTitle)), /*#__PURE__*/React.createElement(WhatsNewResultListItemDescription, null, title));
|
|
47
44
|
};
|
|
48
|
-
|
|
49
45
|
const WhatsNewResultListItemWithContext = props => {
|
|
50
46
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
51
47
|
data: ANALYTICS_CONTEXT_DATA
|
|
52
48
|
}, /*#__PURE__*/React.createElement(WhatsNewResultListItem, props));
|
|
53
49
|
};
|
|
54
|
-
|
|
55
50
|
export default injectIntl(WhatsNewResultListItemWithContext);
|