@atlaskit/editor-plugin-help-dialog 6.0.0 → 6.0.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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-help-dialog
|
|
2
2
|
|
|
3
|
+
## 6.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 6.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`3313b6542c788`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3313b6542c788) -
|
|
14
|
+
[ux] [ENGHEALTH-30483] use `hasCloseButton` or CloseButton for ModalHeader
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.0.0
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,6 +11,9 @@ var _messages = require("@atlaskit/editor-common/messages");
|
|
|
11
11
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
12
12
|
var _heading = _interopRequireDefault(require("@atlaskit/heading"));
|
|
13
13
|
var _cross = _interopRequireDefault(require("@atlaskit/icon/core/migration/cross"));
|
|
14
|
+
var _modalDialog = require("@atlaskit/modal-dialog");
|
|
15
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
|
+
var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
|
|
14
17
|
var _styles = require("./styles");
|
|
15
18
|
/**
|
|
16
19
|
* @jsxRuntime classic
|
|
@@ -18,6 +21,15 @@ var _styles = require("./styles");
|
|
|
18
21
|
*/
|
|
19
22
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
20
23
|
|
|
24
|
+
var toolbarFocusStyles = (0, _react.css)({
|
|
25
|
+
// In Firefox/Safari, when user clicks (as suppose to press Enter) on the help quick insert item, focus ring may not be present
|
|
26
|
+
// Hence we manually force it
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
28
|
+
'button:focus:not(:focus-visible)': {
|
|
29
|
+
outline: "2px solid ".concat("var(--ds-border-focused, #388BFF)"),
|
|
30
|
+
outlineOffset: "var(--ds-space-025, 2px)"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
21
33
|
var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
22
34
|
var formatMessage = _ref.intl.formatMessage,
|
|
23
35
|
onClose = _ref.onClose;
|
|
@@ -30,7 +42,15 @@ var ModalHeader = (0, _reactIntlNext.injectIntl)(function (_ref) {
|
|
|
30
42
|
}, (0, _react.jsx)(_reactIntlNext.FormattedMessage
|
|
31
43
|
// Ignored via go/ees005
|
|
32
44
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
33
|
-
, _messages.helpDialogMessages.editorHelp)), (0,
|
|
45
|
+
, _messages.helpDialogMessages.editorHelp)), onClose && (0, _expValEquals.expValEquals)('platform_editor_update_modal_close_button', 'isEnabled', true) ? (0, _react.jsx)("div", {
|
|
46
|
+
css: toolbarFocusStyles
|
|
47
|
+
}, (0, _react.jsx)(_tooltip.default, {
|
|
48
|
+
content: formatMessage(_messages.helpDialogMessages.closeHelpDialog),
|
|
49
|
+
position: "top"
|
|
50
|
+
}, (0, _react.jsx)(_modalDialog.CloseButton, {
|
|
51
|
+
onClick: onClose,
|
|
52
|
+
label: formatMessage(_messages.helpDialogMessages.closeHelpDialog)
|
|
53
|
+
}))) : (0, _react.jsx)("div", null, (0, _react.jsx)(_uiMenu.ToolbarButton
|
|
34
54
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
35
55
|
, {
|
|
36
56
|
onClick: onClose,
|
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
6
|
+
import { jsx, css } from '@emotion/react';
|
|
7
7
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
8
8
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
9
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
10
|
import Heading from '@atlaskit/heading';
|
|
11
11
|
import CrossIcon from '@atlaskit/icon/core/migration/cross';
|
|
12
|
+
import { CloseButton } from '@atlaskit/modal-dialog';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
12
15
|
import { header, toolbarButton } from './styles';
|
|
16
|
+
const toolbarFocusStyles = css({
|
|
17
|
+
// In Firefox/Safari, when user clicks (as suppose to press Enter) on the help quick insert item, focus ring may not be present
|
|
18
|
+
// Hence we manually force it
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
20
|
+
'button:focus:not(:focus-visible)': {
|
|
21
|
+
outline: `2px solid ${"var(--ds-border-focused, #388BFF)"}`,
|
|
22
|
+
outlineOffset: "var(--ds-space-025, 2px)"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
13
25
|
const ModalHeader = injectIntl(({
|
|
14
26
|
intl: {
|
|
15
27
|
formatMessage
|
|
@@ -25,7 +37,15 @@ const ModalHeader = injectIntl(({
|
|
|
25
37
|
}, jsx(FormattedMessage
|
|
26
38
|
// Ignored via go/ees005
|
|
27
39
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
28
|
-
, messages.editorHelp)), jsx("div",
|
|
40
|
+
, messages.editorHelp)), onClose && expValEquals('platform_editor_update_modal_close_button', 'isEnabled', true) ? jsx("div", {
|
|
41
|
+
css: toolbarFocusStyles
|
|
42
|
+
}, jsx(Tooltip, {
|
|
43
|
+
content: formatMessage(messages.closeHelpDialog),
|
|
44
|
+
position: "top"
|
|
45
|
+
}, jsx(CloseButton, {
|
|
46
|
+
onClick: onClose,
|
|
47
|
+
label: formatMessage(messages.closeHelpDialog)
|
|
48
|
+
}))) : jsx("div", null, jsx(ToolbarButton
|
|
29
49
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
30
50
|
, {
|
|
31
51
|
onClick: onClose,
|
|
@@ -3,13 +3,25 @@
|
|
|
3
3
|
* @jsx jsx
|
|
4
4
|
*/
|
|
5
5
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
6
|
+
import { jsx, css } from '@emotion/react';
|
|
7
7
|
import { FormattedMessage, injectIntl } from 'react-intl-next';
|
|
8
8
|
import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
|
|
9
9
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
10
10
|
import Heading from '@atlaskit/heading';
|
|
11
11
|
import CrossIcon from '@atlaskit/icon/core/migration/cross';
|
|
12
|
+
import { CloseButton } from '@atlaskit/modal-dialog';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
|
+
import Tooltip from '@atlaskit/tooltip';
|
|
12
15
|
import { header, toolbarButton } from './styles';
|
|
16
|
+
var toolbarFocusStyles = css({
|
|
17
|
+
// In Firefox/Safari, when user clicks (as suppose to press Enter) on the help quick insert item, focus ring may not be present
|
|
18
|
+
// Hence we manually force it
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
20
|
+
'button:focus:not(:focus-visible)': {
|
|
21
|
+
outline: "2px solid ".concat("var(--ds-border-focused, #388BFF)"),
|
|
22
|
+
outlineOffset: "var(--ds-space-025, 2px)"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
13
25
|
var ModalHeader = injectIntl(function (_ref) {
|
|
14
26
|
var formatMessage = _ref.intl.formatMessage,
|
|
15
27
|
onClose = _ref.onClose;
|
|
@@ -22,7 +34,15 @@ var ModalHeader = injectIntl(function (_ref) {
|
|
|
22
34
|
}, jsx(FormattedMessage
|
|
23
35
|
// Ignored via go/ees005
|
|
24
36
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
25
|
-
, messages.editorHelp)), jsx("div",
|
|
37
|
+
, messages.editorHelp)), onClose && expValEquals('platform_editor_update_modal_close_button', 'isEnabled', true) ? jsx("div", {
|
|
38
|
+
css: toolbarFocusStyles
|
|
39
|
+
}, jsx(Tooltip, {
|
|
40
|
+
content: formatMessage(messages.closeHelpDialog),
|
|
41
|
+
position: "top"
|
|
42
|
+
}, jsx(CloseButton, {
|
|
43
|
+
onClick: onClose,
|
|
44
|
+
label: formatMessage(messages.closeHelpDialog)
|
|
45
|
+
}))) : jsx("div", null, jsx(ToolbarButton
|
|
26
46
|
// @ts-expect-error modal onClose handler requires second parameter of UIAnalyticsEvent, which we don't want to pass
|
|
27
47
|
, {
|
|
28
48
|
onClick: onClose,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
-
import type
|
|
2
|
+
import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
3
3
|
interface ModalHeaderProps extends WrappedComponentProps {
|
|
4
4
|
onClose: OnCloseHandler | undefined;
|
|
5
5
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
2
|
-
import type
|
|
2
|
+
import { type OnCloseHandler } from '@atlaskit/modal-dialog';
|
|
3
3
|
interface ModalHeaderProps extends WrappedComponentProps {
|
|
4
4
|
onClose: OnCloseHandler | undefined;
|
|
5
5
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-help-dialog",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.2",
|
|
4
4
|
"description": "Help Dialog plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@atlaskit/editor-plugin-analytics": "^6.
|
|
32
|
+
"@atlaskit/editor-plugin-analytics": "^6.1.0",
|
|
33
33
|
"@atlaskit/editor-plugin-quick-insert": "^6.0.0",
|
|
34
34
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
35
35
|
"@atlaskit/editor-shared-styles": "^3.6.0",
|
|
@@ -39,8 +39,9 @@
|
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
40
|
"@atlaskit/primitives": "^14.15.0",
|
|
41
41
|
"@atlaskit/theme": "^21.0.0",
|
|
42
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
43
|
-
"@atlaskit/tokens": "^6.
|
|
42
|
+
"@atlaskit/tmp-editor-statsig": "^13.0.0",
|
|
43
|
+
"@atlaskit/tokens": "^6.4.0",
|
|
44
|
+
"@atlaskit/tooltip": "^20.5.0",
|
|
44
45
|
"@babel/runtime": "^7.0.0",
|
|
45
46
|
"@emotion/react": "^11.7.1",
|
|
46
47
|
"react-intl-next": "npm:react-intl@^5.18.1",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"@testing-library/react": "^13.4.0"
|
|
51
52
|
},
|
|
52
53
|
"peerDependencies": {
|
|
53
|
-
"@atlaskit/editor-common": "^110.
|
|
54
|
+
"@atlaskit/editor-common": "^110.4.0",
|
|
54
55
|
"react": "^18.2.0"
|
|
55
56
|
},
|
|
56
57
|
"techstack": {
|