@atlaskit/help 9.2.0 → 9.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -0
- package/afm-cc/tsconfig.json +2 -4
- package/afm-jira/tsconfig.json +3 -5
- package/afm-products/tsconfig.json +2 -4
- package/dist/cjs/assets/IconWrapper.js +0 -2
- package/dist/cjs/assets/WhatsNewIcoExperiment.js +0 -2
- package/dist/cjs/assets/WhatsNewIconFix.js +0 -2
- package/dist/cjs/assets/WhatsNewIconImprovement.js +0 -2
- package/dist/cjs/assets/WhatsNewIconNew.js +0 -2
- package/dist/cjs/assets/WhatsNewIconRemoved.js +0 -2
- package/dist/cjs/components/Article/HelpArticle/WasHelpfulForm/index.js +5 -3
- package/dist/cjs/components/Article/WhatsNewArticle/index.js +3 -3
- package/dist/cjs/components/Article/WhatsNewArticle/styled.compiled.css +4 -13
- package/dist/cjs/components/Article/WhatsNewArticle/styled.js +8 -17
- package/dist/cjs/components/Article/index.compiled.css +4 -1
- package/dist/cjs/components/Article/index.js +7 -2
- package/dist/cjs/components/ArticlesList/ArticlesList.js +6 -2
- package/dist/cjs/components/ArticlesList/ArticlesListItem/index.js +23 -11
- package/dist/cjs/components/ArticlesList/ArticlesListItem/styled.js +6 -3
- package/dist/cjs/components/ArticlesList/index.js +22 -1
- package/dist/cjs/components/HelpContentButton/index.js +3 -3
- package/dist/cjs/components/Search/SearchInput/index.js +5 -3
- package/dist/cjs/components/Search/SearchResults/SearchExternalSite.js +2 -2
- package/dist/cjs/components/Search/SearchResults/SearchResultsEmpty.js +2 -2
- package/dist/es2019/assets/IconWrapper.js +0 -2
- package/dist/es2019/assets/WhatsNewIcoExperiment.js +0 -2
- package/dist/es2019/assets/WhatsNewIconFix.js +0 -2
- package/dist/es2019/assets/WhatsNewIconImprovement.js +0 -2
- package/dist/es2019/assets/WhatsNewIconNew.js +0 -2
- package/dist/es2019/assets/WhatsNewIconRemoved.js +0 -2
- package/dist/es2019/components/Article/HelpArticle/WasHelpfulForm/index.js +4 -2
- package/dist/es2019/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/es2019/components/Article/WhatsNewArticle/styled.compiled.css +4 -12
- package/dist/es2019/components/Article/WhatsNewArticle/styled.js +8 -12
- package/dist/es2019/components/Article/index.compiled.css +4 -1
- package/dist/es2019/components/Article/index.js +7 -2
- package/dist/es2019/components/ArticlesList/ArticlesList.js +6 -2
- package/dist/es2019/components/ArticlesList/ArticlesListItem/index.js +24 -12
- package/dist/es2019/components/ArticlesList/ArticlesListItem/styled.js +5 -3
- package/dist/es2019/components/ArticlesList/index.js +23 -2
- package/dist/es2019/components/HelpContentButton/index.js +2 -2
- package/dist/es2019/components/Search/SearchInput/index.js +4 -2
- package/dist/es2019/components/Search/SearchResults/SearchExternalSite.js +1 -1
- package/dist/es2019/components/Search/SearchResults/SearchResultsEmpty.js +1 -1
- package/dist/esm/assets/IconWrapper.js +0 -2
- package/dist/esm/assets/WhatsNewIcoExperiment.js +0 -2
- package/dist/esm/assets/WhatsNewIconFix.js +0 -2
- package/dist/esm/assets/WhatsNewIconImprovement.js +0 -2
- package/dist/esm/assets/WhatsNewIconNew.js +0 -2
- package/dist/esm/assets/WhatsNewIconRemoved.js +0 -2
- package/dist/esm/components/Article/HelpArticle/WasHelpfulForm/index.js +4 -2
- package/dist/esm/components/Article/WhatsNewArticle/index.js +1 -1
- package/dist/esm/components/Article/WhatsNewArticle/styled.compiled.css +4 -13
- package/dist/esm/components/Article/WhatsNewArticle/styled.js +8 -17
- package/dist/esm/components/Article/index.compiled.css +4 -1
- package/dist/esm/components/Article/index.js +7 -2
- package/dist/esm/components/ArticlesList/ArticlesList.js +6 -2
- package/dist/esm/components/ArticlesList/ArticlesListItem/index.js +23 -11
- package/dist/esm/components/ArticlesList/ArticlesListItem/styled.js +6 -3
- package/dist/esm/components/ArticlesList/index.js +23 -2
- package/dist/esm/components/HelpContentButton/index.js +2 -2
- package/dist/esm/components/Search/SearchInput/index.js +4 -2
- package/dist/esm/components/Search/SearchResults/SearchExternalSite.js +1 -1
- package/dist/esm/components/Search/SearchResults/SearchResultsEmpty.js +1 -1
- package/dist/types/assets/IconWrapper.d.ts +3 -4
- package/dist/types/components/ArticlesList/ArticlesList.d.ts +1 -0
- package/dist/types/components/ArticlesList/ArticlesListItem/index.d.ts +4 -4
- package/dist/types/components/ArticlesList/ArticlesListItem/styled.d.ts +2 -2
- package/dist/types-ts4.5/assets/IconWrapper.d.ts +3 -4
- package/dist/types-ts4.5/components/ArticlesList/ArticlesList.d.ts +1 -0
- package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/index.d.ts +4 -4
- package/dist/types-ts4.5/components/ArticlesList/ArticlesListItem/styled.d.ts +2 -2
- package/package.json +14 -15
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyFlaskIcon from '@atlaskit/legacy-custom-icons/flask-icon';
|
|
3
2
|
import FlaskIcon from '@atlaskit/icon/core/flask';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { P500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIcoExperiment() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: FlaskIcon,
|
|
9
|
-
LegacyIcon: LegacyFlaskIcon,
|
|
10
8
|
appearance: `var(--ds-icon-discovery, ${P500})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyBugIcon from '@atlaskit/legacy-custom-icons/bug-icon';
|
|
3
2
|
import BugIcon from '@atlaskit/icon/core/bug';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { B500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconFix() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: BugIcon,
|
|
9
|
-
LegacyIcon: LegacyBugIcon,
|
|
10
8
|
appearance: `var(--ds-icon-information, ${B500})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneWithStarIcon from '@atlaskit/legacy-custom-icons/megaphone-star-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { Y200 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconImprovement() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneWithStarIcon,
|
|
10
8
|
appearance: `var(--ds-icon-warning, ${Y200})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneIcon from '@atlaskit/legacy-custom-icons/megaphone-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N400 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconNew() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneIcon,
|
|
10
8
|
appearance: `var(--ds-icon, ${N400})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyDeleteIcon from '@atlaskit/legacy-custom-icons/delete-icon';
|
|
3
2
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N700 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconRemoved() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: DeleteIcon,
|
|
9
|
-
LegacyIcon: LegacyDeleteIcon,
|
|
10
8
|
appearance: `var(--ds-icon-disabled, ${N700})`
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -14,7 +14,7 @@ import Form, { Field, CheckboxField, FormFooter } from '@atlaskit/form';
|
|
|
14
14
|
import { RadioGroup } from '@atlaskit/radio';
|
|
15
15
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
16
16
|
import TextArea from '@atlaskit/textarea';
|
|
17
|
-
import CheckCircleIcon from '@atlaskit/icon/core/
|
|
17
|
+
import CheckCircleIcon from '@atlaskit/icon/core/status-success';
|
|
18
18
|
import { colors } from '@atlaskit/theme';
|
|
19
19
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
20
20
|
import { messages } from '../../../../messages';
|
|
@@ -215,7 +215,9 @@ export const ArticleWasHelpfulForm = ({
|
|
|
215
215
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
216
216
|
verticalAlign: 'middle'
|
|
217
217
|
},
|
|
218
|
-
role: "img"
|
|
218
|
+
role: "img"
|
|
219
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
220
|
+
,
|
|
219
221
|
"aria-label": "Success"
|
|
220
222
|
}, /*#__PURE__*/React.createElement(CheckCircleIcon, {
|
|
221
223
|
spacing: "spacious",
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
|
|
4
4
|
import HelpArticleContent from '@atlaskit/help-article';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
7
7
|
import Button from '@atlaskit/button';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
1
|
+
|
|
2
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
3
3
|
._1e0c1o8l{display:inline-block}
|
|
4
|
-
.
|
|
5
|
-
._1hmsglyw{text-decoration-line:none}
|
|
6
|
-
._1reo15vq{overflow-x:hidden}
|
|
7
|
-
._4bfu1r31{text-decoration-color:currentColor}
|
|
8
|
-
._ajmmnqa1{text-decoration-style:solid}
|
|
9
|
-
._k48p1pd9{font-weight:var(--ds-font-weight-semibold,600)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
10
5
|
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
11
|
-
._o5724jg8{white-space:normal}
|
|
12
6
|
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
13
|
-
._s7n4nkob{vertical-align:middle}
|
|
14
|
-
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
15
|
-
._syaz1rc1{color:var(--ds-text-subtlest,#5e6c84)}
|
|
7
|
+
._s7n4nkob{vertical-align:middle}
|
|
@@ -2,28 +2,24 @@
|
|
|
2
2
|
import "./styled.compiled.css";
|
|
3
3
|
import { ax, ix } from "@compiled/react/runtime";
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import
|
|
6
|
-
import { N300, N800 } from '@atlaskit/theme/colors';
|
|
7
|
-
const {
|
|
8
|
-
body
|
|
9
|
-
} = fontFallback;
|
|
10
|
-
const whatsNewTypeTitleStyles = null;
|
|
5
|
+
import Heading from '@atlaskit/heading';
|
|
11
6
|
export const WhatsNewTypeTitle = ({
|
|
12
7
|
children
|
|
13
|
-
}) => /*#__PURE__*/React.createElement(
|
|
14
|
-
|
|
8
|
+
}) => /*#__PURE__*/React.createElement(Heading, {
|
|
9
|
+
size: "xsmall",
|
|
10
|
+
as: "h3"
|
|
15
11
|
}, children);
|
|
16
12
|
const whatsNewIconContainerStyles = null;
|
|
17
13
|
export const WhatsNewIconContainer = ({
|
|
18
14
|
children
|
|
19
15
|
}) => /*#__PURE__*/React.createElement("div", {
|
|
20
|
-
className: ax(["
|
|
16
|
+
className: ax(["_zulpu2gc _1e0c1txw _n3tdu2gc"])
|
|
21
17
|
}, children);
|
|
22
|
-
const whatsNewTitleText = null;
|
|
23
18
|
export const WhatsNewTitleText = ({
|
|
24
19
|
children
|
|
25
|
-
}) => /*#__PURE__*/React.createElement(
|
|
26
|
-
|
|
20
|
+
}) => /*#__PURE__*/React.createElement(Heading, {
|
|
21
|
+
size: "xsmall",
|
|
22
|
+
as: "h4"
|
|
27
23
|
}, children);
|
|
28
24
|
const relatedLinkContainerStyles = null;
|
|
29
25
|
export const RelatedLinkContainer = ({
|
|
@@ -17,4 +17,7 @@
|
|
|
17
17
|
._kqswstnw{position:absolute}
|
|
18
18
|
._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
|
|
19
19
|
._u5f31ejb{padding-right:var(--ds-space-300,24px)}
|
|
20
|
-
._vchhusvi{box-sizing:border-box}
|
|
20
|
+
._vchhusvi{box-sizing:border-box}
|
|
21
|
+
._1hvw1o36:focus{outline-width:medium}
|
|
22
|
+
._49pcglyw:focus{outline-style:none}
|
|
23
|
+
._nt751r31:focus{outline-color:currentColor}
|
|
@@ -53,12 +53,15 @@ export const Article = ({
|
|
|
53
53
|
}, [history]);
|
|
54
54
|
const onArticleEntered = () => {
|
|
55
55
|
onArticleEnteredTimeout.current = window.setTimeout(() => {
|
|
56
|
+
var _articleContainerRef$;
|
|
56
57
|
// if skipArticleSlideInAnimation is true, set to false after the
|
|
57
58
|
// first slide-in animation
|
|
58
59
|
// NOTE: skipArticleSlideInAnimation could be true only after the mounting
|
|
59
60
|
if (skipArticleSlideInAnimation) {
|
|
60
61
|
setSkipArticleSlideInAnimation(false);
|
|
61
62
|
}
|
|
63
|
+
// Move focus to the article container for accessibility
|
|
64
|
+
(_articleContainerRef$ = articleContainerRef.current) === null || _articleContainerRef$ === void 0 ? void 0 : _articleContainerRef$.focus();
|
|
62
65
|
}, SLIDEIN_OVERLAY_TRANSITION_DURATION_MS);
|
|
63
66
|
};
|
|
64
67
|
const onArticleExit = () => {
|
|
@@ -108,13 +111,14 @@ export const Article = ({
|
|
|
108
111
|
}, state => {
|
|
109
112
|
return /*#__PURE__*/React.createElement("div", {
|
|
110
113
|
ref: articleContainerRef,
|
|
114
|
+
tabIndex: -1,
|
|
111
115
|
style: {
|
|
112
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
113
117
|
...transitionStyles[state],
|
|
114
118
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
115
119
|
...enableTransition[!skipArticleSlideInAnimation ? 'enabled' : 'disabled']
|
|
116
120
|
},
|
|
117
|
-
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _19bv1ejb _u5f31ejb _n3tdpxbi _kqswstnw _4t3i1kz6 _1bsb1osq _154i1eca _bfhkvuon _1ltv1osq _2lx21bp4 _vchhusvi _1reo15vq _18m91wug _1pbycs5v"])
|
|
121
|
+
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _19bv1ejb _u5f31ejb _n3tdpxbi _kqswstnw _4t3i1kz6 _1bsb1osq _154i1eca _bfhkvuon _1ltv1osq _2lx21bp4 _vchhusvi _1reo15vq _18m91wug _1pbycs5v _nt751r31 _49pcglyw _1hvw1o36"])
|
|
118
122
|
}, /*#__PURE__*/React.createElement(ArticleContent, {
|
|
119
123
|
currentArticle: currentArticle,
|
|
120
124
|
onHelpArticleLoadingFailTryAgainButtonClick: reloadHelpArticle && handleOnHelpArticleLoadingFailTryAgainButtonClick,
|
|
@@ -131,13 +135,14 @@ export const Article = ({
|
|
|
131
135
|
}, state => {
|
|
132
136
|
return /*#__PURE__*/React.createElement("div", {
|
|
133
137
|
ref: articleContainerRef,
|
|
138
|
+
tabIndex: -1,
|
|
134
139
|
style: {
|
|
135
140
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
136
141
|
...transitionStyles[state],
|
|
137
142
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
138
143
|
...enableTransition[!skipArticleSlideInAnimation ? 'enabled' : 'disabled']
|
|
139
144
|
},
|
|
140
|
-
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _ca0qpxbi _u5f31ejb _n3tdpxbi _19bv1ejb _kqswstnw _4t3i1osq _1bsb1osq _154iidpf _bfhkvuon _1ltv1osq _2lx21bp4 _vchhusvi _1reo15vq _18m91wug _1pbycs5v"])
|
|
145
|
+
className: ax(["_16jlkb7n _1o9zkb7n _i0dlf1ug _ca0qpxbi _u5f31ejb _n3tdpxbi _19bv1ejb _kqswstnw _4t3i1osq _1bsb1osq _154iidpf _bfhkvuon _1ltv1osq _2lx21bp4 _vchhusvi _1reo15vq _18m91wug _1pbycs5v _nt751r31 _49pcglyw _1hvw1o36"])
|
|
141
146
|
}, /*#__PURE__*/React.createElement(ArticleContent, {
|
|
142
147
|
currentArticle: currentArticle,
|
|
143
148
|
onHelpArticleLoadingFailTryAgainButtonClick: reloadHelpArticle && handleOnHelpArticleLoadingFailTryAgainButtonClick,
|
|
@@ -26,7 +26,8 @@ const articlesList = ({
|
|
|
26
26
|
articles = [],
|
|
27
27
|
minItemsToDisplay = MIN_ITEMS_TO_DISPLAY,
|
|
28
28
|
numberOfArticlesToDisplay = MIN_ITEMS_TO_DISPLAY,
|
|
29
|
-
onArticlesListItemClick
|
|
29
|
+
onArticlesListItemClick,
|
|
30
|
+
firstExpandedArticleRef
|
|
30
31
|
}) => {
|
|
31
32
|
const isExpanded = numberOfArticlesToDisplay > minItemsToDisplay;
|
|
32
33
|
return articles ? /*#__PURE__*/React.createElement(Box, {
|
|
@@ -35,6 +36,8 @@ const articlesList = ({
|
|
|
35
36
|
role: "list"
|
|
36
37
|
}, articles.slice(0, numberOfArticlesToDisplay).map((article, index) => {
|
|
37
38
|
const isVisible = index < minItemsToDisplay || isExpanded;
|
|
39
|
+
// The first expanded article is at index minItemsToDisplay
|
|
40
|
+
const isFirstExpandedArticle = index === minItemsToDisplay;
|
|
38
41
|
return /*#__PURE__*/React.createElement(Box, {
|
|
39
42
|
as: "li",
|
|
40
43
|
xcss: listStyles,
|
|
@@ -55,7 +58,8 @@ const articlesList = ({
|
|
|
55
58
|
href: article.href,
|
|
56
59
|
trustFactors: article.trustFactors,
|
|
57
60
|
source: article.source,
|
|
58
|
-
lastPublished: article.lastPublished
|
|
61
|
+
lastPublished: article.lastPublished,
|
|
62
|
+
ref: isFirstExpandedArticle ? firstExpandedArticleRef : undefined
|
|
59
63
|
}));
|
|
60
64
|
})) : null;
|
|
61
65
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import React, { forwardRef } from 'react';
|
|
2
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
3
4
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
4
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
5
6
|
import { injectIntl } from 'react-intl-next';
|
|
6
|
-
import LikeIcon from '@atlaskit/icon/core/
|
|
7
|
+
import LikeIcon from '@atlaskit/icon/core/thumbs-up';
|
|
7
8
|
import { ArticlesListItemWrapper, ArticlesListItemContainer, ArticlesListItemTitleText, ArticlesListItemDescription, ArticlesListItemLinkIcon, ArticlesListItemTrustFactor, ArticlesListItemViewCount, ArticlesListItemHelpfulCount, ArticlesListItemSource, ArticlesListItemLastModified, ArticlesListItemTitleSection, ArticlesListItemDescriptionHighlight } from './styled';
|
|
8
9
|
const ANALYTICS_CONTEXT_DATA = {
|
|
9
10
|
componentName: 'ArticlesListItem',
|
|
@@ -27,7 +28,7 @@ const highlightText = text => {
|
|
|
27
28
|
});
|
|
28
29
|
return sections;
|
|
29
30
|
};
|
|
30
|
-
export const ArticlesListItem = ({
|
|
31
|
+
export const ArticlesListItem = /*#__PURE__*/forwardRef(({
|
|
31
32
|
styles,
|
|
32
33
|
title,
|
|
33
34
|
description,
|
|
@@ -36,7 +37,7 @@ export const ArticlesListItem = ({
|
|
|
36
37
|
trustFactors,
|
|
37
38
|
source,
|
|
38
39
|
lastPublished
|
|
39
|
-
}) => {
|
|
40
|
+
}, ref) => {
|
|
40
41
|
const {
|
|
41
42
|
createAnalyticsEvent
|
|
42
43
|
} = useAnalyticsEvents();
|
|
@@ -58,27 +59,38 @@ export const ArticlesListItem = ({
|
|
|
58
59
|
const isSourceVisible = source != null;
|
|
59
60
|
const isLastPublishedVisible = lastPublished != null && lastPublished !== '';
|
|
60
61
|
return /*#__PURE__*/React.createElement(ArticlesListItemWrapper, {
|
|
62
|
+
ref: ref,
|
|
61
63
|
styles: styles,
|
|
62
64
|
"aria-disabled": "false",
|
|
63
65
|
role: "button",
|
|
64
66
|
href: href,
|
|
65
67
|
onClick: handleOnClick
|
|
66
|
-
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleSection, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title), isLastPublishedVisible &&
|
|
68
|
+
}, /*#__PURE__*/React.createElement(ArticlesListItemContainer, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleSection, null, /*#__PURE__*/React.createElement(ArticlesListItemTitleText, null, title), isLastPublishedVisible &&
|
|
69
|
+
/*#__PURE__*/
|
|
70
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
71
|
+
React.createElement(ArticlesListItemLastModified, null, "Last modified: ", lastPublished)), href && /*#__PURE__*/React.createElement(ArticlesListItemLinkIcon, null, /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
67
72
|
LEGACY_size: "small",
|
|
68
73
|
label: "Opens in a new window",
|
|
69
74
|
color: `var(--ds-icon-subtle, ${colors.N90})`,
|
|
70
75
|
LEGACY_secondaryColor: `var(--ds-icon-subtle, ${colors.N90})`
|
|
71
|
-
}))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, highlightText(description)), isSourceVisible && /*#__PURE__*/React.createElement(ArticlesListItemSource, null, source), isTrustFactorVisible && /*#__PURE__*/React.createElement(ArticlesListItemTrustFactor, null, isNumViewsVisible &&
|
|
76
|
+
}))), /*#__PURE__*/React.createElement(ArticlesListItemDescription, null, highlightText(description)), isSourceVisible && /*#__PURE__*/React.createElement(ArticlesListItemSource, null, source), isTrustFactorVisible && /*#__PURE__*/React.createElement(ArticlesListItemTrustFactor, null, isNumViewsVisible &&
|
|
77
|
+
/*#__PURE__*/
|
|
78
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
79
|
+
React.createElement(ArticlesListItemViewCount, null, trustFactors.numViews, " views"), isHelpfulCountVisible && /*#__PURE__*/React.createElement(ArticlesListItemHelpfulCount, null, /*#__PURE__*/React.createElement(LikeIcon, {
|
|
72
80
|
LEGACY_margin: "0 -0.25px 0 0",
|
|
73
81
|
color: "currentColor",
|
|
74
82
|
label: "Like",
|
|
75
83
|
LEGACY_size: "small"
|
|
76
84
|
}), trustFactors.helpfulCount)));
|
|
77
|
-
};
|
|
78
|
-
const ArticlesListItemWithContext = props => {
|
|
85
|
+
});
|
|
86
|
+
const ArticlesListItemWithContext = /*#__PURE__*/forwardRef((props, ref) => {
|
|
79
87
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
80
88
|
data: ANALYTICS_CONTEXT_DATA
|
|
81
|
-
}, /*#__PURE__*/React.createElement(ArticlesListItem,
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
}, /*#__PURE__*/React.createElement(ArticlesListItem, _extends({
|
|
90
|
+
ref: ref
|
|
91
|
+
}, props)));
|
|
92
|
+
});
|
|
93
|
+
const _default_1 = injectIntl(ArticlesListItemWithContext, {
|
|
94
|
+
forwardRef: true
|
|
95
|
+
});
|
|
84
96
|
export default _default_1;
|
|
@@ -11,15 +11,16 @@ const {
|
|
|
11
11
|
body
|
|
12
12
|
} = fontFallback;
|
|
13
13
|
const articlesListItemWrapperStyles = null;
|
|
14
|
-
export const ArticlesListItemWrapper = ({
|
|
14
|
+
export const ArticlesListItemWrapper = /*#__PURE__*/React.forwardRef(({
|
|
15
15
|
styles,
|
|
16
16
|
children,
|
|
17
17
|
...rest
|
|
18
|
-
}) => /*#__PURE__*/React.createElement("a", _extends({
|
|
18
|
+
}, ref) => /*#__PURE__*/React.createElement("a", _extends({
|
|
19
|
+
ref: ref,
|
|
19
20
|
style: styles
|
|
20
21
|
}, rest, {
|
|
21
22
|
className: ax(["_4bfu1r31 _1hmsglyw _ajmmnqa1 _2rkofajl _kqswh2mm _vchhusvi _ca0qu2gc _u5f3u2gc _n3tdu2gc _19bvu2gc _1e0c1ule _80omtlke _syaz1wmz _bfhkqtfy _7ehi1ssq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2waglyw _4fprglyw _1bnxglyw _1x28glyw _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _1q5t1r31 _nt751r31 _1dit1r31 _9nxe1r31 _1ohyglyw _49pcglyw _ksodglyw _tpgfglyw _1r9x1o36 _1hvw1o36 _4hz81o36 _12gr1o36 _13roglyw _1bg4glyw _1qb1glyw _1dnaglyw _irr314ae _1di61l7b"])
|
|
22
|
-
}), children);
|
|
23
|
+
}), children));
|
|
23
24
|
const articlesListItemContainerStyles = null;
|
|
24
25
|
export const ArticlesListItemContainer = ({
|
|
25
26
|
children
|
|
@@ -36,6 +37,7 @@ const articlesListItemLinkIconStyles = null;
|
|
|
36
37
|
export const ArticlesListItemLinkIcon = ({
|
|
37
38
|
children
|
|
38
39
|
}) => /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
"aria-label": "Opens in a new window",
|
|
39
41
|
className: ax(["_1wpz1wug _bozg1b66 _s7n4nkob"])
|
|
40
42
|
}, children);
|
|
41
43
|
const articlesListItemTitleTextStyles = null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
2
2
|
import ArticlesList from './ArticlesList';
|
|
3
3
|
import ShowMoreButton from '../ShowMoreButton';
|
|
4
4
|
import { ArticlesListContainer } from './styled';
|
|
@@ -12,6 +12,8 @@ const ArticleList = ({
|
|
|
12
12
|
onToggleArticlesList
|
|
13
13
|
}) => {
|
|
14
14
|
const [showMoreToggled, setShowMoreToggled] = useState(true);
|
|
15
|
+
const firstExpandedArticleRef = useRef(null);
|
|
16
|
+
const isExpandingRef = useRef(false);
|
|
15
17
|
const getMinItemsToDisplay = () => {
|
|
16
18
|
return minItemsToDisplay ? minItemsToDisplay : MIN_ITEMS_TO_DISPLAY;
|
|
17
19
|
};
|
|
@@ -24,7 +26,24 @@ const ArticleList = ({
|
|
|
24
26
|
const getNumberOfArticlesToDisplay = showMoreToggeled => {
|
|
25
27
|
return showMoreToggeled ? getMinItemsToDisplay() : getMaxItemsToDisplay();
|
|
26
28
|
};
|
|
29
|
+
|
|
30
|
+
// Focus on the first newly revealed article after expansion
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
if (isExpandingRef.current && !showMoreToggled) {
|
|
33
|
+
if (firstExpandedArticleRef.current) {
|
|
34
|
+
firstExpandedArticleRef.current.focus();
|
|
35
|
+
}
|
|
36
|
+
isExpandingRef.current = false;
|
|
37
|
+
}
|
|
38
|
+
}, [showMoreToggled]);
|
|
39
|
+
const setFirstExpandedArticleRef = useCallback(element => {
|
|
40
|
+
firstExpandedArticleRef.current = element;
|
|
41
|
+
}, []);
|
|
27
42
|
const toggleArticlesList = (event, analyticsEvent) => {
|
|
43
|
+
// Track if we're expanding (going from collapsed to expanded)
|
|
44
|
+
if (showMoreToggled) {
|
|
45
|
+
isExpandingRef.current = true;
|
|
46
|
+
}
|
|
28
47
|
setShowMoreToggled(!showMoreToggled);
|
|
29
48
|
if (onToggleArticlesList) {
|
|
30
49
|
onToggleArticlesList(event, analyticsEvent, !showMoreToggled);
|
|
@@ -36,7 +55,9 @@ const ArticleList = ({
|
|
|
36
55
|
style: style,
|
|
37
56
|
onArticlesListItemClick: onArticlesListItemClick,
|
|
38
57
|
articles: articles,
|
|
39
|
-
numberOfArticlesToDisplay: getNumberOfArticlesToDisplay(showMoreToggled)
|
|
58
|
+
numberOfArticlesToDisplay: getNumberOfArticlesToDisplay(showMoreToggled),
|
|
59
|
+
minItemsToDisplay: getMinItemsToDisplay(),
|
|
60
|
+
firstExpandedArticleRef: setFirstExpandedArticleRef
|
|
40
61
|
}), articles.length > getMinItemsToDisplay() && /*#__PURE__*/React.createElement(ShowMoreButton, {
|
|
41
62
|
minItemsToDisplay: getMinItemsToDisplay(),
|
|
42
63
|
maxItemsToDisplay: getMaxItemsToDisplay(),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
2
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
3
3
|
import Tooltip from '@atlaskit/tooltip';
|
|
4
4
|
import { NotificationIndicator } from '@atlaskit/notification-indicator';
|
|
5
5
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
@@ -48,7 +48,7 @@ const HelpContentButton = ({
|
|
|
48
48
|
}, /*#__PURE__*/React.createElement(ShortcutIcon, {
|
|
49
49
|
color: "currentColor",
|
|
50
50
|
LEGACY_size: "small",
|
|
51
|
-
label: ""
|
|
51
|
+
label: "Opens in a new window"
|
|
52
52
|
}))));
|
|
53
53
|
const target = href ? openInSameTab ? '_self' : '_blank' : undefined;
|
|
54
54
|
return /*#__PURE__*/React.createElement(AnalyticsContext, {
|
|
@@ -7,7 +7,7 @@ import Textfield from '@atlaskit/textfield';
|
|
|
7
7
|
import Button from '@atlaskit/button/custom-theme-button';
|
|
8
8
|
import Spinner from '@atlaskit/spinner';
|
|
9
9
|
import SearchIcon from '@atlaskit/icon/core/migration/search';
|
|
10
|
-
import EditorCloseIcon from '@atlaskit/icon/core/
|
|
10
|
+
import EditorCloseIcon from '@atlaskit/icon/core/cross';
|
|
11
11
|
import { injectIntl } from 'react-intl-next';
|
|
12
12
|
import { REQUEST_STATE } from '../../../model/Requests';
|
|
13
13
|
import { useSearchContext } from '../../contexts/searchContext';
|
|
@@ -98,7 +98,9 @@ export const SearchInput = ({
|
|
|
98
98
|
}), searchValue !== '' && /*#__PURE__*/React.createElement(Button, {
|
|
99
99
|
appearance: "subtle",
|
|
100
100
|
onClick: handleOnClearButtonClick,
|
|
101
|
-
spacing: "none"
|
|
101
|
+
spacing: "none"
|
|
102
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
103
|
+
,
|
|
102
104
|
"aria-label": "Clear",
|
|
103
105
|
className: ax(["_1bsb1tcg _4t3i1tcg"])
|
|
104
106
|
}, /*#__PURE__*/React.createElement(EditorCloseIcon, {
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { useAnalyticsEvents, AnalyticsContext } from '@atlaskit/analytics-next';
|
|
3
3
|
import * as colors from '@atlaskit/theme/colors';
|
|
4
4
|
import Button from '@atlaskit/button';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { injectIntl } from 'react-intl-next';
|
|
7
7
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
8
8
|
import NotFoundImage from '../../../assets/NotFoundImage';
|
|
@@ -4,13 +4,11 @@ import { IconTile } from '@atlaskit/icon';
|
|
|
4
4
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
5
|
export var IconWrapper = function IconWrapper(_ref) {
|
|
6
6
|
var Icon = _ref.Icon,
|
|
7
|
-
LegacyIcon = _ref.LegacyIcon,
|
|
8
7
|
appearance = _ref.appearance;
|
|
9
8
|
return /*#__PURE__*/React.createElement(Flex, {
|
|
10
9
|
alignItems: "center",
|
|
11
10
|
justifyContent: "center"
|
|
12
11
|
}, !fg('platform-visual-refresh-icons') ? /*#__PURE__*/React.createElement(Icon, {
|
|
13
|
-
LEGACY_fallbackIcon: LegacyIcon,
|
|
14
12
|
label: "",
|
|
15
13
|
color: "var(--ds-icon-inverse, #FFFFFF)"
|
|
16
14
|
}) :
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyFlaskIcon from '@atlaskit/legacy-custom-icons/flask-icon';
|
|
3
2
|
import FlaskIcon from '@atlaskit/icon/core/flask';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { P500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIcoExperiment() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: FlaskIcon,
|
|
9
|
-
LegacyIcon: LegacyFlaskIcon,
|
|
10
8
|
appearance: "var(--ds-icon-discovery, ".concat(P500, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyBugIcon from '@atlaskit/legacy-custom-icons/bug-icon';
|
|
3
2
|
import BugIcon from '@atlaskit/icon/core/bug';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { B500 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconFix() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: BugIcon,
|
|
9
|
-
LegacyIcon: LegacyBugIcon,
|
|
10
8
|
appearance: "var(--ds-icon-information, ".concat(B500, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneWithStarIcon from '@atlaskit/legacy-custom-icons/megaphone-star-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { Y200 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconImprovement() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneWithStarIcon,
|
|
10
8
|
appearance: "var(--ds-icon-warning, ".concat(Y200, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyMegaphoneIcon from '@atlaskit/legacy-custom-icons/megaphone-icon';
|
|
3
2
|
import MegaphoneIcon from '@atlaskit/icon/core/megaphone';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N400 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconNew() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: MegaphoneIcon,
|
|
9
|
-
LegacyIcon: LegacyMegaphoneIcon,
|
|
10
8
|
appearance: "var(--ds-icon, ".concat(N400, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import LegacyDeleteIcon from '@atlaskit/legacy-custom-icons/delete-icon';
|
|
3
2
|
import DeleteIcon from '@atlaskit/icon/core/delete';
|
|
4
3
|
import { IconWrapper } from './IconWrapper';
|
|
5
4
|
import { N700 } from '@atlaskit/theme/colors';
|
|
6
5
|
export default function WhatsNewIconRemoved() {
|
|
7
6
|
return /*#__PURE__*/React.createElement(IconWrapper, {
|
|
8
7
|
Icon: DeleteIcon,
|
|
9
|
-
LegacyIcon: LegacyDeleteIcon,
|
|
10
8
|
appearance: "var(--ds-icon-disabled, ".concat(N700, ")")
|
|
11
9
|
});
|
|
12
10
|
}
|
|
@@ -15,7 +15,7 @@ import Form, { Field, CheckboxField, FormFooter } from '@atlaskit/form';
|
|
|
15
15
|
import { RadioGroup } from '@atlaskit/radio';
|
|
16
16
|
import { Checkbox } from '@atlaskit/checkbox';
|
|
17
17
|
import TextArea from '@atlaskit/textarea';
|
|
18
|
-
import CheckCircleIcon from '@atlaskit/icon/core/
|
|
18
|
+
import CheckCircleIcon from '@atlaskit/icon/core/status-success';
|
|
19
19
|
import { colors } from '@atlaskit/theme';
|
|
20
20
|
import { Text } from '@atlaskit/primitives/compiled';
|
|
21
21
|
import { messages } from '../../../../messages';
|
|
@@ -235,7 +235,9 @@ export var ArticleWasHelpfulForm = function ArticleWasHelpfulForm(_ref) {
|
|
|
235
235
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
|
|
236
236
|
verticalAlign: 'middle'
|
|
237
237
|
},
|
|
238
|
-
role: "img"
|
|
238
|
+
role: "img"
|
|
239
|
+
// eslint-disable-next-line @atlassian/i18n/no-literal-string-in-jsx
|
|
240
|
+
,
|
|
239
241
|
"aria-label": "Success"
|
|
240
242
|
}, /*#__PURE__*/React.createElement(CheckCircleIcon, {
|
|
241
243
|
spacing: "spacious",
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { injectIntl } from 'react-intl-next';
|
|
3
3
|
import { BODY_FORMAT_TYPES } from '@atlaskit/help-article';
|
|
4
4
|
import HelpArticleContent from '@atlaskit/help-article';
|
|
5
|
-
import ShortcutIcon from '@atlaskit/icon/core/
|
|
5
|
+
import ShortcutIcon from '@atlaskit/icon/core/link-external';
|
|
6
6
|
import { AnalyticsContext } from '@atlaskit/analytics-next';
|
|
7
7
|
import Button from '@atlaskit/button';
|
|
8
8
|
import { messages } from '../../../messages';
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
.
|
|
3
|
-
._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
1
|
+
|
|
2
|
+
._zulpu2gc{gap:var(--ds-space-100,8px)}._19bv1b66{padding-left:var(--ds-space-050,4px)}
|
|
4
3
|
._1e0c1o8l{display:inline-block}
|
|
5
|
-
.
|
|
6
|
-
._1hmsglyw{text-decoration-line:none}
|
|
7
|
-
._1reo15vq{overflow-x:hidden}
|
|
8
|
-
._4bfu1r31{text-decoration-color:currentColor}
|
|
9
|
-
._ajmmnqa1{text-decoration-style:solid}
|
|
10
|
-
._k48p1pd9{font-weight:var(--ds-font-weight-semibold,600)}
|
|
4
|
+
._1e0c1txw{display:flex}
|
|
11
5
|
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
12
|
-
._o5724jg8{white-space:normal}
|
|
13
6
|
._otyru2gc{margin-bottom:var(--ds-space-100,8px)}
|
|
14
|
-
._s7n4nkob{vertical-align:middle}
|
|
15
|
-
._syaz1o8f{color:var(--_ggxzyp)}
|
|
16
|
-
._syazg0pi{color:var(--_1dzgjqk)}
|
|
7
|
+
._s7n4nkob{vertical-align:middle}
|